camunda-bpmn-js 5.6.0 → 5.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46255,6 +46255,7 @@
46255
46255
 
46256
46256
  /**
46257
46257
  * @typedef {import('didi').Injector} Injector
46258
+ * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
46258
46259
  *
46259
46260
  * @typedef {import('../../model/Types').Shape} Shape
46260
46261
  *
@@ -46264,13 +46265,17 @@
46264
46265
 
46265
46266
  /**
46266
46267
  * @param {Injector} injector
46268
+ * @param {Canvas} canvas
46267
46269
  */
46268
- function BpmnSpaceTool(injector) {
46270
+ function BpmnSpaceTool(injector, canvas) {
46269
46271
  injector.invoke(SpaceTool, this);
46272
+
46273
+ this._canvas = canvas;
46270
46274
  }
46271
46275
 
46272
46276
  BpmnSpaceTool.$inject = [
46273
- 'injector'
46277
+ 'injector',
46278
+ 'canvas'
46274
46279
  ];
46275
46280
 
46276
46281
  e$7(BpmnSpaceTool, SpaceTool);
@@ -46284,7 +46289,26 @@
46284
46289
  * @return {Object}
46285
46290
  */
46286
46291
  BpmnSpaceTool.prototype.calculateAdjustments = function(elements, axis, delta, start) {
46287
- var adjustments = SpaceTool.prototype.calculateAdjustments.call(this, elements, axis, delta, start);
46292
+
46293
+ var canvasRoot = this._canvas.getRootElement(),
46294
+ spaceRoot = elements[0] === canvasRoot ? null : elements[0],
46295
+ enclosedArtifacts = [];
46296
+
46297
+ // ensure
46298
+ if (spaceRoot) {
46299
+ enclosedArtifacts = values(
46300
+ getEnclosedElements(
46301
+ canvasRoot.children.filter(
46302
+ (child) => is$5(child, 'bpmn:Artifact')
46303
+ ),
46304
+ getBBox(spaceRoot)
46305
+ )
46306
+ );
46307
+ }
46308
+
46309
+ const elementsToMove = [ ...elements, ...enclosedArtifacts ];
46310
+
46311
+ var adjustments = SpaceTool.prototype.calculateAdjustments.call(this, elementsToMove, axis, delta, start);
46288
46312
 
46289
46313
  // do not resize:
46290
46314
  //
@@ -109407,19 +109431,19 @@
109407
109431
  errors: {}
109408
109432
  });
109409
109433
 
109410
- /**
109411
- * @typedef {Function} <propertiesPanel.showEntry> callback
109412
- *
109413
- * @example
109414
- *
109415
- * useEvent('propertiesPanel.showEntry', ({ focus = false, ...rest }) => {
109416
- * // ...
109417
- * });
109418
- *
109419
- * @param {Object} context
109420
- * @param {boolean} [context.focus]
109421
- *
109422
- * @returns void
109434
+ /**
109435
+ * @typedef {Function} <propertiesPanel.showEntry> callback
109436
+ *
109437
+ * @example
109438
+ *
109439
+ * useEvent('propertiesPanel.showEntry', ({ focus = false, ...rest }) => {
109440
+ * // ...
109441
+ * });
109442
+ *
109443
+ * @param {Object} context
109444
+ * @param {boolean} [context.focus]
109445
+ *
109446
+ * @returns void
109423
109447
  */
109424
109448
 
109425
109449
  const EventContext = F$3({
@@ -109438,20 +109462,20 @@
109438
109462
  getTooltipForId: () => {}
109439
109463
  });
109440
109464
 
109441
- /**
109442
- * Accesses the global TooltipContext and returns a tooltip for a given id and element.
109443
- *
109444
- * @example
109445
- * ```jsx
109446
- * function TextField(props) {
109447
- * const tooltip = useTooltipContext('input1', element);
109448
- * }
109449
- * ```
109450
- *
109451
- * @param {string} id
109452
- * @param {object} element
109453
- *
109454
- * @returns {string}
109465
+ /**
109466
+ * Accesses the global TooltipContext and returns a tooltip for a given id and element.
109467
+ *
109468
+ * @example
109469
+ * ```jsx
109470
+ * function TextField(props) {
109471
+ * const tooltip = useTooltipContext('input1', element);
109472
+ * }
109473
+ * ```
109474
+ *
109475
+ * @param {string} id
109476
+ * @param {object} element
109477
+ *
109478
+ * @returns {string}
109455
109479
  */
