@bpmn-io/form-js-editor 1.3.3 → 1.4.1
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/LICENSE +22 -22
- package/README.md +152 -116
- package/dist/assets/form-js-editor-base.css +832 -797
- package/dist/assets/form-js-editor.css +74 -19
- package/dist/assets/properties-panel.css +23 -3
- package/dist/index.cjs +1097 -838
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +1130 -876
- package/dist/index.es.js.map +1 -1
- package/dist/types/FormEditor.d.ts +2 -0
- package/dist/types/features/modeling/behavior/ValuesSourceBehavior.d.ts +8 -0
- package/dist/types/features/modeling/behavior/index.d.ts +2 -0
- package/dist/types/features/modeling/index.d.ts +1 -0
- package/dist/types/features/palette/components/Palette.d.ts +35 -5
- package/dist/types/features/palette/components/PaletteEntry.d.ts +1 -0
- package/dist/types/features/properties-panel/PropertiesPanelHeaderProvider.d.ts +1 -1
- package/dist/types/features/properties-panel/PropertiesPanelRenderer.d.ts +17 -0
- package/dist/types/features/properties-panel/PropertiesProvider.d.ts +10 -0
- package/dist/types/features/properties-panel/Util.d.ts +2 -0
- package/dist/types/features/properties-panel/entries/ActionEntry.d.ts +1 -0
- package/dist/types/features/properties-panel/entries/AdornerEntry.d.ts +1 -0
- package/dist/types/features/properties-panel/entries/AltTextEntry.d.ts +1 -0
- package/dist/types/features/properties-panel/entries/DateTimeConstraintsEntry.d.ts +1 -0
- package/dist/types/features/properties-panel/entries/DateTimeEntry.d.ts +1 -0
- package/dist/types/features/properties-panel/entries/DateTimeSerializationEntry.d.ts +1 -0
- package/dist/types/features/properties-panel/entries/DefaultValueEntry.d.ts +11 -1
- package/dist/types/features/properties-panel/entries/DescriptionEntry.d.ts +1 -0
- package/dist/types/features/properties-panel/entries/DisabledEntry.d.ts +1 -0
- package/dist/types/features/properties-panel/entries/GroupEntries.d.ts +1 -0
- package/dist/types/features/properties-panel/entries/IdEntry.d.ts +1 -0
- package/dist/types/features/properties-panel/entries/ImageSourceEntry.d.ts +1 -0
- package/dist/types/features/properties-panel/entries/KeyEntry.d.ts +1 -0
- package/dist/types/features/properties-panel/entries/LabelEntry.d.ts +1 -0
- package/dist/types/features/properties-panel/entries/NumberEntries.d.ts +1 -0
- package/dist/types/features/properties-panel/entries/NumberSerializationEntry.d.ts +1 -0
- package/dist/types/features/properties-panel/entries/ReadonlyEntry.d.ts +1 -0
- package/dist/types/features/properties-panel/entries/SelectEntries.d.ts +1 -0
- package/dist/types/features/properties-panel/entries/SpacerEntry.d.ts +1 -0
- package/dist/types/features/properties-panel/entries/TextEntry.d.ts +1 -0
- package/dist/types/features/properties-panel/entries/factories/simpleBoolEntryFactory.d.ts +1 -0
- package/dist/types/features/properties-panel/groups/AppearanceGroup.d.ts +1 -0
- package/dist/types/features/properties-panel/groups/ConstraintsGroup.d.ts +1 -0
- package/dist/types/features/properties-panel/groups/GeneralGroup.d.ts +17 -1
- package/dist/types/features/properties-panel/groups/SerializationGroup.d.ts +1 -0
- package/dist/types/features/properties-panel/groups/ValidationGroup.d.ts +1 -0
- package/dist/types/features/properties-panel/groups/ValuesGroups.d.ts +1 -1
- package/dist/types/features/properties-panel/index.d.ts +2 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/types.d.ts +28 -28
- package/package.json +4 -4
|
@@ -122,6 +122,7 @@ export default class FormEditor {
|
|
|
122
122
|
keyBehavior: (string | typeof import("./features/modeling/behavior/KeyBehavior").default)[];
|
|
123
123
|
pathBehavior: (string | typeof import("./features/modeling/behavior/PathBehavior").default)[];
|
|
124
124
|
validateBehavior: (string | typeof import("./features/modeling/behavior/ValidateBehavior").default)[];
|
|
125
|
+
valuesSourceBehavior: (string | typeof import("./features/modeling/behavior/ValuesSourceBehavior").default)[];
|
|
125
126
|
})[];
|
|
126
127
|
__init__: string[];
|
|
127
128
|
formLayoutUpdater: (string | typeof import("./features/modeling/FormLayoutUpdater").default)[];
|
|
@@ -150,6 +151,7 @@ export default class FormEditor {
|
|
|
150
151
|
__depends__: any[];
|
|
151
152
|
__init__: string[];
|
|
152
153
|
propertiesPanel: (string | typeof import("./features/properties-panel/PropertiesPanelRenderer").default)[];
|
|
154
|
+
propertiesProvider: (string | typeof import("./features/properties-panel/PropertiesProvider").default)[];
|
|
153
155
|
} | {
|
|
154
156
|
__init__: string[];
|
|
155
157
|
renderInjector: (string | typeof import("./features/render-injection/RenderInjector").default)[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare class ValuesSourceBehavior extends CommandInterceptor {
|
|
2
|
+
constructor(eventBus: any);
|
|
3
|
+
}
|
|
4
|
+
declare namespace ValuesSourceBehavior {
|
|
5
|
+
const $inject: string[];
|
|
6
|
+
}
|
|
7
|
+
export default ValuesSourceBehavior;
|
|
8
|
+
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
|
|
@@ -4,9 +4,11 @@ declare namespace _default {
|
|
|
4
4
|
const keyBehavior: (string | typeof KeyBehavior)[];
|
|
5
5
|
const pathBehavior: (string | typeof PathBehavior)[];
|
|
6
6
|
const validateBehavior: (string | typeof ValidateBehavior)[];
|
|
7
|
+
const valuesSourceBehavior: (string | typeof ValuesSourceBehavior)[];
|
|
7
8
|
}
|
|
8
9
|
export default _default;
|
|
9
10
|
import IdBehavior from './IdBehavior';
|
|
10
11
|
import KeyBehavior from './KeyBehavior';
|
|
11
12
|
import PathBehavior from './PathBehavior';
|
|
12
13
|
import ValidateBehavior from './ValidateBehavior';
|
|
14
|
+
import ValuesSourceBehavior from './ValuesSourceBehavior';
|
|
@@ -5,6 +5,7 @@ declare namespace _default {
|
|
|
5
5
|
keyBehavior: (string | typeof import("./behavior/KeyBehavior").default)[];
|
|
6
6
|
pathBehavior: (string | typeof import("./behavior/PathBehavior").default)[];
|
|
7
7
|
validateBehavior: (string | typeof import("./behavior/ValidateBehavior").default)[];
|
|
8
|
+
valuesSourceBehavior: (string | typeof import("./behavior/ValuesSourceBehavior").default)[];
|
|
8
9
|
})[];
|
|
9
10
|
const __init__: string[];
|
|
10
11
|
const formLayoutUpdater: (string | typeof FormLayoutUpdater)[];
|
|
@@ -1,10 +1,40 @@
|
|
|
1
1
|
export default function Palette(props: any): import("preact").JSX.Element;
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
2
|
+
/**
|
|
3
|
+
* Returns a list of palette entries.
|
|
4
|
+
*
|
|
5
|
+
* @param {FormFields} formFields
|
|
6
|
+
* @returns {Array<PaletteEntry>}
|
|
7
|
+
*/
|
|
8
|
+
export function collectPaletteEntries(formFields: FormFields): Array<PaletteEntry>;
|
|
9
|
+
/**
|
|
10
|
+
* There are various options to specify an icon for a palette entry.
|
|
11
|
+
*
|
|
12
|
+
* a) via `iconUrl` property in a form field config
|
|
13
|
+
* b) via `icon` property in a form field config
|
|
14
|
+
* c) via statically defined iconsByType (fallback)
|
|
15
|
+
*/
|
|
16
|
+
export function getPaletteIcon(entry: any): any;
|
|
17
|
+
/**
|
|
18
|
+
* @typedef { import('@bpmn-io/form-js-viewer').FormFields } FormFields
|
|
19
|
+
*
|
|
20
|
+
* @typedef { {
|
|
21
|
+
* label: string,
|
|
22
|
+
* type: string,
|
|
23
|
+
* group: ('basic-input'|'selection'|'presentation'|'action'),
|
|
24
|
+
* icon: preact.FunctionalComponent,
|
|
25
|
+
* iconUrl: string
|
|
26
|
+
* } } PaletteEntry
|
|
27
|
+
*/
|
|
7
28
|
export const PALETTE_GROUPS: {
|
|
8
29
|
label: string;
|
|
9
30
|
id: string;
|
|
10
31
|
}[];
|
|
32
|
+
export type FormFields = import('@bpmn-io/form-js-viewer').FormFields;
|
|
33
|
+
export type PaletteEntry = {
|
|
34
|
+
label: string;
|
|
35
|
+
type: string;
|
|
36
|
+
group: ('basic-input' | 'selection' | 'presentation' | 'action');
|
|
37
|
+
icon: preact.FunctionalComponent;
|
|
38
|
+
iconUrl: string;
|
|
39
|
+
};
|
|
40
|
+
import PaletteEntry from './PaletteEntry';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function PaletteEntry(props: any): import("preact").JSX.Element;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @typedef { { parent: Element } } PropertiesPanelConfig
|
|
3
3
|
* @typedef { import('../../core/EventBus').default } EventBus
|
|
4
4
|
* @typedef { import('../../types').Injector } Injector
|
|
5
|
+
* @typedef { { getGroups: ({ formField, editFormField }) => ({ groups}) => Array } } PropertiesProvider
|
|
5
6
|
*/
|
|
6
7
|
/**
|
|
7
8
|
* @param {PropertiesPanelConfig} propertiesPanelConfig
|
|
@@ -25,6 +26,14 @@ declare class PropertiesPanelRenderer {
|
|
|
25
26
|
detach(): void;
|
|
26
27
|
_render(): void;
|
|
27
28
|
_destroy(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Register a new properties provider to the properties panel.
|
|
31
|
+
*
|
|
32
|
+
* @param {PropertiesProvider} provider
|
|
33
|
+
* @param {Number} [priority]
|
|
34
|
+
*/
|
|
35
|
+
registerProvider(provider: PropertiesProvider, priority?: number): void;
|
|
36
|
+
_getProviders(): any;
|
|
28
37
|
}
|
|
29
38
|
declare namespace PropertiesPanelRenderer {
|
|
30
39
|
const $inject: string[];
|
|
@@ -35,3 +44,11 @@ export type PropertiesPanelConfig = {
|
|
|
35
44
|
};
|
|
36
45
|
export type EventBus = import('../../core/EventBus').default;
|
|
37
46
|
export type Injector = import('../../types').Injector;
|
|
47
|
+
export type PropertiesProvider = {
|
|
48
|
+
getGroups: ({ formField, editFormField }: {
|
|
49
|
+
formField: any;
|
|
50
|
+
editFormField: any;
|
|
51
|
+
}) => ({ groups }: {
|
|
52
|
+
groups: any;
|
|
53
|
+
}) => any[];
|
|
54
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare class PropertiesProvider {
|
|
2
|
+
constructor(propertiesPanel: any, injector: any);
|
|
3
|
+
_injector: any;
|
|
4
|
+
_filterVisibleEntries(groups: any, field: any, getService: any): any;
|
|
5
|
+
getGroups(field: any, editField: any): (groups: any) => any;
|
|
6
|
+
}
|
|
7
|
+
declare namespace PropertiesProvider {
|
|
8
|
+
const $inject: string[];
|
|
9
|
+
}
|
|
10
|
+
export default PropertiesProvider;
|
|
@@ -6,5 +6,7 @@ export function isValidNumber(value: any): boolean;
|
|
|
6
6
|
export function stopPropagation(listener: any): (event: any) => void;
|
|
7
7
|
export function textToLabel(text: any): string;
|
|
8
8
|
export function isValidDotPath(path: any): boolean;
|
|
9
|
+
export function hasEntryConfigured(formFieldDefinition: any, entryId: any): any;
|
|
10
|
+
export function hasValuesGroupsConfigured(formFieldDefinition: any): any;
|
|
9
11
|
export const INPUTS: string[];
|
|
10
12
|
export const VALUES_INPUTS: string[];
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
export default function DefaultOptionEntry(props: any):
|
|
1
|
+
export default function DefaultOptionEntry(props: any): {
|
|
2
|
+
component: typeof DefaultValueCheckbox;
|
|
3
|
+
isEdited: any;
|
|
4
|
+
isDefaultVisible: (field: any) => any;
|
|
5
|
+
editField: any;
|
|
6
|
+
field: any;
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
}[];
|
|
2
10
|
export const EMPTY_OPTION: any;
|
|
11
|
+
declare function DefaultValueCheckbox(props: any): any;
|
|
12
|
+
export {};
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
export default function GeneralGroup(field: any, editField: any, getService: any): {
|
|
2
2
|
id: string;
|
|
3
3
|
label: string;
|
|
4
|
-
entries:
|
|
4
|
+
entries: ({
|
|
5
|
+
id: string;
|
|
6
|
+
component: (props: any) => any;
|
|
7
|
+
editField: any;
|
|
8
|
+
field: any;
|
|
9
|
+
isEdited: any;
|
|
10
|
+
} | {
|
|
11
|
+
id: any;
|
|
12
|
+
label: any;
|
|
13
|
+
path: any;
|
|
14
|
+
field: any;
|
|
15
|
+
editField: any;
|
|
16
|
+
description: any;
|
|
17
|
+
component: (props: any) => any;
|
|
18
|
+
isEdited: any;
|
|
19
|
+
isDefaultVisible: any;
|
|
20
|
+
})[];
|
|
5
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function ValuesGroups(field: any, editField: any): any[];
|
|
1
|
+
export default function ValuesGroups(field: any, editField: any, getService: any): any[];
|
|
@@ -2,6 +2,8 @@ declare namespace _default {
|
|
|
2
2
|
const __depends__: any[];
|
|
3
3
|
const __init__: string[];
|
|
4
4
|
const propertiesPanel: (string | typeof PropertiesPanelModule)[];
|
|
5
|
+
const propertiesProvider: (string | typeof PropertiesProvider)[];
|
|
5
6
|
}
|
|
6
7
|
export default _default;
|
|
7
8
|
import PropertiesPanelModule from './PropertiesPanelRenderer';
|
|
9
|
+
import PropertiesProvider from './PropertiesProvider';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -13,3 +13,5 @@ export type CreateFormEditorOptions = import('./types').CreateFormEditorOptions;
|
|
|
13
13
|
import FormEditor from './FormEditor';
|
|
14
14
|
import { schemaVersion } from '@bpmn-io/form-js-viewer';
|
|
15
15
|
export { FormEditor, schemaVersion };
|
|
16
|
+
export { useDebounce, usePrevious, useService } from "./render/hooks";
|
|
17
|
+
export { useService as usePropertiesPanelService, useVariables } from "./features/properties-panel/hooks";
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { Injector } from 'didi';
|
|
2
|
-
|
|
3
|
-
export type Module = any;
|
|
4
|
-
export type Schema = any;
|
|
5
|
-
|
|
6
|
-
export interface FormEditorProperties {
|
|
7
|
-
[x: string]: any
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface FormEditorOptions {
|
|
11
|
-
additionalModules?: Module[];
|
|
12
|
-
container?: Element | null | string;
|
|
13
|
-
exporter?: {
|
|
14
|
-
name: string,
|
|
15
|
-
version: string
|
|
16
|
-
};
|
|
17
|
-
injector?: Injector;
|
|
18
|
-
modules?: Module[];
|
|
19
|
-
properties?: FormEditorProperties;
|
|
20
|
-
[x:string]: any;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface CreateFormEditorOptions extends FormEditorOptions {
|
|
24
|
-
schema?: Schema
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export {
|
|
28
|
-
Injector
|
|
1
|
+
import { Injector } from 'didi';
|
|
2
|
+
|
|
3
|
+
export type Module = any;
|
|
4
|
+
export type Schema = any;
|
|
5
|
+
|
|
6
|
+
export interface FormEditorProperties {
|
|
7
|
+
[x: string]: any
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface FormEditorOptions {
|
|
11
|
+
additionalModules?: Module[];
|
|
12
|
+
container?: Element | null | string;
|
|
13
|
+
exporter?: {
|
|
14
|
+
name: string,
|
|
15
|
+
version: string
|
|
16
|
+
};
|
|
17
|
+
injector?: Injector;
|
|
18
|
+
modules?: Module[];
|
|
19
|
+
properties?: FormEditorProperties;
|
|
20
|
+
[x:string]: any;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface CreateFormEditorOptions extends FormEditorOptions {
|
|
24
|
+
schema?: Schema
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
Injector
|
|
29
29
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bpmn-io/form-js-editor",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Edit forms - powered by bpmn.io",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@bpmn-io/draggle": "^4.0.0",
|
|
50
|
-
"@bpmn-io/form-js-viewer": "^1.
|
|
51
|
-
"@bpmn-io/properties-panel": "^3.
|
|
50
|
+
"@bpmn-io/form-js-viewer": "^1.4.0",
|
|
51
|
+
"@bpmn-io/properties-panel": "^3.13.0",
|
|
52
52
|
"array-move": "^3.0.1",
|
|
53
53
|
"big.js": "^6.2.1",
|
|
54
54
|
"ids": "^1.0.0",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"files": [
|
|
63
63
|
"dist"
|
|
64
64
|
],
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "1ef256645701ac8be771e3cd4b51e3eefc9c183b"
|
|
66
66
|
}
|