@bpmn-io/form-js-editor 1.24.1 → 1.26.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.
Files changed (43) hide show
  1. package/dist/assets/form-js-editor-base.css +2 -0
  2. package/dist/assets/form-js-editor.css +2 -0
  3. package/dist/index.cjs +8138 -7971
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.es.js +8141 -7974
  6. package/dist/index.es.js.map +1 -1
  7. package/dist/types/core/FormLayoutValidator.d.ts +8 -2
  8. package/dist/types/features/context-pad/DeleteActionProvider.d.ts +2 -1
  9. package/dist/types/features/dragging/Dragging.d.ts +1 -1
  10. package/dist/types/features/properties-panel/PropertiesPanel.d.ts +1 -1
  11. package/dist/types/features/properties-panel/PropertiesPanelRenderer.d.ts +8 -25
  12. package/dist/types/features/properties-panel/entries/AcceptEntry.d.ts +4 -0
  13. package/dist/types/features/properties-panel/entries/ColumnEntry.d.ts +1 -0
  14. package/dist/types/features/properties-panel/entries/ColumnsExpressionEntry.d.ts +1 -0
  15. package/dist/types/features/properties-panel/entries/DateTimeEntry.d.ts +1 -0
  16. package/dist/types/features/properties-panel/entries/DefaultValueEntry.d.ts +1 -1
  17. package/dist/types/features/properties-panel/entries/DisabledEntry.d.ts +1 -0
  18. package/dist/types/features/properties-panel/entries/DocumentsDataSource.d.ts +4 -0
  19. package/dist/types/features/properties-panel/entries/HeadersSourceSelectEntry.d.ts +1 -0
  20. package/dist/types/features/properties-panel/entries/HeightEntry.d.ts +4 -0
  21. package/dist/types/features/properties-panel/entries/IFrameUrlEntry.d.ts +1 -0
  22. package/dist/types/features/properties-panel/entries/InputKeyOptionsSourceEntry.d.ts +4 -0
  23. package/dist/types/features/properties-panel/entries/MaxHeightEntry.d.ts +4 -0
  24. package/dist/types/features/properties-panel/entries/NumberEntries.d.ts +4 -0
  25. package/dist/types/features/properties-panel/entries/OptionsSourceSelectEntry.d.ts +1 -0
  26. package/dist/types/features/properties-panel/entries/PaginationEntry.d.ts +1 -0
  27. package/dist/types/features/properties-panel/entries/RowCountEntry.d.ts +1 -0
  28. package/dist/types/features/properties-panel/entries/TableDataSourceEntry.d.ts +4 -0
  29. package/dist/types/features/properties-panel/entries/TextEntry.d.ts +1 -0
  30. package/dist/types/features/properties-panel/groups/AppearanceGroup.d.ts +1 -1
  31. package/dist/types/features/properties-panel/groups/ConditionGroup.d.ts +2 -2
  32. package/dist/types/features/properties-panel/groups/ConstraintsGroup.d.ts +2 -2
  33. package/dist/types/features/properties-panel/groups/CustomPropertiesGroup.d.ts +4 -4
  34. package/dist/types/features/properties-panel/groups/GeneralGroup.d.ts +1 -1
  35. package/dist/types/features/properties-panel/groups/LayoutGroup.d.ts +2 -2
  36. package/dist/types/features/properties-panel/groups/SecurityAttributesGroup.d.ts +3 -3
  37. package/dist/types/features/properties-panel/groups/SerializationGroup.d.ts +2 -2
  38. package/dist/types/features/properties-panel/groups/TableHeaderGroups.d.ts +1 -1
  39. package/dist/types/features/properties-panel/groups/ValidationGroup.d.ts +3 -2
  40. package/dist/types/features/properties-panel/hooks/index.d.ts +1 -1
  41. package/dist/types/features/properties-panel/hooks/useService.d.ts +1 -0
  42. package/dist/types/features/repeat-render/EditorRepeatRenderManager.d.ts +2 -1
  43. package/package.json +6 -3
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @typedef { import('diagram-js/lib/i18n/translate/translate').default } Translate
3
+ */
1
4
  export const MAX_COLUMNS_PER_ROW: 16;