109456
109480
  function useTooltipContext(id, element) {
109457
109481
  const {
@@ -109473,7 +109497,7 @@
109473
109497
  return u(Tooltip, {
109474
109498
  ...props,
109475
109499
  value: value,
109476
- forId: prefixId$9(forId)
109500
+ forId: `bio-properties-panel-${forId}`
109477
109501
  });
109478
109502
  }
109479
109503
  function Tooltip(props) {
@@ -109484,71 +109508,52 @@
109484
109508
  direction = 'right',
109485
109509
  position
109486
109510
  } = props;
109487
- const [visible, setShow] = h(false);
109488
- const [focusedViaKeyboard, setFocusedViaKeyboard] = h(false);
109511
+ const [visible, setVisible] = h(false);
109512
+
109513
+ // Tooltip will be shown after SHOW_DELAY ms from hovering over the source element.
109514
+ const SHOW_DELAY = 200;
109489
109515
  let timeout = null;
109490
109516
  const wrapperRef = _$1(null);
109491
109517
  const tooltipRef = _$1(null);
109492
- const showTooltip = async event => {
109493
- const show = () => setShow(true);
109494
- if (!visible && !timeout) {
109495
- if (event instanceof MouseEvent) {
109496
- timeout = setTimeout(show, 200);
109497
- } else {
109498
- show();
109499
- setFocusedViaKeyboard(true);
109500
- }
109518
+ const show = (_, delay) => {
109519
+ if (visible) return;
109520
+ if (delay) {
109521
+ timeout = setTimeout(() => {
109522
+ setVisible(true);
109523
+ }, SHOW_DELAY);
109524
+ } else {
109525
+ setVisible(true);
109501
109526
  }
109502
109527
  };
109503
- const hideTooltip = () => {
109504
- setShow(false);
109505
- setFocusedViaKeyboard(false);
109506
- };
109507
- const hideTooltipViaEscape = e => {
109508
- e.code === 'Escape' && hideTooltip();
109528
+ const hide = () => {
109529
+ clearTimeout(timeout);
109530
+ setVisible(false);
109509
109531
  };
109510
- const isTooltipHovered = ({
109511
- x,
109512
- y
109532
+ const handleMouseLeave = ({
109533
+ relatedTarget
109513
109534
  }) => {
109514
- const tooltip = tooltipRef.current;
109515
- const wrapper = wrapperRef.current;
109516
- return tooltip && (inBounds(x, y, wrapper.getBoundingClientRect()) || inBounds(x, y, tooltip.getBoundingClientRect()));
109535
+ // Don't hide the tooltip when moving mouse between the wrapper and the tooltip.
109536
+ if (relatedTarget === wrapperRef.current || relatedTarget === tooltipRef.current || relatedTarget?.parentElement === tooltipRef.current) {
109537
+ return;
109538
+ }
109539
+ hide();
109517
109540
  };
109518
- p$1(() => {
109541
+ const handleFocusOut = e => {
109519
109542
  const {
109520
- current
109521
- } = wrapperRef;
109522
- if (!current) {
109543
+ target
109544
+ } = e;
109545
+
109546
+ // Don't hide the tooltip if the wrapper or the tooltip itself is clicked.
109547
+ const isHovered = target.matches(':hover') || tooltipRef.current?.matches(':hover');
109548
+ if (target === wrapperRef.current && isHovered) {
109549
+ e.stopPropagation();
109523
109550
  return;
109524
109551
  }
109525
- const hideHoveredTooltip = e => {
109526
- const isFocused = document.activeElement === wrapperRef.current || document.activeElement.closest('.bio-properties-panel-tooltip');
109527
- if (visible && !isTooltipHovered({
109528
- x: e.x,
109529
- y: e.y
109530
- }) && !(isFocused && focusedViaKeyboard)) {
109531
- hideTooltip();
109532
- }
109533
- };
109534
- const hideFocusedTooltip = e => {
109535
- const {
109536
- relatedTarget
109537
- } = e;
109538
- const isTooltipChild = el => !!el.closest('.bio-properties-panel-tooltip');
109539
- if (visible && !isHovered(wrapperRef.current) && relatedTarget && !isTooltipChild(relatedTarget)) {
109540
- hideTooltip();
109541
- }
109542
- };
109543
- document.addEventListener('wheel', hideHoveredTooltip);
109544
- document.addEventListener('focusout', hideFocusedTooltip);
109545
- document.addEventListener('mousemove', hideHoveredTooltip);
109546
- return () => {
109547
- document.removeEventListener('wheel', hideHoveredTooltip);
109548
- document.removeEventListener('mousemove', hideHoveredTooltip);
109549
- document.removeEventListener('focusout', hideFocusedTooltip);
109550
- };
109551
- }, [wrapperRef.current, visible, focusedViaKeyboard]);
109552
+ hide();
109553
+ };
109554
+ const hideTooltipViaEscape = e => {
109555
+ e.code === 'Escape' && hide();
109556
+ };
109552
109557
  const renderTooltip = () => {
109553
109558
  return u("div", {
109554
109559
  class: `bio-properties-panel-tooltip ${direction}`,
@@ -109558,6 +109563,7 @@
109558
109563
  style: position || getTooltipPosition(wrapperRef.current),
109559
109564
  ref: tooltipRef,
109560
109565
  onClick: e => e.stopPropagation(),
109566
+ onMouseLeave: handleMouseLeave,
109561
109567
  children: [u("div", {
109562
109568
  class: "bio-properties-panel-tooltip-content",
109563
109569
  children: value
@@ -109570,54 +109576,38 @@
109570
109576
  class: "bio-properties-panel-tooltip-wrapper",
109571
109577
  tabIndex: "0",
109572
109578
  ref: wrapperRef,
109573
- onMouseEnter: showTooltip,
109574
- onMouseLeave: () => {
109575
- clearTimeout(timeout);
109576
- timeout = null;
109577
- },
109578
- onFocus: showTooltip,
109579
+ onMouseEnter: e => show(e, true),
109580
+ onMouseLeave: handleMouseLeave,
109581
+ onFocus: show,
109582
+ onBlur: handleFocusOut,
109579
109583
  onKeyDown: hideTooltipViaEscape,
109580
109584
  children: [props.children, visible ? parent ? j(renderTooltip(), parent.current) : renderTooltip() : null]
109581
109585
  });
109582
109586
  }
109583
109587
 
109584
109588
  // helper
109585
- function inBounds(x, y, bounds) {
109586
- const {
109587
- top,
109588
- right,
109589
- bottom,
109590
- left
109591
- } = bounds;
109592
- return x >= left && x <= right && y >= top && y <= bottom;
109593
- }
109589
+
109594
109590
  function getTooltipPosition(refElement) {
109595
109591
  const refPosition = refElement.getBoundingClientRect();
109596
109592
  const right = `calc(100% - ${refPosition.x}px)`;
109597
109593
  const top = `${refPosition.top - 10}px`;
109598
109594
  return `right: ${right}; top: ${top};`;
109599
109595
  }
109600
- function isHovered(element) {
109601
- return element.matches(':hover');
109602
- }
109603
- function prefixId$9(id) {
109604
- return `bio-properties-panel-${id}`;
109605
- }
109606
109596
 
109607
- /**
109608
- * Accesses the global DescriptionContext and returns a description for a given id and element.
109609
- *
109610
- * @example
109611
- * ```jsx
109612
- * function TextField(props) {
109613
- * const description = useDescriptionContext('input1', element);
109614
- * }
109615
- * ```
109616
- *
109617
- * @param {string} id
109618
- * @param {object} element
109619
- *
109620
- * @returns {string}
109597
+ /**
109598
+ * Accesses the global DescriptionContext and returns a description for a given id and element.
109599
+ *
109600
+ * @example
109601
+ * ```jsx
109602
+ * function TextField(props) {
109603
+ * const description = useDescriptionContext('input1', element);
109604
+ * }
109605
+ * ```
109606
+ *
109607
+ * @param {string} id
109608
+ * @param {object} element
109609
+ *
109610
+ * @returns {string}
109621
109611
  */
109622
109612
  function useDescriptionContext(id, element) {
109623
109613
  const {
@@ -109639,11 +109629,11 @@
109639
109629
  return errors;
109640
109630
  }
109641
109631
 
109642
- /**
109643
- * Subscribe to an event immediately. Update subscription after inputs changed.
109644
- *
109645
- * @param {string} event
109646
- * @param {Function} callback
109632
+ /**
109633
+ * Subscribe to an event immediately. Update subscription after inputs changed.
109634
+ *
109635
+ * @param {string} event
109636
+ * @param {Function} callback
109647
109637
  */
109648
109638
  function useEvent(event, callback, eventBus) {
109649
109639
  const eventContext = q$1(EventContext);
@@ -109673,20 +109663,20 @@
109673
109663
  }, [callback, event, eventBus]);
109674
109664
  }
109675
109665
 
109676
- /**
109677
- * Creates a state that persists in the global LayoutContext.
109678
- *
109679
- * @example
109680
- * ```jsx
109681
- * function Group(props) {
109682
- * const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
109683
- * }
109684
- * ```
109685
- *
109686
- * @param {(string|number)[]} path
109687
- * @param {any} [defaultValue]
109688
- *
109689
- * @returns {[ any, Function ]}
109666
+ /**
109667
+ * Creates a state that persists in the global LayoutContext.
109668
+ *
109669
+ * @example
109670
+ * ```jsx
109671
+ * function Group(props) {
109672
+ * const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
109673
+ * }
109674
+ * ```
109675
+ *
109676
+ * @param {(string|number)[]} path
109677
+ * @param {any} [defaultValue]
109678
+ *
109679
+ * @returns {[ any, Function ]}
109690
109680
  */
109691
109681
  function useLayoutState(path, defaultValue) {
109692
109682
  const {
@@ -109700,11 +109690,11 @@
109700
109690
  return [layoutForKey, setState];
109701
109691
  }
109702
109692
 
109703
- /**
109704
- * @pinussilvestrus: we need to introduce our own hook to persist the previous
109705
- * state on updates.
109706
- *
109707
- * cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
109693
+ /**
109694
+ * @pinussilvestrus: we need to introduce our own hook to persist the previous
109695
+ * state on updates.
109696
+ *
109697
+ * cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
109708
109698
  */
109709
109699
 
109710
109700
  function usePrevious$1(value) {
@@ -109715,12 +109705,12 @@
109715
109705
  return ref.current;
109716
109706
  }
109717
109707
 
109718
- /**
109719
- * Subscribe to `propertiesPanel.showEntry`.
109720
- *
109721
- * @param {string} id
109722
- *
109723
- * @returns {import('preact').Ref}
109708
+ /**
109709
+ * Subscribe to `propertiesPanel.showEntry`.
109710
+ *
109711
+ * @param {string} id
109712
+ *
109713
+ * @returns {import('preact').Ref}
109724
109714
  */
109725
109715
  function useShowEntryEvent(id) {
109726
109716
  const {
@@ -109751,20 +109741,20 @@
109751
109741
  return ref;
109752
109742
  }
109753
109743
 
109754
- /**
109755
- * @callback setSticky
109756
- * @param {boolean} value
109744
+ /**
109745
+ * @callback setSticky
109746
+ * @param {boolean} value
109757
109747
  */
109758
109748
 
109759
- /**
109760
- * Use IntersectionObserver to identify when DOM element is in sticky mode.
109761
- * If sticky is observered setSticky(true) will be called.
109762
- * If sticky mode is left, setSticky(false) will be called.
109763
- *
109764
- *
109765
- * @param {Object} ref
109766
- * @param {string} scrollContainerSelector
109767
- * @param {setSticky} setSticky
109749
+ /**
109750
+ * Use IntersectionObserver to identify when DOM element is in sticky mode.
109751
+ * If sticky is observered setSticky(true) will be called.
109752
+ * If sticky mode is left, setSticky(false) will be called.
109753
+ *
109754
+ *
109755
+ * @param {Object} ref
109756
+ * @param {string} scrollContainerSelector
109757
+ * @param {setSticky} setSticky
109768
109758
  */
109769
109759
  function useStickyIntersectionObserver(ref, scrollContainerSelector, setSticky) {
109770
109760
  const [scrollContainer, setScrollContainer] = h(query$1(scrollContainerSelector));
@@ -109818,19 +109808,19 @@
109818
109808
  }, [ref.current, scrollContainer, setSticky]);
109819
109809
  }
109820
109810
 
109821
- /**
109822
- * Creates a static function reference with changing body.
109823
- * This is necessary when external libraries require a callback function
109824
- * that has references to state variables.
109825
- *
109826
- * Usage:
109827
- * const callback = useStaticCallback((val) => {val === currentState});
109828
- *
109829
- * The `callback` reference is static and can be safely used in external
109830
- * libraries or as a prop that does not cause rerendering of children.
109831
- *
109832
- * @param {Function} callback function with changing reference
109833
- * @returns {Function} static function reference
109811
+ /**
109812
+ * Creates a static function reference with changing body.
109813
+ * This is necessary when external libraries require a callback function
109814
+ * that has references to state variables.
109815
+ *
109816
+ * Usage:
109817
+ * const callback = useStaticCallback((val) => {val === currentState});
109818
+ *
109819
+ * The `callback` reference is static and can be safely used in external
109820
+ * libraries or as a prop that does not cause rerendering of children.
109821
+ *
109822
+ * @param {Function} callback function with changing reference
109823
+ * @returns {Function} static function reference
109834
109824
  */
109835
109825
  function useStaticCallback(callback) {
109836
109826
  const callbackRef = _$1(callback);
@@ -109973,13 +109963,13 @@
109973
109963
  return null;
109974
109964
  }
109975
109965
 
109976
- /**
109977
- * @typedef { {
109978
- * text: (element: object) => string,
109979
- * icon?: (element: Object) => import('preact').Component
109980
- * } } PlaceholderDefinition
109981
- *
109982
- * @param { PlaceholderDefinition } props
109966
+ /**
109967
+ * @typedef { {
109968
+ * text: (element: object) => string,
109969
+ * icon?: (element: Object) => import('preact').Component
109970
+ * } } PlaceholderDefinition
109971
+ *
109972
+ * @param { PlaceholderDefinition } props
109983
109973
  */
109984
109974
  function Placeholder(props) {
109985
109975
  const {
@@ -110018,9 +110008,9 @@
110018
110008
 
110019
110009
  const noop$6 = () => {};
110020
110010
 
110021
- /**
110022
- * Buffer `.focus()` calls while the editor is not initialized.
110023
- * Set Focus inside when the editor is ready.
110011
+ /**
110012
+ * Buffer `.focus()` calls while the editor is not initialized.
110013
+ * Set Focus inside when the editor is ready.
110024
110014
  */
110025
110015
  const useBufferedFocus$1 = function (editor, ref) {
110026
110016
  const [buffer, setBuffer] = h(undefined);
@@ -110121,9 +110111,9 @@
110121
110111
 
110122
110112
  const noop$5 = () => {};
110123
110113
 
110124
- /**
110125
- * Buffer `.focus()` calls while the editor is not initialized.
110126
- * Set Focus inside when the editor is ready.
110114
+ /**
110115
+ * Buffer `.focus()` calls while the editor is not initialized.
110116
+ * Set Focus inside when the editor is ready.
110127
110117
  */
110128
110118
  const useBufferedFocus = function (editor, ref) {
110129
110119
  const [buffer, setBuffer] = h(undefined);
@@ -110172,10 +110162,10 @@
110172
110162
  p$1(() => {
110173
110163
  let editor;
110174
110164
 
110175
- /* Trigger FEEL toggle when
110176
- *
110177
- * - `backspace` is pressed
110178
- * - AND the cursor is at the beginning of the input
110165
+ /* Trigger FEEL toggle when
110166
+ *
110167
+ * - `backspace` is pressed
110168
+ * - AND the cursor is at the beginning of the input
110179
110169
  */
110180
110170
  const onKeyDown = e => {
110181
110171
  if (e.key !== 'Backspace' || !editor) {
@@ -110266,10 +110256,10 @@
110266
110256
 
110267
110257
  const noop$4 = () => {};
110268
110258
 
110269
- /**
110270
- * @param {Object} props
110271
- * @param {Object} props.label
110272
- * @param {String} props.feel
110259
+ /**
110260
+ * @param {Object} props
110261
+ * @param {Object} props.label
110262
+ * @param {String} props.feel
110273
110263
  */
110274
110264
  function FeelIcon(props) {
110275
110265
  const {
@@ -110304,22 +110294,22 @@
110304
110294
  source: null
110305
110295
  });
110306
110296
 
110307
- /**
110308
- * Add a dragger that calls back the passed function with
110309
- * { event, delta } on drag.
110310
- *
110311
- * @example
110312
- *
110313
- * function dragMove(event, delta) {
110314
- * // we are dragging (!!)
110315
- * }
110316
- *
110317
- * domElement.addEventListener('dragstart', dragger(dragMove));
110318
- *
110319
- * @param {Function} fn
110320
- * @param {Element} [dragPreview]
110321
- *
110322
- * @return {Function} drag start callback function
110297
+ /**
110298
+ * Add a dragger that calls back the passed function with
110299
+ * { event, delta } on drag.
110300
+ *
110301
+ * @example
110302
+ *
110303
+ * function dragMove(event, delta) {
110304
+ * // we are dragging (!!)
110305
+ * }
110306
+ *
110307
+ * domElement.addEventListener('dragstart', dragger(dragMove));
110308
+ *
110309
+ * @param {Function} fn
110310
+ * @param {Element} [dragPreview]
110311
+ *
110312
+ * @return {Function} drag start callback function
110323
110313
  */
110324
110314
  function createDragger(fn, dragPreview) {
110325
110315
  let self;
@@ -110374,23 +110364,23 @@
110374
110364
 
110375
110365
  const noop$3 = () => {};
110376
110366
 
110377
- /**
110378
- * A generic popup component.
110379
- *
110380
- * @param {Object} props
110381
- * @param {HTMLElement} [props.container]
110382
- * @param {string} [props.className]
110383
- * @param {boolean} [props.delayInitialFocus]
110384
- * @param {{x: number, y: number}} [props.position]
110385
- * @param {number} [props.width]
110386
- * @param {number} [props.height]
110387
- * @param {Function} props.onClose
110388
- * @param {Function} [props.onPostActivate]
110389
- * @param {Function} [props.onPostDeactivate]
110390
- * @param {boolean} [props.returnFocus]
110391
- * @param {boolean} [props.closeOnEscape]
110392
- * @param {string} props.title
110393
- * @param {Ref} [ref]
110367
+ /**
110368
+ * A generic popup component.
110369
+ *
110370
+ * @param {Object} props
110371
+ * @param {HTMLElement} [props.container]
110372
+ * @param {string} [props.className]
110373
+ * @param {boolean} [props.delayInitialFocus]
110374
+ * @param {{x: number, y: number}} [props.position]
110375
+ * @param {number} [props.width]
110376
+ * @param {number} [props.height]
110377
+ * @param {Function} props.onClose
110378
+ * @param {Function} [props.onPostActivate]
110379
+ * @param {Function} [props.onPostDeactivate]
110380
+ * @param {boolean} [props.returnFocus]
110381
+ * @param {boolean} [props.closeOnEscape]
110382
+ * @param {string} props.title
110383
+ * @param {Ref} [ref]
110394
110384
  */
110395
110385
  function PopupComponent(props, globalRef) {
110396
110386
  const {
@@ -110609,12 +110599,12 @@
110609
110599
  const FEEL_POPUP_WIDTH = 700;
110610
110600
  const FEEL_POPUP_HEIGHT = 250;
110611
110601
 
110612
- /**
110613
- * FEEL popup component, built as a singleton. Emits lifecycle events as follows:
110614
- * - `feelPopup.open` - fired before the popup is mounted
110615
- * - `feelPopup.opened` - fired after the popup is mounted. Event context contains the DOM node of the popup
110616
- * - `feelPopup.close` - fired before the popup is unmounted. Event context contains the DOM node of the popup
110617
- * - `feelPopup.closed` - fired after the popup is unmounted
110602
+ /**
110603
+ * FEEL popup component, built as a singleton. Emits lifecycle events as follows:
110604
+ * - `feelPopup.open` - fired before the popup is mounted
110605
+ * - `feelPopup.opened` - fired after the popup is mounted. Event context contains the DOM node of the popup
110606
+ * - `feelPopup.close` - fired before the popup is unmounted. Event context contains the DOM node of the popup
110607
+ * - `feelPopup.closed` - fired after the popup is unmounted
110618
110608
  */
110619
110609
  function FEELPopupRoot(props) {
110620
110610
  const {
@@ -110840,11 +110830,11 @@
110840
110830
  return element.closest('.cm-editor').querySelector('.cm-tooltip-autocomplete');
110841
110831
  }
110842
110832
 
110843
- /**
110844
- * This hook behaves like useEffect, but does not trigger on the first render.
110845
- *
110846
- * @param {Function} effect
110847
- * @param {Array} deps
110833
+ /**
110834
+ * This hook behaves like useEffect, but does not trigger on the first render.
110835
+ *
110836
+ * @param {Function} effect
110837
+ * @param {Array} deps
110848
110838
  */
110849
110839
  function useUpdateEffect(effect, deps) {
110850
110840
  const isMounted = _$1(false);
@@ -110922,19 +110912,19 @@
110922
110912
  });
110923
110913
  }
110924
110914
 
110925
- /**
110926
- * @param {Object} props
110927
- * @param {Object} props.element
110928
- * @param {String} props.id
110929
- * @param {String} props.description
110930
- * @param {String} props.label
110931
- * @param {String} props.switcherLabel
110932
- * @param {Boolean} props.inline
110933
- * @param {Function} props.getValue
110934
- * @param {Function} props.setValue
110935
- * @param {Function} props.onFocus
110936
- * @param {Function} props.onBlur
110937
- * @param {string|import('preact').Component} props.tooltip
110915
+ /**
110916
+ * @param {Object} props
110917
+ * @param {Object} props.element
110918
+ * @param {String} props.id
110919
+ * @param {String} props.description
110920
+ * @param {String} props.label
110921
+ * @param {String} props.switcherLabel
110922
+ * @param {Boolean} props.inline
110923
+ * @param {Function} props.getValue
110924
+ * @param {Function} props.setValue
110925
+ * @param {Function} props.onFocus
110926
+ * @param {Function} props.onBlur
110927
+ * @param {string|import('preact').Component} props.tooltip
110938
110928
  */
110939
110929
  function ToggleSwitchEntry(props) {
110940
110930
  const {
@@ -111042,22 +111032,22 @@
111042
111032
  });
111043
111033
  }
111044
111034
 
111045
- /**
111046
- * @param {Object} props
111047
- * @param {Boolean} props.debounce
111048
- * @param {String} props.description
111049
- * @param {Boolean} props.disabled
111050
- * @param {Object} props.element
111051
- * @param {Function} props.getValue
111052
- * @param {String} props.id
111053
- * @param {String} props.label
111054
- * @param {String} props.max
111055
- * @param {String} props.min
111056
- * @param {Function} props.setValue
111057
- * @param {Function} props.onFocus
111058
- * @param {Function} props.onBlur
111059
- * @param {String} props.step
111060
- * @param {Function} props.validate
111035
+ /**
111036
+ * @param {Object} props
111037
+ * @param {Boolean} props.debounce
111038
+ * @param {String} props.description
111039
+ * @param {Boolean} props.disabled
111040
+ * @param {Object} props.element
111041
+ * @param {Function} props.getValue
111042
+ * @param {String} props.id
111043
+ * @param {String} props.label
111044
+ * @param {String} props.max
111045
+ * @param {String} props.min
111046
+ * @param {Function} props.setValue
111047
+ * @param {Function} props.onFocus
111048
+ * @param {Function} props.onBlur
111049
+ * @param {String} props.step
111050
+ * @param {Function} props.validate
111061
111051
  */
111062
111052
  function NumberFieldEntry(props) {
111063
111053
  const {
@@ -111543,26 +111533,26 @@
111543
111533
  });
111544
111534
  });
111545
111535
 
111546
- /**
111547
- * @param {Object} props
111548
- * @param {Object} props.element
111549
- * @param {String} props.id
111550
- * @param {String} props.description
111551
- * @param {Boolean} props.debounce
111552
- * @param {Boolean} props.disabled
111553
- * @param {Boolean} props.feel
111554
- * @param {String} props.label
111555
- * @param {Function} props.getValue
111556
- * @param {Function} props.setValue
111557
- * @param {Function} props.tooltipContainer
111558
- * @param {Function} props.validate
111559
- * @param {Function} props.show
111560
- * @param {Function} props.example
111561
- * @param {Function} props.variables
111562
- * @param {Function} props.onFocus
111563
- * @param {Function} props.onBlur
111564
- * @param {string} [props.placeholder]
111565
- * @param {string|import('preact').Component} props.tooltip
111536
+ /**
111537
+ * @param {Object} props
111538
+ * @param {Object} props.element
111539
+ * @param {String} props.id
111540
+ * @param {String} props.description
111541
+ * @param {Boolean} props.debounce
111542
+ * @param {Boolean} props.disabled
111543
+ * @param {Boolean} props.feel
111544
+ * @param {String} props.label
111545
+ * @param {Function} props.getValue
111546
+ * @param {Function} props.setValue
111547
+ * @param {Function} props.tooltipContainer
111548
+ * @param {Function} props.validate
111549
+ * @param {Function} props.show
111550
+ * @param {Function} props.example
111551
+ * @param {Function} props.variables
111552
+ * @param {Function} props.onFocus
111553
+ * @param {Function} props.onBlur
111554
+ * @param {string} [props.placeholder]
111555
+ * @param {string|import('preact').Component} props.tooltip
111566
111556
  */
111567
111557
  function FeelEntry$2(props) {
111568
111558
  const {
@@ -111649,27 +111639,27 @@
111649
111639
  });
111650
111640
  }
111651
111641
 
111652
- /**
111653
- * @param {Object} props
111654
- * @param {Object} props.element
111655
- * @param {String} props.id
111656
- * @param {String} props.description
111657
- * @param {Boolean} props.debounce
111658
- * @param {Boolean} props.disabled
111659
- * @param {String} props.max
111660
- * @param {String} props.min
111661
- * @param {String} props.step
111662
- * @param {Boolean} props.feel
111663
- * @param {String} props.label
111664
- * @param {Function} props.getValue
111665
- * @param {Function} props.setValue
111666
- * @param {Function} props.tooltipContainer
111667
- * @param {Function} props.validate
111668
- * @param {Function} props.show
111669
- * @param {Function} props.example
111670
- * @param {Function} props.variables
111671
- * @param {Function} props.onFocus
111672
- * @param {Function} props.onBlur
111642
+ /**
111643
+ * @param {Object} props
111644
+ * @param {Object} props.element
111645
+ * @param {String} props.id
111646
+ * @param {String} props.description
111647
+ * @param {Boolean} props.debounce
111648
+ * @param {Boolean} props.disabled
111649
+ * @param {String} props.max
111650
+ * @param {String} props.min
111651
+ * @param {String} props.step
111652
+ * @param {Boolean} props.feel
111653
+ * @param {String} props.label
111654
+ * @param {Function} props.getValue
111655
+ * @param {Function} props.setValue
111656
+ * @param {Function} props.tooltipContainer
111657
+ * @param {Function} props.validate
111658
+ * @param {Function} props.show
111659
+ * @param {Function} props.example
111660
+ * @param {Function} props.variables
111661
+ * @param {Function} props.onFocus
111662
+ * @param {Function} props.onBlur
111673
111663
  */
111674
111664
  function FeelNumberEntry(props) {
111675
111665
  return u(FeelEntry$2, {
@@ -111679,25 +111669,25 @@
111679
111669
  });
111680
111670
  }
111681
111671
 
111682
- /**
111683
- * @param {Object} props
111684
- * @param {Object} props.element
111685
- * @param {String} props.id
111686
- * @param {String} props.description
111687
- * @param {Boolean} props.debounce
111688
- * @param {Boolean} props.disabled
111689
- * @param {Boolean} props.feel
111690
- * @param {String} props.label
111691
- * @param {Function} props.getValue
111692
- * @param {Function} props.setValue
111693
- * @param {Function} props.tooltipContainer
111694
- * @param {Function} props.validate
111695
- * @param {Function} props.show
111696
- * @param {Function} props.example
111697
- * @param {Function} props.variables
111698
- * @param {Function} props.onFocus
111699
- * @param {Function} props.onBlur
111700
- * @param {string} [props.placeholder]
111672
+ /**
111673
+ * @param {Object} props
111674
+ * @param {Object} props.element
111675
+ * @param {String} props.id
111676
+ * @param {String} props.description
111677
+ * @param {Boolean} props.debounce
111678
+ * @param {Boolean} props.disabled
111679
+ * @param {Boolean} props.feel
111680
+ * @param {String} props.label
111681
+ * @param {Function} props.getValue
111682
+ * @param {Function} props.setValue
111683
+ * @param {Function} props.tooltipContainer
111684
+ * @param {Function} props.validate
111685
+ * @param {Function} props.show
111686
+ * @param {Function} props.example
111687
+ * @param {Function} props.variables
111688
+ * @param {Function} props.onFocus
111689
+ * @param {Function} props.onBlur
111690
+ * @param {string} [props.placeholder]
111701
111691
  */
111702
111692
  function FeelTextAreaEntry$1(props) {
111703
111693
  return u(FeelEntry$2, {
@@ -111707,24 +111697,24 @@
111707
111697
  });
111708
111698
  }
111709
111699
 
111710
- /**
111711
- * @param {Object} props
111712
- * @param {Object} props.element
111713
- * @param {String} props.id
111714
- * @param {String} props.description
111715
- * @param {Boolean} props.debounce
111716
- * @param {Boolean} props.disabled
111717
- * @param {Boolean} props.feel
111718
- * @param {String} props.label
111719
- * @param {Function} props.getValue
111720
- * @param {Function} props.setValue
111721
- * @param {Function} props.tooltipContainer
111722
- * @param {Function} props.validate
111723
- * @param {Function} props.show
111724
- * @param {Function} props.example
111725
- * @param {Function} props.variables
111726
- * @param {Function} props.onFocus
111727
- * @param {Function} props.onBlur
111700
+ /**
111701
+ * @param {Object} props
111702
+ * @param {Object} props.element
111703
+ * @param {String} props.id
111704
+ * @param {String} props.description
111705
+ * @param {Boolean} props.debounce
111706
+ * @param {Boolean} props.disabled
111707
+ * @param {Boolean} props.feel
111708
+ * @param {String} props.label
111709
+ * @param {Function} props.getValue
111710
+ * @param {Function} props.setValue
111711
+ * @param {Function} props.tooltipContainer
111712
+ * @param {Function} props.validate
111713
+ * @param {Function} props.show
111714
+ * @param {Function} props.example
111715
+ * @param {Function} props.variables
111716
+ * @param {Function} props.onFocus
111717
+ * @param {Function} props.onBlur
111728
111718
  */
111729
111719
  function FeelCheckboxEntry(props) {
111730
111720
  return u(FeelEntry$2, {
@@ -111793,85 +111783,85 @@
111793
111783
  const DEFAULT_DESCRIPTION = {};
111794
111784
  const DEFAULT_TOOLTIP = {};
111795
111785
 
111796
- /**
111797
- * @typedef { {
111798
- * component: import('preact').Component,
111799
- * id: String,
111800
- * isEdited?: Function
111801
- * } } EntryDefinition
111802
- *
111803
- * @typedef { {
111804
- * autoFocusEntry: String,
111805
- * autoOpen?: Boolean,
111806
- * entries: Array<EntryDefinition>,
111807
- * id: String,
111808
- * label: String,
111809
- * remove: (event: MouseEvent) => void
111810
- * } } ListItemDefinition
111811
- *
111812
- * @typedef { {
111813
- * add: (event: MouseEvent) => void,
111814
- * component: import('preact').Component,
111815
- * element: Object,
111816
- * id: String,
111817
- * items: Array<ListItemDefinition>,
111818
- * label: String,
111819
- * shouldOpen?: Boolean
111820
- * } } ListGroupDefinition
111821
- *
111822
- * @typedef { {
111823
- * component?: import('preact').Component,
111824
- * entries: Array<EntryDefinition>,
111825
- * id: String,
111826
- * label: String,
111827
- * shouldOpen?: Boolean
111828
- * } } GroupDefinition
111829
- *
111830
- * @typedef { {
111831
- * [id: String]: GetDescriptionFunction
111832
- * } } DescriptionConfig
111833
- *
111834
- * @typedef { {
111835
- * [id: String]: GetTooltipFunction
111836
- * } } TooltipConfig
111837
- *
111838
- * @callback { {
111839
- * @param {string} id
111840
- * @param {Object} element
111841
- * @returns {string}
111842
- * } } GetDescriptionFunction
111843
- *
111844
- * @callback { {
111845
- * @param {string} id
111846
- * @param {Object} element
111847
- * @returns {string}
111848
- * } } GetTooltipFunction
111849
- *
111850
- * @typedef { {
111851
- * getEmpty: (element: object) => import('./components/Placeholder').PlaceholderDefinition,
111852
- * getMultiple: (element: Object) => import('./components/Placeholder').PlaceholderDefinition
111853
- * } } PlaceholderProvider
111854
- *
111786
+ /**
111787
+ * @typedef { {
111788
+ * component: import('preact').Component,
111789
+ * id: String,
111790
+ * isEdited?: Function
111791
+ * } } EntryDefinition
111792
+ *
111793
+ * @typedef { {
111794
+ * autoFocusEntry: String,
111795
+ * autoOpen?: Boolean,
111796
+ * entries: Array<EntryDefinition>,
111797
+ * id: String,
111798
+ * label: String,
111799
+ * remove: (event: MouseEvent) => void
111800
+ * } } ListItemDefinition
111801
+ *
111802
+ * @typedef { {
111803
+ * add: (event: MouseEvent) => void,
111804
+ * component: import('preact').Component,
111805
+ * element: Object,
111806
+ * id: String,
111807
+ * items: Array<ListItemDefinition>,
111808
+ * label: String,
111809
+ * shouldOpen?: Boolean
111810
+ * } } ListGroupDefinition
111811
+ *
111812
+ * @typedef { {
111813
+ * component?: import('preact').Component,
111814
+ * entries: Array<EntryDefinition>,
111815
+ * id: String,
111816
+ * label: String,
111817
+ * shouldOpen?: Boolean
111818
+ * } } GroupDefinition
111819
+ *
111820
+ * @typedef { {
111821
+ * [id: String]: GetDescriptionFunction
111822
+ * } } DescriptionConfig
111823
+ *
111824
+ * @typedef { {
111825
+ * [id: String]: GetTooltipFunction
111826
+ * } } TooltipConfig
111827
+ *
111828
+ * @callback { {
111829
+ * @param {string} id
111830
+ * @param {Object} element
111831
+ * @returns {string}
111832
+ * } } GetDescriptionFunction
111833
+ *
111834
+ * @callback { {
111835
+ * @param {string} id
111836
+ * @param {Object} element
111837
+ * @returns {string}
111838
+ * } } GetTooltipFunction
111839
+ *
111840
+ * @typedef { {
111841
+ * getEmpty: (element: object) => import('./components/Placeholder').PlaceholderDefinition,
111842
+ * getMultiple: (element: Object) => import('./components/Placeholder').PlaceholderDefinition
111843
+ * } } PlaceholderProvider
111844
+ *
111855
111845
  */
111856
111846
 
111857
- /**
111858
- * A basic properties panel component. Describes *how* content will be rendered, accepts
111859
- * data from implementor to describe *what* will be rendered.
111860
- *
111861
- * @param {Object} props
111862
- * @param {Object|Array} props.element
111863
- * @param {import('./components/Header').HeaderProvider} props.headerProvider
111864
- * @param {PlaceholderProvider} [props.placeholderProvider]
111865
- * @param {Array<GroupDefinition|ListGroupDefinition>} props.groups
111866
- * @param {Object} [props.layoutConfig]
111867
- * @param {Function} [props.layoutChanged]
111868
- * @param {DescriptionConfig} [props.descriptionConfig]
111869
- * @param {Function} [props.descriptionLoaded]
111870
- * @param {TooltipConfig} [props.tooltipConfig]
111871
- * @param {Function} [props.tooltipLoaded]
111872
- * @param {HTMLElement} [props.feelPopupContainer]
111873
- * @param {Function} [props.getFeelPopupLinks]
111874
- * @param {Object} [props.eventBus]
111847
+ /**
111848
+ * A basic properties panel component. Describes *how* content will be rendered, accepts
111849
+ * data from implementor to describe *what* will be rendered.
111850
+ *
111851
+ * @param {Object} props
111852
+ * @param {Object|Array} props.element
111853
+ * @param {import('./components/Header').HeaderProvider} props.headerProvider
111854
+ * @param {PlaceholderProvider} [props.placeholderProvider]
111855
+ * @param {Array<GroupDefinition|ListGroupDefinition>} props.groups
111856
+ * @param {Object} [props.layoutConfig]
111857
+ * @param {Function} [props.layoutChanged]
111858
+ * @param {DescriptionConfig} [props.descriptionConfig]
111859
+ * @param {Function} [props.descriptionLoaded]
111860
+ * @param {TooltipConfig} [props.tooltipConfig]
111861
+ * @param {Function} [props.tooltipLoaded]
111862
+ * @param {HTMLElement} [props.feelPopupContainer]
111863
+ * @param {Function} [props.getFeelPopupLinks]
111864
+ * @param {Object} [props.eventBus]
111875
111865
  */
111876
111866
  function PropertiesPanel(props) {
111877
111867
  const {
@@ -112044,11 +112034,11 @@
112044
112034
 
112045
112035
  // hooks //////////////////
112046
112036
 
112047
- /**
112048
- * This hook behaves like useLayoutEffect, but does not trigger on the first render.
112049
- *
112050
- * @param {Function} effect
112051
- * @param {Array} deps
112037
+ /**
112038
+ * This hook behaves like useLayoutEffect, but does not trigger on the first render.
112039
+ *
112040
+ * @param {Function} effect
112041
+ * @param {Array} deps
112052
112042
  */
112053
112043
  function useUpdateLayoutEffect(effect, deps) {
112054
112044
  const isMounted = _$1(false);
@@ -112123,15 +112113,15 @@
112123
112113
  });
112124
112114
  }
112125
112115
 
112126
- /**
112127
- *
112128
- * @param {Array<null | Element>} ignoredElements
112129
- * @param {Function} callback
112116
+ /**
112117
+ *
112118
+ * @param {Array<null | Element>} ignoredElements
112119
+ * @param {Function} callback
112130
112120
  */
112131
112121
  function useGlobalClick(ignoredElements, callback) {
112132
112122
  p$1(() => {
112133
- /**
112134
- * @param {MouseEvent} event
112123
+ /**
112124
+ * @param {MouseEvent} event
112135
112125
  */
112136
112126
  function listener(event) {
112137
112127
  if (ignoredElements.some(element => element && element.contains(event.target))) {
@@ -112164,20 +112154,20 @@
112164
112154
  });
112165
112155
  }
112166
112156
 
112167
- /**
112168
- * @typedef { {
112169
- * [key: string]: string;
112170
- * } } TranslateReplacements
112157
+ /**
112158
+ * @typedef { {
112159
+ * [key: string]: string;
112160
+ * } } TranslateReplacements
112171
112161
  */
112172
112162
 
112173
- /**
112174
- * A simple translation stub to be used for multi-language support.
112175
- * Can be easily replaced with a more sophisticated solution.
112176
- *
112177
- * @param {string} template to interpolate
112178
- * @param {TranslateReplacements} [replacements] a map with substitutes
112179
- *
112180
- * @return {string} the translated string
112163
+ /**
112164
+ * A simple translation stub to be used for multi-language support.
112165
+ * Can be easily replaced with a more sophisticated solution.
112166
+ *
112167
+ * @param {string} template to interpolate
112168
+ * @param {TranslateReplacements} [replacements] a map with substitutes
112169
+ *
112170
+ * @return {string} the translated string
112181
112171
  */
112182
112172
  function translateFallback(template, replacements) {
112183
112173
  replacements = replacements || {};
@@ -112289,8 +112279,8 @@
112289
112279
 
112290
112280
  const noop$1$1 = () => {};
112291
112281
 
112292
- /**
112293
- * @param {import('../PropertiesPanel').ListGroupDefinition} props
112282
+ /**
112283
+ * @param {import('../PropertiesPanel').ListGroupDefinition} props
112294
112284
  */
112295
112285
  function ListGroup(props) {
112296
112286
  const {
@@ -112482,18 +112472,18 @@
112482
112472
  });
112483
112473
  }
112484
112474
 
112485
- /**
112486
- * @param {Object} props
112487
- * @param {Object} props.element
112488
- * @param {String} props.id
112489
- * @param {String} props.description
112490
- * @param {String} props.label
112491
- * @param {Function} props.getValue
112492
- * @param {Function} props.setValue
112493
- * @param {Function} props.onFocus
112494
- * @param {Function} props.onBlur
112495
- * @param {string|import('preact').Component} props.tooltip
112496
- * @param {boolean} [props.disabled]
112475
+ /**
112476
+ * @param {Object} props
112477
+ * @param {Object} props.element
112478
+ * @param {String} props.id
112479
+ * @param {String} props.description
112480
+ * @param {String} props.label
112481
+ * @param {Function} props.getValue
112482
+ * @param {Function} props.setValue
112483
+ * @param {Function} props.onFocus
112484
+ * @param {Function} props.onBlur
112485
+ * @param {string|import('preact').Component} props.tooltip
112486
+ * @param {boolean} [props.disabled]
112497
112487
  */
112498
112488
  function CheckboxEntry(props) {
112499
112489
  const {
@@ -112614,20 +112604,20 @@
112614
112604
  });
112615
112605
  }
112616
112606
 
112617
- /**
112618
- * @param {object} props
112619
- * @param {object} props.element
112620
- * @param {string} props.id
112621
- * @param {string} [props.description]
112622
- * @param {string} props.label
112623
- * @param {Function} props.getValue
112624
- * @param {Function} props.setValue
112625
- * @param {Function} props.onFocus
112626
- * @param {Function} props.onBlur
112627
- * @param {Function} props.getOptions
112628
- * @param {boolean} [props.disabled]
112629
- * @param {Function} [props.validate]
112630
- * @param {string|import('preact').Component} props.tooltip
112607
+ /**
112608
+ * @param {object} props
112609
+ * @param {object} props.element
112610
+ * @param {string} props.id
112611
+ * @param {string} [props.description]
112612
+ * @param {string} props.label
112613
+ * @param {Function} props.getValue
112614
+ * @param {Function} props.setValue
112615
+ * @param {Function} props.onFocus
112616
+ * @param {Function} props.onBlur
112617
+ * @param {Function} props.getOptions
112618
+ * @param {boolean} [props.disabled]
112619
+ * @param {Function} [props.validate]
112620
+ * @param {string|import('preact').Component} props.tooltip
112631
112621
  */
112632
112622
  function SelectEntry(props) {
112633
112623
  const {
@@ -112920,20 +112910,20 @@
112920
112910
  });
112921
112911
  }
112922
112912
 
112923
- /**
112924
- * @param {Object} props
112925
- * @param {Object} props.element
112926
- * @param {String} props.id
112927
- * @param {String} props.description
112928
- * @param {Boolean} props.debounce
112929
- * @param {Boolean} props.disabled
112930
- * @param {String} props.label
112931
- * @param {Function} props.getValue
112932
- * @param {Function} props.setValue
112933
- * @param {Function} props.onFocus
112934
- * @param {Function} props.onBlur
112935
- * @param {string|import('preact').Component} props.tooltip
112936
- * @param {Function} props.validate
112913
+ /**
112914
+ * @param {Object} props
112915
+ * @param {Object} props.element
112916
+ * @param {String} props.id
112917
+ * @param {String} props.description
112918
+ * @param {Boolean} props.debounce
112919
+ * @param {Boolean} props.disabled
112920
+ * @param {String} props.label
112921
+ * @param {Function} props.getValue
112922
+ * @param {Function} props.setValue
112923
+ * @param {Function} props.onFocus
112924
+ * @param {Function} props.onBlur
112925
+ * @param {string|import('preact').Component} props.tooltip
112926
+ * @param {Function} props.validate
112937
112927
  */
112938
112928
  function TextfieldEntry(props) {
112939
112929
  const {
@@ -113026,20 +113016,20 @@
113026
113016
  this._eventBus = eventBus;
113027
113017
  }
113028
113018
 
113029
- /**
113030
- * Check if the FEEL popup is open.
113031
- * @return {Boolean}
113019
+ /**
113020
+ * Check if the FEEL popup is open.
113021
+ * @return {Boolean}
113032
113022
  */
113033
113023
  isOpen() {
113034
113024
  return this._eventBus.fire('feelPopup._isOpen');
113035
113025
  }
113036
113026
 
113037
- /**
113038
- * Open the FEEL popup.
113039
- *
113040
- * @param {String} entryId
113041
- * @param {Object} popupConfig
113042
- * @param {HTMLElement} sourceElement
113027
+ /**
113028
+ * Open the FEEL popup.
113029
+ *
113030
+ * @param {String} entryId
113031
+ * @param {Object} popupConfig
113032
+ * @param {HTMLElement} sourceElement
113043
113033
  */
113044
113034
  open(entryId, popupConfig, sourceElement) {
113045
113035
  return this._eventBus.fire('feelPopup._open', {
@@ -113049,8 +113039,8 @@
113049
113039
  });
113050
113040
  }
113051
113041
 
113052
- /**
113053
- * Close the FEEL popup.
113042
+ /**
113043
+ * Close the FEEL popup.
113054
113044
  */
113055
113045
  close() {
113056
113046
  return this._eventBus.fire('feelPopup._close');
@@ -121991,9 +121981,10 @@
121991
121981
  }
121992
121982
 
121993
121983
  // ensure types are in logical order
121994
- const EVENT_TYPE = ['assigning', 'completing'];
121984
+ const EVENT_TYPE = ['assigning', 'updating', 'completing'];
121995
121985
  const EVENT_TO_LABEL$1 = {
121996
121986
  assigning: 'Assigning',
121987
+ updating: 'Updating',
121997
121988
  completing: 'Completing'
121998
121989
  };
121999
121990
  function TaskListenerEntries(props) {
@@ -123886,6 +123877,22 @@
123886
123877
  children: translate('Learn more.')
123887
123878
  })]
123888
123879
  });
123880
+ },
123881
+ 'messageSubscriptionCorrelationKey': element => {
123882
+ const translate = useService$1('translate');
123883
+ return u("div", {
123884
+ children: u("p", {
123885
+ children: [translate('Identifier computed from the process context that is used to correlate an incoming message (e.g. '), u("code", {
123886
+ children: "= orderId"
123887
+ }), translate('). '), u("a", {
123888
+ href: "https://docs.camunda.io/docs/8.7/components/modeler/bpmn/message-events/#messages",
123889
+ target: "_blank",
123890
+ rel: "noopener noreferrer",
123891
+ title: translate('Subscription correlation key documentation'),
123892
+ children: translate('Learn more.')
123893
+ }), " "]
123894
+ })
123895
+ });
123889
123896
  }
123890
123897
  };
123891
123898
 
@@ -129161,7 +129168,7 @@
129161
129168
  }
129162
129169
 
129163
129170
  // eslint-disable-next-line no-undef
129164
- const packageVersion = "2.5.2";
129171
+ const packageVersion = "2.5.3";
129165
129172
 
129166
129173
  /**
129167
129174
  * Registry for element templates.
@@ -131061,7 +131068,7 @@
131061
131068
  });
131062
131069
  }
131063
131070
  const unusedLinkedResources = linkedResources.get('values').slice();
131064
- const unusedResourceProperties = oldTemplate?.properties.slice() || [];
131071
+ const unusedResourceProperties = (oldTemplate?.properties.slice() || []).filter(property => property.binding.type === ZEEBE_LINKED_RESOURCE_PROPERTY);
131065
131072
  newLinkedResources.forEach(newLinkedResource => {
131066
131073
  const oldProperty = findOldProperty$1(oldTemplate, newLinkedResource),
131067
131074
  oldLinkedResource = findBusinessObject(extensionElements, newLinkedResource),
@@ -131426,8 +131433,8 @@
131426
131433
  return eventDefinition.$type;
131427
131434
  }
131428
131435
 
131429
- class RemoveElementTemplateHandler {
131430
- constructor(modeling, elementFactory, elementRegistry, canvas, bpmnFactory, replace, commandStack) {
131436
+ let RemoveElementTemplateHandler$1 = class RemoveElementTemplateHandler {
131437
+ constructor(modeling, elementFactory, elementRegistry, canvas, bpmnFactory, replace, commandStack, moddleCopy) {
131431
131438
  this._modeling = modeling;
131432
131439
  this._elementFactory = elementFactory;
131433
131440
  this._elementRegistry = elementRegistry;
@@ -131435,6 +131442,7 @@
131435
131442
  this._bpmnFactory = bpmnFactory;
131436
131443
  this._replace = replace;
131437
131444
  this._commandStack = commandStack;
131445
+ this._moddleCopy = moddleCopy;
131438
131446
  }
131439
131447
  preExecute(context) {
131440
131448
  const {
@@ -131451,7 +131459,7 @@
131451
131459
  const businessObject = getBusinessObject$2(element);
131452
131460
  const type = businessObject.$type,
131453
131461
  eventDefinitionType = this._getEventDefinitionType(businessObject);
131454
- const newBusinessObject = this._createBlankBusinessObject(element);
131462
+ const newBusinessObject = this._createNewBusinessObject(element);
131455
131463
  return replace.replaceElement(element, {
131456
131464
  type: type,
131457
131465
  businessObject: newBusinessObject,
@@ -131485,7 +131493,7 @@
131485
131493
  }
131486
131494
  const businessObject = getBusinessObject$2(element);
131487
131495
  const type = businessObject.$type;
131488
- const newBusinessObject = this._createBlankBusinessObject(element);
131496
+ const newBusinessObject = this._createNewBusinessObject(element);
131489
131497
  const newRoot = elementFactory.create('root', {
131490
131498
  type: type,
131491
131499
  businessObject: newBusinessObject
@@ -131510,11 +131518,15 @@
131510
131518
  }
131511
131519
  return eventDefinition.$type;
131512
131520
  }
131513
- _createBlankBusinessObject(element) {
131521
+ _createNewBusinessObject(element) {
131514
131522
  const bpmnFactory = this._bpmnFactory;
131515
131523
  const bo = getBusinessObject$2(element),
131516
131524
  newBo = bpmnFactory.create(bo.$type),
131517
131525
  label = getLabel(element);
131526
+
131527
+ // Make we we keep general properties unrelated to the template.
131528
+ this._copyProperties(bo, newBo, ['documentation']);
131529
+ this._copyExtensionElements(bo, newBo, ['zeebe:ExecutionListeners']);
131518
131530
  if (!label) {
131519
131531
  return newBo;
131520
131532
  }
@@ -131526,8 +131538,47 @@
131526
131538
  }, label);
131527
131539
  return newBo;
131528
131540
  }
131529
- }
131530
- RemoveElementTemplateHandler.$inject = ['modeling', 'elementFactory', 'elementRegistry', 'canvas', 'bpmnFactory', 'replace', 'commandStack'];
131541
+
131542
+ /**
131543
+ * Copy specified properties to the target business object.
131544
+ *
131545
+ * @param {ModdleElement} source
131546
+ * @param {ModdleElement} target
131547
+ * @param {Array<string>} properties
131548
+ */
131549
+ _copyProperties(source, target, properties) {
131550
+ const copy = this._moddleCopy;
131551
+ properties.forEach(propertyName => {
131552
+ const property = source.get(propertyName);
131553
+ if (property) {
131554
+ const propertyCopy = copy.copyProperty(property, target, propertyName);
131555
+ target.set(propertyName, propertyCopy);
131556
+ }
131557
+ });
131558
+ }
131559
+
131560
+ /**
131561
+ * Copy extension elements of specified types to the target business object.
131562
+ *
131563
+ * @param {ModdleElement} source
131564
+ * @param {ModdleElement} target
131565
+ * @param {Array<string>} extensionElements
131566
+ */
131567
+ _copyExtensionElements(source, target, extensionElements) {
131568
+ const bpmnFactory = this._bpmnFactory;
131569
+
131570
+ // No extension elements in the source business object.
131571
+ if (!source.extensionElements || !source.extensionElements.values) return;
131572
+ const newExtensionElements = source.extensionElements.values.filter(value => extensionElements.some(extensionElement => is$5(value, extensionElement)));
131573
+
131574
+ // Nothing to copy.
131575
+ if (!newExtensionElements.length) return;
131576
+ target.extensionElements = bpmnFactory.create('bpmn:ExtensionElements', {
131577
+ values: newExtensionElements
131578
+ });
131579
+ }
131580
+ };
131581
+ RemoveElementTemplateHandler$1.$inject = ['modeling', 'elementFactory', 'elementRegistry', 'canvas', 'bpmnFactory', 'replace', 'commandStack', 'moddleCopy'];
131531
131582
 
131532
131583
  /**
131533
131584
  * A handler that combines and executes multiple commands.
@@ -131555,7 +131606,7 @@
131555
131606
  constructor(commandStack, elementTemplates, eventBus) {
131556
131607
  commandStack.registerHandler('element-templates.multi-command-executor', MultiCommandHandler);
131557
131608
  commandStack.registerHandler('propertiesPanel.zeebe.changeTemplate', ChangeElementTemplateHandler$1);
131558
- commandStack.registerHandler('propertiesPanel.removeTemplate', RemoveElementTemplateHandler);
131609
+ commandStack.registerHandler('propertiesPanel.removeTemplate', RemoveElementTemplateHandler$1);
131559
131610
 
131560
131611
  // apply default element templates on shape creation
131561
131612
  eventBus.on(['commandStack.shape.create.postExecuted'], function (event) {