@bpmn-io/form-js-editor 1.0.0-alpha.2 → 1.0.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/LICENSE +22 -22
  2. package/README.md +116 -116
  3. package/dist/assets/form-js-editor-base.css +734 -734
  4. package/dist/index.cjs +305 -292
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.es.js +305 -292
  7. package/dist/index.es.js.map +1 -1
  8. package/dist/types/features/SectionModuleBase.d.ts +6 -1
  9. package/dist/types/features/assistant/AssistantPrompter.d.ts +20 -0
  10. package/dist/types/features/assistant/AssistantPrompterLayout.d.ts +20 -0
  11. package/dist/types/features/assistant/AssistantPrompterLayoutV2.d.ts +20 -0
  12. package/dist/types/features/assistant/AssistantRenderer.d.ts +34 -0
  13. package/dist/types/features/assistant/components/Assistant.d.ts +10 -0
  14. package/dist/types/features/assistant/data/minischema.d.ts +1 -0
  15. package/dist/types/features/assistant/index.d.ts +7 -0
  16. package/dist/types/features/assistant/model/AssistantPrompterLayoutV2/AssistantPrompterLayoutV2.d.ts +20 -0
  17. package/dist/types/features/assistant/model/AssistantPrompterLayoutV2/Prompts.d.ts +4 -0
  18. package/dist/types/features/assistant/util/CleanupUtil.d.ts +1 -0
  19. package/dist/types/features/form-generation-ui/FormGenerationUIModule.d.ts +3 -0
  20. package/dist/types/features/form-generation-ui/components/FormGeneration.d.ts +2 -0
  21. package/dist/types/features/form-generation-ui/components/GPTModal.d.ts +2 -0
  22. package/dist/types/features/form-generation-ui/dist/index.d.cts +63 -0
  23. package/dist/types/features/form-generation-ui/dist/index.es.d.ts +60 -0
  24. package/dist/types/features/form-generation-ui/index.d.ts +2 -0
  25. package/dist/types/features/form-generation-ui/inject.d.ts +7 -0
  26. package/dist/types/features/palette/PaletteRenderer.d.ts +33 -0
  27. package/dist/types/features/properties-panel/PropertiesPanelRenderer.d.ts +37 -0
  28. package/dist/types/features/properties-panel/context/FormPropertiesPanelContext.d.ts +11 -0
  29. package/dist/types/features/properties-panel/context/index.d.ts +1 -0
  30. package/dist/types/features/properties-panel/entries/ExpressionValidationEntry.d.ts +44 -0
  31. package/dist/types/features/properties-panel/groups/ExpressionValidationsGroup.d.ts +53 -0
  32. package/dist/types/features/properties-panel/hooks/usePropertiesPanelService.d.ts +1 -0
  33. package/dist/types/features/properties-panel/icons/index.d.ts +1 -0
  34. package/dist/types/features/render-injection/TestInjection.d.ts +7 -0
  35. package/dist/types/features/render-injection/components/TestInjectionComponent.d.ts +2 -0
  36. package/dist/types/features/util/renderManagerBuilder.d.ts +45 -0
  37. package/dist/types/types.d.ts +28 -28
  38. package/package.json +3 -3
package/LICENSE CHANGED
@@ -1,23 +1,23 @@
1
- Copyright (c) 2021-present Camunda Services GmbH
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy of
4
- this software and associated documentation files (the "Software"), to deal in the
5
- Software without restriction, including without limitation the rights to use, copy,
6
- modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
7
- and to permit persons to whom the Software is furnished to do so, subject to the
8
- following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in all
11
- copies or substantial portions of the Software.
12
-
13
- The source code responsible for displaying the bpmn.io project watermark that
14
- links back to https://bpmn.io as part of rendered diagrams MUST NOT be
15
- removed or changed. When this software is being used in a website or application,
16
- the watermark must stay fully visible and not visually overlapped by other elements.
17
-
18
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
19
- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
20
- PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
1
+ Copyright (c) 2021-present Camunda Services GmbH
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ this software and associated documentation files (the "Software"), to deal in the
5
+ Software without restriction, including without limitation the rights to use, copy,
6
+ modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
7
+ and to permit persons to whom the Software is furnished to do so, subject to the
8
+ following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ The source code responsible for displaying the bpmn.io project watermark that
14
+ links back to https://bpmn.io as part of rendered diagrams MUST NOT be
15
+ removed or changed. When this software is being used in a website or application,
16
+ the watermark must stay fully visible and not visually overlapped by other elements.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
19
+ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
20
+ PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
23
23
  OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,116 +1,116 @@