2
5
  export const MAX_COLUMNS: 16;
3
6
  export const MIN_COLUMNS: 2;
@@ -8,12 +11,15 @@ export class FormLayoutValidator {
8
11
  *
9
12
  * @param { import('./FormLayouter').FormLayouter } formLayouter
10
13
  * @param { import('./FormFieldRegistry').FormFieldRegistry } formFieldRegistry
14
+ * @param {Translate} translate
11
15
  */
12
- constructor(formLayouter: import("./FormLayouter").FormLayouter, formFieldRegistry: import("./FormFieldRegistry").FormFieldRegistry);
16
+ constructor(formLayouter: import("./FormLayouter").FormLayouter, formFieldRegistry: import("./FormFieldRegistry").FormFieldRegistry, translate: Translate);
13
17
  _formLayouter: import("@bpmn-io/form-js-viewer/dist/types/core/FormLayouter").FormLayouter;
14
18
  _formFieldRegistry: import("./FormFieldRegistry").FormFieldRegistry;
15
- validateField(field: {}, columns: any, row: any): "Minimum 2 columns are allowed" | "Maximum 16 columns are allowed" | "New value exceeds the maximum of 16 columns per row" | "Maximum 4 fields per row are allowed";
19
+ _translate: typeof import("diagram-js/lib/i18n/translate/translate").default;
20
+ validateField(field: {}, columns: any, row: any): string;
16
21
  }
17
22
  export namespace FormLayoutValidator {
18
23
  let $inject: string[];
19
24
  }
25
+ export type Translate = typeof import("diagram-js/lib/i18n/translate/translate").default;
@@ -7,10 +7,11 @@
7
7
  * @param {import('../../render/EditorFormFields').EditorFormFields} formFields
8
8
  */
9
9
  export class DeleteActionProvider {
10
- constructor(formFieldContextActions: any, modeling: any, formFieldRegistry: any, formFields: any);
10
+ constructor(formFieldContextActions: any, modeling: any, formFieldRegistry: any, formFields: any, translate: any);
11
11
  _modeling: any;
12
12
  _formFieldRegistry: any;
13
13
  _formFields: any;
14
+ _translate: any;
14
15
  /**
15
16
  * @param {Object} formField
16
17
  * @return {Object} entries
@@ -37,7 +37,7 @@ export class Dragging {
37
37
  * @returns { number }
38
38
  */
39
39
  getTargetIndex(targetRow: FormRow, targetFormField: any, sibling: HTMLElement): number;
40
- validateDrop(element: any, target: any): "Minimum 2 columns are allowed" | "Maximum 16 columns are allowed" | "New value exceeds the maximum of 16 columns per row" | "Maximum 4 fields per row are allowed" | "No associated form field in the registry" | "Drop is not a valid target" | "Drop not allowed by path registry";
40
+ validateDrop(element: any, target: any): string;
41
41
  moveField(element: any, source: any, targetRow: any, targetFormField: any, targetIndex: any): void;
42
42
  createNewField(element: any, targetRow: any, targetFormField: any, targetIndex: any): void;
43
43
  handleRowDrop(el: any, target: any, source: any, sibling: any): void;
@@ -1 +1 @@
1
- export function PropertiesPanel(props: any): import("preact").JSX.Element;
1
+ export function PropertiesPanel(): import("preact").JSX.Element;
@@ -1,31 +1,15 @@
1
1
  /**
2
- * @typedef { { parent: Element } } PropertiesPanelConfig
3
2
  * @typedef { import('../../core/EventBus').EventBus } EventBus
4
- * @typedef { import('../../types').Injector } Injector
5
3
  * @typedef { { getGroups: ({ formField, editFormField }) => ({ groups}) => Array } } PropertiesProvider
6
4
  */
7
5
  /**
8
- * @param {PropertiesPanelConfig} propertiesPanelConfig
9
- * @param {Injector} injector
6
+ * Manages the properties panel section rendering and the registration of
7
+ * properties providers.
8
+ *
10
9
  * @param {EventBus} eventBus
11
10
  */
12
- export class PropertiesPanelRenderer {
13
- constructor(propertiesPanelConfig: any, injector: any, eventBus: any);
14
- _eventBus: any;
15
- _injector: any;
16
- _container: HTMLElement;
17
- /**
18
- * Attach the properties panel to a parent node.
19
- *
20
- * @param {HTMLElement} container
21
- */
22
- attachTo(container: HTMLElement): void;
23
- /**
24
- * Detach the properties panel from its parent node.
25
- */
26
- detach(): void;
27
- _render(): void;
28
- _destroy(): void;
11
+ export class PropertiesPanelRenderer extends SectionModuleBase {
12
+ constructor(eventBus: any);
29
13
  /**
30
14
  * Register a new properties provider to the properties panel.
31
15
  *
@@ -33,16 +17,15 @@ export class PropertiesPanelRenderer {
33
17
  * @param {Number} [priority]
34
18
  */
35
19
  registerProvider(provider: PropertiesProvider, priority?: number): void;
20
+ getProviders(): any;
36
21
  _getProviders(): any;
22
+ _destroy(): void;
37
23
  }
38
24
  export namespace PropertiesPanelRenderer {
39
25
  let $inject: string[];
40
26
  }
41
- export type PropertiesPanelConfig = {
42
- parent: Element;
43
- };
44
27
  export type EventBus = import("../../core/EventBus").EventBus;
45
- export type Injector = import("../../types").Injector;
46
28
  export type PropertiesProvider = {
47
29
  getGroups: ({ formField, editFormField }: any) => ({ groups }: any) => any[];
48
30
  };
31
+ import { SectionModuleBase } from '../SectionModuleBase';
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @typedef { import('diagram-js/lib/i18n/translate/translate').default } Translate
3
+ */
1
4
  export function AcceptEntry(props: any): {
2
5
  id: string;
3
6
  component: typeof Accept;
@@ -6,5 +9,6 @@ export function AcceptEntry(props: any): {
6
9
  isEdited: any;
7
10
  isDefaultVisible: {};
8
11
  }[];
12
+ export type Translate = typeof import("diagram-js/lib/i18n/translate/translate").default;
9
13
  declare function Accept(props: any): any;
10
14
  export {};
@@ -6,5 +6,6 @@ export function ColumnEntry(props: any): {
6
6
  idPrefix: any;
7
7
  index: any;
8
8
  }[];
9
+ export type Translate = typeof import("diagram-js/lib/i18n/translate/translate").default;
9
10
  declare function Label(props: any): any;
10
11
  export {};
@@ -6,5 +6,6 @@ export function ColumnsExpressionEntry(props: any): {
6
6
  isEdited: any;
7
7
  isDefaultVisible: {};
8
8
  }[];
9
+ export type Translate = typeof import("diagram-js/lib/i18n/translate/translate").default;
9
10
  declare function ColumnsExpression(props: any): any;
10
11
  export {};
@@ -5,6 +5,7 @@ export function DateTimeEntry(props: any): {
5
5
  editField: any;
6
6
  field: any;
7
7
  isDefaultVisible: (field: any) => boolean;
8
+ translate: any;
8
9
  }[];
9
10
  declare function DateTimeSubtypeSelect(props: any): any;
10
11
  export {};
@@ -5,7 +5,7 @@ export function DefaultValueEntry(props: any): {
5
5
  editField: any;
6
6
  field: any;
7
7
  id: string;
8
- label: string;
8
+ label: any;
9
9
  }[];
10
10
  export const EMPTY_OPTION: "";
11
11
  declare function DefaultValueCheckbox(props: any): any;
@@ -5,6 +5,7 @@ export function DisabledEntry(props: any): {
5
5
  field: any;
6
6
  isEdited: any;
7
7
  isDefaultVisible: {};
8
+ translate: any;
8
9
  }[];
9
10
  declare function Disabled(props: any): any;
10
11
  export {};
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @typedef { import('diagram-js/lib/i18n/translate/translate').default } Translate
3
+ */
1
4
  export function DocumentsDataSourceEntry(props: any): {
2
5
  id: string;
3
6
  component: typeof DocumentsDataSource;
@@ -6,5 +9,6 @@ export function DocumentsDataSourceEntry(props: any): {
6
9
  isEdited: any;
7
10
  isDefaultVisible: {};
8
11
  }[];
12
+ export type Translate = typeof import("diagram-js/lib/i18n/translate/translate").default;
9
13
  declare function DocumentsDataSource(props: any): any;
10
14
  export {};
@@ -4,6 +4,7 @@ export function HeadersSourceSelectEntry(props: any): {
4
4
  isEdited: (node: HTMLElement) => boolean;
5
5
  editField: any;
6
6
  field: any;
7
+ translate: any;
7
8
  }[];
8
9
  declare function HeadersSourceSelect(props: any): import("preact").JSX.Element;
9
10
  export {};
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @typedef { import('diagram-js/lib/i18n/translate/translate').default } Translate
3
+ */
1
4
  export function HeightEntry(props: any): {
2
5
  id: string;
3
6
  component: typeof Height;
@@ -8,5 +11,6 @@ export function HeightEntry(props: any): {
8
11
  defaultValue: any;
9
12
  isDefaultVisible: {};
10
13
  }[];
14
+ export type Translate = typeof import("diagram-js/lib/i18n/translate/translate").default;
11
15
  declare function Height(props: any): any;
12
16
  export {};
@@ -6,5 +6,6 @@ export function IFrameUrlEntry(props: any): {
6
6
  isEdited: any;
7
7
  isDefaultVisible: {};
8
8
  }[];
9
+ export type Translate = typeof import("diagram-js/lib/i18n/translate/translate").default;
9
10
  declare function Url(props: any): any;
10
11
  export {};
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @typedef { import('diagram-js/lib/i18n/translate/translate').default } Translate
3
+ */
1
4
  export function InputKeyOptionsSourceEntry(props: any): {
2
5
  id: string;
3
6
  component: typeof InputValuesKey;
@@ -5,5 +8,6 @@ export function InputKeyOptionsSourceEntry(props: any): {
5
8
  editField: any;
6
9
  field: any;
7
10
  }[];
11
+ export type Translate = typeof import("diagram-js/lib/i18n/translate/translate").default;
8
12
  declare function InputValuesKey(props: any): any;
9
13
  export {};
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @typedef { import('diagram-js/lib/i18n/translate/translate').default } Translate
3
+ */
1
4
  export function MaxHeightEntry(props: any): {
2
5
  id: string;
3
6
  component: typeof MaxHeight;
@@ -6,5 +9,6 @@ export function MaxHeightEntry(props: any): {
6
9
  isEdited: any;
7
10
  isDefaultVisible: {};
8
11
  }[];
12
+ export type Translate = typeof import("diagram-js/lib/i18n/translate/translate").default;
9
13
  declare function MaxHeight(props: any): any;
10
14
  export {};
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @typedef { import('diagram-js/lib/i18n/translate/translate').default } Translate
3
+ */
1
4
  export function NumberEntries(props: any): {
2
5
  id: string;
3
6
  component: typeof NumberDecimalDigits;
@@ -6,5 +9,6 @@ export function NumberEntries(props: any): {
6
9
  field: any;
7
10
  isDefaultVisible: {};
8
11
  }[];
12
+ export type Translate = typeof import("diagram-js/lib/i18n/translate/translate").default;
9
13
  declare function NumberDecimalDigits(props: any): any;
10
14
  export {};
@@ -4,6 +4,7 @@ export function OptionsSourceSelectEntry(props: any): {
4
4
  isEdited: (node: HTMLElement) => boolean;
5
5
  editField: any;
6
6
  field: any;
7
+ translate: any;
7
8
  }[];
8
9
  declare function ValuesSourceSelect(props: any): import("preact").JSX.Element;
9
10
  export {};
@@ -5,6 +5,7 @@ export function PaginationEntry(props: any): {
5
5
  field: any;
6
6
  isEdited: any;
7
7
  isDefaultVisible: {};
8
+ translate: any;
8
9
  }[];
9
10
  declare function Pagination(props: any): any;
10
11
  export {};
@@ -6,5 +6,6 @@ export function RowCountEntry(props: any): {
6
6
  field: any;
7
7
  isDefaultVisible: {};
8
8
  }[];
9
+ export type Translate = typeof import("diagram-js/lib/i18n/translate/translate").default;
9
10
  declare function RowCount(props: any): any;
10
11
  export {};
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @typedef { import('diagram-js/lib/i18n/translate/translate').default } Translate
3
+ */
1
4
  export function TableDataSourceEntry(props: any): {
2
5
  id: string;
3
6
  component: typeof Source;
@@ -6,5 +9,6 @@ export function TableDataSourceEntry(props: any): {
6
9
  isEdited: any;
7
10
  isDefaultVisible: {};
8
11
  }[];
12
+ export type Translate = typeof import("diagram-js/lib/i18n/translate/translate").default;
9
13
  declare function Source(props: any): any;
10
14
  export {};
@@ -6,5 +6,6 @@ export function TextEntry(props: any): {
6
6
  isEdited: (node: HTMLElement) => boolean;
7
7
  isDefaultVisible: (field: any) => boolean;
8
8
  }[];
9
+ export type Translate = typeof import("diagram-js/lib/i18n/translate/translate").default;
9
10
  declare function Text(props: any): any;
10
11
  export {};
@@ -1,6 +1,6 @@
1
1
  export function AppearanceGroup(field: any, editField: any, getService: any): {
2
2
  id: string;
3
- label: string;
3
+ label: any;
4
4
  entries: ({
5
5
  id: any;
6
6
  label: any;
@@ -1,6 +1,6 @@
1
- export function ConditionGroup(field: any, editField: any): {
1
+ export function ConditionGroup(field: any, editField: any, getService: any): {
2
2
  id: string;
3
- label: string;
3
+ label: any;
4
4
  entries: {
5
5
  id: string;
6
6
  component: (props: any) => any;
@@ -1,6 +1,6 @@
1
- export function ConstraintsGroup(field: any, editField: any): {
1
+ export function ConstraintsGroup(field: any, editField: any, getService: any): {
2
2
  id: string;
3
- label: string;
3
+ label: any;
4
4
  entries: {
5
5
  id: string;
6
6
  component: (props: any) => any;
@@ -1,6 +1,6 @@
1
- export function CustomPropertiesGroup(field: any, editField: any): {
1
+ export function CustomPropertiesGroup(field: any, editField: any, getService: any): {
2
2
  add: (event: any) => void;
3
- component: any;
3
+ component: (props: any) => any;
4
4
  id: string;
5
5
  items: {
6
6
  autoFocusEntry: string;
@@ -17,8 +17,8 @@ export function CustomPropertiesGroup(field: any, editField: any): {
17
17
  label: string;
18
18
  remove: (event: any) => any;
19
19
  }[];
20
- label: string;
21
- tooltip: string;
20
+ label: any;
21
+ tooltip: any;
22
22
  };
23
23
  /**
24
24
  * Returns copy of object without key.
@@ -1,6 +1,6 @@
1
1
  export function GeneralGroup(field: any, editField: any, getService: any): {
2
2
  id: string;
3
- label: string;
3
+ label: any;
4
4
  entries: ({
5
5
  id: string;
6
6
  component: (props: any) => any;
@@ -1,6 +1,6 @@
1
- export function LayoutGroup(field: any, editField: any): {
1
+ export function LayoutGroup(field: any, editField: any, getService: any): {
2
2
  id: string;
3
- label: string;
3
+ label: any;
4
4
  entries: {
5
5
  id: string;
6
6
  component: (props: any) => any;
@@ -1,6 +1,6 @@
1
- export function SecurityAttributesGroup(field: any, editField: any): {
1
+ export function SecurityAttributesGroup(field: any, editField: any, getService: any): {
2
2
  id: string;
3
- label: string;
3
+ label: any;
4
4
  entries: ({
5
5
  id: any;
6
6
  label: any;
@@ -14,7 +14,7 @@ export function SecurityAttributesGroup(field: any, editField: any): {
14
14
  getValue: any;
15
15
  setValue: any;
16
16
  } | {
17
- component: (props: any) => import("preact").JSX.Element;
17
+ component: () => import("preact").JSX.Element;
18
18
  })[];
19
19
  tooltip: import("preact").JSX.Element;
20
20
  };
@@ -1,6 +1,6 @@
1
- export function SerializationGroup(field: any, editField: any): {
1
+ export function SerializationGroup(field: any, editField: any, getService: any): {
2
2
  id: string;
3
- label: string;
3
+ label: any;
4
4
  entries: {
5
5
  id: string;
6
6
  component: (props: any) => any;
@@ -1 +1 @@
1
- export function TableHeaderGroups(field: any, editField: any): Group[];
1
+ export function TableHeaderGroups(field: any, editField: any, getService: any): Group[];
@@ -1,6 +1,6 @@
1
- export function ValidationGroup(field: any, editField: any): {
1
+ export function ValidationGroup(field: any, editField: any, getService: any): {
2
2
  id: string;
3
- label: string;
3
+ label: any;
4
4
  entries: {
5
5
  id: string;
6
6
  component: typeof Required;
@@ -9,6 +9,7 @@ export function ValidationGroup(field: any, editField: any): {
9
9
  isEdited: any;
10
10
  onChange: (key: any) => (value: any) => void;
11
11
  isDefaultVisible: (field: any) => boolean;
12
+ translate: any;
12
13
  }[];
13
14
  };
14
15
  declare function Required(props: any): any;
@@ -1,2 +1,2 @@
1
1
  export { useVariables } from "./useVariables";
2
- export { useService } from "./usePropertiesPanelService";
2
+ export { useService } from "./useService";
@@ -0,0 +1 @@
1
+ export { useService } from "../../../render/hooks";
@@ -1,7 +1,8 @@
1
1
  export class EditorRepeatRenderManager {
2
- constructor(formFields: any, formFieldRegistry: any);
2
+ constructor(formFields: any, formFieldRegistry: any, translate: any);
3
3
  _formFields: any;
4
4
  _formFieldRegistry: any;
5
+ _translate: any;
5
6
  RepeatFooter(): import("preact").JSX.Element;
6
7
  /**
7
8
  * Checks whether a field should be repeatable.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpmn-io/form-js-editor",
3
- "version": "1.24.1",
3
+ "version": "1.26.0",
4
4
  "description": "Edit forms - powered by bpmn.io",
5
5
  "exports": {
6
6
  ".": {
@@ -48,10 +48,11 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@bpmn-io/draggle": "^4.1.2",
51
- "@bpmn-io/form-js-viewer": "1.24.1",
51
+ "@bpmn-io/form-js-viewer": "^1.26.0",
52
52
  "@bpmn-io/properties-panel": "^3.47.0",
53
53
  "array-move": "^4.0.0",
54
54
  "big.js": "^7.0.1",
55
+ "diagram-js": "^15.22.0",
55
56
  "ids": "^3.0.2",
56
57
  "min-dash": "^5.1.0",
57
58
  "min-dom": "^5.3.0",
@@ -63,5 +64,7 @@
63
64
  "files": [
64
65
  "dist"
65
66
  ],
66
- "gitHead": "81e618336af03005c15b1237c030adbc954f6109"
67
+ "devDependencies": {
68
+ "@bpmn-io/form-js-i18n": "^1.26.0"
69
+ }
67
70
  }