@bpmn-io/form-js-editor 1.13.1 → 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/index.es.js CHANGED
@@ -1598,10 +1598,10 @@ function Palette(props) {
1598
1598
  return jsx(PaletteEntry, {
1599
1599
  getPaletteIcon: getPaletteIcon,
1600
1600
  ...entry
1601
- });
1601
+ }, entry.type);
1602
1602
  })
1603
1603
  })]
1604
- })), groups.length == 0 && jsx("div", {
1604
+ }, id)), groups.length == 0 && jsx("div", {
1605
1605
  class: "fjs-palette-no-entries",
1606
1606
  children: "No components found."
1607
1607
  })]
@@ -1678,15 +1678,17 @@ function getPaletteIcon(entry) {
1678
1678
  } = entry;
1679
1679
  let Icon;
1680
1680
  if (iconUrl) {
1681
- Icon = () => jsx("img", {
1682
- class: "fjs-field-icon-image",
1683
- width: 36,
1684
- style: {
1685
- margin: 'auto'
1686
- },
1687
- alt: label,
1688
- src: sanitizeImageSource(iconUrl)
1689
- });
1681
+ Icon = function Icon() {
1682
+ return jsx("img", {
1683
+ class: "fjs-field-icon-image",
1684
+ width: 36,
1685
+ style: {
1686
+ margin: 'auto'
1687
+ },
1688
+ alt: label,
1689
+ src: sanitizeImageSource(iconUrl)
1690
+ });
1691
+ };
1690
1692
  } else {
1691
1693
  Icon = icon || iconsByType(type);
1692
1694
  }
@@ -1706,9 +1708,9 @@ const InjectedRendersRoot = () => {
1706
1708
  return jsx(Fragment, {
1707
1709
  children: injectedRenderers.map(({
1708
1710
  Renderer
1709
- }) => jsx(Renderer, {
1711
+ }, index) => jsx(Renderer, {
1710
1712
  ...injectedProps
1711
- }))
1713
+ }, index))
1712
1714
  });
1713
1715
  };
1714
1716
 
@@ -5513,19 +5515,19 @@ const ErrorsContext = createContext({
5513
5515
  errors: {}
5514
5516
  });
5515
5517
 
5516
- /**
5517
- * @typedef {Function} <propertiesPanel.showEntry> callback
5518
- *
5519
- * @example
5520
- *
5521
- * useEvent('propertiesPanel.showEntry', ({ focus = false, ...rest }) => {
5522
- * // ...
5523
- * });
5524
- *
5525
- * @param {Object} context
5526
- * @param {boolean} [context.focus]
5527
- *
5528
- * @returns void
5518
+ /**
5519
+ * @typedef {Function} <propertiesPanel.showEntry> callback
5520
+ *
5521
+ * @example
5522
+ *
5523
+ * useEvent('propertiesPanel.showEntry', ({ focus = false, ...rest }) => {
5524
+ * // ...
5525
+ * });
5526
+ *
5527
+ * @param {Object} context
5528
+ * @param {boolean} [context.focus]
5529
+ *
5530
+ * @returns void
5529
5531
  */
5530
5532
 
5531
5533
  const EventContext = createContext({
@@ -5542,20 +5544,20 @@ const TooltipContext = createContext({
5542
5544
  getTooltipForId: () => {}
5543
5545
  });
5544
5546
 
5545
- /**
5546
- * Accesses the global TooltipContext and returns a tooltip for a given id and element.
5547
- *
5548
- * @example
5549
- * ```jsx
5550
- * function TextField(props) {
5551
- * const tooltip = useTooltipContext('input1', element);
5552
- * }
5553
- * ```
5554
- *
5555
- * @param {string} id
5556
- * @param {object} element
5557
- *
5558
- * @returns {string}
5547
+ /**
5548
+ * Accesses the global TooltipContext and returns a tooltip for a given id and element.
5549
+ *
5550
+ * @example
5551
+ * ```jsx
5552
+ * function TextField(props) {
5553
+ * const tooltip = useTooltipContext('input1', element);
5554
+ * }
5555
+ * ```
5556
+ *
5557
+ * @param {string} id
5558
+ * @param {object} element
5559
+ *
5560
+ * @returns {string}
5559
5561
  */
5560
5562
  function useTooltipContext(id, element) {
5561
5563
  const {
@@ -5707,20 +5709,20 @@ function prefixId$9(id) {
5707
5709
  return `bio-properties-panel-${id}`;
5708
5710
  }
5709
5711
 
5710
- /**
5711
- * Accesses the global DescriptionContext and returns a description for a given id and element.
5712
- *
5713
- * @example
5714
- * ```jsx
5715
- * function TextField(props) {
5716
- * const description = useDescriptionContext('input1', element);
5717
- * }
5718
- * ```
5719
- *
5720
- * @param {string} id
5721
- * @param {object} element
5722
- *
5723
- * @returns {string}
5712
+ /**
5713
+ * Accesses the global DescriptionContext and returns a description for a given id and element.
5714
+ *
5715
+ * @example
5716
+ * ```jsx
5717
+ * function TextField(props) {
5718
+ * const description = useDescriptionContext('input1', element);
5719
+ * }
5720
+ * ```
5721
+ *
5722
+ * @param {string} id
5723
+ * @param {object} element
5724
+ *
5725
+ * @returns {string}
5724
5726
  */
5725
5727
  function useDescriptionContext(id, element) {
5726
5728
  const {
@@ -5741,11 +5743,11 @@ function useErrors() {
5741
5743
  return errors;
5742
5744
  }
5743
5745
 
5744
- /**
5745
- * Subscribe to an event immediately. Update subscription after inputs changed.
5746
- *
5747
- * @param {string} event
5748
- * @param {Function} callback
5746
+ /**
5747
+ * Subscribe to an event immediately. Update subscription after inputs changed.
5748
+ *
5749
+ * @param {string} event
5750
+ * @param {Function} callback
5749
5751
  */
5750
5752
  function useEvent(event, callback, eventBus) {
5751
5753
  const eventContext = useContext(EventContext);
@@ -5775,20 +5777,20 @@ function useEvent(event, callback, eventBus) {
5775
5777
  }, [callback, event, eventBus]);
5776
5778
  }
5777
5779
 
5778
- /**
5779
- * Creates a state that persists in the global LayoutContext.
5780
- *
5781
- * @example
5782
- * ```jsx
5783
- * function Group(props) {
5784
- * const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
5785
- * }
5786
- * ```
5787
- *
5788
- * @param {(string|number)[]} path
5789
- * @param {any} [defaultValue]
5790
- *
5791
- * @returns {[ any, Function ]}
5780
+ /**
5781
+ * Creates a state that persists in the global LayoutContext.
5782
+ *
5783
+ * @example
5784
+ * ```jsx
5785
+ * function Group(props) {
5786
+ * const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
5787
+ * }
5788
+ * ```
5789
+ *
5790
+ * @param {(string|number)[]} path
5791
+ * @param {any} [defaultValue]
5792
+ *
5793
+ * @returns {[ any, Function ]}
5792
5794
  */
5793
5795
  function useLayoutState(path, defaultValue) {
5794
5796
  const {
@@ -5802,11 +5804,11 @@ function useLayoutState(path, defaultValue) {
5802
5804
  return [layoutForKey, setState];
5803
5805
  }
5804
5806
 
5805
- /**
5806
- * @pinussilvestrus: we need to introduce our own hook to persist the previous
5807
- * state on updates.
5808
- *
5809
- * cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
5807
+ /**
5808
+ * @pinussilvestrus: we need to introduce our own hook to persist the previous
5809
+ * state on updates.
5810
+ *
5811
+ * cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
5810
5812
  */
5811
5813
 
5812
5814
  function usePrevious(value) {
@@ -5817,12 +5819,12 @@ function usePrevious(value) {
5817
5819
  return ref.current;
5818
5820
  }
5819
5821
 
5820
- /**
5821
- * Subscribe to `propertiesPanel.showEntry`.
5822
- *
5823
- * @param {string} id
5824
- *
5825
- * @returns {import('preact').Ref}
5822
+ /**
5823
+ * Subscribe to `propertiesPanel.showEntry`.
5824
+ *
5825
+ * @param {string} id
5826
+ *
5827
+ * @returns {import('preact').Ref}
5826
5828
  */
5827
5829
  function useShowEntryEvent(id) {
5828
5830
  const {
@@ -5853,20 +5855,20 @@ function useShowEntryEvent(id) {
5853
5855
  return ref;
5854
5856
  }
5855
5857
 
5856
- /**
5857
- * @callback setSticky
5858
- * @param {boolean} value
5858
+ /**
5859
+ * @callback setSticky
5860
+ * @param {boolean} value
5859
5861
  */
5860
5862
 
5861
- /**
5862
- * Use IntersectionObserver to identify when DOM element is in sticky mode.
5863
- * If sticky is observered setSticky(true) will be called.
5864
- * If sticky mode is left, setSticky(false) will be called.
5865
- *
5866
- *
5867
- * @param {Object} ref
5868
- * @param {string} scrollContainerSelector
5869
- * @param {setSticky} setSticky
5863
+ /**
5864
+ * Use IntersectionObserver to identify when DOM element is in sticky mode.
5865
+ * If sticky is observered setSticky(true) will be called.
5866
+ * If sticky mode is left, setSticky(false) will be called.
5867
+ *
5868
+ *
5869
+ * @param {Object} ref
5870
+ * @param {string} scrollContainerSelector
5871
+ * @param {setSticky} setSticky
5870
5872
  */
5871
5873
  function useStickyIntersectionObserver(ref, scrollContainerSelector, setSticky) {
5872
5874
  const [scrollContainer, setScrollContainer] = useState(query(scrollContainerSelector));
@@ -5920,19 +5922,19 @@ function useStickyIntersectionObserver(ref, scrollContainerSelector, setSticky)
5920
5922
  }, [ref.current, scrollContainer, setSticky]);
5921
5923
  }
5922
5924
 
5923
- /**
5924
- * Creates a static function reference with changing body.
5925
- * This is necessary when external libraries require a callback function
5926
- * that has references to state variables.
5927
- *
5928
- * Usage:
5929
- * const callback = useStaticCallback((val) => {val === currentState});
5930
- *
5931
- * The `callback` reference is static and can be safely used in external
5932
- * libraries or as a prop that does not cause rerendering of children.
5933
- *
5934
- * @param {Function} callback function with changing reference
5935
- * @returns {Function} static function reference
5925
+ /**
5926
+ * Creates a static function reference with changing body.
5927
+ * This is necessary when external libraries require a callback function
5928
+ * that has references to state variables.
5929
+ *
5930
+ * Usage:
5931
+ * const callback = useStaticCallback((val) => {val === currentState});
5932
+ *
5933
+ * The `callback` reference is static and can be safely used in external
5934
+ * libraries or as a prop that does not cause rerendering of children.
5935
+ *
5936
+ * @param {Function} callback function with changing reference
5937
+ * @returns {Function} static function reference
5936
5938
  */
5937
5939
  function useStaticCallback(callback) {
5938
5940
  const callbackRef = useRef(callback);
@@ -6073,13 +6075,13 @@ function DataMarker(props) {
6073
6075
  return null;
6074
6076
  }
6075
6077
 
6076
- /**
6077
- * @typedef { {
6078
- * text: (element: object) => string,
6079
- * icon?: (element: Object) => import('preact').Component
6080
- * } } PlaceholderDefinition
6081
- *
6082
- * @param { PlaceholderDefinition } props
6078
+ /**
6079
+ * @typedef { {
6080
+ * text: (element: object) => string,
6081
+ * icon?: (element: Object) => import('preact').Component
6082
+ * } } PlaceholderDefinition
6083
+ *
6084
+ * @param { PlaceholderDefinition } props
6083
6085
  */
6084
6086
  function Placeholder(props) {
6085
6087
  const {
@@ -6116,9 +6118,9 @@ function Description$1(props) {
6116
6118
  }
6117
6119
  const noop$6 = () => {};
6118
6120
 
6119
- /**
6120
- * Buffer `.focus()` calls while the editor is not initialized.
6121
- * Set Focus inside when the editor is ready.
6121
+ /**
6122
+ * Buffer `.focus()` calls while the editor is not initialized.
6123
+ * Set Focus inside when the editor is ready.
6122
6124
  */
6123
6125
  const useBufferedFocus$1 = function (editor, ref) {
6124
6126
  const [buffer, setBuffer] = useState(undefined);
@@ -6218,9 +6220,9 @@ const CodeEditor$1 = forwardRef((props, ref) => {
6218
6220
  });
6219
6221
  const noop$5 = () => {};
6220
6222
 
6221
- /**
6222
- * Buffer `.focus()` calls while the editor is not initialized.
6223
- * Set Focus inside when the editor is ready.
6223
+ /**
6224
+ * Buffer `.focus()` calls while the editor is not initialized.
6225
+ * Set Focus inside when the editor is ready.
6224
6226
  */
6225
6227
  const useBufferedFocus = function (editor, ref) {
6226
6228
  const [buffer, setBuffer] = useState(undefined);
@@ -6269,10 +6271,10 @@ const CodeEditor = forwardRef((props, ref) => {
6269
6271
  useEffect(() => {
6270
6272
  let editor;
6271
6273
 
6272
- /* Trigger FEEL toggle when
6273
- *
6274
- * - `backspace` is pressed
6275
- * - AND the cursor is at the beginning of the input
6274
+ /* Trigger FEEL toggle when
6275
+ *
6276
+ * - `backspace` is pressed
6277
+ * - AND the cursor is at the beginning of the input
6276
6278
  */
6277
6279
  const onKeyDown = e => {
6278
6280
  if (e.key !== 'Backspace' || !editor) {
@@ -6361,10 +6363,10 @@ function FeelIndicator(props) {
6361
6363
  }
6362
6364
  const noop$4 = () => {};
6363
6365
 
6364
- /**
6365
- * @param {Object} props
6366
- * @param {Object} props.label
6367
- * @param {String} props.feel
6366
+ /**
6367
+ * @param {Object} props
6368
+ * @param {Object} props.label
6369
+ * @param {String} props.feel
6368
6370
  */
6369
6371
  function FeelIcon(props) {
6370
6372
  const {
@@ -6398,22 +6400,22 @@ const FeelPopupContext = createContext({
6398
6400
  source: null
6399
6401
  });
6400
6402
 
6401
- /**
6402
- * Add a dragger that calls back the passed function with
6403
- * { event, delta } on drag.
6404
- *
6405
- * @example
6406
- *
6407
- * function dragMove(event, delta) {
6408
- * // we are dragging (!!)
6409
- * }
6410
- *
6411
- * domElement.addEventListener('dragstart', dragger(dragMove));
6412
- *
6413
- * @param {Function} fn
6414
- * @param {Element} [dragPreview]
6415
- *
6416
- * @return {Function} drag start callback function
6403
+ /**
6404
+ * Add a dragger that calls back the passed function with
6405
+ * { event, delta } on drag.
6406
+ *
6407
+ * @example
6408
+ *
6409
+ * function dragMove(event, delta) {
6410
+ * // we are dragging (!!)
6411
+ * }
6412
+ *
6413
+ * domElement.addEventListener('dragstart', dragger(dragMove));
6414
+ *
6415
+ * @param {Function} fn
6416
+ * @param {Element} [dragPreview]
6417
+ *
6418
+ * @return {Function} drag start callback function
6417
6419
  */
6418
6420
  function createDragger(fn, dragPreview) {
6419
6421
  let self;
@@ -6467,23 +6469,23 @@ function emptyCanvas() {
6467
6469
  }
6468
6470
  const noop$3 = () => {};
6469
6471
 
6470
- /**
6471
- * A generic popup component.
6472
- *
6473
- * @param {Object} props
6474
- * @param {HTMLElement} [props.container]
6475
- * @param {string} [props.className]
6476
- * @param {boolean} [props.delayInitialFocus]
6477
- * @param {{x: number, y: number}} [props.position]
6478
- * @param {number} [props.width]
6479
- * @param {number} [props.height]
6480
- * @param {Function} props.onClose
6481
- * @param {Function} [props.onPostActivate]
6482
- * @param {Function} [props.onPostDeactivate]
6483
- * @param {boolean} [props.returnFocus]
6484
- * @param {boolean} [props.closeOnEscape]
6485
- * @param {string} props.title
6486
- * @param {Ref} [ref]
6472
+ /**
6473
+ * A generic popup component.
6474
+ *
6475
+ * @param {Object} props
6476
+ * @param {HTMLElement} [props.container]
6477
+ * @param {string} [props.className]
6478
+ * @param {boolean} [props.delayInitialFocus]
6479
+ * @param {{x: number, y: number}} [props.position]
6480
+ * @param {number} [props.width]
6481
+ * @param {number} [props.height]
6482
+ * @param {Function} props.onClose
6483
+ * @param {Function} [props.onPostActivate]
6484
+ * @param {Function} [props.onPostDeactivate]
6485
+ * @param {boolean} [props.returnFocus]
6486
+ * @param {boolean} [props.closeOnEscape]
6487
+ * @param {string} props.title
6488
+ * @param {Ref} [ref]
6487
6489
  */
6488
6490
  function PopupComponent(props, globalRef) {
6489
6491
  const {
@@ -6701,12 +6703,12 @@ function getContainerNode(node) {
6701
6703
  const FEEL_POPUP_WIDTH = 700;
6702
6704
  const FEEL_POPUP_HEIGHT = 250;
6703
6705
 
6704
- /**
6705
- * FEEL popup component, built as a singleton. Emits lifecycle events as follows:
6706
- * - `feelPopup.open` - fired before the popup is mounted
6707
- * - `feelPopup.opened` - fired after the popup is mounted. Event context contains the DOM node of the popup
6708
- * - `feelPopup.close` - fired before the popup is unmounted. Event context contains the DOM node of the popup
6709
- * - `feelPopup.closed` - fired after the popup is unmounted
6706
+ /**
6707
+ * FEEL popup component, built as a singleton. Emits lifecycle events as follows:
6708
+ * - `feelPopup.open` - fired before the popup is mounted
6709
+ * - `feelPopup.opened` - fired after the popup is mounted. Event context contains the DOM node of the popup
6710
+ * - `feelPopup.close` - fired before the popup is unmounted. Event context contains the DOM node of the popup
6711
+ * - `feelPopup.closed` - fired after the popup is unmounted
6710
6712
  */
6711
6713
  function FEELPopupRoot(props) {
6712
6714
  const {
@@ -6933,11 +6935,11 @@ function autoCompletionOpen(element) {
6933
6935
  return element.closest('.cm-editor').querySelector('.cm-tooltip-autocomplete');
6934
6936
  }
6935
6937
 
6936
- /**
6937
- * This hook behaves like useEffect, but does not trigger on the first render.
6938
- *
6939
- * @param {Function} effect
6940
- * @param {Array} deps
6938
+ /**
6939
+ * This hook behaves like useEffect, but does not trigger on the first render.
6940
+ *
6941
+ * @param {Function} effect
6942
+ * @param {Array} deps
6941
6943
  */
6942
6944
  function useUpdateEffect(effect, deps) {
6943
6945
  const isMounted = useRef(false);
@@ -7014,19 +7016,19 @@ function ToggleSwitch(props) {
7014
7016
  });
7015
7017
  }
7016
7018
 
7017
- /**
7018
- * @param {Object} props
7019
- * @param {Object} props.element
7020
- * @param {String} props.id
7021
- * @param {String} props.description
7022
- * @param {String} props.label
7023
- * @param {String} props.switcherLabel
7024
- * @param {Boolean} props.inline
7025
- * @param {Function} props.getValue
7026
- * @param {Function} props.setValue
7027
- * @param {Function} props.onFocus
7028
- * @param {Function} props.onBlur
7029
- * @param {string|import('preact').Component} props.tooltip
7019
+ /**
7020
+ * @param {Object} props
7021
+ * @param {Object} props.element
7022
+ * @param {String} props.id
7023
+ * @param {String} props.description
7024
+ * @param {String} props.label
7025
+ * @param {String} props.switcherLabel
7026
+ * @param {Boolean} props.inline
7027
+ * @param {Function} props.getValue
7028
+ * @param {Function} props.setValue
7029
+ * @param {Function} props.onFocus
7030
+ * @param {Function} props.onBlur
7031
+ * @param {string|import('preact').Component} props.tooltip
7030
7032
  */
7031
7033
  function ToggleSwitchEntry(props) {
7032
7034
  const {
@@ -7133,22 +7135,22 @@ function NumberField(props) {
7133
7135
  });
7134
7136
  }
7135
7137
 
7136
- /**
7137
- * @param {Object} props
7138
- * @param {Boolean} props.debounce
7139
- * @param {String} props.description
7140
- * @param {Boolean} props.disabled
7141
- * @param {Object} props.element
7142
- * @param {Function} props.getValue
7143
- * @param {String} props.id
7144
- * @param {String} props.label
7145
- * @param {String} props.max
7146
- * @param {String} props.min
7147
- * @param {Function} props.setValue
7148
- * @param {Function} props.onFocus
7149
- * @param {Function} props.onBlur
7150
- * @param {String} props.step
7151
- * @param {Function} props.validate
7138
+ /**
7139
+ * @param {Object} props
7140
+ * @param {Boolean} props.debounce
7141
+ * @param {String} props.description
7142
+ * @param {Boolean} props.disabled
7143
+ * @param {Object} props.element
7144
+ * @param {Function} props.getValue
7145
+ * @param {String} props.id
7146
+ * @param {String} props.label
7147
+ * @param {String} props.max
7148
+ * @param {String} props.min
7149
+ * @param {Function} props.setValue
7150
+ * @param {Function} props.onFocus
7151
+ * @param {Function} props.onBlur
7152
+ * @param {String} props.step
7153
+ * @param {Function} props.validate
7152
7154
  */
7153
7155
  function NumberFieldEntry(props) {
7154
7156
  const {
@@ -7633,26 +7635,26 @@ forwardRef((props, ref) => {
7633
7635
  });
7634
7636
  });
7635
7637
 
7636
- /**
7637
- * @param {Object} props
7638
- * @param {Object} props.element
7639
- * @param {String} props.id
7640
- * @param {String} props.description
7641
- * @param {Boolean} props.debounce
7642
- * @param {Boolean} props.disabled
7643
- * @param {Boolean} props.feel
7644
- * @param {String} props.label
7645
- * @param {Function} props.getValue
7646
- * @param {Function} props.setValue
7647
- * @param {Function} props.tooltipContainer
7648
- * @param {Function} props.validate
7649
- * @param {Function} props.show
7650
- * @param {Function} props.example
7651
- * @param {Function} props.variables
7652
- * @param {Function} props.onFocus
7653
- * @param {Function} props.onBlur
7654
- * @param {string} [props.placeholder]
7655
- * @param {string|import('preact').Component} props.tooltip
7638
+ /**
7639
+ * @param {Object} props
7640
+ * @param {Object} props.element
7641
+ * @param {String} props.id
7642
+ * @param {String} props.description
7643
+ * @param {Boolean} props.debounce
7644
+ * @param {Boolean} props.disabled
7645
+ * @param {Boolean} props.feel
7646
+ * @param {String} props.label
7647
+ * @param {Function} props.getValue
7648
+ * @param {Function} props.setValue
7649
+ * @param {Function} props.tooltipContainer
7650
+ * @param {Function} props.validate
7651
+ * @param {Function} props.show
7652
+ * @param {Function} props.example
7653
+ * @param {Function} props.variables
7654
+ * @param {Function} props.onFocus
7655
+ * @param {Function} props.onBlur
7656
+ * @param {string} [props.placeholder]
7657
+ * @param {string|import('preact').Component} props.tooltip
7656
7658
  */
7657
7659
  function FeelEntry(props) {
7658
7660
  const {
@@ -7739,27 +7741,27 @@ function FeelEntry(props) {
7739
7741
  });
7740
7742
  }
7741
7743
 
7742
- /**
7743
- * @param {Object} props
7744
- * @param {Object} props.element
7745
- * @param {String} props.id
7746
- * @param {String} props.description
7747
- * @param {Boolean} props.debounce
7748
- * @param {Boolean} props.disabled
7749
- * @param {String} props.max
7750
- * @param {String} props.min
7751
- * @param {String} props.step
7752
- * @param {Boolean} props.feel
7753
- * @param {String} props.label
7754
- * @param {Function} props.getValue
7755
- * @param {Function} props.setValue
7756
- * @param {Function} props.tooltipContainer
7757
- * @param {Function} props.validate
7758
- * @param {Function} props.show
7759
- * @param {Function} props.example
7760
- * @param {Function} props.variables
7761
- * @param {Function} props.onFocus
7762
- * @param {Function} props.onBlur
7744
+ /**
7745
+ * @param {Object} props
7746
+ * @param {Object} props.element
7747
+ * @param {String} props.id
7748
+ * @param {String} props.description
7749
+ * @param {Boolean} props.debounce
7750
+ * @param {Boolean} props.disabled
7751
+ * @param {String} props.max
7752
+ * @param {String} props.min
7753
+ * @param {String} props.step
7754
+ * @param {Boolean} props.feel
7755
+ * @param {String} props.label
7756
+ * @param {Function} props.getValue
7757
+ * @param {Function} props.setValue
7758
+ * @param {Function} props.tooltipContainer
7759
+ * @param {Function} props.validate
7760
+ * @param {Function} props.show
7761
+ * @param {Function} props.example
7762
+ * @param {Function} props.variables
7763
+ * @param {Function} props.onFocus
7764
+ * @param {Function} props.onBlur
7763
7765
  */
7764
7766
  function FeelNumberEntry(props) {
7765
7767
  return jsx(FeelEntry, {
@@ -7769,24 +7771,24 @@ function FeelNumberEntry(props) {
7769
7771
  });
7770
7772
  }
7771
7773
 
7772
- /**
7773
- * @param {Object} props
7774
- * @param {Object} props.element
7775
- * @param {String} props.id
7776
- * @param {String} props.description
7777
- * @param {Boolean} props.debounce
7778
- * @param {Boolean} props.disabled
7779
- * @param {Boolean} props.feel
7780
- * @param {String} props.label
7781
- * @param {Function} props.getValue
7782
- * @param {Function} props.setValue
7783
- * @param {Function} props.tooltipContainer
7784
- * @param {Function} props.validate
7785
- * @param {Function} props.show
7786
- * @param {Function} props.example
7787
- * @param {Function} props.variables
7788
- * @param {Function} props.onFocus
7789
- * @param {Function} props.onBlur
7774
+ /**
7775
+ * @param {Object} props
7776
+ * @param {Object} props.element
7777
+ * @param {String} props.id
7778
+ * @param {String} props.description
7779
+ * @param {Boolean} props.debounce
7780
+ * @param {Boolean} props.disabled
7781
+ * @param {Boolean} props.feel
7782
+ * @param {String} props.label
7783
+ * @param {Function} props.getValue
7784
+ * @param {Function} props.setValue
7785
+ * @param {Function} props.tooltipContainer
7786
+ * @param {Function} props.validate
7787
+ * @param {Function} props.show
7788
+ * @param {Function} props.example
7789
+ * @param {Function} props.variables
7790
+ * @param {Function} props.onFocus
7791
+ * @param {Function} props.onBlur
7790
7792
  */
7791
7793
  function FeelToggleSwitchEntry(props) {
7792
7794
  return jsx(FeelEntry, {
@@ -7796,26 +7798,26 @@ function FeelToggleSwitchEntry(props) {
7796
7798
  });
7797
7799
  }
7798
7800
 
7799
- /**
7800
- * @param {Object} props
7801
- * @param {Object} props.element
7802
- * @param {String} props.id
7803
- * @param {String} props.description
7804
- * @param {String} props.hostLanguage
7805
- * @param {Boolean} props.singleLine
7806
- * @param {Boolean} props.debounce
7807
- * @param {Boolean} props.disabled
7808
- * @param {Boolean} props.feel
7809
- * @param {String} props.label
7810
- * @param {Function} props.getValue
7811
- * @param {Function} props.setValue
7812
- * @param {Function} props.tooltipContainer
7813
- * @param {Function} props.validate
7814
- * @param {Function} props.show
7815
- * @param {Function} props.example
7816
- * @param {Function} props.variables
7817
- * @param {Function} props.onFocus
7818
- * @param {Function} props.onBlur
7801
+ /**
7802
+ * @param {Object} props
7803
+ * @param {Object} props.element
7804
+ * @param {String} props.id
7805
+ * @param {String} props.description
7806
+ * @param {String} props.hostLanguage
7807
+ * @param {Boolean} props.singleLine
7808
+ * @param {Boolean} props.debounce
7809
+ * @param {Boolean} props.disabled
7810
+ * @param {Boolean} props.feel
7811
+ * @param {String} props.label
7812
+ * @param {Function} props.getValue
7813
+ * @param {Function} props.setValue
7814
+ * @param {Function} props.tooltipContainer
7815
+ * @param {Function} props.validate
7816
+ * @param {Function} props.show
7817
+ * @param {Function} props.example
7818
+ * @param {Function} props.variables
7819
+ * @param {Function} props.onFocus
7820
+ * @param {Function} props.onBlur
7819
7821
  */
7820
7822
  function FeelTemplatingEntry(props) {
7821
7823
  return jsx(FeelEntry, {
@@ -7883,85 +7885,85 @@ const DEFAULT_LAYOUT = {};
7883
7885
  const DEFAULT_DESCRIPTION = {};
7884
7886
  const DEFAULT_TOOLTIP = {};
7885
7887
 
7886
- /**
7887
- * @typedef { {
7888
- * component: import('preact').Component,
7889
- * id: String,
7890
- * isEdited?: Function
7891
- * } } EntryDefinition
7892
- *
7893
- * @typedef { {
7894
- * autoFocusEntry: String,
7895
- * autoOpen?: Boolean,
7896
- * entries: Array<EntryDefinition>,
7897
- * id: String,
7898
- * label: String,
7899
- * remove: (event: MouseEvent) => void
7900
- * } } ListItemDefinition
7901
- *
7902
- * @typedef { {
7903
- * add: (event: MouseEvent) => void,
7904
- * component: import('preact').Component,
7905
- * element: Object,
7906
- * id: String,
7907
- * items: Array<ListItemDefinition>,
7908
- * label: String,
7909
- * shouldOpen?: Boolean
7910
- * } } ListGroupDefinition
7911
- *
7912
- * @typedef { {
7913
- * component?: import('preact').Component,
7914
- * entries: Array<EntryDefinition>,
7915
- * id: String,
7916
- * label: String,
7917
- * shouldOpen?: Boolean
7918
- * } } GroupDefinition
7919
- *
7920
- * @typedef { {
7921
- * [id: String]: GetDescriptionFunction
7922
- * } } DescriptionConfig
7923
- *
7924
- * @typedef { {
7925
- * [id: String]: GetTooltipFunction
7926
- * } } TooltipConfig
7927
- *
7928
- * @callback { {
7929
- * @param {string} id
7930
- * @param {Object} element
7931
- * @returns {string}
7932
- * } } GetDescriptionFunction
7933
- *
7934
- * @callback { {
7935
- * @param {string} id
7936
- * @param {Object} element
7937
- * @returns {string}
7938
- * } } GetTooltipFunction
7939
- *
7940
- * @typedef { {
7941
- * getEmpty: (element: object) => import('./components/Placeholder').PlaceholderDefinition,
7942
- * getMultiple: (element: Object) => import('./components/Placeholder').PlaceholderDefinition
7943
- * } } PlaceholderProvider
7944
- *
7888
+ /**
7889
+ * @typedef { {
7890
+ * component: import('preact').Component,
7891
+ * id: String,
7892
+ * isEdited?: Function
7893
+ * } } EntryDefinition
7894
+ *
7895
+ * @typedef { {
7896
+ * autoFocusEntry: String,
7897
+ * autoOpen?: Boolean,
7898
+ * entries: Array<EntryDefinition>,
7899
+ * id: String,
7900
+ * label: String,
7901
+ * remove: (event: MouseEvent) => void
7902
+ * } } ListItemDefinition
7903
+ *
7904
+ * @typedef { {
7905
+ * add: (event: MouseEvent) => void,
7906
+ * component: import('preact').Component,
7907
+ * element: Object,
7908
+ * id: String,
7909
+ * items: Array<ListItemDefinition>,
7910
+ * label: String,
7911
+ * shouldOpen?: Boolean
7912
+ * } } ListGroupDefinition
7913
+ *
7914
+ * @typedef { {
7915
+ * component?: import('preact').Component,
7916
+ * entries: Array<EntryDefinition>,
7917
+ * id: String,
7918
+ * label: String,
7919
+ * shouldOpen?: Boolean
7920
+ * } } GroupDefinition
7921
+ *
7922
+ * @typedef { {
7923
+ * [id: String]: GetDescriptionFunction
7924
+ * } } DescriptionConfig
7925
+ *
7926
+ * @typedef { {
7927
+ * [id: String]: GetTooltipFunction
7928
+ * } } TooltipConfig
7929
+ *
7930
+ * @callback { {
7931
+ * @param {string} id
7932
+ * @param {Object} element
7933
+ * @returns {string}
7934
+ * } } GetDescriptionFunction
7935
+ *
7936
+ * @callback { {
7937
+ * @param {string} id
7938
+ * @param {Object} element
7939
+ * @returns {string}
7940
+ * } } GetTooltipFunction
7941
+ *
7942
+ * @typedef { {
7943
+ * getEmpty: (element: object) => import('./components/Placeholder').PlaceholderDefinition,
7944
+ * getMultiple: (element: Object) => import('./components/Placeholder').PlaceholderDefinition
7945
+ * } } PlaceholderProvider
7946
+ *
7945
7947
  */
7946
7948
 
7947
- /**
7948
- * A basic properties panel component. Describes *how* content will be rendered, accepts
7949
- * data from implementor to describe *what* will be rendered.
7950
- *
7951
- * @param {Object} props
7952
- * @param {Object|Array} props.element
7953
- * @param {import('./components/Header').HeaderProvider} props.headerProvider
7954
- * @param {PlaceholderProvider} [props.placeholderProvider]
7955
- * @param {Array<GroupDefinition|ListGroupDefinition>} props.groups
7956
- * @param {Object} [props.layoutConfig]
7957
- * @param {Function} [props.layoutChanged]
7958
- * @param {DescriptionConfig} [props.descriptionConfig]
7959
- * @param {Function} [props.descriptionLoaded]
7960
- * @param {TooltipConfig} [props.tooltipConfig]
7961
- * @param {Function} [props.tooltipLoaded]
7962
- * @param {HTMLElement} [props.feelPopupContainer]
7963
- * @param {Function} [props.getFeelPopupLinks]
7964
- * @param {Object} [props.eventBus]
7949
+ /**
7950
+ * A basic properties panel component. Describes *how* content will be rendered, accepts
7951
+ * data from implementor to describe *what* will be rendered.
7952
+ *
7953
+ * @param {Object} props
7954
+ * @param {Object|Array} props.element
7955
+ * @param {import('./components/Header').HeaderProvider} props.headerProvider
7956
+ * @param {PlaceholderProvider} [props.placeholderProvider]
7957
+ * @param {Array<GroupDefinition|ListGroupDefinition>} props.groups
7958
+ * @param {Object} [props.layoutConfig]
7959
+ * @param {Function} [props.layoutChanged]
7960
+ * @param {DescriptionConfig} [props.descriptionConfig]
7961
+ * @param {Function} [props.descriptionLoaded]
7962
+ * @param {TooltipConfig} [props.tooltipConfig]
7963
+ * @param {Function} [props.tooltipLoaded]
7964
+ * @param {HTMLElement} [props.feelPopupContainer]
7965
+ * @param {Function} [props.getFeelPopupLinks]
7966
+ * @param {Object} [props.eventBus]
7965
7967
  */
7966
7968
  function PropertiesPanel$1(props) {
7967
7969
  const {
@@ -8134,11 +8136,11 @@ function createTooltipContext(overrides = {}) {
8134
8136
 
8135
8137
  // hooks //////////////////
8136
8138
 
8137
- /**
8138
- * This hook behaves like useLayoutEffect, but does not trigger on the first render.
8139
- *
8140
- * @param {Function} effect
8141
- * @param {Array} deps
8139
+ /**
8140
+ * This hook behaves like useLayoutEffect, but does not trigger on the first render.
8141
+ *
8142
+ * @param {Function} effect
8143
+ * @param {Array} deps
8142
8144
  */
8143
8145
  function useUpdateLayoutEffect(effect, deps) {
8144
8146
  const isMounted = useRef(false);
@@ -8151,20 +8153,20 @@ function useUpdateLayoutEffect(effect, deps) {
8151
8153
  }, deps);
8152
8154
  }
8153
8155
 
8154
- /**
8155
- * @typedef { {
8156
- * [key: string]: string;
8157
- * } } TranslateReplacements
8156
+ /**
8157
+ * @typedef { {
8158
+ * [key: string]: string;
8159
+ * } } TranslateReplacements
8158
8160
  */
8159
8161
 
8160
- /**
8161
- * A simple translation stub to be used for multi-language support.
8162
- * Can be easily replaced with a more sophisticated solution.
8163
- *
8164
- * @param {string} template to interpolate
8165
- * @param {TranslateReplacements} [replacements] a map with substitutes
8166
- *
8167
- * @return {string} the translated string
8162
+ /**
8163
+ * A simple translation stub to be used for multi-language support.
8164
+ * Can be easily replaced with a more sophisticated solution.
8165
+ *
8166
+ * @param {string} template to interpolate
8167
+ * @param {TranslateReplacements} [replacements] a map with substitutes
8168
+ *
8169
+ * @return {string} the translated string
8168
8170
  */
8169
8171
  function translateFallback(template, replacements) {
8170
8172
  replacements = replacements || {};
@@ -8273,8 +8275,8 @@ function ListItem(props) {
8273
8275
  }
8274
8276
  const noop$1 = () => {};
8275
8277
 
8276
- /**
8277
- * @param {import('../PropertiesPanel').ListGroupDefinition} props
8278
+ /**
8279
+ * @param {import('../PropertiesPanel').ListGroupDefinition} props
8278
8280
  */
8279
8281
  function ListGroup(props) {
8280
8282
  const {
@@ -8465,18 +8467,18 @@ function Checkbox(props) {
8465
8467
  });
8466
8468
  }
8467
8469
 
8468
- /**
8469
- * @param {Object} props
8470
- * @param {Object} props.element
8471
- * @param {String} props.id
8472
- * @param {String} props.description
8473
- * @param {String} props.label
8474
- * @param {Function} props.getValue
8475
- * @param {Function} props.setValue
8476
- * @param {Function} props.onFocus
8477
- * @param {Function} props.onBlur
8478
- * @param {string|import('preact').Component} props.tooltip
8479
- * @param {boolean} [props.disabled]
8470
+ /**
8471
+ * @param {Object} props
8472
+ * @param {Object} props.element
8473
+ * @param {String} props.id
8474
+ * @param {String} props.description
8475
+ * @param {String} props.label
8476
+ * @param {Function} props.getValue
8477
+ * @param {Function} props.setValue
8478
+ * @param {Function} props.onFocus
8479
+ * @param {Function} props.onBlur
8480
+ * @param {string|import('preact').Component} props.tooltip
8481
+ * @param {boolean} [props.disabled]
8480
8482
  */
8481
8483
  function CheckboxEntry(props) {
8482
8484
  const {
@@ -8596,20 +8598,20 @@ function Select(props) {
8596
8598
  });
8597
8599
  }
8598
8600
 
8599
- /**
8600
- * @param {object} props
8601
- * @param {object} props.element
8602
- * @param {string} props.id
8603
- * @param {string} [props.description]
8604
- * @param {string} props.label
8605
- * @param {Function} props.getValue
8606
- * @param {Function} props.setValue
8607
- * @param {Function} props.onFocus
8608
- * @param {Function} props.onBlur
8609
- * @param {Function} props.getOptions
8610
- * @param {boolean} [props.disabled]
8611
- * @param {Function} [props.validate]
8612
- * @param {string|import('preact').Component} props.tooltip
8601
+ /**
8602
+ * @param {object} props
8603
+ * @param {object} props.element
8604
+ * @param {string} props.id
8605
+ * @param {string} [props.description]
8606
+ * @param {string} props.label
8607
+ * @param {Function} props.getValue
8608
+ * @param {Function} props.setValue
8609
+ * @param {Function} props.onFocus
8610
+ * @param {Function} props.onBlur
8611
+ * @param {Function} props.getOptions
8612
+ * @param {boolean} [props.disabled]
8613
+ * @param {Function} [props.validate]
8614
+ * @param {string|import('preact').Component} props.tooltip
8613
8615
  */
8614
8616
  function SelectEntry(props) {
8615
8617
  const {
@@ -8900,20 +8902,20 @@ function Textfield(props) {
8900
8902
  });
8901
8903
  }
8902
8904
 
8903
- /**
8904
- * @param {Object} props
8905
- * @param {Object} props.element
8906
- * @param {String} props.id
8907
- * @param {String} props.description
8908
- * @param {Boolean} props.debounce
8909
- * @param {Boolean} props.disabled
8910
- * @param {String} props.label
8911
- * @param {Function} props.getValue
8912
- * @param {Function} props.setValue
8913
- * @param {Function} props.onFocus
8914
- * @param {Function} props.onBlur
8915
- * @param {string|import('preact').Component} props.tooltip
8916
- * @param {Function} props.validate
8905
+ /**
8906
+ * @param {Object} props
8907
+ * @param {Object} props.element
8908
+ * @param {String} props.id
8909
+ * @param {String} props.description
8910
+ * @param {Boolean} props.debounce
8911
+ * @param {Boolean} props.disabled
8912
+ * @param {String} props.label
8913
+ * @param {Function} props.getValue
8914
+ * @param {Function} props.setValue
8915
+ * @param {Function} props.onFocus
8916
+ * @param {Function} props.onBlur
8917
+ * @param {string|import('preact').Component} props.tooltip
8918
+ * @param {Function} props.validate
8917
8919
  */
8918
8920
  function TextfieldEntry(props) {
8919
8921
  const {
@@ -8988,20 +8990,20 @@ class FeelPopupModule {
8988
8990
  this._eventBus = eventBus;
8989
8991
  }
8990
8992
 
8991
- /**
8992
- * Check if the FEEL popup is open.
8993
- * @return {Boolean}
8993
+ /**
8994
+ * Check if the FEEL popup is open.
8995
+ * @return {Boolean}
8994
8996
  */
8995
8997
  isOpen() {
8996
8998
  return this._eventBus.fire('feelPopup._isOpen');
8997
8999
  }
8998
9000
 
8999
- /**
9000
- * Open the FEEL popup.
9001
- *
9002
- * @param {String} entryId
9003
- * @param {Object} popupConfig
9004
- * @param {HTMLElement} sourceElement
9001
+ /**
9002
+ * Open the FEEL popup.
9003
+ *
9004
+ * @param {String} entryId
9005
+ * @param {Object} popupConfig
9006
+ * @param {HTMLElement} sourceElement
9005
9007
  */
9006
9008
  open(entryId, popupConfig, sourceElement) {
9007
9009
  return this._eventBus.fire('feelPopup._open', {
@@ -9011,8 +9013,8 @@ class FeelPopupModule {
9011
9013
  });
9012
9014
  }
9013
9015
 
9014
- /**
9015
- * Close the FEEL popup.
9016
+ /**
9017
+ * Close the FEEL popup.
9016
9018
  */
9017
9019
  close() {
9018
9020
  return this._eventBus.fire('feelPopup._close');
@@ -9054,11 +9056,13 @@ function getPropertiesPanelHeaderProvider(options = {}) {
9054
9056
  const fieldDefinition = formFields.get(type).config;
9055
9057
  const Icon = fieldDefinition.icon || iconsByType(type);
9056
9058
  if (Icon) {
9057
- return () => jsx(Icon, {
9058
- width: "36",
9059
- height: "36",
9060
- viewBox: "0 0 54 54"
9061
- });
9059
+ return function IconComponent() {
9060
+ return jsx(Icon, {
9061
+ width: "36",
9062
+ height: "36",
9063
+ viewBox: "0 0 54 54"
9064
+ });
9065
+ };
9062
9066
  } else if (fieldDefinition.iconUrl) {
9063
9067
  return getPaletteIcon({
9064
9068
  iconUrl: fieldDefinition.iconUrl,
@@ -10556,8 +10560,7 @@ function IFrameHeightEntry(props) {
10556
10560
  })];
10557
10561
  }
10558
10562
 
10559
- const HTTPS_PATTERN = /^(https):\/\/*/i; // eslint-disable-line no-useless-escape
10560
-
10563
+ const HTTPS_PATTERN = /^(https):\/\/*/i;
10561
10564
  function IFrameUrlEntry(props) {
10562
10565
  const {
10563
10566
  editField,
@@ -10618,6 +10621,7 @@ function getTooltip$1() {
10618
10621
  children: ["Not all external sources can be displayed in the iFrame. Read more about it in the", ' ', jsx("a", {
10619
10622
  target: "_blank",
10620
10623
  href: "https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options",
10624
+ rel: "noreferrer",
10621
10625
  children: "X-FRAME-OPTIONS documentation"
10622
10626
  }), "."]
10623
10627
  })]
@@ -10733,6 +10737,7 @@ const description$4 = jsxs(Fragment$1, {
10733
10737
  children: ["Supports markdown and templating.", ' ', jsx("a", {
10734
10738
  href: "https://docs.camunda.io/docs/components/modeler/forms/form-element-library/forms-element-library-text/",
10735
10739
  target: "_blank",
10740
+ rel: "noreferrer",
10736
10741
  children: "Learn more"
10737
10742
  })]
10738
10743
  });
@@ -10789,6 +10794,7 @@ const description$3 = jsxs(Fragment$1, {
10789
10794
  children: ["Supports HTML, styling, and templating. Styles are automatically scoped to the HTML component.", ' ', jsx("a", {
10790
10795
  href: "https://docs.camunda.io/docs/components/modeler/forms/form-element-library/forms-element-library-html/",
10791
10796
  target: "_blank",
10797
+ rel: "noreferrer",
10792
10798
  children: "Learn more"
10793
10799
  })]
10794
10800
  });
@@ -12653,6 +12659,7 @@ const description$2 = jsxs(Fragment$1, {
12653
12659
  children: ["A comma-separated list of", ' ', jsx("a", {
12654
12660
  href: "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers",
12655
12661
  target: "_blank",
12662
+ rel: "noreferrer",
12656
12663
  children: "file type specifiers"
12657
12664
  })]
12658
12665
  });
@@ -12824,9 +12831,9 @@ function EndpointKey(props) {
12824
12831
  }), jsxs("p", {
12825
12832
  children: ["The string must contain ", jsx("code", {
12826
12833
  children: '{ documentId }'
12827
- }), ", which will be replaced with the document ID from the document's reference."]
12834
+ }), ", which will be replaced with the document ID from the document\u2018s reference."]
12828
12835
  }), jsx("p", {
12829
- children: "If you're using the Camunda Tasklist, this variable is automatically added to the context for you."
12836
+ children: "If you\u2018re using the Camunda Tasklist, this variable is automatically added to the context for you."
12830
12837
  }), jsxs("p", {
12831
12838
  children: ["For more details, see the", ' ', jsx("a", {
12832
12839
  href: "https://docs.camunda.io/docs/next/components/modeler/forms/form-element-library/forms-element-library-document-preview/",
@@ -13578,6 +13585,7 @@ function getTooltip() {
13578
13585
  children: ["Allow the iframe to access more functionality of your browser, details regarding the various options can be found in the", ' ', jsx("a", {
13579
13586
  target: "_blank",
13580
13587
  href: "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe",
13588
+ rel: "noreferrer",
13581
13589
  children: "MDN iFrame documentation."
13582
13590
  })]
13583
13591
  })