Gathering detailed insights and metrics for @bpmn-io/form-js-playground
Gathering detailed insights and metrics for @bpmn-io/form-js-playground
Gathering detailed insights and metrics for @bpmn-io/form-js-playground
Gathering detailed insights and metrics for @bpmn-io/form-js-playground
npm install @bpmn-io/form-js-playground
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
418 Stars
1,768 Commits
108 Forks
19 Watching
38 Branches
26 Contributors
Updated on 21 Nov 2024
JavaScript (92.56%)
CSS (4.24%)
SCSS (2.76%)
Shell (0.21%)
HTML (0.16%)
TypeScript (0.08%)
Cumulative downloads
Total Downloads
Last day
-3.6%
845
Compared to previous day
Last week
14.7%
4,461
Compared to previous week
Last month
9.8%
18,048
Compared to previous month
Last year
171.2%
167,178
Compared to previous year
15
5
View, visually edit and simulate JSON-based forms.
This library exports a form viewer, editor and playground.
Renders a form based on a form schema and existing data:
1import { Form } from '@bpmn-io/form-js'; 2 3const form = new Form({ 4 container: document.querySelector('#form'), 5}); 6 7await form.importSchema(schema, data); 8 9form.on('submit', (event) => { 10 console.log(event.data, event.errors); 11});
See viewer documentation for further details.
Create a new form or edit an exsting one:
1import { FormEditor } from '@bpmn-io/form-js'; 2 3const formEditor = new FormEditor({ 4 container: document.querySelector('#form-editor'), 5}); 6 7await formEditor.importSchema(schema);
See editor documentation for further details.
Create and simulate a form with input and output data:
1import { FormPlayground } from '@bpmn-io/form-js'; 2 3const formPlayground = new FormPlayground({ 4 container: document.querySelector('#form-playground'), 5 schema, 6 data, 7});
See playground documentation for further details.
Use the getSchemaVariables
util to retrieve the variables defined in a form schema. This is useful to gather what data is consumed and produced by a form.
1import { getSchemaVariables } from '@bpmn-io/form-js'; 2 3const variables = getSchemaVariables(schema); 4 5console.log('Schema variables', variables);
It is also possible to distinct between input and output variables:
1import { getSchemaVariables } from '@bpmn-io/form-js'; 2 3const outputVariables = getSchemaVariables(schema, { inputs: false }); 4const inputVariables = getSchemaVariables(schema, { outputs: false });
Build the project in a Posix environment. On Windows, that is Git Bash or WSL.
Note we currently support development environments with Node.js version 16 (and npm version 8). We encourage you to use a Node.js version manager (e.g., nvm
or n
) to set up the needed versions.
Prepare the project by installing all dependencies:
1npm install
Then, depending on your use-case you may run any of the following commands:
1# build the library and run all tests 2npm run all 3 4# spin up a single local form-js instance 5npm start 6 7# spin up a specific instance 8 9## viewer 10npm run start:viewer 11 12## editor 13npm run start:editor 14 15## playground 16npm run start:playground
To run the visual regression tests, read the docs here
Use under the terms of the bpmn.io license.
No vulnerabilities found.
Reason
30 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
security policy file detected
Details
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 5
Details
Reason
7 existing vulnerabilities detected
Details
Reason
Found 3/24 approved changesets -- score normalized to 1
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More