@bpmn-io/form-js-editor 0.7.0 → 0.8.0-alpha.0
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.
- package/README.md +1 -0
- package/dist/assets/form-js-editor.css +8 -202
- package/dist/assets/properties-panel.css +930 -0
- package/dist/index.cjs +2795 -854
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +2799 -859
- package/dist/index.es.js.map +1 -1
- package/dist/types/FormEditor.d.ts +16 -6
- package/dist/types/render/components/palette/icons/index.d.ts +2 -0
- package/dist/types/render/components/properties-panel/PropertiesPanel.d.ts +1 -1
- package/dist/types/render/components/properties-panel/PropertiesPanelHeaderProvider.d.ts +5 -0
- package/dist/types/render/components/properties-panel/PropertiesPanelPlaceholderProvider.d.ts +8 -0
- package/dist/types/render/components/properties-panel/Util.d.ts +1 -0
- package/dist/types/render/components/properties-panel/entries/ActionEntry.d.ts +9 -1
- package/dist/types/render/components/properties-panel/entries/ColumnsEntry.d.ts +9 -1
- package/dist/types/render/components/properties-panel/entries/CustomValueEntry.d.ts +11 -1
- package/dist/types/render/components/properties-panel/entries/DefaultValueEntry.d.ts +1 -1
- package/dist/types/render/components/properties-panel/entries/DescriptionEntry.d.ts +9 -1
- package/dist/types/render/components/properties-panel/entries/DisabledEntry.d.ts +9 -1
- package/dist/types/render/components/properties-panel/entries/IdEntry.d.ts +9 -1
- package/dist/types/render/components/properties-panel/entries/InputKeyValuesSourceEntry.d.ts +11 -0
- package/dist/types/render/components/properties-panel/entries/KeyEntry.d.ts +9 -1
- package/dist/types/render/components/properties-panel/entries/LabelEntry.d.ts +9 -1
- package/dist/types/render/components/properties-panel/entries/StaticValuesSourceEntry.d.ts +4 -0
- package/dist/types/render/components/properties-panel/entries/TextEntry.d.ts +9 -1
- package/dist/types/render/components/properties-panel/entries/ValueEntry.d.ts +11 -1
- package/dist/types/render/components/properties-panel/entries/ValuesSourceSelectEntry.d.ts +9 -0
- package/dist/types/render/components/properties-panel/entries/ValuesSourceUtil.d.ts +15 -0
- package/dist/types/render/components/properties-panel/entries/index.d.ts +3 -0
- package/dist/types/render/components/properties-panel/groups/CustomValuesGroup.d.ts +22 -1
- package/dist/types/render/components/properties-panel/groups/GeneralGroup.d.ts +5 -1
- package/dist/types/render/components/properties-panel/groups/ValidationGroup.d.ts +14 -1
- package/dist/types/render/components/properties-panel/groups/ValuesGroups.d.ts +1 -0
- package/dist/types/render/components/properties-panel/groups/index.d.ts +1 -1
- package/package.json +5 -4
- package/dist/types/render/components/properties-panel/components/CheckboxInput.d.ts +0 -1
- package/dist/types/render/components/properties-panel/components/CheckboxInputEntry.d.ts +0 -1
- package/dist/types/render/components/properties-panel/components/CollapsibleEntry.d.ts +0 -1
- package/dist/types/render/components/properties-panel/components/Group.d.ts +0 -1
- package/dist/types/render/components/properties-panel/components/NumberInput.d.ts +0 -1
- package/dist/types/render/components/properties-panel/components/NumberInputEntry.d.ts +0 -1
- package/dist/types/render/components/properties-panel/components/Select.d.ts +0 -1
- package/dist/types/render/components/properties-panel/components/SelectEntry.d.ts +0 -1
- package/dist/types/render/components/properties-panel/components/TextInput.d.ts +0 -1
- package/dist/types/render/components/properties-panel/components/TextInputEntry.d.ts +0 -1
- package/dist/types/render/components/properties-panel/components/Textarea.d.ts +0 -1
- package/dist/types/render/components/properties-panel/components/TextareaEntry.d.ts +0 -1
- package/dist/types/render/components/properties-panel/components/index.d.ts +0 -12
- package/dist/types/render/components/properties-panel/groups/ValuesGroup.d.ts +0 -1
|
@@ -11,6 +11,10 @@ export function exportSchema(schema: any, exporter: any, schemaVersion: any): an
|
|
|
11
11
|
* properties: FormEditorProperties,
|
|
12
12
|
* schema: Schema
|
|
13
13
|
* } } State
|
|
14
|
+
*
|
|
15
|
+
* @typedef { (type:string, priority:number, handler:Function) => void } OnEventWithPriority
|
|
16
|
+
* @typedef { (type:string, handler:Function) => void } OnEventWithOutPriority
|
|
17
|
+
* @typedef { OnEventWithPriority & OnEventWithOutPriority } OnEventType
|
|
14
18
|
*/
|
|
15
19
|
/**
|
|
16
20
|
* The form editor.
|
|
@@ -21,6 +25,11 @@ export default class FormEditor {
|
|
|
21
25
|
* @param {FormEditorOptions} options
|
|
22
26
|
*/
|
|
23
27
|
constructor(options?: FormEditorOptions);
|
|
28
|
+
/**
|
|
29
|
+
* @public
|
|
30
|
+
* @type {OnEventType}
|
|
31
|
+
*/
|
|
32
|
+
public on: OnEventType;
|
|
24
33
|
/**
|
|
25
34
|
* @public
|
|
26
35
|
* @type {String}
|
|
@@ -77,12 +86,6 @@ export default class FormEditor {
|
|
|
77
86
|
* @param {any} value
|
|
78
87
|
*/
|
|
79
88
|
setProperty(property: any, value: any): void;
|
|
80
|
-
/**
|
|
81
|
-
* @param {string} type
|
|
82
|
-
* @param {number} priority
|
|
83
|
-
* @param {Function} handler
|
|
84
|
-
*/
|
|
85
|
-
on(type: string, priority: number, handler: Function): void;
|
|
86
89
|
/**
|
|
87
90
|
* @param {string} type
|
|
88
91
|
* @param {Function} handler
|
|
@@ -128,6 +131,10 @@ export default class FormEditor {
|
|
|
128
131
|
selection: (string | typeof import("./features/selection/Selection").default)[];
|
|
129
132
|
selectionBehavior: (string | typeof import("./features/selection/SelectionBehavior").default)[];
|
|
130
133
|
})[];
|
|
134
|
+
/**
|
|
135
|
+
* @internal
|
|
136
|
+
*/
|
|
137
|
+
_onEvent(type: any, priority: any, handler: any): void;
|
|
131
138
|
}
|
|
132
139
|
export type Injector = any;
|
|
133
140
|
export type Module = import('./types').Module;
|
|
@@ -138,3 +145,6 @@ export type State = {
|
|
|
138
145
|
properties: FormEditorProperties;
|
|
139
146
|
schema: Schema;
|
|
140
147
|
};
|
|
148
|
+
export type OnEventWithPriority = OnEventWithPriority;
|
|
149
|
+
export type OnEventWithOutPriority = OnEventWithOutPriority;
|
|
150
|
+
export type OnEventType = OnEventWithPriority & OnEventWithOutPriority;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export namespace iconsByType {
|
|
2
2
|
export { ButtonIcon as button };
|
|
3
3
|
export { CheckboxIcon as checkbox };
|
|
4
|
+
export { ChecklistIcon as checklist };
|
|
4
5
|
export { ColumnsIcon as columns };
|
|
5
6
|
export { NumberIcon as number };
|
|
6
7
|
export { RadioIcon as radio };
|
|
7
8
|
export { SelectIcon as select };
|
|
9
|
+
export { TaglistIcon as taglist };
|
|
8
10
|
export { TextIcon as text };
|
|
9
11
|
export { TextfieldIcon as textfield };
|
|
10
12
|
export { FormIcon as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function
|
|
1
|
+
export default function FormPropertiesPanel(props: any): any;
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
export default function ColumnsEntry(props: any):
|
|
1
|
+
export default function ColumnsEntry(props: any): {
|
|
2
|
+
id: string;
|
|
3
|
+
component: typeof Columns;
|
|
4
|
+
editField: any;
|
|
5
|
+
field: any;
|
|
6
|
+
isEdited: any;
|
|
7
|
+
}[];
|
|
8
|
+
declare function Columns(props: any): any;
|
|
9
|
+
export {};
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
export default function CustomValueEntry(props: any):
|
|
1
|
+
export default function CustomValueEntry(props: any): {
|
|
2
|
+
component: typeof Key;
|
|
3
|
+
editField: any;
|
|
4
|
+
field: any;
|
|
5
|
+
id: string;
|
|
6
|
+
idPrefix: any;
|
|
7
|
+
index: any;
|
|
8
|
+
validateFactory: any;
|
|
9
|
+
}[];
|
|
10
|
+
declare function Key(props: any): any;
|
|
11
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function
|
|
1
|
+
export default function DefaultOptionEntry(props: any): any[];
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
export default function DescriptionEntry(props: any):
|
|
1
|
+
export default function DescriptionEntry(props: any): {
|
|
2
|
+
id: string;
|
|
3
|
+
component: typeof Description;
|
|
4
|
+
editField: any;
|
|
5
|
+
field: any;
|
|
6
|
+
isEdited: any;
|
|
7
|
+
}[];
|
|
8
|
+
declare function Description(props: any): any;
|
|
9
|
+
export {};
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
export default function DisabledEntry(props: any):
|
|
1
|
+
export default function DisabledEntry(props: any): {
|
|
2
|
+
id: string;
|
|
3
|
+
component: typeof Disabled;
|
|
4
|
+
editField: any;
|
|
5
|
+
field: any;
|
|
6
|
+
isEdited: any;
|
|
7
|
+
}[];
|
|
8
|
+
declare function Disabled(props: any): any;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default function InputKeyValuesSourceEntry(props: any): {
|
|
2
|
+
id: string;
|
|
3
|
+
component: typeof InputValuesKey;
|
|
4
|
+
label: string;
|
|
5
|
+
description: string;
|
|
6
|
+
isEdited: any;
|
|
7
|
+
editField: any;
|
|
8
|
+
field: any;
|
|
9
|
+
}[];
|
|
10
|
+
declare function InputValuesKey(props: any): any;
|
|
11
|
+
export {};
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
export default function ValueEntry(props: any):
|
|
1
|
+
export default function ValueEntry(props: any): {
|
|
2
|
+
component: typeof Label;
|
|
3
|
+
editField: any;
|
|
4
|
+
field: any;
|
|
5
|
+
id: string;
|
|
6
|
+
idPrefix: any;
|
|
7
|
+
index: any;
|
|
8
|
+
validateFactory: any;
|
|
9
|
+
}[];
|
|
10
|
+
declare function Label(props: any): any;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function getValuesSource(field: any): string;
|
|
2
|
+
export namespace VALUES_SOURCES {
|
|
3
|
+
const STATIC: string;
|
|
4
|
+
const INPUT: string;
|
|
5
|
+
}
|
|
6
|
+
export const VALUES_SOURCE_DEFAULT: string;
|
|
7
|
+
export const VALUES_SOURCES_LABELS: {
|
|
8
|
+
[x: string]: string;
|
|
9
|
+
};
|
|
10
|
+
export const VALUES_SOURCES_PATHS: {
|
|
11
|
+
[x: string]: string[];
|
|
12
|
+
};
|
|
13
|
+
export const VALUES_SOURCES_DEFAULTS: {
|
|
14
|
+
[x: string]: string | any[];
|
|
15
|
+
};
|
|
@@ -9,3 +9,6 @@ export { default as LabelEntry } from "./LabelEntry";
|
|
|
9
9
|
export { default as TextEntry } from "./TextEntry";
|
|
10
10
|
export { default as ValueEntry } from "./ValueEntry";
|
|
11
11
|
export { default as CustomValueEntry } from "./CustomValueEntry";
|
|
12
|
+
export { default as ValuesSourceSelectEntry } from "./ValuesSourceSelectEntry";
|
|
13
|
+
export { default as InputKeyValuesSourceEntry } from "./InputKeyValuesSourceEntry";
|
|
14
|
+
export { default as StaticValuesSourceEntry } from "./StaticValuesSourceEntry";
|
|
@@ -1,4 +1,25 @@
|
|
|
1
|
-
export default function CustomValuesGroup(field: any, editField: any):
|
|
1
|
+
export default function CustomValuesGroup(field: any, editField: any): {
|
|
2
|
+
add: (event: any) => void;
|
|
3
|
+
component: any;
|
|
4
|
+
id: string;
|
|
5
|
+
items: {
|
|
6
|
+
autoFocusEntry: string;
|
|
7
|
+
entries: {
|
|
8
|
+
component: (props: any) => any;
|
|
9
|
+
editField: any;
|
|
10
|
+
field: any;
|
|
11
|
+
id: string;
|
|
12
|
+
idPrefix: any;
|
|
13
|
+
index: any;
|
|
14
|
+
validateFactory: any;
|
|
15
|
+
}[];
|
|
16
|
+
id: string;
|
|
17
|
+
label: string;
|
|
18
|
+
remove: (event: any) => any;
|
|
19
|
+
}[];
|
|
20
|
+
label: string;
|
|
21
|
+
shouldSort: boolean;
|
|
22
|
+
};
|
|
2
23
|
/**
|
|
3
24
|
* Returns copy of object without key.
|
|
4
25
|
*
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
export default function ValidationGroup(field: any, editField: any):
|
|
1
|
+
export default function ValidationGroup(field: any, editField: any): {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
entries: {
|
|
5
|
+
id: string;
|
|
6
|
+
component: typeof Required;
|
|
7
|
+
getValue: (key: any) => () => any;
|
|
8
|
+
field: any;
|
|
9
|
+
isEdited: any;
|
|
10
|
+
onChange: (key: any) => (value: any) => void;
|
|
11
|
+
}[];
|
|
12
|
+
};
|
|
13
|
+
declare function Required(props: any): any;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ValuesGroups(field: any, editField: any): any[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as GeneralGroup } from "./GeneralGroup";
|
|
2
2
|
export { default as ValidationGroup } from "./ValidationGroup";
|
|
3
|
-
export { default as
|
|
3
|
+
export { default as ValuesGroups } from "./ValuesGroups";
|
|
4
4
|
export { default as CustomValuesGroup } from "./CustomValuesGroup";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bpmn-io/form-js-editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0-alpha.0",
|
|
4
4
|
"description": "Edit forms - powered by bpmn.io",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"./dist/assets/form-js-editor.css": "./dist/assets/form-js-editor.css",
|
|
11
11
|
"./dist/assets/dragula.css": "./dist/assets/dragula.css",
|
|
12
|
+
"./dist/assets/properties-panel.css": "./dist/assets/properties-panel.css",
|
|
12
13
|
"./package.json": "./package.json"
|
|
13
14
|
},
|
|
14
15
|
"publishConfig": {
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
"scripts": {
|
|
21
22
|
"all": "run-s lint test build",
|
|
22
23
|
"build": "run-p bundle generate-types",
|
|
23
|
-
"bundle": "rollup -c",
|
|
24
|
+
"bundle": "rollup -c --failAfterWarnings",
|
|
24
25
|
"bundle:watch": "rollup -c -w",
|
|
25
26
|
"dev": "npm test -- --auto-watch --no-single-run",
|
|
26
27
|
"example:dev": "cd example && npm start",
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
"url": "https://github.com/bpmn-io"
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|
|
44
|
-
"@bpmn-io/form-js-viewer": "^0.
|
|
45
|
+
"@bpmn-io/form-js-viewer": "^0.8.0-alpha.0",
|
|
45
46
|
"array-move": "^3.0.1",
|
|
46
47
|
"dragula": "^3.7.3",
|
|
47
48
|
"ids": "^1.0.0",
|
|
@@ -55,5 +56,5 @@
|
|
|
55
56
|
"files": [
|
|
56
57
|
"dist"
|
|
57
58
|
],
|
|
58
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "ffc5f0cedcf0b9a923b34ff56e7f63a34c362cf9"
|
|
59
60
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function CheckboxInput(props: any): any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function CheckboxInputEntry(props: any): any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function CollapsibleEntry(props: any): any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function Group(props: any): any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function NumberInput(props: any): any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function NumberInputEntry(props: any): any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function Select(props: any): any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function SelectEntry(props: any): any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function TextInput(props: any): any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function TextInputEntry(props: any): any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function Textarea(props: any): any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function TextareaEntry(props: any): any;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export { default as CheckboxInput } from "./CheckboxInput";
|
|
2
|
-
export { default as NumberInput } from "./NumberInput";
|
|
3
|
-
export { default as Select } from "./Select";
|
|
4
|
-
export { default as Textarea } from "./Textarea";
|
|
5
|
-
export { default as TextInput } from "./TextInput";
|
|
6
|
-
export { default as CheckboxInputEntry } from "./CheckboxInputEntry";
|
|
7
|
-
export { default as NumberInputEntry } from "./NumberInputEntry";
|
|
8
|
-
export { default as SelectEntry } from "./SelectEntry";
|
|
9
|
-
export { default as TextareaEntry } from "./TextareaEntry";
|
|
10
|
-
export { default as TextInputEntry } from "./TextInputEntry";
|
|
11
|
-
export { default as CollapsibleEntry } from "./CollapsibleEntry";
|
|
12
|
-
export { default as Group } from "./Group";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function ValuesGroup(field: any, editField: any): any;
|