@bpmn-io/form-js-editor 1.0.0-alpha.6 → 1.0.0-alpha.7

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/index.cjs CHANGED
@@ -515,10 +515,10 @@ function invokeFunction(fn, args) {
515
515
  return fn.apply(null, args);
516
516
  }
517
517
 
518
- /**
519
- * A factory to create a configurable debouncer.
520
- *
521
- * @param {number|boolean} [config=true]
518
+ /**
519
+ * A factory to create a configurable debouncer.
520
+ *
521
+ * @param {number|boolean} [config=true]
522
522
  */
523
523
  function DebounceFactory(config = true) {
524
524
  const timeout = typeof config === 'number' ? config : config ? 300 : 0;
@@ -531,11 +531,11 @@ function DebounceFactory(config = true) {
531
531
  DebounceFactory.$inject = ['config.debounce'];
532
532
 
533
533
  class FieldFactory {
534
- /**
535
- * @constructor
536
- *
537
- * @param { import('./FormFieldRegistry').default } formFieldRegistry
538
- * @param { import('@bpmn-io/form-js-viewer').FormFields } formFields
534
+ /**
535
+ * @constructor
536
+ *
537
+ * @param { import('./FormFieldRegistry').default } formFieldRegistry
538
+ * @param { import('@bpmn-io/form-js-viewer').FormFields } formFields
539
539
  */
540
540
  constructor(formFieldRegistry, formFields) {
541
541
  this._formFieldRegistry = formFieldRegistry;
@@ -598,11 +598,11 @@ class FieldFactory {
598
598
  FieldFactory.$inject = ['formFieldRegistry', 'formFields'];
599
599
 
600
600
  class FormFieldRegistry extends formJsViewer.FormFieldRegistry {
601
- /**
602
- * Updates a form fields id.
603
- *
604
- * @param {Object} formField
605
- * @param {string} newId
601
+ /**
602
+ * Updates a form fields id.
603
+ *
604
+ * @param {Object} formField
605
+ * @param {string} newId
606
606
  */
607
607
  updateId(formField, newId) {
608
608
  this._validateId(newId);
@@ -623,13 +623,13 @@ class FormFieldRegistry extends formJsViewer.FormFieldRegistry {
623
623
  }
624
624
  }
625
625
 
626
- /**
627
- * Validate the suitability of the given id and signals a problem
628
- * with an exception.
629
- *
630
- * @param {string} id
631
- *
632
- * @throws {Error} if id is empty or already assigned
626
+ /**
627
+ * Validate the suitability of the given id and signals a problem
628
+ * with an exception.
629
+ *
630
+ * @param {string} id
631
+ *
632
+ * @throws {Error} if id is empty or already assigned
633
633
  */
634
634
  _validateId(id) {
635
635
  if (!id) {
@@ -646,11 +646,11 @@ const MAX_COLUMNS = 16;
646
646
  const MIN_COLUMNS = 2;
647
647
  const MAX_FIELDS_PER_ROW = 4;
648
648
  class FormLayoutValidator {
649
- /**
650
- * @constructor
651
- *
652
- * @param { import('./FormLayouter').default } formLayouter
653
- * @param { import('./FormFieldRegistry').default } formFieldRegistry
649
+ /**
650
+ * @constructor
651
+ *
652
+ * @param { import('./FormLayouter').default } formLayouter
653
+ * @param { import('./FormFieldRegistry').default } formFieldRegistry
654
654
  */
655
655
  constructor(formLayouter, formFieldRegistry) {
656
656
  this._formLayouter = formLayouter;
@@ -710,11 +710,11 @@ function calculateMaxColumnsWithAuto(autoCols) {
710
710
  }
711
711
 
712
712
  class Importer {
713
- /**
714
- * @constructor
715
- * @param { import('../core/FormFieldRegistry').default } formFieldRegistry
716
- * @param { import('../core/FieldFactory').default } fieldFactory
717
- * @param { import('../core/FormLayouter').default } formLayouter
713
+ /**
714
+ * @constructor
715
+ * @param { import('../core/FormFieldRegistry').default } formFieldRegistry
716
+ * @param { import('../core/FieldFactory').default } fieldFactory
717
+ * @param { import('../core/FormLayouter').default } formLayouter
718
718
  */
719
719
  constructor(formFieldRegistry, fieldFactory, formLayouter) {
720
720
  this._formFieldRegistry = formFieldRegistry;
@@ -722,21 +722,21 @@ class Importer {
722
722
  this._formLayouter = formLayouter;
723
723
  }
724
724
 
725
- /**
726
- * Import schema creating rows, fields, attaching additional
727
- * information to each field and adding fields to the
728
- * field registry.
729
- *
730
- * Additional information attached:
731
- *
732
- * * `id` (unless present)
733
- * * `_parent`
734
- * * `_path`
735
- *
736
- * @param {any} schema
737
- *
738
- * @typedef {{ warnings: Error[], schema: any }} ImportResult
739
- * @returns {ImportResult}
725
+ /**
726
+ * Import schema creating rows, fields, attaching additional
727
+ * information to each field and adding fields to the
728
+ * field registry.
729
+ *
730
+ * Additional information attached:
731
+ *
732
+ * * `id` (unless present)
733
+ * * `_parent`
734
+ * * `_path`
735
+ *
736
+ * @param {any} schema
737
+ *
738
+ * @typedef {{ warnings: Error[], schema: any }} ImportResult
739
+ * @returns {ImportResult}
740
740
  */
741
741
  importSchema(schema) {
742
742
  // TODO: Add warnings
@@ -754,12 +754,12 @@ class Importer {
754
754
  }
755
755
  }
756
756
 
757
- /**
758
- * @param {{[x: string]: any}} fieldAttrs
759
- * @param {String} [parentId]
760
- * @param {number} [index]
761
- *
762
- * @return {any} field
757
+ /**
758
+ * @param {{[x: string]: any}} fieldAttrs
759
+ * @param {String} [parentId]
760
+ * @param {number} [index]
761
+ *
762
+ * @return {any} field
763
763
  */
764
764
  importFormField(fieldAttrs, parentId, index) {
765
765
  const {
@@ -796,11 +796,11 @@ class Importer {
796
796
  return field;
797
797
  }
798
798
 
799
- /**
800
- * @param {Array<any>} components
801
- * @param {string} parentId
802
- *
803
- * @return {Array<any>} imported components
799
+ /**
800
+ * @param {Array<any>} components
801
+ * @param {string} parentId
802
+ *
803
+ * @return {Array<any>} imported components
804
804
  */
805
805
  importFormFields(components, parentId) {
806
806
  return components.map((component, index) => {
@@ -825,22 +825,22 @@ function editorFormFieldClasses(type, {
825
825
  });
826
826
  }
827
827
 
828
- /**
829
- * Add a dragger that calls back the passed function with
830
- * { event, delta } on drag.
831
- *
832
- * @example
833
- *
834
- * function dragMove(event, delta) {
835
- * // we are dragging (!!)
836
- * }
837
- *
838
- * domElement.addEventListener('dragstart', dragger(dragMove));
839
- *
840
- * @param {Function} fn
841
- * @param {Element} dragPreview
842
- *
843
- * @return {Function} drag start callback function
828
+ /**
829
+ * Add a dragger that calls back the passed function with
830
+ * { event, delta } on drag.
831
+ *
832
+ * @example
833
+ *
834
+ * function dragMove(event, delta) {
835
+ * // we are dragging (!!)
836
+ * }
837
+ *
838
+ * domElement.addEventListener('dragstart', dragger(dragMove));
839
+ *
840
+ * @param {Function} fn
841
+ * @param {Element} dragPreview
842
+ *
843
+ * @return {Function} drag start callback function
844
844
  */
845
845
  function createDragger(fn, dragPreview) {
846
846
  let self;
@@ -881,12 +881,12 @@ function createDragger(fn, dragPreview) {
881
881
  return onDragStart;
882
882
  }
883
883
 
884
- /**
885
- * Throttle function call according UI update cycle.
886
- *
887
- * @param {Function} fn
888
- *
889
- * @return {Function} throttled fn
884
+ /**
885
+ * Throttle function call according UI update cycle.
886
+ *
887
+ * @param {Function} fn
888
+ *
889
+ * @return {Function} throttled fn
890
890
  */
891
891
  function throttle(fn) {
892
892
  let active = false;
@@ -915,11 +915,11 @@ const DragAndDropContext = preact.createContext({
915
915
  });
916
916
  var DragAndDropContext$1 = DragAndDropContext;
917
917
 
918
- /**
919
- * @param {string} type
920
- * @param {boolean} [strict]
921
- *
922
- * @returns {any}
918
+ /**
919
+ * @param {string} type
920
+ * @param {boolean} [strict]
921
+ *
922
+ * @returns {any}
923
923
  */
924
924
  function getService(type, strict) {}
925
925
  const FormEditorContext = preact.createContext({
@@ -1206,23 +1206,23 @@ var Slot = (props => {
1206
1206
  return fillsAndSeparators;
1207
1207
  });
1208
1208
 
1209
- /**
1210
- * Creates a Fragment for a fill.
1211
- *
1212
- * @param {Object} fill Fill to be rendered
1213
- * @returns {Object} Preact Fragment containing fill's children
1209
+ /**
1210
+ * Creates a Fragment for a fill.
1211
+ *
1212
+ * @param {Object} fill Fill to be rendered
1213
+ * @returns {Object} Preact Fragment containing fill's children
1214
1214
  */
1215
1215
  const FillFragment = fill => jsxRuntime.jsx(preact.Fragment, {
1216
1216
  children: fill.children
1217
1217
  }, fill.id);
1218
1218
 
1219
- /**
1220
- * Creates an array of fills, with separators inserted between groups.
1221
- *
1222
- * @param {Array} groups Groups of fills
1223
- * @param {Function} fillRenderer Function to create a fill
1224
- * @param {Function} separatorRenderer Function to create a separator
1225
- * @returns {Array} Array of fills and separators
1219
+ /**
1220
+ * Creates an array of fills, with separators inserted between groups.
1221
+ *
1222
+ * @param {Array} groups Groups of fills
1223
+ * @param {Function} fillRenderer Function to create a fill
1224
+ * @param {Function} separatorRenderer Function to create a separator
1225
+ * @returns {Array} Array of fills and separators
1226
1226
  */
1227
1227
  const buildFills = (groups, fillRenderer, separatorRenderer) => {
1228
1228
  const result = [];
@@ -1240,8 +1240,8 @@ const buildFills = (groups, fillRenderer, separatorRenderer) => {
1240
1240
  return result;
1241
1241
  };
1242
1242
 
1243
- /**
1244
- * Groups fills by group name property.
1243
+ /**
1244
+ * Groups fills by group name property.
1245
1245
  */
1246
1246
  const _groupByGroupName = fills => {
1247
1247
  const groups = [];
@@ -1261,8 +1261,8 @@ const _groupByGroupName = fills => {
1261
1261
  return Object.keys(groupsById).sort().map(id => groupsById[id]);
1262
1262
  };
1263
1263
 
1264
- /**
1265
- * Compares fills by priority.
1264
+ /**
1265
+ * Compares fills by priority.
1266
1266
  */
1267
1267
  const _comparePriority = (a, b) => {
1268
1268
  return (b.priority || 0) - (a.priority || 0);
@@ -4015,10 +4015,10 @@ function prefixId(id) {
4015
4015
  return `bio-properties-panel-${id}`;
4016
4016
  }
4017
4017
 
4018
- /**
4019
- * Retrieve list of variables from the form schema.
4020
- *
4021
- * @returns { string[] } list of variables used in form schema
4018
+ /**
4019
+ * Retrieve list of variables from the form schema.
4020
+ *
4021
+ * @returns { string[] } list of variables used in form schema
4022
4022
  */
4023
4023
  function useVariables() {
4024
4024
  const form = useService('formEditor');
@@ -4107,8 +4107,8 @@ const PropertiesPanelHeaderProvider = {
4107
4107
  }
4108
4108
  };
4109
4109
 
4110
- /**
4111
- * Provide placeholders for empty and multiple state.
4110
+ /**
4111
+ * Provide placeholders for empty and multiple state.
4112
4112
  */
4113
4113
  const PropertiesPanelPlaceholderProvider = {
4114
4114
  getEmpty: () => {
@@ -5615,14 +5615,14 @@ function Value(props) {
5615
5615
 
5616
5616
  // helpers //////////
5617
5617
 
5618
- /**
5619
- * Returns copy of object with updated value.
5620
- *
5621
- * @param {Object} properties
5622
- * @param {string} key
5623
- * @param {string} value
5624
- *
5625
- * @returns {Object}
5618
+ /**
5619
+ * Returns copy of object with updated value.
5620
+ *
5621
+ * @param {Object} properties
5622
+ * @param {string} key
5623
+ * @param {string} value
5624
+ *
5625
+ * @returns {Object}
5626
5626
  */
5627
5627
  function updateValue(properties, key, value) {
5628
5628
  return {
@@ -5631,14 +5631,14 @@ function updateValue(properties, key, value) {
5631
5631
  };
5632
5632
  }
5633
5633
 
5634
- /**
5635
- * Returns copy of object with updated key.
5636
- *
5637
- * @param {Object} properties
5638
- * @param {string} oldKey
5639
- * @param {string} newKey
5640
- *
5641
- * @returns {Object}
5634
+ /**
5635
+ * Returns copy of object with updated key.
5636
+ *
5637
+ * @param {Object} properties
5638
+ * @param {string} oldKey
5639
+ * @param {string} newKey
5640
+ *
5641
+ * @returns {Object}
5642
5642
  */
5643
5643
  function updateKey(properties, oldKey, newKey) {
5644
5644
  return Object.entries(properties).reduce((newProperties, entry) => {
@@ -6332,8 +6332,8 @@ function ValuesGroups(field, editField) {
6332
6332
  };
6333
6333
  const valuesSourceId = `${fieldId}-valuesSource`;
6334
6334
 
6335
- /**
6336
- * @type {Array<Group|ListGroup>}
6335
+ /**
6336
+ * @type {Array<Group|ListGroup>}
6337
6337
  */
6338
6338
  const groups = [{
6339
6339
  id: valuesSourceId,
@@ -6435,13 +6435,13 @@ function CustomValuesGroup(field, editField) {
6435
6435
 
6436
6436
  // helpers //////////
6437
6437
 
6438
- /**
6439
- * Returns copy of object without key.
6440
- *
6441
- * @param {Object} properties
6442
- * @param {string} oldKey
6443
- *
6444
- * @returns {Object}
6438
+ /**
6439
+ * Returns copy of object without key.
6440
+ *
6441
+ * @param {Object} properties
6442
+ * @param {string} oldKey
6443
+ *
6444
+ * @returns {Object}
6445
6445
  */
6446
6446
  function removeKey(properties, oldKey) {
6447
6447
  return Object.entries(properties).reduce((newProperties, entry) => {
@@ -6553,9 +6553,9 @@ function FormPropertiesPanel() {
6553
6553
  }, []);
6554
6554
  hooks.useLayoutEffect(() => {
6555
6555
  const onFieldChanged = () => {
6556
- /**
6557
- * TODO(pinussilvestrus): update with actual updated element,
6558
- * once we have a proper updater/change support
6556
+ /**
6557
+ * TODO(pinussilvestrus): update with actual updated element,
6558
+ * once we have a proper updater/change support
6559
6559
  */
6560
6560
  _update(selection.get() || schema);
6561
6561
  };
@@ -6626,19 +6626,19 @@ const DRAG_NO_DROP_CLS = 'fjs-no-drop';
6626
6626
  const DRAG_NO_MOVE_CLS = 'fjs-no-move';
6627
6627
  const ERROR_DROP_CLS = 'fjs-error-drop';
6628
6628
 
6629
- /**
6630
- * @typedef { { id: String, components: Array<any> } } FormRow
6629
+ /**
6630
+ * @typedef { { id: String, components: Array<any> } } FormRow
6631
6631
  */
6632
6632
 
6633
6633
  class Dragging {
6634
- /**
6635
- * @constructor
6636
- *
6637
- * @param { import('../../core/FormFieldRegistry').default } formFieldRegistry
6638
- * @param { import('../../core/FormLayouter').default } formLayouter
6639
- * @param { import('../../core/FormLayoutValidator').default } formLayoutValidator
6640
- * @param { import('../../core/EventBus').default } eventBus
6641
- * @param { import('../modeling/Modeling').default } modeling
6634
+ /**
6635
+ * @constructor
6636
+ *
6637
+ * @param { import('../../core/FormFieldRegistry').default } formFieldRegistry
6638
+ * @param { import('../../core/FormLayouter').default } formLayouter
6639
+ * @param { import('../../core/FormLayoutValidator').default } formLayoutValidator
6640
+ * @param { import('../../core/EventBus').default } eventBus
6641
+ * @param { import('../modeling/Modeling').default } modeling
6642
6642
  */
6643
6643
  constructor(formFieldRegistry, formLayouter, formLayoutValidator, eventBus, modeling) {
6644
6644
  this._formFieldRegistry = formFieldRegistry;
@@ -6648,13 +6648,13 @@ class Dragging {
6648
6648
  this._modeling = modeling;
6649
6649
  }
6650
6650
 
6651
- /**
6652
- * Calculcates position in form schema given the dropped place.
6653
- *
6654
- * @param { FormRow } targetRow
6655
- * @param { any } targetFormField
6656
- * @param { HTMLElement } sibling
6657
- * @returns { number }
6651
+ /**
6652
+ * Calculcates position in form schema given the dropped place.
6653
+ *
6654
+ * @param { FormRow } targetRow
6655
+ * @param { any } targetFormField
6656
+ * @param { HTMLElement } sibling
6657
+ * @returns { number }
6658
6658
  */
6659
6659
  getTargetIndex(targetRow, targetFormField, sibling) {
6660
6660
  /** @type HTMLElement */
@@ -6756,8 +6756,8 @@ class Dragging {
6756
6756
  }
6757
6757
  }
6758
6758
 
6759
- /**
6760
- * @param { { container: Array<string>, direction: string, mirrorContainer: string } } options
6759
+ /**
6760
+ * @param { { container: Array<string>, direction: string, mirrorContainer: string } } options
6761
6761
  */
6762
6762
  createDragulaInstance(options) {
6763
6763
  const {
@@ -7154,7 +7154,7 @@ function DebugColumns(props) {
7154
7154
  return null;
7155
7155
  }
7156
7156
  return jsxRuntime.jsx("div", {
7157
- style: "width: fit-content; padding: 2px 6px; height: 16px; background: var(--color-blue-205-100-95); display: flex; justify-content: center; align-items: center; position: absolute; bottom: -2px; z-index: 2; font-size: 10px; right: 3px;",
7157
+ style: "width: fit-content;\r padding: 2px 6px;\r height: 16px;\r background: var(--color-blue-205-100-95);\r display: flex;\r justify-content: center;\r align-items: center;\r position: absolute;\r bottom: -2px;\r z-index: 2;\r font-size: 10px;\r right: 3px;",
7158
7158
  class: "fjs-debug-columns",
7159
7159
  children: (field.layout || {}).columns || 'auto'
7160
7160
  });
@@ -8200,10 +8200,10 @@ function updateRow(formField, rowId) {
8200
8200
  }
8201
8201
 
8202
8202
  class AddFormFieldHandler {
8203
- /**
8204
- * @constructor
8205
- * @param { import('../../../FormEditor').default } formEditor
8206
- * @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
8203
+ /**
8204
+ * @constructor
8205
+ * @param { import('../../../FormEditor').default } formEditor
8206
+ * @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
8207
8207
  */
8208
8208
  constructor(formEditor, formFieldRegistry) {
8209
8209
  this._formEditor = formEditor;
@@ -8264,10 +8264,10 @@ class AddFormFieldHandler {
8264
8264
  AddFormFieldHandler.$inject = ['formEditor', 'formFieldRegistry'];
8265
8265
 
8266
8266
  class EditFormFieldHandler {
8267
- /**
8268
- * @constructor
8269
- * @param { import('../../../FormEditor').default } formEditor
8270
- * @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
8267
+ /**
8268
+ * @constructor
8269
+ * @param { import('../../../FormEditor').default } formEditor
8270
+ * @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
8271
8271
  */
8272
8272
  constructor(formEditor, formFieldRegistry) {
8273
8273
  this._formEditor = formEditor;
@@ -8330,10 +8330,10 @@ class EditFormFieldHandler {
8330
8330
  EditFormFieldHandler.$inject = ['formEditor', 'formFieldRegistry'];
8331
8331
 
8332
8332
  class MoveFormFieldHandler {
8333
- /**
8334
- * @constructor
8335
- * @param { import('../../../FormEditor').default } formEditor
8336
- * @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
8333
+ /**
8334
+ * @constructor
8335
+ * @param { import('../../../FormEditor').default } formEditor
8336
+ * @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
8337
8337
  */
8338
8338
  constructor(formEditor, formFieldRegistry) {
8339
8339
  this._formEditor = formEditor;
@@ -8422,10 +8422,10 @@ class MoveFormFieldHandler {
8422
8422
  MoveFormFieldHandler.$inject = ['formEditor', 'formFieldRegistry'];
8423
8423
 
8424
8424
  class RemoveFormFieldHandler {
8425
- /**
8426
- * @constructor
8427
- * @param { import('../../../FormEditor').default } formEditor
8428
- * @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
8425
+ /**
8426
+ * @constructor
8427
+ * @param { import('../../../FormEditor').default } formEditor
8428
+ * @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
8429
8429
  */
8430
8430
  constructor(formEditor, formFieldRegistry) {
8431
8431
  this._formEditor = formEditor;
@@ -8485,9 +8485,9 @@ class RemoveFormFieldHandler {
8485
8485
  RemoveFormFieldHandler.$inject = ['formEditor', 'formFieldRegistry'];
8486
8486
 
8487
8487
  class UpdateIdClaimHandler {
8488
- /**
8489
- * @constructor
8490
- * @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
8488
+ /**
8489
+ * @constructor
8490
+ * @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
8491
8491
  */
8492
8492
  constructor(formFieldRegistry) {
8493
8493
  this._formFieldRegistry = formFieldRegistry;
@@ -8520,9 +8520,9 @@ class UpdateIdClaimHandler {
8520
8520
  UpdateIdClaimHandler.$inject = ['formFieldRegistry'];
8521
8521
 
8522
8522
  class UpdateKeyClaimHandler {
8523
- /**
8524
- * @constructor
8525
- * @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
8523
+ /**
8524
+ * @constructor
8525
+ * @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
8526
8526
  */
8527
8527
  constructor(formFieldRegistry) {
8528
8528
  this._formFieldRegistry = formFieldRegistry;
@@ -8988,8 +8988,8 @@ class ValidateBehavior extends CommandInterceptor {
8988
8988
  constructor(eventBus) {
8989
8989
  super(eventBus);
8990
8990
 
8991
- /**
8992
- * Remove custom validation if <validationType> is about to be added.
8991
+ /**
8992
+ * Remove custom validation if <validationType> is about to be added.
8993
8993
  */
8994
8994
  // @ts-ignore-next-line
8995
8995
  this.preExecute('formField.edit', function (context) {
@@ -9569,22 +9569,22 @@ var SelectionModule = {
9569
9569
  selectionBehavior: ['type', SelectionBehavior]
9570
9570
  };
9571
9571
 
9572
- /**
9573
- * Base class for sectionable UI modules.
9574
- *
9575
- * @property {EventBus} _eventBus - EventBus instance used for event handling.
9576
- * @property {string} managerType - Type of the render manager. Used to form event names.
9577
- *
9578
- * @class SectionModuleBase
9572
+ /**
9573
+ * Base class for sectionable UI modules.
9574
+ *
9575
+ * @property {EventBus} _eventBus - EventBus instance used for event handling.
9576
+ * @property {string} managerType - Type of the render manager. Used to form event names.
9577
+ *
9578
+ * @class SectionModuleBase
9579
9579
  */
9580
9580
  class SectionModuleBase {
9581
- /**
9582
- * Create a SectionModuleBase instance.
9583
- *
9584
- * @param {any} eventBus - The EventBus instance used for event handling.
9585
- * @param {string} sectionKey - The type of render manager. Used to form event names.
9586
- *
9587
- * @constructor
9581
+ /**
9582
+ * Create a SectionModuleBase instance.
9583
+ *
9584
+ * @param {any} eventBus - The EventBus instance used for event handling.
9585
+ * @param {string} sectionKey - The type of render manager. Used to form event names.
9586
+ *
9587
+ * @constructor
9588
9588
  */
9589
9589
  constructor(eventBus, sectionKey) {
9590
9590
  this._eventBus = eventBus;
@@ -9597,10 +9597,10 @@ class SectionModuleBase {
9597
9597
  });
9598
9598
  }
9599
9599
 
9600
- /**
9601
- * Attach the managed section to a parent node.
9602
- *
9603
- * @param {HTMLElement} container - The parent node to attach to.
9600
+ /**
9601
+ * Attach the managed section to a parent node.
9602
+ *
9603
+ * @param {HTMLElement} container - The parent node to attach to.
9604
9604
  */
9605
9605
  attachTo(container) {
9606
9606
  this._onceSectionRendered(() => this._eventBus.fire(`${this._sectionKey}.attach`, {
@@ -9608,22 +9608,22 @@ class SectionModuleBase {
9608
9608
  }));
9609
9609
  }
9610
9610
 
9611
- /**
9612
- * Detach the managed section from its parent node.
9611
+ /**
9612
+ * Detach the managed section from its parent node.
9613
9613
  */
9614
9614
  detach() {
9615
9615
  this._onceSectionRendered(() => this._eventBus.fire(`${this._sectionKey}.detach`));
9616
9616
  }
9617
9617
 
9618
- /**
9619
- * Reset the managed section to its initial state.
9618
+ /**
9619
+ * Reset the managed section to its initial state.
9620
9620
  */
9621
9621
  reset() {
9622
9622
  this._onceSectionRendered(() => this._eventBus.fire(`${this._sectionKey}.reset`));
9623
9623
  }
9624
9624
 
9625
- /**
9626
- * Circumvents timing issues.
9625
+ /**
9626
+ * Circumvents timing issues.
9627
9627
  */
9628
9628
  _onceSectionRendered(callback) {
9629
9629
  if (this.isSectionRendered) {
@@ -9657,10 +9657,10 @@ var PropertiesPanelModule = {
9657
9657
  propertiesPanel: ['type', PropertiesPanelModule$1]
9658
9658
  };
9659
9659
 
9660
- /**
9661
- * Manages the rendering of visual plugins.
9662
- * @constructor
9663
- * @param {Object} eventBus - Event bus for the application.
9660
+ /**
9661
+ * Manages the rendering of visual plugins.
9662
+ * @constructor
9663
+ * @param {Object} eventBus - Event bus for the application.
9664
9664
  */
9665
9665
  class RenderInjector extends SectionModuleBase {
9666
9666
  constructor(eventBus) {
@@ -9669,10 +9669,10 @@ class RenderInjector extends SectionModuleBase {
9669
9669
  this.registeredRenderers = [];
9670
9670
  }
9671
9671
 
9672
- /**
9673
- * Inject a new renderer into the injector.
9674
- * @param {string} identifier - Identifier for the renderer.
9675
- * @param {Function} Renderer - The renderer function.
9672
+ /**
9673
+ * Inject a new renderer into the injector.
9674
+ * @param {string} identifier - Identifier for the renderer.
9675
+ * @param {Function} Renderer - The renderer function.
9676
9676
  */
9677
9677
  attachRenderer(identifier, Renderer) {
9678
9678
  this.registeredRenderers = [...this.registeredRenderers, {
@@ -9681,17 +9681,17 @@ class RenderInjector extends SectionModuleBase {
9681
9681
  }];
9682
9682
  }
9683
9683
 
9684
- /**
9685
- * Detach a renderer from the by key injector.
9686
- * @param {string} identifier - Identifier for the renderer.
9684
+ /**
9685
+ * Detach a renderer from the by key injector.
9686
+ * @param {string} identifier - Identifier for the renderer.
9687
9687
  */
9688
9688
  detachRenderer(identifier) {
9689
9689
  this.registeredRenderers = this.registeredRenderers.filter(r => r.identifier !== identifier);
9690
9690
  }
9691
9691
 
9692
- /**
9693
- * Returns the registered renderers.
9694
- * @returns {Array} Array of registered renderers.
9692
+ /**
9693
+ * Returns the registered renderers.
9694
+ * @returns {Array} Array of registered renderers.
9695
9695
  */
9696
9696
  fetchRenderers() {
9697
9697
  return this.registeredRenderers;
@@ -9725,48 +9725,48 @@ var ExpressionLanguageModule = {
9725
9725
 
9726
9726
  const ids = new Ids([32, 36, 1]);
9727
9727
 
9728
- /**
9729
- * @typedef { import('./types').Injector } Injector
9730
- * @typedef { import('./types').Module } Module
9731
- * @typedef { import('./types').Schema } Schema
9732
- *
9733
- * @typedef { import('./types').FormEditorOptions } FormEditorOptions
9734
- * @typedef { import('./types').FormEditorProperties } FormEditorProperties
9735
- *
9736
- * @typedef { {
9737
- * properties: FormEditorProperties,
9738
- * schema: Schema
9739
- * } } State
9740
- *
9741
- * @typedef { (type:string, priority:number, handler:Function) => void } OnEventWithPriority
9742
- * @typedef { (type:string, handler:Function) => void } OnEventWithOutPriority
9743
- * @typedef { OnEventWithPriority & OnEventWithOutPriority } OnEventType
9728
+ /**
9729
+ * @typedef { import('./types').Injector } Injector
9730
+ * @typedef { import('./types').Module } Module
9731
+ * @typedef { import('./types').Schema } Schema
9732
+ *
9733
+ * @typedef { import('./types').FormEditorOptions } FormEditorOptions
9734
+ * @typedef { import('./types').FormEditorProperties } FormEditorProperties
9735
+ *
9736
+ * @typedef { {
9737
+ * properties: FormEditorProperties,
9738
+ * schema: Schema
9739
+ * } } State
9740
+ *
9741
+ * @typedef { (type:string, priority:number, handler:Function) => void } OnEventWithPriority
9742
+ * @typedef { (type:string, handler:Function) => void } OnEventWithOutPriority
9743
+ * @typedef { OnEventWithPriority & OnEventWithOutPriority } OnEventType
9744
9744
  */
9745
9745
 
9746
- /**
9747
- * The form editor.
9746
+ /**
9747
+ * The form editor.
9748
9748
  */
9749
9749
  class FormEditor {
9750
- /**
9751
- * @constructor
9752
- * @param {FormEditorOptions} options
9750
+ /**
9751
+ * @constructor
9752
+ * @param {FormEditorOptions} options
9753
9753
  */
9754
9754
  constructor(options = {}) {
9755
- /**
9756
- * @public
9757
- * @type {OnEventType}
9755
+ /**
9756
+ * @public
9757
+ * @type {OnEventType}
9758
9758
  */
9759
9759
  this.on = this._onEvent;
9760
9760
 
9761
- /**
9762
- * @public
9763
- * @type {String}
9761
+ /**
9762
+ * @public
9763
+ * @type {String}
9764
9764
  */
9765
9765
  this._id = ids.next();
9766
9766
 
9767
- /**
9768
- * @private
9769
- * @type {Element}
9767
+ /**
9768
+ * @private
9769
+ * @type {Element}
9770
9770
  */
9771
9771
  this._container = formJsViewer.createFormContainer();
9772
9772
  this._container.setAttribute('input-handle-modified-keys', 'z,y');
@@ -9777,15 +9777,15 @@ class FormEditor {
9777
9777
  properties = {}
9778
9778
  } = options;
9779
9779
 
9780
- /**
9781
- * @private
9782
- * @type {any}
9780
+ /**
9781
+ * @private
9782
+ * @type {any}
9783
9783
  */
9784
9784
  this.exporter = exporter;
9785
9785
 
9786
- /**
9787
- * @private
9788
- * @type {State}
9786
+ /**
9787
+ * @private
9788
+ * @type {State}
9789
9789
  */
9790
9790
  this._state = {
9791
9791
  properties,
@@ -9814,10 +9814,10 @@ class FormEditor {
9814
9814
  this._detach(false);
9815
9815
  }
9816
9816
 
9817
- /**
9818
- * @param {Schema} schema
9819
- *
9820
- * @return {Promise<{ warnings: Array<any> }>}
9817
+ /**
9818
+ * @param {Schema} schema
9819
+ *
9820
+ * @return {Promise<{ warnings: Array<any> }>}
9821
9821
  */
9822
9822
  importSchema(schema) {
9823
9823
  return new Promise((resolve, reject) => {
@@ -9846,15 +9846,15 @@ class FormEditor {
9846
9846
  });
9847
9847
  }
9848
9848
 
9849
- /**
9850
- * @returns {Schema}
9849
+ /**
9850
+ * @returns {Schema}
9851
9851
  */
9852
9852
  saveSchema() {
9853
9853
  return this.getSchema();
9854
9854
  }
9855
9855
 
9856
- /**
9857
- * @returns {Schema}
9856
+ /**
9857
+ * @returns {Schema}
9858
9858
  */
9859
9859
  getSchema() {
9860
9860
  const {
@@ -9863,8 +9863,8 @@ class FormEditor {
9863
9863
  return exportSchema(schema, this.exporter, formJsViewer.schemaVersion);
9864
9864
  }
9865
9865
 
9866
- /**
9867
- * @param {Element|string} parentNode
9866
+ /**
9867
+ * @param {Element|string} parentNode
9868
9868
  */
9869
9869
  attachTo(parentNode) {
9870
9870
  if (!parentNode) {
@@ -9882,10 +9882,10 @@ class FormEditor {
9882
9882
  this._detach();
9883
9883
  }
9884
9884
 
9885
- /**
9886
- * @internal
9887
- *
9888
- * @param {boolean} [emit]
9885
+ /**
9886
+ * @internal
9887
+ *
9888
+ * @param {boolean} [emit]
9889
9889
  */
9890
9890
  _detach(emit = true) {
9891
9891
  const container = this._container,
@@ -9899,9 +9899,9 @@ class FormEditor {
9899
9899
  parentNode.removeChild(container);
9900
9900
  }
9901
9901
 
9902
- /**
9903
- * @param {any} property
9904
- * @param {any} value
9902
+ /**
9903
+ * @param {any} property
9904
+ * @param {any} value
9905
9905
  */
9906
9906
  setProperty(property, value) {
9907
9907
  const properties = minDash.set(this._getState().properties, [property], value);
@@ -9910,21 +9910,21 @@ class FormEditor {
9910
9910
  });
9911
9911
  }
9912
9912
 
9913
- /**
9914
- * @param {string} type
9915
- * @param {Function} handler
9913
+ /**
9914
+ * @param {string} type
9915
+ * @param {Function} handler
9916
9916
  */
9917
9917
  off(type, handler) {
9918
9918
  this.get('eventBus').off(type, handler);
9919
9919
  }
9920
9920
 
9921
- /**
9922
- * @internal
9923
- *
9924
- * @param {FormEditorOptions} options
9925
- * @param {Element} container
9926
- *
9927
- * @returns {Injector}
9921
+ /**
9922
+ * @internal
9923
+ *
9924
+ * @param {FormEditorOptions} options
9925
+ * @param {Element} container
9926
+ *
9927
+ * @returns {Injector}
9928
9928
  */
9929
9929
  _createInjector(options, container) {
9930
9930
  const {
@@ -9946,22 +9946,22 @@ class FormEditor {
9946
9946
  }, core, ...modules, ...additionalModules]);
9947
9947
  }
9948
9948
 
9949
- /**
9950
- * @internal
9949
+ /**
9950
+ * @internal
9951
9951
  */
9952
9952
  _emit(type, data) {
9953
9953
  this.get('eventBus').fire(type, data);
9954
9954
  }
9955
9955
 
9956
- /**
9957
- * @internal
9956
+ /**
9957
+ * @internal
9958
9958
  */
9959
9959
  _getState() {
9960
9960
  return this._state;
9961
9961
  }
9962
9962
 
9963
- /**
9964
- * @internal
9963
+ /**
9964
+ * @internal
9965
9965
  */
9966
9966
  _setState(state) {
9967
9967
  this._state = {
@@ -9971,15 +9971,15 @@ class FormEditor {
9971
9971
  this._emit('changed', this._getState());
9972
9972
  }
9973
9973
 
9974
- /**
9975
- * @internal
9974
+ /**
9975
+ * @internal
9976
9976
  */
9977
9977
  _getModules() {
9978
9978
  return [ModelingModule, EditorActionsModule, DraggingModule, KeyboardModule, SelectionModule, PaletteModule, ExpressionLanguageModule, formJsViewer.MarkdownModule, PropertiesPanelModule, RenderInjectionModule];
9979
9979
  }
9980
9980
 
9981
- /**
9982
- * @internal
9981
+ /**
9982
+ * @internal
9983
9983
  */
9984
9984
  _onEvent(type, priority, handler) {
9985
9985
  this.get('eventBus').on(type, priority, handler);