@bpmn-io/form-js-editor 1.13.2 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/form-js-editor.css +13 -5
- package/dist/assets/properties-panel.css +1517 -1509
- package/dist/index.cjs +446 -438
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +446 -438
- package/dist/index.es.js.map +1 -1
- package/dist/types/FormEditor.d.ts +9 -9
- package/dist/types/core/FormLayoutValidator.d.ts +1 -1
- package/dist/types/features/dragging/Dragging.d.ts +1 -1
- package/dist/types/features/modeling/cmd/AddFormFieldHandler.d.ts +1 -1
- package/dist/types/features/modeling/cmd/EditFormFieldHandler.d.ts +1 -1
- package/dist/types/features/modeling/cmd/MoveFormFieldHandler.d.ts +1 -1
- package/dist/types/features/modeling/cmd/RemoveFormFieldHandler.d.ts +1 -1
- package/dist/types/features/modeling/cmd/UpdateIdClaimHandler.d.ts +1 -1
- package/dist/types/features/modeling/cmd/UpdateKeyClaimHandler.d.ts +1 -1
- package/dist/types/features/modeling/cmd/UpdatePathClaimHandler.d.ts +1 -1
- package/dist/types/features/palette/components/Palette.d.ts +2 -2
- package/dist/types/features/properties-panel/PropertiesPanelRenderer.d.ts +3 -3
- package/dist/types/index.d.ts +1 -1
- package/dist/types/render/Renderer.d.ts +3 -3
- package/dist/types/render/components/editor-form-fields/EditorTable.d.ts +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1618,10 +1618,10 @@ function Palette(props) {
|
|
|
1618
1618
|
return jsxRuntime.jsx(PaletteEntry, {
|
|
1619
1619
|
getPaletteIcon: getPaletteIcon,
|
|
1620
1620
|
...entry
|
|
1621
|
-
});
|
|
1621
|
+
}, entry.type);
|
|
1622
1622
|
})
|
|
1623
1623
|
})]
|
|
1624
|
-
})), groups.length == 0 && jsxRuntime.jsx("div", {
|
|
1624
|
+
}, id)), groups.length == 0 && jsxRuntime.jsx("div", {
|
|
1625
1625
|
class: "fjs-palette-no-entries",
|
|
1626
1626
|
children: "No components found."
|
|
1627
1627
|
})]
|
|
@@ -1698,15 +1698,17 @@ function getPaletteIcon(entry) {
|
|
|
1698
1698
|
} = entry;
|
|
1699
1699
|
let Icon;
|
|
1700
1700
|
if (iconUrl) {
|
|
1701
|
-
Icon = ()
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1701
|
+
Icon = function Icon() {
|
|
1702
|
+
return jsxRuntime.jsx("img", {
|
|
1703
|
+
class: "fjs-field-icon-image",
|
|
1704
|
+
width: 36,
|
|
1705
|
+
style: {
|
|
1706
|
+
margin: 'auto'
|
|
1707
|
+
},
|
|
1708
|
+
alt: label,
|
|
1709
|
+
src: formJsViewer.sanitizeImageSource(iconUrl)
|
|
1710
|
+
});
|
|
1711
|
+
};
|
|
1710
1712
|
} else {
|
|
1711
1713
|
Icon = icon || formJsViewer.iconsByType(type);
|
|
1712
1714
|
}
|
|
@@ -1726,9 +1728,9 @@ const InjectedRendersRoot = () => {
|
|
|
1726
1728
|
return jsxRuntime.jsx(preact.Fragment, {
|
|
1727
1729
|
children: injectedRenderers.map(({
|
|
1728
1730
|
Renderer
|
|
1729
|
-
}) => jsxRuntime.jsx(Renderer, {
|
|
1731
|
+
}, index) => jsxRuntime.jsx(Renderer, {
|
|
1730
1732
|
...injectedProps
|
|
1731
|
-
}))
|
|
1733
|
+
}, index))
|
|
1732
1734
|
});
|
|
1733
1735
|
};
|
|
1734
1736
|
|
|
@@ -5533,19 +5535,19 @@ const ErrorsContext = preact.createContext({
|
|
|
5533
5535
|
errors: {}
|
|
5534
5536
|
});
|
|
5535
5537
|
|
|
5536
|
-
/**
|
|
5537
|
-
* @typedef {Function} <propertiesPanel.showEntry> callback
|
|
5538
|
-
*
|
|
5539
|
-
* @example
|
|
5540
|
-
*
|
|
5541
|
-
* useEvent('propertiesPanel.showEntry', ({ focus = false, ...rest }) => {
|
|
5542
|
-
* // ...
|
|
5543
|
-
* });
|
|
5544
|
-
*
|
|
5545
|
-
* @param {Object} context
|
|
5546
|
-
* @param {boolean} [context.focus]
|
|
5547
|
-
*
|
|
5548
|
-
* @returns void
|
|
5538
|
+
/**
|
|
5539
|
+
* @typedef {Function} <propertiesPanel.showEntry> callback
|
|
5540
|
+
*
|
|
5541
|
+
* @example
|
|
5542
|
+
*
|
|
5543
|
+
* useEvent('propertiesPanel.showEntry', ({ focus = false, ...rest }) => {
|
|
5544
|
+
* // ...
|
|
5545
|
+
* });
|
|
5546
|
+
*
|
|
5547
|
+
* @param {Object} context
|
|
5548
|
+
* @param {boolean} [context.focus]
|
|
5549
|
+
*
|
|
5550
|
+
* @returns void
|
|
5549
5551
|
*/
|
|
5550
5552
|
|
|
5551
5553
|
const EventContext = preact.createContext({
|
|
@@ -5562,20 +5564,20 @@ const TooltipContext = preact.createContext({
|
|
|
5562
5564
|
getTooltipForId: () => {}
|
|
5563
5565
|
});
|
|
5564
5566
|
|
|
5565
|
-
/**
|
|
5566
|
-
* Accesses the global TooltipContext and returns a tooltip for a given id and element.
|
|
5567
|
-
*
|
|
5568
|
-
* @example
|
|
5569
|
-
* ```jsx
|
|
5570
|
-
* function TextField(props) {
|
|
5571
|
-
* const tooltip = useTooltipContext('input1', element);
|
|
5572
|
-
* }
|
|
5573
|
-
* ```
|
|
5574
|
-
*
|
|
5575
|
-
* @param {string} id
|
|
5576
|
-
* @param {object} element
|
|
5577
|
-
*
|
|
5578
|
-
* @returns {string}
|
|
5567
|
+
/**
|
|
5568
|
+
* Accesses the global TooltipContext and returns a tooltip for a given id and element.
|
|
5569
|
+
*
|
|
5570
|
+
* @example
|
|
5571
|
+
* ```jsx
|
|
5572
|
+
* function TextField(props) {
|
|
5573
|
+
* const tooltip = useTooltipContext('input1', element);
|
|
5574
|
+
* }
|
|
5575
|
+
* ```
|
|
5576
|
+
*
|
|
5577
|
+
* @param {string} id
|
|
5578
|
+
* @param {object} element
|
|
5579
|
+
*
|
|
5580
|
+
* @returns {string}
|
|
5579
5581
|
*/
|
|
5580
5582
|
function useTooltipContext(id, element) {
|
|
5581
5583
|
const {
|
|
@@ -5727,20 +5729,20 @@ function prefixId$9(id) {
|
|
|
5727
5729
|
return `bio-properties-panel-${id}`;
|
|
5728
5730
|
}
|
|
5729
5731
|
|
|
5730
|
-
/**
|
|
5731
|
-
* Accesses the global DescriptionContext and returns a description for a given id and element.
|
|
5732
|
-
*
|
|
5733
|
-
* @example
|
|
5734
|
-
* ```jsx
|
|
5735
|
-
* function TextField(props) {
|
|
5736
|
-
* const description = useDescriptionContext('input1', element);
|
|
5737
|
-
* }
|
|
5738
|
-
* ```
|
|
5739
|
-
*
|
|
5740
|
-
* @param {string} id
|
|
5741
|
-
* @param {object} element
|
|
5742
|
-
*
|
|
5743
|
-
* @returns {string}
|
|
5732
|
+
/**
|
|
5733
|
+
* Accesses the global DescriptionContext and returns a description for a given id and element.
|
|
5734
|
+
*
|
|
5735
|
+
* @example
|
|
5736
|
+
* ```jsx
|
|
5737
|
+
* function TextField(props) {
|
|
5738
|
+
* const description = useDescriptionContext('input1', element);
|
|
5739
|
+
* }
|
|
5740
|
+
* ```
|
|
5741
|
+
*
|
|
5742
|
+
* @param {string} id
|
|
5743
|
+
* @param {object} element
|
|
5744
|
+
*
|
|
5745
|
+
* @returns {string}
|
|
5744
5746
|
*/
|
|
5745
5747
|
function useDescriptionContext(id, element) {
|
|
5746
5748
|
const {
|
|
@@ -5761,11 +5763,11 @@ function useErrors() {
|
|
|
5761
5763
|
return errors;
|
|
5762
5764
|
}
|
|
5763
5765
|
|
|
5764
|
-
/**
|
|
5765
|
-
* Subscribe to an event immediately. Update subscription after inputs changed.
|
|
5766
|
-
*
|
|
5767
|
-
* @param {string} event
|
|
5768
|
-
* @param {Function} callback
|
|
5766
|
+
/**
|
|
5767
|
+
* Subscribe to an event immediately. Update subscription after inputs changed.
|
|
5768
|
+
*
|
|
5769
|
+
* @param {string} event
|
|
5770
|
+
* @param {Function} callback
|
|
5769
5771
|
*/
|
|
5770
5772
|
function useEvent(event, callback, eventBus) {
|
|
5771
5773
|
const eventContext = hooks.useContext(EventContext);
|
|
@@ -5795,20 +5797,20 @@ function useEvent(event, callback, eventBus) {
|
|
|
5795
5797
|
}, [callback, event, eventBus]);
|
|
5796
5798
|
}
|
|
5797
5799
|
|
|
5798
|
-
/**
|
|
5799
|
-
* Creates a state that persists in the global LayoutContext.
|
|
5800
|
-
*
|
|
5801
|
-
* @example
|
|
5802
|
-
* ```jsx
|
|
5803
|
-
* function Group(props) {
|
|
5804
|
-
* const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
|
|
5805
|
-
* }
|
|
5806
|
-
* ```
|
|
5807
|
-
*
|
|
5808
|
-
* @param {(string|number)[]} path
|
|
5809
|
-
* @param {any} [defaultValue]
|
|
5810
|
-
*
|
|
5811
|
-
* @returns {[ any, Function ]}
|
|
5800
|
+
/**
|
|
5801
|
+
* Creates a state that persists in the global LayoutContext.
|
|
5802
|
+
*
|
|
5803
|
+
* @example
|
|
5804
|
+
* ```jsx
|
|
5805
|
+
* function Group(props) {
|
|
5806
|
+
* const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
|
|
5807
|
+
* }
|
|
5808
|
+
* ```
|
|
5809
|
+
*
|
|
5810
|
+
* @param {(string|number)[]} path
|
|
5811
|
+
* @param {any} [defaultValue]
|
|
5812
|
+
*
|
|
5813
|
+
* @returns {[ any, Function ]}
|
|
5812
5814
|
*/
|
|
5813
5815
|
function useLayoutState(path, defaultValue) {
|
|
5814
5816
|
const {
|
|
@@ -5822,11 +5824,11 @@ function useLayoutState(path, defaultValue) {
|
|
|
5822
5824
|
return [layoutForKey, setState];
|
|
5823
5825
|
}
|
|
5824
5826
|
|
|
5825
|
-
/**
|
|
5826
|
-
* @pinussilvestrus: we need to introduce our own hook to persist the previous
|
|
5827
|
-
* state on updates.
|
|
5828
|
-
*
|
|
5829
|
-
* cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
|
|
5827
|
+
/**
|
|
5828
|
+
* @pinussilvestrus: we need to introduce our own hook to persist the previous
|
|
5829
|
+
* state on updates.
|
|
5830
|
+
*
|
|
5831
|
+
* cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
|
|
5830
5832
|
*/
|
|
5831
5833
|
|
|
5832
5834
|
function usePrevious(value) {
|
|
@@ -5837,12 +5839,12 @@ function usePrevious(value) {
|
|
|
5837
5839
|
return ref.current;
|
|
5838
5840
|
}
|
|
5839
5841
|
|
|
5840
|
-
/**
|
|
5841
|
-
* Subscribe to `propertiesPanel.showEntry`.
|
|
5842
|
-
*
|
|
5843
|
-
* @param {string} id
|
|
5844
|
-
*
|
|
5845
|
-
* @returns {import('preact').Ref}
|
|
5842
|
+
/**
|
|
5843
|
+
* Subscribe to `propertiesPanel.showEntry`.
|
|
5844
|
+
*
|
|
5845
|
+
* @param {string} id
|
|
5846
|
+
*
|
|
5847
|
+
* @returns {import('preact').Ref}
|
|
5846
5848
|
*/
|
|
5847
5849
|
function useShowEntryEvent(id) {
|
|
5848
5850
|
const {
|
|
@@ -5873,20 +5875,20 @@ function useShowEntryEvent(id) {
|
|
|
5873
5875
|
return ref;
|
|
5874
5876
|
}
|
|
5875
5877
|
|
|
5876
|
-
/**
|
|
5877
|
-
* @callback setSticky
|
|
5878
|
-
* @param {boolean} value
|
|
5878
|
+
/**
|
|
5879
|
+
* @callback setSticky
|
|
5880
|
+
* @param {boolean} value
|
|
5879
5881
|
*/
|
|
5880
5882
|
|
|
5881
|
-
/**
|
|
5882
|
-
* Use IntersectionObserver to identify when DOM element is in sticky mode.
|
|
5883
|
-
* If sticky is observered setSticky(true) will be called.
|
|
5884
|
-
* If sticky mode is left, setSticky(false) will be called.
|
|
5885
|
-
*
|
|
5886
|
-
*
|
|
5887
|
-
* @param {Object} ref
|
|
5888
|
-
* @param {string} scrollContainerSelector
|
|
5889
|
-
* @param {setSticky} setSticky
|
|
5883
|
+
/**
|
|
5884
|
+
* Use IntersectionObserver to identify when DOM element is in sticky mode.
|
|
5885
|
+
* If sticky is observered setSticky(true) will be called.
|
|
5886
|
+
* If sticky mode is left, setSticky(false) will be called.
|
|
5887
|
+
*
|
|
5888
|
+
*
|
|
5889
|
+
* @param {Object} ref
|
|
5890
|
+
* @param {string} scrollContainerSelector
|
|
5891
|
+
* @param {setSticky} setSticky
|
|
5890
5892
|
*/
|
|
5891
5893
|
function useStickyIntersectionObserver(ref, scrollContainerSelector, setSticky) {
|
|
5892
5894
|
const [scrollContainer, setScrollContainer] = hooks.useState(minDom.query(scrollContainerSelector));
|
|
@@ -5940,19 +5942,19 @@ function useStickyIntersectionObserver(ref, scrollContainerSelector, setSticky)
|
|
|
5940
5942
|
}, [ref.current, scrollContainer, setSticky]);
|
|
5941
5943
|
}
|
|
5942
5944
|
|
|
5943
|
-
/**
|
|
5944
|
-
* Creates a static function reference with changing body.
|
|
5945
|
-
* This is necessary when external libraries require a callback function
|
|
5946
|
-
* that has references to state variables.
|
|
5947
|
-
*
|
|
5948
|
-
* Usage:
|
|
5949
|
-
* const callback = useStaticCallback((val) => {val === currentState});
|
|
5950
|
-
*
|
|
5951
|
-
* The `callback` reference is static and can be safely used in external
|
|
5952
|
-
* libraries or as a prop that does not cause rerendering of children.
|
|
5953
|
-
*
|
|
5954
|
-
* @param {Function} callback function with changing reference
|
|
5955
|
-
* @returns {Function} static function reference
|
|
5945
|
+
/**
|
|
5946
|
+
* Creates a static function reference with changing body.
|
|
5947
|
+
* This is necessary when external libraries require a callback function
|
|
5948
|
+
* that has references to state variables.
|
|
5949
|
+
*
|
|
5950
|
+
* Usage:
|
|
5951
|
+
* const callback = useStaticCallback((val) => {val === currentState});
|
|
5952
|
+
*
|
|
5953
|
+
* The `callback` reference is static and can be safely used in external
|
|
5954
|
+
* libraries or as a prop that does not cause rerendering of children.
|
|
5955
|
+
*
|
|
5956
|
+
* @param {Function} callback function with changing reference
|
|
5957
|
+
* @returns {Function} static function reference
|
|
5956
5958
|
*/
|
|
5957
5959
|
function useStaticCallback(callback) {
|
|
5958
5960
|
const callbackRef = hooks.useRef(callback);
|
|
@@ -6093,13 +6095,13 @@ function DataMarker(props) {
|
|
|
6093
6095
|
return null;
|
|
6094
6096
|
}
|
|
6095
6097
|
|
|
6096
|
-
/**
|
|
6097
|
-
* @typedef { {
|
|
6098
|
-
* text: (element: object) => string,
|
|
6099
|
-
* icon?: (element: Object) => import('preact').Component
|
|
6100
|
-
* } } PlaceholderDefinition
|
|
6101
|
-
*
|
|
6102
|
-
* @param { PlaceholderDefinition } props
|
|
6098
|
+
/**
|
|
6099
|
+
* @typedef { {
|
|
6100
|
+
* text: (element: object) => string,
|
|
6101
|
+
* icon?: (element: Object) => import('preact').Component
|
|
6102
|
+
* } } PlaceholderDefinition
|
|
6103
|
+
*
|
|
6104
|
+
* @param { PlaceholderDefinition } props
|
|
6103
6105
|
*/
|
|
6104
6106
|
function Placeholder(props) {
|
|
6105
6107
|
const {
|
|
@@ -6136,9 +6138,9 @@ function Description$1(props) {
|
|
|
6136
6138
|
}
|
|
6137
6139
|
const noop$6 = () => {};
|
|
6138
6140
|
|
|
6139
|
-
/**
|
|
6140
|
-
* Buffer `.focus()` calls while the editor is not initialized.
|
|
6141
|
-
* Set Focus inside when the editor is ready.
|
|
6141
|
+
/**
|
|
6142
|
+
* Buffer `.focus()` calls while the editor is not initialized.
|
|
6143
|
+
* Set Focus inside when the editor is ready.
|
|
6142
6144
|
*/
|
|
6143
6145
|
const useBufferedFocus$1 = function (editor, ref) {
|
|
6144
6146
|
const [buffer, setBuffer] = hooks.useState(undefined);
|
|
@@ -6238,9 +6240,9 @@ const CodeEditor$1 = React.forwardRef((props, ref) => {
|
|
|
6238
6240
|
});
|
|
6239
6241
|
const noop$5 = () => {};
|
|
6240
6242
|
|
|
6241
|
-
/**
|
|
6242
|
-
* Buffer `.focus()` calls while the editor is not initialized.
|
|
6243
|
-
* Set Focus inside when the editor is ready.
|
|
6243
|
+
/**
|
|
6244
|
+
* Buffer `.focus()` calls while the editor is not initialized.
|
|
6245
|
+
* Set Focus inside when the editor is ready.
|
|
6244
6246
|
*/
|
|
6245
6247
|
const useBufferedFocus = function (editor, ref) {
|
|
6246
6248
|
const [buffer, setBuffer] = hooks.useState(undefined);
|
|
@@ -6289,10 +6291,10 @@ const CodeEditor = React.forwardRef((props, ref) => {
|
|
|
6289
6291
|
hooks.useEffect(() => {
|
|
6290
6292
|
let editor;
|
|
6291
6293
|
|
|
6292
|
-
/* Trigger FEEL toggle when
|
|
6293
|
-
*
|
|
6294
|
-
* - `backspace` is pressed
|
|
6295
|
-
* - AND the cursor is at the beginning of the input
|
|
6294
|
+
/* Trigger FEEL toggle when
|
|
6295
|
+
*
|
|
6296
|
+
* - `backspace` is pressed
|
|
6297
|
+
* - AND the cursor is at the beginning of the input
|
|
6296
6298
|
*/
|
|
6297
6299
|
const onKeyDown = e => {
|
|
6298
6300
|
if (e.key !== 'Backspace' || !editor) {
|
|
@@ -6381,10 +6383,10 @@ function FeelIndicator(props) {
|
|
|
6381
6383
|
}
|
|
6382
6384
|
const noop$4 = () => {};
|
|
6383
6385
|
|
|
6384
|
-
/**
|
|
6385
|
-
* @param {Object} props
|
|
6386
|
-
* @param {Object} props.label
|
|
6387
|
-
* @param {String} props.feel
|
|
6386
|
+
/**
|
|
6387
|
+
* @param {Object} props
|
|
6388
|
+
* @param {Object} props.label
|
|
6389
|
+
* @param {String} props.feel
|
|
6388
6390
|
*/
|
|
6389
6391
|
function FeelIcon(props) {
|
|
6390
6392
|
const {
|
|
@@ -6418,22 +6420,22 @@ const FeelPopupContext = preact.createContext({
|
|
|
6418
6420
|
source: null
|
|
6419
6421
|
});
|
|
6420
6422
|
|
|
6421
|
-
/**
|
|
6422
|
-
* Add a dragger that calls back the passed function with
|
|
6423
|
-
* { event, delta } on drag.
|
|
6424
|
-
*
|
|
6425
|
-
* @example
|
|
6426
|
-
*
|
|
6427
|
-
* function dragMove(event, delta) {
|
|
6428
|
-
* // we are dragging (!!)
|
|
6429
|
-
* }
|
|
6430
|
-
*
|
|
6431
|
-
* domElement.addEventListener('dragstart', dragger(dragMove));
|
|
6432
|
-
*
|
|
6433
|
-
* @param {Function} fn
|
|
6434
|
-
* @param {Element} [dragPreview]
|
|
6435
|
-
*
|
|
6436
|
-
* @return {Function} drag start callback function
|
|
6423
|
+
/**
|
|
6424
|
+
* Add a dragger that calls back the passed function with
|
|
6425
|
+
* { event, delta } on drag.
|
|
6426
|
+
*
|
|
6427
|
+
* @example
|
|
6428
|
+
*
|
|
6429
|
+
* function dragMove(event, delta) {
|
|
6430
|
+
* // we are dragging (!!)
|
|
6431
|
+
* }
|
|
6432
|
+
*
|
|
6433
|
+
* domElement.addEventListener('dragstart', dragger(dragMove));
|
|
6434
|
+
*
|
|
6435
|
+
* @param {Function} fn
|
|
6436
|
+
* @param {Element} [dragPreview]
|
|
6437
|
+
*
|
|
6438
|
+
* @return {Function} drag start callback function
|
|
6437
6439
|
*/
|
|
6438
6440
|
function createDragger(fn, dragPreview) {
|
|
6439
6441
|
let self;
|
|
@@ -6487,23 +6489,23 @@ function emptyCanvas() {
|
|
|
6487
6489
|
}
|
|
6488
6490
|
const noop$3 = () => {};
|
|
6489
6491
|
|
|
6490
|
-
/**
|
|
6491
|
-
* A generic popup component.
|
|
6492
|
-
*
|
|
6493
|
-
* @param {Object} props
|
|
6494
|
-
* @param {HTMLElement} [props.container]
|
|
6495
|
-
* @param {string} [props.className]
|
|
6496
|
-
* @param {boolean} [props.delayInitialFocus]
|
|
6497
|
-
* @param {{x: number, y: number}} [props.position]
|
|
6498
|
-
* @param {number} [props.width]
|
|
6499
|
-
* @param {number} [props.height]
|
|
6500
|
-
* @param {Function} props.onClose
|
|
6501
|
-
* @param {Function} [props.onPostActivate]
|
|
6502
|
-
* @param {Function} [props.onPostDeactivate]
|
|
6503
|
-
* @param {boolean} [props.returnFocus]
|
|
6504
|
-
* @param {boolean} [props.closeOnEscape]
|
|
6505
|
-
* @param {string} props.title
|
|
6506
|
-
* @param {Ref} [ref]
|
|
6492
|
+
/**
|
|
6493
|
+
* A generic popup component.
|
|
6494
|
+
*
|
|
6495
|
+
* @param {Object} props
|
|
6496
|
+
* @param {HTMLElement} [props.container]
|
|
6497
|
+
* @param {string} [props.className]
|
|
6498
|
+
* @param {boolean} [props.delayInitialFocus]
|
|
6499
|
+
* @param {{x: number, y: number}} [props.position]
|
|
6500
|
+
* @param {number} [props.width]
|
|
6501
|
+
* @param {number} [props.height]
|
|
6502
|
+
* @param {Function} props.onClose
|
|
6503
|
+
* @param {Function} [props.onPostActivate]
|
|
6504
|
+
* @param {Function} [props.onPostDeactivate]
|
|
6505
|
+
* @param {boolean} [props.returnFocus]
|
|
6506
|
+
* @param {boolean} [props.closeOnEscape]
|
|
6507
|
+
* @param {string} props.title
|
|
6508
|
+
* @param {Ref} [ref]
|
|
6507
6509
|
*/
|
|
6508
6510
|
function PopupComponent(props, globalRef) {
|
|
6509
6511
|
const {
|
|
@@ -6721,12 +6723,12 @@ function getContainerNode(node) {
|
|
|
6721
6723
|
const FEEL_POPUP_WIDTH = 700;
|
|
6722
6724
|
const FEEL_POPUP_HEIGHT = 250;
|
|
6723
6725
|
|
|
6724
|
-
/**
|
|
6725
|
-
* FEEL popup component, built as a singleton. Emits lifecycle events as follows:
|
|
6726
|
-
* - `feelPopup.open` - fired before the popup is mounted
|
|
6727
|
-
* - `feelPopup.opened` - fired after the popup is mounted. Event context contains the DOM node of the popup
|
|
6728
|
-
* - `feelPopup.close` - fired before the popup is unmounted. Event context contains the DOM node of the popup
|
|
6729
|
-
* - `feelPopup.closed` - fired after the popup is unmounted
|
|
6726
|
+
/**
|
|
6727
|
+
* FEEL popup component, built as a singleton. Emits lifecycle events as follows:
|
|
6728
|
+
* - `feelPopup.open` - fired before the popup is mounted
|
|
6729
|
+
* - `feelPopup.opened` - fired after the popup is mounted. Event context contains the DOM node of the popup
|
|
6730
|
+
* - `feelPopup.close` - fired before the popup is unmounted. Event context contains the DOM node of the popup
|
|
6731
|
+
* - `feelPopup.closed` - fired after the popup is unmounted
|
|
6730
6732
|
*/
|
|
6731
6733
|
function FEELPopupRoot(props) {
|
|
6732
6734
|
const {
|
|
@@ -6953,11 +6955,11 @@ function autoCompletionOpen(element) {
|
|
|
6953
6955
|
return element.closest('.cm-editor').querySelector('.cm-tooltip-autocomplete');
|
|
6954
6956
|
}
|
|
6955
6957
|
|
|
6956
|
-
/**
|
|
6957
|
-
* This hook behaves like useEffect, but does not trigger on the first render.
|
|
6958
|
-
*
|
|
6959
|
-
* @param {Function} effect
|
|
6960
|
-
* @param {Array} deps
|
|
6958
|
+
/**
|
|
6959
|
+
* This hook behaves like useEffect, but does not trigger on the first render.
|
|
6960
|
+
*
|
|
6961
|
+
* @param {Function} effect
|
|
6962
|
+
* @param {Array} deps
|
|
6961
6963
|
*/
|
|
6962
6964
|
function useUpdateEffect(effect, deps) {
|
|
6963
6965
|
const isMounted = hooks.useRef(false);
|
|
@@ -7034,19 +7036,19 @@ function ToggleSwitch(props) {
|
|
|
7034
7036
|
});
|
|
7035
7037
|
}
|
|
7036
7038
|
|
|
7037
|
-
/**
|
|
7038
|
-
* @param {Object} props
|
|
7039
|
-
* @param {Object} props.element
|
|
7040
|
-
* @param {String} props.id
|
|
7041
|
-
* @param {String} props.description
|
|
7042
|
-
* @param {String} props.label
|
|
7043
|
-
* @param {String} props.switcherLabel
|
|
7044
|
-
* @param {Boolean} props.inline
|
|
7045
|
-
* @param {Function} props.getValue
|
|
7046
|
-
* @param {Function} props.setValue
|
|
7047
|
-
* @param {Function} props.onFocus
|
|
7048
|
-
* @param {Function} props.onBlur
|
|
7049
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
7039
|
+
/**
|
|
7040
|
+
* @param {Object} props
|
|
7041
|
+
* @param {Object} props.element
|
|
7042
|
+
* @param {String} props.id
|
|
7043
|
+
* @param {String} props.description
|
|
7044
|
+
* @param {String} props.label
|
|
7045
|
+
* @param {String} props.switcherLabel
|
|
7046
|
+
* @param {Boolean} props.inline
|
|
7047
|
+
* @param {Function} props.getValue
|
|
7048
|
+
* @param {Function} props.setValue
|
|
7049
|
+
* @param {Function} props.onFocus
|
|
7050
|
+
* @param {Function} props.onBlur
|
|
7051
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
7050
7052
|
*/
|
|
7051
7053
|
function ToggleSwitchEntry(props) {
|
|
7052
7054
|
const {
|
|
@@ -7153,22 +7155,22 @@ function NumberField(props) {
|
|
|
7153
7155
|
});
|
|
7154
7156
|
}
|
|
7155
7157
|
|
|
7156
|
-
/**
|
|
7157
|
-
* @param {Object} props
|
|
7158
|
-
* @param {Boolean} props.debounce
|
|
7159
|
-
* @param {String} props.description
|
|
7160
|
-
* @param {Boolean} props.disabled
|
|
7161
|
-
* @param {Object} props.element
|
|
7162
|
-
* @param {Function} props.getValue
|
|
7163
|
-
* @param {String} props.id
|
|
7164
|
-
* @param {String} props.label
|
|
7165
|
-
* @param {String} props.max
|
|
7166
|
-
* @param {String} props.min
|
|
7167
|
-
* @param {Function} props.setValue
|
|
7168
|
-
* @param {Function} props.onFocus
|
|
7169
|
-
* @param {Function} props.onBlur
|
|
7170
|
-
* @param {String} props.step
|
|
7171
|
-
* @param {Function} props.validate
|
|
7158
|
+
/**
|
|
7159
|
+
* @param {Object} props
|
|
7160
|
+
* @param {Boolean} props.debounce
|
|
7161
|
+
* @param {String} props.description
|
|
7162
|
+
* @param {Boolean} props.disabled
|
|
7163
|
+
* @param {Object} props.element
|
|
7164
|
+
* @param {Function} props.getValue
|
|
7165
|
+
* @param {String} props.id
|
|
7166
|
+
* @param {String} props.label
|
|
7167
|
+
* @param {String} props.max
|
|
7168
|
+
* @param {String} props.min
|
|
7169
|
+
* @param {Function} props.setValue
|
|
7170
|
+
* @param {Function} props.onFocus
|
|
7171
|
+
* @param {Function} props.onBlur
|
|
7172
|
+
* @param {String} props.step
|
|
7173
|
+
* @param {Function} props.validate
|
|
7172
7174
|
*/
|
|
7173
7175
|
function NumberFieldEntry(props) {
|
|
7174
7176
|
const {
|
|
@@ -7653,26 +7655,26 @@ React.forwardRef((props, ref) => {
|
|
|
7653
7655
|
});
|
|
7654
7656
|
});
|
|
7655
7657
|
|
|
7656
|
-
/**
|
|
7657
|
-
* @param {Object} props
|
|
7658
|
-
* @param {Object} props.element
|
|
7659
|
-
* @param {String} props.id
|
|
7660
|
-
* @param {String} props.description
|
|
7661
|
-
* @param {Boolean} props.debounce
|
|
7662
|
-
* @param {Boolean} props.disabled
|
|
7663
|
-
* @param {Boolean} props.feel
|
|
7664
|
-
* @param {String} props.label
|
|
7665
|
-
* @param {Function} props.getValue
|
|
7666
|
-
* @param {Function} props.setValue
|
|
7667
|
-
* @param {Function} props.tooltipContainer
|
|
7668
|
-
* @param {Function} props.validate
|
|
7669
|
-
* @param {Function} props.show
|
|
7670
|
-
* @param {Function} props.example
|
|
7671
|
-
* @param {Function} props.variables
|
|
7672
|
-
* @param {Function} props.onFocus
|
|
7673
|
-
* @param {Function} props.onBlur
|
|
7674
|
-
* @param {string} [props.placeholder]
|
|
7675
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
7658
|
+
/**
|
|
7659
|
+
* @param {Object} props
|
|
7660
|
+
* @param {Object} props.element
|
|
7661
|
+
* @param {String} props.id
|
|
7662
|
+
* @param {String} props.description
|
|
7663
|
+
* @param {Boolean} props.debounce
|
|
7664
|
+
* @param {Boolean} props.disabled
|
|
7665
|
+
* @param {Boolean} props.feel
|
|
7666
|
+
* @param {String} props.label
|
|
7667
|
+
* @param {Function} props.getValue
|
|
7668
|
+
* @param {Function} props.setValue
|
|
7669
|
+
* @param {Function} props.tooltipContainer
|
|
7670
|
+
* @param {Function} props.validate
|
|
7671
|
+
* @param {Function} props.show
|
|
7672
|
+
* @param {Function} props.example
|
|
7673
|
+
* @param {Function} props.variables
|
|
7674
|
+
* @param {Function} props.onFocus
|
|
7675
|
+
* @param {Function} props.onBlur
|
|
7676
|
+
* @param {string} [props.placeholder]
|
|
7677
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
7676
7678
|
*/
|
|
7677
7679
|
function FeelEntry(props) {
|
|
7678
7680
|
const {
|
|
@@ -7759,27 +7761,27 @@ function FeelEntry(props) {
|
|
|
7759
7761
|
});
|
|
7760
7762
|
}
|
|
7761
7763
|
|
|
7762
|
-
/**
|
|
7763
|
-
* @param {Object} props
|
|
7764
|
-
* @param {Object} props.element
|
|
7765
|
-
* @param {String} props.id
|
|
7766
|
-
* @param {String} props.description
|
|
7767
|
-
* @param {Boolean} props.debounce
|
|
7768
|
-
* @param {Boolean} props.disabled
|
|
7769
|
-
* @param {String} props.max
|
|
7770
|
-
* @param {String} props.min
|
|
7771
|
-
* @param {String} props.step
|
|
7772
|
-
* @param {Boolean} props.feel
|
|
7773
|
-
* @param {String} props.label
|
|
7774
|
-
* @param {Function} props.getValue
|
|
7775
|
-
* @param {Function} props.setValue
|
|
7776
|
-
* @param {Function} props.tooltipContainer
|
|
7777
|
-
* @param {Function} props.validate
|
|
7778
|
-
* @param {Function} props.show
|
|
7779
|
-
* @param {Function} props.example
|
|
7780
|
-
* @param {Function} props.variables
|
|
7781
|
-
* @param {Function} props.onFocus
|
|
7782
|
-
* @param {Function} props.onBlur
|
|
7764
|
+
/**
|
|
7765
|
+
* @param {Object} props
|
|
7766
|
+
* @param {Object} props.element
|
|
7767
|
+
* @param {String} props.id
|
|
7768
|
+
* @param {String} props.description
|
|
7769
|
+
* @param {Boolean} props.debounce
|
|
7770
|
+
* @param {Boolean} props.disabled
|
|
7771
|
+
* @param {String} props.max
|
|
7772
|
+
* @param {String} props.min
|
|
7773
|
+
* @param {String} props.step
|
|
7774
|
+
* @param {Boolean} props.feel
|
|
7775
|
+
* @param {String} props.label
|
|
7776
|
+
* @param {Function} props.getValue
|
|
7777
|
+
* @param {Function} props.setValue
|
|
7778
|
+
* @param {Function} props.tooltipContainer
|
|
7779
|
+
* @param {Function} props.validate
|
|
7780
|
+
* @param {Function} props.show
|
|
7781
|
+
* @param {Function} props.example
|
|
7782
|
+
* @param {Function} props.variables
|
|
7783
|
+
* @param {Function} props.onFocus
|
|
7784
|
+
* @param {Function} props.onBlur
|
|
7783
7785
|
*/
|
|
7784
7786
|
function FeelNumberEntry(props) {
|
|
7785
7787
|
return jsxRuntime.jsx(FeelEntry, {
|
|
@@ -7789,24 +7791,24 @@ function FeelNumberEntry(props) {
|
|
|
7789
7791
|
});
|
|
7790
7792
|
}
|
|
7791
7793
|
|
|
7792
|
-
/**
|
|
7793
|
-
* @param {Object} props
|
|
7794
|
-
* @param {Object} props.element
|
|
7795
|
-
* @param {String} props.id
|
|
7796
|
-
* @param {String} props.description
|
|
7797
|
-
* @param {Boolean} props.debounce
|
|
7798
|
-
* @param {Boolean} props.disabled
|
|
7799
|
-
* @param {Boolean} props.feel
|
|
7800
|
-
* @param {String} props.label
|
|
7801
|
-
* @param {Function} props.getValue
|
|
7802
|
-
* @param {Function} props.setValue
|
|
7803
|
-
* @param {Function} props.tooltipContainer
|
|
7804
|
-
* @param {Function} props.validate
|
|
7805
|
-
* @param {Function} props.show
|
|
7806
|
-
* @param {Function} props.example
|
|
7807
|
-
* @param {Function} props.variables
|
|
7808
|
-
* @param {Function} props.onFocus
|
|
7809
|
-
* @param {Function} props.onBlur
|
|
7794
|
+
/**
|
|
7795
|
+
* @param {Object} props
|
|
7796
|
+
* @param {Object} props.element
|
|
7797
|
+
* @param {String} props.id
|
|
7798
|
+
* @param {String} props.description
|
|
7799
|
+
* @param {Boolean} props.debounce
|
|
7800
|
+
* @param {Boolean} props.disabled
|
|
7801
|
+
* @param {Boolean} props.feel
|
|
7802
|
+
* @param {String} props.label
|
|
7803
|
+
* @param {Function} props.getValue
|
|
7804
|
+
* @param {Function} props.setValue
|
|
7805
|
+
* @param {Function} props.tooltipContainer
|
|
7806
|
+
* @param {Function} props.validate
|
|
7807
|
+
* @param {Function} props.show
|
|
7808
|
+
* @param {Function} props.example
|
|
7809
|
+
* @param {Function} props.variables
|
|
7810
|
+
* @param {Function} props.onFocus
|
|
7811
|
+
* @param {Function} props.onBlur
|
|
7810
7812
|
*/
|
|
7811
7813
|
function FeelToggleSwitchEntry(props) {
|
|
7812
7814
|
return jsxRuntime.jsx(FeelEntry, {
|
|
@@ -7816,26 +7818,26 @@ function FeelToggleSwitchEntry(props) {
|
|
|
7816
7818
|
});
|
|
7817
7819
|
}
|
|
7818
7820
|
|
|
7819
|
-
/**
|
|
7820
|
-
* @param {Object} props
|
|
7821
|
-
* @param {Object} props.element
|
|
7822
|
-
* @param {String} props.id
|
|
7823
|
-
* @param {String} props.description
|
|
7824
|
-
* @param {String} props.hostLanguage
|
|
7825
|
-
* @param {Boolean} props.singleLine
|
|
7826
|
-
* @param {Boolean} props.debounce
|
|
7827
|
-
* @param {Boolean} props.disabled
|
|
7828
|
-
* @param {Boolean} props.feel
|
|
7829
|
-
* @param {String} props.label
|
|
7830
|
-
* @param {Function} props.getValue
|
|
7831
|
-
* @param {Function} props.setValue
|
|
7832
|
-
* @param {Function} props.tooltipContainer
|
|
7833
|
-
* @param {Function} props.validate
|
|
7834
|
-
* @param {Function} props.show
|
|
7835
|
-
* @param {Function} props.example
|
|
7836
|
-
* @param {Function} props.variables
|
|
7837
|
-
* @param {Function} props.onFocus
|
|
7838
|
-
* @param {Function} props.onBlur
|
|
7821
|
+
/**
|
|
7822
|
+
* @param {Object} props
|
|
7823
|
+
* @param {Object} props.element
|
|
7824
|
+
* @param {String} props.id
|
|
7825
|
+
* @param {String} props.description
|
|
7826
|
+
* @param {String} props.hostLanguage
|
|
7827
|
+
* @param {Boolean} props.singleLine
|
|
7828
|
+
* @param {Boolean} props.debounce
|
|
7829
|
+
* @param {Boolean} props.disabled
|
|
7830
|
+
* @param {Boolean} props.feel
|
|
7831
|
+
* @param {String} props.label
|
|
7832
|
+
* @param {Function} props.getValue
|
|
7833
|
+
* @param {Function} props.setValue
|
|
7834
|
+
* @param {Function} props.tooltipContainer
|
|
7835
|
+
* @param {Function} props.validate
|
|
7836
|
+
* @param {Function} props.show
|
|
7837
|
+
* @param {Function} props.example
|
|
7838
|
+
* @param {Function} props.variables
|
|
7839
|
+
* @param {Function} props.onFocus
|
|
7840
|
+
* @param {Function} props.onBlur
|
|
7839
7841
|
*/
|
|
7840
7842
|
function FeelTemplatingEntry(props) {
|
|
7841
7843
|
return jsxRuntime.jsx(FeelEntry, {
|
|
@@ -7903,85 +7905,85 @@ const DEFAULT_LAYOUT = {};
|
|
|
7903
7905
|
const DEFAULT_DESCRIPTION = {};
|
|
7904
7906
|
const DEFAULT_TOOLTIP = {};
|
|
7905
7907
|
|
|
7906
|
-
/**
|
|
7907
|
-
* @typedef { {
|
|
7908
|
-
* component: import('preact').Component,
|
|
7909
|
-
* id: String,
|
|
7910
|
-
* isEdited?: Function
|
|
7911
|
-
* } } EntryDefinition
|
|
7912
|
-
*
|
|
7913
|
-
* @typedef { {
|
|
7914
|
-
* autoFocusEntry: String,
|
|
7915
|
-
* autoOpen?: Boolean,
|
|
7916
|
-
* entries: Array<EntryDefinition>,
|
|
7917
|
-
* id: String,
|
|
7918
|
-
* label: String,
|
|
7919
|
-
* remove: (event: MouseEvent) => void
|
|
7920
|
-
* } } ListItemDefinition
|
|
7921
|
-
*
|
|
7922
|
-
* @typedef { {
|
|
7923
|
-
* add: (event: MouseEvent) => void,
|
|
7924
|
-
* component: import('preact').Component,
|
|
7925
|
-
* element: Object,
|
|
7926
|
-
* id: String,
|
|
7927
|
-
* items: Array<ListItemDefinition>,
|
|
7928
|
-
* label: String,
|
|
7929
|
-
* shouldOpen?: Boolean
|
|
7930
|
-
* } } ListGroupDefinition
|
|
7931
|
-
*
|
|
7932
|
-
* @typedef { {
|
|
7933
|
-
* component?: import('preact').Component,
|
|
7934
|
-
* entries: Array<EntryDefinition>,
|
|
7935
|
-
* id: String,
|
|
7936
|
-
* label: String,
|
|
7937
|
-
* shouldOpen?: Boolean
|
|
7938
|
-
* } } GroupDefinition
|
|
7939
|
-
*
|
|
7940
|
-
* @typedef { {
|
|
7941
|
-
* [id: String]: GetDescriptionFunction
|
|
7942
|
-
* } } DescriptionConfig
|
|
7943
|
-
*
|
|
7944
|
-
* @typedef { {
|
|
7945
|
-
* [id: String]: GetTooltipFunction
|
|
7946
|
-
* } } TooltipConfig
|
|
7947
|
-
*
|
|
7948
|
-
* @callback { {
|
|
7949
|
-
* @param {string} id
|
|
7950
|
-
* @param {Object} element
|
|
7951
|
-
* @returns {string}
|
|
7952
|
-
* } } GetDescriptionFunction
|
|
7953
|
-
*
|
|
7954
|
-
* @callback { {
|
|
7955
|
-
* @param {string} id
|
|
7956
|
-
* @param {Object} element
|
|
7957
|
-
* @returns {string}
|
|
7958
|
-
* } } GetTooltipFunction
|
|
7959
|
-
*
|
|
7960
|
-
* @typedef { {
|
|
7961
|
-
* getEmpty: (element: object) => import('./components/Placeholder').PlaceholderDefinition,
|
|
7962
|
-
* getMultiple: (element: Object) => import('./components/Placeholder').PlaceholderDefinition
|
|
7963
|
-
* } } PlaceholderProvider
|
|
7964
|
-
*
|
|
7908
|
+
/**
|
|
7909
|
+
* @typedef { {
|
|
7910
|
+
* component: import('preact').Component,
|
|
7911
|
+
* id: String,
|
|
7912
|
+
* isEdited?: Function
|
|
7913
|
+
* } } EntryDefinition
|
|
7914
|
+
*
|
|
7915
|
+
* @typedef { {
|
|
7916
|
+
* autoFocusEntry: String,
|
|
7917
|
+
* autoOpen?: Boolean,
|
|
7918
|
+
* entries: Array<EntryDefinition>,
|
|
7919
|
+
* id: String,
|
|
7920
|
+
* label: String,
|
|
7921
|
+
* remove: (event: MouseEvent) => void
|
|
7922
|
+
* } } ListItemDefinition
|
|
7923
|
+
*
|
|
7924
|
+
* @typedef { {
|
|
7925
|
+
* add: (event: MouseEvent) => void,
|
|
7926
|
+
* component: import('preact').Component,
|
|
7927
|
+
* element: Object,
|
|
7928
|
+
* id: String,
|
|
7929
|
+
* items: Array<ListItemDefinition>,
|
|
7930
|
+
* label: String,
|
|
7931
|
+
* shouldOpen?: Boolean
|
|
7932
|
+
* } } ListGroupDefinition
|
|
7933
|
+
*
|
|
7934
|
+
* @typedef { {
|
|
7935
|
+
* component?: import('preact').Component,
|
|
7936
|
+
* entries: Array<EntryDefinition>,
|
|
7937
|
+
* id: String,
|
|
7938
|
+
* label: String,
|
|
7939
|
+
* shouldOpen?: Boolean
|
|
7940
|
+
* } } GroupDefinition
|
|
7941
|
+
*
|
|
7942
|
+
* @typedef { {
|
|
7943
|
+
* [id: String]: GetDescriptionFunction
|
|
7944
|
+
* } } DescriptionConfig
|
|
7945
|
+
*
|
|
7946
|
+
* @typedef { {
|
|
7947
|
+
* [id: String]: GetTooltipFunction
|
|
7948
|
+
* } } TooltipConfig
|
|
7949
|
+
*
|
|
7950
|
+
* @callback { {
|
|
7951
|
+
* @param {string} id
|
|
7952
|
+
* @param {Object} element
|
|
7953
|
+
* @returns {string}
|
|
7954
|
+
* } } GetDescriptionFunction
|
|
7955
|
+
*
|
|
7956
|
+
* @callback { {
|
|
7957
|
+
* @param {string} id
|
|
7958
|
+
* @param {Object} element
|
|
7959
|
+
* @returns {string}
|
|
7960
|
+
* } } GetTooltipFunction
|
|
7961
|
+
*
|
|
7962
|
+
* @typedef { {
|
|
7963
|
+
* getEmpty: (element: object) => import('./components/Placeholder').PlaceholderDefinition,
|
|
7964
|
+
* getMultiple: (element: Object) => import('./components/Placeholder').PlaceholderDefinition
|
|
7965
|
+
* } } PlaceholderProvider
|
|
7966
|
+
*
|
|
7965
7967
|
*/
|
|
7966
7968
|
|
|
7967
|
-
/**
|
|
7968
|
-
* A basic properties panel component. Describes *how* content will be rendered, accepts
|
|
7969
|
-
* data from implementor to describe *what* will be rendered.
|
|
7970
|
-
*
|
|
7971
|
-
* @param {Object} props
|
|
7972
|
-
* @param {Object|Array} props.element
|
|
7973
|
-
* @param {import('./components/Header').HeaderProvider} props.headerProvider
|
|
7974
|
-
* @param {PlaceholderProvider} [props.placeholderProvider]
|
|
7975
|
-
* @param {Array<GroupDefinition|ListGroupDefinition>} props.groups
|
|
7976
|
-
* @param {Object} [props.layoutConfig]
|
|
7977
|
-
* @param {Function} [props.layoutChanged]
|
|
7978
|
-
* @param {DescriptionConfig} [props.descriptionConfig]
|
|
7979
|
-
* @param {Function} [props.descriptionLoaded]
|
|
7980
|
-
* @param {TooltipConfig} [props.tooltipConfig]
|
|
7981
|
-
* @param {Function} [props.tooltipLoaded]
|
|
7982
|
-
* @param {HTMLElement} [props.feelPopupContainer]
|
|
7983
|
-
* @param {Function} [props.getFeelPopupLinks]
|
|
7984
|
-
* @param {Object} [props.eventBus]
|
|
7969
|
+
/**
|
|
7970
|
+
* A basic properties panel component. Describes *how* content will be rendered, accepts
|
|
7971
|
+
* data from implementor to describe *what* will be rendered.
|
|
7972
|
+
*
|
|
7973
|
+
* @param {Object} props
|
|
7974
|
+
* @param {Object|Array} props.element
|
|
7975
|
+
* @param {import('./components/Header').HeaderProvider} props.headerProvider
|
|
7976
|
+
* @param {PlaceholderProvider} [props.placeholderProvider]
|
|
7977
|
+
* @param {Array<GroupDefinition|ListGroupDefinition>} props.groups
|
|
7978
|
+
* @param {Object} [props.layoutConfig]
|
|
7979
|
+
* @param {Function} [props.layoutChanged]
|
|
7980
|
+
* @param {DescriptionConfig} [props.descriptionConfig]
|
|
7981
|
+
* @param {Function} [props.descriptionLoaded]
|
|
7982
|
+
* @param {TooltipConfig} [props.tooltipConfig]
|
|
7983
|
+
* @param {Function} [props.tooltipLoaded]
|
|
7984
|
+
* @param {HTMLElement} [props.feelPopupContainer]
|
|
7985
|
+
* @param {Function} [props.getFeelPopupLinks]
|
|
7986
|
+
* @param {Object} [props.eventBus]
|
|
7985
7987
|
*/
|
|
7986
7988
|
function PropertiesPanel$1(props) {
|
|
7987
7989
|
const {
|
|
@@ -8154,11 +8156,11 @@ function createTooltipContext(overrides = {}) {
|
|
|
8154
8156
|
|
|
8155
8157
|
// hooks //////////////////
|
|
8156
8158
|
|
|
8157
|
-
/**
|
|
8158
|
-
* This hook behaves like useLayoutEffect, but does not trigger on the first render.
|
|
8159
|
-
*
|
|
8160
|
-
* @param {Function} effect
|
|
8161
|
-
* @param {Array} deps
|
|
8159
|
+
/**
|
|
8160
|
+
* This hook behaves like useLayoutEffect, but does not trigger on the first render.
|
|
8161
|
+
*
|
|
8162
|
+
* @param {Function} effect
|
|
8163
|
+
* @param {Array} deps
|
|
8162
8164
|
*/
|
|
8163
8165
|
function useUpdateLayoutEffect(effect, deps) {
|
|
8164
8166
|
const isMounted = hooks.useRef(false);
|
|
@@ -8171,20 +8173,20 @@ function useUpdateLayoutEffect(effect, deps) {
|
|
|
8171
8173
|
}, deps);
|
|
8172
8174
|
}
|
|
8173
8175
|
|
|
8174
|
-
/**
|
|
8175
|
-
* @typedef { {
|
|
8176
|
-
* [key: string]: string;
|
|
8177
|
-
* } } TranslateReplacements
|
|
8176
|
+
/**
|
|
8177
|
+
* @typedef { {
|
|
8178
|
+
* [key: string]: string;
|
|
8179
|
+
* } } TranslateReplacements
|
|
8178
8180
|
*/
|
|
8179
8181
|
|
|
8180
|
-
/**
|
|
8181
|
-
* A simple translation stub to be used for multi-language support.
|
|
8182
|
-
* Can be easily replaced with a more sophisticated solution.
|
|
8183
|
-
*
|
|
8184
|
-
* @param {string} template to interpolate
|
|
8185
|
-
* @param {TranslateReplacements} [replacements] a map with substitutes
|
|
8186
|
-
*
|
|
8187
|
-
* @return {string} the translated string
|
|
8182
|
+
/**
|
|
8183
|
+
* A simple translation stub to be used for multi-language support.
|
|
8184
|
+
* Can be easily replaced with a more sophisticated solution.
|
|
8185
|
+
*
|
|
8186
|
+
* @param {string} template to interpolate
|
|
8187
|
+
* @param {TranslateReplacements} [replacements] a map with substitutes
|
|
8188
|
+
*
|
|
8189
|
+
* @return {string} the translated string
|
|
8188
8190
|
*/
|
|
8189
8191
|
function translateFallback(template, replacements) {
|
|
8190
8192
|
replacements = replacements || {};
|
|
@@ -8293,8 +8295,8 @@ function ListItem(props) {
|
|
|
8293
8295
|
}
|
|
8294
8296
|
const noop$1 = () => {};
|
|
8295
8297
|
|
|
8296
|
-
/**
|
|
8297
|
-
* @param {import('../PropertiesPanel').ListGroupDefinition} props
|
|
8298
|
+
/**
|
|
8299
|
+
* @param {import('../PropertiesPanel').ListGroupDefinition} props
|
|
8298
8300
|
*/
|
|
8299
8301
|
function ListGroup(props) {
|
|
8300
8302
|
const {
|
|
@@ -8485,18 +8487,18 @@ function Checkbox(props) {
|
|
|
8485
8487
|
});
|
|
8486
8488
|
}
|
|
8487
8489
|
|
|
8488
|
-
/**
|
|
8489
|
-
* @param {Object} props
|
|
8490
|
-
* @param {Object} props.element
|
|
8491
|
-
* @param {String} props.id
|
|
8492
|
-
* @param {String} props.description
|
|
8493
|
-
* @param {String} props.label
|
|
8494
|
-
* @param {Function} props.getValue
|
|
8495
|
-
* @param {Function} props.setValue
|
|
8496
|
-
* @param {Function} props.onFocus
|
|
8497
|
-
* @param {Function} props.onBlur
|
|
8498
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
8499
|
-
* @param {boolean} [props.disabled]
|
|
8490
|
+
/**
|
|
8491
|
+
* @param {Object} props
|
|
8492
|
+
* @param {Object} props.element
|
|
8493
|
+
* @param {String} props.id
|
|
8494
|
+
* @param {String} props.description
|
|
8495
|
+
* @param {String} props.label
|
|
8496
|
+
* @param {Function} props.getValue
|
|
8497
|
+
* @param {Function} props.setValue
|
|
8498
|
+
* @param {Function} props.onFocus
|
|
8499
|
+
* @param {Function} props.onBlur
|
|
8500
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
8501
|
+
* @param {boolean} [props.disabled]
|
|
8500
8502
|
*/
|
|
8501
8503
|
function CheckboxEntry(props) {
|
|
8502
8504
|
const {
|
|
@@ -8616,20 +8618,20 @@ function Select(props) {
|
|
|
8616
8618
|
});
|
|
8617
8619
|
}
|
|
8618
8620
|
|
|
8619
|
-
/**
|
|
8620
|
-
* @param {object} props
|
|
8621
|
-
* @param {object} props.element
|
|
8622
|
-
* @param {string} props.id
|
|
8623
|
-
* @param {string} [props.description]
|
|
8624
|
-
* @param {string} props.label
|
|
8625
|
-
* @param {Function} props.getValue
|
|
8626
|
-
* @param {Function} props.setValue
|
|
8627
|
-
* @param {Function} props.onFocus
|
|
8628
|
-
* @param {Function} props.onBlur
|
|
8629
|
-
* @param {Function} props.getOptions
|
|
8630
|
-
* @param {boolean} [props.disabled]
|
|
8631
|
-
* @param {Function} [props.validate]
|
|
8632
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
8621
|
+
/**
|
|
8622
|
+
* @param {object} props
|
|
8623
|
+
* @param {object} props.element
|
|
8624
|
+
* @param {string} props.id
|
|
8625
|
+
* @param {string} [props.description]
|
|
8626
|
+
* @param {string} props.label
|
|
8627
|
+
* @param {Function} props.getValue
|
|
8628
|
+
* @param {Function} props.setValue
|
|
8629
|
+
* @param {Function} props.onFocus
|
|
8630
|
+
* @param {Function} props.onBlur
|
|
8631
|
+
* @param {Function} props.getOptions
|
|
8632
|
+
* @param {boolean} [props.disabled]
|
|
8633
|
+
* @param {Function} [props.validate]
|
|
8634
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
8633
8635
|
*/
|
|
8634
8636
|
function SelectEntry(props) {
|
|
8635
8637
|
const {
|
|
@@ -8920,20 +8922,20 @@ function Textfield(props) {
|
|
|
8920
8922
|
});
|
|
8921
8923
|
}
|
|
8922
8924
|
|
|
8923
|
-
/**
|
|
8924
|
-
* @param {Object} props
|
|
8925
|
-
* @param {Object} props.element
|
|
8926
|
-
* @param {String} props.id
|
|
8927
|
-
* @param {String} props.description
|
|
8928
|
-
* @param {Boolean} props.debounce
|
|
8929
|
-
* @param {Boolean} props.disabled
|
|
8930
|
-
* @param {String} props.label
|
|
8931
|
-
* @param {Function} props.getValue
|
|
8932
|
-
* @param {Function} props.setValue
|
|
8933
|
-
* @param {Function} props.onFocus
|
|
8934
|
-
* @param {Function} props.onBlur
|
|
8935
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
8936
|
-
* @param {Function} props.validate
|
|
8925
|
+
/**
|
|
8926
|
+
* @param {Object} props
|
|
8927
|
+
* @param {Object} props.element
|
|
8928
|
+
* @param {String} props.id
|
|
8929
|
+
* @param {String} props.description
|
|
8930
|
+
* @param {Boolean} props.debounce
|
|
8931
|
+
* @param {Boolean} props.disabled
|
|
8932
|
+
* @param {String} props.label
|
|
8933
|
+
* @param {Function} props.getValue
|
|
8934
|
+
* @param {Function} props.setValue
|
|
8935
|
+
* @param {Function} props.onFocus
|
|
8936
|
+
* @param {Function} props.onBlur
|
|
8937
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
8938
|
+
* @param {Function} props.validate
|
|
8937
8939
|
*/
|
|
8938
8940
|
function TextfieldEntry(props) {
|
|
8939
8941
|
const {
|
|
@@ -9008,20 +9010,20 @@ class FeelPopupModule {
|
|
|
9008
9010
|
this._eventBus = eventBus;
|
|
9009
9011
|
}
|
|
9010
9012
|
|
|
9011
|
-
/**
|
|
9012
|
-
* Check if the FEEL popup is open.
|
|
9013
|
-
* @return {Boolean}
|
|
9013
|
+
/**
|
|
9014
|
+
* Check if the FEEL popup is open.
|
|
9015
|
+
* @return {Boolean}
|
|
9014
9016
|
*/
|
|
9015
9017
|
isOpen() {
|
|
9016
9018
|
return this._eventBus.fire('feelPopup._isOpen');
|
|
9017
9019
|
}
|
|
9018
9020
|
|
|
9019
|
-
/**
|
|
9020
|
-
* Open the FEEL popup.
|
|
9021
|
-
*
|
|
9022
|
-
* @param {String} entryId
|
|
9023
|
-
* @param {Object} popupConfig
|
|
9024
|
-
* @param {HTMLElement} sourceElement
|
|
9021
|
+
/**
|
|
9022
|
+
* Open the FEEL popup.
|
|
9023
|
+
*
|
|
9024
|
+
* @param {String} entryId
|
|
9025
|
+
* @param {Object} popupConfig
|
|
9026
|
+
* @param {HTMLElement} sourceElement
|
|
9025
9027
|
*/
|
|
9026
9028
|
open(entryId, popupConfig, sourceElement) {
|
|
9027
9029
|
return this._eventBus.fire('feelPopup._open', {
|
|
@@ -9031,8 +9033,8 @@ class FeelPopupModule {
|
|
|
9031
9033
|
});
|
|
9032
9034
|
}
|
|
9033
9035
|
|
|
9034
|
-
/**
|
|
9035
|
-
* Close the FEEL popup.
|
|
9036
|
+
/**
|
|
9037
|
+
* Close the FEEL popup.
|
|
9036
9038
|
*/
|
|
9037
9039
|
close() {
|
|
9038
9040
|
return this._eventBus.fire('feelPopup._close');
|
|
@@ -9074,11 +9076,13 @@ function getPropertiesPanelHeaderProvider(options = {}) {
|
|
|
9074
9076
|
const fieldDefinition = formFields.get(type).config;
|
|
9075
9077
|
const Icon = fieldDefinition.icon || formJsViewer.iconsByType(type);
|
|
9076
9078
|
if (Icon) {
|
|
9077
|
-
return ()
|
|
9078
|
-
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9079
|
+
return function IconComponent() {
|
|
9080
|
+
return jsxRuntime.jsx(Icon, {
|
|
9081
|
+
width: "36",
|
|
9082
|
+
height: "36",
|
|
9083
|
+
viewBox: "0 0 54 54"
|
|
9084
|
+
});
|
|
9085
|
+
};
|
|
9082
9086
|
} else if (fieldDefinition.iconUrl) {
|
|
9083
9087
|
return getPaletteIcon({
|
|
9084
9088
|
iconUrl: fieldDefinition.iconUrl,
|
|
@@ -10576,8 +10580,7 @@ function IFrameHeightEntry(props) {
|
|
|
10576
10580
|
})];
|
|
10577
10581
|
}
|
|
10578
10582
|
|
|
10579
|
-
const HTTPS_PATTERN = /^(https):\/\/*/i;
|
|
10580
|
-
|
|
10583
|
+
const HTTPS_PATTERN = /^(https):\/\/*/i;
|
|
10581
10584
|
function IFrameUrlEntry(props) {
|
|
10582
10585
|
const {
|
|
10583
10586
|
editField,
|
|
@@ -10638,6 +10641,7 @@ function getTooltip$1() {
|
|
|
10638
10641
|
children: ["Not all external sources can be displayed in the iFrame. Read more about it in the", ' ', jsxRuntime.jsx("a", {
|
|
10639
10642
|
target: "_blank",
|
|
10640
10643
|
href: "https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options",
|
|
10644
|
+
rel: "noreferrer",
|
|
10641
10645
|
children: "X-FRAME-OPTIONS documentation"
|
|
10642
10646
|
}), "."]
|
|
10643
10647
|
})]
|
|
@@ -10753,6 +10757,7 @@ const description$4 = jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
|
10753
10757
|
children: ["Supports markdown and templating.", ' ', jsxRuntime.jsx("a", {
|
|
10754
10758
|
href: "https://docs.camunda.io/docs/components/modeler/forms/form-element-library/forms-element-library-text/",
|
|
10755
10759
|
target: "_blank",
|
|
10760
|
+
rel: "noreferrer",
|
|
10756
10761
|
children: "Learn more"
|
|
10757
10762
|
})]
|
|
10758
10763
|
});
|
|
@@ -10809,6 +10814,7 @@ const description$3 = jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
|
10809
10814
|
children: ["Supports HTML, styling, and templating. Styles are automatically scoped to the HTML component.", ' ', jsxRuntime.jsx("a", {
|
|
10810
10815
|
href: "https://docs.camunda.io/docs/components/modeler/forms/form-element-library/forms-element-library-html/",
|
|
10811
10816
|
target: "_blank",
|
|
10817
|
+
rel: "noreferrer",
|
|
10812
10818
|
children: "Learn more"
|
|
10813
10819
|
})]
|
|
10814
10820
|
});
|
|
@@ -12673,6 +12679,7 @@ const description$2 = jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
|
12673
12679
|
children: ["A comma-separated list of", ' ', jsxRuntime.jsx("a", {
|
|
12674
12680
|
href: "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers",
|
|
12675
12681
|
target: "_blank",
|
|
12682
|
+
rel: "noreferrer",
|
|
12676
12683
|
children: "file type specifiers"
|
|
12677
12684
|
})]
|
|
12678
12685
|
});
|
|
@@ -12844,9 +12851,9 @@ function EndpointKey(props) {
|
|
|
12844
12851
|
}), jsxRuntime.jsxs("p", {
|
|
12845
12852
|
children: ["The string must contain ", jsxRuntime.jsx("code", {
|
|
12846
12853
|
children: '{ documentId }'
|
|
12847
|
-
}), ", which will be replaced with the document ID from the document
|
|
12854
|
+
}), ", which will be replaced with the document ID from the document\u2018s reference."]
|
|
12848
12855
|
}), jsxRuntime.jsx("p", {
|
|
12849
|
-
children: "If you
|
|
12856
|
+
children: "If you\u2018re using the Camunda Tasklist, this variable is automatically added to the context for you."
|
|
12850
12857
|
}), jsxRuntime.jsxs("p", {
|
|
12851
12858
|
children: ["For more details, see the", ' ', jsxRuntime.jsx("a", {
|
|
12852
12859
|
href: "https://docs.camunda.io/docs/next/components/modeler/forms/form-element-library/forms-element-library-document-preview/",
|
|
@@ -13598,6 +13605,7 @@ function getTooltip() {
|
|
|
13598
13605
|
children: ["Allow the iframe to access more functionality of your browser, details regarding the various options can be found in the", ' ', jsxRuntime.jsx("a", {
|
|
13599
13606
|
target: "_blank",
|
|
13600
13607
|
href: "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe",
|
|
13608
|
+
rel: "noreferrer",
|
|
13601
13609
|
children: "MDN iFrame documentation."
|
|
13602
13610
|
})]
|
|
13603
13611
|
})
|