camunda-bpmn-js 0.13.2 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3259,6 +3259,13 @@
3259
3259
  return collection.indexOf(element);
3260
3260
  }
3261
3261
 
3262
+ var Collections = /*#__PURE__*/Object.freeze({
3263
+ __proto__: null,
3264
+ remove: remove$2,
3265
+ add: add$1,
3266
+ indexOf: indexOf$1
3267
+ });
3268
+
3262
3269
  /**
3263
3270
  * Computes the distance between two points
3264
3271
  *
@@ -16002,7 +16009,7 @@
16002
16009
  }
16003
16010
 
16004
16011
  /**
16005
- * Returns all diagrams in the same hirarchy as the requested diagram.
16012
+ * Returns all diagrams in the same hierarchy as the requested diagram.
16006
16013
  * Includes all parent and sub process diagrams.
16007
16014
  *
16008
16015
  * @param {Array} definitions
@@ -20097,7 +20104,7 @@
20097
20104
  });
20098
20105
  }
20099
20106
 
20100
- var translate$2 = {
20107
+ var translateModule = {
20101
20108
  translate: [ 'value', translate$1 ]
20102
20109
  };
20103
20110
 
@@ -20578,7 +20585,7 @@
20578
20585
 
20579
20586
  var ImportModule = {
20580
20587
  __depends__: [
20581
- translate$2
20588
+ translateModule
20582
20589
  ],
20583
20590
  bpmnImporter: [ 'type', BpmnImporter ]
20584
20591
  };
@@ -22427,6 +22434,11 @@
22427
22434
  };
22428
22435
  });
22429
22436
 
22437
+ var CommandInterceptor$1 = /*#__PURE__*/Object.freeze({
22438
+ __proto__: null,
22439
+ 'default': CommandInterceptor
22440
+ });
22441
+
22430
22442
  /**
22431
22443
  * A modeling behavior that ensures we set the correct root element
22432
22444
  * as we undo and redo commands.
@@ -22958,7 +22970,7 @@
22958
22970
  collapsedElements.push(bo);
22959
22971
  }
22960
22972
 
22961
- if (is$1(parent, 'bpmn:SubProcess') && parent !== plane.bpmnElement) {
22973
+ if (shouldMoveToPlane(bo, plane)) {
22962
22974
 
22963
22975
  // don't change the array while we iterate over it
22964
22976
  elementsToMove.push({ diElement: diElement, parent: parent });
@@ -23047,7 +23059,7 @@
23047
23059
  SubprocessCompatibility.$inject = [ 'eventBus', 'moddle' ];
23048
23060
 
23049
23061
 
23050
- // helpers
23062
+ // helpers //////////////////////////
23051
23063
 
23052
23064
  function findRootDiagram(element) {
23053
23065
  if (is$1(element, 'bpmndi:BPMNDiagram')) {
@@ -23079,6 +23091,23 @@
23079
23091
  return asBounds(planeTrbl);
23080
23092
  }
23081
23093
 
23094
+ function shouldMoveToPlane(bo, plane) {
23095
+ var parent = bo.$parent;
23096
+
23097
+ // don't move elements that are already on the plane
23098
+ if (!is$1(parent, 'bpmn:SubProcess') || parent === plane.bpmnElement) {
23099
+ return false;
23100
+ }
23101
+
23102
+ // dataAssociations are children of the subprocess but rendered on process level
23103
+ // cf. https://github.com/bpmn-io/bpmn-js/issues/1619
23104
+ if (isAny(bo, ['bpmn:DataInputAssociation', 'bpmn:DataOutputAssociation'])) {
23105
+ return false;
23106
+ }
23107
+
23108
+ return true;
23109
+ }
23110
+
23082
23111
  var LOW_PRIORITY$3 = 250;
23083
23112
  var ARROW_DOWN_SVG = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.81801948,3.50735931 L10.4996894,9.1896894 L10.5,4 L12,4 L12,12 L4,12 L4,10.5 L9.6896894,10.4996894 L3.75735931,4.56801948 C3.46446609,4.27512627 3.46446609,3.80025253 3.75735931,3.50735931 C4.05025253,3.21446609 4.52512627,3.21446609 4.81801948,3.50735931 Z"/></svg>';
23084
23113
 
@@ -23154,7 +23183,7 @@
23154
23183
  }, true);
23155
23184
 
23156
23185
 
23157
- eventBus.on('import.done', function() {
23186
+ eventBus.on('import.render.complete', function() {
23158
23187
  elementRegistry.filter(function(e) {
23159
23188
  return self.canDrillDown(e);
23160
23189
  }).map(function(el) {
@@ -23319,7 +23348,7 @@
23319
23348
  // modules the viewer is composed of
23320
23349
  Viewer.prototype._modules = [
23321
23350
  CoreModule$1,
23322
- translate$2,
23351
+ translateModule,
23323
23352
  SelectionModule,
23324
23353
  OverlaysModule,
23325
23354
  DrilldownModdule
@@ -31785,537 +31814,6 @@
31785
31814
  connectionPreview: [ 'type', ConnectionPreview ]
31786
31815
  };
31787
31816
 
31788
- function getOriginal$1(event) {
31789
- return event.originalEvent || event.srcEvent;
31790
- }
31791
-
31792
- function isButton$1(event, button) {
31793
- return (getOriginal$1(event) || event).button === button;
31794
- }
31795
-
31796
- function isPrimaryButton$1(event) {
31797
-
31798
- // button === 0 -> left áka primary mouse button
31799
- return isButton$1(event, 0);
31800
- }
31801
-
31802
- function isAuxiliaryButton$1(event) {
31803
-
31804
- // button === 1 -> auxiliary áka wheel button
31805
- return isButton$1(event, 1);
31806
- }
31807
-
31808
- function toSVGPoints$1(points) {
31809
- var result = '';
31810
-
31811
- for (var i = 0, p; (p = points[i]); i++) {
31812
- result += p.x + ',' + p.y + ' ';
31813
- }
31814
-
31815
- return result;
31816
- }
31817
-
31818
- function createLine$1(points, attrs) {
31819
-
31820
- var line = create('polyline');
31821
- attr$1(line, { points: toSVGPoints$1(points) });
31822
-
31823
- if (attrs) {
31824
- attr$1(line, attrs);
31825
- }
31826
-
31827
- return line;
31828
- }
31829
-
31830
- function updateLine$1(gfx, points) {
31831
- attr$1(gfx, { points: toSVGPoints$1(points) });
31832
-
31833
- return gfx;
31834
- }
31835
-
31836
- function allowAll$1(event) { return true; }
31837
-
31838
- function allowPrimaryAndAuxiliary$1(event) {
31839
- return isPrimaryButton$1(event) || isAuxiliaryButton$1(event);
31840
- }
31841
-
31842
- var LOW_PRIORITY$7 = 500;
31843
-
31844
-
31845
- /**
31846
- * A plugin that provides interaction events for diagram elements.
31847
- *
31848
- * It emits the following events:
31849
- *
31850
- * * element.click
31851
- * * element.contextmenu
31852
- * * element.dblclick
31853
- * * element.hover
31854
- * * element.mousedown
31855
- * * element.mousemove
31856
- * * element.mouseup
31857
- * * element.out
31858
- *
31859
- * Each event is a tuple { element, gfx, originalEvent }.
31860
- *
31861
- * Canceling the event via Event#preventDefault()
31862
- * prevents the original DOM operation.
31863
- *
31864
- * @param {EventBus} eventBus
31865
- */
31866
- function InteractionEvents$1(eventBus, elementRegistry, styles) {
31867
-
31868
- var self = this;
31869
-
31870
- /**
31871
- * Fire an interaction event.
31872
- *
31873
- * @param {string} type local event name, e.g. element.click.
31874
- * @param {DOMEvent} event native event
31875
- * @param {djs.model.Base} [element] the diagram element to emit the event on;
31876
- * defaults to the event target
31877
- */
31878
- function fire(type, event, element) {
31879
-
31880
- if (isIgnored(type, event)) {
31881
- return;
31882
- }
31883
-
31884
- var target, gfx, returnValue;
31885
-
31886
- if (!element) {
31887
- target = event.delegateTarget || event.target;
31888
-
31889
- if (target) {
31890
- gfx = target;
31891
- element = elementRegistry.get(gfx);
31892
- }
31893
- } else {
31894
- gfx = elementRegistry.getGraphics(element);
31895
- }
31896
-
31897
- if (!gfx || !element) {
31898
- return;
31899
- }
31900
-
31901
- returnValue = eventBus.fire(type, {
31902
- element: element,
31903
- gfx: gfx,
31904
- originalEvent: event
31905
- });
31906
-
31907
- if (returnValue === false) {
31908
- event.stopPropagation();
31909
- event.preventDefault();
31910
- }
31911
- }
31912
-
31913
- // TODO(nikku): document this
31914
- var handlers = {};
31915
-
31916
- function mouseHandler(localEventName) {
31917
- return handlers[localEventName];
31918
- }
31919
-
31920
- function isIgnored(localEventName, event) {
31921
-
31922
- var filter = ignoredFilters[localEventName] || isPrimaryButton$1;
31923
-
31924
- // only react on left mouse button interactions
31925
- // except for interaction events that are enabled
31926
- // for secundary mouse button
31927
- return !filter(event);
31928
- }
31929
-
31930
- var bindings = {
31931
- click: 'element.click',
31932
- contextmenu: 'element.contextmenu',
31933
- dblclick: 'element.dblclick',
31934
- mousedown: 'element.mousedown',
31935
- mousemove: 'element.mousemove',
31936
- mouseover: 'element.hover',
31937
- mouseout: 'element.out',
31938
- mouseup: 'element.mouseup',
31939
- };
31940
-
31941
- var ignoredFilters = {
31942
- 'element.contextmenu': allowAll$1,
31943
- 'element.mousedown': allowPrimaryAndAuxiliary$1,
31944
- 'element.mouseup': allowPrimaryAndAuxiliary$1,
31945
- 'element.click': allowPrimaryAndAuxiliary$1,
31946
- 'element.dblclick': allowPrimaryAndAuxiliary$1
31947
- };
31948
-
31949
-
31950
- // manual event trigger //////////
31951
-
31952
- /**
31953
- * Trigger an interaction event (based on a native dom event)
31954
- * on the target shape or connection.
31955
- *
31956
- * @param {string} eventName the name of the triggered DOM event
31957
- * @param {MouseEvent} event
31958
- * @param {djs.model.Base} targetElement
31959
- */
31960
- function triggerMouseEvent(eventName, event, targetElement) {
31961
-
31962
- // i.e. element.mousedown...
31963
- var localEventName = bindings[eventName];
31964
-
31965
- if (!localEventName) {
31966
- throw new Error('unmapped DOM event name <' + eventName + '>');
31967
- }
31968
-
31969
- return fire(localEventName, event, targetElement);
31970
- }
31971
-
31972
-
31973
- var ELEMENT_SELECTOR = 'svg, .djs-element';
31974
-
31975
- // event handling ///////
31976
-
31977
- function registerEvent(node, event, localEvent, ignoredFilter) {
31978
-
31979
- var handler = handlers[localEvent] = function(event) {
31980
- fire(localEvent, event);
31981
- };
31982
-
31983
- if (ignoredFilter) {
31984
- ignoredFilters[localEvent] = ignoredFilter;
31985
- }
31986
-
31987
- handler.$delegate = delegate.bind(node, ELEMENT_SELECTOR, event, handler);
31988
- }
31989
-
31990
- function unregisterEvent(node, event, localEvent) {
31991
-
31992
- var handler = mouseHandler(localEvent);
31993
-
31994
- if (!handler) {
31995
- return;
31996
- }
31997
-
31998
- delegate.unbind(node, event, handler.$delegate);
31999
- }
32000
-
32001
- function registerEvents(svg) {
32002
- forEach(bindings, function(val, key) {
32003
- registerEvent(svg, key, val);
32004
- });
32005
- }
32006
-
32007
- function unregisterEvents(svg) {
32008
- forEach(bindings, function(val, key) {
32009
- unregisterEvent(svg, key, val);
32010
- });
32011
- }
32012
-
32013
- eventBus.on('canvas.destroy', function(event) {
32014
- unregisterEvents(event.svg);
32015
- });
32016
-
32017
- eventBus.on('canvas.init', function(event) {
32018
- registerEvents(event.svg);
32019
- });
32020
-
32021
-
32022
- // hit box updating ////////////////
32023
-
32024
- eventBus.on([ 'shape.added', 'connection.added' ], function(event) {
32025
- var element = event.element,
32026
- gfx = event.gfx;
32027
-
32028
- eventBus.fire('interactionEvents.createHit', { element: element, gfx: gfx });
32029
- });
32030
-
32031
- // Update djs-hit on change.
32032
- // A low priortity is necessary, because djs-hit of labels has to be updated
32033
- // after the label bounds have been updated in the renderer.
32034
- eventBus.on([
32035
- 'shape.changed',
32036
- 'connection.changed'
32037
- ], LOW_PRIORITY$7, function(event) {
32038
-
32039
- var element = event.element,
32040
- gfx = event.gfx;
32041
-
32042
- eventBus.fire('interactionEvents.updateHit', { element: element, gfx: gfx });
32043
- });
32044
-
32045
- eventBus.on('interactionEvents.createHit', LOW_PRIORITY$7, function(event) {
32046
- var element = event.element,
32047
- gfx = event.gfx;
32048
-
32049
- self.createDefaultHit(element, gfx);
32050
- });
32051
-
32052
- eventBus.on('interactionEvents.updateHit', function(event) {
32053
- var element = event.element,
32054
- gfx = event.gfx;
32055
-
32056
- self.updateDefaultHit(element, gfx);
32057
- });
32058
-
32059
-
32060
- // hit styles ////////////
32061
-
32062
- var STROKE_HIT_STYLE = createHitStyle('djs-hit djs-hit-stroke');
32063
-
32064
- var CLICK_STROKE_HIT_STYLE = createHitStyle('djs-hit djs-hit-click-stroke');
32065
-
32066
- var ALL_HIT_STYLE = createHitStyle('djs-hit djs-hit-all');
32067
-
32068
- var HIT_TYPES = {
32069
- 'all': ALL_HIT_STYLE,
32070
- 'click-stroke': CLICK_STROKE_HIT_STYLE,
32071
- 'stroke': STROKE_HIT_STYLE
32072
- };
32073
-
32074
- function createHitStyle(classNames, attrs) {
32075
-
32076
- attrs = assign({
32077
- stroke: 'white',
32078
- strokeWidth: 15
32079
- }, attrs || {});
32080
-
32081
- return styles.cls(classNames, [ 'no-fill', 'no-border' ], attrs);
32082
- }
32083
-
32084
-
32085
- // style helpers ///////////////
32086
-
32087
- function applyStyle(hit, type) {
32088
-
32089
- var attrs = HIT_TYPES[type];
32090
-
32091
- if (!attrs) {
32092
- throw new Error('invalid hit type <' + type + '>');
32093
- }
32094
-
32095
- attr$1(hit, attrs);
32096
-
32097
- return hit;
32098
- }
32099
-
32100
- function appendHit(gfx, hit) {
32101
- append(gfx, hit);
32102
- }
32103
-
32104
-
32105
- // API
32106
-
32107
- /**
32108
- * Remove hints on the given graphics.
32109
- *
32110
- * @param {SVGElement} gfx
32111
- */
32112
- this.removeHits = function(gfx) {
32113
- var hits = all('.djs-hit', gfx);
32114
-
32115
- forEach(hits, remove$1);
32116
- };
32117
-
32118
- /**
32119
- * Create default hit for the given element.
32120
- *
32121
- * @param {djs.model.Base} element
32122
- * @param {SVGElement} gfx
32123
- *
32124
- * @return {SVGElement} created hit
32125
- */
32126
- this.createDefaultHit = function(element, gfx) {
32127
- var waypoints = element.waypoints,
32128
- isFrame = element.isFrame,
32129
- boxType;
32130
-
32131
- if (waypoints) {
32132
- return this.createWaypointsHit(gfx, waypoints);
32133
- } else {
32134
-
32135
- boxType = isFrame ? 'stroke' : 'all';
32136
-
32137
- return this.createBoxHit(gfx, boxType, {
32138
- width: element.width,
32139
- height: element.height
32140
- });
32141
- }
32142
- };
32143
-
32144
- /**
32145
- * Create hits for the given waypoints.
32146
- *
32147
- * @param {SVGElement} gfx
32148
- * @param {Array<Point>} waypoints
32149
- *
32150
- * @return {SVGElement}
32151
- */
32152
- this.createWaypointsHit = function(gfx, waypoints) {
32153
-
32154
- var hit = createLine$1(waypoints);
32155
-
32156
- applyStyle(hit, 'stroke');
32157
-
32158
- appendHit(gfx, hit);
32159
-
32160
- return hit;
32161
- };
32162
-
32163
- /**
32164
- * Create hits for a box.
32165
- *
32166
- * @param {SVGElement} gfx
32167
- * @param {string} hitType
32168
- * @param {Object} attrs
32169
- *
32170
- * @return {SVGElement}
32171
- */
32172
- this.createBoxHit = function(gfx, type, attrs) {
32173
-
32174
- attrs = assign({
32175
- x: 0,
32176
- y: 0
32177
- }, attrs);
32178
-
32179
- var hit = create('rect');
32180
-
32181
- applyStyle(hit, type);
32182
-
32183
- attr$1(hit, attrs);
32184
-
32185
- appendHit(gfx, hit);
32186
-
32187
- return hit;
32188
- };
32189
-
32190
- /**
32191
- * Update default hit of the element.
32192
- *
32193
- * @param {djs.model.Base} element
32194
- * @param {SVGElement} gfx
32195
- *
32196
- * @return {SVGElement} updated hit
32197
- */
32198
- this.updateDefaultHit = function(element, gfx) {
32199
-
32200
- var hit = query('.djs-hit', gfx);
32201
-
32202
- if (!hit) {
32203
- return;
32204
- }
32205
-
32206
- if (element.waypoints) {
32207
- updateLine$1(hit, element.waypoints);
32208
- } else {
32209
- attr$1(hit, {
32210
- width: element.width,
32211
- height: element.height
32212
- });
32213
- }
32214
-
32215
- return hit;
32216
- };
32217
-
32218
- this.fire = fire;
32219
-
32220
- this.triggerMouseEvent = triggerMouseEvent;
32221
-
32222
- this.mouseHandler = mouseHandler;
32223
-
32224
- this.registerEvent = registerEvent;
32225
- this.unregisterEvent = unregisterEvent;
32226
- }
32227
-
32228
-
32229
- InteractionEvents$1.$inject = [
32230
- 'eventBus',
32231
- 'elementRegistry',
32232
- 'styles'
32233
- ];
32234
-
32235
-
32236
- /**
32237
- * An event indicating that the mouse hovered over an element
32238
- *
32239
- * @event element.hover
32240
- *
32241
- * @type {Object}
32242
- * @property {djs.model.Base} element
32243
- * @property {SVGElement} gfx
32244
- * @property {Event} originalEvent
32245
- */
32246
-
32247
- /**
32248
- * An event indicating that the mouse has left an element
32249
- *
32250
- * @event element.out
32251
- *
32252
- * @type {Object}
32253
- * @property {djs.model.Base} element
32254
- * @property {SVGElement} gfx
32255
- * @property {Event} originalEvent
32256
- */
32257
-
32258
- /**
32259
- * An event indicating that the mouse has clicked an element
32260
- *
32261
- * @event element.click
32262
- *
32263
- * @type {Object}
32264
- * @property {djs.model.Base} element
32265
- * @property {SVGElement} gfx
32266
- * @property {Event} originalEvent
32267
- */
32268
-
32269
- /**
32270
- * An event indicating that the mouse has double clicked an element
32271
- *
32272
- * @event element.dblclick
32273
- *
32274
- * @type {Object}
32275
- * @property {djs.model.Base} element
32276
- * @property {SVGElement} gfx
32277
- * @property {Event} originalEvent
32278
- */
32279
-
32280
- /**
32281
- * An event indicating that the mouse has gone down on an element.
32282
- *
32283
- * @event element.mousedown
32284
- *
32285
- * @type {Object}
32286
- * @property {djs.model.Base} element
32287
- * @property {SVGElement} gfx
32288
- * @property {Event} originalEvent
32289
- */
32290
-
32291
- /**
32292
- * An event indicating that the mouse has gone up on an element.
32293
- *
32294
- * @event element.mouseup
32295
- *
32296
- * @type {Object}
32297
- * @property {djs.model.Base} element
32298
- * @property {SVGElement} gfx
32299
- * @property {Event} originalEvent
32300
- */
32301
-
32302
- /**
32303
- * An event indicating that the context menu action is triggered
32304
- * via mouse or touch controls.
32305
- *
32306
- * @event element.contextmenu
32307
- *
32308
- * @type {Object}
32309
- * @property {djs.model.Base} element
32310
- * @property {SVGElement} gfx
32311
- * @property {Event} originalEvent
32312
- */
32313
-
32314
- var InteractionEventsModule$1 = {
32315
- __init__: [ 'interactionEvents' ],
32316
- interactionEvents: [ 'type', InteractionEvents$1 ]
32317
- };
32318
-
32319
31817
  var min = Math.min,
