@bpmn-io/form-js-editor 1.11.3 → 1.12.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
@@ -9,7 +9,7 @@ import { createContext, Fragment, render, createElement } from 'preact';
9
9
  import * as React from 'preact/compat';
10
10
  import { createPortal, useRef as useRef$1, useContext as useContext$1, useEffect as useEffect$1, forwardRef } from 'preact/compat';
11
11
  import dragula from '@bpmn-io/draggle';
12
- import { classes, query, closest, event, matches, domify } from 'min-dom';
12
+ import { classes, query, event, domify } from 'min-dom';
13
13
  import { arrayMoveMutable } from 'array-move';
14
14
  import { FeelersEditor } from 'feelers';
15
15
  import FeelEditor from '@bpmn-io/feel-editor';
@@ -2273,13 +2273,17 @@ function Element$1(props) {
2273
2273
  ref.current.focus();
2274
2274
  }
2275
2275
  }, [selection, field]);
2276
- function onClick(event) {
2277
- event.stopPropagation();
2278
- selection.toggle(field);
2279
-
2280
- // properly focus on field
2281
- ref.current.focus();
2282
- }
2276
+ const onClick = useCallback(event => {
2277
+ // TODO(nikku): refactor this to use proper DOM delegation
2278
+ const fieldEl = event.target.closest('[data-id]');
2279
+ if (!fieldEl) {
2280
+ return;
2281
+ }
2282
+ const id = fieldEl.dataset.id;
2283
+ if (id === field.id) {
2284
+ selection.toggle(field);
2285
+ }
2286
+ }, [field, selection]);
2283
2287
  const isSelected = selection.isSelected(field);
