bpmn-js 18.20.0 → 18.22.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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * bpmn-js - bpmn-modeler v18.20.0
2
+ * bpmn-js - bpmn-modeler v18.22.0
3
3
  *
4
4
  * Copyright (c) 2014-present, camunda Services GmbH
5
5
  *
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * Source Code: https://github.com/bpmn-io/bpmn-js
10
10
  *
11
- * Date: 2026-07-06
11
+ * Date: 2026-07-23
12
12
  */
13
13
  (function (global, factory) {
14
14
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -742,8 +742,9 @@
742
742
  }
743
743
 
744
744
  /**
745
+ * @template {(...args: any[]) => any} T
745
746
  * @typedef { {
746
- * (...args: any[]): any;
747
+ * (...args: Parameters<T>): void;
747
748
  * flush: () => void;
748
749
  * cancel: () => void;
749
750
  * } } DebouncedFunction
@@ -756,10 +757,12 @@
756
757
  * Lodash-style the function exposes methods to `#clear`
757
758
  * and `#flush` to control internal behavior.
758
759
  *
759
- * @param {Function} fn
760
- * @param {Number} timeout
760
+ * @template {(...args: any[]) => any} T
761
+ *
762
+ * @param {T} fn
763
+ * @param {number} timeout
761
764
  *
762
- * @return {DebouncedFunction} debounced function
765
+ * @return {DebouncedFunction<T>} debounced function
763
766
  */
764
767
  function debounce(fn, timeout) {
765
768
 
@@ -806,7 +809,7 @@
806
809
  }
807
810
 
808
811
  /**
809
- * @type { DebouncedFunction }
812
+ * @type {DebouncedFunction<T>}
810
813
  */
811
814
  function callback(...args) {
812
815
  lastNow = Date.now();
@@ -4842,6 +4845,8 @@
4842
4845
  * @typedef {import('./Types.js').ParentLike } ParentLike
4843
4846
  * @typedef {import('./Types.js').ShapeLike} ShapeLike
4844
4847
  *
4848
+ * @typedef {ShapeLike|ConnectionLike|RootLike|string} ElementOrIdentifier
4849
+ *
4845
4850
  * @typedef { {
4846
4851
  * container?: HTMLElement;
4847
4852
  * deferUpdate?: boolean;
@@ -5065,9 +5070,16 @@
5065
5070
  // debounce canvas.viewbox.changed events when deferUpdate is set
5066
5071
  // to help with potential performance issues
5067
5072
  if (config.deferUpdate) {
5068
- this._viewboxChanged = debounce(bind$1(this._viewboxChanged, this), 300);
5073
+ this._viewboxChanged = debounce(this._viewboxChanged, 300);
5069
5074
  }
5070
5075
 
5076
+ /**
5077
+ * Schedule focus restoration.
5078
+ *
5079
+ * @type {import('min-dash').DebouncedFunction<typeof this.restoreFocus>}
5080
+ */
5081
+ this._restoreFocus = debounce(this._restoreFocus, 0);
5082
+
5071
5083
  eventBus.on('diagram.init', () => {
5072
5084
 
5073
5085
  /**
@@ -5106,6 +5118,8 @@
5106
5118
  };
5107
5119
 
5108
5120
  Canvas.prototype._destroy = function() {
5121
+ this._restoreFocus.cancel();
5122
+
5109
5123
  this._eventBus.fire('canvas.destroy', {
5110
5124
  svg: this._svg,
5111
5125
  viewport: this._viewport
@@ -5169,9 +5183,17 @@
5169
5183
  };
5170
5184
 
5171
5185
  /**
5172
- * Sets focus on the canvas SVG element if `document.body` is currently focused.
5173
- */
5186
+ * Restores focus on the canvas SVG element if `document.body` is
5187
+ * currently focused.
5188
+ *
5189
+ * Safely executes on the next render cycle - never prevents pending
5190
+ * (in flight) user clicks.
5191
+ */
5174
5192
  Canvas.prototype.restoreFocus = function() {
5193
+ this._restoreFocus();
5194
+ };
5195
+
5196
+ Canvas.prototype._restoreFocus = function() {
5175
5197
  if (document.activeElement === document.body) {
5176
5198
  this.focus();
5177
5199
  }
@@ -5373,26 +5395,40 @@
5373
5395
 
5374
5396
 
5375
5397
  /**
5376
- * Returns the plane which contains the given element.
5398
+ * Returns the plane which contains the given element(s).
5377
5399
  *
5378
- * @param {ShapeLike|ConnectionLike|string} element The element or its ID.
5400
+ * If multiple elements are passed, the shared plane is returned
5401
+ * (or undefined if no shared plane exists).
5402
+ *
5403
+ * @param {ElementOrIdentifier|ElementOrIdentifier[]} element
5379
5404
  *
5380
5405
  * @return {RootLike|undefined} The root of the element.
5381
5406
  */
5382
5407
  Canvas.prototype.findRoot = function(element) {
5383
- if (typeof element === 'string') {
5384
- element = this._elementRegistry.get(element);
5385
- }
5386
5408
 
5387
- if (!element) {
5388
- return;
5389
- }
5409
+ const elements = this._resolveElements(element);
5410
+
5411
+ let root;
5412
+
5413
+ for (const element of elements) {
5414
+ const plane = this._findPlaneForRoot(
5415
+ findRoot(element)
5416
+ );
5417
+
5418
+ if (!plane) {
5419
+ return;
5420
+ }
5421
+
5422
+ if (root && plane.rootElement !== root) {
5423
+
5424
+ // no shared root
5425
+ return undefined;
5426
+ }
5390
5427
 
5391
- const plane = this._findPlaneForRoot(
5392
- findRoot(element)
5393
- ) || {};
5428
+ root = plane.rootElement;
5429
+ }
5394
5430
 
5395
- return plane.rootElement;
5431
+ return root;
5396
5432
  };
5397
5433
 
5398
5434
  /**
@@ -5412,6 +5448,33 @@
5412
5448
  });
5413
5449
  };
5414
5450
 
5451
+ /**
5452
+ * @param {ElementOrIdentifier} element
5453
+ *
5454
+ * @return {ShapeLike|ConnectionLike|RootLike|undefined}
5455
+ */
5456
+ Canvas.prototype._resolveElement = function(element) {
5457
+
5458
+ if (typeof element === 'string') {
5459
+ return this._elementRegistry.get(element);
5460
+ }
5461
+
5462
+ return element;
5463
+ };
5464
+
5465
+ /**
5466
+ * @param {ElementOrIdentifier|ElementOrIdentifier[]} elements
5467
+ *
5468
+ * @return {Array<ShapeLike|ConnectionLike|RootLike>}
5469
+ */
5470
+ Canvas.prototype._resolveElements = function(elements) {
5471
+
5472
+ if (!isArray$2(elements)) {
5473
+ elements = [ elements ];
5474
+ }
5475
+
5476
+ return elements.map(element => this._resolveElement(element)).filter(Boolean);
5477
+ };
5415
5478
 
5416
5479
  /**
5417
5480
  * Returns the html element that encloses the
@@ -5429,9 +5492,7 @@
5429
5492
  Canvas.prototype._updateMarker = function(element, marker, add) {
5430
5493
  let container;
5431
5494
 
5432
- if (!element.id) {
5433
- element = this._elementRegistry.get(element);
5434
- }
5495
+ element = this._resolveElement(element);
5435
5496
 
5436
5497
  element.markers = element.markers || new Set();
5437
5498
 
@@ -5514,9 +5575,7 @@
5514
5575
  * @param {string} marker The marker.
5515
5576
  */
5516
5577
  Canvas.prototype.hasMarker = function(element, marker) {
5517
- if (!element.id) {
5518
- element = this._elementRegistry.get(element);
5519
- }
5578
+ element = this._resolveElement(element);
5520
5579
 
5521
5580
  if (!element.markers) {
5522
5581
  return false;
@@ -5613,9 +5672,7 @@
5613
5672
  */
5614
5673
  Canvas.prototype.removeRootElement = function(rootElement) {
5615
5674
 
5616
- if (typeof rootElement === 'string') {
5617
- rootElement = this._elementRegistry.get(rootElement);
5618
- }
5675
+ rootElement = this._resolveElement(rootElement);
5619
5676
 
5620
5677
  const plane = this._findPlaneForRoot(rootElement);
5621
5678
 
@@ -6112,34 +6169,44 @@
6112
6169
  };
6113
6170
 
6114
6171
  /**
6115
- * Scrolls the viewbox to contain the given element.
6172
+ * Scrolls the viewbox to contain the given element or elements.
6116
6173
  * Optionally specify a padding to be applied to the edges.
6117
6174
  *
6118
- * @param {ShapeLike|ConnectionLike|string} element The element to scroll to or its ID.
6175
+ * The canvas navigates to the shared root of the element(s). If no shared
6176
+ * root can be found, no navigation is performed.
6177
+ *
6178
+ * @param {ElementOrIdentifier|ElementOrIdentifier[]} element The element(s) to scroll to or their ID(s).
6119
6179
  * @param {RectTRBL|number} [padding=100] The padding to be applied. Can also specify top, bottom, left and right.
6120
6180
  */
6121
6181
  Canvas.prototype.scrollToElement = function(element, padding) {
6122
6182
  let defaultPadding = 100;
6123
6183
 
6124
- if (typeof element === 'string') {
6125
- element = this._elementRegistry.get(element);
6184
+ const elements = this._resolveElements(element);
6185
+
6186
+ if (!elements.length) {
6187
+ return;
6126
6188
  }
6127
6189
 
6128
- // set to correct rootElement
6129
- const rootElement = this.findRoot(element);
6190
+ const rootElement = this.findRoot(elements);
6191
+
6192
+ if (!rootElement) {
6193
+ return;
6194
+ }
6130
6195
 
6131
6196
  if (rootElement !== this.getRootElement()) {
6132
6197
  this.setRootElement(rootElement);
6133
6198
  }
6134
6199
 
6135
- // element is rootElement, do not change viewport
6136
- if (rootElement === element) {
6200
+ const visibleElements = elements.filter(e => e != rootElement);
6201
+
6202
+ if (!visibleElements.length) {
6137
6203
  return;
6138
6204
  }
6139
6205
 
6140
6206
  if (!padding) {
6141
6207
  padding = {};
6142
6208
  }
6209
+
6143
6210
  if (typeof padding === 'number') {
6144
6211
  defaultPadding = padding;
6145
6212
  }
@@ -6151,7 +6218,7 @@
6151
6218
  left: padding.left || defaultPadding
6152
6219
  };
6153
6220
 
6154
- const elementBounds = getBBox(element),
6221
+ const elementBounds = getBBox(visibleElements),
6155
6222
  elementTrbl = asTRBL(elementBounds),
6156
6223
  viewboxBounds = this.viewbox(),
6157
6224
  zoom = this.zoom();
@@ -22458,7 +22525,7 @@
22458
22525
  };
22459
22526
 
22460
22527
  // document wide unique overlay ids
22461
- var ids$1 = new IdGenerator('ov');
22528
+ var ids$2 = new IdGenerator('ov');
22462
22529
 
22463
22530
  var LOW_PRIORITY$q = 500;
22464
22531
 
@@ -22590,7 +22657,7 @@
22590
22657
  this._canvas = canvas;
22591
22658
  this._elementRegistry = elementRegistry;
22592
22659
 
22593
- this._ids = ids$1;
22660
+ this._ids = ids$2;
22594
22661
 
22595
22662
  /**
22596
22663
  * @type {OverlaysConfigDefault}
@@ -27791,11 +27858,27 @@
27791
27858
  * @typedef {import('./PopupMenuProvider.js').PopupMenuEntry} PopupMenuEntry
27792
27859
  */
27793
27860
 
27861
+ /**
27862
+ * Compute the DOM `id` of a rendered popup menu entry.
27863
+ *
27864
+ * Used to wire the entry (`role="option"`) to the search field
27865
+ * via `aria-activedescendant`.
27866
+ *
27867
+ * @param {string} idPrefix
27868
+ * @param {PopupMenuEntry} entry
27869
+ *
27870
+ * @return {string}
27871
+ */
27872
+ function getPopupMenuItemId(idPrefix, entry) {
27873
+ return `${ idPrefix }-entry-${ entry.id }`;
27874
+ }
27875
+
27794
27876
  /**
27795
27877
  * Component that renders a popup menu entry.
27796
27878
  *
27797
27879
  * @param {Object} props
27798
27880
  * @param {string} props.key
27881
+ * @param {string} props.idPrefix
27799
27882
  * @param {PopupMenuEntry} props.entry
27800
27883
  * @param {boolean} props.selected
27801
27884
  * @param {(event: MouseEvent) => void} props.onMouseEnter
@@ -27804,6 +27887,7 @@
27804
27887
  */
27805
27888
  function PopupMenuItem(props) {
27806
27889
  const {
27890
+ idPrefix,
27807
27891
  entry,
27808
27892
  selected,
27809
27893
  onMouseEnter,
@@ -27825,13 +27909,13 @@
27825
27909
  <li
27826
27910
  class=${ clsx('entry', { selected, disabled: entry.disabled }) }
27827
27911
  data-id=${ entry.id }
27912
+ id=${ getPopupMenuItemId(idPrefix, entry) }
27913
+ role="option"
27914
+ aria-selected=${ selected || undefined }
27915
+ aria-haspopup=${ entry.entries ? 'true' : undefined }
27828
27916
  title=${ entry.title }
27829
- aria-label=${ entry.title || entry.label }
27830
27917
  aria-disabled=${ entry.disabled || undefined }
27831
- tabIndex="0"
27832
27918
  onClick=${ handleClick }
27833
- onFocus=${ onMouseEnter }
27834
- onBlur=${ onMouseLeave }
27835
27919
  onMouseEnter=${ onMouseEnter }
27836
27920
  onMouseLeave=${ onMouseLeave }
27837
27921
  onDragStart=${ (event) => draggable && handleClick(event, 'dragstart') }
@@ -27851,15 +27935,17 @@
27851
27935
  ` : null }
27852
27936
 
27853
27937
  ${ entry.documentationRef && m$1`
27854
- <a class="djs-popup-entry-docs"
27938
+ <a
27939
+ class="djs-popup-entry-docs"
27855
27940
  href=${ entry.documentationRef }
27856
27941
  onClick=${ (event) => event.stopPropagation() }
27857
- title="Open element documentation"
27858
- aria-label="Open element documentation"
27942
+ title="Open entry documentation"
27943
+ tabIndex="-1"
27944
+ aria-hidden="true"
27859
27945
  target="_blank"
27860
27946
  rel="noopener"
27861
27947
  >
27862
- <svg aria-hidden="true" width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
27948
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
27863
27949
  <path fill-rule="evenodd" clip-rule="evenodd" d="M10.6368 10.6375V5.91761H11.9995V10.6382C11.9995 10.9973 11.8623 11.3141 11.5878 11.5885C11.3134 11.863 10.9966 12.0002 10.6375 12.0002H1.36266C0.982345 12.0002 0.660159 11.8681 0.396102 11.6041C0.132044 11.34 1.52588e-05 11.0178 1.52588e-05 10.6375V1.36267C1.52588e-05 0.98236 0.132044 0.660173 0.396102 0.396116C0.660159 0.132058 0.982345 2.95639e-05 1.36266 2.95639e-05H5.91624V1.36267H1.36266V10.6375H10.6368ZM12 0H7.2794L7.27873 1.36197H9.68701L3.06507 7.98391L4.01541 8.93425L10.6373 2.31231V4.72059H12V0Z" fill="#818798"/>
27864
27950
  </svg>
27865
27951
  </a>
@@ -27897,6 +27983,11 @@
27897
27983
  * @param {PopupMenuEntry} props.selectedEntry
27898
27984
  * @param {(entry: PopupMenuEntry | null) => void} props.setSelectedEntry
27899
27985
  * @param {import('@bpmn-io/diagram-js-ui').Ref<boolean>} props.keyboardSelection
27986
+ * @param {string} props.idPrefix
27987
+ * @param {string} props.id
27988
+ * @param {string} [props.ariaLabel]
27989
+ * @param {number} [props.tabIndex]
27990
+ * @param {string} [props.ariaActivedescendant]
27900
27991
  */
27901
27992
  function PopupMenuList(props) {
27902
27993
  const {
@@ -27904,6 +27995,11 @@
27904
27995
  setSelectedEntry,
27905
27996
  groupedEntries,
27906
27997
  keyboardSelection,
27998
+ idPrefix,
27999
+ id,
28000
+ ariaLabel,
28001
+ tabIndex,
28002
+ ariaActivedescendant,
27907
28003
  ...restProps
27908
28004
  } = props;
27909
28005
 
@@ -27915,8 +28011,6 @@
27915
28011
  return;
27916
28012
  }
27917
28013
 
27918
- keyboardSelection.current = false;
27919
-
27920
28014
  const containerEl = resultsRef.current;
27921
28015
 
27922
28016
  if (!containerEl)
@@ -27929,22 +28023,60 @@
27929
28023
  }
27930
28024
  }, [ selectedEntry ]);
27931
28025
 
28026
+ const handleMouseMove = () => {
28027
+ keyboardSelection.current = false;
28028
+ };
28029
+
28030
+ const handleEntryMouseEnter = (entry) => {
28031
+
28032
+ // Prevents keyboard selection from being overridden
28033
+ // by mouse hover when `scrollIntoView` is called.
28034
+ if (keyboardSelection.current) {
28035
+ return;
28036
+ }
28037
+
28038
+ setSelectedEntry(entry);
28039
+ };
28040
+
28041
+ const handleEntryMouseLeave = () => {
28042
+ if (keyboardSelection.current) {
28043
+ return;
28044
+ }
28045
+
28046
+ setSelectedEntry(null);
28047
+ };
28048
+
27932
28049
  return m$1`
27933
- <div class="djs-popup-results" ref=${ resultsRef }>
28050
+ <div
28051
+ class="djs-popup-results"
28052
+ ref=${ resultsRef }
28053
+ id=${ id }
28054
+ role="listbox"
28055
+ aria-label=${ ariaLabel }
28056
+ tabIndex=${ tabIndex }
28057
+ aria-activedescendant=${ ariaActivedescendant }
28058
+ onMouseMove=${ handleMouseMove }
28059
+ >
27934
28060
  ${ groupedEntries.map(group => m$1`
27935
28061
  ${ group.name && m$1`
27936
- <div key=${ group.id } class="entry-header" title=${ group.name }>
28062
+ <div key=${ group.id } id=${ getGroupHeaderId(idPrefix, group) } class="entry-header" title=${ group.name }>
27937
28063
  ${ group.name }
27938
28064
  </div>
27939
28065
  ` }
27940
- <ul class="djs-popup-group" data-group=${ group.id }>
28066
+ <ul
28067
+ class="djs-popup-group"
28068
+ data-group=${ group.id }
28069
+ role="group"
28070
+ aria-labelledby=${ group.name ? getGroupHeaderId(idPrefix, group) : undefined }
28071
+ >
27941
28072
  ${ group.entries.map(entry => m$1`
27942
28073
  <${PopupMenuItem}
27943
28074
  key=${ entry.id }
28075
+ idPrefix=${ idPrefix }
27944
28076
  entry=${ entry }
27945
28077
  selected=${ entry === selectedEntry }
27946
- onMouseEnter=${ () => setSelectedEntry(entry) }
27947
- onMouseLeave=${ () => setSelectedEntry(null) }
28078
+ onMouseEnter=${ () => handleEntryMouseEnter(entry) }
28079
+ onMouseLeave=${ handleEntryMouseLeave }
27948
28080
  ...${ restProps }
27949
28081
  />
27950
28082
  `) }
@@ -27957,6 +28089,10 @@
27957
28089
 
27958
28090
  // helpers ////////////////
27959
28091
 
28092
+ function getGroupHeaderId(idPrefix, group) {
28093
+ return `${ idPrefix }-group-${ group.id }`;
28094
+ }
28095
+
27960
28096
  function scrollIntoView(el) {
27961
28097
  if (typeof el.scrollIntoViewIfNeeded === 'function') {
27962
28098
  el.scrollIntoViewIfNeeded();
@@ -27968,6 +28104,8 @@
27968
28104
  }
27969
28105
  }
27970
28106
 
28107
+ const ids$1 = new IdGenerator('djs-popup');
28108
+
27971
28109
  /**
27972
28110
  * @typedef {import('./PopupMenuProvider.js').PopupMenuEntry} PopupMenuEntry
27973
28111
  * @typedef {import('./PopupMenuProvider.js').PopupMenuActionEntry} PopupMenuActionEntry
@@ -27995,7 +28133,7 @@
27995
28133
  * @param {string} [props.title]
27996
28134
  * @param {boolean} [props.search]
27997
28135
  * @param {PopupMenuEmptyPlaceholder} [props.emptyPlaceholder]
27998
- * @param {number} [props.width]
28136
+ * @param {number|string} [props.width]
27999
28137
  * @param {searchFn} props.searchFn
28000
28138
  */
28001
28139
  function PopupMenuComponent(props) {
@@ -28084,6 +28222,12 @@
28084
28222
  */
28085
28223
  const keyboardSelection = A(false);
28086
28224
 
28225
+ // per instance basis to generate field IDs
28226
+ const idPrefix = T(() => ids$1.next(), []);
28227
+
28228
+ const resultsId = `${ idPrefix }-results`;
28229
+ const activeDescendantId = selectedEntry && getPopupMenuItemId(idPrefix, selectedEntry);
28230
+
28087
28231
  y(() => {
28088
28232
  const restore = restoreSelection.current;
28089
28233
 
@@ -28146,6 +28290,14 @@
28146
28290
 
28147
28291
  const handleKeyDown = q(event => {
28148
28292
  if (event.key === 'Enter' && selectedEntry) {
28293
+ const target = event.target;
28294
+ const isNativeActionTarget = !!closest(target, 'a, button', true);
28295
+
28296
+ // let native controls handle <Enter> themselves
28297
+ if (isNativeActionTarget) {
28298
+ return;
28299
+ }
28300
+
28149
28301
  if (selectedEntry.disabled) {
28150
28302
  return;
28151
28303
  }
@@ -28217,6 +28369,7 @@
28217
28369
  position=${ position }
28218
28370
  width=${ width }
28219
28371
  scale=${ scale }
28372
+ navigationStack=${ navigationStack }
28220
28373
  >
28221
28374
  ${ displayHeader && m$1`
28222
28375
  <${PopupMenuHeader}
@@ -28241,7 +28394,16 @@
28241
28394
  <svg class="djs-popup-search-icon" width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
28242
28395
  <path fill-rule="evenodd" clip-rule="evenodd" d="M9.0325 8.5H9.625L13.3675 12.25L12.25 13.3675L8.5 9.625V9.0325L8.2975 8.8225C7.4425 9.5575 6.3325 10 5.125 10C2.4325 10 0.25 7.8175 0.25 5.125C0.25 2.4325 2.4325 0.25 5.125 0.25C7.8175 0.25 10 2.4325 10 5.125C10 6.3325 9.5575 7.4425 8.8225 8.2975L9.0325 8.5ZM1.75 5.125C1.75 6.9925 3.2575 8.5 5.125 8.5C6.9925 8.5 8.5 6.9925 8.5 5.125C8.5 3.2575 6.9925 1.75 5.125 1.75C3.2575 1.75 1.75 3.2575 1.75 5.125Z" fill="#22242A"/>
28243
28396
  </svg>
28244
- <input type="text" spellcheck=${ false } aria-label="${ title || 'Search' }" />
28397
+ <input
28398
+ type="text"
28399
+ spellcheck=${ false }
28400
+ role="combobox"
28401
+ aria-label="${ title || 'Search' }"
28402
+ aria-expanded="true"
28403
+ aria-controls=${ resultsId }
28404
+ aria-activedescendant=${ activeDescendantId || undefined }
28405
+ aria-autocomplete="list"
28406
+ />
28245
28407
  </div>
28246
28408
  ` }
28247
28409
 
@@ -28257,7 +28419,31 @@
28257
28419
  setSelectedEntry=${ setSelectedEntry }
28258
28420
  keyboardSelection=${ keyboardSelection }
28259
28421
  onAction=${ handleEntryAction }
28422
+ idPrefix=${ idPrefix }
28423
+ id=${ resultsId }
28424
+ ariaLabel=${ title || 'Results' }
28425
+ tabIndex=${ searchable ? -1 : 0 }
28426
+ ariaActivedescendant=${ searchable ? undefined : (activeDescendantId || undefined) }
28260
28427
  />
28428
+
28429
+ ${ selectedEntry && selectedEntry.documentationRef && m$1`
28430
+ <div class="djs-popup-footer">
28431
+ <a
28432
+ class="djs-popup-footer-docs"
28433
+ href=${ selectedEntry.documentationRef }
28434
+ onClick=${ (event) => event.stopPropagation() }
28435
+ aria-label=${ selectedEntry.label ? `Open entry documentation for ${ selectedEntry.label }` : 'Open entry documentation' }
28436
+ target="_blank"
28437
+ rel="noopener"
28438
+ >
28439
+ Open entry documentation
28440
+
28441
+ <svg aria-hidden="true" width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
28442
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M10.6368 10.6375V5.91761H11.9995V10.6382C11.9995 10.9973 11.8623 11.3141 11.5878 11.5885C11.3134 11.863 10.9966 12.0002 10.6375 12.0002H1.36266C0.982345 12.0002 0.660159 11.8681 0.396102 11.6041C0.132044 11.34 1.52588e-05 11.0178 1.52588e-05 10.6375V1.36267C1.52588e-05 0.98236 0.132044 0.660173 0.396102 0.396116C0.660159 0.132058 0.982345 2.95639e-05 1.36266 2.95639e-05H5.91624V1.36267H1.36266V10.6375H10.6368ZM12 0H7.2794L7.27873 1.36197H9.68701L3.06507 7.98391L4.01541 8.93425L10.6373 2.31231V4.72059H12V0Z" fill="#818798"/>
28443
+ </svg>
28444
+ </a>
28445
+ </div>
28446
+ ` }
28261
28447
  </div>
28262
28448
  ` }
28263
28449
  ${ emptyPlaceholder && entriesToShow.length === 0 && m$1`
@@ -28279,6 +28465,7 @@
28279
28465
  onKeyup,
28280
28466
  className,
28281
28467
  children,
28468
+ navigationStack,
28282
28469
  position: positionGetter
28283
28470
  } = props;
28284
28471
 
@@ -28297,7 +28484,6 @@
28297
28484
  popupEl.style.top = `${position.y}px`;
28298
28485
  }, [ popupRef.current, positionGetter ]);
28299
28486
 
28300
- // initial focus
28301
28487
  _(() => {
28302
28488
  const popupEl = popupRef.current;
28303
28489
 
@@ -28305,10 +28491,15 @@
28305
28491
  return;
28306
28492
  }
28307
28493
 
28308
- const inputEl = popupEl.querySelector('input');
28494
+ // focus the combobox (search) if present, otherwise the listbox
28495
+ // itself which then holds focus + `aria-activedescendant`;
28496
+ // fall back to the popup element (e.g. empty placeholder)
28497
+ const focusEl = popupEl.querySelector('input')
28498
+ || popupEl.querySelector('[role="listbox"]')
28499
+ || popupEl;
28309
28500
 
28310
- (inputEl || popupEl).focus();
28311
- }, []);
28501
+ focusEl.focus();
28502
+ }, [ navigationStack ]);
28312
28503
 
28313
28504
  // global <Escape> / blur handlers
28314
28505
  y(() => {
@@ -28360,9 +28551,14 @@
28360
28551
  // helpers //////////////////////
28361
28552
 
28362
28553
  function getPopupStyle(props) {
28554
+ const { width } = props;
28555
+
28556
+ const normalizedWidth = typeof width === 'number' ? `${width}px` : width;
28557
+
28363
28558
  return {
28364
28559
  transform: `scale(${props.scale})`,
28365
- width: `${props.width}px`,
28560
+ width: isDefined(width) ? normalizedWidth : undefined,
28561
+ maxWidth: isDefined(width) ? 'unset' : undefined,
28366
28562
  'transform-origin': 'top left'
28367
28563
  };
28368
28564
  }
@@ -55720,6 +55916,7 @@
55720
55916
  * @param {DOMElement} options.container The DOM element to append the contentContainer to
55721
55917
  * @param {Function} options.keyHandler Handler for key events
55722
55918
  * @param {Function} options.resizeHandler Handler for resize events
55919
+ * @param {Function} [options.focusoutHandler] Handler for focusout events
55723
55920
  */
55724
55921
  function TextBox(options) {
55725
55922
  this.container = options.container;
@@ -55734,6 +55931,7 @@
55734
55931
 
55735
55932
  this.keyHandler = options.keyHandler || function() {};
55736
55933
  this.resizeHandler = options.resizeHandler || function() {};
55934
+ this.focusoutHandler = options.focusoutHandler || function() {};
55737
55935
 
55738
55936
  this.autoResize = bind$1(this.autoResize, this);
55739
55937
  this.handlePaste = bind$1(this.handlePaste, this);
@@ -55838,6 +56036,7 @@
55838
56036
  event.bind(content, 'keydown', this.keyHandler);
55839
56037
  event.bind(content, 'mousedown', stopPropagation);
55840
56038
  event.bind(content, 'paste', self.handlePaste);
56039
+ event.bind(content, 'focusout', this.focusoutHandler);
55841
56040
 
55842
56041
  if (options.autoResize) {
55843
56042
  event.bind(content, 'input', this.autoResize);
@@ -56090,6 +56289,7 @@
56090
56289
  event.unbind(content, 'mousedown', stopPropagation);
56091
56290
  event.unbind(content, 'input', this.autoResize);
56092
56291
  event.unbind(content, 'paste', this.handlePaste);
56292
+ event.unbind(content, 'focusout', this.focusoutHandler);
56093
56293
 
56094
56294
  if (resizeHandle) {
56095
56295
  resizeHandle.removeAttribute('style');
@@ -56152,8 +56352,11 @@
56152
56352
  this._textbox = new TextBox({
56153
56353
  container: canvas.getContainer(),
56154
56354
  keyHandler: bind$1(this._handleKey, this),
56155
- resizeHandler: bind$1(this._handleResize, this)
56355
+ resizeHandler: bind$1(this._handleResize, this),
56356
+ focusoutHandler: bind$1(this._handleFocusout, this)
56156
56357
  });
56358
+
56359
+ eventBus.on([ 'diagram.clear', 'diagram.destroy' ], () => this._cleanup());
56157
56360
  }
56158
56361
 
56159
56362
  DirectEditing.$inject = [ 'eventBus', 'canvas' ];
@@ -56203,18 +56406,25 @@
56203
56406
  };
56204
56407
 
56205
56408
  DirectEditing.prototype.close = function() {
56206
- this._textbox.destroy();
56207
-
56208
56409
  this._fire('deactivate');
56209
56410
 
56210
- this._active = null;
56211
-
56212
- this.resizable = undefined;
56411
+ this._cleanup();
56213
56412
 
56214
56413
  // restoreFocus API is available from diagram-js@15.0.0
56215
56414
  this._canvas.restoreFocus && this._canvas.restoreFocus();
56216
56415
  };
56217
56416
 
56417
+ DirectEditing.prototype._cleanup = function() {
56418
+ if (!this._active) {
56419
+ return;
56420
+ }
56421
+
56422
+ this._textbox.destroy();
56423
+
56424
+ this._active = null;
56425
+
56426
+ this.resizable = undefined;
56427
+ };
56218
56428
 
56219
56429
  DirectEditing.prototype.complete = function() {
56220
56430
 
@@ -56282,6 +56492,17 @@
56282
56492
  };
56283
56493
 
56284
56494
 
56495
+ DirectEditing.prototype._handleFocusout = function(event) {
56496
+
56497
+ // ignore focus moves within the textbox (e.g. to the resize handle)
56498
+ if (event.relatedTarget && this._textbox.parent.contains(event.relatedTarget)) {
56499
+ return;
56500
+ }
56501
+
56502
+ this.complete();
56503
+ };
56504
+
56505
+
56285
56506
  /**
56286
56507
  * Activate direct editing on the given element
56287
56508
  *
@@ -56383,196 +56604,408 @@
56383
56604
  }
56384
56605
 
56385
56606
  /**
56386
- * @typedef { () => string } LabelGetter
56607
+ * Shared catalog of BPMN element popup entry definitions.
56608
+ *
56609
+ * Each entry is the context-independent identity of an element — its `target`
56610
+ * (moddle type + discriminating attributes), plus the `label` and `className`
56611
+ * shared across every menu that offers it (create, append, replace).
56612
+ *
56613
+ * Menus compose their own option lists from these atoms, adding menu-specific fields
56387
56614
  *
56388
56615
  * @typedef { {
56389
- * label: string | LabelGetter;
56390
- * actionName: string;
56616
+ * label: string;
56391
56617
  * className: string;
56392
- * target?: {
56618
+ * target: {
56393
56619
  * type: string;
56394
56620
  * isExpanded?: boolean;
56395
- * isInterrupting?: boolean;
56396
56621
  * triggeredByEvent?: boolean;
56622
+ * instantiate?: boolean;
56623
+ * eventGatewayType?: string;
56624
+ * isInterrupting?: boolean;
56397
56625
  * cancelActivity?: boolean;
56398
56626
  * eventDefinitionType?: string;
56399
- * eventDefinitionAttrs?: Record<string, any>
56627
+ * eventDefinitionAttrs?: Record<string, any>;
56400
56628
  * };
56401
- * } } ReplaceOption
56629
+ * } } ElementDefinition
56630
+ *
56631
+ * @type {Record<string, ElementDefinition>}
56402
56632
  */
56633
+ const PopupEntries = {
56403
56634
 
56404
- /**
56405
- * @type {ReplaceOption[]}
56406
- */
56407
- var START_EVENT = [
56408
- {
56635
+ // Tasks
56636
+ 'task': {
56637
+ label: 'Task',
56638
+ className: 'bpmn-icon-task',
56639
+ target: {
56640
+ type: 'bpmn:Task'
56641
+ }
56642
+ },
56643
+ 'user-task': {
56644
+ label: 'User task',
56645
+ className: 'bpmn-icon-user',
56646
+ target: {
56647
+ type: 'bpmn:UserTask'
56648
+ }
56649
+ },
56650
+ 'service-task': {
56651
+ label: 'Service task',
56652
+ className: 'bpmn-icon-service',
56653
+ target: {
56654
+ type: 'bpmn:ServiceTask'
56655
+ }
56656
+ },
56657
+ 'send-task': {
56658
+ label: 'Send task',
56659
+ className: 'bpmn-icon-send',
56660
+ target: {
56661
+ type: 'bpmn:SendTask'
56662
+ }
56663
+ },
56664
+ 'receive-task': {
56665
+ label: 'Receive task',
56666
+ className: 'bpmn-icon-receive',
56667
+ target: {
56668
+ type: 'bpmn:ReceiveTask'
56669
+ }
56670
+ },
56671
+ 'manual-task': {
56672
+ label: 'Manual task',
56673
+ className: 'bpmn-icon-manual',
56674
+ target: {
56675
+ type: 'bpmn:ManualTask'
56676
+ }
56677
+ },
56678
+ 'rule-task': {
56679
+ label: 'Business rule task',
56680
+ className: 'bpmn-icon-business-rule',
56681
+ target: {
56682
+ type: 'bpmn:BusinessRuleTask'
56683
+ }
56684
+ },
56685
+ 'script-task': {
56686
+ label: 'Script task',
56687
+ className: 'bpmn-icon-script',
56688
+ target: {
56689
+ type: 'bpmn:ScriptTask'
56690
+ }
56691
+ },
56692
+
56693
+ // Sub-processes
56694
+ 'call-activity': {
56695
+ label: 'Call activity',
56696
+ className: 'bpmn-icon-call-activity',
56697
+ target: {
56698
+ type: 'bpmn:CallActivity'
56699
+ }
56700
+ },
56701
+ 'transaction': {
56702
+ label: 'Transaction',
56703
+ className: 'bpmn-icon-transaction',
56704
+ target: {
56705
+ type: 'bpmn:Transaction',
56706
+ isExpanded: true
56707
+ }
56708
+ },
56709
+ 'event-subprocess': {
56710
+ label: 'Event sub-process',
56711
+ className: 'bpmn-icon-event-subprocess-expanded',
56712
+ target: {
56713
+ type: 'bpmn:SubProcess',
56714
+ triggeredByEvent: true,
56715
+ isExpanded: true
56716
+ }
56717
+ },
56718
+ 'collapsed-subprocess': {
56719
+ label: 'Sub-process (collapsed)',
56720
+ className: 'bpmn-icon-subprocess-collapsed',
56721
+ target: {
56722
+ type: 'bpmn:SubProcess',
56723
+ isExpanded: false
56724
+ }
56725
+ },
56726
+ 'expanded-subprocess': {
56727
+ label: 'Sub-process (expanded)',
56728
+ className: 'bpmn-icon-subprocess-expanded',
56729
+ target: {
56730
+ type: 'bpmn:SubProcess',
56731
+ isExpanded: true
56732
+ }
56733
+ },
56734
+ 'collapsed-ad-hoc-subprocess': {
56735
+ label: 'Ad-hoc sub-process (collapsed)',
56736
+ className: 'bpmn-icon-subprocess-collapsed',
56737
+ target: {
56738
+ type: 'bpmn:AdHocSubProcess',
56739
+ isExpanded: false
56740
+ }
56741
+ },
56742
+ 'expanded-ad-hoc-subprocess': {
56743
+ label: 'Ad-hoc sub-process (expanded)',
56744
+ className: 'bpmn-icon-subprocess-expanded',
56745
+ target: {
56746
+ type: 'bpmn:AdHocSubProcess',
56747
+ isExpanded: true
56748
+ }
56749
+ },
56750
+
56751
+ // Gateways
56752
+ 'exclusive-gateway': {
56753
+ label: 'Exclusive gateway',
56754
+ className: 'bpmn-icon-gateway-xor',
56755
+ target: {
56756
+ type: 'bpmn:ExclusiveGateway'
56757
+ }
56758
+ },
56759
+ 'parallel-gateway': {
56760
+ label: 'Parallel gateway',
56761
+ className: 'bpmn-icon-gateway-parallel',
56762
+ target: {
56763
+ type: 'bpmn:ParallelGateway'
56764
+ }
56765
+ },
56766
+ 'inclusive-gateway': {
56767
+ label: 'Inclusive gateway',
56768
+ className: 'bpmn-icon-gateway-or',
56769
+ target: {
56770
+ type: 'bpmn:InclusiveGateway'
56771
+ }
56772
+ },
56773
+ 'complex-gateway': {
56774
+ label: 'Complex gateway',
56775
+ className: 'bpmn-icon-gateway-complex',
56776
+ target: {
56777
+ type: 'bpmn:ComplexGateway'
56778
+ }
56779
+ },
56780
+ 'event-based-gateway': {
56781
+ label: 'Event-based gateway',
56782
+ className: 'bpmn-icon-gateway-eventbased',
56783
+ target: {
56784
+ type: 'bpmn:EventBasedGateway',
56785
+ instantiate: false,
56786
+ eventGatewayType: 'Exclusive'
56787
+ }
56788
+ },
56789
+
56790
+ // Data
56791
+ 'data-store-reference': {
56792
+ label: 'Data store reference',
56793
+ className: 'bpmn-icon-data-store',
56794
+ target: {
56795
+ type: 'bpmn:DataStoreReference'
56796
+ }
56797
+ },
56798
+ 'data-object-reference': {
56799
+ label: 'Data object reference',
56800
+ className: 'bpmn-icon-data-object',
56801
+ target: {
56802
+ type: 'bpmn:DataObjectReference'
56803
+ }
56804
+ },
56805
+
56806
+ // Participants
56807
+ 'expanded-pool': {
56808
+ label: 'Expanded pool/participant',
56809
+ className: 'bpmn-icon-participant',
56810
+ target: {
56811
+ type: 'bpmn:Participant',
56812
+ isExpanded: true
56813
+ }
56814
+ },
56815
+ 'collapsed-pool': {
56816
+ label: 'Empty pool/participant',
56817
+ className: 'bpmn-icon-lane',
56818
+ target: {
56819
+ type: 'bpmn:Participant',
56820
+ isExpanded: false
56821
+ }
56822
+ },
56823
+
56824
+ // Events — none
56825
+ 'none-start-event': {
56409
56826
  label: 'Start event',
56410
- actionName: 'replace-with-none-start',
56411
56827
  className: 'bpmn-icon-start-event-none',
56412
56828
  target: {
56413
56829
  type: 'bpmn:StartEvent'
56414
56830
  }
56415
56831
  },
56416
- {
56832
+ 'none-intermediate-throwing': {
56417
56833
  label: 'Intermediate throw event',
56418
- actionName: 'replace-with-none-intermediate-throwing',
56419
56834
  className: 'bpmn-icon-intermediate-event-none',
56420
56835
  target: {
56421
56836
  type: 'bpmn:IntermediateThrowEvent'
56422
56837
  }
56423
56838
  },
56424
- {
56839
+ 'none-boundary-event': {
56840
+ label: 'Boundary event',
56841
+ className: 'bpmn-icon-intermediate-event-none',
56842
+ target: {
56843
+ type: 'bpmn:BoundaryEvent'
56844
+ }
56845
+ },
56846
+ 'none-end-event': {
56425
56847
  label: 'End event',
56426
- actionName: 'replace-with-none-end',
56427
56848
  className: 'bpmn-icon-end-event-none',
56428
56849
  target: {
56429
56850
  type: 'bpmn:EndEvent'
56430
56851
  }
56431
56852
  },
56432
- {
56853
+
56854
+ // Events — typed start
56855
+ 'message-start': {
56433
56856
  label: 'Message start event',
56434
- actionName: 'replace-with-message-start',
56435
56857
  className: 'bpmn-icon-start-event-message',
56436
56858
  target: {
56437
56859
  type: 'bpmn:StartEvent',
56438
- eventDefinitionType: 'bpmn:MessageEventDefinition'
56860
+ eventDefinitionType: 'bpmn:MessageEventDefinition',
56861
+ isInterrupting: true
56439
56862
  }
56440
56863
  },
56441
- {
56864
+ 'timer-start': {
56442
56865
  label: 'Timer start event',
56443
- actionName: 'replace-with-timer-start',
56444
56866
  className: 'bpmn-icon-start-event-timer',
56445
56867
  target: {
56446
56868
  type: 'bpmn:StartEvent',
56447
- eventDefinitionType: 'bpmn:TimerEventDefinition'
56869
+ eventDefinitionType: 'bpmn:TimerEventDefinition',
56870
+ isInterrupting: true
56448
56871
  }
56449
56872
  },
56450
- {
56873
+ 'conditional-start': {
56451
56874
  label: 'Conditional start event',
56452
- actionName: 'replace-with-conditional-start',
56453
56875
  className: 'bpmn-icon-start-event-condition',
56454
56876
  target: {
56455
56877
  type: 'bpmn:StartEvent',
56456
- eventDefinitionType: 'bpmn:ConditionalEventDefinition'
56878
+ eventDefinitionType: 'bpmn:ConditionalEventDefinition',
56879
+ isInterrupting: true
56457
56880
  }
56458
56881
  },
56459
- {
56882
+ 'signal-start': {
56460
56883
  label: 'Signal start event',
56461
- actionName: 'replace-with-signal-start',
56462
56884
  className: 'bpmn-icon-start-event-signal',
56463
56885
  target: {
56464
56886
  type: 'bpmn:StartEvent',
56465
- eventDefinitionType: 'bpmn:SignalEventDefinition'
56887
+ eventDefinitionType: 'bpmn:SignalEventDefinition',
56888
+ isInterrupting: true
56466
56889
  }
56467
- }
56468
- ];
56469
-
56470
- /**
56471
- * @type {ReplaceOption[]}
56472
- */
56473
- var START_EVENT_SUB_PROCESS = [
56474
- {
56475
- label: 'Start event',
56476
- actionName: 'replace-with-none-start',
56477
- className: 'bpmn-icon-start-event-none',
56890
+ },
56891
+ 'error-start': {
56892
+ label: 'Error start event',
56893
+ className: 'bpmn-icon-start-event-error',
56478
56894
  target: {
56479
- type: 'bpmn:StartEvent'
56895
+ type: 'bpmn:StartEvent',
56896
+ eventDefinitionType: 'bpmn:ErrorEventDefinition',
56897
+ isInterrupting: true
56480
56898
  }
56481
56899
  },
56482
- {
56483
- label: 'Intermediate throw event',
56484
- actionName: 'replace-with-none-intermediate-throwing',
56485
- className: 'bpmn-icon-intermediate-event-none',
56900
+ 'escalation-start': {
56901
+ label: 'Escalation start event',
56902
+ className: 'bpmn-icon-start-event-escalation',
56486
56903
  target: {
56487
- type: 'bpmn:IntermediateThrowEvent'
56904
+ type: 'bpmn:StartEvent',
56905
+ eventDefinitionType: 'bpmn:EscalationEventDefinition',
56906
+ isInterrupting: true
56488
56907
  }
56489
56908
  },
56490
- {
56491
- label: 'End event',
56492
- actionName: 'replace-with-none-end',
56493
- className: 'bpmn-icon-end-event-none',
56909
+ 'compensation-start': {
56910
+ label: 'Compensation start event',
56911
+ className: 'bpmn-icon-start-event-compensation',
56494
56912
  target: {
56495
- type: 'bpmn:EndEvent'
56913
+ type: 'bpmn:StartEvent',
56914
+ eventDefinitionType: 'bpmn:CompensateEventDefinition',
56915
+ isInterrupting: true
56496
56916
  }
56497
- }
56498
- ];
56917
+ },
56499
56918
 
56500
- /**
56501
- * @type {ReplaceOption[]}
56502
- */
56503
- var INTERMEDIATE_EVENT = [
56504
- {
56505
- label: 'Start event',
56506
- actionName: 'replace-with-none-start',
56507
- className: 'bpmn-icon-start-event-none',
56919
+ // Events — non-interrupting start (event subprocess)
56920
+ 'non-interrupting-message-start': {
56921
+ label: 'Message start event (non-interrupting)',
56922
+ className: 'bpmn-icon-start-event-non-interrupting-message',
56508
56923
  target: {
56509
- type: 'bpmn:StartEvent'
56924
+ type: 'bpmn:StartEvent',
56925
+ eventDefinitionType: 'bpmn:MessageEventDefinition',
56926
+ isInterrupting: false
56510
56927
  }
56511
56928
  },
56512
- {
56513
- label: 'Intermediate throw event',
56514
- actionName: 'replace-with-none-intermediate-throw',
56515
- className: 'bpmn-icon-intermediate-event-none',
56929
+ 'non-interrupting-timer-start': {
56930
+ label: 'Timer start event (non-interrupting)',
56931
+ className: 'bpmn-icon-start-event-non-interrupting-timer',
56516
56932
  target: {
56517
- type: 'bpmn:IntermediateThrowEvent'
56933
+ type: 'bpmn:StartEvent',
56934
+ eventDefinitionType: 'bpmn:TimerEventDefinition',
56935
+ isInterrupting: false
56518
56936
  }
56519
56937
  },
56520
- {
56521
- label: 'End event',
56522
- actionName: 'replace-with-none-end',
56523
- className: 'bpmn-icon-end-event-none',
56938
+ 'non-interrupting-conditional-start': {
56939
+ label: 'Conditional start event (non-interrupting)',
56940
+ className: 'bpmn-icon-start-event-non-interrupting-condition',
56524
56941
  target: {
56525
- type: 'bpmn:EndEvent'
56942
+ type: 'bpmn:StartEvent',
56943
+ eventDefinitionType: 'bpmn:ConditionalEventDefinition',
56944
+ isInterrupting: false
56526
56945
  }
56527
56946
  },
56528
- {
56947
+ 'non-interrupting-signal-start': {
56948
+ label: 'Signal start event (non-interrupting)',
56949
+ className: 'bpmn-icon-start-event-non-interrupting-signal',
56950
+ target: {
56951
+ type: 'bpmn:StartEvent',
56952
+ eventDefinitionType: 'bpmn:SignalEventDefinition',
56953
+ isInterrupting: false
56954
+ }
56955
+ },
56956
+ 'non-interrupting-escalation-start': {
56957
+ label: 'Escalation start event (non-interrupting)',
56958
+ className: 'bpmn-icon-start-event-non-interrupting-escalation',
56959
+ target: {
56960
+ type: 'bpmn:StartEvent',
56961
+ eventDefinitionType: 'bpmn:EscalationEventDefinition',
56962
+ isInterrupting: false
56963
+ }
56964
+ },
56965
+
56966
+ // Events — intermediate (catch/throw)
56967
+ 'message-intermediate-catch': {
56529
56968
  label: 'Message intermediate catch event',
56530
- actionName: 'replace-with-message-intermediate-catch',
56531
56969
  className: 'bpmn-icon-intermediate-event-catch-message',
56532
56970
  target: {
56533
56971
  type: 'bpmn:IntermediateCatchEvent',
56534
56972
  eventDefinitionType: 'bpmn:MessageEventDefinition'
56535
56973
  }
56536
56974
  },
56537
- {
56975
+ 'message-intermediate-throw': {
56538
56976
  label: 'Message intermediate throw event',
56539
- actionName: 'replace-with-message-intermediate-throw',
56540
56977
  className: 'bpmn-icon-intermediate-event-throw-message',
56541
56978
  target: {
56542
56979
  type: 'bpmn:IntermediateThrowEvent',
56543
56980
  eventDefinitionType: 'bpmn:MessageEventDefinition'
56544
56981
  }
56545
56982
  },
56546
- {
56983
+ 'timer-intermediate-catch': {
56547
56984
  label: 'Timer intermediate catch event',
56548
- actionName: 'replace-with-timer-intermediate-catch',
56549
56985
  className: 'bpmn-icon-intermediate-event-catch-timer',
56550
56986
  target: {
56551
56987
  type: 'bpmn:IntermediateCatchEvent',
56552
56988
  eventDefinitionType: 'bpmn:TimerEventDefinition'
56553
56989
  }
56554
56990
  },
56555
- {
56991
+ 'escalation-intermediate-throw': {
56556
56992
  label: 'Escalation intermediate throw event',
56557
- actionName: 'replace-with-escalation-intermediate-throw',
56558
56993
  className: 'bpmn-icon-intermediate-event-throw-escalation',
56559
56994
  target: {
56560
56995
  type: 'bpmn:IntermediateThrowEvent',
56561
56996
  eventDefinitionType: 'bpmn:EscalationEventDefinition'
56562
56997
  }
56563
56998
  },
56564
- {
56999
+ 'conditional-intermediate-catch': {
56565
57000
  label: 'Conditional intermediate catch event',
56566
- actionName: 'replace-with-conditional-intermediate-catch',
56567
57001
  className: 'bpmn-icon-intermediate-event-catch-condition',
56568
57002
  target: {
56569
57003
  type: 'bpmn:IntermediateCatchEvent',
56570
57004
  eventDefinitionType: 'bpmn:ConditionalEventDefinition'
56571
57005
  }
56572
57006
  },
56573
- {
57007
+ 'link-intermediate-catch': {
56574
57008
  label: 'Link intermediate catch event',
56575
- actionName: 'replace-with-link-intermediate-catch',
56576
57009
  className: 'bpmn-icon-intermediate-event-catch-link',
56577
57010
  target: {
56578
57011
  type: 'bpmn:IntermediateCatchEvent',
@@ -56582,9 +57015,8 @@
56582
57015
  }
56583
57016
  }
56584
57017
  },
56585
- {
57018
+ 'link-intermediate-throw': {
56586
57019
  label: 'Link intermediate throw event',
56587
- actionName: 'replace-with-link-intermediate-throw',
56588
57020
  className: 'bpmn-icon-intermediate-event-throw-link',
56589
57021
  target: {
56590
57022
  type: 'bpmn:IntermediateThrowEvent',
@@ -56594,174 +57026,320 @@
56594
57026
  }
56595
57027
  }
56596
57028
  },
56597
- {
57029
+ 'compensation-intermediate-throw': {
56598
57030
  label: 'Compensation intermediate throw event',
56599
- actionName: 'replace-with-compensation-intermediate-throw',
56600
57031
  className: 'bpmn-icon-intermediate-event-throw-compensation',
56601
57032
  target: {
56602
57033
  type: 'bpmn:IntermediateThrowEvent',
56603
57034
  eventDefinitionType: 'bpmn:CompensateEventDefinition'
56604
57035
  }
56605
57036
  },
56606
- {
57037
+ 'signal-intermediate-catch': {
56607
57038
  label: 'Signal intermediate catch event',
56608
- actionName: 'replace-with-signal-intermediate-catch',
56609
57039
  className: 'bpmn-icon-intermediate-event-catch-signal',
56610
57040
  target: {
56611
57041
  type: 'bpmn:IntermediateCatchEvent',
56612
57042
  eventDefinitionType: 'bpmn:SignalEventDefinition'
56613
57043
  }
56614
57044
  },
56615
- {
57045
+ 'signal-intermediate-throw': {
56616
57046
  label: 'Signal intermediate throw event',
56617
- actionName: 'replace-with-signal-intermediate-throw',
56618
57047
  className: 'bpmn-icon-intermediate-event-throw-signal',
56619
57048
  target: {
56620
57049
  type: 'bpmn:IntermediateThrowEvent',
56621
57050
  eventDefinitionType: 'bpmn:SignalEventDefinition'
56622
57051
  }
56623
- }
56624
- ];
57052
+ },
56625
57053
 
56626
- /**
56627
- * @type {ReplaceOption[]}
56628
- */
56629
- var END_EVENT = [
56630
- {
56631
- label: 'Start event',
56632
- actionName: 'replace-with-none-start',
56633
- className: 'bpmn-icon-start-event-none',
57054
+ // Events — boundary (interrupting)
57055
+ 'message-boundary': {
57056
+ label: 'Message boundary event',
57057
+ className: 'bpmn-icon-intermediate-event-catch-message',
56634
57058
  target: {
56635
- type: 'bpmn:StartEvent'
57059
+ type: 'bpmn:BoundaryEvent',
57060
+ eventDefinitionType: 'bpmn:MessageEventDefinition',
57061
+ cancelActivity: true
56636
57062
  }
56637
57063
  },
56638
- {
56639
- label: 'Intermediate throw event',
56640
- actionName: 'replace-with-none-intermediate-throw',
56641
- className: 'bpmn-icon-intermediate-event-none',
57064
+ 'timer-boundary': {
57065
+ label: 'Timer boundary event',
57066
+ className: 'bpmn-icon-intermediate-event-catch-timer',
56642
57067
  target: {
56643
- type: 'bpmn:IntermediateThrowEvent'
57068
+ type: 'bpmn:BoundaryEvent',
57069
+ eventDefinitionType: 'bpmn:TimerEventDefinition',
57070
+ cancelActivity: true
56644
57071
  }
56645
57072
  },
56646
- {
56647
- label: 'End event',
56648
- actionName: 'replace-with-none-end',
56649
- className: 'bpmn-icon-end-event-none',
57073
+ 'escalation-boundary': {
57074
+ label: 'Escalation boundary event',
57075
+ className: 'bpmn-icon-intermediate-event-catch-escalation',
56650
57076
  target: {
56651
- type: 'bpmn:EndEvent'
57077
+ type: 'bpmn:BoundaryEvent',
57078
+ eventDefinitionType: 'bpmn:EscalationEventDefinition',
57079
+ cancelActivity: true
56652
57080
  }
56653
57081
  },
56654
- {
56655
- label: 'Message end event',
56656
- actionName: 'replace-with-message-end',
56657
- className: 'bpmn-icon-end-event-message',
57082
+ 'conditional-boundary': {
57083
+ label: 'Conditional boundary event',
57084
+ className: 'bpmn-icon-intermediate-event-catch-condition',
56658
57085
  target: {
56659
- type: 'bpmn:EndEvent',
56660
- eventDefinitionType: 'bpmn:MessageEventDefinition'
57086
+ type: 'bpmn:BoundaryEvent',
57087
+ eventDefinitionType: 'bpmn:ConditionalEventDefinition',
57088
+ cancelActivity: true
56661
57089
  }
56662
57090
  },
56663
- {
56664
- label: 'Escalation end event',
56665
- actionName: 'replace-with-escalation-end',
56666
- className: 'bpmn-icon-end-event-escalation',
57091
+ 'error-boundary': {
57092
+ label: 'Error boundary event',
57093
+ className: 'bpmn-icon-intermediate-event-catch-error',
56667
57094
  target: {
56668
- type: 'bpmn:EndEvent',
56669
- eventDefinitionType: 'bpmn:EscalationEventDefinition'
57095
+ type: 'bpmn:BoundaryEvent',
57096
+ eventDefinitionType: 'bpmn:ErrorEventDefinition',
57097
+ cancelActivity: true
56670
57098
  }
56671
57099
  },
56672
- {
56673
- label: 'Error end event',
56674
- actionName: 'replace-with-error-end',
56675
- className: 'bpmn-icon-end-event-error',
57100
+ 'cancel-boundary': {
57101
+ label: 'Cancel boundary event',
57102
+ className: 'bpmn-icon-intermediate-event-catch-cancel',
56676
57103
  target: {
56677
- type: 'bpmn:EndEvent',
56678
- eventDefinitionType: 'bpmn:ErrorEventDefinition'
57104
+ type: 'bpmn:BoundaryEvent',
57105
+ eventDefinitionType: 'bpmn:CancelEventDefinition',
57106
+ cancelActivity: true
56679
57107
  }
56680
57108
  },
56681
- {
56682
- label: 'Cancel end event',
56683
- actionName: 'replace-with-cancel-end',
56684
- className: 'bpmn-icon-end-event-cancel',
57109
+ 'signal-boundary': {
57110
+ label: 'Signal boundary event',
57111
+ className: 'bpmn-icon-intermediate-event-catch-signal',
56685
57112
  target: {
56686
- type: 'bpmn:EndEvent',
56687
- eventDefinitionType: 'bpmn:CancelEventDefinition'
57113
+ type: 'bpmn:BoundaryEvent',
57114
+ eventDefinitionType: 'bpmn:SignalEventDefinition',
57115
+ cancelActivity: true
56688
57116
  }
56689
57117
  },
56690
- {
57118
+ 'compensation-boundary': {
57119
+ label: 'Compensation boundary event',
57120
+ className: 'bpmn-icon-intermediate-event-catch-compensation',
57121
+ target: {
57122
+ type: 'bpmn:BoundaryEvent',
57123
+ eventDefinitionType: 'bpmn:CompensateEventDefinition',
57124
+ cancelActivity: true
57125
+ }
57126
+ },
57127
+
57128
+ // Events — boundary (non-interrupting)
57129
+ 'non-interrupting-message-boundary': {
57130
+ label: 'Message boundary event (non-interrupting)',
57131
+ className: 'bpmn-icon-intermediate-event-catch-non-interrupting-message',
57132
+ target: {
57133
+ type: 'bpmn:BoundaryEvent',
57134
+ eventDefinitionType: 'bpmn:MessageEventDefinition',
57135
+ cancelActivity: false
57136
+ }
57137
+ },
57138
+ 'non-interrupting-timer-boundary': {
57139
+ label: 'Timer boundary event (non-interrupting)',
57140
+ className: 'bpmn-icon-intermediate-event-catch-non-interrupting-timer',
57141
+ target: {
57142
+ type: 'bpmn:BoundaryEvent',
57143
+ eventDefinitionType: 'bpmn:TimerEventDefinition',
57144
+ cancelActivity: false
57145
+ }
57146
+ },
57147
+ 'non-interrupting-escalation-boundary': {
57148
+ label: 'Escalation boundary event (non-interrupting)',
57149
+ className: 'bpmn-icon-intermediate-event-catch-non-interrupting-escalation',
57150
+ target: {
57151
+ type: 'bpmn:BoundaryEvent',
57152
+ eventDefinitionType: 'bpmn:EscalationEventDefinition',
57153
+ cancelActivity: false
57154
+ }
57155
+ },
57156
+ 'non-interrupting-conditional-boundary': {
57157
+ label: 'Conditional boundary event (non-interrupting)',
57158
+ className: 'bpmn-icon-intermediate-event-catch-non-interrupting-condition',
57159
+ target: {
57160
+ type: 'bpmn:BoundaryEvent',
57161
+ eventDefinitionType: 'bpmn:ConditionalEventDefinition',
57162
+ cancelActivity: false
57163
+ }
57164
+ },
57165
+ 'non-interrupting-signal-boundary': {
57166
+ label: 'Signal boundary event (non-interrupting)',
57167
+ className: 'bpmn-icon-intermediate-event-catch-non-interrupting-signal',
57168
+ target: {
57169
+ type: 'bpmn:BoundaryEvent',
57170
+ eventDefinitionType: 'bpmn:SignalEventDefinition',
57171
+ cancelActivity: false
57172
+ }
57173
+ },
57174
+
57175
+ // Events — typed end
57176
+ 'message-end': {
57177
+ label: 'Message end event',
57178
+ className: 'bpmn-icon-end-event-message',
57179
+ target: {
57180
+ type: 'bpmn:EndEvent',
57181
+ eventDefinitionType: 'bpmn:MessageEventDefinition'
57182
+ }
57183
+ },
57184
+ 'escalation-end': {
57185
+ label: 'Escalation end event',
57186
+ className: 'bpmn-icon-end-event-escalation',
57187
+ target: {
57188
+ type: 'bpmn:EndEvent',
57189
+ eventDefinitionType: 'bpmn:EscalationEventDefinition'
57190
+ }
57191
+ },
57192
+ 'error-end': {
57193
+ label: 'Error end event',
57194
+ className: 'bpmn-icon-end-event-error',
57195
+ target: {
57196
+ type: 'bpmn:EndEvent',
57197
+ eventDefinitionType: 'bpmn:ErrorEventDefinition'
57198
+ }
57199
+ },
57200
+ 'cancel-end': {
57201
+ label: 'Cancel end event',
57202
+ className: 'bpmn-icon-end-event-cancel',
57203
+ target: {
57204
+ type: 'bpmn:EndEvent',
57205
+ eventDefinitionType: 'bpmn:CancelEventDefinition'
57206
+ }
57207
+ },
57208
+ 'compensation-end': {
56691
57209
  label: 'Compensation end event',
56692
- actionName: 'replace-with-compensation-end',
56693
57210
  className: 'bpmn-icon-end-event-compensation',
56694
57211
  target: {
56695
57212
  type: 'bpmn:EndEvent',
56696
57213
  eventDefinitionType: 'bpmn:CompensateEventDefinition'
56697
57214
  }
56698
57215
  },
56699
- {
57216
+ 'signal-end': {
56700
57217
  label: 'Signal end event',
56701
- actionName: 'replace-with-signal-end',
56702
57218
  className: 'bpmn-icon-end-event-signal',
56703
57219
  target: {
56704
57220
  type: 'bpmn:EndEvent',
56705
57221
  eventDefinitionType: 'bpmn:SignalEventDefinition'
56706
57222
  }
56707
57223
  },
56708
- {
57224
+ 'terminate-end': {
56709
57225
  label: 'Terminate end event',
56710
- actionName: 'replace-with-terminate-end',
56711
57226
  className: 'bpmn-icon-end-event-terminate',
56712
57227
  target: {
56713
57228
  type: 'bpmn:EndEvent',
56714
57229
  eventDefinitionType: 'bpmn:TerminateEventDefinition'
56715
57230
  }
56716
57231
  }
57232
+ };
57233
+
57234
+ /**
57235
+ * @typedef { () => string } LabelGetter
57236
+ *
57237
+ * @typedef { {
57238
+ * label: string | LabelGetter;
57239
+ * actionName: string;
57240
+ * className: string;
57241
+ * target?: {
57242
+ * type: string;
57243
+ * isExpanded?: boolean;
57244
+ * isInterrupting?: boolean;
57245
+ * triggeredByEvent?: boolean;
57246
+ * cancelActivity?: boolean;
57247
+ * eventDefinitionType?: string;
57248
+ * eventDefinitionAttrs?: Record<string, any>
57249
+ * };
57250
+ * } } ReplaceOption
57251
+ */
57252
+
57253
+
57254
+ /**
57255
+ * Build a replace option from the shared `PopupEntries` catalog. The `actionName`
57256
+ * defaults to `replace-with-<id>`.
57257
+ *
57258
+ * @param {string} id popup entry id
57259
+ * @param {Object} [extra] fields to override or add (e.g. `actionName`, `label`)
57260
+ *
57261
+ * @return {ReplaceOption}
57262
+ */
57263
+ function replaceWith(id, extra = {}) {
57264
+ var entry = PopupEntries[id];
57265
+
57266
+ if (!entry) {
57267
+ throw new Error('unknown popup entry <' + id + '>');
57268
+ }
57269
+
57270
+ return {
57271
+ ...entry,
57272
+ actionName: 'replace-with-' + id,
57273
+ ...extra
57274
+ };
57275
+ }
57276
+
57277
+ /**
57278
+ * @type {ReplaceOption[]}
57279
+ */
57280
+ var START_EVENT = [
57281
+ replaceWith('none-start-event', { actionName: 'replace-with-none-start' }),
57282
+ replaceWith('none-intermediate-throwing'),
57283
+ replaceWith('none-end-event', { actionName: 'replace-with-none-end' }),
57284
+ replaceWith('message-start'),
57285
+ replaceWith('timer-start'),
57286
+ replaceWith('conditional-start'),
57287
+ replaceWith('signal-start')
57288
+ ];
57289
+
57290
+ /**
57291
+ * @type {ReplaceOption[]}
57292
+ */
57293
+ var START_EVENT_SUB_PROCESS = [
57294
+ replaceWith('none-start-event', { actionName: 'replace-with-none-start' }),
57295
+ replaceWith('none-intermediate-throwing'),
57296
+ replaceWith('none-end-event', { actionName: 'replace-with-none-end' })
57297
+ ];
57298
+
57299
+ /**
57300
+ * @type {ReplaceOption[]}
57301
+ */
57302
+ var INTERMEDIATE_EVENT = [
57303
+ replaceWith('none-start-event', { actionName: 'replace-with-none-start' }),
57304
+ replaceWith('none-intermediate-throwing', { actionName: 'replace-with-none-intermediate-throw' }),
57305
+ replaceWith('none-end-event', { actionName: 'replace-with-none-end' }),
57306
+ replaceWith('message-intermediate-catch'),
57307
+ replaceWith('message-intermediate-throw'),
57308
+ replaceWith('timer-intermediate-catch'),
57309
+ replaceWith('escalation-intermediate-throw'),
57310
+ replaceWith('conditional-intermediate-catch'),
57311
+ replaceWith('link-intermediate-catch'),
57312
+ replaceWith('link-intermediate-throw'),
57313
+ replaceWith('compensation-intermediate-throw'),
57314
+ replaceWith('signal-intermediate-catch'),
57315
+ replaceWith('signal-intermediate-throw')
57316
+ ];
57317
+
57318
+ /**
57319
+ * @type {ReplaceOption[]}
57320
+ */
57321
+ var END_EVENT = [
57322
+ replaceWith('none-start-event', { actionName: 'replace-with-none-start' }),
57323
+ replaceWith('none-intermediate-throwing', { actionName: 'replace-with-none-intermediate-throw' }),
57324
+ replaceWith('none-end-event', { actionName: 'replace-with-none-end' }),
57325
+ replaceWith('message-end'),
57326
+ replaceWith('escalation-end'),
57327
+ replaceWith('error-end'),
57328
+ replaceWith('cancel-end'),
57329
+ replaceWith('compensation-end'),
57330
+ replaceWith('signal-end'),
57331
+ replaceWith('terminate-end')
56717
57332
  ];
56718
57333
 
56719
57334
  /**
56720
57335
  * @type {ReplaceOption[]}
56721
57336
  */
56722
57337
  var GATEWAY = [
56723
- {
56724
- label: 'Exclusive gateway',
56725
- actionName: 'replace-with-exclusive-gateway',
56726
- className: 'bpmn-icon-gateway-xor',
56727
- target: {
56728
- type: 'bpmn:ExclusiveGateway'
56729
- }
56730
- },
56731
- {
56732
- label: 'Parallel gateway',
56733
- actionName: 'replace-with-parallel-gateway',
56734
- className: 'bpmn-icon-gateway-parallel',
56735
- target: {
56736
- type: 'bpmn:ParallelGateway'
56737
- }
56738
- },
56739
- {
56740
- label: 'Inclusive gateway',
56741
- actionName: 'replace-with-inclusive-gateway',
56742
- className: 'bpmn-icon-gateway-or',
56743
- target: {
56744
- type: 'bpmn:InclusiveGateway'
56745
- }
56746
- },
56747
- {
56748
- label: 'Complex gateway',
56749
- actionName: 'replace-with-complex-gateway',
56750
- className: 'bpmn-icon-gateway-complex',
56751
- target: {
56752
- type: 'bpmn:ComplexGateway'
56753
- }
56754
- },
56755
- {
56756
- label: 'Event-based gateway',
56757
- actionName: 'replace-with-event-based-gateway',
56758
- className: 'bpmn-icon-gateway-eventbased',
56759
- target: {
56760
- type: 'bpmn:EventBasedGateway',
56761
- instantiate: false,
56762
- eventGatewayType: 'Exclusive'
56763
- }
56764
- }
57338
+ replaceWith('exclusive-gateway'),
57339
+ replaceWith('parallel-gateway'),
57340
+ replaceWith('inclusive-gateway'),
57341
+ replaceWith('complex-gateway'),
57342
+ replaceWith('event-based-gateway')
56765
57343
 
56766
57344
  // Gateways deactivated until https://github.com/bpmn-io/bpmn-js/issues/194
56767
57345
  // {
@@ -56792,129 +57370,30 @@
56792
57370
  * @type {ReplaceOption[]}
56793
57371
  */
56794
57372
  var SUBPROCESS_EXPANDED = [
56795
- {
56796
- label: 'Transaction',
56797
- actionName: 'replace-with-transaction',
56798
- className: 'bpmn-icon-transaction',
56799
- target: {
56800
- type: 'bpmn:Transaction',
56801
- isExpanded: true
56802
- }
56803
- },
56804
- {
56805
- label: 'Event sub-process',
56806
- actionName: 'replace-with-event-subprocess',
56807
- className: 'bpmn-icon-event-subprocess-expanded',
56808
- target: {
56809
- type: 'bpmn:SubProcess',
56810
- triggeredByEvent: true,
56811
- isExpanded: true
56812
- }
56813
- },
56814
- {
56815
- label: 'Ad-hoc sub-process',
56816
- actionName: 'replace-with-ad-hoc-subprocess',
56817
- className: 'bpmn-icon-subprocess-expanded',
56818
- target: {
56819
- type: 'bpmn:AdHocSubProcess',
56820
- isExpanded: true
56821
- }
56822
- },
56823
- {
56824
- label: 'Sub-process (collapsed)',
56825
- actionName: 'replace-with-collapsed-subprocess',
56826
- className: 'bpmn-icon-subprocess-collapsed',
56827
- target: {
56828
- type: 'bpmn:SubProcess',
56829
- isExpanded: false
56830
- }
56831
- }
57373
+ replaceWith('transaction'),
57374
+ replaceWith('event-subprocess'),
57375
+ replaceWith('expanded-ad-hoc-subprocess', { actionName: 'replace-with-ad-hoc-subprocess', label: 'Ad-hoc sub-process' }),
57376
+ replaceWith('collapsed-subprocess')
56832
57377
  ];
56833
57378
 
56834
57379
  /**
56835
57380
  * @type {ReplaceOption[]}
56836
57381
  */
56837
57382
  var AD_HOC_SUBPROCESS_EXPANDED = [
56838
- {
56839
- label: 'Sub-process',
56840
- actionName: 'replace-with-subprocess',
56841
- className: 'bpmn-icon-subprocess-expanded',
56842
- target: {
56843
- type: 'bpmn:SubProcess',
56844
- isExpanded: true
56845
- }
56846
- },
56847
- {
56848
- label: 'Transaction',
56849
- actionName: 'replace-with-transaction',
56850
- className: 'bpmn-icon-transaction',
56851
- target: {
56852
- type: 'bpmn:Transaction',
56853
- isExpanded: true
56854
- }
56855
- },
56856
- {
56857
- label: 'Event sub-process',
56858
- actionName: 'replace-with-event-subprocess',
56859
- className: 'bpmn-icon-event-subprocess-expanded',
56860
- target: {
56861
- type: 'bpmn:SubProcess',
56862
- triggeredByEvent: true,
56863
- isExpanded: true
56864
- }
56865
- },
56866
- {
56867
- label: 'Ad-hoc sub-process (collapsed)',
56868
- actionName: 'replace-with-collapsed-ad-hoc-subprocess',
56869
- className: 'bpmn-icon-subprocess-collapsed',
56870
- target: {
56871
- type: 'bpmn:AdHocSubProcess',
56872
- isExpanded: false
56873
- }
56874
- }
57383
+ replaceWith('expanded-subprocess', { actionName: 'replace-with-subprocess', label: 'Sub-process' }),
57384
+ replaceWith('transaction'),
57385
+ replaceWith('event-subprocess'),
57386
+ replaceWith('collapsed-ad-hoc-subprocess')
56875
57387
  ];
56876
57388
 
56877
57389
  /**
56878
57390
  * @type {ReplaceOption[]}
56879
57391
  */
56880
57392
  var TRANSACTION = [
56881
- {
56882
- label: 'Transaction',
56883
- actionName: 'replace-with-transaction',
56884
- className: 'bpmn-icon-transaction',
56885
- target: {
56886
- type: 'bpmn:Transaction',
56887
- isExpanded: true
56888
- }
56889
- },
56890
- {
56891
- label: 'Sub-process',
56892
- actionName: 'replace-with-subprocess',
56893
- className: 'bpmn-icon-subprocess-expanded',
56894
- target: {
56895
- type: 'bpmn:SubProcess',
56896
- isExpanded: true
56897
- }
56898
- },
56899
- {
56900
- label: 'Ad-hoc sub-process',
56901
- actionName: 'replace-with-ad-hoc-subprocess',
56902
- className: 'bpmn-icon-subprocess-expanded',
56903
- target: {
56904
- type: 'bpmn:AdHocSubProcess',
56905
- isExpanded: true
56906
- }
56907
- },
56908
- {
56909
- label: 'Event sub-process',
56910
- actionName: 'replace-with-event-subprocess',
56911
- className: 'bpmn-icon-event-subprocess-expanded',
56912
- target: {
56913
- type: 'bpmn:SubProcess',
56914
- triggeredByEvent: true,
56915
- isExpanded: true
56916
- }
56917
- }
57393
+ replaceWith('transaction'),
57394
+ replaceWith('expanded-subprocess', { actionName: 'replace-with-subprocess', label: 'Sub-process' }),
57395
+ replaceWith('expanded-ad-hoc-subprocess', { actionName: 'replace-with-ad-hoc-subprocess', label: 'Ad-hoc sub-process' }),
57396
+ replaceWith('event-subprocess')
56918
57397
  ];
56919
57398
 
56920
57399
  /**
@@ -56926,404 +57405,70 @@
56926
57405
  * @type {ReplaceOption[]}
56927
57406
  */
56928
57407
  var TASK = [
56929
- {
56930
- label: 'Task',
56931
- actionName: 'replace-with-task',
56932
- className: 'bpmn-icon-task',
56933
- target: {
56934
- type: 'bpmn:Task'
56935
- }
56936
- },
56937
- {
56938
- label: 'User task',
56939
- actionName: 'replace-with-user-task',
56940
- className: 'bpmn-icon-user',
56941
- target: {
56942
- type: 'bpmn:UserTask'
56943
- }
56944
- },
56945
- {
56946
- label: 'Service task',
56947
- actionName: 'replace-with-service-task',
56948
- className: 'bpmn-icon-service',
56949
- target: {
56950
- type: 'bpmn:ServiceTask'
56951
- }
56952
- },
56953
- {
56954
- label: 'Send task',
56955
- actionName: 'replace-with-send-task',
56956
- className: 'bpmn-icon-send',
56957
- target: {
56958
- type: 'bpmn:SendTask'
56959
- }
56960
- },
56961
- {
56962
- label: 'Receive task',
56963
- actionName: 'replace-with-receive-task',
56964
- className: 'bpmn-icon-receive',
56965
- target: {
56966
- type: 'bpmn:ReceiveTask'
56967
- }
56968
- },
56969
- {
56970
- label: 'Manual task',
56971
- actionName: 'replace-with-manual-task',
56972
- className: 'bpmn-icon-manual',
56973
- target: {
56974
- type: 'bpmn:ManualTask'
56975
- }
56976
- },
56977
- {
56978
- label: 'Business rule task',
56979
- actionName: 'replace-with-rule-task',
56980
- className: 'bpmn-icon-business-rule',
56981
- target: {
56982
- type: 'bpmn:BusinessRuleTask'
56983
- }
56984
- },
56985
- {
56986
- label: 'Script task',
56987
- actionName: 'replace-with-script-task',
56988
- className: 'bpmn-icon-script',
56989
- target: {
56990
- type: 'bpmn:ScriptTask'
56991
- }
56992
- },
56993
- {
56994
- label: 'Call activity',
56995
- actionName: 'replace-with-call-activity',
56996
- className: 'bpmn-icon-call-activity',
56997
- target: {
56998
- type: 'bpmn:CallActivity'
56999
- }
57000
- },
57001
- {
57002
- label: 'Sub-process (collapsed)',
57003
- actionName: 'replace-with-collapsed-subprocess',
57004
- className: 'bpmn-icon-subprocess-collapsed',
57005
- target: {
57006
- type: 'bpmn:SubProcess',
57007
- isExpanded: false
57008
- }
57009
- },
57010
- {
57011
- label: 'Sub-process (expanded)',
57012
- actionName: 'replace-with-expanded-subprocess',
57013
- className: 'bpmn-icon-subprocess-expanded',
57014
- target: {
57015
- type: 'bpmn:SubProcess',
57016
- isExpanded: true
57017
- }
57018
- },
57019
- {
57020
- label: 'Ad-hoc sub-process (collapsed)',
57021
- actionName: 'replace-with-collapsed-ad-hoc-subprocess',
57022
- className: 'bpmn-icon-subprocess-collapsed',
57023
- target: {
57024
- type: 'bpmn:AdHocSubProcess',
57025
- isExpanded: false
57026
- }
57027
- },
57028
- {
57029
- label: 'Ad-hoc sub-process (expanded)',
57030
- actionName: 'replace-with-ad-hoc-subprocess',
57031
- className: 'bpmn-icon-subprocess-expanded',
57032
- target: {
57033
- type: 'bpmn:AdHocSubProcess',
57034
- isExpanded: true
57035
- }
57036
- }
57408
+ replaceWith('task'),
57409
+ replaceWith('user-task'),
57410
+ replaceWith('service-task'),
57411
+ replaceWith('send-task'),
57412
+ replaceWith('receive-task'),
57413
+ replaceWith('manual-task'),
57414
+ replaceWith('rule-task'),
57415
+ replaceWith('script-task'),
57416
+ replaceWith('call-activity'),
57417
+ replaceWith('collapsed-subprocess'),
57418
+ replaceWith('expanded-subprocess'),
57419
+ replaceWith('collapsed-ad-hoc-subprocess'),
57420
+ replaceWith('expanded-ad-hoc-subprocess', { actionName: 'replace-with-ad-hoc-subprocess' })
57037
57421
  ];
57038
57422
 
57039
57423
  /**
57040
57424
  * @type {ReplaceOption[]}
57041
57425
  */
57042
57426
  var DATA_OBJECT_REFERENCE = [
57043
- {
57044
- label: 'Data store reference',
57045
- actionName: 'replace-with-data-store-reference',
57046
- className: 'bpmn-icon-data-store',
57047
- target: {
57048
- type: 'bpmn:DataStoreReference'
57049
- }
57050
- }
57427
+ replaceWith('data-store-reference')
57051
57428
  ];
57052
57429
 
57053
57430
  /**
57054
57431
  * @type {ReplaceOption[]}
57055
57432
  */
57056
57433
  var DATA_STORE_REFERENCE = [
57057
- {
57058
- label: 'Data object reference',
57059
- actionName: 'replace-with-data-object-reference',
57060
- className: 'bpmn-icon-data-object',
57061
- target: {
57062
- type: 'bpmn:DataObjectReference'
57063
- }
57064
- }
57434
+ replaceWith('data-object-reference')
57065
57435
  ];
57066
57436
 
57067
57437
  /**
57068
57438
  * @type {ReplaceOption[]}
57069
57439
  */
57070
57440
  var BOUNDARY_EVENT = [
57071
- {
57072
- label: 'Message boundary event',
57073
- actionName: 'replace-with-message-boundary',
57074
- className: 'bpmn-icon-intermediate-event-catch-message',
57075
- target: {
57076
- type: 'bpmn:BoundaryEvent',
57077
- eventDefinitionType: 'bpmn:MessageEventDefinition',
57078
- cancelActivity: true
57079
- }
57080
- },
57081
- {
57082
- label: 'Timer boundary event',
57083
- actionName: 'replace-with-timer-boundary',
57084
- className: 'bpmn-icon-intermediate-event-catch-timer',
57085
- target: {
57086
- type: 'bpmn:BoundaryEvent',
57087
- eventDefinitionType: 'bpmn:TimerEventDefinition',
57088
- cancelActivity: true
57089
- }
57090
- },
57091
- {
57092
- label: 'Escalation boundary event',
57093
- actionName: 'replace-with-escalation-boundary',
57094
- className: 'bpmn-icon-intermediate-event-catch-escalation',
57095
- target: {
57096
- type: 'bpmn:BoundaryEvent',
57097
- eventDefinitionType: 'bpmn:EscalationEventDefinition',
57098
- cancelActivity: true
57099
- }
57100
- },
57101
- {
57102
- label: 'Conditional boundary event',
57103
- actionName: 'replace-with-conditional-boundary',
57104
- className: 'bpmn-icon-intermediate-event-catch-condition',
57105
- target: {
57106
- type: 'bpmn:BoundaryEvent',
57107
- eventDefinitionType: 'bpmn:ConditionalEventDefinition',
57108
- cancelActivity: true
57109
- }
57110
- },
57111
- {
57112
- label: 'Error boundary event',
57113
- actionName: 'replace-with-error-boundary',
57114
- className: 'bpmn-icon-intermediate-event-catch-error',
57115
- target: {
57116
- type: 'bpmn:BoundaryEvent',
57117
- eventDefinitionType: 'bpmn:ErrorEventDefinition',
57118
- cancelActivity: true
57119
- }
57120
- },
57121
- {
57122
- label: 'Cancel boundary event',
57123
- actionName: 'replace-with-cancel-boundary',
57124
- className: 'bpmn-icon-intermediate-event-catch-cancel',
57125
- target: {
57126
- type: 'bpmn:BoundaryEvent',
57127
- eventDefinitionType: 'bpmn:CancelEventDefinition',
57128
- cancelActivity: true
57129
- }
57130
- },
57131
- {
57132
- label: 'Signal boundary event',
57133
- actionName: 'replace-with-signal-boundary',
57134
- className: 'bpmn-icon-intermediate-event-catch-signal',
57135
- target: {
57136
- type: 'bpmn:BoundaryEvent',
57137
- eventDefinitionType: 'bpmn:SignalEventDefinition',
57138
- cancelActivity: true
57139
- }
57140
- },
57141
- {
57142
- label: 'Compensation boundary event',
57143
- actionName: 'replace-with-compensation-boundary',
57144
- className: 'bpmn-icon-intermediate-event-catch-compensation',
57145
- target: {
57146
- type: 'bpmn:BoundaryEvent',
57147
- eventDefinitionType: 'bpmn:CompensateEventDefinition',
57148
- cancelActivity: true
57149
- }
57150
- },
57151
- {
57152
- label: 'Message boundary event (non-interrupting)',
57153
- actionName: 'replace-with-non-interrupting-message-boundary',
57154
- className: 'bpmn-icon-intermediate-event-catch-non-interrupting-message',
57155
- target: {
57156
- type: 'bpmn:BoundaryEvent',
57157
- eventDefinitionType: 'bpmn:MessageEventDefinition',
57158
- cancelActivity: false
57159
- }
57160
- },
57161
- {
57162
- label: 'Timer boundary event (non-interrupting)',
57163
- actionName: 'replace-with-non-interrupting-timer-boundary',
57164
- className: 'bpmn-icon-intermediate-event-catch-non-interrupting-timer',
57165
- target: {
57166
- type: 'bpmn:BoundaryEvent',
57167
- eventDefinitionType: 'bpmn:TimerEventDefinition',
57168
- cancelActivity: false
57169
- }
57170
- },
57171
- {
57172
- label: 'Escalation boundary event (non-interrupting)',
57173
- actionName: 'replace-with-non-interrupting-escalation-boundary',
57174
- className: 'bpmn-icon-intermediate-event-catch-non-interrupting-escalation',
57175
- target: {
57176
- type: 'bpmn:BoundaryEvent',
57177
- eventDefinitionType: 'bpmn:EscalationEventDefinition',
57178
- cancelActivity: false
57179
- }
57180
- },
57181
- {
57182
- label: 'Conditional boundary event (non-interrupting)',
57183
- actionName: 'replace-with-non-interrupting-conditional-boundary',
57184
- className: 'bpmn-icon-intermediate-event-catch-non-interrupting-condition',
57185
- target: {
57186
- type: 'bpmn:BoundaryEvent',
57187
- eventDefinitionType: 'bpmn:ConditionalEventDefinition',
57188
- cancelActivity: false
57189
- }
57190
- },
57191
- {
57192
- label: 'Signal boundary event (non-interrupting)',
57193
- actionName: 'replace-with-non-interrupting-signal-boundary',
57194
- className: 'bpmn-icon-intermediate-event-catch-non-interrupting-signal',
57195
- target: {
57196
- type: 'bpmn:BoundaryEvent',
57197
- eventDefinitionType: 'bpmn:SignalEventDefinition',
57198
- cancelActivity: false
57199
- }
57200
- }
57441
+ replaceWith('message-boundary'),
57442
+ replaceWith('timer-boundary'),
57443
+ replaceWith('escalation-boundary'),
57444
+ replaceWith('conditional-boundary'),
57445
+ replaceWith('error-boundary'),
57446
+ replaceWith('cancel-boundary'),
57447
+ replaceWith('signal-boundary'),
57448
+ replaceWith('compensation-boundary'),
57449
+ replaceWith('non-interrupting-message-boundary'),
57450
+ replaceWith('non-interrupting-timer-boundary'),
57451
+ replaceWith('non-interrupting-escalation-boundary'),
57452
+ replaceWith('non-interrupting-conditional-boundary'),
57453
+ replaceWith('non-interrupting-signal-boundary')
57201
57454
  ];
57202
57455
 
57203
57456
  /**
57204
57457
  * @type {ReplaceOption[]}
57205
57458
  */
57206
57459
  var EVENT_SUB_PROCESS_START_EVENT = [
57207
- {
57208
- label: 'Message start event',
57209
- actionName: 'replace-with-message-start',
57210
- className: 'bpmn-icon-start-event-message',
57211
- target: {
57212
- type: 'bpmn:StartEvent',
57213
- eventDefinitionType: 'bpmn:MessageEventDefinition',
57214
- isInterrupting: true
57215
- }
57216
- },
57217
- {
57218
- label: 'Timer start event',
57219
- actionName: 'replace-with-timer-start',
57220
- className: 'bpmn-icon-start-event-timer',
57221
- target: {
57222
- type: 'bpmn:StartEvent',
57223
- eventDefinitionType: 'bpmn:TimerEventDefinition',
57224
- isInterrupting: true
57225
- }
57226
- },
57227
- {
57228
- label: 'Conditional start event',
57229
- actionName: 'replace-with-conditional-start',
57230
- className: 'bpmn-icon-start-event-condition',
57231
- target: {
57232
- type: 'bpmn:StartEvent',
57233
- eventDefinitionType: 'bpmn:ConditionalEventDefinition',
57234
- isInterrupting: true
57235
- }
57236
- },
57237
- {
57238
- label: 'Signal start event',
57239
- actionName: 'replace-with-signal-start',
57240
- className: 'bpmn-icon-start-event-signal',
57241
- target: {
57242
- type: 'bpmn:StartEvent',
57243
- eventDefinitionType: 'bpmn:SignalEventDefinition',
57244
- isInterrupting: true
57245
- }
57246
- },
57247
- {
57248
- label: 'Error start event',
57249
- actionName: 'replace-with-error-start',
57250
- className: 'bpmn-icon-start-event-error',
57251
- target: {
57252
- type: 'bpmn:StartEvent',
57253
- eventDefinitionType: 'bpmn:ErrorEventDefinition',
57254
- isInterrupting: true
57255
- }
57256
- },
57257
- {
57258
- label: 'Escalation start event',
57259
- actionName: 'replace-with-escalation-start',
57260
- className: 'bpmn-icon-start-event-escalation',
57261
- target: {
57262
- type: 'bpmn:StartEvent',
57263
- eventDefinitionType: 'bpmn:EscalationEventDefinition',
57264
- isInterrupting: true
57265
- }
57266
- },
57267
- {
57268
- label: 'Compensation start event',
57269
- actionName: 'replace-with-compensation-start',
57270
- className: 'bpmn-icon-start-event-compensation',
57271
- target: {
57272
- type: 'bpmn:StartEvent',
57273
- eventDefinitionType: 'bpmn:CompensateEventDefinition',
57274
- isInterrupting: true
57275
- }
57276
- },
57277
- {
57278
- label: 'Message start event (non-interrupting)',
57279
- actionName: 'replace-with-non-interrupting-message-start',
57280
- className: 'bpmn-icon-start-event-non-interrupting-message',
57281
- target: {
57282
- type: 'bpmn:StartEvent',
57283
- eventDefinitionType: 'bpmn:MessageEventDefinition',
57284
- isInterrupting: false
57285
- }
57286
- },
57287
- {
57288
- label: 'Timer start event (non-interrupting)',
57289
- actionName: 'replace-with-non-interrupting-timer-start',
57290
- className: 'bpmn-icon-start-event-non-interrupting-timer',
57291
- target: {
57292
- type: 'bpmn:StartEvent',
57293
- eventDefinitionType: 'bpmn:TimerEventDefinition',
57294
- isInterrupting: false
57295
- }
57296
- },
57297
- {
57298
- label: 'Conditional start event (non-interrupting)',
57299
- actionName: 'replace-with-non-interrupting-conditional-start',
57300
- className: 'bpmn-icon-start-event-non-interrupting-condition',
57301
- target: {
57302
- type: 'bpmn:StartEvent',
57303
- eventDefinitionType: 'bpmn:ConditionalEventDefinition',
57304
- isInterrupting: false
57305
- }
57306
- },
57307
- {
57308
- label: 'Signal start event (non-interrupting)',
57309
- actionName: 'replace-with-non-interrupting-signal-start',
57310
- className: 'bpmn-icon-start-event-non-interrupting-signal',
57311
- target: {
57312
- type: 'bpmn:StartEvent',
57313
- eventDefinitionType: 'bpmn:SignalEventDefinition',
57314
- isInterrupting: false
57315
- }
57316
- },
57317
- {
57318
- label: 'Escalation start event (non-interrupting)',
57319
- actionName: 'replace-with-non-interrupting-escalation-start',
57320
- className: 'bpmn-icon-start-event-non-interrupting-escalation',
57321
- target: {
57322
- type: 'bpmn:StartEvent',
57323
- eventDefinitionType: 'bpmn:EscalationEventDefinition',
57324
- isInterrupting: false
57325
- }
57326
- }
57460
+ replaceWith('message-start'),
57461
+ replaceWith('timer-start'),
57462
+ replaceWith('conditional-start'),
57463
+ replaceWith('signal-start'),
57464
+ replaceWith('error-start'),
57465
+ replaceWith('escalation-start'),
57466
+ replaceWith('compensation-start'),
57467
+ replaceWith('non-interrupting-message-start'),
57468
+ replaceWith('non-interrupting-timer-start'),
57469
+ replaceWith('non-interrupting-conditional-start'),
57470
+ replaceWith('non-interrupting-signal-start'),
57471
+ replaceWith('non-interrupting-escalation-start')
57327
57472
  ];
57328
57473
 
57329
57474
  /**
@@ -57351,16 +57496,8 @@
57351
57496
  * @type {ReplaceOption[]}
57352
57497
  */
57353
57498
  var PARTICIPANT = [
57354
- {
57355
- label: 'Expanded pool/participant',
57356
- actionName: 'replace-with-expanded-pool',
57357
- className: 'bpmn-icon-participant',
57358
- target: {
57359
- type: 'bpmn:Participant',
57360
- isExpanded: true
57361
- }
57362
- },
57363
- {
57499
+ replaceWith('expanded-pool'),
57500
+ replaceWith('collapsed-pool', {
57364
57501
  label: function(element) {
57365
57502
  var label = 'Empty pool/participant';
57366
57503
 
@@ -57369,16 +57506,8 @@
57369
57506
  }
57370
57507
 
57371
57508
  return label;
57372
- },
57373
- actionName: 'replace-with-collapsed-pool',
57374
-
57375
- // TODO(@janstuemmel): maybe design new icon
57376
- className: 'bpmn-icon-lane',
57377
- target: {
57378
- type: 'bpmn:Participant',
57379
- isExpanded: false
57380
57509
  }
57381
- }
57510
+ })
57382
57511
  ];
57383
57512
 
57384
57513
  /**
@@ -57386,205 +57515,38 @@
57386
57515
  */
57387
57516
  var TYPED_EVENT = {
57388
57517
  'bpmn:MessageEventDefinition': [
57389
- {
57390
- label: 'Message start event',
57391
- actionName: 'replace-with-message-start',
57392
- className: 'bpmn-icon-start-event-message',
57393
- target: {
57394
- type: 'bpmn:StartEvent',
57395
- eventDefinitionType: 'bpmn:MessageEventDefinition',
57396
- isInterrupting: true
57397
- }
57398
- },
57399
- {
57400
- label: 'Message intermediate catch event',
57401
- actionName: 'replace-with-message-intermediate-catch',
57402
- className: 'bpmn-icon-intermediate-event-catch-message',
57403
- target: {
57404
- type: 'bpmn:IntermediateCatchEvent',
57405
- eventDefinitionType: 'bpmn:MessageEventDefinition'
57406
- }
57407
- },
57408
- {
57409
- label: 'Message intermediate throw event',
57410
- actionName: 'replace-with-message-intermediate-throw',
57411
- className: 'bpmn-icon-intermediate-event-throw-message',
57412
- target: {
57413
- type: 'bpmn:IntermediateThrowEvent',
57414
- eventDefinitionType: 'bpmn:MessageEventDefinition'
57415
- }
57416
- },
57417
- {
57418
- label: 'Message end event',
57419
- actionName: 'replace-with-message-end',
57420
- className: 'bpmn-icon-end-event-message',
57421
- target: {
57422
- type: 'bpmn:EndEvent',
57423
- eventDefinitionType: 'bpmn:MessageEventDefinition'
57424
- }
57425
- }
57518
+ replaceWith('message-start'),
57519
+ replaceWith('message-intermediate-catch'),
57520
+ replaceWith('message-intermediate-throw'),
57521
+ replaceWith('message-end')
57426
57522
  ],
57427
57523
  'bpmn:TimerEventDefinition': [
57428
- {
57429
- label: 'Timer start event',
57430
- actionName: 'replace-with-timer-start',
57431
- className: 'bpmn-icon-start-event-timer',
57432
- target: {
57433
- type: 'bpmn:StartEvent',
57434
- eventDefinitionType: 'bpmn:TimerEventDefinition',
57435
- isInterrupting: true
57436
- }
57437
- },
57438
- {
57439
- label: 'Timer intermediate catch event',
57440
- actionName: 'replace-with-timer-intermediate-catch',
57441
- className: 'bpmn-icon-intermediate-event-catch-timer',
57442
- target: {
57443
- type: 'bpmn:IntermediateCatchEvent',
57444
- eventDefinitionType: 'bpmn:TimerEventDefinition'
57445
- }
57446
- }
57524
+ replaceWith('timer-start'),
57525
+ replaceWith('timer-intermediate-catch')
57447
57526
  ],
57448
57527
  'bpmn:ConditionalEventDefinition': [
57449
- {
57450
- label: 'Conditional start event',
57451
- actionName: 'replace-with-conditional-start',
57452
- className: 'bpmn-icon-start-event-condition',
57453
- target: {
57454
- type: 'bpmn:StartEvent',
57455
- eventDefinitionType: 'bpmn:ConditionalEventDefinition',
57456
- isInterrupting: true
57457
- }
57458
- },
57459
- {
57460
- label: 'Conditional intermediate catch event',
57461
- actionName: 'replace-with-conditional-intermediate-catch',
57462
- className: 'bpmn-icon-intermediate-event-catch-condition',
57463
- target: {
57464
- type: 'bpmn:IntermediateCatchEvent',
57465
- eventDefinitionType: 'bpmn:ConditionalEventDefinition'
57466
- }
57467
- }
57528
+ replaceWith('conditional-start'),
57529
+ replaceWith('conditional-intermediate-catch')
57468
57530
  ],
57469
57531
  'bpmn:SignalEventDefinition': [
57470
- {
57471
- label: 'Signal start event',
57472
- actionName: 'replace-with-signal-start',
57473
- className: 'bpmn-icon-start-event-signal',
57474
- target: {
57475
- type: 'bpmn:StartEvent',
57476
- eventDefinitionType: 'bpmn:SignalEventDefinition',
57477
- isInterrupting: true
57478
- }
57479
- },
57480
- {
57481
- label: 'Signal intermediate catch event',
57482
- actionName: 'replace-with-signal-intermediate-catch',
57483
- className: 'bpmn-icon-intermediate-event-catch-signal',
57484
- target: {
57485
- type: 'bpmn:IntermediateCatchEvent',
57486
- eventDefinitionType: 'bpmn:SignalEventDefinition'
57487
- }
57488
- },
57489
- {
57490
- label: 'Signal intermediate throw event',
57491
- actionName: 'replace-with-signal-intermediate-throw',
57492
- className: 'bpmn-icon-intermediate-event-throw-signal',
57493
- target: {
57494
- type: 'bpmn:IntermediateThrowEvent',
57495
- eventDefinitionType: 'bpmn:SignalEventDefinition'
57496
- }
57497
- },
57498
- {
57499
- label: 'Signal end event',
57500
- actionName: 'replace-with-signal-end',
57501
- className: 'bpmn-icon-end-event-signal',
57502
- target: {
57503
- type: 'bpmn:EndEvent',
57504
- eventDefinitionType: 'bpmn:SignalEventDefinition'
57505
- }
57506
- }
57532
+ replaceWith('signal-start'),
57533
+ replaceWith('signal-intermediate-catch'),
57534
+ replaceWith('signal-intermediate-throw'),
57535
+ replaceWith('signal-end')
57507
57536
  ],
57508
57537
  'bpmn:ErrorEventDefinition': [
57509
- {
57510
- label: 'Error start event',
57511
- actionName: 'replace-with-error-start',
57512
- className: 'bpmn-icon-start-event-error',
57513
- target: {
57514
- type: 'bpmn:StartEvent',
57515
- eventDefinitionType: 'bpmn:ErrorEventDefinition',
57516
- isInterrupting: true
57517
- }
57518
- },
57519
- {
57520
- label: 'Error end event',
57521
- actionName: 'replace-with-error-end',
57522
- className: 'bpmn-icon-end-event-error',
57523
- target: {
57524
- type: 'bpmn:EndEvent',
57525
- eventDefinitionType: 'bpmn:ErrorEventDefinition'
57526
- }
57527
- }
57538
+ replaceWith('error-start'),
57539
+ replaceWith('error-end')
57528
57540
  ],
57529
57541
  'bpmn:EscalationEventDefinition': [
57530
- {
57531
- label: 'Escalation start event',
57532
- actionName: 'replace-with-escalation-start',
57533
- className: 'bpmn-icon-start-event-escalation',
57534
- target: {
57535
- type: 'bpmn:StartEvent',
57536
- eventDefinitionType: 'bpmn:EscalationEventDefinition',
57537
- isInterrupting: true
57538
- }
57539
- },
57540
- {
57541
- label: 'Escalation intermediate throw event',
57542
- actionName: 'replace-with-escalation-intermediate-throw',
57543
- className: 'bpmn-icon-intermediate-event-throw-escalation',
57544
- target: {
57545
- type: 'bpmn:IntermediateThrowEvent',
57546
- eventDefinitionType: 'bpmn:EscalationEventDefinition'
57547
- }
57548
- },
57549
- {
57550
- label: 'Escalation end event',
57551
- actionName: 'replace-with-escalation-end',
57552
- className: 'bpmn-icon-end-event-escalation',
57553
- target: {
57554
- type: 'bpmn:EndEvent',
57555
- eventDefinitionType: 'bpmn:EscalationEventDefinition'
57556
- }
57557
- }
57542
+ replaceWith('escalation-start'),
57543
+ replaceWith('escalation-intermediate-throw'),
57544
+ replaceWith('escalation-end')
57558
57545
  ],
57559
57546
  'bpmn:CompensateEventDefinition': [
57560
- {
57561
- label: 'Compensation start event',
57562
- actionName: 'replace-with-compensation-start',
57563
- className: 'bpmn-icon-start-event-compensation',
57564
- target: {
57565
- type: 'bpmn:StartEvent',
57566
- eventDefinitionType: 'bpmn:CompensateEventDefinition',
57567
- isInterrupting: true
57568
- }
57569
- },
57570
- {
57571
- label: 'Compensation intermediate throw event',
57572
- actionName: 'replace-with-compensation-intermediate-throw',
57573
- className: 'bpmn-icon-intermediate-event-throw-compensation',
57574
- target: {
57575
- type: 'bpmn:IntermediateThrowEvent',
57576
- eventDefinitionType: 'bpmn:CompensateEventDefinition'
57577
- }
57578
- },
57579
- {
57580
- label: 'Compensation end event',
57581
- actionName: 'replace-with-compensation-end',
57582
- className: 'bpmn-icon-end-event-compensation',
57583
- target: {
57584
- type: 'bpmn:EndEvent',
57585
- eventDefinitionType: 'bpmn:CompensateEventDefinition'
57586
- }
57587
- }
57547
+ replaceWith('compensation-start'),
57548
+ replaceWith('compensation-intermediate-throw'),
57549
+ replaceWith('compensation-end')
57588
57550
  ]
57589
57551
  };
57590
57552
 
@@ -58689,7 +58651,7 @@
58689
58651
 
58690
58652
  popupMenu.open(element, 'bpmn-replace', position, {
58691
58653
  title: translate('Change element'),
58692
- width: 300,
58654
+ width: 'var(--bpmn-replace-popup-width, 300px)',
58693
58655
  search: true
58694
58656
  });
58695
58657
  }