1
- # @bpmn-io/form-js-editor
2
-
3
- An editor to create forms that can be displayed with the [form-js viewer](../form-js-viewer).
4
-
5
-
6
- ## Installation
7
-
8
- ```
9
- npm install @bpmn-io/form-js-editor
10
- ```
11
-
12
-
13
- ## Usage
14
-
15
- ```javascript
16
- import { FormEditor } from '@bpmn-io/form-js-editor';
17
-
18
- const schema = {
19
- components: [
20
- {
21
- key: 'creditor',
22
- label: 'Creditor',
23
- type: 'textfield',
24
- validate: {
25
- required: true
26
- }
27
- }
28
- ]
29
- };
30
-
31
- const formEditor = new FormEditor({
32
- container: document.querySelector('#form-editor')
33
- });
34
-
35
- await formEditor.importSchema(schema);
36
- ```
37
-
38
- Check out [a full example](https://github.com/bpmn-io/form-js-examples).
39
-
40
-
41
- ## Styling
42
-
43
- For proper styling include the necessary stylesheets, and font used:
44
-
45
- ```html
46
- <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,600;1,400&display=swap" rel="stylesheet">
47
-
48
- <link rel="stylesheet" href="https://unpkg.com/@bpmn-io/form-js@0.10.0/dist/assets/form-js.css">
49
- <link rel="stylesheet" href="https://unpkg.com/@bpmn-io/form-js@0.10.0/dist/assets/form-js-editor.css">
50
- ```
51
-
52
-
53
- ## API
54
-
55
- ### `FormEditor`
56
-
57
- Create a new form editor with options `{ container?: HTMLElement }`.
58
-
59
- ```javascript
60
- import { FormEditor } from '@bpmn-io/form-js-editor';
61
-
62
- const formEditor = new FormEditor({
63
- container: document.querySelector('#form-editor')
64
- });
65
- ```
66
-
67
-
68
- ### `FormEditor#importSchema(schema: Schema) => Promise<Result, Error>`
69
-
70
- Display and edit a form represented via a form schema.
71
-
72
- ```javascript
73
- try {
74
- await formEditor.importSchema(schema);
75
- } catch (err) {
76
- console.log('importing form failed', err);
77
- }
78
- ```
79
-
80
-
81
- ### `FormEditor#saveSchema() => Schema`
82
-
83
- Export the form schema.
84
-
85
- ```javascript
86
- const schema = formEditor.saveSchema(schema);
87
-
88
- console.log('exported schema', schema);
89
- ```
90
-
91
-
92
- ### `FormEditor#attachTo(parentNode: HTMLElement) => void`
93
-
94
-
95
- Attach the form editor to a parent node.
96
-
97
-
98
- ### `FormEditor#detach() => void`
99
-
100
-
101
- Detach the form editor from its parent node.
102
-
103
-
104
- ### `FormEditor#on(event, fn) => void`
105
-
106
- Subscribe to an [event](#events).
107
-
108
-
109
- ### `FormEditor#destroy() => void`
110
-
111
- Remove form from editor the document.
112
-
113
-
114
- ## License
115
-
116
- Use under the terms of the [bpmn.io license](http://bpmn.io/license).
1
+ # @bpmn-io/form-js-editor
2
+
3
+ An editor to create forms that can be displayed with the [form-js viewer](../form-js-viewer).
4
+
5
+
6
+ ## Installation
7
+
8
+ ```
9
+ npm install @bpmn-io/form-js-editor
10
+ ```
11
+
12
+
13
+ ## Usage
14
+
15
+ ```javascript
16
+ import { FormEditor } from '@bpmn-io/form-js-editor';
17
+
18
+ const schema = {
19
+ components: [
20
+ {
21
+ key: 'creditor',
22
+ label: 'Creditor',
23
+ type: 'textfield',
24
+ validate: {
25
+ required: true
26
+ }
27
+ }
28
+ ]
29
+ };
30
+
31
+ const formEditor = new FormEditor({
32
+ container: document.querySelector('#form-editor')
33
+ });
34
+
35
+ await formEditor.importSchema(schema);
36
+ ```
37
+
38
+ Check out [a full example](https://github.com/bpmn-io/form-js-examples).
39
+
40
+
41
+ ## Styling
42
+
43
+ For proper styling include the necessary stylesheets, and font used:
44
+
45
+ ```html
46
+ <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,600;1,400&display=swap" rel="stylesheet">
47
+
48
+ <link rel="stylesheet" href="https://unpkg.com/@bpmn-io/form-js@0.10.0/dist/assets/form-js.css">
49
+ <link rel="stylesheet" href="https://unpkg.com/@bpmn-io/form-js@0.10.0/dist/assets/form-js-editor.css">
50
+ ```
51
+
52
+
53
+ ## API
54
+
55
+ ### `FormEditor`
56
+
57
+ Create a new form editor with options `{ container?: HTMLElement }`.
58
+
59
+ ```javascript
60
+ import { FormEditor } from '@bpmn-io/form-js-editor';
61
+
62
+ const formEditor = new FormEditor({
63
+ container: document.querySelector('#form-editor')
64
+ });
65
+ ```
66
+
67
+
68
+ ### `FormEditor#importSchema(schema: Schema) => Promise<Result, Error>`
69
+
70
+ Display and edit a form represented via a form schema.
71
+
72
+ ```javascript
73
+ try {
74
+ await formEditor.importSchema(schema);
75
+ } catch (err) {
76
+ console.log('importing form failed', err);
77
+ }
78
+ ```
79
+
80
+
81
+ ### `FormEditor#saveSchema() => Schema`
82
+
83
+ Export the form schema.
84
+
85
+ ```javascript
86
+ const schema = formEditor.saveSchema(schema);
87
+
88
+ console.log('exported schema', schema);
89
+ ```
90
+
91
+
92
+ ### `FormEditor#attachTo(parentNode: HTMLElement) => void`
93
+
94
+
95
+ Attach the form editor to a parent node.
96
+
97
+
98
+ ### `FormEditor#detach() => void`
99
+
100
+
101
+ Detach the form editor from its parent node.
102
+
103
+
104
+ ### `FormEditor#on(event, fn) => void`
105
+
106
+ Subscribe to an [event](#events).
107
+
108
+
109
+ ### `FormEditor#destroy() => void`
110
+
111
+ Remove form from editor the document.
112
+
113
+
114
+ ## License
115
+
116
+ Use under the terms of the [bpmn.io license](http://bpmn.io/license).