@bpmn-io/form-js-editor 0.10.0-alpha.3 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -22
- package/README.md +119 -118
- package/dist/assets/form-js-editor.css +295 -287
- package/dist/index.cjs +682 -516
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +668 -502
- package/dist/index.es.js.map +1 -1
- package/dist/types/FormEditor.d.ts +155 -155
- package/dist/types/core/Debounce.d.ts +10 -10
- package/dist/types/core/EventBus.d.ts +1 -1
- package/dist/types/core/FieldFactory.d.ts +18 -18
- package/dist/types/core/FormFieldRegistry.d.ts +19 -19
- package/dist/types/core/index.d.ts +17 -17
- package/dist/types/features/editor-actions/FormEditorActions.d.ts +8 -8
- package/dist/types/features/editor-actions/index.d.ts +6 -6
- package/dist/types/features/keyboard/FormEditorKeyboardBindings.d.ts +8 -8
- package/dist/types/features/keyboard/index.d.ts +7 -7
- package/dist/types/features/modeling/Modeling.d.ts +34 -34
- package/dist/types/features/modeling/behavior/IdBehavior.d.ts +7 -7
- package/dist/types/features/modeling/behavior/KeyBehavior.d.ts +7 -7
- package/dist/types/features/modeling/behavior/index.d.ts +8 -8
- package/dist/types/features/modeling/cmd/AddFormFieldHandler.d.ts +16 -16
- package/dist/types/features/modeling/cmd/EditFormFieldHandler.d.ts +16 -16
- package/dist/types/features/modeling/cmd/MoveFormFieldHandler.d.ts +17 -17
- package/dist/types/features/modeling/cmd/RemoveFormFieldHandler.d.ts +16 -16
- package/dist/types/features/modeling/cmd/UpdateIdClaimHandler.d.ts +14 -14
- package/dist/types/features/modeling/cmd/UpdateKeyClaimHandler.d.ts +14 -14
- package/dist/types/features/modeling/cmd/Util.d.ts +4 -4
- package/dist/types/features/modeling/index.d.ts +7 -7
- package/dist/types/features/palette/PaletteRenderer.d.ts +33 -33
- package/dist/types/features/palette/components/Palette.d.ts +1 -1
- package/dist/types/features/palette/index.d.ts +5 -5
- package/dist/types/features/properties-panel/PropertiesPanel.d.ts +1 -1
- package/dist/types/features/properties-panel/PropertiesPanelHeaderProvider.d.ts +5 -5
- package/dist/types/features/properties-panel/PropertiesPanelPlaceholderProvider.d.ts +8 -8
- package/dist/types/features/properties-panel/PropertiesPanelRenderer.d.ts +37 -37
- package/dist/types/features/properties-panel/Util.d.ts +9 -9
- package/dist/types/features/properties-panel/context/FormPropertiesPanelContext.d.ts +11 -11
- package/dist/types/features/properties-panel/context/index.d.ts +1 -1
- package/dist/types/features/properties-panel/entries/ActionEntry.d.ts +9 -9
- package/dist/types/features/properties-panel/entries/AdornerEntry.d.ts +11 -0
- package/dist/types/features/properties-panel/entries/AltTextEntry.d.ts +9 -9
- package/dist/types/features/properties-panel/entries/ColumnsEntry.d.ts +9 -9
- package/dist/types/features/properties-panel/entries/ConditionEntry.d.ts +9 -9
- package/dist/types/features/properties-panel/entries/CustomValueEntry.d.ts +11 -11
- package/dist/types/features/properties-panel/entries/DateTimeConstraintsEntry.d.ts +9 -0
- package/dist/types/features/properties-panel/entries/DateTimeEntry.d.ts +9 -0
- package/dist/types/features/properties-panel/entries/DateTimeSerializationEntry.d.ts +9 -0
- package/dist/types/features/properties-panel/entries/DefaultValueEntry.d.ts +1 -1
- package/dist/types/features/properties-panel/entries/DescriptionEntry.d.ts +9 -9
- package/dist/types/features/properties-panel/entries/DisabledEntry.d.ts +9 -9
- package/dist/types/features/properties-panel/entries/IdEntry.d.ts +9 -9
- package/dist/types/features/properties-panel/entries/ImageSourceEntry.d.ts +9 -9
- package/dist/types/features/properties-panel/entries/InputKeyValuesSourceEntry.d.ts +11 -11
- package/dist/types/features/properties-panel/entries/KeyEntry.d.ts +9 -9
- package/dist/types/features/properties-panel/entries/LabelEntry.d.ts +9 -9
- package/dist/types/features/properties-panel/entries/NumberEntries.d.ts +9 -9
- package/dist/types/features/properties-panel/entries/NumberSerializationEntry.d.ts +9 -9
- package/dist/types/features/properties-panel/entries/StaticValuesSourceEntry.d.ts +5 -5
- package/dist/types/features/properties-panel/entries/TextEntry.d.ts +9 -9
- package/dist/types/features/properties-panel/entries/ValueEntry.d.ts +11 -11
- package/dist/types/features/properties-panel/entries/ValuesSourceSelectEntry.d.ts +9 -9
- package/dist/types/features/properties-panel/entries/factories/index.d.ts +1 -0
- package/dist/types/features/properties-panel/entries/factories/simpleStringEntryFactory.d.ts +9 -0
- package/dist/types/features/properties-panel/entries/index.d.ts +23 -19
- package/dist/types/features/properties-panel/groups/AppearanceGroup.d.ts +13 -0
- package/dist/types/features/properties-panel/groups/ConditionGroup.d.ts +11 -11
- package/dist/types/features/properties-panel/groups/ConstraintsGroup.d.ts +11 -0
- package/dist/types/features/properties-panel/groups/CustomValuesGroup.d.ts +31 -31
- package/dist/types/features/properties-panel/groups/GeneralGroup.d.ts +5 -5
- package/dist/types/features/properties-panel/groups/SerializationGroup.d.ts +11 -11
- package/dist/types/features/properties-panel/groups/ValidationGroup.d.ts +14 -14
- package/dist/types/features/properties-panel/groups/ValuesGroups.d.ts +1 -1
- package/dist/types/features/properties-panel/groups/index.d.ts +8 -6
- package/dist/types/features/properties-panel/hooks/index.d.ts +2 -2
- package/dist/types/features/properties-panel/hooks/usePropertiesPanelService.d.ts +1 -1
- package/dist/types/features/properties-panel/hooks/useVariables.d.ts +6 -6
- package/dist/types/features/properties-panel/icons/index.d.ts +1 -1
- package/dist/types/features/properties-panel/index.d.ts +6 -6
- package/dist/types/features/selection/Selection.d.ts +14 -14
- package/dist/types/features/selection/SelectionBehavior.d.ts +7 -7
- package/dist/types/features/selection/index.d.ts +8 -8
- package/dist/types/import/Importer.d.ts +51 -51
- package/dist/types/import/index.d.ts +5 -5
- package/dist/types/index.d.ts +15 -15
- package/dist/types/render/Renderer.d.ts +26 -26
- package/dist/types/render/components/FormEditor.d.ts +1 -1
- package/dist/types/render/components/icons/index.d.ts +1 -15
- package/dist/types/render/context/DragAndDropContext.d.ts +4 -4
- package/dist/types/render/context/FormEditorContext.d.ts +11 -11
- package/dist/types/render/context/index.d.ts +2 -2
- package/dist/types/render/hooks/useService.d.ts +1 -1
- package/dist/types/render/index.d.ts +8 -8
- package/dist/types/src/types.d.ts +28 -28
- package/package.json +3 -3
- package/dist/types/features/properties-panel/entries/ValuesSourceUtil.d.ts +0 -15
package/dist/index.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { FormFieldRegistry as FormFieldRegistry$1, clone, FormContext, FormRenderContext, FormComponent, FormFields, getSchemaVariables, Default, createFormContainer, createInjector, schemaVersion } from '@bpmn-io/form-js-viewer';
|
|
1
|
+
import { FormFieldRegistry as FormFieldRegistry$1, clone, FormContext, FormRenderContext, FormComponent, iconsByType, FormFields, getSchemaVariables, Default, DATETIME_SUBTYPES, DATE_LABEL_PATH, TIME_LABEL_PATH, DATETIME_SUBTYPE_PATH, DATETIME_SUBTYPES_LABELS, TIME_SERIALISING_FORMAT_PATH, TIME_SERIALISING_FORMATS, TIME_INTERVAL_PATH, TIME_USE24H_PATH, DATE_DISALLOW_PAST_PATH, TIME_SERIALISINGFORMAT_LABELS, getValuesSource, VALUES_SOURCES, VALUES_SOURCES_DEFAULTS, VALUES_SOURCES_PATHS, VALUES_SOURCES_LABELS, createFormContainer, createInjector, schemaVersion } from '@bpmn-io/form-js-viewer';
|
|
2
2
|
export { schemaVersion } from '@bpmn-io/form-js-viewer';
|
|
3
3
|
import Ids from 'ids';
|
|
4
4
|
import { isArray, isFunction, isNumber, bind, assign, debounce, forEach, get, isObject, uniqueBy, sortBy, find, set, isUndefined, without, has, isString } from 'min-dash';
|
|
5
5
|
import { createContext, render, createElement } from 'preact';
|
|
6
6
|
import { useContext, useRef, useState, useEffect, useCallback, useMemo, useLayoutEffect } from 'preact/hooks';
|
|
7
7
|
import dragula from 'dragula';
|
|
8
|
-
import React, { forwardRef } from 'preact/compat';
|
|
9
8
|
import { jsxs, jsx } from 'preact/jsx-runtime';
|
|
9
|
+
import React, { forwardRef } from 'preact/compat';
|
|
10
10
|
import { matches, closest, event, domify, query } from 'min-dom';
|
|
11
11
|
import { mutate } from 'array-move';
|
|
12
12
|
import classnames from 'classnames';
|
|
@@ -446,10 +446,10 @@ function invokeFunction(fn, args) {
|
|
|
446
446
|
return fn.apply(null, args);
|
|
447
447
|
}
|
|
448
448
|
|
|
449
|
-
/**
|
|
450
|
-
* A factory to create a configurable debouncer.
|
|
451
|
-
*
|
|
452
|
-
* @param {number|boolean} [config=true]
|
|
449
|
+
/**
|
|
450
|
+
* A factory to create a configurable debouncer.
|
|
451
|
+
*
|
|
452
|
+
* @param {number|boolean} [config=true]
|
|
453
453
|
*/
|
|
454
454
|
function DebounceFactory(config = true) {
|
|
455
455
|
const timeout = typeof config === 'number' ? config : config ? 300 : 0;
|
|
@@ -462,11 +462,11 @@ function DebounceFactory(config = true) {
|
|
|
462
462
|
DebounceFactory.$inject = ['config.debounce'];
|
|
463
463
|
|
|
464
464
|
class FieldFactory {
|
|
465
|
-
/**
|
|
466
|
-
* @constructor
|
|
467
|
-
*
|
|
468
|
-
* @param { import('./FormFieldRegistry').default } formFieldRegistry
|
|
469
|
-
* @param { import('@bpmn-io/form-js-viewer').FormFields } formFields
|
|
465
|
+
/**
|
|
466
|
+
* @constructor
|
|
467
|
+
*
|
|
468
|
+
* @param { import('./FormFieldRegistry').default } formFieldRegistry
|
|
469
|
+
* @param { import('@bpmn-io/form-js-viewer').FormFields } formFields
|
|
470
470
|
*/
|
|
471
471
|
constructor(formFieldRegistry, formFields) {
|
|
472
472
|
this._formFieldRegistry = formFieldRegistry;
|
|
@@ -526,11 +526,11 @@ class FieldFactory {
|
|
|
526
526
|
FieldFactory.$inject = ['formFieldRegistry', 'formFields'];
|
|
527
527
|
|
|
528
528
|
class FormFieldRegistry extends FormFieldRegistry$1 {
|
|
529
|
-
/**
|
|
530
|
-
* Updates a form fields id.
|
|
531
|
-
*
|
|
532
|
-
* @param {Object} formField
|
|
533
|
-
* @param {string} newId
|
|
529
|
+
/**
|
|
530
|
+
* Updates a form fields id.
|
|
531
|
+
*
|
|
532
|
+
* @param {Object} formField
|
|
533
|
+
* @param {string} newId
|
|
534
534
|
*/
|
|
535
535
|
updateId(formField, newId) {
|
|
536
536
|
this._validateId(newId);
|
|
@@ -551,13 +551,13 @@ class FormFieldRegistry extends FormFieldRegistry$1 {
|
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
553
|
|
|
554
|
-
/**
|
|
555
|
-
* Validate the suitability of the given id and signals a problem
|
|
556
|
-
* with an exception.
|
|
557
|
-
*
|
|
558
|
-
* @param {string} id
|
|
559
|
-
*
|
|
560
|
-
* @throws {Error} if id is empty or already assigned
|
|
554
|
+
/**
|
|
555
|
+
* Validate the suitability of the given id and signals a problem
|
|
556
|
+
* with an exception.
|
|
557
|
+
*
|
|
558
|
+
* @param {string} id
|
|
559
|
+
*
|
|
560
|
+
* @throws {Error} if id is empty or already assigned
|
|
561
561
|
*/
|
|
562
562
|
_validateId(id) {
|
|
563
563
|
if (!id) {
|
|
@@ -570,31 +570,31 @@ class FormFieldRegistry extends FormFieldRegistry$1 {
|
|
|
570
570
|
}
|
|
571
571
|
|
|
572
572
|
class Importer {
|
|
573
|
-
/**
|
|
574
|
-
* @constructor
|
|
575
|
-
* @param { import('../core/FormFieldRegistry').default } formFieldRegistry
|
|
576
|
-
* @param { import('../core/FieldFactory').default } fieldFactory
|
|
573
|
+
/**
|
|
574
|
+
* @constructor
|
|
575
|
+
* @param { import('../core/FormFieldRegistry').default } formFieldRegistry
|
|
576
|
+
* @param { import('../core/FieldFactory').default } fieldFactory
|
|
577
577
|
*/
|
|
578
578
|
constructor(formFieldRegistry, fieldFactory) {
|
|
579
579
|
this._formFieldRegistry = formFieldRegistry;
|
|
580
580
|
this._fieldFactory = fieldFactory;
|
|
581
581
|
}
|
|
582
582
|
|
|
583
|
-
/**
|
|
584
|
-
* Import schema creating fields, attaching additional
|
|
585
|
-
* information to each field and adding fields to the
|
|
586
|
-
* field registry.
|
|
587
|
-
*
|
|
588
|
-
* Additional information attached:
|
|
589
|
-
*
|
|
590
|
-
* * `id` (unless present)
|
|
591
|
-
* * `_parent`
|
|
592
|
-
* * `_path`
|
|
593
|
-
*
|
|
594
|
-
* @param {any} schema
|
|
595
|
-
*
|
|
596
|
-
* @typedef {{ warnings: Error[], schema: any }} ImportResult
|
|
597
|
-
* @returns {ImportResult}
|
|
583
|
+
/**
|
|
584
|
+
* Import schema creating fields, attaching additional
|
|
585
|
+
* information to each field and adding fields to the
|
|
586
|
+
* field registry.
|
|
587
|
+
*
|
|
588
|
+
* Additional information attached:
|
|
589
|
+
*
|
|
590
|
+
* * `id` (unless present)
|
|
591
|
+
* * `_parent`
|
|
592
|
+
* * `_path`
|
|
593
|
+
*
|
|
594
|
+
* @param {any} schema
|
|
595
|
+
*
|
|
596
|
+
* @typedef {{ warnings: Error[], schema: any }} ImportResult
|
|
597
|
+
* @returns {ImportResult}
|
|
598
598
|
*/
|
|
599
599
|
importSchema(schema) {
|
|
600
600
|
// TODO: Add warnings
|
|
@@ -611,12 +611,12 @@ class Importer {
|
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
613
|
|
|
614
|
-
/**
|
|
615
|
-
* @param {{[x: string]: any}} fieldAttrs
|
|
616
|
-
* @param {String} [parentId]
|
|
617
|
-
* @param {number} [index]
|
|
618
|
-
*
|
|
619
|
-
* @return {any} field
|
|
614
|
+
/**
|
|
615
|
+
* @param {{[x: string]: any}} fieldAttrs
|
|
616
|
+
* @param {String} [parentId]
|
|
617
|
+
* @param {number} [index]
|
|
618
|
+
*
|
|
619
|
+
* @return {any} field
|
|
620
620
|
*/
|
|
621
621
|
importFormField(fieldAttrs, parentId, index) {
|
|
622
622
|
const {
|
|
@@ -653,11 +653,11 @@ class Importer {
|
|
|
653
653
|
return field;
|
|
654
654
|
}
|
|
655
655
|
|
|
656
|
-
/**
|
|
657
|
-
* @param {Array<any>} components
|
|
658
|
-
* @param {string} parentId
|
|
659
|
-
*
|
|
660
|
-
* @return {Array<any>} imported components
|
|
656
|
+
/**
|
|
657
|
+
* @param {Array<any>} components
|
|
658
|
+
* @param {string} parentId
|
|
659
|
+
*
|
|
660
|
+
* @return {Array<any>} imported components
|
|
661
661
|
*/
|
|
662
662
|
importFormFields(components, parentId) {
|
|
663
663
|
return components.map((component, index) => {
|
|
@@ -675,11 +675,11 @@ const DragAndDropContext = createContext({
|
|
|
675
675
|
drake: null
|
|
676
676
|
});
|
|
677
677
|
|
|
678
|
-
/**
|
|
679
|
-
* @param {string} type
|
|
680
|
-
* @param {boolean} [strict]
|
|
681
|
-
*
|
|
682
|
-
* @returns {any}
|
|
678
|
+
/**
|
|
679
|
+
* @param {string} type
|
|
680
|
+
* @param {boolean} [strict]
|
|
681
|
+
*
|
|
682
|
+
* @returns {any}
|
|
683
683
|
*/
|
|
684
684
|
function getService$1(type, strict) {}
|
|
685
685
|
const FormEditorContext = createContext({
|
|
@@ -693,11 +693,11 @@ function useService$1 (type, strict) {
|
|
|
693
693
|
return getService(type, strict);
|
|
694
694
|
}
|
|
695
695
|
|
|
696
|
-
function _extends
|
|
696
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
697
697
|
var ListDeleteIcon = (({
|
|
698
698
|
styles = {},
|
|
699
699
|
...props
|
|
700
|
-
}) => /*#__PURE__*/React.createElement("svg", _extends
|
|
700
|
+
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
701
701
|
xmlns: "http://www.w3.org/2000/svg",
|
|
702
702
|
width: "11",
|
|
703
703
|
height: "14"
|
|
@@ -705,223 +705,6 @@ var ListDeleteIcon = (({
|
|
|
705
705
|
d: "M10 4v8c0 1.1-.9 2-2 2H3c-1.1 0-2-.9-2-2V4h9zM8 6H3v4.8c0 .66.5 1.2 1.111 1.2H6.89C7.5 12 8 11.46 8 10.8V6zm3-5H8.5l-1-1h-4l-1 1H0v1.5h11V1z"
|
|
706
706
|
})));
|
|
707
707
|
|
|
708
|
-
function _extends$c() { _extends$c = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
|
|
709
|
-
var ButtonIcon = (({
|
|
710
|
-
styles = {},
|
|
711
|
-
...props
|
|
712
|
-
}) => /*#__PURE__*/React.createElement("svg", _extends$c({
|
|
713
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
714
|
-
width: "54",
|
|
715
|
-
height: "54"
|
|
716
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
717
|
-
fillRule: "evenodd",
|
|
718
|
-
d: "M45 17a3 3 0 013 3v14a3 3 0 01-3 3H9a3 3 0 01-3-3V20a3 3 0 013-3h36zm-9 8.889H18v2.222h18V25.89z"
|
|
719
|
-
})));
|
|
720
|
-
|
|
721
|
-
function _extends$b() { _extends$b = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
|
|
722
|
-
var CheckboxIcon = (({
|
|
723
|
-
styles = {},
|
|
724
|
-
...props
|
|
725
|
-
}) => /*#__PURE__*/React.createElement("svg", _extends$b({
|
|
726
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
727
|
-
width: "54",
|
|
728
|
-
height: "54"
|
|
729
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
730
|
-
d: "M34 18H20a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2V20a2 2 0 00-2-2zm-9 14l-5-5 1.41-1.41L25 29.17l7.59-7.59L34 23l-9 9z"
|
|
731
|
-
})));
|
|
732
|
-
|
|
733
|
-
function _extends$a() { _extends$a = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
|
|
734
|
-
var ChecklistIcon = (({
|
|
735
|
-
styles = {},
|
|
736
|
-
...props
|
|
737
|
-
}) => /*#__PURE__*/React.createElement("svg", _extends$a({
|
|
738
|
-
width: "54",
|
|
739
|
-
height: "54",
|
|
740
|
-
fill: "none",
|
|
741
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
742
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
743
|
-
fillRule: "evenodd",
|
|
744
|
-
clipRule: "evenodd",
|
|
745
|
-
d: "M19 24h-6v6h6v-6zm-6-2a2 2 0 00-2 2v6a2 2 0 002 2h6a2 2 0 002-2v-6a2 2 0 00-2-2h-6zm6 18h-6v6h6v-6zm-6-2a2 2 0 00-2 2v6a2 2 0 002 2h6a2 2 0 002-2v-6a2 2 0 00-2-2h-6zm6-30h-6v6h6V8zm-6-2a2 2 0 00-2 2v6a2 2 0 002 2h6a2 2 0 002-2V8a2 2 0 00-2-2h-6z",
|
|
746
|
-
fill: "#22242A"
|
|
747
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
748
|
-
d: "M26 26a1 1 0 011-1h15a1 1 0 011 1v2a1 1 0 01-1 1H27a1 1 0 01-1-1v-2zm0 16a1 1 0 011-1h15a1 1 0 011 1v2a1 1 0 01-1 1H27a1 1 0 01-1-1v-2zm0-32a1 1 0 011-1h15a1 1 0 011 1v2a1 1 0 01-1 1H27a1 1 0 01-1-1v-2z",
|
|
749
|
-
fill: "#22242A"
|
|
750
|
-
})));
|
|
751
|
-
|
|
752
|
-
function _extends$9() { _extends$9 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
|
|
753
|
-
var TaglistIcon = (({
|
|
754
|
-
styles = {},
|
|
755
|
-
...props
|
|
756
|
-
}) => /*#__PURE__*/React.createElement("svg", _extends$9({
|
|
757
|
-
width: "54",
|
|
758
|
-
height: "54",
|
|
759
|
-
fill: "none",
|
|
760
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
761
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
762
|
-
fillRule: "evenodd",
|
|
763
|
-
clipRule: "evenodd",
|
|
764
|
-
d: "M45 16a3 3 0 013 3v16a3 3 0 01-3 3H9a3 3 0 01-3-3V19a3 3 0 013-3h36zm0 2H9a1 1 0 00-1 1v16a1 1 0 001 1h36a1 1 0 001-1V19a1 1 0 00-1-1z",
|
|
765
|
-
fill: "#000"
|
|
766
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
767
|
-
d: "M11 22a1 1 0 011-1h19a1 1 0 011 1v10a1 1 0 01-1 1H12a1 1 0 01-1-1V22z",
|
|
768
|
-
fill: "#505562"
|
|
769
|
-
})));
|
|
770
|
-
|
|
771
|
-
function _extends$8() { _extends$8 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
|
|
772
|
-
var FormIcon = (({
|
|
773
|
-
styles = {},
|
|
774
|
-
...props
|
|
775
|
-
}) => /*#__PURE__*/React.createElement("svg", _extends$8({
|
|
776
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
777
|
-
width: "54",
|
|
778
|
-
height: "54"
|
|
779
|
-
}, props), /*#__PURE__*/React.createElement("rect", {
|
|
780
|
-
x: "15",
|
|
781
|
-
y: "17",
|
|
782
|
-
width: "24",
|
|
783
|
-
height: "4",
|
|
784
|
-
rx: "1"
|
|
785
|
-
}), /*#__PURE__*/React.createElement("rect", {
|
|
786
|
-
x: "15",
|
|
787
|
-
y: "25",
|
|
788
|
-
width: "24",
|
|
789
|
-
height: "4",
|
|
790
|
-
rx: "1"
|
|
791
|
-
}), /*#__PURE__*/React.createElement("rect", {
|
|
792
|
-
x: "15",
|
|
793
|
-
y: "33",
|
|
794
|
-
width: "13",
|
|
795
|
-
height: "4",
|
|
796
|
-
rx: "1"
|
|
797
|
-
})));
|
|
798
|
-
|
|
799
|
-
function _extends$7() { _extends$7 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$7.apply(this, arguments); }
|
|
800
|
-
var ColumnsIcon = (({
|
|
801
|
-
styles = {},
|
|
802
|
-
...props
|
|
803
|
-
}) => /*#__PURE__*/React.createElement("svg", _extends$7({
|
|
804
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
805
|
-
width: "54",
|
|
806
|
-
height: "54"
|
|
807
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
808
|
-
fillRule: "evenodd",
|
|
809
|
-
d: "M8 33v5a1 1 0 001 1h4v2H9a3 3 0 01-3-3v-5h2zm18 6v2H15v-2h11zm13 0v2H28v-2h11zm9-6v5a3 3 0 01-3 3h-4v-2h4a1 1 0 00.993-.883L46 38v-5h2zM8 22v9H6v-9h2zm40 0v9h-2v-9h2zm-35-9v2H9a1 1 0 00-.993.883L8 16v4H6v-4a3 3 0 013-3h4zm32 0a3 3 0 013 3v4h-2v-4a1 1 0 00-.883-.993L45 15h-4v-2h4zm-6 0v2H28v-2h11zm-13 0v2H15v-2h11z"
|
|
810
|
-
})));
|
|
811
|
-
|
|
812
|
-
function _extends$6() { _extends$6 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$6.apply(this, arguments); }
|
|
813
|
-
var NumberIcon = (({
|
|
814
|
-
styles = {},
|
|
815
|
-
...props
|
|
816
|
-
}) => /*#__PURE__*/React.createElement("svg", _extends$6({
|
|
817
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
818
|
-
width: "54",
|
|
819
|
-
height: "54"
|
|
820
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
821
|
-
fillRule: "evenodd",
|
|
822
|
-
d: "M45 16a3 3 0 013 3v16a3 3 0 01-3 3H9a3 3 0 01-3-3V19a3 3 0 013-3h36zm0 2H9a1 1 0 00-1 1v16a1 1 0 001 1h36a1 1 0 001-1V19a1 1 0 00-1-1zM35 28.444h7l-3.5 4-3.5-4zM35 26h7l-3.5-4-3.5 4z"
|
|
823
|
-
})));
|
|
824
|
-
|
|
825
|
-
function _extends$5() { _extends$5 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5.apply(this, arguments); }
|
|
826
|
-
var RadioIcon = (({
|
|
827
|
-
styles = {},
|
|
828
|
-
...props
|
|
829
|
-
}) => /*#__PURE__*/React.createElement("svg", _extends$5({
|
|
830
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
831
|
-
width: "54",
|
|
832
|
-
height: "54"
|
|
833
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
834
|
-
d: "M27 22c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
|
|
835
|
-
})));
|
|
836
|
-
|
|
837
|
-
function _extends$4() { _extends$4 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
|
|
838
|
-
var SelectIcon = (({
|
|
839
|
-
styles = {},
|
|
840
|
-
...props
|
|
841
|
-
}) => /*#__PURE__*/React.createElement("svg", _extends$4({
|
|
842
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
843
|
-
width: "54",
|
|
844
|
-
height: "54"
|
|
845
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
846
|
-
fillRule: "evenodd",
|
|
847
|
-
d: "M45 16a3 3 0 013 3v16a3 3 0 01-3 3H9a3 3 0 01-3-3V19a3 3 0 013-3h36zm0 2H9a1 1 0 00-1 1v16a1 1 0 001 1h36a1 1 0 001-1V19a1 1 0 00-1-1zm-12 7h9l-4.5 6-4.5-6z"
|
|
848
|
-
})));
|
|
849
|
-
|
|
850
|
-
function _extends$3() { _extends$3 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
|
|
851
|
-
var TextIcon = (({
|
|
852
|
-
styles = {},
|
|
853
|
-
...props
|
|
854
|
-
}) => /*#__PURE__*/React.createElement("svg", _extends$3({
|
|
855
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
856
|
-
width: "54",
|
|
857
|
-
height: "54"
|
|
858
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
859
|
-
d: "M20.58 33.77h-3l-1.18-3.08H11l-1.1 3.08H7l5.27-13.54h2.89zm-5-5.36l-1.86-5-1.83 5zM22 20.23h5.41a15.47 15.47 0 012.4.14 3.42 3.42 0 011.41.55 3.47 3.47 0 011 1.14 3 3 0 01.42 1.58 3.26 3.26 0 01-1.91 2.94 3.63 3.63 0 011.91 1.22 3.28 3.28 0 01.66 2 4 4 0 01-.43 1.8 3.63 3.63 0 01-1.09 1.4 3.89 3.89 0 01-1.83.65q-.69.07-3.3.09H22zm2.73 2.25v3.13h3.8a1.79 1.79 0 001.1-.49 1.41 1.41 0 00.41-1 1.49 1.49 0 00-.35-1 1.54 1.54 0 00-1-.48c-.27 0-1.05-.05-2.34-.05zm0 5.39v3.62h2.57a11.52 11.52 0 001.88-.09 1.65 1.65 0 001-.54 1.6 1.6 0 00.38-1.14 1.75 1.75 0 00-.29-1 1.69 1.69 0 00-.86-.62 9.28 9.28 0 00-2.41-.23zM44.35 28.79l2.65.84a5.94 5.94 0 01-2 3.29A5.74 5.74 0 0141.38 34a5.87 5.87 0 01-4.44-1.84 7.09 7.09 0 01-1.73-5A7.43 7.43 0 0137 21.87 6 6 0 0141.54 20a5.64 5.64 0 014 1.47A5.33 5.33 0 0147 24l-2.7.65a2.8 2.8 0 00-2.86-2.27A3.09 3.09 0 0039 23.42a5.31 5.31 0 00-.93 3.5 5.62 5.62 0 00.93 3.65 3 3 0 002.4 1.09 2.72 2.72 0 001.82-.66 4 4 0 001.13-2.21z"
|
|
860
|
-
})));
|
|
861
|
-
|
|
862
|
-
function _extends$2() { _extends$2 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
|
|
863
|
-
var TextfieldIcon = (({
|
|
864
|
-
styles = {},
|
|
865
|
-
...props
|
|
866
|
-
}) => /*#__PURE__*/React.createElement("svg", _extends$2({
|
|
867
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
868
|
-
width: "54",
|
|
869
|
-
height: "54"
|
|
870
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
871
|
-
fillRule: "evenodd",
|
|
872
|
-
d: "M45 16a3 3 0 013 3v16a3 3 0 01-3 3H9a3 3 0 01-3-3V19a3 3 0 013-3h36zm0 2H9a1 1 0 00-1 1v16a1 1 0 001 1h36a1 1 0 001-1V19a1 1 0 00-1-1zm-32 4v10h-2V22h2z"
|
|
873
|
-
})));
|
|
874
|
-
|
|
875
|
-
function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
|
|
876
|
-
var TextareaIcon = (({
|
|
877
|
-
styles = {},
|
|
878
|
-
...props
|
|
879
|
-
}) => /*#__PURE__*/React.createElement("svg", _extends$1({
|
|
880
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
881
|
-
width: "54",
|
|
882
|
-
height: "54"
|
|
883
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
884
|
-
fillRule: "evenodd",
|
|
885
|
-
d: "M45 13a3 3 0 013 3v22a3 3 0 01-3 3H9a3 3 0 01-3-3V16a3 3 0 013-3h36zm0 2H9a1 1 0 00-1 1v22a1 1 0 001 1h36a1 1 0 001-1V16a1 1 0 00-1-1zm-1.136 15.5l.848.849-6.363 6.363-.849-.848 6.364-6.364zm.264 3.5l.849.849-2.828 2.828-.849-.849L44.128 34zM13 19v10h-2V19h2z"
|
|
886
|
-
})));
|
|
887
|
-
|
|
888
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
889
|
-
var ImageIcon = (({
|
|
890
|
-
styles = {},
|
|
891
|
-
...props
|
|
892
|
-
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
893
|
-
width: "54",
|
|
894
|
-
height: "54",
|
|
895
|
-
fill: "none",
|
|
896
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
897
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
898
|
-
fillRule: "evenodd",
|
|
899
|
-
clipRule: "evenodd",
|
|
900
|
-
d: "M34.636 21.91A3.818 3.818 0 1127 21.908a3.818 3.818 0 017.636 0zm-2 0A1.818 1.818 0 1129 21.908a1.818 1.818 0 013.636 0z",
|
|
901
|
-
fill: "#000"
|
|
902
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
903
|
-
fillRule: "evenodd",
|
|
904
|
-
clipRule: "evenodd",
|
|
905
|
-
d: "M15 13a2 2 0 00-2 2v24a2 2 0 002 2h24a2 2 0 002-2V15a2 2 0 00-2-2H15zm24 2H15v12.45l4.71-4.709a1.91 1.91 0 012.702 0l6.695 6.695 2.656-1.77a1.91 1.91 0 012.411.239L39 32.73V15zM15 39v-8.754c.06-.038.116-.083.168-.135l5.893-5.893 6.684 6.685a1.911 1.911 0 002.41.238l2.657-1.77 6.02 6.02c.052.051.108.097.168.135V39H15z",
|
|
906
|
-
fill: "#000"
|
|
907
|
-
})));
|
|
908
|
-
|
|
909
|
-
const iconsByType = {
|
|
910
|
-
button: ButtonIcon,
|
|
911
|
-
checkbox: CheckboxIcon,
|
|
912
|
-
checklist: ChecklistIcon,
|
|
913
|
-
columns: ColumnsIcon,
|
|
914
|
-
image: ImageIcon,
|
|
915
|
-
number: NumberIcon,
|
|
916
|
-
radio: RadioIcon,
|
|
917
|
-
select: SelectIcon,
|
|
918
|
-
taglist: TaglistIcon,
|
|
919
|
-
text: TextIcon,
|
|
920
|
-
textfield: TextfieldIcon,
|
|
921
|
-
textarea: TextareaIcon,
|
|
922
|
-
default: FormIcon
|
|
923
|
-
};
|
|
924
|
-
|
|
925
708
|
function ContextPad(props) {
|
|
926
709
|
if (!props.children) {
|
|
927
710
|
return null;
|
|
@@ -1965,10 +1748,10 @@ function updatePath(formFieldRegistry, formField, index) {
|
|
|
1965
1748
|
}
|
|
1966
1749
|
|
|
1967
1750
|
class AddFormFieldHandler {
|
|
1968
|
-
/**
|
|
1969
|
-
* @constructor
|
|
1970
|
-
* @param { import('../../../FormEditor').default } formEditor
|
|
1971
|
-
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
1751
|
+
/**
|
|
1752
|
+
* @constructor
|
|
1753
|
+
* @param { import('../../../FormEditor').default } formEditor
|
|
1754
|
+
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
1972
1755
|
*/
|
|
1973
1756
|
constructor(formEditor, formFieldRegistry) {
|
|
1974
1757
|
this._formEditor = formEditor;
|
|
@@ -2029,10 +1812,10 @@ class AddFormFieldHandler {
|
|
|
2029
1812
|
AddFormFieldHandler.$inject = ['formEditor', 'formFieldRegistry'];
|
|
2030
1813
|
|
|
2031
1814
|
class EditFormFieldHandler {
|
|
2032
|
-
/**
|
|
2033
|
-
* @constructor
|
|
2034
|
-
* @param { import('../../../FormEditor').default } formEditor
|
|
2035
|
-
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
1815
|
+
/**
|
|
1816
|
+
* @constructor
|
|
1817
|
+
* @param { import('../../../FormEditor').default } formEditor
|
|
1818
|
+
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
2036
1819
|
*/
|
|
2037
1820
|
constructor(formEditor, formFieldRegistry) {
|
|
2038
1821
|
this._formEditor = formEditor;
|
|
@@ -2095,10 +1878,10 @@ class EditFormFieldHandler {
|
|
|
2095
1878
|
EditFormFieldHandler.$inject = ['formEditor', 'formFieldRegistry'];
|
|
2096
1879
|
|
|
2097
1880
|
class MoveFormFieldHandler {
|
|
2098
|
-
/**
|
|
2099
|
-
* @constructor
|
|
2100
|
-
* @param { import('../../../FormEditor').default } formEditor
|
|
2101
|
-
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
1881
|
+
/**
|
|
1882
|
+
* @constructor
|
|
1883
|
+
* @param { import('../../../FormEditor').default } formEditor
|
|
1884
|
+
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
2102
1885
|
*/
|
|
2103
1886
|
constructor(formEditor, formFieldRegistry) {
|
|
2104
1887
|
this._formEditor = formEditor;
|
|
@@ -2175,10 +1958,10 @@ class MoveFormFieldHandler {
|
|
|
2175
1958
|
MoveFormFieldHandler.$inject = ['formEditor', 'formFieldRegistry'];
|
|
2176
1959
|
|
|
2177
1960
|
class RemoveFormFieldHandler {
|
|
2178
|
-
/**
|
|
2179
|
-
* @constructor
|
|
2180
|
-
* @param { import('../../../FormEditor').default } formEditor
|
|
2181
|
-
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
1961
|
+
/**
|
|
1962
|
+
* @constructor
|
|
1963
|
+
* @param { import('../../../FormEditor').default } formEditor
|
|
1964
|
+
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
2182
1965
|
*/
|
|
2183
1966
|
constructor(formEditor, formFieldRegistry) {
|
|
2184
1967
|
this._formEditor = formEditor;
|
|
@@ -2238,9 +2021,9 @@ class RemoveFormFieldHandler {
|
|
|
2238
2021
|
RemoveFormFieldHandler.$inject = ['formEditor', 'formFieldRegistry'];
|
|
2239
2022
|
|
|
2240
2023
|
class UpdateIdClaimHandler {
|
|
2241
|
-
/**
|
|
2242
|
-
* @constructor
|
|
2243
|
-
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
2024
|
+
/**
|
|
2025
|
+
* @constructor
|
|
2026
|
+
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
2244
2027
|
*/
|
|
2245
2028
|
constructor(formFieldRegistry) {
|
|
2246
2029
|
this._formFieldRegistry = formFieldRegistry;
|
|
@@ -2273,9 +2056,9 @@ class UpdateIdClaimHandler {
|
|
|
2273
2056
|
UpdateIdClaimHandler.$inject = ['formFieldRegistry'];
|
|
2274
2057
|
|
|
2275
2058
|
class UpdateKeyClaimHandler {
|
|
2276
|
-
/**
|
|
2277
|
-
* @constructor
|
|
2278
|
-
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
2059
|
+
/**
|
|
2060
|
+
* @constructor
|
|
2061
|
+
* @param { import('../../../core/FormFieldRegistry').default } formFieldRegistry
|
|
2279
2062
|
*/
|
|
2280
2063
|
constructor(formFieldRegistry) {
|
|
2281
2064
|
this._formFieldRegistry = formFieldRegistry;
|
|
@@ -3094,6 +2877,9 @@ const types = [{
|
|
|
3094
2877
|
}, {
|
|
3095
2878
|
label: 'Number',
|
|
3096
2879
|
type: 'number'
|
|
2880
|
+
}, {
|
|
2881
|
+
label: 'Datetime',
|
|
2882
|
+
type: 'datetime'
|
|
3097
2883
|
}, {
|
|
3098
2884
|
label: 'Checkbox',
|
|
3099
2885
|
type: 'checkbox'
|
|
@@ -3110,7 +2896,7 @@ const types = [{
|
|
|
3110
2896
|
label: 'Select',
|
|
3111
2897
|
type: 'select'
|
|
3112
2898
|
}, {
|
|
3113
|
-
label: 'Text',
|
|
2899
|
+
label: 'Text view',
|
|
3114
2900
|
type: 'text'
|
|
3115
2901
|
}, {
|
|
3116
2902
|
label: 'Image view',
|
|
@@ -3170,10 +2956,10 @@ class PaletteRenderer {
|
|
|
3170
2956
|
});
|
|
3171
2957
|
}
|
|
3172
2958
|
|
|
3173
|
-
/**
|
|
3174
|
-
* Attach the palette to a parent node.
|
|
3175
|
-
*
|
|
3176
|
-
* @param {HTMLElement} container
|
|
2959
|
+
/**
|
|
2960
|
+
* Attach the palette to a parent node.
|
|
2961
|
+
*
|
|
2962
|
+
* @param {HTMLElement} container
|
|
3177
2963
|
*/
|
|
3178
2964
|
attachTo(container) {
|
|
3179
2965
|
if (!container) {
|
|
@@ -3193,8 +2979,8 @@ class PaletteRenderer {
|
|
|
3193
2979
|
this._eventBus.fire('palette.attach');
|
|
3194
2980
|
}
|
|
3195
2981
|
|
|
3196
|
-
/**
|
|
3197
|
-
* Detach the palette from its parent node.
|
|
2982
|
+
/**
|
|
2983
|
+
* Detach the palette from its parent node.
|
|
3198
2984
|
*/
|
|
3199
2985
|
detach() {
|
|
3200
2986
|
const parentNode = this._container.parentNode;
|
|
@@ -4670,7 +4456,7 @@ const OptionalFeelInput = forwardRef((props, ref) => {
|
|
|
4670
4456
|
value: value || ''
|
|
4671
4457
|
});
|
|
4672
4458
|
});
|
|
4673
|
-
forwardRef((props, ref) => {
|
|
4459
|
+
const OptionalFeelTextArea = forwardRef((props, ref) => {
|
|
4674
4460
|
const {
|
|
4675
4461
|
id,
|
|
4676
4462
|
disabled,
|
|
@@ -4804,6 +4590,28 @@ function FeelEntry(props) {
|
|
|
4804
4590
|
})]
|
|
4805
4591
|
});
|
|
4806
4592
|
}
|
|
4593
|
+
|
|
4594
|
+
/**
|
|
4595
|
+
* @param {Object} props
|
|
4596
|
+
* @param {Object} props.element
|
|
4597
|
+
* @param {String} props.id
|
|
4598
|
+
* @param {String} props.description
|
|
4599
|
+
* @param {Boolean} props.debounce
|
|
4600
|
+
* @param {Boolean} props.disabled
|
|
4601
|
+
* @param {String} props.label
|
|
4602
|
+
* @param {Function} props.getValue
|
|
4603
|
+
* @param {Function} props.setValue
|
|
4604
|
+
* @param {Function} props.onFocus
|
|
4605
|
+
* @param {Function} props.onBlur
|
|
4606
|
+
* @param {Function} props.validate
|
|
4607
|
+
*/
|
|
4608
|
+
function FeelTextArea(props) {
|
|
4609
|
+
return jsx(FeelEntry, {
|
|
4610
|
+
class: "bio-properties-panel-feel-textarea",
|
|
4611
|
+
OptionalComponent: OptionalFeelTextArea,
|
|
4612
|
+
...props
|
|
4613
|
+
});
|
|
4614
|
+
}
|
|
4807
4615
|
function isEdited$6(node) {
|
|
4808
4616
|
return node && (!!node.value || node.classList.contains('edited'));
|
|
4809
4617
|
}
|
|
@@ -5309,11 +5117,11 @@ function prefixId$1(id) {
|
|
|
5309
5117
|
return `bio-properties-panel-${id}`;
|
|
5310
5118
|
}
|
|
5311
5119
|
|
|
5312
|
-
/**
|
|
5313
|
-
* @param {string} type
|
|
5314
|
-
* @param {boolean} [strict]
|
|
5315
|
-
*
|
|
5316
|
-
* @returns {any}
|
|
5120
|
+
/**
|
|
5121
|
+
* @param {string} type
|
|
5122
|
+
* @param {boolean} [strict]
|
|
5123
|
+
*
|
|
5124
|
+
* @returns {any}
|
|
5317
5125
|
*/
|
|
5318
5126
|
function getService(type, strict) {}
|
|
5319
5127
|
const PropertiesPanelContext = createContext({
|
|
@@ -5345,7 +5153,7 @@ function textToLabel(text) {
|
|
|
5345
5153
|
}
|
|
5346
5154
|
return null;
|
|
5347
5155
|
}
|
|
5348
|
-
const INPUTS = ['checkbox', 'checklist', 'number', 'radio', 'select', 'taglist', 'textfield', 'textarea'];
|
|
5156
|
+
const INPUTS = ['checkbox', 'checklist', 'datetime', 'number', 'radio', 'select', 'taglist', 'textfield', 'textarea'];
|
|
5349
5157
|
const VALUES_INPUTS = ['checklist', 'radio', 'select', 'taglist'];
|
|
5350
5158
|
|
|
5351
5159
|
const labelsByType = {
|
|
@@ -5354,12 +5162,13 @@ const labelsByType = {
|
|
|
5354
5162
|
checklist: 'CHECKLIST',
|
|
5355
5163
|
columns: 'COLUMNS',
|
|
5356
5164
|
default: 'FORM',
|
|
5357
|
-
|
|
5165
|
+
datetime: 'DATETIME',
|
|
5166
|
+
image: 'IMAGE VIEW',
|
|
5358
5167
|
number: 'NUMBER',
|
|
5359
5168
|
radio: 'RADIO',
|
|
5360
5169
|
select: 'SELECT',
|
|
5361
5170
|
taglist: 'TAGLIST',
|
|
5362
|
-
text: 'TEXT',
|
|
5171
|
+
text: 'TEXT VIEW',
|
|
5363
5172
|
textfield: 'TEXT FIELD',
|
|
5364
5173
|
textarea: 'TEXT AREA'
|
|
5365
5174
|
};
|
|
@@ -5400,8 +5209,8 @@ const PropertiesPanelHeaderProvider = {
|
|
|
5400
5209
|
}
|
|
5401
5210
|
};
|
|
5402
5211
|
|
|
5403
|
-
/**
|
|
5404
|
-
* Provide placeholders for empty and multiple state.
|
|
5212
|
+
/**
|
|
5213
|
+
* Provide placeholders for empty and multiple state.
|
|
5405
5214
|
*/
|
|
5406
5215
|
const PropertiesPanelPlaceholderProvider = {
|
|
5407
5216
|
getEmpty: () => {
|
|
@@ -5473,10 +5282,10 @@ function useService (type, strict) {
|
|
|
5473
5282
|
return getService(type, strict);
|
|
5474
5283
|
}
|
|
5475
5284
|
|
|
5476
|
-
/**
|
|
5477
|
-
* Retrieve list of variables from the form schema.
|
|
5478
|
-
*
|
|
5479
|
-
* @returns { string[] } list of variables used in form schema
|
|
5285
|
+
/**
|
|
5286
|
+
* Retrieve list of variables from the form schema.
|
|
5287
|
+
*
|
|
5288
|
+
* @returns { string[] } list of variables used in form schema
|
|
5480
5289
|
*/
|
|
5481
5290
|
function useVariables() {
|
|
5482
5291
|
const form = useService('formEditor');
|
|
@@ -6042,48 +5851,83 @@ function Key$1(props) {
|
|
|
6042
5851
|
});
|
|
6043
5852
|
}
|
|
6044
5853
|
|
|
6045
|
-
function
|
|
5854
|
+
function simpleStringEntryFactory(options) {
|
|
5855
|
+
const {
|
|
5856
|
+
id,
|
|
5857
|
+
label,
|
|
5858
|
+
path,
|
|
5859
|
+
props
|
|
5860
|
+
} = options;
|
|
6046
5861
|
const {
|
|
6047
5862
|
editField,
|
|
6048
5863
|
field
|
|
6049
5864
|
} = props;
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
field: field,
|
|
6060
|
-
isEdited: isEdited$1
|
|
6061
|
-
});
|
|
6062
|
-
}
|
|
6063
|
-
return entries;
|
|
5865
|
+
return {
|
|
5866
|
+
id,
|
|
5867
|
+
label,
|
|
5868
|
+
path,
|
|
5869
|
+
field,
|
|
5870
|
+
editField,
|
|
5871
|
+
component: SimpleStringComponent,
|
|
5872
|
+
isEdited: isEdited$1
|
|
5873
|
+
};
|
|
6064
5874
|
}
|
|
6065
|
-
|
|
5875
|
+
const SimpleStringComponent = props => {
|
|
6066
5876
|
const {
|
|
6067
|
-
|
|
5877
|
+
id,
|
|
5878
|
+
label,
|
|
5879
|
+
path,
|
|
6068
5880
|
field,
|
|
6069
|
-
|
|
5881
|
+
editField
|
|
6070
5882
|
} = props;
|
|
6071
5883
|
const debounce = useService('debounce');
|
|
6072
|
-
const
|
|
6073
|
-
const
|
|
6074
|
-
return get(field, path, '');
|
|
6075
|
-
};
|
|
6076
|
-
const setValue = value => {
|
|
6077
|
-
return editField(field, path, value);
|
|
6078
|
-
};
|
|
5884
|
+
const getValue = () => get(field, path, '');
|
|
5885
|
+
const setValue = value => editField(field, path, value);
|
|
6079
5886
|
return TextfieldEntry({
|
|
6080
5887
|
debounce,
|
|
6081
5888
|
element: field,
|
|
6082
5889
|
getValue,
|
|
6083
5890
|
id,
|
|
6084
|
-
label
|
|
5891
|
+
label,
|
|
6085
5892
|
setValue
|
|
6086
5893
|
});
|
|
5894
|
+
};
|
|
5895
|
+
|
|
5896
|
+
function LabelEntry(props) {
|
|
5897
|
+
const {
|
|
5898
|
+
field
|
|
5899
|
+
} = props;
|
|
5900
|
+
const {
|
|
5901
|
+
type,
|
|
5902
|
+
subtype
|
|
5903
|
+
} = field;
|
|
5904
|
+
const entries = [];
|
|
5905
|
+
if (type === 'datetime') {
|
|
5906
|
+
if (subtype === DATETIME_SUBTYPES.DATE || subtype === DATETIME_SUBTYPES.DATETIME) {
|
|
5907
|
+
entries.push(simpleStringEntryFactory({
|
|
5908
|
+
id: 'date-label',
|
|
5909
|
+
path: DATE_LABEL_PATH,
|
|
5910
|
+
label: 'Date label',
|
|
5911
|
+
props
|
|
5912
|
+
}));
|
|
5913
|
+
}
|
|
5914
|
+
if (subtype === DATETIME_SUBTYPES.TIME || subtype === DATETIME_SUBTYPES.DATETIME) {
|
|
5915
|
+
entries.push(simpleStringEntryFactory({
|
|
5916
|
+
id: 'time-label',
|
|
5917
|
+
path: TIME_LABEL_PATH,
|
|
5918
|
+
label: 'Time label',
|
|
5919
|
+
props
|
|
5920
|
+
}));
|
|
5921
|
+
}
|
|
5922
|
+
} else if (INPUTS.includes(type) || type === 'button') {
|
|
5923
|
+
entries.push(simpleStringEntryFactory({
|
|
5924
|
+
id: 'label',
|
|
5925
|
+
path: ['label'],
|
|
5926
|
+
label: 'Field label',
|
|
5927
|
+
props
|
|
5928
|
+
}));
|
|
5929
|
+
}
|
|
5930
|
+
return entries;
|
|
6087
5931
|
}
|
|
6088
5932
|
|
|
6089
5933
|
function SourceEntry(props) {
|
|
@@ -6144,17 +5988,16 @@ function TextEntry(props) {
|
|
|
6144
5988
|
const {
|
|
6145
5989
|
type
|
|
6146
5990
|
} = field;
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
entries.push({
|
|
6150
|
-
id: 'text',
|
|
6151
|
-
component: Text,
|
|
6152
|
-
editField: editField,
|
|
6153
|
-
field: field,
|
|
6154
|
-
isEdited: isEdited$2
|
|
6155
|
-
});
|
|
5991
|
+
if (type !== 'text') {
|
|
5992
|
+
return [];
|
|
6156
5993
|
}
|
|
6157
|
-
return
|
|
5994
|
+
return [{
|
|
5995
|
+
id: 'text',
|
|
5996
|
+
component: Text,
|
|
5997
|
+
editField: editField,
|
|
5998
|
+
field: field,
|
|
5999
|
+
isEdited: isEdited$6
|
|
6000
|
+
}];
|
|
6158
6001
|
}
|
|
6159
6002
|
function Text(props) {
|
|
6160
6003
|
const {
|
|
@@ -6163,6 +6006,9 @@ function Text(props) {
|
|
|
6163
6006
|
id
|
|
6164
6007
|
} = props;
|
|
6165
6008
|
const debounce = useService('debounce');
|
|
6009
|
+
const variables = useVariables().map(name => ({
|
|
6010
|
+
name
|
|
6011
|
+
}));
|
|
6166
6012
|
const path = ['text'];
|
|
6167
6013
|
const getValue = () => {
|
|
6168
6014
|
return get(field, path, '');
|
|
@@ -6170,15 +6016,17 @@ function Text(props) {
|
|
|
6170
6016
|
const setValue = value => {
|
|
6171
6017
|
return editField(field, path, value);
|
|
6172
6018
|
};
|
|
6173
|
-
return
|
|
6019
|
+
return FeelTextArea({
|
|
6174
6020
|
debounce,
|
|
6175
|
-
description: 'Use Markdown or basic HTML to format.',
|
|
6021
|
+
description: 'Use an Expression, Markdown or basic HTML to format.',
|
|
6176
6022
|
element: field,
|
|
6023
|
+
feel: 'optional',
|
|
6177
6024
|
getValue,
|
|
6178
6025
|
id,
|
|
6179
6026
|
label: 'Text',
|
|
6180
6027
|
rows: 10,
|
|
6181
|
-
setValue
|
|
6028
|
+
setValue,
|
|
6029
|
+
variables
|
|
6182
6030
|
});
|
|
6183
6031
|
}
|
|
6184
6032
|
|
|
@@ -6271,8 +6119,7 @@ function NumberArrowStep(props) {
|
|
|
6271
6119
|
function NumberSerializationEntry(props) {
|
|
6272
6120
|
const {
|
|
6273
6121
|
editField,
|
|
6274
|
-
field
|
|
6275
|
-
id
|
|
6122
|
+
field
|
|
6276
6123
|
} = props;
|
|
6277
6124
|
const {
|
|
6278
6125
|
type
|
|
@@ -6282,7 +6129,7 @@ function NumberSerializationEntry(props) {
|
|
|
6282
6129
|
}
|
|
6283
6130
|
const entries = [];
|
|
6284
6131
|
entries.push({
|
|
6285
|
-
id:
|
|
6132
|
+
id: 'serialize-to-string',
|
|
6286
6133
|
component: SerializeToString,
|
|
6287
6134
|
isEdited: isEdited$7,
|
|
6288
6135
|
editField,
|
|
@@ -6320,6 +6167,243 @@ function SerializeToString(props) {
|
|
|
6320
6167
|
});
|
|
6321
6168
|
}
|
|
6322
6169
|
|
|
6170
|
+
function DateTimeEntry(props) {
|
|
6171
|
+
const {
|
|
6172
|
+
editField,
|
|
6173
|
+
field
|
|
6174
|
+
} = props;
|
|
6175
|
+
const {
|
|
6176
|
+
type,
|
|
6177
|
+
subtype
|
|
6178
|
+
} = field;
|
|
6179
|
+
if (type !== 'datetime') {
|
|
6180
|
+
return [];
|
|
6181
|
+
}
|
|
6182
|
+
const entries = [{
|
|
6183
|
+
id: 'subtype',
|
|
6184
|
+
component: DateTimeSubtypeSelect,
|
|
6185
|
+
isEdited: isEdited$4,
|
|
6186
|
+
editField,
|
|
6187
|
+
field
|
|
6188
|
+
}];
|
|
6189
|
+
if (subtype === DATETIME_SUBTYPES.TIME || subtype === DATETIME_SUBTYPES.DATETIME) {
|
|
6190
|
+
entries.push({
|
|
6191
|
+
id: 'use24h',
|
|
6192
|
+
component: Use24h,
|
|
6193
|
+
isEdited: isEdited$7,
|
|
6194
|
+
editField,
|
|
6195
|
+
field
|
|
6196
|
+
});
|
|
6197
|
+
}
|
|
6198
|
+
return entries;
|
|
6199
|
+
}
|
|
6200
|
+
function DateTimeSubtypeSelect(props) {
|
|
6201
|
+
const {
|
|
6202
|
+
editField,
|
|
6203
|
+
field,
|
|
6204
|
+
id
|
|
6205
|
+
} = props;
|
|
6206
|
+
const getValue = e => get(field, DATETIME_SUBTYPE_PATH);
|
|
6207
|
+
const clearTimeConfig = () => {
|
|
6208
|
+
const timeConfigPaths = [TIME_LABEL_PATH, TIME_USE24H_PATH, TIME_INTERVAL_PATH, TIME_SERIALISING_FORMAT_PATH];
|
|
6209
|
+
for (const path of timeConfigPaths) {
|
|
6210
|
+
editField(field, path, undefined);
|
|
6211
|
+
}
|
|
6212
|
+
};
|
|
6213
|
+
const initTimeConfig = () => {
|
|
6214
|
+
editField(field, TIME_LABEL_PATH, 'Time');
|
|
6215
|
+
editField(field, TIME_SERIALISING_FORMAT_PATH, TIME_SERIALISING_FORMATS.UTC_OFFSET);
|
|
6216
|
+
editField(field, TIME_INTERVAL_PATH, 15);
|
|
6217
|
+
};
|
|
6218
|
+
const clearDateConfig = () => {
|
|
6219
|
+
const dateConfigPaths = [DATE_LABEL_PATH, DATE_DISALLOW_PAST_PATH];
|
|
6220
|
+
for (const path of dateConfigPaths) {
|
|
6221
|
+
editField(field, path, undefined);
|
|
6222
|
+
}
|
|
6223
|
+
};
|
|
6224
|
+
const initDateConfig = () => {
|
|
6225
|
+
editField(field, DATE_LABEL_PATH, 'Date');
|
|
6226
|
+
};
|
|
6227
|
+
const setValue = value => {
|
|
6228
|
+
const oldValue = getValue();
|
|
6229
|
+
if (oldValue === value) return;
|
|
6230
|
+
if (value === DATETIME_SUBTYPES.DATE) {
|
|
6231
|
+
clearTimeConfig();
|
|
6232
|
+
oldValue === DATETIME_SUBTYPES.TIME && initDateConfig();
|
|
6233
|
+
} else if (value === DATETIME_SUBTYPES.TIME) {
|
|
6234
|
+
clearDateConfig();
|
|
6235
|
+
oldValue === DATETIME_SUBTYPES.DATE && initTimeConfig();
|
|
6236
|
+
} else if (value === DATETIME_SUBTYPES.DATETIME) {
|
|
6237
|
+
oldValue === DATETIME_SUBTYPES.DATE && initTimeConfig();
|
|
6238
|
+
oldValue === DATETIME_SUBTYPES.TIME && initDateConfig();
|
|
6239
|
+
}
|
|
6240
|
+
return editField(field, DATETIME_SUBTYPE_PATH, value);
|
|
6241
|
+
};
|
|
6242
|
+
const getDatetimeSubtypes = () => {
|
|
6243
|
+
return Object.values(DATETIME_SUBTYPES).map(subtype => ({
|
|
6244
|
+
label: DATETIME_SUBTYPES_LABELS[subtype],
|
|
6245
|
+
value: subtype
|
|
6246
|
+
}));
|
|
6247
|
+
};
|
|
6248
|
+
return SelectEntry({
|
|
6249
|
+
label: 'Subtype',
|
|
6250
|
+
element: field,
|
|
6251
|
+
getOptions: getDatetimeSubtypes,
|
|
6252
|
+
getValue,
|
|
6253
|
+
id,
|
|
6254
|
+
setValue
|
|
6255
|
+
});
|
|
6256
|
+
}
|
|
6257
|
+
function Use24h(props) {
|
|
6258
|
+
const {
|
|
6259
|
+
editField,
|
|
6260
|
+
field,
|
|
6261
|
+
id
|
|
6262
|
+
} = props;
|
|
6263
|
+
const path = TIME_USE24H_PATH;
|
|
6264
|
+
const getValue = () => {
|
|
6265
|
+
return get(field, path, '');
|
|
6266
|
+
};
|
|
6267
|
+
const setValue = value => {
|
|
6268
|
+
return editField(field, path, value);
|
|
6269
|
+
};
|
|
6270
|
+
return CheckboxEntry({
|
|
6271
|
+
element: field,
|
|
6272
|
+
getValue,
|
|
6273
|
+
id,
|
|
6274
|
+
label: 'Use 24h',
|
|
6275
|
+
setValue
|
|
6276
|
+
});
|
|
6277
|
+
}
|
|
6278
|
+
|
|
6279
|
+
function DateTimeConstraintsEntry(props) {
|
|
6280
|
+
const {
|
|
6281
|
+
editField,
|
|
6282
|
+
field,
|
|
6283
|
+
id
|
|
6284
|
+
} = props;
|
|
6285
|
+
const {
|
|
6286
|
+
type,
|
|
6287
|
+
subtype
|
|
6288
|
+
} = field;
|
|
6289
|
+
if (type !== 'datetime') {
|
|
6290
|
+
return [];
|
|
6291
|
+
}
|
|
6292
|
+
const entries = [];
|
|
6293
|
+
if (subtype === DATETIME_SUBTYPES.TIME || subtype === DATETIME_SUBTYPES.DATETIME) {
|
|
6294
|
+
entries.push({
|
|
6295
|
+
id: id + '-timeInterval',
|
|
6296
|
+
component: TimeIntervalSelect,
|
|
6297
|
+
isEdited: isEdited$4,
|
|
6298
|
+
editField,
|
|
6299
|
+
field
|
|
6300
|
+
});
|
|
6301
|
+
}
|
|
6302
|
+
if (subtype === DATETIME_SUBTYPES.DATE || subtype === DATETIME_SUBTYPES.DATETIME) {
|
|
6303
|
+
entries.push({
|
|
6304
|
+
id: id + '-disallowPassedDates',
|
|
6305
|
+
component: DisallowPassedDates,
|
|
6306
|
+
isEdited: isEdited$7,
|
|
6307
|
+
editField,
|
|
6308
|
+
field
|
|
6309
|
+
});
|
|
6310
|
+
}
|
|
6311
|
+
return entries;
|
|
6312
|
+
}
|
|
6313
|
+
function DisallowPassedDates(props) {
|
|
6314
|
+
const {
|
|
6315
|
+
editField,
|
|
6316
|
+
field,
|
|
6317
|
+
id
|
|
6318
|
+
} = props;
|
|
6319
|
+
const path = DATE_DISALLOW_PAST_PATH;
|
|
6320
|
+
const getValue = () => {
|
|
6321
|
+
return get(field, path, '');
|
|
6322
|
+
};
|
|
6323
|
+
const setValue = value => {
|
|
6324
|
+
return editField(field, path, value);
|
|
6325
|
+
};
|
|
6326
|
+
return CheckboxEntry({
|
|
6327
|
+
element: field,
|
|
6328
|
+
getValue,
|
|
6329
|
+
id,
|
|
6330
|
+
label: 'Disallow past dates',
|
|
6331
|
+
setValue
|
|
6332
|
+
});
|
|
6333
|
+
}
|
|
6334
|
+
function TimeIntervalSelect(props) {
|
|
6335
|
+
const {
|
|
6336
|
+
editField,
|
|
6337
|
+
field,
|
|
6338
|
+
id
|
|
6339
|
+
} = props;
|
|
6340
|
+
const timeIntervals = [1, 5, 10, 15, 30, 60];
|
|
6341
|
+
const getValue = e => get(field, TIME_INTERVAL_PATH);
|
|
6342
|
+
const setValue = value => editField(field, TIME_INTERVAL_PATH, parseInt(value));
|
|
6343
|
+
const getTimeIntervals = () => {
|
|
6344
|
+
return timeIntervals.map(timeInterval => ({
|
|
6345
|
+
label: timeInterval === 60 ? '1h' : timeInterval + 'm',
|
|
6346
|
+
value: timeInterval
|
|
6347
|
+
}));
|
|
6348
|
+
};
|
|
6349
|
+
return SelectEntry({
|
|
6350
|
+
label: 'Time interval',
|
|
6351
|
+
element: field,
|
|
6352
|
+
getOptions: getTimeIntervals,
|
|
6353
|
+
getValue,
|
|
6354
|
+
id,
|
|
6355
|
+
setValue
|
|
6356
|
+
});
|
|
6357
|
+
}
|
|
6358
|
+
|
|
6359
|
+
function DateTimeFormatEntry(props) {
|
|
6360
|
+
const {
|
|
6361
|
+
editField,
|
|
6362
|
+
field
|
|
6363
|
+
} = props;
|
|
6364
|
+
const {
|
|
6365
|
+
type,
|
|
6366
|
+
subtype
|
|
6367
|
+
} = field;
|
|
6368
|
+
if (type !== 'datetime') {
|
|
6369
|
+
return [];
|
|
6370
|
+
}
|
|
6371
|
+
const entries = [];
|
|
6372
|
+
if (subtype === DATETIME_SUBTYPES.TIME || subtype === DATETIME_SUBTYPES.DATETIME) {
|
|
6373
|
+
entries.push({
|
|
6374
|
+
id: 'time-format',
|
|
6375
|
+
component: TimeFormatSelect,
|
|
6376
|
+
isEdited: isEdited$4,
|
|
6377
|
+
editField,
|
|
6378
|
+
field
|
|
6379
|
+
});
|
|
6380
|
+
}
|
|
6381
|
+
return entries;
|
|
6382
|
+
}
|
|
6383
|
+
function TimeFormatSelect(props) {
|
|
6384
|
+
const {
|
|
6385
|
+
editField,
|
|
6386
|
+
field,
|
|
6387
|
+
id
|
|
6388
|
+
} = props;
|
|
6389
|
+
const getValue = e => get(field, TIME_SERIALISING_FORMAT_PATH);
|
|
6390
|
+
const setValue = value => editField(field, TIME_SERIALISING_FORMAT_PATH, value);
|
|
6391
|
+
const getTimeSerialisingFormats = () => {
|
|
6392
|
+
return Object.values(TIME_SERIALISING_FORMATS).map(format => ({
|
|
6393
|
+
label: TIME_SERIALISINGFORMAT_LABELS[format],
|
|
6394
|
+
value: format
|
|
6395
|
+
}));
|
|
6396
|
+
};
|
|
6397
|
+
return SelectEntry({
|
|
6398
|
+
label: 'Time format',
|
|
6399
|
+
element: field,
|
|
6400
|
+
getOptions: getTimeSerialisingFormats,
|
|
6401
|
+
getValue,
|
|
6402
|
+
id,
|
|
6403
|
+
setValue
|
|
6404
|
+
});
|
|
6405
|
+
}
|
|
6406
|
+
|
|
6323
6407
|
function ValueEntry(props) {
|
|
6324
6408
|
const {
|
|
6325
6409
|
editField,
|
|
@@ -6486,14 +6570,14 @@ function Value(props) {
|
|
|
6486
6570
|
|
|
6487
6571
|
// helpers //////////
|
|
6488
6572
|
|
|
6489
|
-
/**
|
|
6490
|
-
* Returns copy of object with updated value.
|
|
6491
|
-
*
|
|
6492
|
-
* @param {Object} properties
|
|
6493
|
-
* @param {string} key
|
|
6494
|
-
* @param {string} value
|
|
6495
|
-
*
|
|
6496
|
-
* @returns {Object}
|
|
6573
|
+
/**
|
|
6574
|
+
* Returns copy of object with updated value.
|
|
6575
|
+
*
|
|
6576
|
+
* @param {Object} properties
|
|
6577
|
+
* @param {string} key
|
|
6578
|
+
* @param {string} value
|
|
6579
|
+
*
|
|
6580
|
+
* @returns {Object}
|
|
6497
6581
|
*/
|
|
6498
6582
|
function updateValue(properties, key, value) {
|
|
6499
6583
|
return {
|
|
@@ -6502,14 +6586,14 @@ function updateValue(properties, key, value) {
|
|
|
6502
6586
|
};
|
|
6503
6587
|
}
|
|
6504
6588
|
|
|
6505
|
-
/**
|
|
6506
|
-
* Returns copy of object with updated key.
|
|
6507
|
-
*
|
|
6508
|
-
* @param {Object} properties
|
|
6509
|
-
* @param {string} oldKey
|
|
6510
|
-
* @param {string} newKey
|
|
6511
|
-
*
|
|
6512
|
-
* @returns {Object}
|
|
6589
|
+
/**
|
|
6590
|
+
* Returns copy of object with updated key.
|
|
6591
|
+
*
|
|
6592
|
+
* @param {Object} properties
|
|
6593
|
+
* @param {string} oldKey
|
|
6594
|
+
* @param {string} newKey
|
|
6595
|
+
*
|
|
6596
|
+
* @returns {Object}
|
|
6513
6597
|
*/
|
|
6514
6598
|
function updateKey(properties, oldKey, newKey) {
|
|
6515
6599
|
return Object.entries(properties).reduce((newProperties, entry) => {
|
|
@@ -6521,37 +6605,6 @@ function updateKey(properties, oldKey, newKey) {
|
|
|
6521
6605
|
}, {});
|
|
6522
6606
|
}
|
|
6523
6607
|
|
|
6524
|
-
// config ///////////////////
|
|
6525
|
-
|
|
6526
|
-
const VALUES_SOURCES = {
|
|
6527
|
-
STATIC: 'static',
|
|
6528
|
-
INPUT: 'input'
|
|
6529
|
-
};
|
|
6530
|
-
const VALUES_SOURCE_DEFAULT = VALUES_SOURCES.STATIC;
|
|
6531
|
-
const VALUES_SOURCES_LABELS = {
|
|
6532
|
-
[VALUES_SOURCES.STATIC]: 'Static',
|
|
6533
|
-
[VALUES_SOURCES.INPUT]: 'Input data'
|
|
6534
|
-
};
|
|
6535
|
-
const VALUES_SOURCES_PATHS = {
|
|
6536
|
-
[VALUES_SOURCES.STATIC]: ['values'],
|
|
6537
|
-
[VALUES_SOURCES.INPUT]: ['valuesKey']
|
|
6538
|
-
};
|
|
6539
|
-
const VALUES_SOURCES_DEFAULTS = {
|
|
6540
|
-
[VALUES_SOURCES.STATIC]: [],
|
|
6541
|
-
[VALUES_SOURCES.INPUT]: ''
|
|
6542
|
-
};
|
|
6543
|
-
|
|
6544
|
-
// helpers ///////////////////
|
|
6545
|
-
|
|
6546
|
-
function getValuesSource(field) {
|
|
6547
|
-
for (const source of Object.values(VALUES_SOURCES)) {
|
|
6548
|
-
if (get(field, VALUES_SOURCES_PATHS[source]) !== undefined) {
|
|
6549
|
-
return source;
|
|
6550
|
-
}
|
|
6551
|
-
}
|
|
6552
|
-
return VALUES_SOURCE_DEFAULT;
|
|
6553
|
-
}
|
|
6554
|
-
|
|
6555
6608
|
function ValuesSourceSelectEntry(props) {
|
|
6556
6609
|
const {
|
|
6557
6610
|
editField,
|
|
@@ -6718,6 +6771,83 @@ function getIndexedEntry(index) {
|
|
|
6718
6771
|
return entry;
|
|
6719
6772
|
}
|
|
6720
6773
|
|
|
6774
|
+
function AdornerEntry(props) {
|
|
6775
|
+
const {
|
|
6776
|
+
editField,
|
|
6777
|
+
field
|
|
6778
|
+
} = props;
|
|
6779
|
+
const {
|
|
6780
|
+
type
|
|
6781
|
+
} = field;
|
|
6782
|
+
const entries = [];
|
|
6783
|
+
const onChange = key => {
|
|
6784
|
+
return value => {
|
|
6785
|
+
const appearance = get(field, ['appearance'], {});
|
|
6786
|
+
editField(field, ['appearance'], set(appearance, [key], value));
|
|
6787
|
+
};
|
|
6788
|
+
};
|
|
6789
|
+
const getValue = key => {
|
|
6790
|
+
return () => {
|
|
6791
|
+
return get(field, ['appearance', key]);
|
|
6792
|
+
};
|
|
6793
|
+
};
|
|
6794
|
+
if (['number', 'textfield'].includes(type)) {
|
|
6795
|
+
entries.push({
|
|
6796
|
+
id: 'prefix-adorner',
|
|
6797
|
+
component: PrefixAdorner,
|
|
6798
|
+
isEdited: isEdited$1,
|
|
6799
|
+
editField,
|
|
6800
|
+
field,
|
|
6801
|
+
onChange,
|
|
6802
|
+
getValue
|
|
6803
|
+
});
|
|
6804
|
+
entries.push({
|
|
6805
|
+
id: 'suffix-adorner',
|
|
6806
|
+
component: SuffixAdorner,
|
|
6807
|
+
isEdited: isEdited$1,
|
|
6808
|
+
editField,
|
|
6809
|
+
field,
|
|
6810
|
+
onChange,
|
|
6811
|
+
getValue
|
|
6812
|
+
});
|
|
6813
|
+
}
|
|
6814
|
+
return entries;
|
|
6815
|
+
}
|
|
6816
|
+
function PrefixAdorner(props) {
|
|
6817
|
+
const {
|
|
6818
|
+
field,
|
|
6819
|
+
id,
|
|
6820
|
+
onChange,
|
|
6821
|
+
getValue
|
|
6822
|
+
} = props;
|
|
6823
|
+
const debounce = useService('debounce');
|
|
6824
|
+
return TextfieldEntry({
|
|
6825
|
+
debounce,
|
|
6826
|
+
element: field,
|
|
6827
|
+
getValue: getValue('prefixAdorner'),
|
|
6828
|
+
id,
|
|
6829
|
+
label: 'Prefix',
|
|
6830
|
+
setValue: onChange('prefixAdorner')
|
|
6831
|
+
});
|
|
6832
|
+
}
|
|
6833
|
+
function SuffixAdorner(props) {
|
|
6834
|
+
const {
|
|
6835
|
+
field,
|
|
6836
|
+
id,
|
|
6837
|
+
onChange,
|
|
6838
|
+
getValue
|
|
6839
|
+
} = props;
|
|
6840
|
+
const debounce = useService('debounce');
|
|
6841
|
+
return TextfieldEntry({
|
|
6842
|
+
debounce,
|
|
6843
|
+
element: field,
|
|
6844
|
+
getValue: getValue('suffixAdorner'),
|
|
6845
|
+
id,
|
|
6846
|
+
label: 'Suffix',
|
|
6847
|
+
setValue: onChange('suffixAdorner')
|
|
6848
|
+
});
|
|
6849
|
+
}
|
|
6850
|
+
|
|
6721
6851
|
function ConditionEntry(props) {
|
|
6722
6852
|
const {
|
|
6723
6853
|
editField,
|
|
@@ -6788,6 +6918,9 @@ function GeneralGroup(field, editField) {
|
|
|
6788
6918
|
}), ...ColumnsEntry({
|
|
6789
6919
|
field,
|
|
6790
6920
|
editField
|
|
6921
|
+
}), ...DateTimeEntry({
|
|
6922
|
+
field,
|
|
6923
|
+
editField
|
|
6791
6924
|
}), ...TextEntry({
|
|
6792
6925
|
field,
|
|
6793
6926
|
editField
|
|
@@ -6815,6 +6948,9 @@ function SerializationGroup(field, editField) {
|
|
|
6815
6948
|
const entries = [...NumberSerializationEntry({
|
|
6816
6949
|
field,
|
|
6817
6950
|
editField
|
|
6951
|
+
}), ...DateTimeFormatEntry({
|
|
6952
|
+
field,
|
|
6953
|
+
editField
|
|
6818
6954
|
})];
|
|
6819
6955
|
if (!entries.length) {
|
|
6820
6956
|
return null;
|
|
@@ -6826,6 +6962,21 @@ function SerializationGroup(field, editField) {
|
|
|
6826
6962
|
};
|
|
6827
6963
|
}
|
|
6828
6964
|
|
|
6965
|
+
function ConstraintsGroup(field, editField) {
|
|
6966
|
+
const entries = [...DateTimeConstraintsEntry({
|
|
6967
|
+
field,
|
|
6968
|
+
editField
|
|
6969
|
+
})];
|
|
6970
|
+
if (!entries.length) {
|
|
6971
|
+
return null;
|
|
6972
|
+
}
|
|
6973
|
+
return {
|
|
6974
|
+
id: 'constraints',
|
|
6975
|
+
label: 'Constraints',
|
|
6976
|
+
entries
|
|
6977
|
+
};
|
|
6978
|
+
}
|
|
6979
|
+
|
|
6829
6980
|
const VALIDATION_TYPE_OPTIONS = {
|
|
6830
6981
|
custom: {
|
|
6831
6982
|
value: 'custom',
|
|
@@ -7067,8 +7218,8 @@ function ValuesGroups(field, editField) {
|
|
|
7067
7218
|
};
|
|
7068
7219
|
const valuesSourceId = `${fieldId}-valuesSource`;
|
|
7069
7220
|
|
|
7070
|
-
/**
|
|
7071
|
-
* @type {Array<Group|ListGroup>}
|
|
7221
|
+
/**
|
|
7222
|
+
* @type {Array<Group|ListGroup>}
|
|
7072
7223
|
*/
|
|
7073
7224
|
const groups = [{
|
|
7074
7225
|
id: valuesSourceId,
|
|
@@ -7169,13 +7320,13 @@ function CustomValuesGroup(field, editField) {
|
|
|
7169
7320
|
|
|
7170
7321
|
// helpers //////////
|
|
7171
7322
|
|
|
7172
|
-
/**
|
|
7173
|
-
* Returns copy of object without key.
|
|
7174
|
-
*
|
|
7175
|
-
* @param {Object} properties
|
|
7176
|
-
* @param {string} oldKey
|
|
7177
|
-
*
|
|
7178
|
-
* @returns {Object}
|
|
7323
|
+
/**
|
|
7324
|
+
* Returns copy of object without key.
|
|
7325
|
+
*
|
|
7326
|
+
* @param {Object} properties
|
|
7327
|
+
* @param {string} oldKey
|
|
7328
|
+
*
|
|
7329
|
+
* @returns {Object}
|
|
7179
7330
|
*/
|
|
7180
7331
|
function removeKey(properties, oldKey) {
|
|
7181
7332
|
return Object.entries(properties).reduce((newProperties, entry) => {
|
|
@@ -7190,6 +7341,21 @@ function removeKey(properties, oldKey) {
|
|
|
7190
7341
|
}, {});
|
|
7191
7342
|
}
|
|
7192
7343
|
|
|
7344
|
+
function AppearanceGroup(field, editField) {
|
|
7345
|
+
const entries = [...AdornerEntry({
|
|
7346
|
+
field,
|
|
7347
|
+
editField
|
|
7348
|
+
})];
|
|
7349
|
+
if (!entries.length) {
|
|
7350
|
+
return null;
|
|
7351
|
+
}
|
|
7352
|
+
return {
|
|
7353
|
+
id: 'appearance',
|
|
7354
|
+
label: 'Appearance',
|
|
7355
|
+
entries
|
|
7356
|
+
};
|
|
7357
|
+
}
|
|
7358
|
+
|
|
7193
7359
|
function ConditionGroup(field, editField) {
|
|
7194
7360
|
const {
|
|
7195
7361
|
type
|
|
@@ -7212,7 +7378,7 @@ function getGroups(field, editField) {
|
|
|
7212
7378
|
if (!field) {
|
|
7213
7379
|
return [];
|
|
7214
7380
|
}
|
|
7215
|
-
const groups = [GeneralGroup(field, editField), ConditionGroup(field, editField), SerializationGroup(field, editField), ...ValuesGroups(field, editField), ValidationGroup(field, editField), CustomValuesGroup(field, editField)];
|
|
7381
|
+
const groups = [GeneralGroup(field, editField), ConditionGroup(field, editField), AppearanceGroup(field, editField), SerializationGroup(field, editField), ...ValuesGroups(field, editField), ConstraintsGroup(field, editField), ValidationGroup(field, editField), CustomValuesGroup(field, editField)];
|
|
7216
7382
|
|
|
7217
7383
|
// contract: if a group returns null, it should not be displayed at all
|
|
7218
7384
|
return groups.filter(group => group !== null);
|
|
@@ -7253,9 +7419,9 @@ function FormPropertiesPanel(props) {
|
|
|
7253
7419
|
}, []);
|
|
7254
7420
|
useLayoutEffect(() => {
|
|
7255
7421
|
const onFieldChanged = () => {
|
|
7256
|
-
/**
|
|
7257
|
-
* TODO(pinussilvestrus): update with actual updated element,
|
|
7258
|
-
* once we have a proper updater/change support
|
|
7422
|
+
/**
|
|
7423
|
+
* TODO(pinussilvestrus): update with actual updated element,
|
|
7424
|
+
* once we have a proper updater/change support
|
|
7259
7425
|
*/
|
|
7260
7426
|
_update(selection.get() || schema);
|
|
7261
7427
|
};
|
|
@@ -7307,10 +7473,10 @@ class PropertiesPanelRenderer {
|
|
|
7307
7473
|
});
|
|
7308
7474
|
}
|
|
7309
7475
|
|
|
7310
|
-
/**
|
|
7311
|
-
* Attach the properties panel to a parent node.
|
|
7312
|
-
*
|
|
7313
|
-
* @param {HTMLElement} container
|
|
7476
|
+
/**
|
|
7477
|
+
* Attach the properties panel to a parent node.
|
|
7478
|
+
*
|
|
7479
|
+
* @param {HTMLElement} container
|
|
7314
7480
|
*/
|
|
7315
7481
|
attachTo(container) {
|
|
7316
7482
|
if (!container) {
|
|
@@ -7330,8 +7496,8 @@ class PropertiesPanelRenderer {
|
|
|
7330
7496
|
this._eventBus.fire('propertiesPanel.attach');
|
|
7331
7497
|
}
|
|
7332
7498
|
|
|
7333
|
-
/**
|
|
7334
|
-
* Detach the properties panel from its parent node.
|
|
7499
|
+
/**
|
|
7500
|
+
* Detach the properties panel from its parent node.
|
|
7335
7501
|
*/
|
|
7336
7502
|
detach() {
|
|
7337
7503
|
const parentNode = this._container.parentNode;
|
|
@@ -7363,48 +7529,48 @@ var PropertiesPanelModule = {
|
|
|
7363
7529
|
|
|
7364
7530
|
const ids = new Ids([32, 36, 1]);
|
|
7365
7531
|
|
|
7366
|
-
/**
|
|
7367
|
-
* @typedef { import('./types').Injector } Injector
|
|
7368
|
-
* @typedef { import('./types').Module } Module
|
|
7369
|
-
* @typedef { import('./types').Schema } Schema
|
|
7370
|
-
*
|
|
7371
|
-
* @typedef { import('./types').FormEditorOptions } FormEditorOptions
|
|
7372
|
-
* @typedef { import('./types').FormEditorProperties } FormEditorProperties
|
|
7373
|
-
*
|
|
7374
|
-
* @typedef { {
|
|
7375
|
-
* properties: FormEditorProperties,
|
|
7376
|
-
* schema: Schema
|
|
7377
|
-
* } } State
|
|
7378
|
-
*
|
|
7379
|
-
* @typedef { (type:string, priority:number, handler:Function) => void } OnEventWithPriority
|
|
7380
|
-
* @typedef { (type:string, handler:Function) => void } OnEventWithOutPriority
|
|
7381
|
-
* @typedef { OnEventWithPriority & OnEventWithOutPriority } OnEventType
|
|
7532
|
+
/**
|
|
7533
|
+
* @typedef { import('./types').Injector } Injector
|
|
7534
|
+
* @typedef { import('./types').Module } Module
|
|
7535
|
+
* @typedef { import('./types').Schema } Schema
|
|
7536
|
+
*
|
|
7537
|
+
* @typedef { import('./types').FormEditorOptions } FormEditorOptions
|
|
7538
|
+
* @typedef { import('./types').FormEditorProperties } FormEditorProperties
|
|
7539
|
+
*
|
|
7540
|
+
* @typedef { {
|
|
7541
|
+
* properties: FormEditorProperties,
|
|
7542
|
+
* schema: Schema
|
|
7543
|
+
* } } State
|
|
7544
|
+
*
|
|
7545
|
+
* @typedef { (type:string, priority:number, handler:Function) => void } OnEventWithPriority
|
|
7546
|
+
* @typedef { (type:string, handler:Function) => void } OnEventWithOutPriority
|
|
7547
|
+
* @typedef { OnEventWithPriority & OnEventWithOutPriority } OnEventType
|
|
7382
7548
|
*/
|
|
7383
7549
|
|
|
7384
|
-
/**
|
|
7385
|
-
* The form editor.
|
|
7550
|
+
/**
|
|
7551
|
+
* The form editor.
|
|
7386
7552
|
*/
|
|
7387
7553
|
class FormEditor {
|
|
7388
|
-
/**
|
|
7389
|
-
* @constructor
|
|
7390
|
-
* @param {FormEditorOptions} options
|
|
7554
|
+
/**
|
|
7555
|
+
* @constructor
|
|
7556
|
+
* @param {FormEditorOptions} options
|
|
7391
7557
|
*/
|
|
7392
7558
|
constructor(options = {}) {
|
|
7393
|
-
/**
|
|
7394
|
-
* @public
|
|
7395
|
-
* @type {OnEventType}
|
|
7559
|
+
/**
|
|
7560
|
+
* @public
|
|
7561
|
+
* @type {OnEventType}
|
|
7396
7562
|
*/
|
|
7397
7563
|
this.on = this._onEvent;
|
|
7398
7564
|
|
|
7399
|
-
/**
|
|
7400
|
-
* @public
|
|
7401
|
-
* @type {String}
|
|
7565
|
+
/**
|
|
7566
|
+
* @public
|
|
7567
|
+
* @type {String}
|
|
7402
7568
|
*/
|
|
7403
7569
|
this._id = ids.next();
|
|
7404
7570
|
|
|
7405
|
-
/**
|
|
7406
|
-
* @private
|
|
7407
|
-
* @type {Element}
|
|
7571
|
+
/**
|
|
7572
|
+
* @private
|
|
7573
|
+
* @type {Element}
|
|
7408
7574
|
*/
|
|
7409
7575
|
this._container = createFormContainer();
|
|
7410
7576
|
this._container.setAttribute('input-handle-modified-keys', 'z,y');
|
|
@@ -7415,15 +7581,15 @@ class FormEditor {
|
|
|
7415
7581
|
properties = {}
|
|
7416
7582
|
} = options;
|
|
7417
7583
|
|
|
7418
|
-
/**
|
|
7419
|
-
* @private
|
|
7420
|
-
* @type {any}
|
|
7584
|
+
/**
|
|
7585
|
+
* @private
|
|
7586
|
+
* @type {any}
|
|
7421
7587
|
*/
|
|
7422
7588
|
this.exporter = exporter;
|
|
7423
7589
|
|
|
7424
|
-
/**
|
|
7425
|
-
* @private
|
|
7426
|
-
* @type {State}
|
|
7590
|
+
/**
|
|
7591
|
+
* @private
|
|
7592
|
+
* @type {State}
|
|
7427
7593
|
*/
|
|
7428
7594
|
this._state = {
|
|
7429
7595
|
properties,
|
|
@@ -7452,10 +7618,10 @@ class FormEditor {
|
|
|
7452
7618
|
this._detach(false);
|
|
7453
7619
|
}
|
|
7454
7620
|
|
|
7455
|
-
/**
|
|
7456
|
-
* @param {Schema} schema
|
|
7457
|
-
*
|
|
7458
|
-
* @return {Promise<{ warnings: Array<any> }>}
|
|
7621
|
+
/**
|
|
7622
|
+
* @param {Schema} schema
|
|
7623
|
+
*
|
|
7624
|
+
* @return {Promise<{ warnings: Array<any> }>}
|
|
7459
7625
|
*/
|
|
7460
7626
|
importSchema(schema) {
|
|
7461
7627
|
return new Promise((resolve, reject) => {
|
|
@@ -7484,15 +7650,15 @@ class FormEditor {
|
|
|
7484
7650
|
});
|
|
7485
7651
|
}
|
|
7486
7652
|
|
|
7487
|
-
/**
|
|
7488
|
-
* @returns {Schema}
|
|
7653
|
+
/**
|
|
7654
|
+
* @returns {Schema}
|
|
7489
7655
|
*/
|
|
7490
7656
|
saveSchema() {
|
|
7491
7657
|
return this.getSchema();
|
|
7492
7658
|
}
|
|
7493
7659
|
|
|
7494
|
-
/**
|
|
7495
|
-
* @returns {Schema}
|
|
7660
|
+
/**
|
|
7661
|
+
* @returns {Schema}
|
|
7496
7662
|
*/
|
|
7497
7663
|
getSchema() {
|
|
7498
7664
|
const {
|
|
@@ -7501,8 +7667,8 @@ class FormEditor {
|
|
|
7501
7667
|
return exportSchema(schema, this.exporter, schemaVersion);
|
|
7502
7668
|
}
|
|
7503
7669
|
|
|
7504
|
-
/**
|
|
7505
|
-
* @param {Element|string} parentNode
|
|
7670
|
+
/**
|
|
7671
|
+
* @param {Element|string} parentNode
|
|
7506
7672
|
*/
|
|
7507
7673
|
attachTo(parentNode) {
|
|
7508
7674
|
if (!parentNode) {
|
|
@@ -7520,10 +7686,10 @@ class FormEditor {
|
|
|
7520
7686
|
this._detach();
|
|
7521
7687
|
}
|
|
7522
7688
|
|
|
7523
|
-
/**
|
|
7524
|
-
* @internal
|
|
7525
|
-
*
|
|
7526
|
-
* @param {boolean} [emit]
|
|
7689
|
+
/**
|
|
7690
|
+
* @internal
|
|
7691
|
+
*
|
|
7692
|
+
* @param {boolean} [emit]
|
|
7527
7693
|
*/
|
|
7528
7694
|
_detach(emit = true) {
|
|
7529
7695
|
const container = this._container,
|
|
@@ -7537,9 +7703,9 @@ class FormEditor {
|
|
|
7537
7703
|
parentNode.removeChild(container);
|
|
7538
7704
|
}
|
|
7539
7705
|
|
|
7540
|
-
/**
|
|
7541
|
-
* @param {any} property
|
|
7542
|
-
* @param {any} value
|
|
7706
|
+
/**
|
|
7707
|
+
* @param {any} property
|
|
7708
|
+
* @param {any} value
|
|
7543
7709
|
*/
|
|
7544
7710
|
setProperty(property, value) {
|
|
7545
7711
|
const properties = set(this._getState().properties, [property], value);
|
|
@@ -7548,21 +7714,21 @@ class FormEditor {
|
|
|
7548
7714
|
});
|
|
7549
7715
|
}
|
|
7550
7716
|
|
|
7551
|
-
/**
|
|
7552
|
-
* @param {string} type
|
|
7553
|
-
* @param {Function} handler
|
|
7717
|
+
/**
|
|
7718
|
+
* @param {string} type
|
|
7719
|
+
* @param {Function} handler
|
|
7554
7720
|
*/
|
|
7555
7721
|
off(type, handler) {
|
|
7556
7722
|
this.get('eventBus').off(type, handler);
|
|
7557
7723
|
}
|
|
7558
7724
|
|
|
7559
|
-
/**
|
|
7560
|
-
* @internal
|
|
7561
|
-
*
|
|
7562
|
-
* @param {FormEditorOptions} options
|
|
7563
|
-
* @param {Element} container
|
|
7564
|
-
*
|
|
7565
|
-
* @returns {Injector}
|
|
7725
|
+
/**
|
|
7726
|
+
* @internal
|
|
7727
|
+
*
|
|
7728
|
+
* @param {FormEditorOptions} options
|
|
7729
|
+
* @param {Element} container
|
|
7730
|
+
*
|
|
7731
|
+
* @returns {Injector}
|
|
7566
7732
|
*/
|
|
7567
7733
|
_createInjector(options, container) {
|
|
7568
7734
|
const {
|
|
@@ -7584,22 +7750,22 @@ class FormEditor {
|
|
|
7584
7750
|
}, core, ...modules, ...additionalModules]);
|
|
7585
7751
|
}
|
|
7586
7752
|
|
|
7587
|
-
/**
|
|
7588
|
-
* @internal
|
|
7753
|
+
/**
|
|
7754
|
+
* @internal
|
|
7589
7755
|
*/
|
|
7590
7756
|
_emit(type, data) {
|
|
7591
7757
|
this.get('eventBus').fire(type, data);
|
|
7592
7758
|
}
|
|
7593
7759
|
|
|
7594
|
-
/**
|
|
7595
|
-
* @internal
|
|
7760
|
+
/**
|
|
7761
|
+
* @internal
|
|
7596
7762
|
*/
|
|
7597
7763
|
_getState() {
|
|
7598
7764
|
return this._state;
|
|
7599
7765
|
}
|
|
7600
7766
|
|
|
7601
|
-
/**
|
|
7602
|
-
* @internal
|
|
7767
|
+
/**
|
|
7768
|
+
* @internal
|
|
7603
7769
|
*/
|
|
7604
7770
|
_setState(state) {
|
|
7605
7771
|
this._state = {
|
|
@@ -7609,15 +7775,15 @@ class FormEditor {
|
|
|
7609
7775
|
this._emit('changed', this._getState());
|
|
7610
7776
|
}
|
|
7611
7777
|
|
|
7612
|
-
/**
|
|
7613
|
-
* @internal
|
|
7778
|
+
/**
|
|
7779
|
+
* @internal
|
|
7614
7780
|
*/
|
|
7615
7781
|
_getModules() {
|
|
7616
7782
|
return [ModelingModule, EditorActionsModule, KeyboardModule, SelectionModule, PaletteModule, PropertiesPanelModule];
|
|
7617
7783
|
}
|
|
7618
7784
|
|
|
7619
|
-
/**
|
|
7620
|
-
* @internal
|
|
7785
|
+
/**
|
|
7786
|
+
* @internal
|
|
7621
7787
|
*/
|
|
7622
7788
|
_onEvent(type, priority, handler) {
|
|
7623
7789
|
this.get('eventBus').on(type, priority, handler);
|