1.11.3 • Published 6 months ago

@bpmn-io/form-js v1.11.3

Weekly downloads
100
License
SEE LICENSE IN LI...
Repository
github
Last release
6 months ago

@bpmn-io/form-js

CI

View, edit and simulate JSON-based forms.

Usage

This library exports a form viewer, editor and playground.

Display a form

Renders a form based on [a form schema](./docs/FORM_SCHEMA.md) and existing data:

import { Form } from '@bpmn-io/form-js';

const form = new Form({
  container: document.querySelector('#form'),
});

await form.importSchema(schema, data);

form.on('submit', (event) => {
  console.log(event.data, event.errors);
});

See [viewer documentation](./packages/form-js-viewer) for further details.

Create and edit a form

Create a new form or edit an exsting one:

import { FormEditor } from '@bpmn-io/form-js';

const formEditor = new FormEditor({
  container: document.querySelector('#form-editor'),
});

await formEditor.importSchema(schema);

See [editor documentation](./packages/form-js-editor) for further details.

Create and simulate a form with input and output data

Create and simulate a form with input and output data:

import { FormPlayground } from '@bpmn-io/form-js';

const formPlayground = new FormPlayground({
  container: document.querySelector('#form-playground'),
  schema,
  data,
});

See [playground documentation](./packages/form-js-playground) for further details.

Retrieve schema variables from a form

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.

import { getSchemaVariables } from '@bpmn-io/form-js';

const variables = getSchemaVariables(schema);

console.log('Schema variables', variables);

It is also possible to distinct between input and output variables:

import { getSchemaVariables } from '@bpmn-io/form-js';

const outputVariables = getSchemaVariables(schema, { inputs: false });
const inputVariables = getSchemaVariables(schema, { outputs: false });

Resources

  • [Demo](https://demo.bpmn.io/form)
  • [Issues](https://github.com/bpmn-io/form-js/issues)
  • [Changelog](../form-js/CHANGELOG.md)
  • [Form schema](../../docs/FORM_SCHEMA.md)

License

Use under the terms of the [bpmn.io license](http://bpmn.io/license).

1.11.3

6 months ago

1.11.2

6 months ago

1.11.1

6 months ago

1.11.0

7 months ago

1.10.1

8 months ago

1.11.0-alpha.0

8 months ago

1.9.1

9 months ago

1.9.0

11 months ago

1.10.0

8 months ago

1.9.2

8 months ago

1.8.8

11 months ago

1.8.7

12 months ago

1.8.6

1 year ago

1.8.5

1 year ago

1.8.4

1 year ago

1.8.3

1 year ago

1.8.2

1 year ago

1.8.1

1 year ago

1.8.0

1 year ago

1.7.3

1 year ago

1.7.2

1 year ago

1.7.1

1 year ago

1.7.0

1 year ago

1.7.0-alpha.0

1 year ago

1.6.4

1 year ago

1.6.3

1 year ago

1.6.2

1 year ago

1.6.1

1 year ago

1.6.0

1 year ago

1.5.0

1 year ago

1.2.0

2 years ago

1.0.0

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.0-alpha.0

2 years ago

1.1.0

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.5.0-alpha.0

1 year ago

1.0.0-alpha.9

2 years ago

1.0.0-alpha.8

2 years ago

1.0.0-alpha.7

2 years ago

1.0.0-alpha.6

2 years ago

1.0.0-alpha.10

2 years ago

1.0.0-alpha.5

2 years ago

1.0.0-alpha.4

2 years ago

1.0.0-alpha.3

2 years ago

1.0.0-alpha.2

2 years ago

1.0.0-alpha.1

2 years ago

1.0.0-alpha.0

2 years ago

0.15.0-alpha.0

2 years ago

0.15.0-alpha.1

2 years ago

0.14.1

2 years ago

0.13.0

2 years ago

0.13.1

2 years ago

0.14.0

2 years ago

0.12.2

2 years ago

0.11.0

2 years ago

0.11.1

2 years ago

0.12.0

2 years ago

0.12.1

2 years ago

0.9.8

3 years ago

0.9.9

3 years ago

0.10.0-alpha.3

2 years ago

0.10.0-alpha.2

2 years ago

0.10.0-alpha.1

2 years ago

0.10.0-alpha.0

2 years ago

0.10.1

2 years ago

0.10.0

2 years ago

0.9.7

3 years ago

0.9.4

3 years ago

0.9.3

3 years ago

0.9.6

3 years ago

0.9.5

3 years ago

0.9.2

3 years ago

0.8.0-alpha.1

3 years ago

0.9.0

3 years ago

0.8.0

3 years ago

0.9.1

3 years ago

0.8.0-alpha.0

3 years ago

0.7.2

3 years ago

0.7.1

3 years ago

0.7.0

3 years ago

0.6.1

3 years ago

0.6.0

3 years ago

0.5.0

4 years ago

0.5.1

4 years ago

0.4.4

4 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago

0.0.11

4 years ago

0.0.12

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago