@bpmn-io/properties-panel 3.22.3 → 3.22.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 +20 -20
- package/README.md +35 -35
- package/assets/properties-panel.css +3 -3
- package/dist/assets/properties-panel.css +1505 -1499
- package/dist/index.esm.js +506 -506
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +506 -506
- package/dist/index.js.map +1 -1
- package/package.json +91 -92
package/dist/index.js
CHANGED
|
@@ -247,19 +247,19 @@ const ErrorsContext = preact.createContext({
|
|
|
247
247
|
errors: {}
|
|
248
248
|
});
|
|
249
249
|
|
|
250
|
-
/**
|
|
251
|
-
* @typedef {Function} <propertiesPanel.showEntry> callback
|
|
252
|
-
*
|
|
253
|
-
* @example
|
|
254
|
-
*
|
|
255
|
-
* useEvent('propertiesPanel.showEntry', ({ focus = false, ...rest }) => {
|
|
256
|
-
* // ...
|
|
257
|
-
* });
|
|
258
|
-
*
|
|
259
|
-
* @param {Object} context
|
|
260
|
-
* @param {boolean} [context.focus]
|
|
261
|
-
*
|
|
262
|
-
* @returns void
|
|
250
|
+
/**
|
|
251
|
+
* @typedef {Function} <propertiesPanel.showEntry> callback
|
|
252
|
+
*
|
|
253
|
+
* @example
|
|
254
|
+
*
|
|
255
|
+
* useEvent('propertiesPanel.showEntry', ({ focus = false, ...rest }) => {
|
|
256
|
+
* // ...
|
|
257
|
+
* });
|
|
258
|
+
*
|
|
259
|
+
* @param {Object} context
|
|
260
|
+
* @param {boolean} [context.focus]
|
|
261
|
+
*
|
|
262
|
+
* @returns void
|
|
263
263
|
*/
|
|
264
264
|
|
|
265
265
|
const EventContext = preact.createContext({
|
|
@@ -278,20 +278,20 @@ const TooltipContext = preact.createContext({
|
|
|
278
278
|
getTooltipForId: () => {}
|
|
279
279
|
});
|
|
280
280
|
|
|
281
|
-
/**
|
|
282
|
-
* Accesses the global TooltipContext and returns a tooltip for a given id and element.
|
|
283
|
-
*
|
|
284
|
-
* @example
|
|
285
|
-
* ```jsx
|
|
286
|
-
* function TextField(props) {
|
|
287
|
-
* const tooltip = useTooltipContext('input1', element);
|
|
288
|
-
* }
|
|
289
|
-
* ```
|
|
290
|
-
*
|
|
291
|
-
* @param {string} id
|
|
292
|
-
* @param {object} element
|
|
293
|
-
*
|
|
294
|
-
* @returns {string}
|
|
281
|
+
/**
|
|
282
|
+
* Accesses the global TooltipContext and returns a tooltip for a given id and element.
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
* ```jsx
|
|
286
|
+
* function TextField(props) {
|
|
287
|
+
* const tooltip = useTooltipContext('input1', element);
|
|
288
|
+
* }
|
|
289
|
+
* ```
|
|
290
|
+
*
|
|
291
|
+
* @param {string} id
|
|
292
|
+
* @param {object} element
|
|
293
|
+
*
|
|
294
|
+
* @returns {string}
|
|
295
295
|
*/
|
|
296
296
|
function useTooltipContext(id, element) {
|
|
297
297
|
const {
|
|
@@ -444,20 +444,20 @@ function prefixId$9(id) {
|
|
|
444
444
|
return `bio-properties-panel-${id}`;
|
|
445
445
|
}
|
|
446
446
|
|
|
447
|
-
/**
|
|
448
|
-
* Accesses the global DescriptionContext and returns a description for a given id and element.
|
|
449
|
-
*
|
|
450
|
-
* @example
|
|
451
|
-
* ```jsx
|
|
452
|
-
* function TextField(props) {
|
|
453
|
-
* const description = useDescriptionContext('input1', element);
|
|
454
|
-
* }
|
|
455
|
-
* ```
|
|
456
|
-
*
|
|
457
|
-
* @param {string} id
|
|
458
|
-
* @param {object} element
|
|
459
|
-
*
|
|
460
|
-
* @returns {string}
|
|
447
|
+
/**
|
|
448
|
+
* Accesses the global DescriptionContext and returns a description for a given id and element.
|
|
449
|
+
*
|
|
450
|
+
* @example
|
|
451
|
+
* ```jsx
|
|
452
|
+
* function TextField(props) {
|
|
453
|
+
* const description = useDescriptionContext('input1', element);
|
|
454
|
+
* }
|
|
455
|
+
* ```
|
|
456
|
+
*
|
|
457
|
+
* @param {string} id
|
|
458
|
+
* @param {object} element
|
|
459
|
+
*
|
|
460
|
+
* @returns {string}
|
|
461
461
|
*/
|
|
462
462
|
function useDescriptionContext(id, element) {
|
|
463
463
|
const {
|
|
@@ -479,11 +479,11 @@ function useErrors() {
|
|
|
479
479
|
return errors;
|
|
480
480
|
}
|
|
481
481
|
|
|
482
|
-
/**
|
|
483
|
-
* Subscribe to an event immediately. Update subscription after inputs changed.
|
|
484
|
-
*
|
|
485
|
-
* @param {string} event
|
|
486
|
-
* @param {Function} callback
|
|
482
|
+
/**
|
|
483
|
+
* Subscribe to an event immediately. Update subscription after inputs changed.
|
|
484
|
+
*
|
|
485
|
+
* @param {string} event
|
|
486
|
+
* @param {Function} callback
|
|
487
487
|
*/
|
|
488
488
|
function useEvent(event, callback, eventBus) {
|
|
489
489
|
const eventContext = hooks.useContext(EventContext);
|
|
@@ -515,24 +515,24 @@ function useEvent(event, callback, eventBus) {
|
|
|
515
515
|
|
|
516
516
|
const KEY_LENGTH = 6;
|
|
517
517
|
|
|
518
|
-
/**
|
|
519
|
-
* Create a persistent key factory for plain objects without id.
|
|
520
|
-
*
|
|
521
|
-
* @example
|
|
522
|
-
* ```jsx
|
|
523
|
-
* function List({ objects }) {
|
|
524
|
-
* const getKey = useKeyFactory();
|
|
525
|
-
* return (<ol>{
|
|
526
|
-
* objects.map(obj => {
|
|
527
|
-
* const key = getKey(obj);
|
|
528
|
-
* return <li key={key}>obj.name</li>
|
|
529
|
-
* })
|
|
530
|
-
* }</ol>);
|
|
531
|
-
* }
|
|
532
|
-
* ```
|
|
533
|
-
*
|
|
534
|
-
* @param {any[]} dependencies
|
|
535
|
-
* @returns {(element: object) => string}
|
|
518
|
+
/**
|
|
519
|
+
* Create a persistent key factory for plain objects without id.
|
|
520
|
+
*
|
|
521
|
+
* @example
|
|
522
|
+
* ```jsx
|
|
523
|
+
* function List({ objects }) {
|
|
524
|
+
* const getKey = useKeyFactory();
|
|
525
|
+
* return (<ol>{
|
|
526
|
+
* objects.map(obj => {
|
|
527
|
+
* const key = getKey(obj);
|
|
528
|
+
* return <li key={key}>obj.name</li>
|
|
529
|
+
* })
|
|
530
|
+
* }</ol>);
|
|
531
|
+
* }
|
|
532
|
+
* ```
|
|
533
|
+
*
|
|
534
|
+
* @param {any[]} dependencies
|
|
535
|
+
* @returns {(element: object) => string}
|
|
536
536
|
*/
|
|
537
537
|
function useKeyFactory(dependencies = []) {
|
|
538
538
|
const map = hooks.useMemo(() => new Map(), dependencies);
|
|
@@ -547,20 +547,20 @@ function useKeyFactory(dependencies = []) {
|
|
|
547
547
|
return getKey;
|
|
548
548
|
}
|
|
549
549
|
|
|
550
|
-
/**
|
|
551
|
-
* Creates a state that persists in the global LayoutContext.
|
|
552
|
-
*
|
|
553
|
-
* @example
|
|
554
|
-
* ```jsx
|
|
555
|
-
* function Group(props) {
|
|
556
|
-
* const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
|
|
557
|
-
* }
|
|
558
|
-
* ```
|
|
559
|
-
*
|
|
560
|
-
* @param {(string|number)[]} path
|
|
561
|
-
* @param {any} [defaultValue]
|
|
562
|
-
*
|
|
563
|
-
* @returns {[ any, Function ]}
|
|
550
|
+
/**
|
|
551
|
+
* Creates a state that persists in the global LayoutContext.
|
|
552
|
+
*
|
|
553
|
+
* @example
|
|
554
|
+
* ```jsx
|
|
555
|
+
* function Group(props) {
|
|
556
|
+
* const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
|
|
557
|
+
* }
|
|
558
|
+
* ```
|
|
559
|
+
*
|
|
560
|
+
* @param {(string|number)[]} path
|
|
561
|
+
* @param {any} [defaultValue]
|
|
562
|
+
*
|
|
563
|
+
* @returns {[ any, Function ]}
|
|
564
564
|
*/
|
|
565
565
|
function useLayoutState(path, defaultValue) {
|
|
566
566
|
const {
|
|
@@ -574,11 +574,11 @@ function useLayoutState(path, defaultValue) {
|
|
|
574
574
|
return [layoutForKey, setState];
|
|
575
575
|
}
|
|
576
576
|
|
|
577
|
-
/**
|
|
578
|
-
* @pinussilvestrus: we need to introduce our own hook to persist the previous
|
|
579
|
-
* state on updates.
|
|
580
|
-
*
|
|
581
|
-
* cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
|
|
577
|
+
/**
|
|
578
|
+
* @pinussilvestrus: we need to introduce our own hook to persist the previous
|
|
579
|
+
* state on updates.
|
|
580
|
+
*
|
|
581
|
+
* cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
|
|
582
582
|
*/
|
|
583
583
|
|
|
584
584
|
function usePrevious(value) {
|
|
@@ -589,12 +589,12 @@ function usePrevious(value) {
|
|
|
589
589
|
return ref.current;
|
|
590
590
|
}
|
|
591
591
|
|
|
592
|
-
/**
|
|
593
|
-
* Subscribe to `propertiesPanel.showEntry`.
|
|
594
|
-
*
|
|
595
|
-
* @param {string} id
|
|
596
|
-
*
|
|
597
|
-
* @returns {import('preact').Ref}
|
|
592
|
+
/**
|
|
593
|
+
* Subscribe to `propertiesPanel.showEntry`.
|
|
594
|
+
*
|
|
595
|
+
* @param {string} id
|
|
596
|
+
*
|
|
597
|
+
* @returns {import('preact').Ref}
|
|
598
598
|
*/
|
|
599
599
|
function useShowEntryEvent(id) {
|
|
600
600
|
const {
|
|
@@ -625,20 +625,20 @@ function useShowEntryEvent(id) {
|
|
|
625
625
|
return ref;
|
|
626
626
|
}
|
|
627
627
|
|
|
628
|
-
/**
|
|
629
|
-
* @callback setSticky
|
|
630
|
-
* @param {boolean} value
|
|
628
|
+
/**
|
|
629
|
+
* @callback setSticky
|
|
630
|
+
* @param {boolean} value
|
|
631
631
|
*/
|
|
632
632
|
|
|
633
|
-
/**
|
|
634
|
-
* Use IntersectionObserver to identify when DOM element is in sticky mode.
|
|
635
|
-
* If sticky is observered setSticky(true) will be called.
|
|
636
|
-
* If sticky mode is left, setSticky(false) will be called.
|
|
637
|
-
*
|
|
638
|
-
*
|
|
639
|
-
* @param {Object} ref
|
|
640
|
-
* @param {string} scrollContainerSelector
|
|
641
|
-
* @param {setSticky} setSticky
|
|
633
|
+
/**
|
|
634
|
+
* Use IntersectionObserver to identify when DOM element is in sticky mode.
|
|
635
|
+
* If sticky is observered setSticky(true) will be called.
|
|
636
|
+
* If sticky mode is left, setSticky(false) will be called.
|
|
637
|
+
*
|
|
638
|
+
*
|
|
639
|
+
* @param {Object} ref
|
|
640
|
+
* @param {string} scrollContainerSelector
|
|
641
|
+
* @param {setSticky} setSticky
|
|
642
642
|
*/
|
|
643
643
|
function useStickyIntersectionObserver(ref, scrollContainerSelector, setSticky) {
|
|
644
644
|
const [scrollContainer, setScrollContainer] = hooks.useState(minDom.query(scrollContainerSelector));
|
|
@@ -692,19 +692,19 @@ function useStickyIntersectionObserver(ref, scrollContainerSelector, setSticky)
|
|
|
692
692
|
}, [ref.current, scrollContainer, setSticky]);
|
|
693
693
|
}
|
|
694
694
|
|
|
695
|
-
/**
|
|
696
|
-
* Creates a static function reference with changing body.
|
|
697
|
-
* This is necessary when external libraries require a callback function
|
|
698
|
-
* that has references to state variables.
|
|
699
|
-
*
|
|
700
|
-
* Usage:
|
|
701
|
-
* const callback = useStaticCallback((val) => {val === currentState});
|
|
702
|
-
*
|
|
703
|
-
* The `callback` reference is static and can be safely used in external
|
|
704
|
-
* libraries or as a prop that does not cause rerendering of children.
|
|
705
|
-
*
|
|
706
|
-
* @param {Function} callback function with changing reference
|
|
707
|
-
* @returns {Function} static function reference
|
|
695
|
+
/**
|
|
696
|
+
* Creates a static function reference with changing body.
|
|
697
|
+
* This is necessary when external libraries require a callback function
|
|
698
|
+
* that has references to state variables.
|
|
699
|
+
*
|
|
700
|
+
* Usage:
|
|
701
|
+
* const callback = useStaticCallback((val) => {val === currentState});
|
|
702
|
+
*
|
|
703
|
+
* The `callback` reference is static and can be safely used in external
|
|
704
|
+
* libraries or as a prop that does not cause rerendering of children.
|
|
705
|
+
*
|
|
706
|
+
* @param {Function} callback function with changing reference
|
|
707
|
+
* @returns {Function} static function reference
|
|
708
708
|
*/
|
|
709
709
|
function useStaticCallback(callback) {
|
|
710
710
|
const callbackRef = hooks.useRef(callback);
|
|
@@ -847,13 +847,13 @@ function DataMarker(props) {
|
|
|
847
847
|
return null;
|
|
848
848
|
}
|
|
849
849
|
|
|
850
|
-
/**
|
|
851
|
-
* @typedef { {
|
|
852
|
-
* text: (element: object) => string,
|
|
853
|
-
* icon?: (element: Object) => import('preact').Component
|
|
854
|
-
* } } PlaceholderDefinition
|
|
855
|
-
*
|
|
856
|
-
* @param { PlaceholderDefinition } props
|
|
850
|
+
/**
|
|
851
|
+
* @typedef { {
|
|
852
|
+
* text: (element: object) => string,
|
|
853
|
+
* icon?: (element: Object) => import('preact').Component
|
|
854
|
+
* } } PlaceholderDefinition
|
|
855
|
+
*
|
|
856
|
+
* @param { PlaceholderDefinition } props
|
|
857
857
|
*/
|
|
858
858
|
function Placeholder(props) {
|
|
859
859
|
const {
|
|
@@ -892,9 +892,9 @@ function Description(props) {
|
|
|
892
892
|
|
|
893
893
|
const noop$6 = () => {};
|
|
894
894
|
|
|
895
|
-
/**
|
|
896
|
-
* Buffer `.focus()` calls while the editor is not initialized.
|
|
897
|
-
* Set Focus inside when the editor is ready.
|
|
895
|
+
/**
|
|
896
|
+
* Buffer `.focus()` calls while the editor is not initialized.
|
|
897
|
+
* Set Focus inside when the editor is ready.
|
|
898
898
|
*/
|
|
899
899
|
const useBufferedFocus$1 = function (editor, ref) {
|
|
900
900
|
const [buffer, setBuffer] = hooks.useState(undefined);
|
|
@@ -995,9 +995,9 @@ const CodeEditor$1 = compat.forwardRef((props, ref) => {
|
|
|
995
995
|
|
|
996
996
|
const noop$5 = () => {};
|
|
997
997
|
|
|
998
|
-
/**
|
|
999
|
-
* Buffer `.focus()` calls while the editor is not initialized.
|
|
1000
|
-
* Set Focus inside when the editor is ready.
|
|
998
|
+
/**
|
|
999
|
+
* Buffer `.focus()` calls while the editor is not initialized.
|
|
1000
|
+
* Set Focus inside when the editor is ready.
|
|
1001
1001
|
*/
|
|
1002
1002
|
const useBufferedFocus = function (editor, ref) {
|
|
1003
1003
|
const [buffer, setBuffer] = hooks.useState(undefined);
|
|
@@ -1046,10 +1046,10 @@ const CodeEditor = compat.forwardRef((props, ref) => {
|
|
|
1046
1046
|
hooks.useEffect(() => {
|
|
1047
1047
|
let editor;
|
|
1048
1048
|
|
|
1049
|
-
/* Trigger FEEL toggle when
|
|
1050
|
-
*
|
|
1051
|
-
* - `backspace` is pressed
|
|
1052
|
-
* - AND the cursor is at the beginning of the input
|
|
1049
|
+
/* Trigger FEEL toggle when
|
|
1050
|
+
*
|
|
1051
|
+
* - `backspace` is pressed
|
|
1052
|
+
* - AND the cursor is at the beginning of the input
|
|
1053
1053
|
*/
|
|
1054
1054
|
const onKeyDown = e => {
|
|
1055
1055
|
if (e.key !== 'Backspace' || !editor) {
|
|
@@ -1140,10 +1140,10 @@ function FeelIndicator(props) {
|
|
|
1140
1140
|
|
|
1141
1141
|
const noop$4 = () => {};
|
|
1142
1142
|
|
|
1143
|
-
/**
|
|
1144
|
-
* @param {Object} props
|
|
1145
|
-
* @param {Object} props.label
|
|
1146
|
-
* @param {String} props.feel
|
|
1143
|
+
/**
|
|
1144
|
+
* @param {Object} props
|
|
1145
|
+
* @param {Object} props.label
|
|
1146
|
+
* @param {String} props.feel
|
|
1147
1147
|
*/
|
|
1148
1148
|
function FeelIcon(props) {
|
|
1149
1149
|
const {
|
|
@@ -1178,22 +1178,22 @@ const FeelPopupContext = preact.createContext({
|
|
|
1178
1178
|
source: null
|
|
1179
1179
|
});
|
|
1180
1180
|
|
|
1181
|
-
/**
|
|
1182
|
-
* Add a dragger that calls back the passed function with
|
|
1183
|
-
* { event, delta } on drag.
|
|
1184
|
-
*
|
|
1185
|
-
* @example
|
|
1186
|
-
*
|
|
1187
|
-
* function dragMove(event, delta) {
|
|
1188
|
-
* // we are dragging (!!)
|
|
1189
|
-
* }
|
|
1190
|
-
*
|
|
1191
|
-
* domElement.addEventListener('dragstart', dragger(dragMove));
|
|
1192
|
-
*
|
|
1193
|
-
* @param {Function} fn
|
|
1194
|
-
* @param {Element} [dragPreview]
|
|
1195
|
-
*
|
|
1196
|
-
* @return {Function} drag start callback function
|
|
1181
|
+
/**
|
|
1182
|
+
* Add a dragger that calls back the passed function with
|
|
1183
|
+
* { event, delta } on drag.
|
|
1184
|
+
*
|
|
1185
|
+
* @example
|
|
1186
|
+
*
|
|
1187
|
+
* function dragMove(event, delta) {
|
|
1188
|
+
* // we are dragging (!!)
|
|
1189
|
+
* }
|
|
1190
|
+
*
|
|
1191
|
+
* domElement.addEventListener('dragstart', dragger(dragMove));
|
|
1192
|
+
*
|
|
1193
|
+
* @param {Function} fn
|
|
1194
|
+
* @param {Element} [dragPreview]
|
|
1195
|
+
*
|
|
1196
|
+
* @return {Function} drag start callback function
|
|
1197
1197
|
*/
|
|
1198
1198
|
function createDragger(fn, dragPreview) {
|
|
1199
1199
|
let self;
|
|
@@ -1248,23 +1248,23 @@ function emptyCanvas() {
|
|
|
1248
1248
|
|
|
1249
1249
|
const noop$3 = () => {};
|
|
1250
1250
|
|
|
1251
|
-
/**
|
|
1252
|
-
* A generic popup component.
|
|
1253
|
-
*
|
|
1254
|
-
* @param {Object} props
|
|
1255
|
-
* @param {HTMLElement} [props.container]
|
|
1256
|
-
* @param {string} [props.className]
|
|
1257
|
-
* @param {boolean} [props.delayInitialFocus]
|
|
1258
|
-
* @param {{x: number, y: number}} [props.position]
|
|
1259
|
-
* @param {number} [props.width]
|
|
1260
|
-
* @param {number} [props.height]
|
|
1261
|
-
* @param {Function} props.onClose
|
|
1262
|
-
* @param {Function} [props.onPostActivate]
|
|
1263
|
-
* @param {Function} [props.onPostDeactivate]
|
|
1264
|
-
* @param {boolean} [props.returnFocus]
|
|
1265
|
-
* @param {boolean} [props.closeOnEscape]
|
|
1266
|
-
* @param {string} props.title
|
|
1267
|
-
* @param {Ref} [ref]
|
|
1251
|
+
/**
|
|
1252
|
+
* A generic popup component.
|
|
1253
|
+
*
|
|
1254
|
+
* @param {Object} props
|
|
1255
|
+
* @param {HTMLElement} [props.container]
|
|
1256
|
+
* @param {string} [props.className]
|
|
1257
|
+
* @param {boolean} [props.delayInitialFocus]
|
|
1258
|
+
* @param {{x: number, y: number}} [props.position]
|
|
1259
|
+
* @param {number} [props.width]
|
|
1260
|
+
* @param {number} [props.height]
|
|
1261
|
+
* @param {Function} props.onClose
|
|
1262
|
+
* @param {Function} [props.onPostActivate]
|
|
1263
|
+
* @param {Function} [props.onPostDeactivate]
|
|
1264
|
+
* @param {boolean} [props.returnFocus]
|
|
1265
|
+
* @param {boolean} [props.closeOnEscape]
|
|
1266
|
+
* @param {string} props.title
|
|
1267
|
+
* @param {Ref} [ref]
|
|
1268
1268
|
*/
|
|
1269
1269
|
function PopupComponent(props, globalRef) {
|
|
1270
1270
|
const {
|
|
@@ -1483,12 +1483,12 @@ function getContainerNode(node) {
|
|
|
1483
1483
|
const FEEL_POPUP_WIDTH = 700;
|
|
1484
1484
|
const FEEL_POPUP_HEIGHT = 250;
|
|
1485
1485
|
|
|
1486
|
-
/**
|
|
1487
|
-
* FEEL popup component, built as a singleton. Emits lifecycle events as follows:
|
|
1488
|
-
* - `feelPopup.open` - fired before the popup is mounted
|
|
1489
|
-
* - `feelPopup.opened` - fired after the popup is mounted. Event context contains the DOM node of the popup
|
|
1490
|
-
* - `feelPopup.close` - fired before the popup is unmounted. Event context contains the DOM node of the popup
|
|
1491
|
-
* - `feelPopup.closed` - fired after the popup is unmounted
|
|
1486
|
+
/**
|
|
1487
|
+
* FEEL popup component, built as a singleton. Emits lifecycle events as follows:
|
|
1488
|
+
* - `feelPopup.open` - fired before the popup is mounted
|
|
1489
|
+
* - `feelPopup.opened` - fired after the popup is mounted. Event context contains the DOM node of the popup
|
|
1490
|
+
* - `feelPopup.close` - fired before the popup is unmounted. Event context contains the DOM node of the popup
|
|
1491
|
+
* - `feelPopup.closed` - fired after the popup is unmounted
|
|
1492
1492
|
*/
|
|
1493
1493
|
function FEELPopupRoot(props) {
|
|
1494
1494
|
const {
|
|
@@ -1711,11 +1711,11 @@ function autoCompletionOpen(element) {
|
|
|
1711
1711
|
return element.closest('.cm-editor').querySelector('.cm-tooltip-autocomplete');
|
|
1712
1712
|
}
|
|
1713
1713
|
|
|
1714
|
-
/**
|
|
1715
|
-
* This hook behaves like useEffect, but does not trigger on the first render.
|
|
1716
|
-
*
|
|
1717
|
-
* @param {Function} effect
|
|
1718
|
-
* @param {Array} deps
|
|
1714
|
+
/**
|
|
1715
|
+
* This hook behaves like useEffect, but does not trigger on the first render.
|
|
1716
|
+
*
|
|
1717
|
+
* @param {Function} effect
|
|
1718
|
+
* @param {Array} deps
|
|
1719
1719
|
*/
|
|
1720
1720
|
function useUpdateEffect(effect, deps) {
|
|
1721
1721
|
const isMounted = hooks.useRef(false);
|
|
@@ -1793,19 +1793,19 @@ function ToggleSwitch(props) {
|
|
|
1793
1793
|
});
|
|
1794
1794
|
}
|
|
1795
1795
|
|
|
1796
|
-
/**
|
|
1797
|
-
* @param {Object} props
|
|
1798
|
-
* @param {Object} props.element
|
|
1799
|
-
* @param {String} props.id
|
|
1800
|
-
* @param {String} props.description
|
|
1801
|
-
* @param {String} props.label
|
|
1802
|
-
* @param {String} props.switcherLabel
|
|
1803
|
-
* @param {Boolean} props.inline
|
|
1804
|
-
* @param {Function} props.getValue
|
|
1805
|
-
* @param {Function} props.setValue
|
|
1806
|
-
* @param {Function} props.onFocus
|
|
1807
|
-
* @param {Function} props.onBlur
|
|
1808
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
1796
|
+
/**
|
|
1797
|
+
* @param {Object} props
|
|
1798
|
+
* @param {Object} props.element
|
|
1799
|
+
* @param {String} props.id
|
|
1800
|
+
* @param {String} props.description
|
|
1801
|
+
* @param {String} props.label
|
|
1802
|
+
* @param {String} props.switcherLabel
|
|
1803
|
+
* @param {Boolean} props.inline
|
|
1804
|
+
* @param {Function} props.getValue
|
|
1805
|
+
* @param {Function} props.setValue
|
|
1806
|
+
* @param {Function} props.onFocus
|
|
1807
|
+
* @param {Function} props.onBlur
|
|
1808
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
1809
1809
|
*/
|
|
1810
1810
|
function ToggleSwitchEntry(props) {
|
|
1811
1811
|
const {
|
|
@@ -1913,22 +1913,22 @@ function NumberField(props) {
|
|
|
1913
1913
|
});
|
|
1914
1914
|
}
|
|
1915
1915
|
|
|
1916
|
-
/**
|
|
1917
|
-
* @param {Object} props
|
|
1918
|
-
* @param {Boolean} props.debounce
|
|
1919
|
-
* @param {String} props.description
|
|
1920
|
-
* @param {Boolean} props.disabled
|
|
1921
|
-
* @param {Object} props.element
|
|
1922
|
-
* @param {Function} props.getValue
|
|
1923
|
-
* @param {String} props.id
|
|
1924
|
-
* @param {String} props.label
|
|
1925
|
-
* @param {String} props.max
|
|
1926
|
-
* @param {String} props.min
|
|
1927
|
-
* @param {Function} props.setValue
|
|
1928
|
-
* @param {Function} props.onFocus
|
|
1929
|
-
* @param {Function} props.onBlur
|
|
1930
|
-
* @param {String} props.step
|
|
1931
|
-
* @param {Function} props.validate
|
|
1916
|
+
/**
|
|
1917
|
+
* @param {Object} props
|
|
1918
|
+
* @param {Boolean} props.debounce
|
|
1919
|
+
* @param {String} props.description
|
|
1920
|
+
* @param {Boolean} props.disabled
|
|
1921
|
+
* @param {Object} props.element
|
|
1922
|
+
* @param {Function} props.getValue
|
|
1923
|
+
* @param {String} props.id
|
|
1924
|
+
* @param {String} props.label
|
|
1925
|
+
* @param {String} props.max
|
|
1926
|
+
* @param {String} props.min
|
|
1927
|
+
* @param {Function} props.setValue
|
|
1928
|
+
* @param {Function} props.onFocus
|
|
1929
|
+
* @param {Function} props.onBlur
|
|
1930
|
+
* @param {String} props.step
|
|
1931
|
+
* @param {Function} props.validate
|
|
1932
1932
|
*/
|
|
1933
1933
|
function NumberFieldEntry(props) {
|
|
1934
1934
|
const {
|
|
@@ -2413,26 +2413,26 @@ const OptionalFeelCheckbox = compat.forwardRef((props, ref) => {
|
|
|
2413
2413
|
});
|
|
2414
2414
|
});
|
|
2415
2415
|
|
|
2416
|
-
/**
|
|
2417
|
-
* @param {Object} props
|
|
2418
|
-
* @param {Object} props.element
|
|
2419
|
-
* @param {String} props.id
|
|
2420
|
-
* @param {String} props.description
|
|
2421
|
-
* @param {Boolean} props.debounce
|
|
2422
|
-
* @param {Boolean} props.disabled
|
|
2423
|
-
* @param {Boolean} props.feel
|
|
2424
|
-
* @param {String} props.label
|
|
2425
|
-
* @param {Function} props.getValue
|
|
2426
|
-
* @param {Function} props.setValue
|
|
2427
|
-
* @param {Function} props.tooltipContainer
|
|
2428
|
-
* @param {Function} props.validate
|
|
2429
|
-
* @param {Function} props.show
|
|
2430
|
-
* @param {Function} props.example
|
|
2431
|
-
* @param {Function} props.variables
|
|
2432
|
-
* @param {Function} props.onFocus
|
|
2433
|
-
* @param {Function} props.onBlur
|
|
2434
|
-
* @param {string} [props.placeholder]
|
|
2435
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
2416
|
+
/**
|
|
2417
|
+
* @param {Object} props
|
|
2418
|
+
* @param {Object} props.element
|
|
2419
|
+
* @param {String} props.id
|
|
2420
|
+
* @param {String} props.description
|
|
2421
|
+
* @param {Boolean} props.debounce
|
|
2422
|
+
* @param {Boolean} props.disabled
|
|
2423
|
+
* @param {Boolean} props.feel
|
|
2424
|
+
* @param {String} props.label
|
|
2425
|
+
* @param {Function} props.getValue
|
|
2426
|
+
* @param {Function} props.setValue
|
|
2427
|
+
* @param {Function} props.tooltipContainer
|
|
2428
|
+
* @param {Function} props.validate
|
|
2429
|
+
* @param {Function} props.show
|
|
2430
|
+
* @param {Function} props.example
|
|
2431
|
+
* @param {Function} props.variables
|
|
2432
|
+
* @param {Function} props.onFocus
|
|
2433
|
+
* @param {Function} props.onBlur
|
|
2434
|
+
* @param {string} [props.placeholder]
|
|
2435
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
2436
2436
|
*/
|
|
2437
2437
|
function FeelEntry(props) {
|
|
2438
2438
|
const {
|
|
@@ -2519,27 +2519,27 @@ function FeelEntry(props) {
|
|
|
2519
2519
|
});
|
|
2520
2520
|
}
|
|
2521
2521
|
|
|
2522
|
-
/**
|
|
2523
|
-
* @param {Object} props
|
|
2524
|
-
* @param {Object} props.element
|
|
2525
|
-
* @param {String} props.id
|
|
2526
|
-
* @param {String} props.description
|
|
2527
|
-
* @param {Boolean} props.debounce
|
|
2528
|
-
* @param {Boolean} props.disabled
|
|
2529
|
-
* @param {String} props.max
|
|
2530
|
-
* @param {String} props.min
|
|
2531
|
-
* @param {String} props.step
|
|
2532
|
-
* @param {Boolean} props.feel
|
|
2533
|
-
* @param {String} props.label
|
|
2534
|
-
* @param {Function} props.getValue
|
|
2535
|
-
* @param {Function} props.setValue
|
|
2536
|
-
* @param {Function} props.tooltipContainer
|
|
2537
|
-
* @param {Function} props.validate
|
|
2538
|
-
* @param {Function} props.show
|
|
2539
|
-
* @param {Function} props.example
|
|
2540
|
-
* @param {Function} props.variables
|
|
2541
|
-
* @param {Function} props.onFocus
|
|
2542
|
-
* @param {Function} props.onBlur
|
|
2522
|
+
/**
|
|
2523
|
+
* @param {Object} props
|
|
2524
|
+
* @param {Object} props.element
|
|
2525
|
+
* @param {String} props.id
|
|
2526
|
+
* @param {String} props.description
|
|
2527
|
+
* @param {Boolean} props.debounce
|
|
2528
|
+
* @param {Boolean} props.disabled
|
|
2529
|
+
* @param {String} props.max
|
|
2530
|
+
* @param {String} props.min
|
|
2531
|
+
* @param {String} props.step
|
|
2532
|
+
* @param {Boolean} props.feel
|
|
2533
|
+
* @param {String} props.label
|
|
2534
|
+
* @param {Function} props.getValue
|
|
2535
|
+
* @param {Function} props.setValue
|
|
2536
|
+
* @param {Function} props.tooltipContainer
|
|
2537
|
+
* @param {Function} props.validate
|
|
2538
|
+
* @param {Function} props.show
|
|
2539
|
+
* @param {Function} props.example
|
|
2540
|
+
* @param {Function} props.variables
|
|
2541
|
+
* @param {Function} props.onFocus
|
|
2542
|
+
* @param {Function} props.onBlur
|
|
2543
2543
|
*/
|
|
2544
2544
|
function FeelNumberEntry(props) {
|
|
2545
2545
|
return jsxRuntime.jsx(FeelEntry, {
|
|
@@ -2549,25 +2549,25 @@ function FeelNumberEntry(props) {
|
|
|
2549
2549
|
});
|
|
2550
2550
|
}
|
|
2551
2551
|
|
|
2552
|
-
/**
|
|
2553
|
-
* @param {Object} props
|
|
2554
|
-
* @param {Object} props.element
|
|
2555
|
-
* @param {String} props.id
|
|
2556
|
-
* @param {String} props.description
|
|
2557
|
-
* @param {Boolean} props.debounce
|
|
2558
|
-
* @param {Boolean} props.disabled
|
|
2559
|
-
* @param {Boolean} props.feel
|
|
2560
|
-
* @param {String} props.label
|
|
2561
|
-
* @param {Function} props.getValue
|
|
2562
|
-
* @param {Function} props.setValue
|
|
2563
|
-
* @param {Function} props.tooltipContainer
|
|
2564
|
-
* @param {Function} props.validate
|
|
2565
|
-
* @param {Function} props.show
|
|
2566
|
-
* @param {Function} props.example
|
|
2567
|
-
* @param {Function} props.variables
|
|
2568
|
-
* @param {Function} props.onFocus
|
|
2569
|
-
* @param {Function} props.onBlur
|
|
2570
|
-
* @param {string} [props.placeholder]
|
|
2552
|
+
/**
|
|
2553
|
+
* @param {Object} props
|
|
2554
|
+
* @param {Object} props.element
|
|
2555
|
+
* @param {String} props.id
|
|
2556
|
+
* @param {String} props.description
|
|
2557
|
+
* @param {Boolean} props.debounce
|
|
2558
|
+
* @param {Boolean} props.disabled
|
|
2559
|
+
* @param {Boolean} props.feel
|
|
2560
|
+
* @param {String} props.label
|
|
2561
|
+
* @param {Function} props.getValue
|
|
2562
|
+
* @param {Function} props.setValue
|
|
2563
|
+
* @param {Function} props.tooltipContainer
|
|
2564
|
+
* @param {Function} props.validate
|
|
2565
|
+
* @param {Function} props.show
|
|
2566
|
+
* @param {Function} props.example
|
|
2567
|
+
* @param {Function} props.variables
|
|
2568
|
+
* @param {Function} props.onFocus
|
|
2569
|
+
* @param {Function} props.onBlur
|
|
2570
|
+
* @param {string} [props.placeholder]
|
|
2571
2571
|
*/
|
|
2572
2572
|
function FeelTextAreaEntry(props) {
|
|
2573
2573
|
return jsxRuntime.jsx(FeelEntry, {
|
|
@@ -2577,24 +2577,24 @@ function FeelTextAreaEntry(props) {
|
|
|
2577
2577
|
});
|
|
2578
2578
|
}
|
|
2579
2579
|
|
|
2580
|
-
/**
|
|
2581
|
-
* @param {Object} props
|
|
2582
|
-
* @param {Object} props.element
|
|
2583
|
-
* @param {String} props.id
|
|
2584
|
-
* @param {String} props.description
|
|
2585
|
-
* @param {Boolean} props.debounce
|
|
2586
|
-
* @param {Boolean} props.disabled
|
|
2587
|
-
* @param {Boolean} props.feel
|
|
2588
|
-
* @param {String} props.label
|
|
2589
|
-
* @param {Function} props.getValue
|
|
2590
|
-
* @param {Function} props.setValue
|
|
2591
|
-
* @param {Function} props.tooltipContainer
|
|
2592
|
-
* @param {Function} props.validate
|
|
2593
|
-
* @param {Function} props.show
|
|
2594
|
-
* @param {Function} props.example
|
|
2595
|
-
* @param {Function} props.variables
|
|
2596
|
-
* @param {Function} props.onFocus
|
|
2597
|
-
* @param {Function} props.onBlur
|
|
2580
|
+
/**
|
|
2581
|
+
* @param {Object} props
|
|
2582
|
+
* @param {Object} props.element
|
|
2583
|
+
* @param {String} props.id
|
|
2584
|
+
* @param {String} props.description
|
|
2585
|
+
* @param {Boolean} props.debounce
|
|
2586
|
+
* @param {Boolean} props.disabled
|
|
2587
|
+
* @param {Boolean} props.feel
|
|
2588
|
+
* @param {String} props.label
|
|
2589
|
+
* @param {Function} props.getValue
|
|
2590
|
+
* @param {Function} props.setValue
|
|
2591
|
+
* @param {Function} props.tooltipContainer
|
|
2592
|
+
* @param {Function} props.validate
|
|
2593
|
+
* @param {Function} props.show
|
|
2594
|
+
* @param {Function} props.example
|
|
2595
|
+
* @param {Function} props.variables
|
|
2596
|
+
* @param {Function} props.onFocus
|
|
2597
|
+
* @param {Function} props.onBlur
|
|
2598
2598
|
*/
|
|
2599
2599
|
function FeelToggleSwitchEntry(props) {
|
|
2600
2600
|
return jsxRuntime.jsx(FeelEntry, {
|
|
@@ -2604,24 +2604,24 @@ function FeelToggleSwitchEntry(props) {
|
|
|
2604
2604
|
});
|
|
2605
2605
|
}
|
|
2606
2606
|
|
|
2607
|
-
/**
|
|
2608
|
-
* @param {Object} props
|
|
2609
|
-
* @param {Object} props.element
|
|
2610
|
-
* @param {String} props.id
|
|
2611
|
-
* @param {String} props.description
|
|
2612
|
-
* @param {Boolean} props.debounce
|
|
2613
|
-
* @param {Boolean} props.disabled
|
|
2614
|
-
* @param {Boolean} props.feel
|
|
2615
|
-
* @param {String} props.label
|
|
2616
|
-
* @param {Function} props.getValue
|
|
2617
|
-
* @param {Function} props.setValue
|
|
2618
|
-
* @param {Function} props.tooltipContainer
|
|
2619
|
-
* @param {Function} props.validate
|
|
2620
|
-
* @param {Function} props.show
|
|
2621
|
-
* @param {Function} props.example
|
|
2622
|
-
* @param {Function} props.variables
|
|
2623
|
-
* @param {Function} props.onFocus
|
|
2624
|
-
* @param {Function} props.onBlur
|
|
2607
|
+
/**
|
|
2608
|
+
* @param {Object} props
|
|
2609
|
+
* @param {Object} props.element
|
|
2610
|
+
* @param {String} props.id
|
|
2611
|
+
* @param {String} props.description
|
|
2612
|
+
* @param {Boolean} props.debounce
|
|
2613
|
+
* @param {Boolean} props.disabled
|
|
2614
|
+
* @param {Boolean} props.feel
|
|
2615
|
+
* @param {String} props.label
|
|
2616
|
+
* @param {Function} props.getValue
|
|
2617
|
+
* @param {Function} props.setValue
|
|
2618
|
+
* @param {Function} props.tooltipContainer
|
|
2619
|
+
* @param {Function} props.validate
|
|
2620
|
+
* @param {Function} props.show
|
|
2621
|
+
* @param {Function} props.example
|
|
2622
|
+
* @param {Function} props.variables
|
|
2623
|
+
* @param {Function} props.onFocus
|
|
2624
|
+
* @param {Function} props.onBlur
|
|
2625
2625
|
*/
|
|
2626
2626
|
function FeelCheckboxEntry(props) {
|
|
2627
2627
|
return jsxRuntime.jsx(FeelEntry, {
|
|
@@ -2631,26 +2631,26 @@ function FeelCheckboxEntry(props) {
|
|
|
2631
2631
|
});
|
|
2632
2632
|
}
|
|
2633
2633
|
|
|
2634
|
-
/**
|
|
2635
|
-
* @param {Object} props
|
|
2636
|
-
* @param {Object} props.element
|
|
2637
|
-
* @param {String} props.id
|
|
2638
|
-
* @param {String} props.description
|
|
2639
|
-
* @param {String} props.hostLanguage
|
|
2640
|
-
* @param {Boolean} props.singleLine
|
|
2641
|
-
* @param {Boolean} props.debounce
|
|
2642
|
-
* @param {Boolean} props.disabled
|
|
2643
|
-
* @param {Boolean} props.feel
|
|
2644
|
-
* @param {String} props.label
|
|
2645
|
-
* @param {Function} props.getValue
|
|
2646
|
-
* @param {Function} props.setValue
|
|
2647
|
-
* @param {Function} props.tooltipContainer
|
|
2648
|
-
* @param {Function} props.validate
|
|
2649
|
-
* @param {Function} props.show
|
|
2650
|
-
* @param {Function} props.example
|
|
2651
|
-
* @param {Function} props.variables
|
|
2652
|
-
* @param {Function} props.onFocus
|
|
2653
|
-
* @param {Function} props.onBlur
|
|
2634
|
+
/**
|
|
2635
|
+
* @param {Object} props
|
|
2636
|
+
* @param {Object} props.element
|
|
2637
|
+
* @param {String} props.id
|
|
2638
|
+
* @param {String} props.description
|
|
2639
|
+
* @param {String} props.hostLanguage
|
|
2640
|
+
* @param {Boolean} props.singleLine
|
|
2641
|
+
* @param {Boolean} props.debounce
|
|
2642
|
+
* @param {Boolean} props.disabled
|
|
2643
|
+
* @param {Boolean} props.feel
|
|
2644
|
+
* @param {String} props.label
|
|
2645
|
+
* @param {Function} props.getValue
|
|
2646
|
+
* @param {Function} props.setValue
|
|
2647
|
+
* @param {Function} props.tooltipContainer
|
|
2648
|
+
* @param {Function} props.validate
|
|
2649
|
+
* @param {Function} props.show
|
|
2650
|
+
* @param {Function} props.example
|
|
2651
|
+
* @param {Function} props.variables
|
|
2652
|
+
* @param {Function} props.onFocus
|
|
2653
|
+
* @param {Function} props.onBlur
|
|
2654
2654
|
*/
|
|
2655
2655
|
function FeelTemplatingEntry(props) {
|
|
2656
2656
|
return jsxRuntime.jsx(FeelEntry, {
|
|
@@ -2719,84 +2719,84 @@ const DEFAULT_LAYOUT = {};
|
|
|
2719
2719
|
const DEFAULT_DESCRIPTION = {};
|
|
2720
2720
|
const DEFAULT_TOOLTIP = {};
|
|
2721
2721
|
|
|
2722
|
-
/**
|
|
2723
|
-
* @typedef { {
|
|
2724
|
-
* component: import('preact').Component,
|
|
2725
|
-
* id: String,
|
|
2726
|
-
* isEdited?: Function
|
|
2727
|
-
* } } EntryDefinition
|
|
2728
|
-
*
|
|
2729
|
-
* @typedef { {
|
|
2730
|
-
* autoFocusEntry: String,
|
|
2731
|
-
* autoOpen?: Boolean,
|
|
2732
|
-
* entries: Array<EntryDefinition>,
|
|
2733
|
-
* id: String,
|
|
2734
|
-
* label: String,
|
|
2735
|
-
* remove: (event: MouseEvent) => void
|
|
2736
|
-
* } } ListItemDefinition
|
|
2737
|
-
*
|
|
2738
|
-
* @typedef { {
|
|
2739
|
-
* add: (event: MouseEvent) => void,
|
|
2740
|
-
* component: import('preact').Component,
|
|
2741
|
-
* element: Object,
|
|
2742
|
-
* id: String,
|
|
2743
|
-
* items: Array<ListItemDefinition>,
|
|
2744
|
-
* label: String,
|
|
2745
|
-
* shouldOpen?: Boolean
|
|
2746
|
-
* } } ListGroupDefinition
|
|
2747
|
-
*
|
|
2748
|
-
* @typedef { {
|
|
2749
|
-
* component?: import('preact').Component,
|
|
2750
|
-
* entries: Array<EntryDefinition>,
|
|
2751
|
-
* id: String,
|
|
2752
|
-
* label: String,
|
|
2753
|
-
* shouldOpen?: Boolean
|
|
2754
|
-
* } } GroupDefinition
|
|
2755
|
-
*
|
|
2756
|
-
* @typedef { {
|
|
2757
|
-
* [id: String]: GetDescriptionFunction
|
|
2758
|
-
* } } DescriptionConfig
|
|
2759
|
-
*
|
|
2760
|
-
* @typedef { {
|
|
2761
|
-
* [id: String]: GetTooltipFunction
|
|
2762
|
-
* } } TooltipConfig
|
|
2763
|
-
*
|
|
2764
|
-
* @callback { {
|
|
2765
|
-
* @param {string} id
|
|
2766
|
-
* @param {Object} element
|
|
2767
|
-
* @returns {string}
|
|
2768
|
-
* } } GetDescriptionFunction
|
|
2769
|
-
*
|
|
2770
|
-
* @callback { {
|
|
2771
|
-
* @param {string} id
|
|
2772
|
-
* @param {Object} element
|
|
2773
|
-
* @returns {string}
|
|
2774
|
-
* } } GetTooltipFunction
|
|
2775
|
-
*
|
|
2776
|
-
* @typedef { {
|
|
2777
|
-
* getEmpty: (element: object) => import('./components/Placeholder').PlaceholderDefinition,
|
|
2778
|
-
* getMultiple: (element: Object) => import('./components/Placeholder').PlaceholderDefinition
|
|
2779
|
-
* } } PlaceholderProvider
|
|
2780
|
-
*
|
|
2722
|
+
/**
|
|
2723
|
+
* @typedef { {
|
|
2724
|
+
* component: import('preact').Component,
|
|
2725
|
+
* id: String,
|
|
2726
|
+
* isEdited?: Function
|
|
2727
|
+
* } } EntryDefinition
|
|
2728
|
+
*
|
|
2729
|
+
* @typedef { {
|
|
2730
|
+
* autoFocusEntry: String,
|
|
2731
|
+
* autoOpen?: Boolean,
|
|
2732
|
+
* entries: Array<EntryDefinition>,
|
|
2733
|
+
* id: String,
|
|
2734
|
+
* label: String,
|
|
2735
|
+
* remove: (event: MouseEvent) => void
|
|
2736
|
+
* } } ListItemDefinition
|
|
2737
|
+
*
|
|
2738
|
+
* @typedef { {
|
|
2739
|
+
* add: (event: MouseEvent) => void,
|
|
2740
|
+
* component: import('preact').Component,
|
|
2741
|
+
* element: Object,
|
|
2742
|
+
* id: String,
|
|
2743
|
+
* items: Array<ListItemDefinition>,
|
|
2744
|
+
* label: String,
|
|
2745
|
+
* shouldOpen?: Boolean
|
|
2746
|
+
* } } ListGroupDefinition
|
|
2747
|
+
*
|
|
2748
|
+
* @typedef { {
|
|
2749
|
+
* component?: import('preact').Component,
|
|
2750
|
+
* entries: Array<EntryDefinition>,
|
|
2751
|
+
* id: String,
|
|
2752
|
+
* label: String,
|
|
2753
|
+
* shouldOpen?: Boolean
|
|
2754
|
+
* } } GroupDefinition
|
|
2755
|
+
*
|
|
2756
|
+
* @typedef { {
|
|
2757
|
+
* [id: String]: GetDescriptionFunction
|
|
2758
|
+
* } } DescriptionConfig
|
|
2759
|
+
*
|
|
2760
|
+
* @typedef { {
|
|
2761
|
+
* [id: String]: GetTooltipFunction
|
|
2762
|
+
* } } TooltipConfig
|
|
2763
|
+
*
|
|
2764
|
+
* @callback { {
|
|
2765
|
+
* @param {string} id
|
|
2766
|
+
* @param {Object} element
|
|
2767
|
+
* @returns {string}
|
|
2768
|
+
* } } GetDescriptionFunction
|
|
2769
|
+
*
|
|
2770
|
+
* @callback { {
|
|
2771
|
+
* @param {string} id
|
|
2772
|
+
* @param {Object} element
|
|
2773
|
+
* @returns {string}
|
|
2774
|
+
* } } GetTooltipFunction
|
|
2775
|
+
*
|
|
2776
|
+
* @typedef { {
|
|
2777
|
+
* getEmpty: (element: object) => import('./components/Placeholder').PlaceholderDefinition,
|
|
2778
|
+
* getMultiple: (element: Object) => import('./components/Placeholder').PlaceholderDefinition
|
|
2779
|
+
* } } PlaceholderProvider
|
|
2780
|
+
*
|
|
2781
2781
|
*/
|
|
2782
2782
|
|
|
2783
|
-
/**
|
|
2784
|
-
* A basic properties panel component. Describes *how* content will be rendered, accepts
|
|
2785
|
-
* data from implementor to describe *what* will be rendered.
|
|
2786
|
-
*
|
|
2787
|
-
* @param {Object} props
|
|
2788
|
-
* @param {Object|Array} props.element
|
|
2789
|
-
* @param {import('./components/Header').HeaderProvider} props.headerProvider
|
|
2790
|
-
* @param {PlaceholderProvider} [props.placeholderProvider]
|
|
2791
|
-
* @param {Array<GroupDefinition|ListGroupDefinition>} props.groups
|
|
2792
|
-
* @param {Object} [props.layoutConfig]
|
|
2793
|
-
* @param {Function} [props.layoutChanged]
|
|
2794
|
-
* @param {DescriptionConfig} [props.descriptionConfig]
|
|
2795
|
-
* @param {Function} [props.descriptionLoaded]
|
|
2796
|
-
* @param {TooltipConfig} [props.tooltipConfig]
|
|
2797
|
-
* @param {Function} [props.tooltipLoaded]
|
|
2798
|
-
* @param {HTMLElement} [props.feelPopupContainer]
|
|
2799
|
-
* @param {Object} [props.eventBus]
|
|
2783
|
+
/**
|
|
2784
|
+
* A basic properties panel component. Describes *how* content will be rendered, accepts
|
|
2785
|
+
* data from implementor to describe *what* will be rendered.
|
|
2786
|
+
*
|
|
2787
|
+
* @param {Object} props
|
|
2788
|
+
* @param {Object|Array} props.element
|
|
2789
|
+
* @param {import('./components/Header').HeaderProvider} props.headerProvider
|
|
2790
|
+
* @param {PlaceholderProvider} [props.placeholderProvider]
|
|
2791
|
+
* @param {Array<GroupDefinition|ListGroupDefinition>} props.groups
|
|
2792
|
+
* @param {Object} [props.layoutConfig]
|
|
2793
|
+
* @param {Function} [props.layoutChanged]
|
|
2794
|
+
* @param {DescriptionConfig} [props.descriptionConfig]
|
|
2795
|
+
* @param {Function} [props.descriptionLoaded]
|
|
2796
|
+
* @param {TooltipConfig} [props.tooltipConfig]
|
|
2797
|
+
* @param {Function} [props.tooltipLoaded]
|
|
2798
|
+
* @param {HTMLElement} [props.feelPopupContainer]
|
|
2799
|
+
* @param {Object} [props.eventBus]
|
|
2800
2800
|
*/
|
|
2801
2801
|
function PropertiesPanel(props) {
|
|
2802
2802
|
const {
|
|
@@ -2967,11 +2967,11 @@ function createTooltipContext(overrides = {}) {
|
|
|
2967
2967
|
|
|
2968
2968
|
// hooks //////////////////
|
|
2969
2969
|
|
|
2970
|
-
/**
|
|
2971
|
-
* This hook behaves like useLayoutEffect, but does not trigger on the first render.
|
|
2972
|
-
*
|
|
2973
|
-
* @param {Function} effect
|
|
2974
|
-
* @param {Array} deps
|
|
2970
|
+
/**
|
|
2971
|
+
* This hook behaves like useLayoutEffect, but does not trigger on the first render.
|
|
2972
|
+
*
|
|
2973
|
+
* @param {Function} effect
|
|
2974
|
+
* @param {Array} deps
|
|
2975
2975
|
*/
|
|
2976
2976
|
function useUpdateLayoutEffect(effect, deps) {
|
|
2977
2977
|
const isMounted = hooks.useRef(false);
|
|
@@ -3046,15 +3046,15 @@ function MenuItem({
|
|
|
3046
3046
|
});
|
|
3047
3047
|
}
|
|
3048
3048
|
|
|
3049
|
-
/**
|
|
3050
|
-
*
|
|
3051
|
-
* @param {Array<null | Element>} ignoredElements
|
|
3052
|
-
* @param {Function} callback
|
|
3049
|
+
/**
|
|
3050
|
+
*
|
|
3051
|
+
* @param {Array<null | Element>} ignoredElements
|
|
3052
|
+
* @param {Function} callback
|
|
3053
3053
|
*/
|
|
3054
3054
|
function useGlobalClick(ignoredElements, callback) {
|
|
3055
3055
|
hooks.useEffect(() => {
|
|
3056
|
-
/**
|
|
3057
|
-
* @param {MouseEvent} event
|
|
3056
|
+
/**
|
|
3057
|
+
* @param {MouseEvent} event
|
|
3058
3058
|
*/
|
|
3059
3059
|
function listener(event) {
|
|
3060
3060
|
if (ignoredElements.some(element => element && element.contains(event.target))) {
|
|
@@ -3087,20 +3087,20 @@ function HeaderButton(props) {
|
|
|
3087
3087
|
});
|
|
3088
3088
|
}
|
|
3089
3089
|
|
|
3090
|
-
/**
|
|
3091
|
-
* @typedef { {
|
|
3092
|
-
* [key: string]: string;
|
|
3093
|
-
* } } TranslateReplacements
|
|
3090
|
+
/**
|
|
3091
|
+
* @typedef { {
|
|
3092
|
+
* [key: string]: string;
|
|
3093
|
+
* } } TranslateReplacements
|
|
3094
3094
|
*/
|
|
3095
3095
|
|
|
3096
|
-
/**
|
|
3097
|
-
* A simple translation stub to be used for multi-language support.
|
|
3098
|
-
* Can be easily replaced with a more sophisticated solution.
|
|
3099
|
-
*
|
|
3100
|
-
* @param {string} template to interpolate
|
|
3101
|
-
* @param {TranslateReplacements} [replacements] a map with substitutes
|
|
3102
|
-
*
|
|
3103
|
-
* @return {string} the translated string
|
|
3096
|
+
/**
|
|
3097
|
+
* A simple translation stub to be used for multi-language support.
|
|
3098
|
+
* Can be easily replaced with a more sophisticated solution.
|
|
3099
|
+
*
|
|
3100
|
+
* @param {string} template to interpolate
|
|
3101
|
+
* @param {TranslateReplacements} [replacements] a map with substitutes
|
|
3102
|
+
*
|
|
3103
|
+
* @return {string} the translated string
|
|
3104
3104
|
*/
|
|
3105
3105
|
function translateFallback(template, replacements) {
|
|
3106
3106
|
replacements = replacements || {};
|
|
@@ -3212,8 +3212,8 @@ function ListItem(props) {
|
|
|
3212
3212
|
|
|
3213
3213
|
const noop$1 = () => {};
|
|
3214
3214
|
|
|
3215
|
-
/**
|
|
3216
|
-
* @param {import('../PropertiesPanel').ListGroupDefinition} props
|
|
3215
|
+
/**
|
|
3216
|
+
* @param {import('../PropertiesPanel').ListGroupDefinition} props
|
|
3217
3217
|
*/
|
|
3218
3218
|
function ListGroup(props) {
|
|
3219
3219
|
const {
|
|
@@ -3405,18 +3405,18 @@ function Checkbox(props) {
|
|
|
3405
3405
|
});
|
|
3406
3406
|
}
|
|
3407
3407
|
|
|
3408
|
-
/**
|
|
3409
|
-
* @param {Object} props
|
|
3410
|
-
* @param {Object} props.element
|
|
3411
|
-
* @param {String} props.id
|
|
3412
|
-
* @param {String} props.description
|
|
3413
|
-
* @param {String} props.label
|
|
3414
|
-
* @param {Function} props.getValue
|
|
3415
|
-
* @param {Function} props.setValue
|
|
3416
|
-
* @param {Function} props.onFocus
|
|
3417
|
-
* @param {Function} props.onBlur
|
|
3418
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
3419
|
-
* @param {boolean} [props.disabled]
|
|
3408
|
+
/**
|
|
3409
|
+
* @param {Object} props
|
|
3410
|
+
* @param {Object} props.element
|
|
3411
|
+
* @param {String} props.id
|
|
3412
|
+
* @param {String} props.description
|
|
3413
|
+
* @param {String} props.label
|
|
3414
|
+
* @param {Function} props.getValue
|
|
3415
|
+
* @param {Function} props.setValue
|
|
3416
|
+
* @param {Function} props.onFocus
|
|
3417
|
+
* @param {Function} props.onBlur
|
|
3418
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
3419
|
+
* @param {boolean} [props.disabled]
|
|
3420
3420
|
*/
|
|
3421
3421
|
function CheckboxEntry(props) {
|
|
3422
3422
|
const {
|
|
@@ -3468,19 +3468,19 @@ function prefixId$4(id) {
|
|
|
3468
3468
|
|
|
3469
3469
|
const noop = () => {};
|
|
3470
3470
|
|
|
3471
|
-
/**
|
|
3472
|
-
* @param {Object} props
|
|
3473
|
-
* @param {Object} props.element
|
|
3474
|
-
* @param {String} props.id
|
|
3475
|
-
* @param {String} props.description
|
|
3476
|
-
* @param {Boolean} props.debounce
|
|
3477
|
-
* @param {Boolean} props.disabled
|
|
3478
|
-
* @param {String} props.label
|
|
3479
|
-
* @param {Function} props.getValue
|
|
3480
|
-
* @param {Function} props.setValue
|
|
3481
|
-
* @param {Function} props.tooltipContainer
|
|
3482
|
-
* @param {Function} props.validate
|
|
3483
|
-
* @param {Function} props.show
|
|
3471
|
+
/**
|
|
3472
|
+
* @param {Object} props
|
|
3473
|
+
* @param {Object} props.element
|
|
3474
|
+
* @param {String} props.id
|
|
3475
|
+
* @param {String} props.description
|
|
3476
|
+
* @param {Boolean} props.debounce
|
|
3477
|
+
* @param {Boolean} props.disabled
|
|
3478
|
+
* @param {String} props.label
|
|
3479
|
+
* @param {Function} props.getValue
|
|
3480
|
+
* @param {Function} props.setValue
|
|
3481
|
+
* @param {Function} props.tooltipContainer
|
|
3482
|
+
* @param {Function} props.validate
|
|
3483
|
+
* @param {Function} props.show
|
|
3484
3484
|
*/
|
|
3485
3485
|
function TemplatingEntry(props) {
|
|
3486
3486
|
const {
|
|
@@ -3655,8 +3655,8 @@ function List(props) {
|
|
|
3655
3655
|
}
|
|
3656
3656
|
}, [open, hasItems]);
|
|
3657
3657
|
|
|
3658
|
-
/**
|
|
3659
|
-
* @param {MouseEvent} event
|
|
3658
|
+
/**
|
|
3659
|
+
* @param {MouseEvent} event
|
|
3660
3660
|
*/
|
|
3661
3661
|
function addItem(event) {
|
|
3662
3662
|
event.stopPropagation();
|
|
@@ -3848,20 +3848,20 @@ function Select(props) {
|
|
|
3848
3848
|
});
|
|
3849
3849
|
}
|
|
3850
3850
|
|
|
3851
|
-
/**
|
|
3852
|
-
* @param {object} props
|
|
3853
|
-
* @param {object} props.element
|
|
3854
|
-
* @param {string} props.id
|
|
3855
|
-
* @param {string} [props.description]
|
|
3856
|
-
* @param {string} props.label
|
|
3857
|
-
* @param {Function} props.getValue
|
|
3858
|
-
* @param {Function} props.setValue
|
|
3859
|
-
* @param {Function} props.onFocus
|
|
3860
|
-
* @param {Function} props.onBlur
|
|
3861
|
-
* @param {Function} props.getOptions
|
|
3862
|
-
* @param {boolean} [props.disabled]
|
|
3863
|
-
* @param {Function} [props.validate]
|
|
3864
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
3851
|
+
/**
|
|
3852
|
+
* @param {object} props
|
|
3853
|
+
* @param {object} props.element
|
|
3854
|
+
* @param {string} props.id
|
|
3855
|
+
* @param {string} [props.description]
|
|
3856
|
+
* @param {string} props.label
|
|
3857
|
+
* @param {Function} props.getValue
|
|
3858
|
+
* @param {Function} props.setValue
|
|
3859
|
+
* @param {Function} props.onFocus
|
|
3860
|
+
* @param {Function} props.onBlur
|
|
3861
|
+
* @param {Function} props.getOptions
|
|
3862
|
+
* @param {boolean} [props.disabled]
|
|
3863
|
+
* @param {Function} [props.validate]
|
|
3864
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
3865
3865
|
*/
|
|
3866
3866
|
function SelectEntry(props) {
|
|
3867
3867
|
const {
|
|
@@ -4060,21 +4060,21 @@ function TextArea(props) {
|
|
|
4060
4060
|
});
|
|
4061
4061
|
}
|
|
4062
4062
|
|
|
4063
|
-
/**
|
|
4064
|
-
* @param {object} props
|
|
4065
|
-
* @param {object} props.element
|
|
4066
|
-
* @param {string} props.id
|
|
4067
|
-
* @param {string} props.description
|
|
4068
|
-
* @param {boolean} props.debounce
|
|
4069
|
-
* @param {string} props.label
|
|
4070
|
-
* @param {Function} props.getValue
|
|
4071
|
-
* @param {Function} props.setValue
|
|
4072
|
-
* @param {Function} props.onFocus
|
|
4073
|
-
* @param {Function} props.onBlur
|
|
4074
|
-
* @param {number} props.rows
|
|
4075
|
-
* @param {boolean} props.monospace
|
|
4076
|
-
* @param {Function} [props.validate]
|
|
4077
|
-
* @param {boolean} [props.disabled]
|
|
4063
|
+
/**
|
|
4064
|
+
* @param {object} props
|
|
4065
|
+
* @param {object} props.element
|
|
4066
|
+
* @param {string} props.id
|
|
4067
|
+
* @param {string} props.description
|
|
4068
|
+
* @param {boolean} props.debounce
|
|
4069
|
+
* @param {string} props.label
|
|
4070
|
+
* @param {Function} props.getValue
|
|
4071
|
+
* @param {Function} props.setValue
|
|
4072
|
+
* @param {Function} props.onFocus
|
|
4073
|
+
* @param {Function} props.onBlur
|
|
4074
|
+
* @param {number} props.rows
|
|
4075
|
+
* @param {boolean} props.monospace
|
|
4076
|
+
* @param {Function} [props.validate]
|
|
4077
|
+
* @param {boolean} [props.disabled]
|
|
4078
4078
|
*/
|
|
4079
4079
|
function TextAreaEntry(props) {
|
|
4080
4080
|
const {
|
|
@@ -4208,20 +4208,20 @@ function Textfield(props) {
|
|
|
4208
4208
|
});
|
|
4209
4209
|
}
|
|
4210
4210
|
|
|
4211
|
-
/**
|
|
4212
|
-
* @param {Object} props
|
|
4213
|
-
* @param {Object} props.element
|
|
4214
|
-
* @param {String} props.id
|
|
4215
|
-
* @param {String} props.description
|
|
4216
|
-
* @param {Boolean} props.debounce
|
|
4217
|
-
* @param {Boolean} props.disabled
|
|
4218
|
-
* @param {String} props.label
|
|
4219
|
-
* @param {Function} props.getValue
|
|
4220
|
-
* @param {Function} props.setValue
|
|
4221
|
-
* @param {Function} props.onFocus
|
|
4222
|
-
* @param {Function} props.onBlur
|
|
4223
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
4224
|
-
* @param {Function} props.validate
|
|
4211
|
+
/**
|
|
4212
|
+
* @param {Object} props
|
|
4213
|
+
* @param {Object} props.element
|
|
4214
|
+
* @param {String} props.id
|
|
4215
|
+
* @param {String} props.description
|
|
4216
|
+
* @param {Boolean} props.debounce
|
|
4217
|
+
* @param {Boolean} props.disabled
|
|
4218
|
+
* @param {String} props.label
|
|
4219
|
+
* @param {Function} props.getValue
|
|
4220
|
+
* @param {Function} props.setValue
|
|
4221
|
+
* @param {Function} props.onFocus
|
|
4222
|
+
* @param {Function} props.onBlur
|
|
4223
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
4224
|
+
* @param {Function} props.validate
|
|
4225
4225
|
*/
|
|
4226
4226
|
function TextfieldEntry(props) {
|
|
4227
4227
|
const {
|
|
@@ -4314,20 +4314,20 @@ class FeelPopupModule {
|
|
|
4314
4314
|
this._eventBus = eventBus;
|
|
4315
4315
|
}
|
|
4316
4316
|
|
|
4317
|
-
/**
|
|
4318
|
-
* Check if the FEEL popup is open.
|
|
4319
|
-
* @return {Boolean}
|
|
4317
|
+
/**
|
|
4318
|
+
* Check if the FEEL popup is open.
|
|
4319
|
+
* @return {Boolean}
|
|
4320
4320
|
*/
|
|
4321
4321
|
isOpen() {
|
|
4322
4322
|
return this._eventBus.fire('feelPopup._isOpen');
|
|
4323
4323
|
}
|
|
4324
4324
|
|
|
4325
|
-
/**
|
|
4326
|
-
* Open the FEEL popup.
|
|
4327
|
-
*
|
|
4328
|
-
* @param {String} entryId
|
|
4329
|
-
* @param {Object} popupConfig
|
|
4330
|
-
* @param {HTMLElement} sourceElement
|
|
4325
|
+
/**
|
|
4326
|
+
* Open the FEEL popup.
|
|
4327
|
+
*
|
|
4328
|
+
* @param {String} entryId
|
|
4329
|
+
* @param {Object} popupConfig
|
|
4330
|
+
* @param {HTMLElement} sourceElement
|
|
4331
4331
|
*/
|
|
4332
4332
|
open(entryId, popupConfig, sourceElement) {
|
|
4333
4333
|
return this._eventBus.fire('feelPopup._open', {
|
|
@@ -4337,8 +4337,8 @@ class FeelPopupModule {
|
|
|
4337
4337
|
});
|
|
4338
4338
|
}
|
|
4339
4339
|
|
|
4340
|
-
/**
|
|
4341
|
-
* Close the FEEL popup.
|
|
4340
|
+
/**
|
|
4341
|
+
* Close the FEEL popup.
|
|
4342
4342
|
*/
|
|
4343
4343
|
close() {
|
|
4344
4344
|
return this._eventBus.fire('feelPopup._close');
|