5.0.0 • Published 1 year ago

caracal_polaris v5.0.0

Weekly downloads
6
License
MIT
Repository
github
Last release
1 year ago

node GitHub package.json version GitHub CodeQL CircleCI codecov Website

Polaris: A workflow engine to build web pages.

Building apps from without coding. We will be using configuration to build our apps.
See the Wiki for more information.

Why Polaris?

Why not write just the html page? Polaris will enable non programmers to build their own forms using a GUI builder. The GUI builder will enable the user to specify the flow of the page by settings. You will be able to give the audiences different flows by using LaunchDarkly for example.

You'll get data binding, form validation, the ability to call api's and the abitity for different codepaths based on user interactions out of the box.

An demo can be seen on our Demo page

Please refere to the Wiki for more information.

Getting Started

You can try Polaris Workflow online at Stackblits

Local

Add polaris to your application

npm install caracal_polaris --save

Add the scripts to your page.

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta http-equiv="X-UA-Compatible" content="ie=edge" />
  <title>Polaris Workflow</title>

  <link rel="stylesheet" href="style.css" />
  <script type="module" src="node_modules/caracal_polaris/dist/polaris/polaris.esm.js"></script>
  <script nomodule src="node_modules/caracal_polaris/dist/polaris/polaris.js"></script>
</head>

Add the element to your page.

<polaris-analytics></polaris-analytics>
<polaris-workflow></polaris-workflow>

Load the process, refere to the wiki to setup the remote server to provide the process definitions.

<script>
  const process = {
    "name" : "demo",
    "activities": [
      {
        "name": "start",
        "type": "page-activity",            
        "controls": [
            {"tag" : "h1", "innerHTML": "Polaris" },
            {"tag" : "span", "innerHTML": "Welcome to polaris workflow" }                    
        ]        
      }
    ]
  };

  customElements
    .whenDefined("polaris-workflow")
    .then(() => {

      const wf = document.querySelector("polaris-workflow");
      wf.load(process);
    });
</script>

Listen to messages, refere to the wiki for a complete list of events.

<script>
  customElements
    .whenDefined("polaris-workflow")
    .then(() => {
      const wf = document.querySelector("polaris-workflow");
      wf.addEventListener("wfMessage", (event) => {
        switch(event.detail.type) {
          case "ERROR": console.log(event); break;
          case "VALIDATION_ERROR": console.log(event); break;
          ...
          ...
          default: console.log("Unknown Event"); break;
        }
      });
    });
</script>

To start developing your new Polaris project, run:

npm start
5.0.0

1 year ago

3.2.3

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

3.3.0

2 years ago

3.2.2

2 years ago

3.2.0

3 years ago

3.1.1

3 years ago

3.1.0

3 years ago

3.0.6

3 years ago

3.0.4

3 years ago

3.0.3

3 years ago

3.0.2

3 years ago

3.0.5

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.0.3

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.4

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.2

4 years ago

0.1.0

4 years ago

0.1.1

4 years ago

0.0.20

4 years ago

0.0.17

4 years ago

0.0.19

4 years ago

0.0.15

4 years ago

0.0.14

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago