@bpmn-io/form-js-editor 1.0.0-alpha.0 → 1.0.0-alpha.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.
Files changed (41) hide show
  1. package/dist/assets/form-js-editor-base.css +8 -3
  2. package/dist/assets/form-js-editor.css +8 -3
  3. package/dist/index.cjs +7758 -7514
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.es.js +7823 -7579
  6. package/dist/index.es.js.map +1 -1
  7. package/dist/types/FormEditor.d.ts +6 -3
  8. package/dist/types/features/SectionModuleBase.d.ts +35 -0
  9. package/dist/types/features/expression-language/EditorTemplating.d.ts +8 -0
  10. package/dist/types/features/expression-language/index.d.ts +2 -2
  11. package/dist/types/features/palette/PaletteModule.d.ts +8 -0
  12. package/dist/types/features/palette/components/Palette.d.ts +1 -1
  13. package/dist/types/features/palette/index.d.ts +2 -2
  14. package/dist/types/features/properties-panel/PropertiesPanel.d.ts +1 -1
  15. package/dist/types/features/properties-panel/PropertiesPanelHeaderProvider.d.ts +1 -1
  16. package/dist/types/features/properties-panel/PropertiesPanelModule.d.ts +8 -0
  17. package/dist/types/features/properties-panel/entries/InputKeyValuesSourceEntry.d.ts +1 -1
  18. package/dist/types/features/properties-panel/entries/LabelEntry.d.ts +5 -5
  19. package/dist/types/features/properties-panel/hooks/index.d.ts +1 -1
  20. package/dist/types/features/properties-panel/hooks/useService.d.ts +2 -0
  21. package/dist/types/features/properties-panel/index.d.ts +2 -2
  22. package/dist/types/features/render-injection/RenderInjector.d.ts +30 -0
  23. package/dist/types/features/render-injection/components/InjectedRendersRoot.d.ts +2 -0
  24. package/dist/types/features/render-injection/index.d.ts +6 -0
  25. package/dist/types/features/render-injection/slot-fill/Fill.d.ts +2 -0
  26. package/dist/types/features/render-injection/slot-fill/FillContext.d.ts +5 -0
  27. package/dist/types/features/render-injection/slot-fill/Slot.d.ts +7 -0
  28. package/dist/types/features/render-injection/slot-fill/SlotContext.d.ts +4 -0
  29. package/dist/types/features/render-injection/slot-fill/SlotFillRoot.d.ts +2 -0
  30. package/dist/types/features/render-injection/slot-fill/index.d.ts +5 -0
  31. package/dist/types/render/components/FieldDragPreview.d.ts +1 -1
  32. package/dist/types/render/components/FieldResizer.d.ts +1 -1
  33. package/dist/types/render/components/FormEditor.d.ts +1 -1
  34. package/dist/types/render/components/ModularSection.d.ts +2 -0
  35. package/dist/types/render/components/editor-form-fields/EditorText.d.ts +1 -1
  36. package/package.json +3 -3
  37. package/dist/types/features/palette/PaletteRenderer.d.ts +0 -33
  38. package/dist/types/features/properties-panel/PropertiesPanelRenderer.d.ts +0 -37
  39. package/dist/types/features/properties-panel/context/FormPropertiesPanelContext.d.ts +0 -11
  40. package/dist/types/features/properties-panel/context/index.d.ts +0 -1
  41. package/dist/types/features/properties-panel/hooks/usePropertiesPanelService.d.ts +0 -1
@@ -140,14 +140,17 @@ export default class FormEditor {
140
140
  selection: (string | typeof import("./features/selection/Selection").default)[];
141
141
  selectionBehavior: (string | typeof import("./features/selection/SelectionBehavior").default)[];
142
142
  } | {
143
- palette: (string | typeof import("./features/palette/PaletteRenderer").default)[];
143
+ palette: (string | typeof import("./features/palette/PaletteModule").default)[];
144
144
  } | {
145
145
  __init__: string[];
146
146
  expressionLanguage: (string | typeof import("@bpmn-io/form-js-viewer/dist/types/features/expression-language/FeelExpressionLanguage").default)[];
147
- templating: (string | typeof import("@bpmn-io/form-js-viewer/dist/types/features/expression-language/FeelersTemplating").default)[];
147
+ templating: (string | typeof import("./features/expression-language/EditorTemplating").default)[];
148
148
  } | typeof MarkdownModule | {
149
149
  __init__: string[];
150
- propertiesPanel: (string | typeof import("./features/properties-panel/PropertiesPanelRenderer").default)[];
150
+ propertiesPanel: (string | typeof import("./features/properties-panel/PropertiesPanelModule").default)[];
151
+ } | {
152
+ __init__: string[];
153
+ renderInjector: (string | typeof import("./features/render-injection/RenderInjector").default)[];
151
154
  })[];
152
155
  /**
153
156
  * @internal
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Base class for sectionable UI modules.
3
+ *
4
+ * @property {EventBus} _eventBus - EventBus instance used for event handling.
5
+ * @property {string} managerType - Type of the render manager. Used to form event names.
6
+ *
7
+ * @class SectionModuleBase
8
+ */
9
+ export default class SectionModuleBase {
10
+ /**
11
+ * Create a SectionModuleBase instance.
12
+ *
13
+ * @param {any} eventBus - The EventBus instance used for event handling.
14
+ * @param {string} sectionKey - The type of render manager. Used to form event names.
15
+ *
16
+ * @constructor
17
+ */
18
+ constructor(eventBus: any, sectionKey: string);
19
+ _eventBus: any;
20
+ sectionKey: string;
21
+ /**
22
+ * Attach the managed section to a parent node.
23
+ *
24
+ * @param {HTMLElement} container - The parent node to attach to.
25
+ */
26
+ attachTo(container: HTMLElement): void;
27
+ /**
28
+ * Detach the managed section from its parent node.
29
+ */
30
+ detach(): void;
31
+ /**
32
+ * Reset the managed section to its initial state.
33
+ */
34
+ reset(): void;
35
+ }
@@ -0,0 +1,8 @@
1
+ declare class EditorTemplating {
2
+ isTemplate(value: any): boolean;
3
+ evaluate(template: any): any;
4
+ }
5
+ declare namespace EditorTemplating {
6
+ const $inject: any[];
7
+ }
8
+ export default EditorTemplating;
@@ -1,8 +1,8 @@
1
1
  declare namespace _default {
2
2
  const __init__: string[];
3
3
  const expressionLanguage: (string | typeof FeelExpressionLanguage)[];
4
- const templating: (string | typeof FeelersTemplating)[];
4
+ const templating: (string | typeof EditorTemplating)[];
5
5
  }
6
6
  export default _default;
7
7
  import { FeelExpressionLanguage } from '@bpmn-io/form-js-viewer';
8
- import { FeelersTemplating } from '@bpmn-io/form-js-viewer';
8
+ import EditorTemplating from './EditorTemplating';
@@ -0,0 +1,8 @@
1
+ declare class PaletteModule extends SectionModuleBase {
2
+ constructor(eventBus: any);
3
+ }
4
+ declare namespace PaletteModule {
5
+ const $inject: string[];
6
+ }
7
+ export default PaletteModule;
8
+ import SectionModuleBase from '../SectionModuleBase';
@@ -1,4 +1,4 @@
1
- export default function Palette(props: any): JSX.Element;
1
+ export default function Palette(props: any): import("preact").JSX.Element;
2
2
  export const PALETTE_ENTRIES: {
3
3
  label: any;
4
4
  type: string;
@@ -1,5 +1,5 @@
1
1
  declare namespace _default {
2
- const palette: (string | typeof PaletteRenderer)[];
2
+ const palette: (string | typeof PaletteModule)[];
3
3
  }
4
4
  export default _default;
5
- import PaletteRenderer from './PaletteRenderer';
5
+ import PaletteModule from './PaletteModule';
@@ -1 +1 @@
1
- export default function FormPropertiesPanel(props: any): JSX.Element;
1
+ export default function FormPropertiesPanel(): import("preact").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  export namespace PropertiesPanelHeaderProvider {
2
2
  function getElementLabel(field: any): any;
3
- function getElementIcon(field: any): () => JSX.Element;
3
+ function getElementIcon(field: any): () => import("preact").JSX.Element;
4
4
  function getTypeLabel(field: any): any;
5
5
  }
@@ -0,0 +1,8 @@
1
+ declare class PropertiesPanelModule extends SectionModuleBase {
2
+ constructor(eventBus: any);
3
+ }
4
+ declare namespace PropertiesPanelModule {
5
+ const $inject: string[];
6
+ }
7
+ export default PropertiesPanelModule;
8
+ import SectionModuleBase from '../SectionModuleBase';
@@ -2,7 +2,7 @@ export default function InputKeyValuesSourceEntry(props: any): {
2
2
  id: string;
3
3
  component: typeof InputValuesKey;
4
4
  label: string;
5
- description: JSX.Element;
5
+ description: import("preact").JSX.Element;
6
6
  isEdited: any;
7
7
  editField: any;
8
8
  field: any;
@@ -1,9 +1,9 @@
1
1
  export default function LabelEntry(props: any): {
2
- id: any;
3
- label: any;
4
- path: any;
5
- field: any;
2
+ id: string;
3
+ component: typeof DateLabel;
6
4
  editField: any;
7
- component: (props: any) => any;
5
+ field: any;
8
6
  isEdited: any;
9
7
  }[];
8
+ declare function DateLabel(props: any): any;
9
+ export {};
@@ -1,2 +1,2 @@
1
- export { default as useService } from "./usePropertiesPanelService";
2
1
  export { useVariables } from "./useVariables";
2
+ export { useService } from "./useService";
@@ -0,0 +1,2 @@
1
+ export { useService };
2
+ import { useService } from '../../../render/hooks';
@@ -1,6 +1,6 @@
1
1
  declare namespace _default {
2
2
  const __init__: string[];
3
- const propertiesPanel: (string | typeof PropertiesPanelRenderer)[];
3
+ const propertiesPanel: (string | typeof PropertiesPanelModule)[];
4
4
  }
5
5
  export default _default;
6
- import PropertiesPanelRenderer from './PropertiesPanelRenderer';
6
+ import PropertiesPanelModule from './PropertiesPanelModule';
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Manages the rendering of visual plugins.
3
+ * @constructor
4
+ * @param {Object} eventBus - Event bus for the application.
5
+ */
6
+ declare class RenderInjector extends SectionModuleBase {
7
+ constructor(eventBus: any);
8
+ registeredRenderers: any[];
9
+ /**
10
+ * Inject a new renderer into the injector.
11
+ * @param {string} identifier - Identifier for the renderer.
12
+ * @param {Function} Renderer - The renderer function.
13
+ */
14
+ attachRenderer(identifier: string, Renderer: Function): void;
15
+ /**
16
+ * Detach a renderer from the by key injector.
17
+ * @param {string} identifier - Identifier for the renderer.
18
+ */
19
+ detachRenderer(identifier: string): void;
20
+ /**
21
+ * Returns the registered renderers.
22
+ * @returns {Array} Array of registered renderers.
23
+ */
24
+ fetchRenderers(): any[];
25
+ }
26
+ declare namespace RenderInjector {
27
+ const $inject: string[];
28
+ }
29
+ export default RenderInjector;
30
+ import SectionModuleBase from '../SectionModuleBase';
@@ -0,0 +1,2 @@
1
+ declare function _default(): any;
2
+ export default _default;
@@ -0,0 +1,6 @@
1
+ declare namespace _default {
2
+ const __init__: string[];
3
+ const renderInjector: (string | typeof RenderInjector)[];
4
+ }
5
+ export default _default;
6
+ import RenderInjector from './RenderInjector';
@@ -0,0 +1,2 @@
1
+ declare function _default(props: any): any;
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ export default FillContext;
2
+ declare const FillContext: import("preact").Context<{
3
+ addFill(uid: any, props: any): never;
4
+ removeFill(uid: any): never;
5
+ }>;
@@ -0,0 +1,7 @@
1
+ declare function _default(props: {
2
+ name: string;
3
+ groupFn: Function;
4
+ separatorFn: Function;
5
+ limit: number;
6
+ }): any[];
7
+ export default _default;
@@ -0,0 +1,4 @@
1
+ export default SlotContext;
2
+ declare const SlotContext: import("preact").Context<{
3
+ fills: any[];
4
+ }>;
@@ -0,0 +1,2 @@
1
+ declare function _default(props: any): import("preact").JSX.Element;
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ export { default as Fill } from "./Fill";
2
+ export { default as Slot } from "./Slot";
3
+ export { default as SlotFillRoot } from "./SlotFillRoot";
4
+ export { default as SlotContext } from "./SlotContext";
5
+ export { default as FillContext } from "./FillContext";
@@ -1 +1 @@
1
- export function FieldDragPreview(props: any): JSX.Element;
1
+ export function FieldDragPreview(props: any): import("preact").JSX.Element;
@@ -1 +1 @@
1
- export function FieldResizer(props: any): JSX.Element;
1
+ export function FieldResizer(props: any): import("preact").JSX.Element;
@@ -1 +1 @@
1
- export default function FormEditor(props: any): JSX.Element;
1
+ export default function FormEditor(props: any): import("preact").JSX.Element;
@@ -0,0 +1,2 @@
1
+ declare function _default(props: any): import("preact").VNode<any>;
2
+ export default _default;
@@ -1,4 +1,4 @@
1
- declare function EditorText(props: any): JSX.Element;
1
+ declare function EditorText(props: any): import("preact").JSX.Element;
2
2
  declare namespace EditorText {
3
3
  const config: typeof Text.config;
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpmn-io/form-js-editor",
3
- "version": "1.0.0-alpha.0",
3
+ "version": "1.0.0-alpha.1",
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": "^1.0.0-alpha.0",
47
+ "@bpmn-io/form-js-viewer": "^1.0.0-alpha.1",
48
48
  "@bpmn-io/properties-panel": "^2.1.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": "992b8f130b82f8e739af7b3794e42a3ec054523d"
63
+ "gitHead": "91e7c8d47f7304dfe634c37b1329ee81fb85aa93"
64
64
  }
@@ -1,33 +0,0 @@
1
- /**
2
- * @typedef { { parent: Element } } PaletteConfig
3
- * @typedef { import('../../core/EventBus').default } EventBus
4
- */
5
- /**
6
- * @param {PaletteConfig} paletteConfig
7
- * @param {EventBus} eventBus
8
- */
9
- declare class PaletteRenderer {
10
- constructor(paletteConfig: any, eventBus: any);
11
- _eventBus: any;
12
- _container: HTMLElement;
13
- /**
14
- * Attach the palette to a parent node.
15
- *
16
- * @param {HTMLElement} container
17
- */
18
- attachTo(container: HTMLElement): void;
19
- /**
20
- * Detach the palette from its parent node.
21
- */
22
- detach(): void;
23
- _render(): void;
24
- _destroy(): void;
25
- }
26
- declare namespace PaletteRenderer {
27
- const $inject: string[];
28
- }
29
- export default PaletteRenderer;
30
- export type PaletteConfig = {
31
- parent: Element;
32
- };
33
- export type EventBus = import('../../core/EventBus').default;
@@ -1,37 +0,0 @@
1
- /**
2
- * @typedef { { parent: Element } } PropertiesPanelConfig
3
- * @typedef { import('../../core/EventBus').default } EventBus
4
- * @typedef { import('../../types').Injector } Injector
5
- */
6
- /**
7
- * @param {PropertiesPanelConfig} propertiesPanelConfig
8
- * @param {Injector} injector
9
- * @param {EventBus} eventBus
10
- */
11
- declare class PropertiesPanelRenderer {
12
- constructor(propertiesPanelConfig: any, injector: any, eventBus: any);
13
- _eventBus: any;
14
- _injector: any;
15
- _container: HTMLElement;
16
- /**
17
- * Attach the properties panel to a parent node.
18
- *
19
- * @param {HTMLElement} container
20
- */
21
- attachTo(container: HTMLElement): void;
22
- /**
23
- * Detach the properties panel from its parent node.
24
- */
25
- detach(): void;
26
- _render(): void;
27
- _destroy(): void;
28
- }
29
- declare namespace PropertiesPanelRenderer {
30
- const $inject: string[];
31
- }
32
- export default PropertiesPanelRenderer;
33
- export type PropertiesPanelConfig = {
34
- parent: Element;
35
- };
36
- export type EventBus = import('../../core/EventBus').default;
37
- export type Injector = import('../../types').Injector;
@@ -1,11 +0,0 @@
1
- export default PropertiesPanelContext;
2
- declare const PropertiesPanelContext: import("preact").Context<{
3
- getService: typeof getService;
4
- }>;
5
- /**
6
- * @param {string} type
7
- * @param {boolean} [strict]
8
- *
9
- * @returns {any}
10
- */
11
- declare function getService(type: string, strict?: boolean): any;
@@ -1 +0,0 @@
1
- export { default as FormPropertiesPanelContext } from "./FormPropertiesPanelContext";
@@ -1 +0,0 @@
1
- export default function _default(type: any, strict: any): any;