@bpmn-io/form-js-editor 1.0.0-alpha.2 → 1.0.0-alpha.4
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 +116 -116
- package/dist/assets/form-js-editor-base.css +734 -734
- package/dist/index.cjs +311 -292
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +311 -292
- package/dist/index.es.js.map +1 -1
- package/dist/types/features/SectionModuleBase.d.ts +6 -1
- package/dist/types/types.d.ts +28 -28
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -514,10 +514,10 @@ function invokeFunction(fn, args) {
|
|
|
514
514
|
return fn.apply(null, args);
|
|
515
515
|
}
|
|
516
516
|
|
|
517
|
-
/**
|
|
518
|
-
* A factory to create a configurable debouncer.
|
|
519
|
-
*
|
|
520
|
-
* @param {number|boolean} [config=true]
|
|
517
|
+
/**
|
|
518
|
+
* A factory to create a configurable debouncer.
|
|
519
|
+
*
|
|
520
|
+
* @param {number|boolean} [config=true]
|
|
521
521
|
*/
|
|
522
522
|
function DebounceFactory(config = true) {
|
|
523
523
|
const timeout = typeof config === 'number' ? config : config ? 300 : 0;
|
|
@@ -530,11 +530,11 @@ function DebounceFactory(config = true) {
|
|
|
530
530
|
DebounceFactory.$inject = ['config.debounce'];
|
|
531
531
|
|
|
532
532
|
class FieldFactory {
|
|
533
|
-
/**
|
|
534
|
-
* @constructor
|
|
535
|
-
*
|
|
536
|
-
* @param { import('./FormFieldRegistry').default } formFieldRegistry
|
|
537
|
-
* @param { import('@bpmn-io/form-js-viewer').FormFields } formFields
|
|
533
|
+
/**
|
|
534
|
+
* @constructor
|
|
535
|
+
*
|
|
536
|
+
* @param { import('./FormFieldRegistry').default } formFieldRegistry
|
|
537
|
+
* @param { import('@bpmn-io/form-js-viewer').FormFields } formFields
|
|
538
538
|
*/
|
|
539
539
|
constructor(formFieldRegistry, formFields) {
|
|
540
540
|
this._formFieldRegistry = formFieldRegistry;
|
|
@@ -597,11 +597,11 @@ class FieldFactory {
|
|
|
597
597
|
FieldFactory.$inject = ['formFieldRegistry', 'formFields'];
|
|
598
598
|
|
|
599
599
|
class FormFieldRegistry extends FormFieldRegistry$1 {
|
|
600
|
-
/**
|
|
601
|
-
* Updates a form fields id.
|
|
602
|
-
*
|
|
603
|
-
* @param {Object} formField
|
|
604
|
-
* @param {string} newId
|
|
600
|
+
/**
|
|
601
|
+
* Updates a form fields id.
|
|
602
|
+
*
|
|
603
|
+
* @param {Object} formField
|
|
604
|
+
* @param {string} newId
|
|
605
605
|
*/
|
|
606
606
|
updateId(formField, newId) {
|
|
607
607
|
this._validateId(newId);
|
|
@@ -622,13 +622,13 @@ class FormFieldRegistry extends FormFieldRegistry$1 {
|
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
624
|
|
|
625
|
-
/**
|
|
626
|
-
* Validate the suitability of the given id and signals a problem
|
|
627
|
-
* with an exception.
|
|
628
|
-
*
|
|
629
|
-
* @param {string} id
|
|
630
|
-
*
|
|
631
|
-
* @throws {Error} if id is empty or already assigned
|
|
625
|
+
/**
|
|
626
|
+
* Validate the suitability of the given id and signals a problem
|
|
627
|
+
* with an exception.
|
|
628
|
+
*
|
|
629
|
+
* @param {string} id
|
|
630
|
+
*
|
|
631
|
+
* @throws {Error} if id is empty or already assigned
|
|
632
632
|
*/
|
|
633
633
|
_validateId(id) {
|
|
634
634
|
if (!id) {
|
|
@@ -645,11 +645,11 @@ const MAX_COLUMNS = 16;
|
|
|
645
645
|
const MIN_COLUMNS = 2;
|
|
646
646
|
const MAX_FIELDS_PER_ROW = 4;
|
|
647
647
|
class FormLayoutValidator {
|
|
648
|
-
/**
|
|
649
|
-
* @constructor
|
|
650
|
-
*
|
|
651
|
-
* @param { import('./FormLayouter').default } formLayouter
|
|
652
|
-
* @param { import('./FormFieldRegistry').default } formFieldRegistry
|
|
648
|
+
/**
|
|
649
|
+
* @constructor
|
|
650
|
+
*
|
|
651
|
+
* @param { import('./FormLayouter').default } formLayouter
|
|
652
|
+
* @param { import('./FormFieldRegistry').default } formFieldRegistry
|
|
653
653
|
*/
|
|
654
654
|
constructor(formLayouter, formFieldRegistry) {
|
|
655
655
|
this._formLayouter = formLayouter;
|
|
@@ -709,11 +709,11 @@ function calculateMaxColumnsWithAuto(autoCols) {
|
|
|
709
709
|
}
|
|
710
710
|
|
|
711
711
|
class Importer {
|
|
712
|
-
/**
|
|
713
|
-
* @constructor
|
|
714
|
-
* @param { import('../core/FormFieldRegistry').default } formFieldRegistry
|
|
715
|
-
* @param { import('../core/FieldFactory').default } fieldFactory
|
|
716
|
-
* @param { import('../core/FormLayouter').default } formLayouter
|
|
712
|
+
/**
|
|
713
|
+
* @constructor
|
|
714
|
+
* @param { import('../core/FormFieldRegistry').default } formFieldRegistry
|
|
715
|
+
* @param { import('../core/FieldFactory').default } fieldFactory
|
|
716
|
+
* @param { import('../core/FormLayouter').default } formLayouter
|
|
717
717
|
*/
|
|
718
718
|
constructor(formFieldRegistry, fieldFactory, formLayouter) {
|
|
719
719
|
this._formFieldRegistry = formFieldRegistry;
|
|
@@ -721,21 +721,21 @@ class Importer {
|
|
|
721
721
|
this._formLayouter = formLayouter;
|
|
722
722
|
}
|
|
723
723
|
|
|
724
|
-
/**
|
|
725
|
-
* Import schema creating rows, fields, attaching additional
|
|
726
|
-
* information to each field and adding fields to the
|
|
727
|
-
* field registry.
|
|
728
|
-
*
|
|
729
|
-
* Additional information attached:
|
|
730
|
-
*
|
|
731
|
-
* * `id` (unless present)
|
|
732
|
-
* * `_parent`
|
|
733
|
-
* * `_path`
|
|
734
|
-
*
|
|
735
|
-
* @param {any} schema
|
|
736
|
-
*
|
|
737
|
-
* @typedef {{ warnings: Error[], schema: any }} ImportResult
|
|
738
|
-
* @returns {ImportResult}
|
|
724
|
+
/**
|
|
725
|
+
* Import schema creating rows, fields, attaching additional
|
|
726
|
+
* information to each field and adding fields to the
|
|
727
|
+
* field registry.
|
|
728
|
+
*
|
|
729
|
+
* Additional information attached:
|
|
730
|
+
*
|
|
731
|
+
* * `id` (unless present)
|
|
732
|
+
* * `_parent`
|
|
733
|
+
* * `_path`
|
|
734
|
+
*
|
|
735
|
+
* @param {any} schema
|
|
736
|
+
*
|
|
737
|
+
* @typedef {{ warnings: Error[], schema: any }} ImportResult
|
|
738
|
+
* @returns {ImportResult}
|
|
739
739
|
*/
|
|
740
740
|
importSchema(schema) {
|
|
741
741
|
// TODO: Add warnings
|
|
@@ -753,12 +753,12 @@ class Importer {
|
|
|
753
753
|
}
|
|
754
754
|
}
|
|
755
755
|
|
|
756
|
-
/**
|
|
757
|
-
* @param {{[x: string]: any}} fieldAttrs
|
|
758
|
-
* @param {String} [parentId]
|
|
759
|
-
* @param {number} [index]
|
|
760
|
-
*
|
|
761
|
-
* @return {any} field
|
|
756
|
+
/**
|
|
757
|
+
* @param {{[x: string]: any}} fieldAttrs
|
|
758
|
+
* @param {String} [parentId]
|
|
759
|
+
* @param {number} [index]
|
|
760
|
+
*
|
|
761
|
+
* @return {any} field
|
|
762
762
|
*/
|
|
763
763
|
importFormField(fieldAttrs, parentId, index) {
|
|
764
764
|
const {
|
|
@@ -795,11 +795,11 @@ class Importer {
|
|
|
795
795
|
return field;
|
|
796
796
|
}
|
|
797
797
|
|
|
798
|
-
/**
|
|
799
|
-
* @param {Array<any>} components
|
|
800
|
-
* @param {string} parentId
|
|
801
|
-
*
|
|
802
|
-
* @return {Array<any>} imported components
|
|
798
|
+
/**
|
|
799
|
+
* @param {Array<any>} components
|
|
800
|
+
* @param {string} parentId
|
|
801
|
+
*
|
|
802
|
+
* @return {Array<any>} imported components
|
|
803
803
|
*/
|
|
804
804
|
importFormFields(components, parentId) {
|
|
805
805
|
return components.map((component, index) => {
|
|
@@ -824,22 +824,22 @@ function editorFormFieldClasses(type, {
|
|
|
824
824
|
});
|
|
825
825
|
}
|
|
826
826
|
|
|
827
|
-
/**
|
|
828
|
-
* Add a dragger that calls back the passed function with
|
|
829
|
-
* { event, delta } on drag.
|
|
830
|
-
*
|
|
831
|
-
* @example
|
|
832
|
-
*
|
|
833
|
-
* function dragMove(event, delta) {
|
|
834
|
-
* // we are dragging (!!)
|
|
835
|
-
* }
|
|
836
|
-
*
|
|
837
|
-
* domElement.addEventListener('dragstart', dragger(dragMove));
|
|
838
|
-
*
|
|
839
|
-
* @param {Function} fn
|
|
840
|
-
* @param {Element} dragPreview
|
|
841
|
-
*
|
|
842
|
-
* @return {Function} drag start callback function
|
|
827
|
+
/**
|
|
828
|
+
* Add a dragger that calls back the passed function with
|
|
829
|
+
* { event, delta } on drag.
|
|
830
|
+
*
|
|
831
|
+
* @example
|
|
832
|
+
*
|
|
833
|
+
* function dragMove(event, delta) {
|
|
834
|
+
* // we are dragging (!!)
|
|
835
|
+
* }
|
|
836
|
+
*
|
|
837
|
+
* domElement.addEventListener('dragstart', dragger(dragMove));
|
|
838
|
+
*
|
|
839
|
+
* @param {Function} fn
|
|
840
|
+
* @param {Element} dragPreview
|
|
841
|
+
*
|
|
842
|
+
* @return {Function} drag start callback function
|
|
843
843
|
*/
|
|
844
844
|
function createDragger(fn, dragPreview) {
|
|
845
845
|
let self;
|
|
@@ -880,12 +880,12 @@ function createDragger(fn, dragPreview) {
|
|
|
880
880
|
return onDragStart;
|
|
881
881
|
}
|
|
882
882
|
|
|
883
|
-
/**
|
|
884
|
-
* Throttle function call according UI update cycle.
|
|
885
|
-
*
|
|
886
|
-
* @param {Function} fn
|
|
887
|
-
*
|
|
888
|
-
* @return {Function} throttled fn
|
|
883
|
+
/**
|
|
884
|
+
* Throttle function call according UI update cycle.
|
|
885
|
+
*
|
|
886
|
+
* @param {Function} fn
|
|
887
|
+
*
|
|
888
|
+
* @return {Function} throttled fn
|
|
889
889
|
*/
|
|
890
890
|
function throttle(fn) {
|
|
891
891
|
let active = false;
|
|
@@ -914,11 +914,11 @@ const DragAndDropContext = createContext({
|
|
|
914
914
|
});
|
|
915
915
|
var DragAndDropContext$1 = DragAndDropContext;
|
|
916
916
|
|
|
917
|
-
/**
|
|
918
|
-
* @param {string} type
|
|
919
|
-
* @param {boolean} [strict]
|
|
920
|
-
*
|
|
921
|
-
* @returns {any}
|
|
917
|
+
/**
|
|
918
|
+
* @param {string} type
|
|
919
|
+
* @param {boolean} [strict]
|
|
920
|
+
*
|
|
921
|
+
* @returns {any}
|
|
922
922
|
*/
|
|
923
923
|
function getService(type, strict) {}
|
|
924
924
|
const FormEditorContext = createContext({
|
|
@@ -1117,10 +1117,12 @@ var ModularSection = (props => {
|
|
|
1117
1117
|
eventBus.on(`${section}.attach`, onAttach);
|
|
1118
1118
|
eventBus.on(`${section}.detach`, onDetach);
|
|
1119
1119
|
eventBus.on(`${section}.reset`, onReset);
|
|
1120
|
+
eventBus.fire(`${section}.section.rendered`);
|
|
1120
1121
|
return () => {
|
|
1121
1122
|
eventBus.off(`${section}.attach`, onAttach);
|
|
1122
1123
|
eventBus.off(`${section}.detach`, onDetach);
|
|
1123
1124
|
eventBus.off(`${section}.reset`, onReset);
|
|
1125
|
+
eventBus.fire(`${section}.section.destroyed`);
|
|
1124
1126
|
};
|
|
1125
1127
|
}, [eventBus, section]);
|
|
1126
1128
|
useEffect(() => {
|
|
@@ -1203,23 +1205,23 @@ var Slot = (props => {
|
|
|
1203
1205
|
return fillsAndSeparators;
|
|
1204
1206
|
});
|
|
1205
1207
|
|
|
1206
|
-
/**
|
|
1207
|
-
* Creates a Fragment for a fill.
|
|
1208
|
-
*
|
|
1209
|
-
* @param {Object} fill Fill to be rendered
|
|
1210
|
-
* @returns {Object} Preact Fragment containing fill's children
|
|
1208
|
+
/**
|
|
1209
|
+
* Creates a Fragment for a fill.
|
|
1210
|
+
*
|
|
1211
|
+
* @param {Object} fill Fill to be rendered
|
|
1212
|
+
* @returns {Object} Preact Fragment containing fill's children
|
|
1211
1213
|
*/
|
|
1212
1214
|
const FillFragment = fill => jsx(Fragment, {
|
|
1213
1215
|
children: fill.children
|
|
1214
1216
|
}, fill.id);
|
|
1215
1217
|
|
|
1216
|
-
/**
|
|
1217
|
-
* Creates an array of fills, with separators inserted between groups.
|
|
1218
|
-
*
|
|
1219
|
-
* @param {Array} groups Groups of fills
|
|
1220
|
-
* @param {Function} fillRenderer Function to create a fill
|
|
1221
|
-
* @param {Function} separatorRenderer Function to create a separator
|
|
1222
|
-
* @returns {Array} Array of fills and separators
|
|
1218
|
+
/**
|
|
1219
|
+
* Creates an array of fills, with separators inserted between groups.
|
|
1220
|
+
*
|
|
1221
|
+
* @param {Array} groups Groups of fills
|
|
1222
|
+
* @param {Function} fillRenderer Function to create a fill
|
|
1223
|
+
* @param {Function} separatorRenderer Function to create a separator
|
|
1224
|
+
* @returns {Array} Array of fills and separators
|
|
1223
1225
|
*/
|
|
1224
1226
|
const buildFills = (groups, fillRenderer, separatorRenderer) => {
|
|
1225
1227
|
const result = [];
|
|
@@ -1237,8 +1239,8 @@ const buildFills = (groups, fillRenderer, separatorRenderer) => {
|
|
|
1237
1239
|
return result;
|
|
1238
1240
|
};
|
|
1239
1241
|
|
|
1240
|
-
/**
|
|
1241
|
-
* Groups fills by group name property.
|
|
1242
|
+
/**
|
|
1243
|
+
* Groups fills by group name property.
|
|
1242
1244
|
*/
|
|
1243
1245
|
const _groupByGroupName = fills => {
|
|
1244
1246
|
const groups = [];
|
|
@@ -1258,8 +1260,8 @@ const _groupByGroupName = fills => {
|
|
|
1258
1260
|
return Object.keys(groupsById).sort().map(id => groupsById[id]);
|
|
1259
1261
|
};
|
|
1260
1262
|
|
|
1261
|
-
/**
|
|
1262
|
-
* Compares fills by priority.
|
|
1263
|
+
/**
|
|
1264
|
+
* Compares fills by priority.
|
|
1263
1265
|
*/
|
|
1264
1266
|
const _comparePriority = (a, b) => {
|
|
1265
1267
|
return (b.priority || 0) - (a.priority || 0);
|
|
@@ -4012,10 +4014,10 @@ function prefixId(id) {
|
|
|
4012
4014
|
return `bio-properties-panel-${id}`;
|
|
4013
4015
|
}
|
|
4014
4016
|
|
|
4015
|
-
/**
|
|
4016
|
-
* Retrieve list of variables from the form schema.
|
|
4017
|
-
*
|
|
4018
|
-
* @returns { string[] } list of variables used in form schema
|
|
4017
|
+
/**
|
|
4018
|
+
* Retrieve list of variables from the form schema.
|
|
4019
|
+
*
|
|
4020
|
+
* @returns { string[] } list of variables used in form schema
|
|
4019
4021
|
*/
|
|
4020
4022
|
function useVariables() {
|
|
4021
4023
|
const form = useService('formEditor');
|
|
@@ -4104,8 +4106,8 @@ const PropertiesPanelHeaderProvider = {
|
|
|
4104
4106
|
}
|
|
4105
4107
|
};
|
|
4106
4108
|
|
|
4107
|
-
/**
|
|
4108
|
-
* Provide placeholders for empty and multiple state.
|
|
4109
|
+
/**
|
|
4110
|
+
* Provide placeholders for empty and multiple state.
|
|
4109
4111
|
*/
|
|
4110
4112
|
const PropertiesPanelPlaceholderProvider = {
|
|
4111
4113
|
getEmpty: () => {
|
|
@@ -5612,14 +5614,14 @@ function Value(props) {
|
|
|
5612
5614
|
|
|
5613
5615
|
// helpers //////////
|
|
5614
5616
|
|
|
5615
|
-
/**
|
|
5616
|
-
* Returns copy of object with updated value.
|
|
5617
|
-
*
|
|
5618
|
-
* @param {Object} properties
|
|
5619
|
-
* @param {string} key
|
|
5620
|
-
* @param {string} value
|
|
5621
|
-
*
|
|
5622
|
-
* @returns {Object}
|
|
5617
|
+
/**
|
|
5618
|
+
* Returns copy of object with updated value.
|
|
5619
|
+
*
|
|
5620
|
+
* @param {Object} properties
|
|
5621
|
+
* @param {string} key
|
|
5622
|
+
* @param {string} value
|
|
5623
|
+
*
|
|
5624
|
+
* @returns {Object}
|
|
5623
5625
|
*/
|
|
5624
5626
|
function updateValue(properties, key, value) {
|
|
5625
5627
|
return {
|
|
@@ -5628,14 +5630,14 @@ function updateValue(properties, key, value) {
|
|
|
5628
5630
|
};
|
|
5629
5631
|
}
|
|
5630
5632
|
|
|
5631
|
-
/**
|
|
5632
|
-
* Returns copy of object with updated key.
|
|
5633
|
-
*
|
|
5634
|
-
* @param {Object} properties
|
|
5635
|
-
* @param {string} oldKey
|
|
5636
|
-
* @param {string} newKey
|
|
5637
|
-
*
|
|
5638
|
-
* @returns {Object}
|
|
5633
|
+
/**
|
|
5634
|
+
* Returns copy of object with updated key.
|
|
5635
|
+
*
|
|
5636
|
+
* @param {Object} properties
|
|
5637
|
+
* @param {string} oldKey
|
|
5638
|
+
* @param {string} newKey
|
|
5639
|
+
*
|
|
5640
|
+
* @returns {Object}
|
|
5639
5641
|
*/
|
|
5640
5642
|
function updateKey(properties, oldKey, newKey) {
|
|
5641
5643
|
return Object.entries(properties).reduce((newProperties, entry) => {
|
|
@@ -6329,8 +6331,8 @@ function ValuesGroups(field, editField) {
|
|
|
6329
6331
|
};
|
|
6330
6332
|
const valuesSourceId = `${fieldId}-valuesSource`;
|
|
6331
6333
|
|
|
6332
|
-
/**
|
|
6333
|
-
* @type {Array<Group|ListGroup>}
|
|
6334
|
+
/**
|
|
6335
|
+
* @type {Array<Group|ListGroup>}
|
|
6334
6336
|
*/
|
|
6335
6337
|
const groups = [{
|
|
6336
6338
|
id: valuesSourceId,
|
|
@@ -6432,13 +6434,13 @@ function CustomValuesGroup(field, editField) {
|
|
|
6432
6434
|
|
|
6433
6435
|
// helpers //////////
|
|
6434
6436
|
|
|
6435
|
-
/**
|
|
6436
|
-
* Returns copy of object without key.
|
|
6437
|
-
*
|
|
6438
|
-
* @param {Object} properties
|
|
6439
|
-
* @param {string} oldKey
|
|
6440
|
-
*
|
|
6441
|
-
* @returns {Object}
|
|
6437
|
+
/**
|
|
6438
|
+
* Returns copy of object without key.
|
|
6439
|
+
*
|
|
6440
|
+
* @param {Object} properties
|
|
6441
|
+
* @param {string} oldKey
|
|
6442
|
+
*
|
|
6443
|
+
* @returns {Object}
|
|
6442
6444
|
*/
|
|
6443
6445
|
function removeKey(properties, oldKey) {
|
|
6444
6446
|
return Object.entries(properties).reduce((newProperties, entry) => {
|
|
@@ -6550,9 +6552,9 @@ function FormPropertiesPanel() {
|
|
|
6550
6552
|
}, []);
|
|
6551
6553
|
useLayoutEffect(() => {
|
|
6552
6554
|
const onFieldChanged = () => {
|
|
6553
|
-
/**
|
|
6554
|
-
* TODO(pinussilvestrus): update with actual updated element,
|
|
6555
|
-
* once we have a proper updater/change support
|
|
6555
|
+
/**
|
|
6556
|
+
* TODO(pinussilvestrus): update with actual updated element,
|
|
6557
|
+
* once we have a proper updater/change support
|
|
6556
6558
|
*/
|
|
6557
6559
|
_update(selection.get() || schema);
|
|
6558
6560
|
};
|
|
@@ -6623,19 +6625,19 @@ const DRAG_NO_DROP_CLS = 'fjs-no-drop';
|
|
|
6623
6625
|
const DRAG_NO_MOVE_CLS = 'fjs-no-move';
|
|
6624
6626
|
const ERROR_DROP_CLS = 'fjs-error-drop';
|
|
6625
6627
|
|
|
6626
|
-
/**
|
|
6627
|
-
* @typedef { { id: String, components: Array<any> } } FormRow
|
|
6628
|
+
/**
|
|
6629
|
+
* @typedef { { id: String, components: Array<any> } } FormRow
|
|
6628
6630
|
*/
|
|
6629
6631
|
|
|
6630
6632
|
class Dragging {
|
|
6631
|
-
/**
|
|
6632
|
-
* @constructor
|
|
6633
|
-
*
|
|
6634
|
-
* @param { import('../../core/FormFieldRegistry').default } formFieldRegistry
|
|
6635
|
-
* @param { import('../../core/FormLayouter').default } formLayouter
|
|
6636
|
-
* @param { import('../../core/FormLayoutValidator').default } formLayoutValidator
|
|
6637
|
-
* @param { import('../../core/EventBus').default } eventBus
|
|
6638
|
-
* @param { import('../modeling/Modeling').default } modeling
|
|
6633
|
+
/**
|
|
6634
|
+
* @constructor
|
|
6635
|
+
*
|
|
6636
|
+
* @param { import('../../core/FormFieldRegistry').default } formFieldRegistry
|
|
6637
|
+
* @param { import('../../core/FormLayouter').default } formLayouter
|
|
6638
|
+
* @param { import('../../core/FormLayoutValidator').default } formLayoutValidator
|
|
6639
|
+
* @param { import('../../core/EventBus').default } eventBus
|
|
6640
|
+
* @param { import('../modeling/Modeling').default } modeling
|
|
6639
6641
|
*/
|
|
6640
6642
|
constructor(formFieldRegistry, formLayouter, formLayoutValidator, eventBus, modeling) {
|
|
6641
6643
|
this._formFieldRegistry = formFieldRegistry;
|
|
@@ -6645,13 +6647,13 @@ class Dragging {
|
|
|
6645
6647
|
this._modeling = modeling;
|
|
6646
6648
|
}
|
|
6647
6649
|
|
|
6648
|
-
/**
|
|
6649
|
-
* Calculcates position in form schema given the dropped place.
|
|
6650
|
-
*
|
|
6651
|
-
* @param { FormRow } targetRow
|
|
6652
|
-
* @param { any } targetFormField
|
|
6653
|
-
* @param { HTMLElement } sibling
|
|
6654
|
-
* @returns { number }
|
|
6650
|
+
/**
|
|
6651
|
+
* Calculcates position in form schema given the dropped place.
|
|
6652
|
+
*
|
|
6653
|
+
* @param { FormRow } targetRow
|
|
6654
|
+
* @param { any } targetFormField
|
|
6655
|
+
* @param { HTMLElement } sibling
|
|
6656
|
+
* @returns { number }
|
|
6655
6657
|
*/
|
|
6656
6658
|
getTargetIndex(targetRow, targetFormField, sibling) {
|
|
6657
6659
|
/** @type HTMLElement */
|
|
@@ -6753,8 +6755,8 @@ class Dragging {
|
|
|
6753
6755
|
}
|
|
6754
6756
|
}
|
|
6755
6757
|
|
|
6756
|
-
/**
|
|
6757
|
-
* @param { { container: Array<string>, direction: string, mirrorContainer: string } } options
|
|
6758
|
+
/**
|
|
6759
|
+
* @param { { container: Array<string>, direction: string, mirrorContainer: string } } options
|
|
6758
6760
|
*/
|
|
6759
6761
|
createDragulaInstance(options) {
|
|
6760
6762
|
const {
|
|
@@ -7151,7 +7153,7 @@ function DebugColumns(props) {
|
|
|
7151
7153
|
return null;
|
|
7152
7154
|
}
|
|
7153
7155
|
return jsx("div", {
|
|
7154
|
-
style: "width: fit-content
|
|
7156
|
+
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;",
|
|
7155
7157
|
class: "fjs-debug-columns",
|
|
7156
7158
|
children: (field.layout || {}).columns || 'auto'
|
|
7157
7159
|
});
|
|
@@ -8197,10 +8199,10 @@ function updateRow(formField, rowId) {
|
|
|
8197
8199
|
}
|
|
8198
8200
|
|
|
8199
8201
|
class AddFormFieldHandler {
|
|
8200
|
-
/**
|
|
8201
|
-
* @constructor
|
|
8202
|
-
* @param { import('../../../FormEditor').default } formEditor
|
|
8203
|
-
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
8202
|
+
/**
|
|
8203
|
+
* @constructor
|
|
8204
|
+
* @param { import('../../../FormEditor').default } formEditor
|
|
8205
|
+
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
8204
8206
|
*/
|
|
8205
8207
|
constructor(formEditor, formFieldRegistry) {
|
|
8206
8208
|
this._formEditor = formEditor;
|
|
@@ -8261,10 +8263,10 @@ class AddFormFieldHandler {
|
|
|
8261
8263
|
AddFormFieldHandler.$inject = ['formEditor', 'formFieldRegistry'];
|
|
8262
8264
|
|
|
8263
8265
|
class EditFormFieldHandler {
|
|
8264
|
-
/**
|
|
8265
|
-
* @constructor
|
|
8266
|
-
* @param { import('../../../FormEditor').default } formEditor
|
|
8267
|
-
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
8266
|
+
/**
|
|
8267
|
+
* @constructor
|
|
8268
|
+
* @param { import('../../../FormEditor').default } formEditor
|
|
8269
|
+
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
8268
8270
|
*/
|
|
8269
8271
|
constructor(formEditor, formFieldRegistry) {
|
|
8270
8272
|
this._formEditor = formEditor;
|
|
@@ -8327,10 +8329,10 @@ class EditFormFieldHandler {
|
|
|
8327
8329
|
EditFormFieldHandler.$inject = ['formEditor', 'formFieldRegistry'];
|
|
8328
8330
|
|
|
8329
8331
|
class MoveFormFieldHandler {
|
|
8330
|
-
/**
|
|
8331
|
-
* @constructor
|
|
8332
|
-
* @param { import('../../../FormEditor').default } formEditor
|
|
8333
|
-
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
8332
|
+
/**
|
|
8333
|
+
* @constructor
|
|
8334
|
+
* @param { import('../../../FormEditor').default } formEditor
|
|
8335
|
+
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
8334
8336
|
*/
|
|
8335
8337
|
constructor(formEditor, formFieldRegistry) {
|
|
8336
8338
|
this._formEditor = formEditor;
|
|
@@ -8419,10 +8421,10 @@ class MoveFormFieldHandler {
|
|
|
8419
8421
|
MoveFormFieldHandler.$inject = ['formEditor', 'formFieldRegistry'];
|
|
8420
8422
|
|
|
8421
8423
|
class RemoveFormFieldHandler {
|
|
8422
|
-
/**
|
|
8423
|
-
* @constructor
|
|
8424
|
-
* @param { import('../../../FormEditor').default } formEditor
|
|
8425
|
-
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
8424
|
+
/**
|
|
8425
|
+
* @constructor
|
|
8426
|
+
* @param { import('../../../FormEditor').default } formEditor
|
|
8427
|
+
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
8426
8428
|
*/
|
|
8427
8429
|
constructor(formEditor, formFieldRegistry) {
|
|
8428
8430
|
this._formEditor = formEditor;
|
|
@@ -8482,9 +8484,9 @@ class RemoveFormFieldHandler {
|
|
|
8482
8484
|
RemoveFormFieldHandler.$inject = ['formEditor', 'formFieldRegistry'];
|
|
8483
8485
|
|
|
8484
8486
|
class UpdateIdClaimHandler {
|
|
8485
|
-
/**
|
|
8486
|
-
* @constructor
|
|
8487
|
-
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
8487
|
+
/**
|
|
8488
|
+
* @constructor
|
|
8489
|
+
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
8488
8490
|
*/
|
|
8489
8491
|
constructor(formFieldRegistry) {
|
|
8490
8492
|
this._formFieldRegistry = formFieldRegistry;
|
|
@@ -8517,9 +8519,9 @@ class UpdateIdClaimHandler {
|
|
|
8517
8519
|
UpdateIdClaimHandler.$inject = ['formFieldRegistry'];
|
|
8518
8520
|
|
|
8519
8521
|
class UpdateKeyClaimHandler {
|
|
8520
|
-
/**
|
|
8521
|
-
* @constructor
|
|
8522
|
-
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
8522
|
+
/**
|
|
8523
|
+
* @constructor
|
|
8524
|
+
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
8523
8525
|
*/
|
|
8524
8526
|
constructor(formFieldRegistry) {
|
|
8525
8527
|
this._formFieldRegistry = formFieldRegistry;
|
|
@@ -8985,8 +8987,8 @@ class ValidateBehavior extends CommandInterceptor {
|
|
|
8985
8987
|
constructor(eventBus) {
|
|
8986
8988
|
super(eventBus);
|
|
8987
8989
|
|
|
8988
|
-
/**
|
|
8989
|
-
* Remove custom validation if <validationType> is about to be added.
|
|
8990
|
+
/**
|
|
8991
|
+
* Remove custom validation if <validationType> is about to be added.
|
|
8990
8992
|
*/
|
|
8991
8993
|
// @ts-ignore-next-line
|
|
8992
8994
|
this.preExecute('formField.edit', function (context) {
|
|
@@ -9566,51 +9568,68 @@ var SelectionModule = {
|
|
|
9566
9568
|
selectionBehavior: ['type', SelectionBehavior]
|
|
9567
9569
|
};
|
|
9568
9570
|
|
|
9569
|
-
/**
|
|
9570
|
-
* Base class for sectionable UI modules.
|
|
9571
|
-
*
|
|
9572
|
-
* @property {EventBus} _eventBus - EventBus instance used for event handling.
|
|
9573
|
-
* @property {string} managerType - Type of the render manager. Used to form event names.
|
|
9574
|
-
*
|
|
9575
|
-
* @class SectionModuleBase
|
|
9571
|
+
/**
|
|
9572
|
+
* Base class for sectionable UI modules.
|
|
9573
|
+
*
|
|
9574
|
+
* @property {EventBus} _eventBus - EventBus instance used for event handling.
|
|
9575
|
+
* @property {string} managerType - Type of the render manager. Used to form event names.
|
|
9576
|
+
*
|
|
9577
|
+
* @class SectionModuleBase
|
|
9576
9578
|
*/
|
|
9577
9579
|
class SectionModuleBase {
|
|
9578
|
-
/**
|
|
9579
|
-
* Create a SectionModuleBase instance.
|
|
9580
|
-
*
|
|
9581
|
-
* @param {any} eventBus - The EventBus instance used for event handling.
|
|
9582
|
-
* @param {string} sectionKey - The type of render manager. Used to form event names.
|
|
9583
|
-
*
|
|
9584
|
-
* @constructor
|
|
9580
|
+
/**
|
|
9581
|
+
* Create a SectionModuleBase instance.
|
|
9582
|
+
*
|
|
9583
|
+
* @param {any} eventBus - The EventBus instance used for event handling.
|
|
9584
|
+
* @param {string} sectionKey - The type of render manager. Used to form event names.
|
|
9585
|
+
*
|
|
9586
|
+
* @constructor
|
|
9585
9587
|
*/
|
|
9586
9588
|
constructor(eventBus, sectionKey) {
|
|
9587
9589
|
this._eventBus = eventBus;
|
|
9588
|
-
this.
|
|
9590
|
+
this._sectionKey = sectionKey;
|
|
9591
|
+
this._eventBus.on(`${this._sectionKey}.section.rendered`, () => this.isSectionRendered = true);
|
|
9592
|
+
this._eventBus.on(`${this._sectionKey}.section.destroyed`, () => this.isSectionRendered = false);
|
|
9589
9593
|
}
|
|
9590
9594
|
|
|
9591
|
-
/**
|
|
9592
|
-
* Attach the managed section to a parent node.
|
|
9593
|
-
*
|
|
9594
|
-
* @param {HTMLElement} container - The parent node to attach to.
|
|
9595
|
+
/**
|
|
9596
|
+
* Attach the managed section to a parent node.
|
|
9597
|
+
*
|
|
9598
|
+
* @param {HTMLElement} container - The parent node to attach to.
|
|
9595
9599
|
*/
|
|
9596
9600
|
attachTo(container) {
|
|
9597
|
-
this._eventBus.fire(`${this.
|
|
9601
|
+
this._onceSectionRendered(() => this._eventBus.fire(`${this._sectionKey}.attach`, {
|
|
9598
9602
|
container
|
|
9599
|
-
});
|
|
9603
|
+
}));
|
|
9600
9604
|
}
|
|
9601
9605
|
|
|
9602
|
-
/**
|
|
9603
|
-
* Detach the managed section from its parent node.
|
|
9606
|
+
/**
|
|
9607
|
+
* Detach the managed section from its parent node.
|
|
9604
9608
|
*/
|
|
9605
9609
|
detach() {
|
|
9606
|
-
this._eventBus.fire(`${this.
|
|
9610
|
+
this._onceSectionRendered(() => this._eventBus.fire(`${this._sectionKey}.detach`));
|
|
9607
9611
|
}
|
|
9608
9612
|
|
|
9609
|
-
/**
|
|
9610
|
-
* Reset the managed section to its initial state.
|
|
9613
|
+
/**
|
|
9614
|
+
* Reset the managed section to its initial state.
|
|
9611
9615
|
*/
|
|
9612
9616
|
reset() {
|
|
9613
|
-
this._eventBus.fire(`${this.
|
|
9617
|
+
this._onceSectionRendered(() => this._eventBus.fire(`${this._sectionKey}.reset`));
|
|
9618
|
+
}
|
|
9619
|
+
|
|
9620
|
+
/**
|
|
9621
|
+
* Circumvents timing issues.
|
|
9622
|
+
*/
|
|
9623
|
+
_onceSectionRendered(callback) {
|
|
9624
|
+
if (this.isSectionRendered) {
|
|
9625
|
+
callback();
|
|
9626
|
+
} else {
|
|
9627
|
+
const onSectionRendered = () => {
|
|
9628
|
+
callback();
|
|
9629
|
+
this._eventBus.off(`${this._sectionKey}.section.rendered`, onSectionRendered);
|
|
9630
|
+
};
|
|
9631
|
+
this._eventBus.on(`${this._sectionKey}.section.rendered`, onSectionRendered);
|
|
9632
|
+
}
|
|
9614
9633
|
}
|
|
9615
9634
|
}
|
|
9616
9635
|
|
|
@@ -9637,10 +9656,10 @@ var PropertiesPanelModule = {
|
|
|
9637
9656
|
propertiesPanel: ['type', PropertiesPanelModule$1]
|
|
9638
9657
|
};
|
|
9639
9658
|
|
|
9640
|
-
/**
|
|
9641
|
-
* Manages the rendering of visual plugins.
|
|
9642
|
-
* @constructor
|
|
9643
|
-
* @param {Object} eventBus - Event bus for the application.
|
|
9659
|
+
/**
|
|
9660
|
+
* Manages the rendering of visual plugins.
|
|
9661
|
+
* @constructor
|
|
9662
|
+
* @param {Object} eventBus - Event bus for the application.
|
|
9644
9663
|
*/
|
|
9645
9664
|
class RenderInjector extends SectionModuleBase {
|
|
9646
9665
|
constructor(eventBus) {
|
|
@@ -9649,10 +9668,10 @@ class RenderInjector extends SectionModuleBase {
|
|
|
9649
9668
|
this.registeredRenderers = [];
|
|
9650
9669
|
}
|
|
9651
9670
|
|
|
9652
|
-
/**
|
|
9653
|
-
* Inject a new renderer into the injector.
|
|
9654
|
-
* @param {string} identifier - Identifier for the renderer.
|
|
9655
|
-
* @param {Function} Renderer - The renderer function.
|
|
9671
|
+
/**
|
|
9672
|
+
* Inject a new renderer into the injector.
|
|
9673
|
+
* @param {string} identifier - Identifier for the renderer.
|
|
9674
|
+
* @param {Function} Renderer - The renderer function.
|
|
9656
9675
|
*/
|
|
9657
9676
|
attachRenderer(identifier, Renderer) {
|
|
9658
9677
|
this.registeredRenderers = [...this.registeredRenderers, {
|
|
@@ -9661,17 +9680,17 @@ class RenderInjector extends SectionModuleBase {
|
|
|
9661
9680
|
}];
|
|
9662
9681
|
}
|
|
9663
9682
|
|
|
9664
|
-
/**
|
|
9665
|
-
* Detach a renderer from the by key injector.
|
|
9666
|
-
* @param {string} identifier - Identifier for the renderer.
|
|
9683
|
+
/**
|
|
9684
|
+
* Detach a renderer from the by key injector.
|
|
9685
|
+
* @param {string} identifier - Identifier for the renderer.
|
|
9667
9686
|
*/
|
|
9668
9687
|
detachRenderer(identifier) {
|
|
9669
9688
|
this.registeredRenderers = this.registeredRenderers.filter(r => r.identifier !== identifier);
|
|
9670
9689
|
}
|
|
9671
9690
|
|
|
9672
|
-
/**
|
|
9673
|
-
* Returns the registered renderers.
|
|
9674
|
-
* @returns {Array} Array of registered renderers.
|
|
9691
|
+
/**
|
|
9692
|
+
* Returns the registered renderers.
|
|
9693
|
+
* @returns {Array} Array of registered renderers.
|
|
9675
9694
|
*/
|
|
9676
9695
|
fetchRenderers() {
|
|
9677
9696
|
return this.registeredRenderers;
|
|
@@ -9705,48 +9724,48 @@ var ExpressionLanguageModule = {
|
|
|
9705
9724
|
|
|
9706
9725
|
const ids = new Ids([32, 36, 1]);
|
|
9707
9726
|
|
|
9708
|
-
/**
|
|
9709
|
-
* @typedef { import('./types').Injector } Injector
|
|
9710
|
-
* @typedef { import('./types').Module } Module
|
|
9711
|
-
* @typedef { import('./types').Schema } Schema
|
|
9712
|
-
*
|
|
9713
|
-
* @typedef { import('./types').FormEditorOptions } FormEditorOptions
|
|
9714
|
-
* @typedef { import('./types').FormEditorProperties } FormEditorProperties
|
|
9715
|
-
*
|
|
9716
|
-
* @typedef { {
|
|
9717
|
-
* properties: FormEditorProperties,
|
|
9718
|
-
* schema: Schema
|
|
9719
|
-
* } } State
|
|
9720
|
-
*
|
|
9721
|
-
* @typedef { (type:string, priority:number, handler:Function) => void } OnEventWithPriority
|
|
9722
|
-
* @typedef { (type:string, handler:Function) => void } OnEventWithOutPriority
|
|
9723
|
-
* @typedef { OnEventWithPriority & OnEventWithOutPriority } OnEventType
|
|
9727
|
+
/**
|
|
9728
|
+
* @typedef { import('./types').Injector } Injector
|
|
9729
|
+
* @typedef { import('./types').Module } Module
|
|
9730
|
+
* @typedef { import('./types').Schema } Schema
|
|
9731
|
+
*
|
|
9732
|
+
* @typedef { import('./types').FormEditorOptions } FormEditorOptions
|
|
9733
|
+
* @typedef { import('./types').FormEditorProperties } FormEditorProperties
|
|
9734
|
+
*
|
|
9735
|
+
* @typedef { {
|
|
9736
|
+
* properties: FormEditorProperties,
|
|
9737
|
+
* schema: Schema
|
|
9738
|
+
* } } State
|
|
9739
|
+
*
|
|
9740
|
+
* @typedef { (type:string, priority:number, handler:Function) => void } OnEventWithPriority
|
|
9741
|
+
* @typedef { (type:string, handler:Function) => void } OnEventWithOutPriority
|
|
9742
|
+
* @typedef { OnEventWithPriority & OnEventWithOutPriority } OnEventType
|
|
9724
9743
|
*/
|
|
9725
9744
|
|
|
9726
|
-
/**
|
|
9727
|
-
* The form editor.
|
|
9745
|
+
/**
|
|
9746
|
+
* The form editor.
|
|
9728
9747
|
*/
|
|
9729
9748
|
class FormEditor {
|
|
9730
|
-
/**
|
|
9731
|
-
* @constructor
|
|
9732
|
-
* @param {FormEditorOptions} options
|
|
9749
|
+
/**
|
|
9750
|
+
* @constructor
|
|
9751
|
+
* @param {FormEditorOptions} options
|
|
9733
9752
|
*/
|
|
9734
9753
|
constructor(options = {}) {
|
|
9735
|
-
/**
|
|
9736
|
-
* @public
|
|
9737
|
-
* @type {OnEventType}
|
|
9754
|
+
/**
|
|
9755
|
+
* @public
|
|
9756
|
+
* @type {OnEventType}
|
|
9738
9757
|
*/
|
|
9739
9758
|
this.on = this._onEvent;
|
|
9740
9759
|
|
|
9741
|
-
/**
|
|
9742
|
-
* @public
|
|
9743
|
-
* @type {String}
|
|
9760
|
+
/**
|
|
9761
|
+
* @public
|
|
9762
|
+
* @type {String}
|
|
9744
9763
|
*/
|
|
9745
9764
|
this._id = ids.next();
|
|
9746
9765
|
|
|
9747
|
-
/**
|
|
9748
|
-
* @private
|
|
9749
|
-
* @type {Element}
|
|
9766
|
+
/**
|
|
9767
|
+
* @private
|
|
9768
|
+
* @type {Element}
|
|
9750
9769
|
*/
|
|
9751
9770
|
this._container = createFormContainer();
|
|
9752
9771
|
this._container.setAttribute('input-handle-modified-keys', 'z,y');
|
|
@@ -9757,15 +9776,15 @@ class FormEditor {
|
|
|
9757
9776
|
properties = {}
|
|
9758
9777
|
} = options;
|
|
9759
9778
|
|
|
9760
|
-
/**
|
|
9761
|
-
* @private
|
|
9762
|
-
* @type {any}
|
|
9779
|
+
/**
|
|
9780
|
+
* @private
|
|
9781
|
+
* @type {any}
|
|
9763
9782
|
*/
|
|
9764
9783
|
this.exporter = exporter;
|
|
9765
9784
|
|
|
9766
|
-
/**
|
|
9767
|
-
* @private
|
|
9768
|
-
* @type {State}
|
|
9785
|
+
/**
|
|
9786
|
+
* @private
|
|
9787
|
+
* @type {State}
|
|
9769
9788
|
*/
|
|
9770
9789
|
this._state = {
|
|
9771
9790
|
properties,
|
|
@@ -9794,10 +9813,10 @@ class FormEditor {
|
|
|
9794
9813
|
this._detach(false);
|
|
9795
9814
|
}
|
|
9796
9815
|
|
|
9797
|
-
/**
|
|
9798
|
-
* @param {Schema} schema
|
|
9799
|
-
*
|
|
9800
|
-
* @return {Promise<{ warnings: Array<any> }>}
|
|
9816
|
+
/**
|
|
9817
|
+
* @param {Schema} schema
|
|
9818
|
+
*
|
|
9819
|
+
* @return {Promise<{ warnings: Array<any> }>}
|
|
9801
9820
|
*/
|
|
9802
9821
|
importSchema(schema) {
|
|
9803
9822
|
return new Promise((resolve, reject) => {
|
|
@@ -9826,15 +9845,15 @@ class FormEditor {
|
|
|
9826
9845
|
});
|
|
9827
9846
|
}
|
|
9828
9847
|
|
|
9829
|
-
/**
|
|
9830
|
-
* @returns {Schema}
|
|
9848
|
+
/**
|
|
9849
|
+
* @returns {Schema}
|
|
9831
9850
|
*/
|
|
9832
9851
|
saveSchema() {
|
|
9833
9852
|
return this.getSchema();
|
|
9834
9853
|
}
|
|
9835
9854
|
|
|
9836
|
-
/**
|
|
9837
|
-
* @returns {Schema}
|
|
9855
|
+
/**
|
|
9856
|
+
* @returns {Schema}
|
|
9838
9857
|
*/
|
|
9839
9858
|
getSchema() {
|
|
9840
9859
|
const {
|
|
@@ -9843,8 +9862,8 @@ class FormEditor {
|
|
|
9843
9862
|
return exportSchema(schema, this.exporter, schemaVersion);
|
|
9844
9863
|
}
|
|
9845
9864
|
|
|
9846
|
-
/**
|
|
9847
|
-
* @param {Element|string} parentNode
|
|
9865
|
+
/**
|
|
9866
|
+
* @param {Element|string} parentNode
|
|
9848
9867
|
*/
|
|
9849
9868
|
attachTo(parentNode) {
|
|
9850
9869
|
if (!parentNode) {
|
|
@@ -9862,10 +9881,10 @@ class FormEditor {
|
|
|
9862
9881
|
this._detach();
|
|
9863
9882
|
}
|
|
9864
9883
|
|
|
9865
|
-
/**
|
|
9866
|
-
* @internal
|
|
9867
|
-
*
|
|
9868
|
-
* @param {boolean} [emit]
|
|
9884
|
+
/**
|
|
9885
|
+
* @internal
|
|
9886
|
+
*
|
|
9887
|
+
* @param {boolean} [emit]
|
|
9869
9888
|
*/
|
|
9870
9889
|
_detach(emit = true) {
|
|
9871
9890
|
const container = this._container,
|
|
@@ -9879,9 +9898,9 @@ class FormEditor {
|
|
|
9879
9898
|
parentNode.removeChild(container);
|
|
9880
9899
|
}
|
|
9881
9900
|
|
|
9882
|
-
/**
|
|
9883
|
-
* @param {any} property
|
|
9884
|
-
* @param {any} value
|
|
9901
|
+
/**
|
|
9902
|
+
* @param {any} property
|
|
9903
|
+
* @param {any} value
|
|
9885
9904
|
*/
|
|
9886
9905
|
setProperty(property, value) {
|
|
9887
9906
|
const properties = set$1(this._getState().properties, [property], value);
|
|
@@ -9890,21 +9909,21 @@ class FormEditor {
|
|
|
9890
9909
|
});
|
|
9891
9910
|
}
|
|
9892
9911
|
|
|
9893
|
-
/**
|
|
9894
|
-
* @param {string} type
|
|
9895
|
-
* @param {Function} handler
|
|
9912
|
+
/**
|
|
9913
|
+
* @param {string} type
|
|
9914
|
+
* @param {Function} handler
|
|
9896
9915
|
*/
|
|
9897
9916
|
off(type, handler) {
|
|
9898
9917
|
this.get('eventBus').off(type, handler);
|
|
9899
9918
|
}
|
|
9900
9919
|
|
|
9901
|
-
/**
|
|
9902
|
-
* @internal
|
|
9903
|
-
*
|
|
9904
|
-
* @param {FormEditorOptions} options
|
|
9905
|
-
* @param {Element} container
|
|
9906
|
-
*
|
|
9907
|
-
* @returns {Injector}
|
|
9920
|
+
/**
|
|
9921
|
+
* @internal
|
|
9922
|
+
*
|
|
9923
|
+
* @param {FormEditorOptions} options
|
|
9924
|
+
* @param {Element} container
|
|
9925
|
+
*
|
|
9926
|
+
* @returns {Injector}
|
|
9908
9927
|
*/
|
|
9909
9928
|
_createInjector(options, container) {
|
|
9910
9929
|
const {
|
|
@@ -9926,22 +9945,22 @@ class FormEditor {
|
|
|
9926
9945
|
}, core, ...modules, ...additionalModules]);
|
|
9927
9946
|
}
|
|
9928
9947
|
|
|
9929
|
-
/**
|
|
9930
|
-
* @internal
|
|
9948
|
+
/**
|
|
9949
|
+
* @internal
|
|
9931
9950
|
*/
|
|
9932
9951
|
_emit(type, data) {
|
|
9933
9952
|
this.get('eventBus').fire(type, data);
|
|
9934
9953
|
}
|
|
9935
9954
|
|
|
9936
|
-
/**
|
|
9937
|
-
* @internal
|
|
9955
|
+
/**
|
|
9956
|
+
* @internal
|
|
9938
9957
|
*/
|
|
9939
9958
|
_getState() {
|
|
9940
9959
|
return this._state;
|
|
9941
9960
|
}
|
|
9942
9961
|
|
|
9943
|
-
/**
|
|
9944
|
-
* @internal
|
|
9962
|
+
/**
|
|
9963
|
+
* @internal
|
|
9945
9964
|
*/
|
|
9946
9965
|
_setState(state) {
|
|
9947
9966
|
this._state = {
|
|
@@ -9951,15 +9970,15 @@ class FormEditor {
|
|
|
9951
9970
|
this._emit('changed', this._getState());
|
|
9952
9971
|
}
|
|
9953
9972
|
|
|
9954
|
-
/**
|
|
9955
|
-
* @internal
|
|
9973
|
+
/**
|
|
9974
|
+
* @internal
|
|
9956
9975
|
*/
|
|
9957
9976
|
_getModules() {
|
|
9958
9977
|
return [ModelingModule, EditorActionsModule, DraggingModule, KeyboardModule, SelectionModule, PaletteModule, ExpressionLanguageModule, MarkdownModule, PropertiesPanelModule, RenderInjectionModule];
|
|
9959
9978
|
}
|
|
9960
9979
|
|
|
9961
|
-
/**
|
|
9962
|
-
* @internal
|
|
9980
|
+
/**
|
|
9981
|
+
* @internal
|
|
9963
9982
|
*/
|
|
9964
9983
|
_onEvent(type, priority, handler) {
|
|
9965
9984
|
this.get('eventBus').on(type, priority, handler);
|