32320
31818
  max$1 = Math.max;
32321
31819
 
@@ -32949,7 +32447,7 @@
32949
32447
 
32950
32448
  var DirectEditingModule = {
32951
32449
  __depends__: [
32952
- InteractionEventsModule$1
32450
+ InteractionEventsModule
32953
32451
  ],
32954
32452
  __init__: [ 'directEditing' ],
32955
32453
  directEditing: [ 'type', DirectEditing ]
@@ -33902,7 +33400,7 @@
33902
33400
  return !!element.labelTarget;
33903
33401
  }
33904
33402
 
33905
- var LOW_PRIORITY$8 = 750;
33403
+ var LOW_PRIORITY$7 = 750;
33906
33404
 
33907
33405
 
33908
33406
  function CreatePreview(
@@ -33947,7 +33445,7 @@
33947
33445
  return dragGroup;
33948
33446
  }
33949
33447
 
33950
- eventBus.on('create.move', LOW_PRIORITY$8, function(event) {
33448
+ eventBus.on('create.move', LOW_PRIORITY$7, function(event) {
33951
33449
 
33952
33450
  var hover = event.hover,
33953
33451
  context = event.context,
@@ -35314,12 +34812,12 @@
35314
34812
  });
35315
34813
  }
35316
34814
 
35317
- var LOW_PRIORITY$9 = 750;
34815
+ var LOW_PRIORITY$8 = 750;
35318
34816
 
35319
34817
 
35320
34818
  function BpmnCopyPaste(bpmnFactory, eventBus, moddleCopy) {
35321
34819
 
35322
- eventBus.on('copyPaste.copyElement', LOW_PRIORITY$9, function(context) {
34820
+ eventBus.on('copyPaste.copyElement', LOW_PRIORITY$8, function(context) {
35323
34821
  var descriptor = context.descriptor,
35324
34822
  element = context.element;
35325
34823
 
@@ -37405,16 +36903,16 @@
37405
36903
  var translate = this._translate;
37406
36904
 
37407
36905
  function toggleLoopEntry(event, entry) {
37408
- var loopCharacteristics;
36906
+ var loopCharacteristics = getBusinessObject(element).loopCharacteristics;
37409
36907
 
37410
36908
  if (entry.active) {
37411
36909
  loopCharacteristics = undefined;
37412
36910
  } else {
37413
- loopCharacteristics = self._moddle.create(entry.options.loopCharacteristics);
37414
-
37415
- if (entry.options.isSequential) {
37416
- loopCharacteristics.isSequential = entry.options.isSequential;
36911
+ if (isUndefined(entry.options.isSequential) || !loopCharacteristics) {
36912
+ loopCharacteristics = self._moddle.create(entry.options.loopCharacteristics);
37417
36913
  }
36914
+
36915
+ loopCharacteristics.isSequential = entry.options.isSequential;
37418
36916
  }
37419
36917
  self._modeling.updateProperties(element, { loopCharacteristics: loopCharacteristics });
37420
36918
  }
@@ -39127,7 +38625,7 @@
39127
38625
  }
39128
38626
 
39129
38627
  var LOWER_PRIORITY = 1200;
39130
- var LOW_PRIORITY$a = 800;
38628
+ var LOW_PRIORITY$9 = 800;
39131
38629
 
39132
38630
  /**
39133
38631
  * Basic grid snapping that covers connecting, creating, moving, resizing shapes, moving bendpoints
@@ -39141,7 +38639,7 @@
39141
38639
 
39142
38640
  var self = this;
39143
38641
 
39144
- eventBus.on('diagram.init', LOW_PRIORITY$a, function() {
38642
+ eventBus.on('diagram.init', LOW_PRIORITY$9, function() {
39145
38643
  self.setActive(active);
39146
38644
  });
39147
38645
 
@@ -40032,7 +39530,7 @@
40032
39530
  return true;
40033
39531
  };
40034
39532
 
40035
- var InteractionEventsModule$2 = {
39533
+ var InteractionEventsModule$1 = {
40036
39534
  __init__: [ 'bpmnInteractionEvents' ],
40037
39535
  bpmnInteractionEvents: [ 'type', BpmnInteractionEvents ]
40038
39536
  };
@@ -40618,7 +40116,7 @@
40618
40116
  var MARKER_RESIZING = 'djs-resizing',
40619
40117
  MARKER_RESIZE_NOT_OK = 'resize-not-ok';
40620
40118
 
40621
- var LOW_PRIORITY$b = 500;
40119
+ var LOW_PRIORITY$a = 500;
40622
40120
 
40623
40121
 
40624
40122
  /**
@@ -40679,7 +40177,7 @@
40679
40177
  }
40680
40178
 
40681
40179
  // add and update previews
40682
- eventBus.on('resize.move', LOW_PRIORITY$b, function(event) {
40180
+ eventBus.on('resize.move', LOW_PRIORITY$a, function(event) {
40683
40181
  updateFrame(event.context);
40684
40182
  });
40685
40183
 
@@ -41777,7 +41275,7 @@
41777
41275
  'modeling'
41778
41276
  ];
41779
41277
 
41780
- var LOW_PRIORITY$c = 500;
41278
+ var LOW_PRIORITY$b = 500;
41781
41279
 
41782
41280
 
41783
41281
  /**
@@ -41790,7 +41288,7 @@
41790
41288
 
41791
41289
  var self = this;
41792
41290
 
41793
- this.postExecuted('elements.create', LOW_PRIORITY$c, function(context) {
41291
+ this.postExecuted('elements.create', LOW_PRIORITY$b, function(context) {
41794
41292
  var elements = context.elements;
41795
41293
 
41796
41294
  elements = elements.filter(function(shape) {
@@ -41813,7 +41311,7 @@
41813
41311
  }, true);
41814
41312
 
41815
41313
 
41816
- this.preExecute('elements.move', LOW_PRIORITY$c, function(context) {
41314
+ this.preExecute('elements.move', LOW_PRIORITY$b, function(context) {
41817
41315
  var shapes = context.shapes,
41818
41316
  host = context.newHost;
41819
41317
 
@@ -42581,7 +42079,7 @@
42581
42079
  }
42582
42080
  }
42583
42081
 
42584
- var LOW_PRIORITY$d = 500;
42082
+ var LOW_PRIORITY$c = 500;
42585
42083
 
42586
42084
 
42587
42085
  /**
@@ -42650,7 +42148,7 @@
42650
42148
  /**
42651
42149
  * Adjust sizes of other lanes after lane deletion
42652
42150
  */
42653
- this.postExecuted('shape.delete', LOW_PRIORITY$d, function(event) {
42151
+ this.postExecuted('shape.delete', LOW_PRIORITY$c, function(event) {
42654
42152
 
42655
42153
  var context = event.context,
42656
42154
  hints = context.hints,
@@ -42679,7 +42177,7 @@
42679
42177
 
42680
42178
  inherits_browser(DeleteLaneBehavior, CommandInterceptor);
42681
42179
 
42682
- var LOW_PRIORITY$e = 500;
42180
+ var LOW_PRIORITY$d = 500;
42683
42181
 
42684
42182
 
42685
42183
  /**
@@ -42692,7 +42190,7 @@
42692
42190
 
42693
42191
  var self = this;
42694
42192
 
42695
- this.postExecuted('elements.create', LOW_PRIORITY$e, function(context) {
42193
+ this.postExecuted('elements.create', LOW_PRIORITY$d, function(context) {
42696
42194
  var elements = context.elements;
42697
42195
 
42698
42196
  elements.filter(function(shape) {
@@ -42706,7 +42204,7 @@
42706
42204
  });
42707
42205
  }, true);
42708
42206
 
42709
- this.preExecute('elements.move', LOW_PRIORITY$e, function(context) {
42207
+ this.preExecute('elements.move', LOW_PRIORITY$d, function(context) {
42710
42208
  var shapes = context.shapes,
42711
42209
  newHost = context.newHost;
42712
42210
 
@@ -44600,7 +44098,7 @@
44600
44098
  }
44601
44099
 
44602
44100
  function getWaypointsInsideBounds(waypoints, bounds) {
44603
- var originalWaypoints = map(waypoints, getOriginal$2);
44101
+ var originalWaypoints = map(waypoints, getOriginal$1);
44604
44102
 
44605
44103
  return filter(originalWaypoints, function(waypoint) {
44606
44104
  return isInsideBounds(waypoint, bounds);
@@ -44617,7 +44115,7 @@
44617
44115
  return getOrientation(bounds, point, 1) === 'intersect';
44618
44116
  }
44619
44117
 
44620
- function getOriginal$2(point) {
44118
+ function getOriginal$1(point) {
44621
44119
  return point.original || point;
44622
44120
  }
44623
44121
 
@@ -45380,7 +44878,7 @@
45380
44878
  'modeling'
45381
44879
  ];
45382
44880
 
45383
- var LOW_PRIORITY$f = 500;
44881
+ var LOW_PRIORITY$e = 500;
45384
44882
 
45385
44883
 
45386
44884
  /**
@@ -45494,7 +44992,7 @@
45494
44992
  }
45495
44993
  });
45496
44994
 
45497
- eventBus.on('copyPaste.pasteElement', LOW_PRIORITY$f, function(context) {
44995
+ eventBus.on('copyPaste.pasteElement', LOW_PRIORITY$e, function(context) {
45498
44996
  var descriptor = context.descriptor,
45499
44997
  businessObject = descriptor.businessObject;
45500
44998
 
@@ -45651,7 +45149,7 @@
45651
45149
  }
45652
45150
  }
45653
45151
 
45654
- var LOW_PRIORITY$g = 400;
45152
+ var LOW_PRIORITY$f = 400;
45655
45153
  var HIGH_PRIORITY$c = 600;
45656
45154
 
45657
45155
  var DEFAULT_POSITION$1 = {
@@ -45905,7 +45403,7 @@
45905
45403
 
45906
45404
 
45907
45405
  // create/remove plane for the subprocess
45908
- this.executed('shape.toggleCollapse', LOW_PRIORITY$g, function(context) {
45406
+ this.executed('shape.toggleCollapse', LOW_PRIORITY$f, function(context) {
45909
45407
  var shape = context.shape;
45910
45408
 
45911
45409
  if (!is$1(shape, 'bpmn:SubProcess')) {
@@ -45923,7 +45421,7 @@
45923
45421
 
45924
45422
 
45925
45423
  // create/remove plane for the subprocess
45926
- this.reverted('shape.toggleCollapse', LOW_PRIORITY$g, function(context) {
45424
+ this.reverted('shape.toggleCollapse', LOW_PRIORITY$f, function(context) {
45927
45425
  var shape = context.shape;
45928
45426
 
45929
45427
  if (!is$1(shape, 'bpmn:SubProcess')) {
@@ -46207,7 +45705,7 @@
46207
45705
 
46208
45706
  if (
46209
45707
  !is$1(newShape, 'bpmn:SubProcess') ||
46210
- !is$1(oldShape, 'bpmn:Task') ||
45708
+ ! (is$1(oldShape, 'bpmn:Task') || is$1(oldShape, 'bpmn:CallActivity')) ||
46211
45709
  !isExpanded(newShape)
46212
45710
  ) {
46213
45711
  return;
@@ -46293,7 +45791,7 @@
46293
45791
  'modeling',
46294
45792
  ];
46295
45793
 
46296
- var LOW_PRIORITY$h = 500;
45794
+ var LOW_PRIORITY$g = 500;
46297
45795
 
46298
45796
 
46299
45797
  function ToggleElementCollapseBehaviour(
@@ -46351,7 +45849,7 @@
46351
45849
  };
46352
45850
  }
46353
45851
 
46354
- this.executed([ 'shape.toggleCollapse' ], LOW_PRIORITY$h, function(e) {
45852
+ this.executed([ 'shape.toggleCollapse' ], LOW_PRIORITY$g, function(e) {
46355
45853
 
46356
45854
  var context = e.context,
46357
45855
  shape = context.shape;
@@ -46374,7 +45872,7 @@
46374
45872
  }
46375
45873
  });
46376
45874
 
46377
- this.reverted([ 'shape.toggleCollapse' ], LOW_PRIORITY$h, function(e) {
45875
+ this.reverted([ 'shape.toggleCollapse' ], LOW_PRIORITY$g, function(e) {
46378
45876
 
46379
45877
  var context = e.context;
46380
45878
  var shape = context.shape;
@@ -46389,7 +45887,7 @@
46389
45887
  }
46390
45888
  });
46391
45889
 
46392
- this.postExecuted([ 'shape.toggleCollapse' ], LOW_PRIORITY$h, function(e) {
45890
+ this.postExecuted([ 'shape.toggleCollapse' ], LOW_PRIORITY$g, function(e) {
46393
45891
  var shape = e.context.shape,
46394
45892
  defaultSize = elementFactory.getDefaultSize(shape),
46395
45893
  newBounds;
@@ -46527,7 +46025,7 @@
46527
46025
  return sourceBo.get('default') === sequenceFlow;
46528
46026
  }
46529
46027
 
46530
- var LOW_PRIORITY$i = 500,
46028
+ var LOW_PRIORITY$h = 500,
46531
46029
  HIGH_PRIORITY$d = 5000;
46532
46030
 
46533
46031
 
@@ -46609,7 +46107,7 @@
46609
46107
  initContext();
46610
46108
  });
46611
46109
 
46612
- this.postExecuted(laneRefUpdateEvents, LOW_PRIORITY$i, function(event) {
46110
+ this.postExecuted(laneRefUpdateEvents, LOW_PRIORITY$h, function(event) {
46613
46111
  releaseContext();
46614
46112
  });
46615
46113
 
@@ -47944,7 +47442,7 @@
47944
47442
  // render labels always on top
47945
47443
  if (element.labelTarget) {
47946
47444
  return {
47947
- parent: canvas.findRoot(element.labelTarget) || canvas.getRootElement(),
47445
+ parent: canvas.findRoot(newParent) || canvas.getRootElement(),
47948
47446
  index: -1
47949
47447
  };
47950
47448
  }
@@ -47993,7 +47491,7 @@
47993
47491
 
47994
47492
  var OrderingModule = {
47995
47493
  __depends__: [
47996
- translate$2
47494
+ translateModule
47997
47495
  ],
47998
47496
  __init__: [ 'bpmnOrderingProvider' ],
47999
47497
  bpmnOrderingProvider: [ 'type', BpmnOrderingProvider ]
@@ -48909,7 +48407,7 @@
48909
48407
  return collection;
48910
48408
  }
48911
48409
 
48912
- var LOW_PRIORITY$j = 250,
48410
+ var LOW_PRIORITY$i = 250,
48913
48411
  HIGH_PRIORITY$f = 1400;
48914
48412
 
48915
48413
 
@@ -48940,7 +48438,7 @@
48940
48438
  });
48941
48439
 
48942
48440
  // add labels to visual's group
48943
- movePreview && eventBus.on('shape.move.start', LOW_PRIORITY$j, function(e) {
48441
+ movePreview && eventBus.on('shape.move.start', LOW_PRIORITY$i, function(e) {
48944
48442
 
48945
48443
  var context = e.context,
48946
48444
  shapes = context.shapes;
@@ -49069,7 +48567,7 @@
49069
48567
  labelSupport: [ 'type', LabelSupport ]
49070
48568
  };
49071
48569
 
49072
- var LOW_PRIORITY$k = 251,
48570
+ var LOW_PRIORITY$j = 251,
49073
48571
  HIGH_PRIORITY$g = 1401;
49074
48572
 
49075
48573
  var MARKER_ATTACH$1 = 'attach-ok';
@@ -49111,7 +48609,7 @@
49111
48609
  });
49112
48610
 
49113
48611
  // add attachers to the visual's group
49114
- movePreview && eventBus.on('shape.move.start', LOW_PRIORITY$k, function(e) {
48612
+ movePreview && eventBus.on('shape.move.start', LOW_PRIORITY$j, function(e) {
49115
48613
 
49116
48614
  var context = e.context,
49117
48615
  shapes = context.shapes,
@@ -49393,7 +48891,7 @@
49393
48891
  attachSupport: [ 'type', AttachSupport ]
49394
48892
  };
49395
48893
 
49396
- var LOW_PRIORITY$l = 250;
48894
+ var LOW_PRIORITY$k = 250;
49397
48895
 
49398
48896
  /**
49399
48897
  * The tool manager acts as middle-man between the available tool's and the Palette,
@@ -49469,7 +48967,7 @@
49469
48967
  eventsToRegister.push(event + '.canceled');
49470
48968
  });
49471
48969
 
49472
- eventBus.on(eventsToRegister, LOW_PRIORITY$l, function(event) {
48970
+ eventBus.on(eventsToRegister, LOW_PRIORITY$k, function(event) {
49473
48971
 
49474
48972
  // We defer the de-activation of the tool to the .activate phase,
49475
48973
  // so we're able to check if we want to toggle off the current
@@ -50098,7 +49596,7 @@
50098
49596
  var MARKER_DRAGGING = 'djs-dragging',
50099
49597
  MARKER_RESIZING$1 = 'djs-resizing';
50100
49598
 
50101
- var LOW_PRIORITY$m = 250;
49599
+ var LOW_PRIORITY$l = 250;
50102
49600
 
50103
49601
  var max$6 = Math.max;
50104
49602
 
@@ -50173,7 +49671,7 @@
50173
49671
  });
50174
49672
 
50175
49673
  // add and update move/resize previews
50176
- eventBus.on('spaceTool.move', LOW_PRIORITY$m, function(event) {
49674
+ eventBus.on('spaceTool.move', LOW_PRIORITY$l, function(event) {
50177
49675
 
50178
49676
  var context = event.context,
50179
49677
  line = context.line,
@@ -54861,7 +54359,7 @@
54861
54359
  }
54862
54360
 
54863
54361
  if (!text && di.label) {
54864
- di.label = null;
54362
+ delete di.label;
54865
54363
  }
54866
54364
  }
54867
54365
 
@@ -56420,7 +55918,7 @@
56420
55918
  connectionDocking: [ 'type', CroppingConnectionDocking ]
56421
55919
  };
56422
55920
 
56423
- var LOW_PRIORITY$n = 500,
55921
+ var LOW_PRIORITY$m = 500,
56424
55922
  MEDIUM_PRIORITY = 1250,
56425
55923
  HIGH_PRIORITY$i = 1500;
56426
55924
 
@@ -56519,7 +56017,7 @@
56519
56017
  // to let others modify the move event before we update
56520
56018
  // the context
56521
56019
  //
56522
- eventBus.on('shape.move.move', LOW_PRIORITY$n, function(event) {
56020
+ eventBus.on('shape.move.move', LOW_PRIORITY$m, function(event) {
56523
56021
 
56524
56022
  var context = event.context,
56525
56023
  validatedShapes = context.validatedShapes,
@@ -56665,7 +56163,7 @@
56665
56163
  });
56666
56164
  }
56667
56165
 
56668
- var LOW_PRIORITY$o = 499;
56166
+ var LOW_PRIORITY$n = 499;
56669
56167
 
56670
56168
  var MARKER_DRAGGING$1 = 'djs-dragging',
56671
56169
  MARKER_OK$3 = 'drop-ok',
@@ -56743,7 +56241,7 @@
56743
56241
  // assign a low priority to this handler
56744
56242
  // to let others modify the move context before
56745
56243
  // we draw things
56746
- eventBus.on('shape.move.start', LOW_PRIORITY$o, function(event) {
56244
+ eventBus.on('shape.move.start', LOW_PRIORITY$n, function(event) {
56747
56245
  var context = event.context,
56748
56246
  dragShapes = context.shapes,
56749
56247
  allDraggedElements = context.allDraggedElements;
@@ -56790,7 +56288,7 @@
56790
56288
  });
56791
56289
 
56792
56290
  // update previews
56793
- eventBus.on('shape.move.move', LOW_PRIORITY$o, function(event) {
56291
+ eventBus.on('shape.move.move', LOW_PRIORITY$n, function(event) {
56794
56292
 
56795
56293
  var context = event.context,
56796
56294
  dragGroup = context.dragGroup,
@@ -58133,13 +57631,13 @@
58133
57631
  LassoToolModule,
58134
57632
  HandToolModule,
58135
57633
  GlobalConnectModule,
58136
- translate$2
57634
+ translateModule
58137
57635
  ],
58138
57636
  __init__: [ 'paletteProvider' ],
58139
57637
  paletteProvider: [ 'type', PaletteProvider ]
58140
57638
  };
58141
57639
 
58142
- var LOW_PRIORITY$p = 250;
57640
+ var LOW_PRIORITY$o = 250;
58143
57641
 
58144
57642
 
58145
57643
  function BpmnReplacePreview(
@@ -58220,7 +57718,7 @@
58220
57718
  });
58221
57719
  }
58222
57720
 
58223
- eventBus.on('shape.move.move', LOW_PRIORITY$p, function(event) {
57721
+ eventBus.on('shape.move.move', LOW_PRIORITY$o, function(event) {
58224
57722
 
58225
57723
  var context = event.context,
58226
57724
  canExecute = context.canExecute;
@@ -60150,7 +59648,7 @@
60150
59648
  DistributeElementsModule$1,
60151
59649
  EditorActionsModule$1,
60152
59650
  GridSnappingModule$1,
60153
- InteractionEventsModule$2,
59651
+ InteractionEventsModule$1,
60154
59652
  KeyboardModule$1,
60155
59653
  KeyboardMoveSelectionModule,
60156
59654
  LabelEditingModule,
@@ -60176,24 +59674,6 @@
60176
59674
  Modeler.prototype._modelingModules
60177
59675
  );
60178
59676
 
60179
- /**
60180
- * SVGs for elements are generated by the {@link GraphicsFactory}.
60181
- *
60182
- * This utility gives quick access to the important semantic
60183
- * parts of an element.
60184
- */
60185
-
60186
- /**
60187
- * Returns the visual part of a diagram element
60188
- *
60189
- * @param {Snap<SVGElement>} gfx
60190
- *
60191
- * @return {Snap<SVGElement>}
60192
- */
60193
- function getVisual$1(gfx) {
60194
- return gfx.childNodes[0];
60195
- }
60196
-
60197
59677
  var MINIMAP_VIEWBOX_PADDING = 50;
60198
59678
 
60199
59679
  var RANGE$1 = { min: 0.2, max: 4 },
@@ -60201,7 +59681,7 @@
60201
59681
 
60202
59682
  var DELTA_THRESHOLD$1 = 0.1;
60203
59683
 
60204
- var LOW_PRIORITY$q = 250;
59684
+ var LOW_PRIORITY$p = 250;
60205
59685
 
60206
59686
 
60207
59687
  /**
@@ -60475,7 +59955,7 @@
60475
59955
  });
60476
59956
 
60477
59957
  // update on elements changed
60478
- eventBus.on('elements.changed', LOW_PRIORITY$q, function(context) {
59958
+ eventBus.on('elements.changed', LOW_PRIORITY$p, function(context) {
60479
59959
  var elements = context.elements;
60480
59960
 
60481
59961
  elements.forEach(function(element) {
@@ -60861,7 +60341,7 @@
60861
60341
  visual;
60862
60342
 
60863
60343
  if (gfx) {
60864
- visual = getVisual$1(gfx);
60344
+ visual = getVisual(gfx);
60865
60345
 
60866
60346
  if (visual) {
60867
60347
  var elementGfx = clone(visual);
@@ -63568,106 +63048,6 @@
63568
63048
  return path.join(separator);
63569
63049
  }
63570
63050
 
63571
- /**
63572
- * Failsafe remove an element from a collection
63573
- *
63574
- * @param {Array<Object>} [collection]
63575
- * @param {Object} [element]
63576
- *
63577
- * @return {number} the previous index of the element
63578
- */
63579
- function remove$3(collection, element) {
63580
-
63581
- if (!collection || !element) {
63582
- return -1;
63583
- }
63584
-
63585
- var idx = collection.indexOf(element);
63586
-
63587
- if (idx !== -1) {
63588
- collection.splice(idx, 1);
63589
- }
63590
-
63591
- return idx;
63592
- }
63593
-
63594
- /**
63595
- * Fail save add an element to the given connection, ensuring
63596
- * it does not yet exist.
63597
- *
63598
- * @param {Array<Object>} collection
63599
- * @param {Object} element
63600
- * @param {number} idx
63601
- */
63602
- function add$2(collection, element, idx) {
63603
-
63604
- if (!collection || !element) {
63605
- return;
63606
- }
63607
-
63608
- if (typeof idx !== 'number') {
63609
- idx = -1;
63610
- }
63611
-
63612
- var currentIdx = collection.indexOf(element);
63613
-
63614
- if (currentIdx !== -1) {
63615
-
63616
- if (currentIdx === idx) {
63617
-
63618
- // nothing to do, position has not changed
63619
- return;
63620
- } else {
63621
-
63622
- if (idx !== -1) {
63623
-
63624
- // remove from current position
63625
- collection.splice(currentIdx, 1);
63626
- } else {
63627
-
63628
- // already exists in collection
63629
- return;
63630
- }
63631
- }
63632
- }
63633
-
63634
- if (idx !== -1) {
63635
-
63636
- // insert at specified position
63637
- collection.splice(idx, 0, element);
63638
- } else {
63639
-
63640
- // push to end
63641
- collection.push(element);
63642
- }
63643
- }
63644
-
63645
-
63646
- /**
63647
- * Fail save get the index of an element in a collection.
63648
- *
63649
- * @param {Array<Object>} collection
63650
- * @param {Object} element
63651
- *
63652
- * @return {number} the index or -1 if collection or element do
63653
- * not exist or the element is not contained.
63654
- */
63655
- function indexOf$2(collection, element) {
63656
-
63657
- if (!collection || !element) {
63658
- return -1;
63659
- }
63660
-
63661
- return collection.indexOf(element);
63662
- }
63663
-
63664
- var Collections = /*#__PURE__*/Object.freeze({
63665
- __proto__: null,
63666
- remove: remove$3,
63667
- add: add$2,
63668
- indexOf: indexOf$2
63669
- });
63670
-
63671
63051
  const arrayMoveMutate = (array, from, to) => {
63672
63052
  const startIndex = from < 0 ? array.length + from : from;
63673
63053
 
@@ -63844,7 +63224,7 @@
63844
63224
  * @param {Object} e
63845
63225
  * @param {boolean} unique
63846
63226
  */
63847
- function add$3(elements, e, unique) {
63227
+ function add$2(elements, e, unique) {
63848
63228
  var canAdd = !unique || elements.indexOf(e) === -1;
63849
63229
 
63850
63230
  if (canAdd) {
@@ -63868,7 +63248,7 @@
63868
63248
  processedFlowElements = [];
63869
63249
 
63870
63250
  eachElement$1(elements, function(element, i, depth) {
63871
- add$3(result, element, unique);
63251
+ add$2(result, element, unique);
63872
63252
 
63873
63253
  var flowElements = element.flowElements;
63874
63254
 
@@ -63876,7 +63256,7 @@
63876
63256
  if (maxDepth === -1 || depth < maxDepth) {
63877
63257
 
63878
63258
  // flowElements exist && flowElements not yet processed
63879
- if (flowElements && add$3(processedFlowElements, flowElements, unique)) {
63259
+ if (flowElements && add$2(processedFlowElements, flowElements, unique)) {
63880
63260
  return flowElements;
63881
63261
  }
63882
63262
  }
@@ -64368,37 +63748,6 @@
64368
63748
  return a.concat(b);
64369
63749
  }
64370
63750
 
64371
- /**
64372
- * A simple translation stub to be used for multi-language support
64373
- * in diagrams. Can be easily replaced with a more sophisticated
64374
- * solution.
64375
- *
64376
- * @example
64377
- *
64378
- * // use it inside any diagram component by injecting `translate`.
64379
- *
64380
- * function MyService(translate) {
64381
- * alert(translate('HELLO {you}', { you: 'You!' }));
64382
- * }
64383
- *
64384
- * @param {string} template to interpolate
64385
- * @param {Object} [replacements] a map with substitutes
64386
- *
64387
- * @return {string} the translated string
64388
- */
64389
- function translate$3(template, replacements) {
64390
-
64391
- replacements = replacements || {};
64392
-
64393
- return template.replace(/{([^}]+)}/g, function(_, key) {
64394
- return replacements[key] || '{' + key + '}';
64395
- });
64396
- }
64397
-
64398
- var translateModule = {
64399
- translate: [ 'value', translate$3 ]
64400
- };
64401
-
64402
63751
  var semverCompare = function cmp (a, b) {
64403
63752
  var pa = a.split('.');
64404
63753
  var pb = b.split('.');
@@ -65039,147 +64388,6 @@
65039
64388
  return _validate(object, standaloneValidator);
65040
64389
  }
65041
64390
 
65042
- var DEFAULT_PRIORITY$7 = 1000;
65043
-
65044
- /**
65045
- * A utility that can be used to plug-in into the command execution for
65046
- * extension and/or validation.
65047
- *
65048
- * @param {EventBus} eventBus
65049
- *
65050
- * @example
65051
- *
65052
- * import inherits from 'inherits';
65053
- *
65054
- * import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
65055
- *
65056
- * function CommandLogger(eventBus) {
65057
- * CommandInterceptor.call(this, eventBus);
65058
- *
65059
- * this.preExecute(function(event) {
65060
- * console.log('command pre-execute', event);
65061
- * });
65062
- * }
65063
- *
65064
- * inherits(CommandLogger, CommandInterceptor);
65065
- *
65066
- */
65067
- function CommandInterceptor$1(eventBus) {
65068
- this._eventBus = eventBus;
65069
- }
65070
-
65071
- CommandInterceptor$1.$inject = [ 'eventBus' ];
65072
-
65073
- function unwrapEvent$1(fn, that) {
65074
- return function(event) {
65075
- return fn.call(that || null, event.context, event.command, event);
65076
- };
65077
- }
65078
-
65079
- /**
65080
- * Register an interceptor for a command execution
65081
- *
65082
- * @param {string|Array<string>} [events] list of commands to register on
65083
- * @param {string} [hook] command hook, i.e. preExecute, executed to listen on
65084
- * @param {number} [priority] the priority on which to hook into the execution
65085
- * @param {Function} handlerFn interceptor to be invoked with (event)
65086
- * @param {boolean} unwrap if true, unwrap the event and pass (context, command, event) to the
65087
- * listener instead
65088
- * @param {Object} [that] Pass context (`this`) to the handler function
65089
- */
65090
- CommandInterceptor$1.prototype.on = function(events, hook, priority, handlerFn, unwrap, that) {
65091
-
65092
- if (isFunction(hook) || isNumber(hook)) {
65093
- that = unwrap;
65094
- unwrap = handlerFn;
65095
- handlerFn = priority;
65096
- priority = hook;
65097
- hook = null;
65098
- }
65099
-
65100
- if (isFunction(priority)) {
65101
- that = unwrap;
65102
- unwrap = handlerFn;
65103
- handlerFn = priority;
65104
- priority = DEFAULT_PRIORITY$7;
65105
- }
65106
-
65107
- if (isObject(unwrap)) {
65108
- that = unwrap;
65109
- unwrap = false;
65110
- }
65111
-
65112
- if (!isFunction(handlerFn)) {
65113
- throw new Error('handlerFn must be a function');
65114
- }
65115
-
65116
- if (!isArray(events)) {
65117
- events = [ events ];
65118
- }
65119
-
65120
- var eventBus = this._eventBus;
65121
-
65122
- forEach(events, function(event) {
65123
-
65124
- // concat commandStack(.event)?(.hook)?
65125
- var fullEvent = [ 'commandStack', event, hook ].filter(function(e) { return e; }).join('.');
65126
-
65127
- eventBus.on(fullEvent, priority, unwrap ? unwrapEvent$1(handlerFn, that) : handlerFn, that);
65128
- });
65129
- };
65130
-
65131
-
65132
- var hooks$1 = [
65133
- 'canExecute',
65134
- 'preExecute',
65135
- 'preExecuted',
65136
- 'execute',
65137
- 'executed',
65138
- 'postExecute',
65139
- 'postExecuted',
65140
- 'revert',
65141
- 'reverted'
65142
- ];
65143
-
65144
- /*
65145
- * Install hook shortcuts
65146
- *
65147
- * This will generate the CommandInterceptor#(preExecute|...|reverted) methods
65148
- * which will in term forward to CommandInterceptor#on.
65149
- */
65150
- forEach(hooks$1, function(hook) {
65151
-
65152
- /**
65153
- * {canExecute|preExecute|preExecuted|execute|executed|postExecute|postExecuted|revert|reverted}
65154
- *
65155
- * A named hook for plugging into the command execution
65156
- *
65157
- * @param {string|Array<string>} [events] list of commands to register on
65158
- * @param {number} [priority] the priority on which to hook into the execution
65159
- * @param {Function} handlerFn interceptor to be invoked with (event)
65160
- * @param {boolean} [unwrap=false] if true, unwrap the event and pass (context, command, event) to the
65161
- * listener instead
65162
- * @param {Object} [that] Pass context (`this`) to the handler function
65163
- */
65164
- CommandInterceptor$1.prototype[hook] = function(events, priority, handlerFn, unwrap, that) {
65165
-
65166
- if (isFunction(events) || isNumber(events)) {
65167
- that = unwrap;
65168
- unwrap = handlerFn;
65169
- handlerFn = priority;
65170
- priority = events;
65171
- events = null;
65172
- }
65173
-
65174
- this.on(events, hook, priority, handlerFn, unwrap, that);
65175
- };
65176
- });
65177
-
65178
- var CommandInterceptor$2 = /*#__PURE__*/Object.freeze({
65179
- __proto__: null,
65180
- 'default': CommandInterceptor$1
65181
- });
65182
-
65183
64391
  const BpmnPropertiesPanelContext = q({
65184
64392
  selectedElement: null,
65185
64393
  injector: null,
@@ -66736,7 +65944,7 @@
66736
65944
  return element && elementRegistry.get(element.id);
66737
65945
  }
66738
65946
 
66739
- const DEFAULT_PRIORITY$8 = 1000;
65947
+ const DEFAULT_PRIORITY$7 = 1000;
66740
65948
  /**
66741
65949
  * @typedef { import('@bpmn-io/properties-panel').GroupDefinition } GroupDefinition
66742
65950
  * @typedef { import('@bpmn-io/properties-panel').ListGroupDefinition } ListGroupDefinition
@@ -66819,7 +66027,7 @@
66819
66027
  registerProvider(priority, provider) {
66820
66028
  if (!provider) {
66821
66029
  provider = priority;
66822
- priority = DEFAULT_PRIORITY$8;
66030
+ priority = DEFAULT_PRIORITY$7;
66823
66031
  }
66824
66032
 
66825
66033
  if (typeof provider.getGroups !== 'function') {
@@ -68617,7 +67825,7 @@
68617
67825
  categoryValue: [categoryValue]
68618
67826
  }); // add to correct place
68619
67827
 
68620
- add$2(definitions.get('rootElements'), category);
67828
+ add$1(definitions.get('rootElements'), category);
68621
67829
  getBusinessObject(category).$parent = definitions;
68622
67830
  getBusinessObject(categoryValue).$parent = category;
68623
67831
  return categoryValue;
@@ -78174,7 +77382,7 @@
78174
77382
  return is$1(element, 'bpmn:Process') ? getBusinessObject(element) : getBusinessObject(element).get('processRef');
78175
77383
  }
78176
77384
 
78177
- const LOW_PRIORITY$r = 500;
77385
+ const LOW_PRIORITY$q = 500;
78178
77386
  const CAMUNDA_PLATFORM_GROUPS = [HistoryCleanupGroup, TasklistGroup, CandidateStarterGroup, ImplementationGroup, ExternalTaskGroup, ProcessVariablesGroup, ErrorsGroup, UserAssignmentGroup, FormGroup, FormDataGroup, TaskListenerGroup, StartInitiatorGroup, ScriptGroup, ConditionGroup, CallActivityGroup, AsynchronousContinuationsGroup, JobExecutionGroup, InMappingPropagationGroup, InMappingGroup, InputGroup, ConnectorInputGroup, OutMappingPropagationGroup, OutMappingGroup, OutputGroup, ConnectorOutputGroup, ExecutionListenerGroup, ExtensionPropertiesGroup, FieldInjectionGroup, BusinessKeyGroup];
78179
77387
  /**
78180
77388
  * Provides `camunda` namespace properties.
@@ -78204,7 +77412,7 @@
78204
77412
 
78205
77413
  class CamundaPlatformPropertiesProvider {
78206
77414
  constructor(propertiesPanel, injector) {
78207
- propertiesPanel.registerProvider(LOW_PRIORITY$r, this);
77415
+ propertiesPanel.registerProvider(LOW_PRIORITY$q, this);
78208
77416
  this._injector = injector;
78209
77417
  }
78210
77418
 
@@ -80324,7 +79532,7 @@
80324
79532
  * it if not.
80325
79533
  */
80326
79534
 
80327
- class ReplaceBehavior extends CommandInterceptor$1 {
79535
+ class ReplaceBehavior extends CommandInterceptor {
80328
79536
  constructor(elementTemplates, injector) {
80329
79537
  super(injector.get('eventBus'));
80330
79538
  this.postExecuted('shape.replace', function (e) {
@@ -80838,7 +80046,7 @@
80838
80046
  });
80839
80047
  }
80840
80048
 
80841
- remove$4(oldErrorEventDefinitions, oldEventDefinition);
80049
+ remove$3(oldErrorEventDefinitions, oldEventDefinition);
80842
80050
  } // (3) create new event definition + error
80843
80051
  else {
80844
80052
  const rootElement = getRoot(getBusinessObject(element)),
@@ -80958,7 +80166,7 @@
80958
80166
  });
80959
80167
  }
80960
80168
 
80961
- remove$4(oldFields, oldField);
80169
+ remove$3(oldFields, oldField);
80962
80170
  } // (3) add new fields
80963
80171
  else {
80964
80172
  const newCamundaFieldInjection = createCamundaFieldInjection(newBinding, newProperty.value, bpmnFactory);
@@ -81048,7 +80256,7 @@
81048
80256
  });
81049
80257
  }
81050
80258
 
81051
- remove$4(oldInsAndOuts, oldInOurOut);
80259
+ remove$3(oldInsAndOuts, oldInOurOut);
81052
80260
  } // (3) add new ins and outs
81053
80261
  else {
81054
80262
  if (newBindingType === 'camunda:in') {
@@ -81168,9 +80376,9 @@
81168
80376
  }
81169
80377
 
81170
80378
  if (is$1(oldInputOrOutput, 'camunda:InputParameter')) {
81171
- remove$4(oldInputs, oldInputOrOutput);
80379
+ remove$3(oldInputs, oldInputOrOutput);
81172
80380
  } else {
81173
- remove$4(oldOutputs, oldInputOrOutput);
80381
+ remove$3(oldOutputs, oldInputOrOutput);
81174
80382
  }
81175
80383
  } // (3) add new inputs and outputs
81176
80384
  else {
@@ -81281,7 +80489,7 @@
81281
80489
  });
81282
80490
  }
81283
80491
 
81284
- remove$4(oldCamundaProperties, oldCamundaProperty);
80492
+ remove$3(oldCamundaProperties, oldCamundaProperty);
81285
80493
  } // (3) add new properties
81286
80494
  else {
81287
80495
  const newCamundaProperty = createCamundaProperty(newBinding, newPropertyValue, bpmnFactory);
@@ -81836,7 +81044,7 @@
81836
81044
  }
81837
81045
  }
81838
81046
 
81839
- function remove$4(array, item) {
81047
+ function remove$3(array, item) {
81840
81048
  const index = array.indexOf(item);
81841
81049
 
81842
81050
  if (isUndefined(index)) {
@@ -83588,7 +82796,7 @@
83588
82796
  * Camunda BPMN specific behavior ensuring camunda:ErrorEventDefinition extension elements are removed
83589
82797
  * if type of e.g. bpmn:ServiceTask is set to something other than external.
83590
82798
  */
83591
- class DeleteErrorEventDefinitionBehavior extends CommandInterceptor$1 {
82799
+ class DeleteErrorEventDefinitionBehavior extends CommandInterceptor {
83592
82800
  constructor(commandStack, eventBus) {
83593
82801
  super(eventBus);
83594
82802
 
@@ -83632,7 +82840,7 @@
83632
82840
  * removed when both camunda:asyncAfter and camunda:asyncBefore set to false.
83633
82841
  * Doesn't apply if element has bpmn:TimerEventDefinition.
83634
82842
  */
83635
- class DeleteRetryTimeCycleBehavior extends CommandInterceptor$1 {
82843
+ class DeleteRetryTimeCycleBehavior extends CommandInterceptor {
83636
82844
  constructor(commandStack, eventBus) {
83637
82845
  super(eventBus);
83638
82846
 
@@ -83716,7 +82924,7 @@
83716
82924
  * Camunda BPMN specific behavior ensuring camunda:exclusive is set to true if
83717
82925
  * camunda:asyncBefore or camunda:asyncAfter is set to false.
83718
82926
  */
83719
- class UpdateCamundaExclusiveBehavior extends CommandInterceptor$1 {
82927
+ class UpdateCamundaExclusiveBehavior extends CommandInterceptor {
83720
82928
  constructor(eventBus) {
83721
82929
  super(eventBus);
83722
82930
 
@@ -83786,17 +82994,17 @@
83786
82994
  return !inputParameters.length && !outputParameters.length;
83787
82995
  }
83788
82996
 
83789
- const LOW_PRIORITY$s = 250;
82997
+ const LOW_PRIORITY$r = 250;
83790
82998
 
83791
82999
 
83792
83000
  /**
83793
83001
  * Camunda BPMN specific behavior ensuring empty camunda:InputOutput is removed.
83794
83002
  */
83795
- class UpdateInputOutputBehavior extends CommandInterceptor$1 {
83003
+ class UpdateInputOutputBehavior extends CommandInterceptor {
83796
83004
  constructor(commandStack, eventBus) {
83797
83005
  super(eventBus);
83798
83006
 
83799
- this.postExecuted('element.updateModdleProperties', LOW_PRIORITY$s, function(context) {
83007
+ this.postExecuted('element.updateModdleProperties', LOW_PRIORITY$r, function(context) {
83800
83008
  const {
83801
83009
  element,
83802
83010
  moddleElement
@@ -83825,7 +83033,7 @@
83825
83033
  * Camunda BPMN specific camunda:resultVariable behavior ensuring
83826
83034
  * camunda:mapDecisionResult is removed when camunda:resultVariable is removed.
83827
83035
  */
83828
- class UpdateResultVariableBehavior extends CommandInterceptor$1 {
83036
+ class UpdateResultVariableBehavior extends CommandInterceptor {
83829
83037
  constructor(eventBus) {
83830
83038
  super(eventBus);
83831
83039
 
@@ -83867,7 +83075,7 @@
83867
83075
  /**
83868
83076
  * Camunda BPMN specific user task forms behavior.
83869
83077
  */
83870
- class UserTaskFormsBehavior extends CommandInterceptor$1 {
83078
+ class UserTaskFormsBehavior extends CommandInterceptor {
83871
83079
  constructor(eventBus) {
83872
83080
  super(eventBus);
83873
83081
 
@@ -83933,7 +83141,7 @@
83933
83141
  * 2. Updates camunda:FormData#businessKey if camunda:FormField#id is changed.
83934
83142
  * 3. Removes camunda:FormData#businessKey if camunda:FormField is removed.
83935
83143
  */
83936
- class UserTaskFormsBehavior$1 extends CommandInterceptor$1 {
83144
+ class UserTaskFormsBehavior$1 extends CommandInterceptor {
83937
83145
  constructor(eventBus, modeling) {
83938
83146
  super(eventBus);
83939
83147
 
@@ -84223,7 +83431,7 @@
84223
83431
  return allowedIn.indexOf(WILDCARD) !== -1;
84224
83432
  }
84225
83433
 
84226
- var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(CommandInterceptor$2);
83434
+ var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(CommandInterceptor$1);
84227
83435
 
84228
83436
  var require$$2 = /*@__PURE__*/getAugmentedNamespace(Collections);
84229
83437
 
@@ -84232,7 +83440,7 @@
84232
83440
  var find$1 = require$$0.find,
84233
83441
  matchPattern$1 = require$$0.matchPattern;
84234
83442
 
84235
- var CommandInterceptor$3 = require$$0$1.default;
83443
+ var CommandInterceptor$2 = require$$0$1.default;
84236
83444
 
84237
83445
  var collectionAdd = require$$2.add,
84238
83446
  collectionRemove = require$$2.remove;
@@ -84240,7 +83448,7 @@
84240
83448
  var getBusinessObject$1 = require$$1.getBusinessObject,
84241
83449
  is$5 = require$$1.is;
84242
83450
 
84243
- var LOW_PRIORITY$t = 500;
83451
+ var LOW_PRIORITY$s = 500;
84244
83452
 
84245
83453
 
84246
83454
  /**
@@ -84251,7 +83459,7 @@
84251
83459
  bpmnjs, eventBus, injector, moddleCopy, bpmnFactory
84252
83460
  ) {
84253
83461
 
84254
- injector.invoke(CommandInterceptor$3, this);
83462
+ injector.invoke(CommandInterceptor$2, this);
84255
83463
 
84256
83464
 
84257
83465
  function hasRootElement(rootElement) {
@@ -84322,7 +83530,7 @@
84322
83530
  });
84323
83531
 
84324
83532
 
84325
- eventBus.on('copyPaste.pasteElement', LOW_PRIORITY$t, function(context) {
83533
+ eventBus.on('copyPaste.pasteElement', LOW_PRIORITY$s, function(context) {
84326
83534
  var descriptor = context.descriptor,
84327
83535
  businessObject = descriptor.businessObject;
84328
83536
 
@@ -84366,7 +83574,7 @@
84366
83574
  'bpmnFactory'
84367
83575
  ];
84368
83576
 
84369
- inherits_browser(CopyPasteRootElementBehavior, CommandInterceptor$3);
83577
+ inherits_browser(CopyPasteRootElementBehavior, CommandInterceptor$2);
84370
83578
 
84371
83579
  var CopyPasteRootElementBehavior_1 = CopyPasteRootElementBehavior;
84372
83580
 
@@ -84451,7 +83659,7 @@
84451
83659
  return extensionElements.values.indexOf(extensionElement);
84452
83660
  }
84453
83661
 
84454
- var CommandInterceptor$4 = require$$0$1.default;
83662
+ var CommandInterceptor$3 = require$$0$1.default;
84455
83663
  var is$6 = require$$1.is;
84456
83664
  var getBusinessObject$2 = require$$1.getBusinessObject;
84457
83665
 
@@ -84462,7 +83670,7 @@
84462
83670
  modeling, injector
84463
83671
  ) {
84464
83672
 
84465
- injector.invoke(CommandInterceptor$4, this);
83673
+ injector.invoke(CommandInterceptor$3, this);
84466
83674
 
84467
83675
  this.postExecuted(['shape.create','shape.move'], function(context) {
84468
83676
 
@@ -84490,11 +83698,11 @@
84490
83698
  'injector',
84491
83699
  ];
84492
83700
 
84493
- inherits_browser(RemoveInitiatorBehaviour, CommandInterceptor$4);
83701
+ inherits_browser(RemoveInitiatorBehaviour, CommandInterceptor$3);
84494
83702
 
84495
83703
  var RemoveInitiatorBehaviour_1 = RemoveInitiatorBehaviour;
84496
83704
 
84497
- var CommandInterceptor$5 = require$$0$1.default;
83705
+ var CommandInterceptor$4 = require$$0$1.default;
84498
83706
  var is$7 = require$$1.is;
84499
83707
  var getBusinessObject$3 = require$$1.getBusinessObject;
84500
83708
 
@@ -84504,7 +83712,7 @@
84504
83712
  function RemoveVariableEventBehaviour(
84505
83713
  modeling, injector, bpmnFactory, moddleCopy
84506
83714
  ) {
84507
- injector.invoke(CommandInterceptor$5, this);
83715
+ injector.invoke(CommandInterceptor$4, this);
84508
83716
 
84509
83717
  this.postExecuted(['shape.move', 'shape.create'], function(context) {
84510
83718
 
@@ -84556,7 +83764,7 @@
84556
83764
  'moddleCopy'
84557
83765
  ];
84558
83766
 
84559
- inherits_browser(RemoveVariableEventBehaviour, CommandInterceptor$5);
83767
+ inherits_browser(RemoveVariableEventBehaviour, CommandInterceptor$4);
84560
83768
 
84561
83769
  var RemoveVariableEventBehaviour_1 = RemoveVariableEventBehaviour;
84562
83770