2284
2288
  const classString = useMemo(() => {
2285
2289
  const classes = [];
@@ -2671,6 +2675,34 @@ class Renderer {
2671
2675
  container,
2672
2676
  compact = false
2673
2677
  } = renderConfig;
2678
+ eventBus.on('form.init', function () {
2679
+ // emit <canvas.init> so dependent components can hook in
2680
+ // this is required to register keyboard bindings
2681
+ eventBus.fire('canvas.init', {
2682
+ svg: container,
2683
+ viewport: null
2684
+ });
2685
+ });
2686
+
2687
+ // focus container on over if no selection
2688
+ container.addEventListener('mouseover', function () {
2689
+ if (document.activeElement === document.body) {
2690
+ container.focus({
2691
+ preventScroll: true
2692
+ });
2693
+ }
2694
+ });
2695
+
2696
+ // ensure we focus the container if the users clicks
2697
+ // inside; this follows input focus handling closely
2698
+ container.addEventListener('click', function (event) {
2699
+ // force focus when clicking container
2700
+ if (!container.contains(document.activeElement)) {
2701
+ container.focus({
2702
+ preventScroll: true
2703
+ });
2704
+ }
2705
+ });
2674
2706
  const App = () => {
2675
2707
  const [state, setState] = useState(formEditor._getState());
2676
2708
  const formEditorContext = {
@@ -3108,8 +3140,8 @@ function isRedo(event) {
3108
3140
 
3109
3141
  var KEYDOWN_EVENT = 'keyboard.keydown',
3110
3142
  KEYUP_EVENT = 'keyboard.keyup';
3111
- var HANDLE_MODIFIER_ATTRIBUTE = 'input-handle-modified-keys';
3112
3143
  var DEFAULT_PRIORITY$2 = 1000;
3144
+ var compatMessage = 'Keyboard binding is now implicit; explicit binding to an element got removed. For more information, see https://github.com/bpmn-io/diagram-js/issues/661';
3113
3145
 
3114
3146
  /**
3115
3147
  * A keyboard abstraction that may be activated and
@@ -3129,16 +3161,16 @@ var DEFAULT_PRIORITY$2 = 1000;
3129
3161
  *
3130
3162
  * All events contain one field which is node.
3131
3163
  *
3132
- * A default binding for the keyboard may be specified via the
3133
- * `keyboard.bindTo` configuration option.
3164
+ * Specify the initial keyboard binding state via the
3165
+ * `keyboard.bind=true|false` configuration option.
3134
3166
  *
3135
3167
  * @param {Object} config
3136
- * @param {EventTarget} [config.bindTo]
3168
+ * @param {boolean} [config.bind]
3137
3169
  * @param {EventBus} eventBus
3138
3170
  */
3139
3171
  function Keyboard(config, eventBus) {
3140
3172
  var self = this;
3141
- this._config = config || {};
3173
+ this._config = config = config || {};
3142
3174
  this._eventBus = eventBus;
3143
3175
  this._keydownHandler = this._keydownHandler.bind(this);
3144
3176
  this._keyupHandler = this._keyupHandler.bind(this);
@@ -3148,16 +3180,16 @@ function Keyboard(config, eventBus) {
3148
3180
  self._fire('destroy');
3149
3181
  self.unbind();
3150
3182
  });
3151
- eventBus.on('diagram.init', function () {
3152
- self._fire('init');
3153
- });
3154
- eventBus.on('attach', function () {
3155
- if (config && config.bindTo) {
3156
- self.bind(config.bindTo);
3183
+ if (config.bindTo) {
3184
+ console.error('unsupported configuration <keyboard.bindTo>', new Error(compatMessage));
3185
+ }
3186
+ var bind = config && config.bind !== false;
3187
+ eventBus.on('canvas.init', function (event) {
3188
+ self._target = event.svg;
3189
+ if (bind) {
3190
+ self.bind();
3157
3191
  }
3158
- });
3159
- eventBus.on('detach', function () {
3160
- self.unbind();
3192
+ self._fire('init');
3161
3193
  });
3162
3194
  }
3163
3195
  Keyboard.$inject = ['config.keyboard', 'eventBus'];
@@ -3181,35 +3213,29 @@ Keyboard.prototype._keyHandler = function (event, type) {
3181
3213
  }
3182
3214
  };
3183
3215
  Keyboard.prototype._isEventIgnored = function (event) {
3184
- if (event.defaultPrevented) {
3185
- return true;
3186
- }
3187
- return (isInput(event.target) || isButton(event.target) && isKey([' ', 'Enter'], event)) && this._isModifiedKeyIgnored(event);
3188
- };
3189
- Keyboard.prototype._isModifiedKeyIgnored = function (event) {
3190
- if (!isCmd(event)) {
3191
- return true;
3192
- }
3193
- var allowedModifiers = this._getAllowedModifiers(event.target);
3194
- return allowedModifiers.indexOf(event.key) === -1;
3195
- };
3196
- Keyboard.prototype._getAllowedModifiers = function (element) {
3197
- var modifierContainer = closest(element, '[' + HANDLE_MODIFIER_ATTRIBUTE + ']', true);
3198
- if (!modifierContainer || this._node && !this._node.contains(modifierContainer)) {
3199
- return [];
3200
- }
3201
- return modifierContainer.getAttribute(HANDLE_MODIFIER_ATTRIBUTE).split(',');
3216
+ return false;
3202
3217
  };
3203
3218
 
3204
3219
  /**
3205
3220
  * Bind keyboard events to the given DOM node.
3206
3221
  *
3222
+ * @overlord
3223
+ * @deprecated No longer in use since version 15.0.0.
3224
+ *
3207
3225
  * @param {EventTarget} node
3208
3226
  */
3227
+ /**
3228
+ * Bind keyboard events to the canvas node.
3229
+ */
3209
3230
  Keyboard.prototype.bind = function (node) {
3231
+ // legacy <node> argument provided
3232
+ if (node) {
3233
+ console.error('unsupported argument <node>', new Error(compatMessage));
3234
+ }
3235
+
3210
3236
  // make sure that the keyboard is only bound once to the DOM
3211
3237
  this.unbind();
3212
- this._node = node;
3238
+ node = this._node = this._target;
3213
3239
 
3214
3240
  // bind key events
3215
3241
  event.bind(node, 'keydown', this._keydownHandler);
@@ -3276,15 +3302,6 @@ Keyboard.prototype.isCmd = isCmd;
3276
3302
  Keyboard.prototype.isShift = isShift;
3277
3303
  Keyboard.prototype.isKey = isKey;
3278
3304
 
3279
- // helpers ///////
3280
-
3281
- function isInput(target) {
3282
- return target && (matches(target, 'input, textarea') || target.contentEditable === 'true');
3283
- }
3284
- function isButton(target) {
3285
- return target && matches(target, 'button, input[type=submit], input[type=button], a[href], [aria-role=button]');
3286
- }
3287
-
3288
3305
  var LOW_PRIORITY$1 = 500;
3289
3306
 
3290
3307
  /**
@@ -3448,7 +3465,7 @@ class FormEditorKeyboardBindings {
3448
3465
  const {
3449
3466
  keyEvent
3450
3467
  } = context;
3451
- if (isCmd(keyEvent) && !isShift(keyEvent) && isKey(KEYS_UNDO, keyEvent)) {
3468
+ if (isUndo(keyEvent)) {
3452
3469
  editorActions.trigger('undo');
3453
3470
  return true;
3454
3471
  }
@@ -3461,7 +3478,7 @@ class FormEditorKeyboardBindings {
3461
3478
  const {
3462
3479
  keyEvent
3463
3480
  } = context;
3464
- if (isCmd(keyEvent) && (isKey(KEYS_REDO, keyEvent) || isKey(KEYS_UNDO, keyEvent) && isShift(keyEvent))) {
3481
+ if (isRedo(keyEvent)) {
3465
3482
  editorActions.trigger('redo');
3466
3483
  return true;
3467
3484
  }
@@ -5276,6 +5293,21 @@ ArrowIcon.defaultProps = {
5276
5293
  width: "16",
5277
5294
  height: "16"
5278
5295
  };
5296
+ var CloseIcon = function CloseIcon(props) {
5297
+ return jsx("svg", {
5298
+ ...props,
5299
+ children: jsx("path", {
5300
+ fillRule: "evenodd",
5301
+ d: "m12 4.7-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8 12 4.7Z",
5302
+ fill: "currentColor"
5303
+ })
5304
+ });
5305
+ };
5306
+ CloseIcon.defaultProps = {
5307
+ xmlns: "http://www.w3.org/2000/svg",
5308
+ width: "16",
5309
+ height: "16"
5310
+ };
5279
5311
  var CreateIcon = function CreateIcon(props) {
5280
5312
  return jsx("svg", {
5281
5313
  ...props,
@@ -5363,26 +5395,17 @@ FeelIcon$1.defaultProps = {
5363
5395
  fill: "none",
5364
5396
  xmlns: "http://www.w3.org/2000/svg"
5365
5397
  };
5366
- var HelpIcon = function HelpIcon(props) {
5398
+ var LaunchIcon = function LaunchIcon(props) {
5367
5399
  return jsxs("svg", {
5368
5400
  ...props,
5369
5401
  children: [jsx("path", {
5370
- d: "M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2Zm0 26a12 12 0 1 1 12-12 12 12 0 0 1-12 12Z"
5371
- }), jsx("circle", {
5372
- cx: "16",
5373
- cy: "23.5",
5374
- r: "1.5"
5375
- }), jsx("path", {
5376
- d: "M17 8h-1.5a4.49 4.49 0 0 0-4.5 4.5v.5h2v-.5a2.5 2.5 0 0 1 2.5-2.5H17a2.5 2.5 0 0 1 0 5h-2v4.5h2V17a4.5 4.5 0 0 0 0-9Z"
5402
+ d: "M26 28H6a2.003 2.003 0 0 1-2-2V6a2.003 2.003 0 0 1 2-2h10v2H6v20h20V16h2v10a2.003 2.003 0 0 1-2 2Z"
5377
5403
  }), jsx("path", {
5378
- style: {
5379
- fill: "none"
5380
- },
5381
- d: "M0 0h32v32H0z"
5404
+ d: "M20 2v2h6.586L18 12.586 19.414 14 28 5.414V12h2V2H20z"
5382
5405
  })]
5383
5406
  });
5384
5407
  };
5385
- HelpIcon.defaultProps = {
5408
+ LaunchIcon.defaultProps = {
5386
5409
  xmlns: "http://www.w3.org/2000/svg",
5387
5410
  viewBox: "0 0 32 32"
5388
5411
  };
@@ -5404,21 +5427,6 @@ PopupIcon.defaultProps = {
5404
5427
  height: "16",
5405
5428
  viewBox: "0 0 32 32"
5406
5429
  };
5407
- var CloseIcon = function CloseIcon(props) {
5408
- return jsx("svg", {
5409
- ...props,
5410
- children: jsx("path", {
5411
- fillRule: "evenodd",
5412
- d: "m12 4.7-.7-.7L8 7.3 4.7 4l-.7.7L7.3 8 4 11.3l.7.7L8 8.7l3.3 3.3.7-.7L8.7 8 12 4.7Z",
5413
- fill: "currentColor"
5414
- })
5415
- });
5416
- };
5417
- CloseIcon.defaultProps = {
5418
- xmlns: "http://www.w3.org/2000/svg",
5419
- width: "16",
5420
- height: "16"
5421
- };
5422
5430
  function Header(props) {
5423
5431
  const {
5424
5432
  element,
@@ -5457,7 +5465,7 @@ function Header(props) {
5457
5465
  }), jsx("div", {
5458
5466
  class: "bio-properties-panel-header-actions",
5459
5467
  children: documentationRef ? jsx("a", {
5460
- rel: "noopener",
5468
+ rel: "noreferrer",
5461
5469
  class: "bio-properties-panel-header-link",
5462
5470
  href: documentationRef,
5463
5471
  title: "Open documentation",
@@ -5475,19 +5483,19 @@ const ErrorsContext = createContext({
5475
5483
  errors: {}
5476
5484
  });
5477
5485
 
5478
- /**
5479
- * @typedef {Function} <propertiesPanel.showEntry> callback
5480
- *
5481
- * @example
5482
- *
5483
- * useEvent('propertiesPanel.showEntry', ({ focus = false, ...rest }) => {
5484
- * // ...
5485
- * });
5486
- *
5487
- * @param {Object} context
5488
- * @param {boolean} [context.focus]
5489
- *
5490
- * @returns void
5486
+ /**
5487
+ * @typedef {Function} <propertiesPanel.showEntry> callback
5488
+ *
5489
+ * @example
5490
+ *
5491
+ * useEvent('propertiesPanel.showEntry', ({ focus = false, ...rest }) => {
5492
+ * // ...
5493
+ * });
5494
+ *
5495
+ * @param {Object} context
5496
+ * @param {boolean} [context.focus]
5497
+ *
5498
+ * @returns void
5491
5499
  */
5492
5500
 
5493
5501
  const EventContext = createContext({
@@ -5504,20 +5512,20 @@ const TooltipContext = createContext({
5504
5512
  getTooltipForId: () => {}
5505
5513
  });
5506
5514
 
5507
- /**
5508
- * Accesses the global TooltipContext and returns a tooltip for a given id and element.
5509
- *
5510
- * @example
5511
- * ```jsx
5512
- * function TextField(props) {
5513
- * const tooltip = useTooltipContext('input1', element);
5514
- * }
5515
- * ```
5516
- *
5517
- * @param {string} id
5518
- * @param {object} element
5519
- *
5520
- * @returns {string}
5515
+ /**
5516
+ * Accesses the global TooltipContext and returns a tooltip for a given id and element.
5517
+ *
5518
+ * @example
5519
+ * ```jsx
5520
+ * function TextField(props) {
5521
+ * const tooltip = useTooltipContext('input1', element);
5522
+ * }
5523
+ * ```
5524
+ *
5525
+ * @param {string} id
5526
+ * @param {object} element
5527
+ *
5528
+ * @returns {string}
5521
5529
  */
5522
5530
  function useTooltipContext(id, element) {
5523
5531
  const {
@@ -5669,20 +5677,20 @@ function prefixId$9(id) {
5669
5677
  return `bio-properties-panel-${id}`;
5670
5678
  }
5671
5679
 
5672
- /**
5673
- * Accesses the global DescriptionContext and returns a description for a given id and element.
5674
- *
5675
- * @example
5676
- * ```jsx
5677
- * function TextField(props) {
5678
- * const description = useDescriptionContext('input1', element);
5679
- * }
5680
- * ```
5681
- *
5682
- * @param {string} id
5683
- * @param {object} element
5684
- *
5685
- * @returns {string}
5680
+ /**
5681
+ * Accesses the global DescriptionContext and returns a description for a given id and element.
5682
+ *
5683
+ * @example
5684
+ * ```jsx
5685
+ * function TextField(props) {
5686
+ * const description = useDescriptionContext('input1', element);
5687
+ * }
5688
+ * ```
5689
+ *
5690
+ * @param {string} id
5691
+ * @param {object} element
5692
+ *
5693
+ * @returns {string}
5686
5694
  */
5687
5695
  function useDescriptionContext(id, element) {
5688
5696
  const {
@@ -5703,11 +5711,11 @@ function useErrors() {
5703
5711
  return errors;
5704
5712
  }
5705
5713
 
5706
- /**
5707
- * Subscribe to an event immediately. Update subscription after inputs changed.
5708
- *
5709
- * @param {string} event
5710
- * @param {Function} callback
5714
+ /**
5715
+ * Subscribe to an event immediately. Update subscription after inputs changed.
5716
+ *
5717
+ * @param {string} event
5718
+ * @param {Function} callback
5711
5719
  */
5712
5720
  function useEvent(event, callback, eventBus) {
5713
5721
  const eventContext = useContext(EventContext);
@@ -5737,20 +5745,20 @@ function useEvent(event, callback, eventBus) {
5737
5745
  }, [callback, event, eventBus]);
5738
5746
  }
5739
5747
 
5740
- /**
5741
- * Creates a state that persists in the global LayoutContext.
5742
- *
5743
- * @example
5744
- * ```jsx
5745
- * function Group(props) {
5746
- * const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
5747
- * }
5748
- * ```
5749
- *
5750
- * @param {(string|number)[]} path
5751
- * @param {any} [defaultValue]
5752
- *
5753
- * @returns {[ any, Function ]}
5748
+ /**
5749
+ * Creates a state that persists in the global LayoutContext.
5750
+ *
5751
+ * @example
5752
+ * ```jsx
5753
+ * function Group(props) {
5754
+ * const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
5755
+ * }
5756
+ * ```
5757
+ *
5758
+ * @param {(string|number)[]} path
5759
+ * @param {any} [defaultValue]
5760
+ *
5761
+ * @returns {[ any, Function ]}
5754
5762
  */
5755
5763
  function useLayoutState(path, defaultValue) {
5756
5764
  const {
@@ -5764,11 +5772,11 @@ function useLayoutState(path, defaultValue) {
5764
5772
  return [layoutForKey, setState];
5765
5773
  }
5766
5774
 
5767
- /**
5768
- * @pinussilvestrus: we need to introduce our own hook to persist the previous
5769
- * state on updates.
5770
- *
5771
- * cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
5775
+ /**
5776
+ * @pinussilvestrus: we need to introduce our own hook to persist the previous
5777
+ * state on updates.
5778
+ *
5779
+ * cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
5772
5780
  */
5773
5781
 
5774
5782
  function usePrevious(value) {
@@ -5779,12 +5787,12 @@ function usePrevious(value) {
5779
5787
  return ref.current;
5780
5788
  }
5781
5789
 
5782
- /**
5783
- * Subscribe to `propertiesPanel.showEntry`.
5784
- *
5785
- * @param {string} id
5786
- *
5787
- * @returns {import('preact').Ref}
5790
+ /**
5791
+ * Subscribe to `propertiesPanel.showEntry`.
5792
+ *
5793
+ * @param {string} id
5794
+ *
5795
+ * @returns {import('preact').Ref}
5788
5796
  */
5789
5797
  function useShowEntryEvent(id) {
5790
5798
  const {
@@ -5815,20 +5823,20 @@ function useShowEntryEvent(id) {
5815
5823
  return ref;
5816
5824
  }
5817
5825
 
5818
- /**
5819
- * @callback setSticky
5820
- * @param {boolean} value
5826
+ /**
5827
+ * @callback setSticky
5828
+ * @param {boolean} value
5821
5829
  */
5822
5830
 
5823
- /**
5824
- * Use IntersectionObserver to identify when DOM element is in sticky mode.
5825
- * If sticky is observered setSticky(true) will be called.
5826
- * If sticky mode is left, setSticky(false) will be called.
5827
- *
5828
- *
5829
- * @param {Object} ref
5830
- * @param {string} scrollContainerSelector
5831
- * @param {setSticky} setSticky
5831
+ /**
5832
+ * Use IntersectionObserver to identify when DOM element is in sticky mode.
5833
+ * If sticky is observered setSticky(true) will be called.
5834
+ * If sticky mode is left, setSticky(false) will be called.
5835
+ *
5836
+ *
5837
+ * @param {Object} ref
5838
+ * @param {string} scrollContainerSelector
5839
+ * @param {setSticky} setSticky
5832
5840
  */
5833
5841
  function useStickyIntersectionObserver(ref, scrollContainerSelector, setSticky) {
5834
5842
  const [scrollContainer, setScrollContainer] = useState(query(scrollContainerSelector));
@@ -5882,19 +5890,19 @@ function useStickyIntersectionObserver(ref, scrollContainerSelector, setSticky)
5882
5890
  }, [ref.current, scrollContainer, setSticky]);
5883
5891
  }
5884
5892
 
5885
- /**
5886
- * Creates a static function reference with changing body.
5887
- * This is necessary when external libraries require a callback function
5888
- * that has references to state variables.
5889
- *
5890
- * Usage:
5891
- * const callback = useStaticCallback((val) => {val === currentState});
5892
- *
5893
- * The `callback` reference is static and can be safely used in external
5894
- * libraries or as a prop that does not cause rerendering of children.
5895
- *
5896
- * @param {Function} callback function with changing reference
5897
- * @returns {Function} static function reference
5893
+ /**
5894
+ * Creates a static function reference with changing body.
5895
+ * This is necessary when external libraries require a callback function
5896
+ * that has references to state variables.
5897
+ *
5898
+ * Usage:
5899
+ * const callback = useStaticCallback((val) => {val === currentState});
5900
+ *
5901
+ * The `callback` reference is static and can be safely used in external
5902
+ * libraries or as a prop that does not cause rerendering of children.
5903
+ *
5904
+ * @param {Function} callback function with changing reference
5905
+ * @returns {Function} static function reference
5898
5906
  */
5899
5907
  function useStaticCallback(callback) {
5900
5908
  const callbackRef = useRef(callback);
@@ -6035,13 +6043,13 @@ function DataMarker(props) {
6035
6043
  return null;
6036
6044
  }
6037
6045
 
6038
- /**
6039
- * @typedef { {
6040
- * text: (element: object) => string,
6041
- * icon?: (element: Object) => import('preact').Component
6042
- * } } PlaceholderDefinition
6043
- *
6044
- * @param { PlaceholderDefinition } props
6046
+ /**
6047
+ * @typedef { {
6048
+ * text: (element: object) => string,
6049
+ * icon?: (element: Object) => import('preact').Component
6050
+ * } } PlaceholderDefinition
6051
+ *
6052
+ * @param { PlaceholderDefinition } props
6045
6053
  */
6046
6054
  function Placeholder(props) {
6047
6055
  const {
@@ -6078,9 +6086,9 @@ function Description$1(props) {
6078
6086
  }
6079
6087
  const noop$6 = () => {};
6080
6088
 
6081
- /**
6082
- * Buffer `.focus()` calls while the editor is not initialized.
6083
- * Set Focus inside when the editor is ready.
6089
+ /**
6090
+ * Buffer `.focus()` calls while the editor is not initialized.
6091
+ * Set Focus inside when the editor is ready.
6084
6092
  */
6085
6093
  const useBufferedFocus$1 = function (editor, ref) {
6086
6094
  const [buffer, setBuffer] = useState(undefined);
@@ -6180,9 +6188,9 @@ const CodeEditor$1 = forwardRef((props, ref) => {
6180
6188
  });
6181
6189
  const noop$5 = () => {};
6182
6190
 
6183
- /**
6184
- * Buffer `.focus()` calls while the editor is not initialized.
6185
- * Set Focus inside when the editor is ready.
6191
+ /**
6192
+ * Buffer `.focus()` calls while the editor is not initialized.
6193
+ * Set Focus inside when the editor is ready.
6186
6194
  */
6187
6195
  const useBufferedFocus = function (editor, ref) {
6188
6196
  const [buffer, setBuffer] = useState(undefined);
@@ -6231,10 +6239,10 @@ const CodeEditor = forwardRef((props, ref) => {
6231
6239
  useEffect(() => {
6232
6240
  let editor;
6233
6241
 
6234
- /* Trigger FEEL toggle when
6235
- *
6236
- * - `backspace` is pressed
6237
- * - AND the cursor is at the beginning of the input
6242
+ /* Trigger FEEL toggle when
6243
+ *
6244
+ * - `backspace` is pressed
6245
+ * - AND the cursor is at the beginning of the input
6238
6246
  */
6239
6247
  const onKeyDown = e => {
6240
6248
  if (e.key !== 'Backspace' || !editor) {
@@ -6323,10 +6331,10 @@ function FeelIndicator(props) {
6323
6331
  }
6324
6332
  const noop$4 = () => {};
6325
6333
 
6326
- /**
6327
- * @param {Object} props
6328
- * @param {Object} props.label
6329
- * @param {String} props.feel
6334
+ /**
6335
+ * @param {Object} props
6336
+ * @param {Object} props.label
6337
+ * @param {String} props.feel
6330
6338
  */
6331
6339
  function FeelIcon(props) {
6332
6340
  const {
@@ -6360,22 +6368,22 @@ const FeelPopupContext = createContext({
6360
6368
  source: null
6361
6369
  });
6362
6370
 
6363
- /**
6364
- * Add a dragger that calls back the passed function with
6365
- * { event, delta } on drag.
6366
- *
6367
- * @example
6368
- *
6369
- * function dragMove(event, delta) {
6370
- * // we are dragging (!!)
6371
- * }
6372
- *
6373
- * domElement.addEventListener('dragstart', dragger(dragMove));
6374
- *
6375
- * @param {Function} fn
6376
- * @param {Element} [dragPreview]
6377
- *
6378
- * @return {Function} drag start callback function
6371
+ /**
6372
+ * Add a dragger that calls back the passed function with
6373
+ * { event, delta } on drag.
6374
+ *
6375
+ * @example
6376
+ *
6377
+ * function dragMove(event, delta) {
6378
+ * // we are dragging (!!)
6379
+ * }
6380
+ *
6381
+ * domElement.addEventListener('dragstart', dragger(dragMove));
6382
+ *
6383
+ * @param {Function} fn
6384
+ * @param {Element} [dragPreview]
6385
+ *
6386
+ * @return {Function} drag start callback function
6379
6387
  */
6380
6388
  function createDragger(fn, dragPreview) {
6381
6389
  let self;
@@ -6429,23 +6437,23 @@ function emptyCanvas() {
6429
6437
  }
6430
6438
  const noop$3 = () => {};
6431
6439
 
6432
- /**
6433
- * A generic popup component.
6434
- *
6435
- * @param {Object} props
6436
- * @param {HTMLElement} [props.container]
6437
- * @param {string} [props.className]
6438
- * @param {boolean} [props.delayInitialFocus]
6439
- * @param {{x: number, y: number}} [props.position]
6440
- * @param {number} [props.width]
6441
- * @param {number} [props.height]
6442
- * @param {Function} props.onClose
6443
- * @param {Function} [props.onPostActivate]
6444
- * @param {Function} [props.onPostDeactivate]
6445
- * @param {boolean} [props.returnFocus]
6446
- * @param {boolean} [props.closeOnEscape]
6447
- * @param {string} props.title
6448
- * @param {Ref} [ref]
6440
+ /**
6441
+ * A generic popup component.
6442
+ *
6443
+ * @param {Object} props
6444
+ * @param {HTMLElement} [props.container]
6445
+ * @param {string} [props.className]
6446
+ * @param {boolean} [props.delayInitialFocus]
6447
+ * @param {{x: number, y: number}} [props.position]
6448
+ * @param {number} [props.width]
6449
+ * @param {number} [props.height]
6450
+ * @param {Function} props.onClose
6451
+ * @param {Function} [props.onPostActivate]
6452
+ * @param {Function} [props.onPostDeactivate]
6453
+ * @param {boolean} [props.returnFocus]
6454
+ * @param {boolean} [props.closeOnEscape]
6455
+ * @param {string} props.title
6456
+ * @param {Ref} [ref]
6449
6457
  */
6450
6458
  function PopupComponent(props, globalRef) {
6451
6459
  const {
@@ -6663,12 +6671,12 @@ function getContainerNode(node) {
6663
6671
  const FEEL_POPUP_WIDTH = 700;
6664
6672
  const FEEL_POPUP_HEIGHT = 250;
6665
6673
 
6666
- /**
6667
- * FEEL popup component, built as a singleton. Emits lifecycle events as follows:
6668
- * - `feelPopup.open` - fired before the popup is mounted
6669
- * - `feelPopup.opened` - fired after the popup is mounted. Event context contains the DOM node of the popup
6670
- * - `feelPopup.close` - fired before the popup is unmounted. Event context contains the DOM node of the popup
6671
- * - `feelPopup.closed` - fired after the popup is unmounted
6674
+ /**
6675
+ * FEEL popup component, built as a singleton. Emits lifecycle events as follows:
6676
+ * - `feelPopup.open` - fired before the popup is mounted
6677
+ * - `feelPopup.opened` - fired after the popup is mounted. Event context contains the DOM node of the popup
6678
+ * - `feelPopup.close` - fired before the popup is unmounted. Event context contains the DOM node of the popup
6679
+ * - `feelPopup.closed` - fired after the popup is unmounted
6672
6680
  */
6673
6681
  function FEELPopupRoot(props) {
6674
6682
  const {
@@ -6678,7 +6686,8 @@ function FEELPopupRoot(props) {
6678
6686
  on() {},
6679
6687
  off() {}
6680
6688
  },
6681
- popupContainer
6689
+ popupContainer,
6690
+ getPopupLinks = () => []
6682
6691
  } = props;
6683
6692
  const prevElement = usePrevious(element);
6684
6693
  const [popupConfig, setPopupConfig] = useState({});
@@ -6753,6 +6762,7 @@ function FEELPopupRoot(props) {
6753
6762
  children: [open && jsx(FeelPopupComponent, {
6754
6763
  onClose: handleClose,
6755
6764
  container: popupContainer,
6765
+ getLinks: getPopupLinks,
6756
6766
  sourceElement: sourceElement,
6757
6767
  emit: emit,
6758
6768
  ...popupConfig
@@ -6762,6 +6772,7 @@ function FEELPopupRoot(props) {
6762
6772
  function FeelPopupComponent(props) {
6763
6773
  const {
6764
6774
  container,
6775
+ getLinks,
6765
6776
  id,
6766
6777
  hostLanguage,
6767
6778
  onInput,
@@ -6832,24 +6843,24 @@ function FeelPopupComponent(props) {
6832
6843
  height: FEEL_POPUP_HEIGHT,
6833
6844
  width: FEEL_POPUP_WIDTH,
6834
6845
  ref: popupRef,
6835
- children: [jsxs(Popup.Title, {
6846
+ children: [jsx(Popup.Title, {
6836
6847
  title: title,
6837
6848
  emit: emit,
6838
6849
  showCloseButton: true,
6839
6850
  closeButtonTooltip: "Save and close",
6840
6851
  onClose: onClose,
6841
6852
  draggable: true,
6842
- children: [type === 'feel' && jsxs("a", {
6843
- href: "https://docs.camunda.io/docs/components/modeler/feel/what-is-feel/",
6844
- target: "_blank",
6845
- class: "bio-properties-panel-feel-popup__title-link",
6846
- children: ["Learn FEEL expressions", jsx(HelpIcon, {})]
6847
- }), type === 'feelers' && jsxs("a", {
6848
- href: "https://docs.camunda.io/docs/components/modeler/forms/configuration/forms-config-templating-syntax/",
6849
- target: "_blank",
6850
- class: "bio-properties-panel-feel-popup__title-link",
6851
- children: ["Learn templating", jsx(HelpIcon, {})]
6852
- })]
6853
+ children: jsx(Fragment$1, {
6854
+ children: getLinks(type).map((link, index) => {
6855
+ return jsxs("a", {
6856
+ rel: "noreferrer",
6857
+ href: link.href,
6858
+ target: "_blank",
6859
+ class: "bio-properties-panel-feel-popup__title-link",
6860
+ children: [link.title, jsx(LaunchIcon, {})]
6861
+ }, index);
6862
+ })
6863
+ })
6853
6864
  }), jsx(Popup.Body, {
6854
6865
  children: jsxs("div", {
6855
6866
  onKeyDownCapture: onKeyDownCapture,
@@ -6892,11 +6903,11 @@ function autoCompletionOpen(element) {
6892
6903
  return element.closest('.cm-editor').querySelector('.cm-tooltip-autocomplete');
6893
6904
  }
6894
6905
 
6895
- /**
6896
- * This hook behaves like useEffect, but does not trigger on the first render.
6897
- *
6898
- * @param {Function} effect
6899
- * @param {Array} deps
6906
+ /**
6907
+ * This hook behaves like useEffect, but does not trigger on the first render.
6908
+ *
6909
+ * @param {Function} effect
6910
+ * @param {Array} deps
6900
6911
  */
6901
6912
  function useUpdateEffect(effect, deps) {
6902
6913
  const isMounted = useRef(false);
@@ -6973,19 +6984,19 @@ function ToggleSwitch(props) {
6973
6984
  });
6974
6985
  }
6975
6986
 
6976
- /**
6977
- * @param {Object} props
6978
- * @param {Object} props.element
6979
- * @param {String} props.id
6980
- * @param {String} props.description
6981
- * @param {String} props.label
6982
- * @param {String} props.switcherLabel
6983
- * @param {Boolean} props.inline
6984
- * @param {Function} props.getValue
6985
- * @param {Function} props.setValue
6986
- * @param {Function} props.onFocus
6987
- * @param {Function} props.onBlur
6988
- * @param {string|import('preact').Component} props.tooltip
6987
+ /**
6988
+ * @param {Object} props
6989
+ * @param {Object} props.element
6990
+ * @param {String} props.id
6991
+ * @param {String} props.description
6992
+ * @param {String} props.label
6993
+ * @param {String} props.switcherLabel
6994
+ * @param {Boolean} props.inline
6995
+ * @param {Function} props.getValue
6996
+ * @param {Function} props.setValue
6997
+ * @param {Function} props.onFocus
6998
+ * @param {Function} props.onBlur
6999
+ * @param {string|import('preact').Component} props.tooltip
6989
7000
  */
6990
7001
  function ToggleSwitchEntry(props) {
6991
7002
  const {
@@ -7092,22 +7103,22 @@ function NumberField(props) {
7092
7103
  });
7093
7104
  }
7094
7105
 
7095
- /**
7096
- * @param {Object} props
7097
- * @param {Boolean} props.debounce
7098
- * @param {String} props.description
7099
- * @param {Boolean} props.disabled
7100
- * @param {Object} props.element
7101
- * @param {Function} props.getValue
7102
- * @param {String} props.id
7103
- * @param {String} props.label
7104
- * @param {String} props.max
7105
- * @param {String} props.min
7106
- * @param {Function} props.setValue
7107
- * @param {Function} props.onFocus
7108
- * @param {Function} props.onBlur
7109
- * @param {String} props.step
7110
- * @param {Function} props.validate
7106
+ /**
7107
+ * @param {Object} props
7108
+ * @param {Boolean} props.debounce
7109
+ * @param {String} props.description
7110
+ * @param {Boolean} props.disabled
7111
+ * @param {Object} props.element
7112
+ * @param {Function} props.getValue
7113
+ * @param {String} props.id
7114
+ * @param {String} props.label
7115
+ * @param {String} props.max
7116
+ * @param {String} props.min
7117
+ * @param {Function} props.setValue
7118
+ * @param {Function} props.onFocus
7119
+ * @param {Function} props.onBlur
7120
+ * @param {String} props.step
7121
+ * @param {Function} props.validate
7111
7122
  */
7112
7123
  function NumberFieldEntry(props) {
7113
7124
  const {
@@ -7592,26 +7603,26 @@ forwardRef((props, ref) => {
7592
7603
  });
7593
7604
  });
7594
7605
 
7595
- /**
7596
- * @param {Object} props
7597
- * @param {Object} props.element
7598
- * @param {String} props.id
7599
- * @param {String} props.description
7600
- * @param {Boolean} props.debounce
7601
- * @param {Boolean} props.disabled
7602
- * @param {Boolean} props.feel
7603
- * @param {String} props.label
7604
- * @param {Function} props.getValue
7605
- * @param {Function} props.setValue
7606
- * @param {Function} props.tooltipContainer
7607
- * @param {Function} props.validate
7608
- * @param {Function} props.show
7609
- * @param {Function} props.example
7610
- * @param {Function} props.variables
7611
- * @param {Function} props.onFocus
7612
- * @param {Function} props.onBlur
7613
- * @param {string} [props.placeholder]
7614
- * @param {string|import('preact').Component} props.tooltip
7606
+ /**
7607
+ * @param {Object} props
7608
+ * @param {Object} props.element
7609
+ * @param {String} props.id
7610
+ * @param {String} props.description
7611
+ * @param {Boolean} props.debounce
7612
+ * @param {Boolean} props.disabled
7613
+ * @param {Boolean} props.feel
7614
+ * @param {String} props.label
7615
+ * @param {Function} props.getValue
7616
+ * @param {Function} props.setValue
7617
+ * @param {Function} props.tooltipContainer
7618
+ * @param {Function} props.validate
7619
+ * @param {Function} props.show
7620
+ * @param {Function} props.example
7621
+ * @param {Function} props.variables
7622
+ * @param {Function} props.onFocus
7623
+ * @param {Function} props.onBlur
7624
+ * @param {string} [props.placeholder]
7625
+ * @param {string|import('preact').Component} props.tooltip
7615
7626
  */
7616
7627
  function FeelEntry(props) {
7617
7628
  const {
@@ -7698,27 +7709,27 @@ function FeelEntry(props) {
7698
7709
  });
7699
7710
  }
7700
7711
 
7701
- /**
7702
- * @param {Object} props
7703
- * @param {Object} props.element
7704
- * @param {String} props.id
7705
- * @param {String} props.description
7706
- * @param {Boolean} props.debounce
7707
- * @param {Boolean} props.disabled
7708
- * @param {String} props.max
7709
- * @param {String} props.min
7710
- * @param {String} props.step
7711
- * @param {Boolean} props.feel
7712
- * @param {String} props.label
7713
- * @param {Function} props.getValue
7714
- * @param {Function} props.setValue
7715
- * @param {Function} props.tooltipContainer
7716
- * @param {Function} props.validate
7717
- * @param {Function} props.show
7718
- * @param {Function} props.example
7719
- * @param {Function} props.variables
7720
- * @param {Function} props.onFocus
7721
- * @param {Function} props.onBlur
7712
+ /**
7713
+ * @param {Object} props
7714
+ * @param {Object} props.element
7715
+ * @param {String} props.id
7716
+ * @param {String} props.description
7717
+ * @param {Boolean} props.debounce
7718
+ * @param {Boolean} props.disabled
7719
+ * @param {String} props.max
7720
+ * @param {String} props.min
7721
+ * @param {String} props.step
7722
+ * @param {Boolean} props.feel
7723
+ * @param {String} props.label
7724
+ * @param {Function} props.getValue
7725
+ * @param {Function} props.setValue
7726
+ * @param {Function} props.tooltipContainer
7727
+ * @param {Function} props.validate
7728
+ * @param {Function} props.show
7729
+ * @param {Function} props.example
7730
+ * @param {Function} props.variables
7731
+ * @param {Function} props.onFocus
7732
+ * @param {Function} props.onBlur
7722
7733
  */
7723
7734
  function FeelNumberEntry(props) {
7724
7735
  return jsx(FeelEntry, {
@@ -7728,24 +7739,24 @@ function FeelNumberEntry(props) {
7728
7739
  });
7729
7740
  }
7730
7741
 
7731
- /**
7732
- * @param {Object} props
7733
- * @param {Object} props.element
7734
- * @param {String} props.id
7735
- * @param {String} props.description
7736
- * @param {Boolean} props.debounce
7737
- * @param {Boolean} props.disabled
7738
- * @param {Boolean} props.feel
7739
- * @param {String} props.label
7740
- * @param {Function} props.getValue
7741
- * @param {Function} props.setValue
7742
- * @param {Function} props.tooltipContainer
7743
- * @param {Function} props.validate
7744
- * @param {Function} props.show
7745
- * @param {Function} props.example
7746
- * @param {Function} props.variables
7747
- * @param {Function} props.onFocus
7748
- * @param {Function} props.onBlur
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 {Boolean} props.feel
7750
+ * @param {String} props.label
7751
+ * @param {Function} props.getValue
7752
+ * @param {Function} props.setValue
7753
+ * @param {Function} props.tooltipContainer
7754
+ * @param {Function} props.validate
7755
+ * @param {Function} props.show
7756
+ * @param {Function} props.example
7757
+ * @param {Function} props.variables
7758
+ * @param {Function} props.onFocus
7759
+ * @param {Function} props.onBlur
7749
7760
  */
7750
7761
  function FeelToggleSwitchEntry(props) {
7751
7762
  return jsx(FeelEntry, {
@@ -7755,26 +7766,26 @@ function FeelToggleSwitchEntry(props) {
7755
7766
  });
7756
7767
  }
7757
7768
 
7758
- /**
7759
- * @param {Object} props
7760
- * @param {Object} props.element
7761
- * @param {String} props.id
7762
- * @param {String} props.description
7763
- * @param {String} props.hostLanguage
7764
- * @param {Boolean} props.singleLine
7765
- * @param {Boolean} props.debounce
7766
- * @param {Boolean} props.disabled
7767
- * @param {Boolean} props.feel
7768
- * @param {String} props.label
7769
- * @param {Function} props.getValue
7770
- * @param {Function} props.setValue
7771
- * @param {Function} props.tooltipContainer
7772
- * @param {Function} props.validate
7773
- * @param {Function} props.show
7774
- * @param {Function} props.example
7775
- * @param {Function} props.variables
7776
- * @param {Function} props.onFocus
7777
- * @param {Function} props.onBlur
7769
+ /**
7770
+ * @param {Object} props
7771
+ * @param {Object} props.element
7772
+ * @param {String} props.id
7773
+ * @param {String} props.description
7774
+ * @param {String} props.hostLanguage
7775
+ * @param {Boolean} props.singleLine
7776
+ * @param {Boolean} props.debounce
7777
+ * @param {Boolean} props.disabled
7778
+ * @param {Boolean} props.feel
7779
+ * @param {String} props.label
7780
+ * @param {Function} props.getValue
7781
+ * @param {Function} props.setValue
7782
+ * @param {Function} props.tooltipContainer
7783
+ * @param {Function} props.validate
7784
+ * @param {Function} props.show
7785
+ * @param {Function} props.example
7786
+ * @param {Function} props.variables
7787
+ * @param {Function} props.onFocus
7788
+ * @param {Function} props.onBlur
7778
7789
  */
7779
7790
  function FeelTemplatingEntry(props) {
7780
7791
  return jsx(FeelEntry, {
@@ -7842,84 +7853,85 @@ const DEFAULT_LAYOUT = {};
7842
7853
  const DEFAULT_DESCRIPTION = {};
7843
7854
  const DEFAULT_TOOLTIP = {};
7844
7855
 
7845
- /**
7846
- * @typedef { {
7847
- * component: import('preact').Component,
7848
- * id: String,
7849
- * isEdited?: Function
7850
- * } } EntryDefinition
7851
- *
7852
- * @typedef { {
7853
- * autoFocusEntry: String,
7854
- * autoOpen?: Boolean,
7855
- * entries: Array<EntryDefinition>,
7856
- * id: String,
7857
- * label: String,
7858
- * remove: (event: MouseEvent) => void
7859
- * } } ListItemDefinition
7860
- *
7861
- * @typedef { {
7862
- * add: (event: MouseEvent) => void,
7863
- * component: import('preact').Component,
7864
- * element: Object,
7865
- * id: String,
7866
- * items: Array<ListItemDefinition>,
7867
- * label: String,
7868
- * shouldOpen?: Boolean
7869
- * } } ListGroupDefinition
7870
- *
7871
- * @typedef { {
7872
- * component?: import('preact').Component,
7873
- * entries: Array<EntryDefinition>,
7874
- * id: String,
7875
- * label: String,
7876
- * shouldOpen?: Boolean
7877
- * } } GroupDefinition
7878
- *
7879
- * @typedef { {
7880
- * [id: String]: GetDescriptionFunction
7881
- * } } DescriptionConfig
7882
- *
7883
- * @typedef { {
7884
- * [id: String]: GetTooltipFunction
7885
- * } } TooltipConfig
7886
- *
7887
- * @callback { {
7888
- * @param {string} id
7889
- * @param {Object} element
7890
- * @returns {string}
7891
- * } } GetDescriptionFunction
7892
- *
7893
- * @callback { {
7894
- * @param {string} id
7895
- * @param {Object} element
7896
- * @returns {string}
7897
- * } } GetTooltipFunction
7898
- *
7899
- * @typedef { {
7900
- * getEmpty: (element: object) => import('./components/Placeholder').PlaceholderDefinition,
7901
- * getMultiple: (element: Object) => import('./components/Placeholder').PlaceholderDefinition
7902
- * } } PlaceholderProvider
7903
- *
7856
+ /**
7857
+ * @typedef { {
7858
+ * component: import('preact').Component,
7859
+ * id: String,
7860
+ * isEdited?: Function
7861
+ * } } EntryDefinition
7862
+ *
7863
+ * @typedef { {
7864
+ * autoFocusEntry: String,
7865
+ * autoOpen?: Boolean,
7866
+ * entries: Array<EntryDefinition>,
7867
+ * id: String,
7868
+ * label: String,
7869
+ * remove: (event: MouseEvent) => void
7870
+ * } } ListItemDefinition
7871
+ *
7872
+ * @typedef { {
7873
+ * add: (event: MouseEvent) => void,
7874
+ * component: import('preact').Component,
7875
+ * element: Object,
7876
+ * id: String,
7877
+ * items: Array<ListItemDefinition>,
7878
+ * label: String,
7879
+ * shouldOpen?: Boolean
7880
+ * } } ListGroupDefinition
7881
+ *
7882
+ * @typedef { {
7883
+ * component?: import('preact').Component,
7884
+ * entries: Array<EntryDefinition>,
7885
+ * id: String,
7886
+ * label: String,
7887
+ * shouldOpen?: Boolean
7888
+ * } } GroupDefinition
7889
+ *
7890
+ * @typedef { {
7891
+ * [id: String]: GetDescriptionFunction
7892
+ * } } DescriptionConfig
7893
+ *
7894
+ * @typedef { {
7895
+ * [id: String]: GetTooltipFunction
7896
+ * } } TooltipConfig
7897
+ *
7898
+ * @callback { {
7899
+ * @param {string} id
7900
+ * @param {Object} element
7901
+ * @returns {string}
7902
+ * } } GetDescriptionFunction
7903
+ *
7904
+ * @callback { {
7905
+ * @param {string} id
7906
+ * @param {Object} element
7907
+ * @returns {string}
7908
+ * } } GetTooltipFunction
7909
+ *
7910
+ * @typedef { {
7911
+ * getEmpty: (element: object) => import('./components/Placeholder').PlaceholderDefinition,
7912
+ * getMultiple: (element: Object) => import('./components/Placeholder').PlaceholderDefinition
7913
+ * } } PlaceholderProvider
7914
+ *
7904
7915
  */
7905
7916
 
7906
- /**
7907
- * A basic properties panel component. Describes *how* content will be rendered, accepts
7908
- * data from implementor to describe *what* will be rendered.
7909
- *
7910
- * @param {Object} props
7911
- * @param {Object|Array} props.element
7912
- * @param {import('./components/Header').HeaderProvider} props.headerProvider
7913
- * @param {PlaceholderProvider} [props.placeholderProvider]
7914
- * @param {Array<GroupDefinition|ListGroupDefinition>} props.groups
7915
- * @param {Object} [props.layoutConfig]
7916
- * @param {Function} [props.layoutChanged]
7917
- * @param {DescriptionConfig} [props.descriptionConfig]
7918
- * @param {Function} [props.descriptionLoaded]
7919
- * @param {TooltipConfig} [props.tooltipConfig]
7920
- * @param {Function} [props.tooltipLoaded]
7921
- * @param {HTMLElement} [props.feelPopupContainer]
7922
- * @param {Object} [props.eventBus]
7917
+ /**
7918
+ * A basic properties panel component. Describes *how* content will be rendered, accepts
7919
+ * data from implementor to describe *what* will be rendered.
7920
+ *
7921
+ * @param {Object} props
7922
+ * @param {Object|Array} props.element
7923
+ * @param {import('./components/Header').HeaderProvider} props.headerProvider
7924
+ * @param {PlaceholderProvider} [props.placeholderProvider]
7925
+ * @param {Array<GroupDefinition|ListGroupDefinition>} props.groups
7926
+ * @param {Object} [props.layoutConfig]
7927
+ * @param {Function} [props.layoutChanged]
7928
+ * @param {DescriptionConfig} [props.descriptionConfig]
7929
+ * @param {Function} [props.descriptionLoaded]
7930
+ * @param {TooltipConfig} [props.tooltipConfig]
7931
+ * @param {Function} [props.tooltipLoaded]
7932
+ * @param {HTMLElement} [props.feelPopupContainer]
7933
+ * @param {Function} [props.getFeelPopupLinks]
7934
+ * @param {Object} [props.eventBus]
7923
7935
  */
7924
7936
  function PropertiesPanel$1(props) {
7925
7937
  const {
@@ -7934,6 +7946,7 @@ function PropertiesPanel$1(props) {
7934
7946
  tooltipConfig,
7935
7947
  tooltipLoaded,
7936
7948
  feelPopupContainer,
7949
+ getFeelPopupLinks,
7937
7950
  eventBus
7938
7951
  } = props;
7939
7952
 
@@ -8038,6 +8051,7 @@ function PropertiesPanel$1(props) {
8038
8051
  element: element,
8039
8052
  eventBus: eventBus,
8040
8053
  popupContainer: feelPopupContainer,
8054
+ getPopupLinks: getFeelPopupLinks,
8041
8055
  children: jsxs("div", {
8042
8056
  class: "bio-properties-panel",
8043
8057
  children: [jsx(Header, {
@@ -8090,11 +8104,11 @@ function createTooltipContext(overrides = {}) {
8090
8104
 
8091
8105
  // hooks //////////////////
8092
8106
 
8093
- /**
8094
- * This hook behaves like useLayoutEffect, but does not trigger on the first render.
8095
- *
8096
- * @param {Function} effect
8097
- * @param {Array} deps
8107
+ /**
8108
+ * This hook behaves like useLayoutEffect, but does not trigger on the first render.
8109
+ *
8110
+ * @param {Function} effect
8111
+ * @param {Array} deps
8098
8112
  */
8099
8113
  function useUpdateLayoutEffect(effect, deps) {
8100
8114
  const isMounted = useRef(false);
@@ -8107,20 +8121,20 @@ function useUpdateLayoutEffect(effect, deps) {
8107
8121
  }, deps);
8108
8122
  }
8109
8123
 
8110
- /**
8111
- * @typedef { {
8112
- * [key: string]: string;
8113
- * } } TranslateReplacements
8124
+ /**
8125
+ * @typedef { {
8126
+ * [key: string]: string;
8127
+ * } } TranslateReplacements
8114
8128
  */
8115
8129
 
8116
- /**
8117
- * A simple translation stub to be used for multi-language support.
8118
- * Can be easily replaced with a more sophisticated solution.
8119
- *
8120
- * @param {string} template to interpolate
8121
- * @param {TranslateReplacements} [replacements] a map with substitutes
8122
- *
8123
- * @return {string} the translated string
8130
+ /**
8131
+ * A simple translation stub to be used for multi-language support.
8132
+ * Can be easily replaced with a more sophisticated solution.
8133
+ *
8134
+ * @param {string} template to interpolate
8135
+ * @param {TranslateReplacements} [replacements] a map with substitutes
8136
+ *
8137
+ * @return {string} the translated string
8124
8138
  */
8125
8139
  function translateFallback(template, replacements) {
8126
8140
  replacements = replacements || {};
@@ -8229,8 +8243,8 @@ function ListItem(props) {
8229
8243
  }
8230
8244
  const noop$1 = () => {};
8231
8245
 
8232
- /**
8233
- * @param {import('../PropertiesPanel').ListGroupDefinition} props
8246
+ /**
8247
+ * @param {import('../PropertiesPanel').ListGroupDefinition} props
8234
8248
  */
8235
8249
  function ListGroup(props) {
8236
8250
  const {
@@ -8421,18 +8435,18 @@ function Checkbox(props) {
8421
8435
  });
8422
8436
  }
8423
8437
 
8424
- /**
8425
- * @param {Object} props
8426
- * @param {Object} props.element
8427
- * @param {String} props.id
8428
- * @param {String} props.description
8429
- * @param {String} props.label
8430
- * @param {Function} props.getValue
8431
- * @param {Function} props.setValue
8432
- * @param {Function} props.onFocus
8433
- * @param {Function} props.onBlur
8434
- * @param {string|import('preact').Component} props.tooltip
8435
- * @param {boolean} [props.disabled]
8438
+ /**
8439
+ * @param {Object} props
8440
+ * @param {Object} props.element
8441
+ * @param {String} props.id
8442
+ * @param {String} props.description
8443
+ * @param {String} props.label
8444
+ * @param {Function} props.getValue
8445
+ * @param {Function} props.setValue
8446
+ * @param {Function} props.onFocus
8447
+ * @param {Function} props.onBlur
8448
+ * @param {string|import('preact').Component} props.tooltip
8449
+ * @param {boolean} [props.disabled]
8436
8450
  */
8437
8451
  function CheckboxEntry(props) {
8438
8452
  const {
@@ -8552,20 +8566,20 @@ function Select(props) {
8552
8566
  });
8553
8567
  }
8554
8568
 
8555
- /**
8556
- * @param {object} props
8557
- * @param {object} props.element
8558
- * @param {string} props.id
8559
- * @param {string} [props.description]
8560
- * @param {string} props.label
8561
- * @param {Function} props.getValue
8562
- * @param {Function} props.setValue
8563
- * @param {Function} props.onFocus
8564
- * @param {Function} props.onBlur
8565
- * @param {Function} props.getOptions
8566
- * @param {boolean} [props.disabled]
8567
- * @param {Function} [props.validate]
8568
- * @param {string|import('preact').Component} props.tooltip
8569
+ /**
8570
+ * @param {object} props
8571
+ * @param {object} props.element
8572
+ * @param {string} props.id
8573
+ * @param {string} [props.description]
8574
+ * @param {string} props.label
8575
+ * @param {Function} props.getValue
8576
+ * @param {Function} props.setValue
8577
+ * @param {Function} props.onFocus
8578
+ * @param {Function} props.onBlur
8579
+ * @param {Function} props.getOptions
8580
+ * @param {boolean} [props.disabled]
8581
+ * @param {Function} [props.validate]
8582
+ * @param {string|import('preact').Component} props.tooltip
8569
8583
  */
8570
8584
  function SelectEntry(props) {
8571
8585
  const {
@@ -8856,20 +8870,20 @@ function Textfield(props) {
8856
8870
  });
8857
8871
  }
8858
8872
 
8859
- /**
8860
- * @param {Object} props
8861
- * @param {Object} props.element
8862
- * @param {String} props.id
8863
- * @param {String} props.description
8864
- * @param {Boolean} props.debounce
8865
- * @param {Boolean} props.disabled
8866
- * @param {String} props.label
8867
- * @param {Function} props.getValue
8868
- * @param {Function} props.setValue
8869
- * @param {Function} props.onFocus
8870
- * @param {Function} props.onBlur
8871
- * @param {string|import('preact').Component} props.tooltip
8872
- * @param {Function} props.validate
8873
+ /**
8874
+ * @param {Object} props
8875
+ * @param {Object} props.element
8876
+ * @param {String} props.id
8877
+ * @param {String} props.description
8878
+ * @param {Boolean} props.debounce
8879
+ * @param {Boolean} props.disabled
8880
+ * @param {String} props.label
8881
+ * @param {Function} props.getValue
8882
+ * @param {Function} props.setValue
8883
+ * @param {Function} props.onFocus
8884
+ * @param {Function} props.onBlur
8885
+ * @param {string|import('preact').Component} props.tooltip
8886
+ * @param {Function} props.validate
8873
8887
  */
8874
8888
  function TextfieldEntry(props) {
8875
8889
  const {
@@ -8944,20 +8958,20 @@ class FeelPopupModule {
8944
8958
  this._eventBus = eventBus;
8945
8959
  }
8946
8960
 
8947
- /**
8948
- * Check if the FEEL popup is open.
8949
- * @return {Boolean}
8961
+ /**
8962
+ * Check if the FEEL popup is open.
8963
+ * @return {Boolean}
8950
8964
  */
8951
8965
  isOpen() {
8952
8966
  return this._eventBus.fire('feelPopup._isOpen');
8953
8967
  }
8954
8968
 
8955
- /**
8956
- * Open the FEEL popup.
8957
- *
8958
- * @param {String} entryId
8959
- * @param {Object} popupConfig
8960
- * @param {HTMLElement} sourceElement
8969
+ /**
8970
+ * Open the FEEL popup.
8971
+ *
8972
+ * @param {String} entryId
8973
+ * @param {Object} popupConfig
8974
+ * @param {HTMLElement} sourceElement
8961
8975
  */
8962
8976
  open(entryId, popupConfig, sourceElement) {
8963
8977
  return this._eventBus.fire('feelPopup._open', {
@@ -8967,8 +8981,8 @@ class FeelPopupModule {
8967
8981
  });
8968
8982
  }
8969
8983
 
8970
- /**
8971
- * Close the FEEL popup.
8984
+ /**
8985
+ * Close the FEEL popup.
8972
8986
  */
8973
8987
  close() {
8974
8988
  return this._eventBus.fire('feelPopup._close');
@@ -13568,7 +13582,7 @@ class FormEditor {
13568
13582
  * @type {Element}
13569
13583
  */
13570
13584
  this._container = createFormContainer();
13571
- this._container.setAttribute('input-handle-modified-keys', 'z,y');
13585
+ this._container.setAttribute('tabindex', '0');
13572
13586
  const {
13573
13587
  container,
13574
13588
  exporter,