@bpmn-io/form-js-editor 0.14.1 → 0.15.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/dist/assets/form-js-editor-base.css +251 -36
- package/dist/assets/form-js-editor.css +229 -35
- package/dist/index.cjs +802 -283
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +673 -154
- package/dist/index.es.js.map +1 -1
- package/dist/types/FormEditor.d.ts +9 -4
- package/dist/types/core/EventBus.d.ts +1 -1
- package/dist/types/core/FormLayoutValidator.d.ts +5 -1
- package/dist/types/core/index.d.ts +2 -1
- package/dist/types/features/dragging/Dragging.d.ts +3 -3
- package/dist/types/features/editor-actions/FormEditorActions.d.ts +2 -1
- package/dist/types/features/editor-actions/index.d.ts +1 -1
- package/dist/types/features/keyboard/index.d.ts +1 -1
- package/dist/types/features/modeling/FormLayoutUpdater.d.ts +2 -1
- package/dist/types/features/modeling/behavior/IdBehavior.d.ts +2 -1
- package/dist/types/features/modeling/behavior/KeyBehavior.d.ts +2 -1
- package/dist/types/features/modeling/behavior/ValidateBehavior.d.ts +2 -1
- package/dist/types/features/modeling/index.d.ts +6 -1
- package/dist/types/features/palette/PaletteRenderer.d.ts +1 -1
- package/dist/types/features/palette/components/Palette.d.ts +1 -1
- package/dist/types/features/properties-panel/PropertiesPanel.d.ts +1 -1
- package/dist/types/features/properties-panel/PropertiesPanelHeaderProvider.d.ts +1 -1
- package/dist/types/features/properties-panel/PropertiesPanelRenderer.d.ts +1 -1
- package/dist/types/features/properties-panel/entries/InputKeyValuesSourceEntry.d.ts +1 -1
- package/dist/types/render/Renderer.d.ts +1 -1
- package/dist/types/render/components/FieldDragPreview.d.ts +1 -1
- package/dist/types/render/components/FieldResizer.d.ts +1 -0
- package/dist/types/render/components/FormEditor.d.ts +1 -1
- package/dist/types/render/components/Util.d.ts +27 -1
- package/dist/types/render/components/editor-form-fields/EditorText.d.ts +2 -4
- package/dist/types/render/components/icons/index.d.ts +1 -1
- package/package.json +3 -3
- package/dist/types/features/properties-panel/icons/index.d.ts +0 -1
|
@@ -51,7 +51,7 @@ export default class FormEditor {
|
|
|
51
51
|
*/
|
|
52
52
|
private _state;
|
|
53
53
|
get: <T>(name: string, strict?: boolean) => T;
|
|
54
|
-
invoke: <T_1>(func: (...args:
|
|
54
|
+
invoke: <T_1>(func: (...args: any[]) => T_1, context?: unknown, locals?: import("didi").LocalsMap) => T_1;
|
|
55
55
|
clear(): void;
|
|
56
56
|
destroy(): void;
|
|
57
57
|
/**
|
|
@@ -116,18 +116,23 @@ export default class FormEditor {
|
|
|
116
116
|
* @internal
|
|
117
117
|
*/
|
|
118
118
|
_getModules(): ({
|
|
119
|
-
__depends__:
|
|
119
|
+
__depends__: (import("didi").ModuleDeclaration | {
|
|
120
|
+
__init__: string[];
|
|
121
|
+
idBehavior: (string | typeof import("./features/modeling/behavior/IdBehavior").default)[];
|
|
122
|
+
keyBehavior: (string | typeof import("./features/modeling/behavior/KeyBehavior").default)[];
|
|
123
|
+
validateBehavior: (string | typeof import("./features/modeling/behavior/ValidateBehavior").default)[];
|
|
124
|
+
})[];
|
|
120
125
|
__init__: string[];
|
|
121
126
|
formLayoutUpdater: (string | typeof import("./features/modeling/FormLayoutUpdater").default)[];
|
|
122
127
|
modeling: (string | typeof import("./features/modeling/Modeling").default)[];
|
|
123
128
|
} | {
|
|
124
|
-
__depends__:
|
|
129
|
+
__depends__: import("didi").ModuleDeclaration[];
|
|
125
130
|
editorActions: (string | typeof import("./features/editor-actions/FormEditorActions").default)[];
|
|
126
131
|
} | {
|
|
127
132
|
__init__: string[];
|
|
128
133
|
dragging: (string | typeof import("./features/dragging/Dragging").default)[];
|
|
129
134
|
} | {
|
|
130
|
-
__depends__:
|
|
135
|
+
__depends__: import("didi").ModuleDeclaration[];
|
|
131
136
|
__init__: string[];
|
|
132
137
|
keyboardBindings: (string | typeof import("./features/keyboard/FormEditorKeyboardBindings").default)[];
|
|
133
138
|
} | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export { default } from "diagram-js/lib/core/EventBus";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export const MAX_COLUMNS_PER_ROW: 16;
|
|
2
|
+
export const MAX_COLUMNS: 16;
|
|
3
|
+
export const MIN_COLUMNS: 2;
|
|
4
|
+
export const MAX_FIELDS_PER_ROW: 4;
|
|
1
5
|
declare class FormLayoutValidator {
|
|
2
6
|
/**
|
|
3
7
|
* @constructor
|
|
@@ -8,7 +12,7 @@ declare class FormLayoutValidator {
|
|
|
8
12
|
constructor(formLayouter: import('./FormLayouter').default, formFieldRegistry: import('./FormFieldRegistry').default);
|
|
9
13
|
_formLayouter: import("@bpmn-io/form-js-viewer/dist/types/core/FormLayouter").default;
|
|
10
14
|
_formFieldRegistry: import("./FormFieldRegistry").default;
|
|
11
|
-
validateField(field: {}, columns: any, row: any):
|
|
15
|
+
validateField(field: {}, columns: any, row: any): string;
|
|
12
16
|
}
|
|
13
17
|
declare namespace FormLayoutValidator {
|
|
14
18
|
const $inject: string[];
|
|
@@ -7,7 +7,7 @@ declare namespace _default {
|
|
|
7
7
|
renderer: (string | typeof import("../render/Renderer").default)[];
|
|
8
8
|
})[];
|
|
9
9
|
const debounce: (string | typeof DebounceFactory)[];
|
|
10
|
-
const eventBus:
|
|
10
|
+
const eventBus: (string | typeof EventBus)[];
|
|
11
11
|
const formFieldRegistry: (string | typeof FormFieldRegistry)[];
|
|
12
12
|
const formLayouter: (string | typeof FormLayouter)[];
|
|
13
13
|
const formLayoutValidator: (string | typeof FormLayoutValidator)[];
|
|
@@ -15,6 +15,7 @@ declare namespace _default {
|
|
|
15
15
|
}
|
|
16
16
|
export default _default;
|
|
17
17
|
import DebounceFactory from './Debounce';
|
|
18
|
+
import EventBus from './EventBus';
|
|
18
19
|
import FormFieldRegistry from './FormFieldRegistry';
|
|
19
20
|
import FormLayouter from './FormLayouter';
|
|
20
21
|
import FormLayoutValidator from './FormLayoutValidator';
|
|
@@ -20,11 +20,11 @@ declare class Dragging {
|
|
|
20
20
|
* @param { import('../../core/EventBus').default } eventBus
|
|
21
21
|
* @param { import('../modeling/Modeling').default } modeling
|
|
22
22
|
*/
|
|
23
|
-
constructor(formFieldRegistry: import('../../core/FormFieldRegistry').default, formLayouter: import('../../core/FormLayouter').default, formLayoutValidator: import('../../core/FormLayoutValidator').default, eventBus:
|
|
23
|
+
constructor(formFieldRegistry: import('../../core/FormFieldRegistry').default, formLayouter: import('../../core/FormLayouter').default, formLayoutValidator: import('../../core/FormLayoutValidator').default, eventBus: import('../../core/EventBus').default, modeling: import('../modeling/Modeling').default);
|
|
24
24
|
_formFieldRegistry: import("../../core/FormFieldRegistry").default;
|
|
25
25
|
_formLayouter: import("@bpmn-io/form-js-viewer/dist/types/core/FormLayouter").default;
|
|
26
26
|
_formLayoutValidator: import("../../core/FormLayoutValidator").default;
|
|
27
|
-
_eventBus:
|
|
27
|
+
_eventBus: import("diagram-js/lib/core/EventBus").default;
|
|
28
28
|
_modeling: import("../modeling/Modeling").default;
|
|
29
29
|
/**
|
|
30
30
|
* Calculcates position in form schema given the dropped place.
|
|
@@ -35,7 +35,7 @@ declare class Dragging {
|
|
|
35
35
|
* @returns { number }
|
|
36
36
|
*/
|
|
37
37
|
getTargetIndex(targetRow: FormRow, targetFormField: any, sibling: HTMLElement): number;
|
|
38
|
-
validateDrop(element: any, target: any):
|
|
38
|
+
validateDrop(element: any, target: any): string;
|
|
39
39
|
moveField(element: any, source: any, targetRow: any, targetFormField: any, targetIndex: any): void;
|
|
40
40
|
createNewField(element: any, targetRow: any, targetFormField: any, targetIndex: any): void;
|
|
41
41
|
handleRowDrop(el: any, target: any, source: any, sibling: any): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare class FormEditorActions {
|
|
1
|
+
declare class FormEditorActions extends EditorActions {
|
|
2
2
|
constructor(eventBus: any, injector: any);
|
|
3
3
|
_registerDefaultActions(injector: any): void;
|
|
4
4
|
}
|
|
@@ -6,3 +6,4 @@ declare namespace FormEditorActions {
|
|
|
6
6
|
const $inject: string[];
|
|
7
7
|
}
|
|
8
8
|
export default FormEditorActions;
|
|
9
|
+
import EditorActions from 'diagram-js/lib/features/editor-actions/EditorActions';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare class FormLayoutUpdater {
|
|
1
|
+
declare class FormLayoutUpdater extends CommandInterceptor {
|
|
2
2
|
constructor(eventBus: any, formLayouter: any, modeling: any, formEditor: any);
|
|
3
3
|
_eventBus: any;
|
|
4
4
|
_formLayouter: any;
|
|
@@ -11,3 +11,4 @@ declare namespace FormLayoutUpdater {
|
|
|
11
11
|
const $inject: string[];
|
|
12
12
|
}
|
|
13
13
|
export default FormLayoutUpdater;
|
|
14
|
+
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
declare class IdBehavior {
|
|
1
|
+
declare class IdBehavior extends CommandInterceptor {
|
|
2
2
|
constructor(eventBus: any, modeling: any);
|
|
3
3
|
}
|
|
4
4
|
declare namespace IdBehavior {
|
|
5
5
|
const $inject: string[];
|
|
6
6
|
}
|
|
7
7
|
export default IdBehavior;
|
|
8
|
+
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
declare class KeyBehavior {
|
|
1
|
+
declare class KeyBehavior extends CommandInterceptor {
|
|
2
2
|
constructor(eventBus: any, modeling: any);
|
|
3
3
|
}
|
|
4
4
|
declare namespace KeyBehavior {
|
|
5
5
|
const $inject: string[];
|
|
6
6
|
}
|
|
7
7
|
export default KeyBehavior;
|
|
8
|
+
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
declare class ValidateBehavior {
|
|
1
|
+
declare class ValidateBehavior extends CommandInterceptor {
|
|
2
2
|
constructor(eventBus: any);
|
|
3
3
|
}
|
|
4
4
|
declare namespace ValidateBehavior {
|
|
5
5
|
const $inject: string[];
|
|
6
6
|
}
|
|
7
7
|
export default ValidateBehavior;
|
|
8
|
+
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
declare namespace _default {
|
|
2
|
-
const __depends__:
|
|
2
|
+
const __depends__: (import("didi").ModuleDeclaration | {
|
|
3
|
+
__init__: string[];
|
|
4
|
+
idBehavior: (string | typeof import("./behavior/IdBehavior").default)[];
|
|
5
|
+
keyBehavior: (string | typeof import("./behavior/KeyBehavior").default)[];
|
|
6
|
+
validateBehavior: (string | typeof import("./behavior/ValidateBehavior").default)[];
|
|
7
|
+
})[];
|
|
3
8
|
const __init__: string[];
|
|
4
9
|
const formLayoutUpdater: (string | typeof FormLayoutUpdater)[];
|
|
5
10
|
const modeling: (string | typeof Modeling)[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function FormPropertiesPanel(props: any):
|
|
1
|
+
export default function FormPropertiesPanel(props: any): JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function FieldDragPreview(props: any):
|
|
1
|
+
export function FieldDragPreview(props: any): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function FieldResizer(props: any): JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function FormEditor(props: any):
|
|
1
|
+
export default function FormEditor(props: any): JSX.Element;
|
|
@@ -1,3 +1,29 @@
|
|
|
1
1
|
export function editorFormFieldClasses(type: any, { disabled }?: {
|
|
2
2
|
disabled?: boolean;
|
|
3
|
-
}):
|
|
3
|
+
}): any;
|
|
4
|
+
/**
|
|
5
|
+
* Add a dragger that calls back the passed function with
|
|
6
|
+
* { event, delta } on drag.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
*
|
|
10
|
+
* function dragMove(event, delta) {
|
|
11
|
+
* // we are dragging (!!)
|
|
12
|
+
* }
|
|
13
|
+
*
|
|
14
|
+
* domElement.addEventListener('dragstart', dragger(dragMove));
|
|
15
|
+
*
|
|
16
|
+
* @param {Function} fn
|
|
17
|
+
* @param {Element} dragPreview
|
|
18
|
+
*
|
|
19
|
+
* @return {Function} drag start callback function
|
|
20
|
+
*/
|
|
21
|
+
export function createDragger(fn: Function, dragPreview: Element): Function;
|
|
22
|
+
/**
|
|
23
|
+
* Throttle function call according UI update cycle.
|
|
24
|
+
*
|
|
25
|
+
* @param {Function} fn
|
|
26
|
+
*
|
|
27
|
+
* @return {Function} throttled fn
|
|
28
|
+
*/
|
|
29
|
+
export function throttle(fn: Function): Function;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
declare function EditorText(props: any):
|
|
1
|
+
declare function EditorText(props: any): JSX.Element;
|
|
2
2
|
declare namespace EditorText {
|
|
3
|
-
const
|
|
4
|
-
const type: "text";
|
|
5
|
-
const keyed: boolean;
|
|
3
|
+
const config: typeof Text.config;
|
|
6
4
|
}
|
|
7
5
|
export default EditorText;
|
|
8
6
|
import { Text } from '@bpmn-io/form-js-viewer';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { iconsByType } from "@bpmn-io/form-js-viewer";
|
|
2
|
-
export { CloseIcon, DraggableIcon, SearchIcon };
|
|
2
|
+
export { CloseIcon, DeleteIcon, DraggableIcon, SearchIcon };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bpmn-io/form-js-editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0-alpha.0",
|
|
4
4
|
"description": "Edit forms - powered by bpmn.io",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"url": "https://github.com/bpmn-io"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@bpmn-io/form-js-viewer": "^0.
|
|
47
|
+
"@bpmn-io/form-js-viewer": "^0.15.0-alpha.0",
|
|
48
48
|
"@bpmn-io/properties-panel": "^1.7.0",
|
|
49
49
|
"array-move": "^3.0.1",
|
|
50
50
|
"big.js": "^6.2.1",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"files": [
|
|
61
61
|
"dist"
|
|
62
62
|
],
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "205275d1b314a512e662758999cd6667894c3695"
|
|
64
64
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|