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.
@@ -15994,7 +15994,7 @@
15994
15994
  }
15995
15995
 
15996
15996
  /**
15997
- * Returns all diagrams in the same hirarchy as the requested diagram.
15997
+ * Returns all diagrams in the same hierarchy as the requested diagram.
15998
15998
  * Includes all parent and sub process diagrams.
15999
15999
  *
16000
16000
  * @param {Array} definitions
@@ -20089,7 +20089,7 @@
20089
20089
  });
20090
20090
  }
20091
20091
 
20092
- var translate$2 = {
20092
+ var translateModule = {
20093
20093
  translate: [ 'value', translate$1 ]
20094
20094
  };
20095
20095
 
@@ -20570,7 +20570,7 @@
20570
20570
 
20571
20571
  var ImportModule = {
20572
20572
  __depends__: [
20573
- translate$2
20573
+ translateModule
20574
20574
  ],
20575
20575
  bpmnImporter: [ 'type', BpmnImporter ]
20576
20576
  };
@@ -22950,7 +22950,7 @@
22950
22950
  collapsedElements.push(bo);
22951
22951
  }
22952
22952
 
22953
- if (is$1(parent, 'bpmn:SubProcess') && parent !== plane.bpmnElement) {
22953
+ if (shouldMoveToPlane(bo, plane)) {
22954
22954
 
22955
22955
  // don't change the array while we iterate over it
22956
22956
  elementsToMove.push({ diElement: diElement, parent: parent });
@@ -23039,7 +23039,7 @@
23039
23039
  SubprocessCompatibility.$inject = [ 'eventBus', 'moddle' ];
23040
23040
 
23041
23041
 
23042
- // helpers
23042
+ // helpers //////////////////////////
23043
23043
 
23044
23044
  function findRootDiagram(element) {
23045
23045
  if (is$1(element, 'bpmndi:BPMNDiagram')) {
@@ -23071,6 +23071,23 @@
23071
23071
  return asBounds(planeTrbl);
23072
23072
  }
23073
23073
 
23074
+ function shouldMoveToPlane(bo, plane) {
23075
+ var parent = bo.$parent;
23076
+
23077
+ // don't move elements that are already on the plane
23078
+ if (!is$1(parent, 'bpmn:SubProcess') || parent === plane.bpmnElement) {
23079
+ return false;
23080
+ }
23081
+
23082
+ // dataAssociations are children of the subprocess but rendered on process level
23083
+ // cf. https://github.com/bpmn-io/bpmn-js/issues/1619
23084
+ if (isAny(bo, ['bpmn:DataInputAssociation', 'bpmn:DataOutputAssociation'])) {
23085
+ return false;
23086
+ }
23087
+
23088
+ return true;
23089
+ }
23090
+
23074
23091
  var LOW_PRIORITY$3 = 250;
23075
23092
  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>';
23076
23093
 
@@ -23146,7 +23163,7 @@
23146
23163
  }, true);
23147
23164
 
23148
23165
 
23149
- eventBus.on('import.done', function() {
23166
+ eventBus.on('import.render.complete', function() {
23150
23167
  elementRegistry.filter(function(e) {
23151
23168
  return self.canDrillDown(e);
23152
23169
  }).map(function(el) {
@@ -23311,7 +23328,7 @@
23311
23328
  // modules the viewer is composed of
23312
23329
  Viewer.prototype._modules = [
23313
23330
  CoreModule$1,
23314
- translate$2,
23331
+ translateModule,
23315
23332
  SelectionModule,
23316
23333
  OverlaysModule,
23317
23334
  DrilldownModdule
@@ -31777,537 +31794,6 @@
31777
31794
  connectionPreview: [ 'type', ConnectionPreview ]
31778
31795
  };
31779
31796
 
31780
- function getOriginal$1(event) {
31781
- return event.originalEvent || event.srcEvent;
31782
- }
31783
-
31784
- function isButton$1(event, button) {
31785
- return (getOriginal$1(event) || event).button === button;
31786
- }
31787
-
31788
- function isPrimaryButton$1(event) {
31789
-
31790
- // button === 0 -> left áka primary mouse button
31791
- return isButton$1(event, 0);
31792
- }
31793
-
31794
- function isAuxiliaryButton$1(event) {
31795
-
31796
- // button === 1 -> auxiliary áka wheel button
31797
- return isButton$1(event, 1);
31798
- }
31799
-
31800
- function toSVGPoints$1(points) {
31801
- var result = '';
31802
-
31803
- for (var i = 0, p; (p = points[i]); i++) {
31804
- result += p.x + ',' + p.y + ' ';
31805
- }
31806
-
31807
- return result;
31808
- }
31809
-
31810
- function createLine$1(points, attrs) {
31811
-
31812
- var line = create('polyline');
31813
- attr$1(line, { points: toSVGPoints$1(points) });
31814
-
31815
- if (attrs) {
31816
- attr$1(line, attrs);
31817
- }
31818
-
31819
- return line;
31820
- }
31821
-
31822
- function updateLine$1(gfx, points) {
31823
- attr$1(gfx, { points: toSVGPoints$1(points) });
31824
-
31825
- return gfx;
31826
- }
31827
-
31828
- function allowAll$1(event) { return true; }
31829
-
31830
- function allowPrimaryAndAuxiliary$1(event) {
31831
- return isPrimaryButton$1(event) || isAuxiliaryButton$1(event);
31832
- }
31833
-
31834
- var LOW_PRIORITY$7 = 500;
31835
-
31836
-
31837
- /**
31838
- * A plugin that provides interaction events for diagram elements.
31839
- *
31840
- * It emits the following events:
31841
- *
31842
- * * element.click
31843
- * * element.contextmenu
31844
- * * element.dblclick
31845
- * * element.hover
31846
- * * element.mousedown
31847
- * * element.mousemove
31848
- * * element.mouseup
31849
- * * element.out
31850
- *
31851
- * Each event is a tuple { element, gfx, originalEvent }.
31852
- *
31853
- * Canceling the event via Event#preventDefault()
31854
- * prevents the original DOM operation.
31855
- *
31856
- * @param {EventBus} eventBus
31857
- */
31858
- function InteractionEvents$1(eventBus, elementRegistry, styles) {
31859
-
31860
- var self = this;
31861
-
31862
- /**
31863
- * Fire an interaction event.
31864
- *
31865
- * @param {string} type local event name, e.g. element.click.
31866
- * @param {DOMEvent} event native event
31867
- * @param {djs.model.Base} [element] the diagram element to emit the event on;
31868
- * defaults to the event target
31869
- */
31870
- function fire(type, event, element) {
31871
-
31872
- if (isIgnored(type, event)) {
31873
- return;
31874
- }
31875
-
31876
- var target, gfx, returnValue;
31877
-
31878
- if (!element) {
31879
- target = event.delegateTarget || event.target;
31880
-
31881
- if (target) {
31882
- gfx = target;
31883
- element = elementRegistry.get(gfx);
31884
- }
31885
- } else {
31886
- gfx = elementRegistry.getGraphics(element);
31887
- }
31888
-
31889
- if (!gfx || !element) {
31890
- return;
31891
- }
31892
-
31893
- returnValue = eventBus.fire(type, {
31894
- element: element,
31895
- gfx: gfx,
31896
- originalEvent: event
31897
- });
31898
-
31899
- if (returnValue === false) {
31900
- event.stopPropagation();
31901
- event.preventDefault();
31902
- }
31903
- }
31904
-
31905
- // TODO(nikku): document this
31906
- var handlers = {};
31907
-
31908
- function mouseHandler(localEventName) {
31909
- return handlers[localEventName];
31910
- }
31911
-
31912
- function isIgnored(localEventName, event) {
31913
-
31914
- var filter = ignoredFilters[localEventName] || isPrimaryButton$1;
31915
-
31916
- // only react on left mouse button interactions
31917
- // except for interaction events that are enabled
31918
- // for secundary mouse button
31919
- return !filter(event);
31920
- }
31921
-
31922
- var bindings = {
31923
- click: 'element.click',
31924
- contextmenu: 'element.contextmenu',
31925
- dblclick: 'element.dblclick',
31926
- mousedown: 'element.mousedown',
31927
- mousemove: 'element.mousemove',
31928
- mouseover: 'element.hover',
31929
- mouseout: 'element.out',
31930
- mouseup: 'element.mouseup',
31931
- };
31932
-
31933
- var ignoredFilters = {
31934
- 'element.contextmenu': allowAll$1,
31935
- 'element.mousedown': allowPrimaryAndAuxiliary$1,
31936
- 'element.mouseup': allowPrimaryAndAuxiliary$1,
31937
- 'element.click': allowPrimaryAndAuxiliary$1,
31938
- 'element.dblclick': allowPrimaryAndAuxiliary$1
31939
- };
31940
-
31941
-
31942
- // manual event trigger //////////
31943
-
31944
- /**
31945
- * Trigger an interaction event (based on a native dom event)
31946
- * on the target shape or connection.
31947
- *
31948
- * @param {string} eventName the name of the triggered DOM event
31949
- * @param {MouseEvent} event
31950
- * @param {djs.model.Base} targetElement
31951
- */
31952
- function triggerMouseEvent(eventName, event, targetElement) {
31953
-
31954
- // i.e. element.mousedown...
31955
- var localEventName = bindings[eventName];
31956
-
31957
- if (!localEventName) {
31958
- throw new Error('unmapped DOM event name <' + eventName + '>');
31959
- }
31960
-
31961
- return fire(localEventName, event, targetElement);
31962
- }
31963
-
31964
-
31965
- var ELEMENT_SELECTOR = 'svg, .djs-element';
31966
-
31967
- // event handling ///////
31968
-
31969
- function registerEvent(node, event, localEvent, ignoredFilter) {
31970
-
31971
- var handler = handlers[localEvent] = function(event) {
31972
- fire(localEvent, event);
31973
- };
31974
-
31975
- if (ignoredFilter) {
31976
- ignoredFilters[localEvent] = ignoredFilter;
31977
- }
31978
-
31979
- handler.$delegate = delegate.bind(node, ELEMENT_SELECTOR, event, handler);
31980
- }
31981
-
31982
- function unregisterEvent(node, event, localEvent) {
31983
-
31984
- var handler = mouseHandler(localEvent);
31985
-
31986
- if (!handler) {
31987
- return;
31988
- }
31989
-
31990
- delegate.unbind(node, event, handler.$delegate);
31991
- }
31992
-
31993
- function registerEvents(svg) {
31994
- forEach(bindings, function(val, key) {
31995
- registerEvent(svg, key, val);
31996
- });
31997
- }
31998
-
31999
- function unregisterEvents(svg) {
32000
- forEach(bindings, function(val, key) {
32001
- unregisterEvent(svg, key, val);
32002
- });
32003
- }
32004
-
32005
- eventBus.on('canvas.destroy', function(event) {
32006
- unregisterEvents(event.svg);
32007
- });
32008
-
32009
- eventBus.on('canvas.init', function(event) {
32010
- registerEvents(event.svg);
32011
- });
32012
-
32013
-
32014
- // hit box updating ////////////////
32015
-
32016
- eventBus.on([ 'shape.added', 'connection.added' ], function(event) {
32017
- var element = event.element,
32018
- gfx = event.gfx;
32019
-
32020
- eventBus.fire('interactionEvents.createHit', { element: element, gfx: gfx });
32021
- });
32022
-
32023
- // Update djs-hit on change.
32024
- // A low priortity is necessary, because djs-hit of labels has to be updated
32025
- // after the label bounds have been updated in the renderer.
32026
- eventBus.on([
32027
- 'shape.changed',
32028
- 'connection.changed'
32029
- ], LOW_PRIORITY$7, function(event) {
32030
-
32031
- var element = event.element,
32032
- gfx = event.gfx;
32033
-
32034
- eventBus.fire('interactionEvents.updateHit', { element: element, gfx: gfx });
32035
- });
32036
-
32037
- eventBus.on('interactionEvents.createHit', LOW_PRIORITY$7, function(event) {
32038
- var element = event.element,
32039
- gfx = event.gfx;
32040
-
32041
- self.createDefaultHit(element, gfx);
32042
- });
32043
-
32044
- eventBus.on('interactionEvents.updateHit', function(event) {
32045
- var element = event.element,
32046
- gfx = event.gfx;
32047
-
32048
- self.updateDefaultHit(element, gfx);
32049
- });
32050
-
32051
-
32052
- // hit styles ////////////
32053
-
32054
- var STROKE_HIT_STYLE = createHitStyle('djs-hit djs-hit-stroke');
32055
-
32056
- var CLICK_STROKE_HIT_STYLE = createHitStyle('djs-hit djs-hit-click-stroke');
32057
-
32058
- var ALL_HIT_STYLE = createHitStyle('djs-hit djs-hit-all');
32059
-
32060
- var HIT_TYPES = {
32061
- 'all': ALL_HIT_STYLE,
32062
- 'click-stroke': CLICK_STROKE_HIT_STYLE,
32063
- 'stroke': STROKE_HIT_STYLE
32064
- };
32065
-
32066
- function createHitStyle(classNames, attrs) {
32067
-
32068
- attrs = assign({
32069
- stroke: 'white',
32070
- strokeWidth: 15
32071
- }, attrs || {});
32072
-
32073
- return styles.cls(classNames, [ 'no-fill', 'no-border' ], attrs);
32074
- }
32075
-
32076
-
32077
- // style helpers ///////////////
32078
-
32079
- function applyStyle(hit, type) {
32080
-
32081
- var attrs = HIT_TYPES[type];
32082
-
32083
- if (!attrs) {
32084
- throw new Error('invalid hit type <' + type + '>');
32085
- }
32086
-
32087
- attr$1(hit, attrs);
32088
-
32089
- return hit;
32090
- }
32091
-
32092
- function appendHit(gfx, hit) {
32093
- append(gfx, hit);
32094
- }
32095
-
32096
-
32097
- // API
32098
-
32099
- /**
32100
- * Remove hints on the given graphics.
32101
- *
32102
- * @param {SVGElement} gfx
32103
- */
32104
- this.removeHits = function(gfx) {
32105
- var hits = all('.djs-hit', gfx);
32106
-
32107
- forEach(hits, remove$1);
32108
- };
32109
-
32110
- /**
32111
- * Create default hit for the given element.
32112
- *
32113
- * @param {djs.model.Base} element
32114
- * @param {SVGElement} gfx
32115
- *
32116
- * @return {SVGElement} created hit
32117
- */
32118
- this.createDefaultHit = function(element, gfx) {
32119
- var waypoints = element.waypoints,
32120
- isFrame = element.isFrame,
32121
- boxType;
32122
-
32123
- if (waypoints) {
32124
- return this.createWaypointsHit(gfx, waypoints);
32125
- } else {
32126
-
32127
- boxType = isFrame ? 'stroke' : 'all';
32128
-
32129
- return this.createBoxHit(gfx, boxType, {
32130
- width: element.width,
32131
- height: element.height
32132
- });
32133
- }
32134
- };
32135
-
32136
- /**
32137
- * Create hits for the given waypoints.
32138
- *
32139
- * @param {SVGElement} gfx
32140
- * @param {Array<Point>} waypoints
32141
- *
32142
- * @return {SVGElement}
32143
- */
32144
- this.createWaypointsHit = function(gfx, waypoints) {
32145
-
32146
- var hit = createLine$1(waypoints);
32147
-
32148
- applyStyle(hit, 'stroke');
32149
-
32150
- appendHit(gfx, hit);
32151
-
32152
- return hit;
32153
- };
32154
-
32155
- /**
32156
- * Create hits for a box.
32157
- *
32158
- * @param {SVGElement} gfx
32159
- * @param {string} hitType
32160
- * @param {Object} attrs
32161
- *
32162
- * @return {SVGElement}
32163
- */
32164
- this.createBoxHit = function(gfx, type, attrs) {
32165
-
32166
- attrs = assign({
32167
- x: 0,
32168
- y: 0
32169
- }, attrs);
32170
-
32171
- var hit = create('rect');
32172
-
32173
- applyStyle(hit, type);
32174
-
32175
- attr$1(hit, attrs);
32176
-
32177
- appendHit(gfx, hit);
32178
-
32179
- return hit;
32180
- };
32181
-
32182
- /**
32183
- * Update default hit of the element.
32184
- *
32185
- * @param {djs.model.Base} element
32186
- * @param {SVGElement} gfx
32187
- *
32188
- * @return {SVGElement} updated hit
32189
- */
32190
- this.updateDefaultHit = function(element, gfx) {
32191
-
32192
- var hit = query('.djs-hit', gfx);
32193
-
32194
- if (!hit) {
32195
- return;
32196
- }
32197
-
32198
- if (element.waypoints) {
32199
- updateLine$1(hit, element.waypoints);
32200
- } else {
32201
- attr$1(hit, {
32202
- width: element.width,
32203
- height: element.height
32204
- });
32205
- }
32206
-
32207
- return hit;
32208
- };
32209
-
32210
- this.fire = fire;
32211
-
32212
- this.triggerMouseEvent = triggerMouseEvent;
32213
-
32214
- this.mouseHandler = mouseHandler;
32215
-
32216
- this.registerEvent = registerEvent;
32217
- this.unregisterEvent = unregisterEvent;
32218
- }
32219
-
32220
-
32221
- InteractionEvents$1.$inject = [
32222
- 'eventBus',
32223
- 'elementRegistry',
32224
- 'styles'
32225
- ];
32226
-
32227
-
32228
- /**
32229
- * An event indicating that the mouse hovered over an element
32230
- *
32231
- * @event element.hover
32232
- *
32233
- * @type {Object}
32234
- * @property {djs.model.Base} element
32235
- * @property {SVGElement} gfx
32236
- * @property {Event} originalEvent
32237
- */
32238
-
32239
- /**
32240
- * An event indicating that the mouse has left an element
32241
- *
32242
- * @event element.out
32243
- *
32244
- * @type {Object}
32245
- * @property {djs.model.Base} element
32246
- * @property {SVGElement} gfx
32247
- * @property {Event} originalEvent
32248
- */
32249
-
32250
- /**
32251
- * An event indicating that the mouse has clicked an element
32252
- *
32253
- * @event element.click
32254
- *
32255
- * @type {Object}
32256
- * @property {djs.model.Base} element
32257
- * @property {SVGElement} gfx
32258
- * @property {Event} originalEvent
32259
- */
32260
-
32261
- /**
32262
- * An event indicating that the mouse has double clicked an element
32263
- *
32264
- * @event element.dblclick
32265
- *
32266
- * @type {Object}
32267
- * @property {djs.model.Base} element
32268
- * @property {SVGElement} gfx
32269
- * @property {Event} originalEvent
32270
- */
32271
-
32272
- /**
32273
- * An event indicating that the mouse has gone down on an element.
32274
- *
32275
- * @event element.mousedown
32276
- *
32277
- * @type {Object}
32278
- * @property {djs.model.Base} element
32279
- * @property {SVGElement} gfx
32280
- * @property {Event} originalEvent
32281
- */
32282
-
32283
- /**
32284
- * An event indicating that the mouse has gone up on an element.
32285
- *
32286
- * @event element.mouseup
32287
- *
32288
- * @type {Object}
32289
- * @property {djs.model.Base} element
32290
- * @property {SVGElement} gfx
32291
- * @property {Event} originalEvent
32292
- */
32293
-
32294
- /**
32295
- * An event indicating that the context menu action is triggered
32296
- * via mouse or touch controls.
32297
- *
32298
- * @event element.contextmenu
32299
- *
32300
- * @type {Object}
32301
- * @property {djs.model.Base} element
32302
- * @property {SVGElement} gfx
32303
- * @property {Event} originalEvent
32304
- */
32305
-
32306
- var InteractionEventsModule$1 = {
32307
- __init__: [ 'interactionEvents' ],
32308
- interactionEvents: [ 'type', InteractionEvents$1 ]
32309
- };
32310
-
32311
31797
  var min = Math.min,
32312
31798
  max$1 = Math.max;
32313
31799
 
@@ -32941,7 +32427,7 @@
32941
32427
 
32942
32428
  var DirectEditingModule = {
32943
32429
  __depends__: [
32944
- InteractionEventsModule$1
32430
+ InteractionEventsModule
32945
32431
  ],
32946
32432
  __init__: [ 'directEditing' ],
32947
32433
  directEditing: [ 'type', DirectEditing ]
@@ -33894,7 +33380,7 @@
33894
33380
  return !!element.labelTarget;
33895
33381
  }
33896
33382
 
33897
- var LOW_PRIORITY$8 = 750;
33383
+ var LOW_PRIORITY$7 = 750;
33898
33384
 
33899
33385
 
33900
33386
  function CreatePreview(
@@ -33939,7 +33425,7 @@
33939
33425
  return dragGroup;
33940
33426
  }
33941
33427
 
33942
- eventBus.on('create.move', LOW_PRIORITY$8, function(event) {
33428
+ eventBus.on('create.move', LOW_PRIORITY$7, function(event) {
33943
33429
 
33944
33430
  var hover = event.hover,
33945
33431
  context = event.context,
@@ -35306,12 +34792,12 @@
35306
34792
  });
35307
34793
  }
35308
34794
 
35309
- var LOW_PRIORITY$9 = 750;
34795
+ var LOW_PRIORITY$8 = 750;
35310
34796
 
35311
34797
 
35312
34798
  function BpmnCopyPaste(bpmnFactory, eventBus, moddleCopy) {
35313
34799
 
35314
- eventBus.on('copyPaste.copyElement', LOW_PRIORITY$9, function(context) {
34800
+ eventBus.on('copyPaste.copyElement', LOW_PRIORITY$8, function(context) {
35315
34801
  var descriptor = context.descriptor,
35316
34802
  element = context.element;
35317
34803
 
@@ -37397,16 +36883,16 @@
37397
36883
  var translate = this._translate;
37398
36884
 
37399
36885
  function toggleLoopEntry(event, entry) {
37400
- var loopCharacteristics;
36886
+ var loopCharacteristics = getBusinessObject(element).loopCharacteristics;
37401
36887
 
37402
36888
  if (entry.active) {
37403
36889
  loopCharacteristics = undefined;
37404
36890
  } else {
37405
- loopCharacteristics = self._moddle.create(entry.options.loopCharacteristics);
37406
-
37407
- if (entry.options.isSequential) {
37408
- loopCharacteristics.isSequential = entry.options.isSequential;
36891
+ if (isUndefined(entry.options.isSequential) || !loopCharacteristics) {
36892
+ loopCharacteristics = self._moddle.create(entry.options.loopCharacteristics);
37409
36893
  }
36894
+
36895
+ loopCharacteristics.isSequential = entry.options.isSequential;
37410
36896
  }
37411
36897
  self._modeling.updateProperties(element, { loopCharacteristics: loopCharacteristics });
37412
36898
  }
@@ -39119,7 +38605,7 @@
39119
38605
  }
39120
38606
 
39121
38607
  var LOWER_PRIORITY = 1200;
39122
- var LOW_PRIORITY$a = 800;
38608
+ var LOW_PRIORITY$9 = 800;
39123
38609
 
39124
38610
  /**
39125
38611
  * Basic grid snapping that covers connecting, creating, moving, resizing shapes, moving bendpoints
@@ -39133,7 +38619,7 @@
39133
38619
 
39134
38620
  var self = this;
39135
38621
 
39136
- eventBus.on('diagram.init', LOW_PRIORITY$a, function() {
38622
+ eventBus.on('diagram.init', LOW_PRIORITY$9, function() {
39137
38623
  self.setActive(active);
39138
38624
  });
39139
38625
 
@@ -40024,7 +39510,7 @@
40024
39510
  return true;
40025
39511
  };
40026
39512
 
40027
- var InteractionEventsModule$2 = {
39513
+ var InteractionEventsModule$1 = {
40028
39514
  __init__: [ 'bpmnInteractionEvents' ],
40029
39515
  bpmnInteractionEvents: [ 'type', BpmnInteractionEvents ]
40030
39516
  };
@@ -40610,7 +40096,7 @@
40610
40096
  var MARKER_RESIZING = 'djs-resizing',
40611
40097
  MARKER_RESIZE_NOT_OK = 'resize-not-ok';
40612
40098
 
40613
- var LOW_PRIORITY$b = 500;
40099
+ var LOW_PRIORITY$a = 500;
40614
40100
 
40615
40101
 
40616
40102
  /**
@@ -40671,7 +40157,7 @@
40671
40157
  }
40672
40158
 
40673
40159
  // add and update previews
40674
- eventBus.on('resize.move', LOW_PRIORITY$b, function(event) {
40160
+ eventBus.on('resize.move', LOW_PRIORITY$a, function(event) {
40675
40161
  updateFrame(event.context);
40676
40162
  });
40677
40163
 
@@ -41769,7 +41255,7 @@
41769
41255
  'modeling'
41770
41256
  ];
41771
41257
 
41772
- var LOW_PRIORITY$c = 500;
41258
+ var LOW_PRIORITY$b = 500;
41773
41259
 
41774
41260
 
41775
41261
  /**
@@ -41782,7 +41268,7 @@
41782
41268
 
41783
41269
  var self = this;
41784
41270
 
41785
- this.postExecuted('elements.create', LOW_PRIORITY$c, function(context) {
41271
+ this.postExecuted('elements.create', LOW_PRIORITY$b, function(context) {
41786
41272
  var elements = context.elements;
41787
41273
 
41788
41274
  elements = elements.filter(function(shape) {
@@ -41805,7 +41291,7 @@
41805
41291
  }, true);
41806
41292
 
41807
41293
 
41808
- this.preExecute('elements.move', LOW_PRIORITY$c, function(context) {
41294
+ this.preExecute('elements.move', LOW_PRIORITY$b, function(context) {
41809
41295
  var shapes = context.shapes,
41810
41296
  host = context.newHost;
41811
41297
 
@@ -42573,7 +42059,7 @@
42573
42059
  }
42574
42060
  }
42575
42061
 
42576
- var LOW_PRIORITY$d = 500;
42062
+ var LOW_PRIORITY$c = 500;
42577
42063
 
42578
42064
 
42579
42065
  /**
@@ -42642,7 +42128,7 @@
42642
42128
  /**
42643
42129
  * Adjust sizes of other lanes after lane deletion
42644
42130
  */
42645
- this.postExecuted('shape.delete', LOW_PRIORITY$d, function(event) {
42131
+ this.postExecuted('shape.delete', LOW_PRIORITY$c, function(event) {
42646
42132
 
42647
42133
  var context = event.context,
42648
42134
  hints = context.hints,
@@ -42671,7 +42157,7 @@
42671
42157
 
42672
42158
  inherits_browser(DeleteLaneBehavior, CommandInterceptor);
42673
42159
 
42674
- var LOW_PRIORITY$e = 500;
42160
+ var LOW_PRIORITY$d = 500;
42675
42161
 
42676
42162
 
42677
42163
  /**
@@ -42684,7 +42170,7 @@
42684
42170
 
42685
42171
  var self = this;
42686
42172
 
42687
- this.postExecuted('elements.create', LOW_PRIORITY$e, function(context) {
42173
+ this.postExecuted('elements.create', LOW_PRIORITY$d, function(context) {
42688
42174
  var elements = context.elements;
42689
42175
 
42690
42176
  elements.filter(function(shape) {
@@ -42698,7 +42184,7 @@
42698
42184
  });
42699
42185
  }, true);
42700
42186
 
42701
- this.preExecute('elements.move', LOW_PRIORITY$e, function(context) {
42187
+ this.preExecute('elements.move', LOW_PRIORITY$d, function(context) {
42702
42188
  var shapes = context.shapes,
42703
42189
  newHost = context.newHost;
42704
42190
 
@@ -44592,7 +44078,7 @@
44592
44078
  }
44593
44079
 
44594
44080
  function getWaypointsInsideBounds(waypoints, bounds) {
44595
- var originalWaypoints = map(waypoints, getOriginal$2);
44081
+ var originalWaypoints = map(waypoints, getOriginal$1);
44596
44082
 
44597
44083
  return filter(originalWaypoints, function(waypoint) {
44598
44084
  return isInsideBounds(waypoint, bounds);
@@ -44609,7 +44095,7 @@
44609
44095
  return getOrientation(bounds, point, 1) === 'intersect';
44610
44096
  }
44611
44097
 
44612
- function getOriginal$2(point) {
44098
+ function getOriginal$1(point) {
44613
44099
  return point.original || point;
44614
44100
  }
44615
44101
 
@@ -45372,7 +44858,7 @@
45372
44858
  'modeling'
45373
44859
  ];
45374
44860
 
45375
- var LOW_PRIORITY$f = 500;
44861
+ var LOW_PRIORITY$e = 500;
45376
44862
 
45377
44863
 
45378
44864
  /**
@@ -45486,7 +44972,7 @@
45486
44972
  }
45487
44973
  });
45488
44974
 
45489
- eventBus.on('copyPaste.pasteElement', LOW_PRIORITY$f, function(context) {
44975
+ eventBus.on('copyPaste.pasteElement', LOW_PRIORITY$e, function(context) {
45490
44976
  var descriptor = context.descriptor,
45491
44977
  businessObject = descriptor.businessObject;
45492
44978
 
@@ -45643,7 +45129,7 @@
45643
45129
  }
45644
45130
  }
45645
45131
 
45646
- var LOW_PRIORITY$g = 400;
45132
+ var LOW_PRIORITY$f = 400;
45647
45133
  var HIGH_PRIORITY$c = 600;
45648
45134
 
45649
45135
  var DEFAULT_POSITION$1 = {
@@ -45897,7 +45383,7 @@
45897
45383
 
45898
45384
 
45899
45385
  // create/remove plane for the subprocess
45900
- this.executed('shape.toggleCollapse', LOW_PRIORITY$g, function(context) {
45386
+ this.executed('shape.toggleCollapse', LOW_PRIORITY$f, function(context) {
45901
45387
  var shape = context.shape;
45902
45388
 
45903
45389
  if (!is$1(shape, 'bpmn:SubProcess')) {
@@ -45915,7 +45401,7 @@
45915
45401
 
45916
45402
 
45917
45403
  // create/remove plane for the subprocess
45918
- this.reverted('shape.toggleCollapse', LOW_PRIORITY$g, function(context) {
45404
+ this.reverted('shape.toggleCollapse', LOW_PRIORITY$f, function(context) {
45919
45405
  var shape = context.shape;
45920
45406
 
45921
45407
  if (!is$1(shape, 'bpmn:SubProcess')) {
@@ -46199,7 +45685,7 @@
46199
45685
 
46200
45686
  if (
46201
45687
  !is$1(newShape, 'bpmn:SubProcess') ||
46202
- !is$1(oldShape, 'bpmn:Task') ||
45688
+ ! (is$1(oldShape, 'bpmn:Task') || is$1(oldShape, 'bpmn:CallActivity')) ||
46203
45689
  !isExpanded(newShape)
46204
45690
  ) {
46205
45691
  return;
@@ -46285,7 +45771,7 @@
46285
45771
  'modeling',
46286
45772
  ];
46287
45773
 
46288
- var LOW_PRIORITY$h = 500;
45774
+ var LOW_PRIORITY$g = 500;
46289
45775
 
46290
45776
 
46291
45777
  function ToggleElementCollapseBehaviour(
@@ -46343,7 +45829,7 @@
46343
45829
  };
46344
45830
  }
46345
45831
 
46346
- this.executed([ 'shape.toggleCollapse' ], LOW_PRIORITY$h, function(e) {
45832
+ this.executed([ 'shape.toggleCollapse' ], LOW_PRIORITY$g, function(e) {
46347
45833
 
46348
45834
  var context = e.context,
46349
45835
  shape = context.shape;
@@ -46366,7 +45852,7 @@
46366
45852
  }
46367
45853
  });
46368
45854
 
46369
- this.reverted([ 'shape.toggleCollapse' ], LOW_PRIORITY$h, function(e) {
45855
+ this.reverted([ 'shape.toggleCollapse' ], LOW_PRIORITY$g, function(e) {
46370
45856
 
46371
45857
  var context = e.context;
46372
45858
  var shape = context.shape;
@@ -46381,7 +45867,7 @@
46381
45867
  }
46382
45868
  });
46383
45869
 
46384
- this.postExecuted([ 'shape.toggleCollapse' ], LOW_PRIORITY$h, function(e) {
45870
+ this.postExecuted([ 'shape.toggleCollapse' ], LOW_PRIORITY$g, function(e) {
46385
45871
  var shape = e.context.shape,
46386
45872
  defaultSize = elementFactory.getDefaultSize(shape),
46387
45873
  newBounds;
@@ -46519,7 +46005,7 @@
46519
46005
  return sourceBo.get('default') === sequenceFlow;
46520
46006
  }
46521
46007
 
46522
- var LOW_PRIORITY$i = 500,
46008
+ var LOW_PRIORITY$h = 500,
46523
46009
  HIGH_PRIORITY$d = 5000;
46524
46010
 
46525
46011
 
@@ -46601,7 +46087,7 @@
46601
46087
  initContext();
46602
46088
  });
46603
46089
 
46604
- this.postExecuted(laneRefUpdateEvents, LOW_PRIORITY$i, function(event) {
46090
+ this.postExecuted(laneRefUpdateEvents, LOW_PRIORITY$h, function(event) {
46605
46091
  releaseContext();
46606
46092
  });
46607
46093
 
@@ -47936,7 +47422,7 @@
47936
47422
  // render labels always on top
47937
47423
  if (element.labelTarget) {
47938
47424
  return {
47939
- parent: canvas.findRoot(element.labelTarget) || canvas.getRootElement(),
47425
+ parent: canvas.findRoot(newParent) || canvas.getRootElement(),
47940
47426
  index: -1
47941
47427
  };
47942
47428
  }
@@ -47985,7 +47471,7 @@
47985
47471
 
47986
47472
  var OrderingModule = {
47987
47473
  __depends__: [
47988
- translate$2
47474
+ translateModule
47989
47475
  ],
47990
47476
  __init__: [ 'bpmnOrderingProvider' ],
47991
47477
  bpmnOrderingProvider: [ 'type', BpmnOrderingProvider ]
@@ -48901,7 +48387,7 @@
48901
48387
  return collection;
48902
48388
  }
48903
48389
 
48904
- var LOW_PRIORITY$j = 250,
48390
+ var LOW_PRIORITY$i = 250,
48905
48391
  HIGH_PRIORITY$f = 1400;
48906
48392
 
48907
48393
 
@@ -48932,7 +48418,7 @@
48932
48418
  });
48933
48419
 
48934
48420
  // add labels to visual's group
48935
- movePreview && eventBus.on('shape.move.start', LOW_PRIORITY$j, function(e) {
48421
+ movePreview && eventBus.on('shape.move.start', LOW_PRIORITY$i, function(e) {
48936
48422
 
48937
48423
  var context = e.context,
48938
48424
  shapes = context.shapes;
@@ -49061,7 +48547,7 @@
49061
48547
  labelSupport: [ 'type', LabelSupport ]
49062
48548
  };
49063
48549
 
49064
- var LOW_PRIORITY$k = 251,
48550
+ var LOW_PRIORITY$j = 251,
49065
48551
  HIGH_PRIORITY$g = 1401;
49066
48552
 
49067
48553
  var MARKER_ATTACH$1 = 'attach-ok';
@@ -49103,7 +48589,7 @@
49103
48589
  });
49104
48590
 
49105
48591
  // add attachers to the visual's group
49106
- movePreview && eventBus.on('shape.move.start', LOW_PRIORITY$k, function(e) {
48592
+ movePreview && eventBus.on('shape.move.start', LOW_PRIORITY$j, function(e) {
49107
48593
 
49108
48594
  var context = e.context,
49109
48595
  shapes = context.shapes,
@@ -49385,7 +48871,7 @@
49385
48871
  attachSupport: [ 'type', AttachSupport ]
49386
48872
  };
49387
48873
 
49388
- var LOW_PRIORITY$l = 250;
48874
+ var LOW_PRIORITY$k = 250;
49389
48875
 
49390
48876
  /**
49391
48877
  * The tool manager acts as middle-man between the available tool's and the Palette,
@@ -49461,7 +48947,7 @@
49461
48947
  eventsToRegister.push(event + '.canceled');
49462
48948
  });
49463
48949
 
49464
- eventBus.on(eventsToRegister, LOW_PRIORITY$l, function(event) {
48950
+ eventBus.on(eventsToRegister, LOW_PRIORITY$k, function(event) {
49465
48951
 
49466
48952
  // We defer the de-activation of the tool to the .activate phase,
49467
48953
  // so we're able to check if we want to toggle off the current
@@ -50090,7 +49576,7 @@
50090
49576
  var MARKER_DRAGGING = 'djs-dragging',
50091
49577
  MARKER_RESIZING$1 = 'djs-resizing';
50092
49578
 
50093
- var LOW_PRIORITY$m = 250;
49579
+ var LOW_PRIORITY$l = 250;
50094
49580
 
50095
49581
  var max$6 = Math.max;
50096
49582
 
@@ -50165,7 +49651,7 @@
50165
49651
  });
50166
49652
 
50167
49653
  // add and update move/resize previews
50168
- eventBus.on('spaceTool.move', LOW_PRIORITY$m, function(event) {
49654
+ eventBus.on('spaceTool.move', LOW_PRIORITY$l, function(event) {
50169
49655
 
50170
49656
  var context = event.context,
50171
49657
  line = context.line,
@@ -54853,7 +54339,7 @@
54853
54339
  }
54854
54340
 
54855
54341
  if (!text && di.label) {
54856
- di.label = null;
54342
+ delete di.label;
54857
54343
  }
54858
54344
  }
54859
54345
 
@@ -56412,7 +55898,7 @@
56412
55898
  connectionDocking: [ 'type', CroppingConnectionDocking ]
56413
55899
  };
56414
55900
 
56415
- var LOW_PRIORITY$n = 500,
55901
+ var LOW_PRIORITY$m = 500,
56416
55902
  MEDIUM_PRIORITY = 1250,
56417
55903
  HIGH_PRIORITY$i = 1500;
56418
55904
 
@@ -56511,7 +55997,7 @@
56511
55997
  // to let others modify the move event before we update
56512
55998
  // the context
56513
55999
  //
56514
- eventBus.on('shape.move.move', LOW_PRIORITY$n, function(event) {
56000
+ eventBus.on('shape.move.move', LOW_PRIORITY$m, function(event) {
56515
56001
 
56516
56002
  var context = event.context,
56517
56003
  validatedShapes = context.validatedShapes,
@@ -56657,7 +56143,7 @@
56657
56143
  });
56658
56144
  }
56659
56145
 
56660
- var LOW_PRIORITY$o = 499;
56146
+ var LOW_PRIORITY$n = 499;
56661
56147
 
56662
56148
  var MARKER_DRAGGING$1 = 'djs-dragging',
56663
56149
  MARKER_OK$3 = 'drop-ok',
@@ -56735,7 +56221,7 @@
56735
56221
  // assign a low priority to this handler
56736
56222
  // to let others modify the move context before
56737
56223
  // we draw things
56738
- eventBus.on('shape.move.start', LOW_PRIORITY$o, function(event) {
56224
+ eventBus.on('shape.move.start', LOW_PRIORITY$n, function(event) {
56739
56225
  var context = event.context,
56740
56226
  dragShapes = context.shapes,
56741
56227
  allDraggedElements = context.allDraggedElements;
@@ -56782,7 +56268,7 @@
56782
56268
  });
56783
56269
 
56784
56270
  // update previews
56785
- eventBus.on('shape.move.move', LOW_PRIORITY$o, function(event) {
56271
+ eventBus.on('shape.move.move', LOW_PRIORITY$n, function(event) {
56786
56272
 
56787
56273
  var context = event.context,
56788
56274
  dragGroup = context.dragGroup,
@@ -58125,13 +57611,13 @@
58125
57611
  LassoToolModule,
58126
57612
  HandToolModule,
58127
57613
  GlobalConnectModule,
58128
- translate$2
57614
+ translateModule
58129
57615
  ],
58130
57616
  __init__: [ 'paletteProvider' ],
58131
57617
  paletteProvider: [ 'type', PaletteProvider ]
58132
57618
  };
58133
57619
 
58134
- var LOW_PRIORITY$p = 250;
57620
+ var LOW_PRIORITY$o = 250;
58135
57621
 
58136
57622
 
58137
57623
  function BpmnReplacePreview(
@@ -58212,7 +57698,7 @@
58212
57698
  });
58213
57699
  }
58214
57700
 
58215
- eventBus.on('shape.move.move', LOW_PRIORITY$p, function(event) {
57701
+ eventBus.on('shape.move.move', LOW_PRIORITY$o, function(event) {
58216
57702
 
58217
57703
  var context = event.context,
58218
57704
  canExecute = context.canExecute;
@@ -60142,7 +59628,7 @@
60142
59628
  DistributeElementsModule$1,
60143
59629
  EditorActionsModule$1,
60144
59630
  GridSnappingModule$1,
60145
- InteractionEventsModule$2,
59631
+ InteractionEventsModule$1,
60146
59632
  KeyboardModule$1,
60147
59633
  KeyboardMoveSelectionModule,
60148
59634
  LabelEditingModule,
@@ -60168,24 +59654,6 @@
60168
59654
  Modeler.prototype._modelingModules
60169
59655
  );
60170
59656
 
60171
- /**
60172
- * SVGs for elements are generated by the {@link GraphicsFactory}.
60173
- *
60174
- * This utility gives quick access to the important semantic
60175
- * parts of an element.
60176
- */
60177
-
60178
- /**
60179
- * Returns the visual part of a diagram element
60180
- *
60181
- * @param {Snap<SVGElement>} gfx
60182
- *
60183
- * @return {Snap<SVGElement>}
60184
- */
60185
- function getVisual$1(gfx) {
60186
- return gfx.childNodes[0];
60187
- }
60188
-
60189
59657
  var MINIMAP_VIEWBOX_PADDING = 50;
60190
59658
 
60191
59659
  var RANGE$1 = { min: 0.2, max: 4 },
@@ -60193,7 +59661,7 @@
60193
59661
 
60194
59662
  var DELTA_THRESHOLD$1 = 0.1;
60195
59663
 
60196
- var LOW_PRIORITY$q = 250;
59664
+ var LOW_PRIORITY$p = 250;
60197
59665
 
60198
59666
 
60199
59667
  /**
@@ -60467,7 +59935,7 @@
60467
59935
  });
60468
59936
 
60469
59937
  // update on elements changed
60470
- eventBus.on('elements.changed', LOW_PRIORITY$q, function(context) {
59938
+ eventBus.on('elements.changed', LOW_PRIORITY$p, function(context) {
60471
59939
  var elements = context.elements;
60472
59940
 
60473
59941
  elements.forEach(function(element) {
@@ -60853,7 +60321,7 @@
60853
60321
  visual;
60854
60322
 
60855
60323
  if (gfx) {
60856
- visual = getVisual$1(gfx);
60324
+ visual = getVisual(gfx);
60857
60325
 
60858
60326
  if (visual) {
60859
60327
  var elementGfx = clone(visual);
@@ -63299,97 +62767,6 @@
63299
62767
  return path.join(separator);
63300
62768
  }
63301
62769
 
63302
- /**
63303
- * Failsafe remove an element from a collection
63304
- *
63305
- * @param {Array<Object>} [collection]
63306
- * @param {Object} [element]
63307
- *
63308
- * @return {number} the previous index of the element
63309
- */
63310
-
63311
- /**
63312
- * Fail save add an element to the given connection, ensuring
63313
- * it does not yet exist.
63314
- *
63315
- * @param {Array<Object>} collection
63316
- * @param {Object} element
63317
- * @param {number} idx
63318
- */
63319
- function add$2(collection, element, idx) {
63320
-
63321
- if (!collection || !element) {
63322
- return;
63323
- }
63324
-
63325
- if (typeof idx !== 'number') {
63326
- idx = -1;
63327
- }
63328
-
63329
- var currentIdx = collection.indexOf(element);
63330
-
63331
- if (currentIdx !== -1) {
63332
-
63333
- if (currentIdx === idx) {
63334
-
63335
- // nothing to do, position has not changed
63336
- return;
63337
- } else {
63338
-
63339
- if (idx !== -1) {
63340
-
63341
- // remove from current position
63342
- collection.splice(currentIdx, 1);
63343
- } else {
63344
-
63345
- // already exists in collection
63346
- return;
63347
- }
63348
- }
63349
- }
63350
-
63351
- if (idx !== -1) {
63352
-
63353
- // insert at specified position
63354
- collection.splice(idx, 0, element);
63355
- } else {
63356
-
63357
- // push to end
63358
- collection.push(element);
63359
- }
63360
- }
63361
-
63362
- /**
63363
- * A simple translation stub to be used for multi-language support
63364
- * in diagrams. Can be easily replaced with a more sophisticated
63365
- * solution.
63366
- *
63367
- * @example
63368
- *
63369
- * // use it inside any diagram component by injecting `translate`.
63370
- *
63371
- * function MyService(translate) {
63372
- * alert(translate('HELLO {you}', { you: 'You!' }));
63373
- * }
63374
- *
63375
- * @param {string} template to interpolate
63376
- * @param {Object} [replacements] a map with substitutes
63377
- *
63378
- * @return {string} the translated string
63379
- */
63380
- function translate$3(template, replacements) {
63381
-
63382
- replacements = replacements || {};
63383
-
63384
- return template.replace(/{([^}]+)}/g, function(_, key) {
63385
- return replacements[key] || '{' + key + '}';
63386
- });
63387
- }
63388
-
63389
- var translateModule = {
63390
- translate: [ 'value', translate$3 ]
63391
- };
63392
-
63393
62770
  var semverCompare = function cmp (a, b) {
63394
62771
  var pa = a.split('.');
63395
62772
  var pb = b.split('.');
@@ -64054,142 +63431,6 @@
64054
63431
  return _validate(object, standaloneZeebeValidator);
64055
63432
  }
64056
63433
 
64057
- var DEFAULT_PRIORITY$7 = 1000;
64058
-
64059
- /**
64060
- * A utility that can be used to plug-in into the command execution for
64061
- * extension and/or validation.
64062
- *
64063
- * @param {EventBus} eventBus
64064
- *
64065
- * @example
64066
- *
64067
- * import inherits from 'inherits';
64068
- *
64069
- * import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
64070
- *
64071
- * function CommandLogger(eventBus) {
64072
- * CommandInterceptor.call(this, eventBus);
64073
- *
64074
- * this.preExecute(function(event) {
64075
- * console.log('command pre-execute', event);
64076
- * });
64077
- * }
64078
- *
64079
- * inherits(CommandLogger, CommandInterceptor);
64080
- *
64081
- */
64082
- function CommandInterceptor$1(eventBus) {
64083
- this._eventBus = eventBus;
64084
- }
64085
-
64086
- CommandInterceptor$1.$inject = [ 'eventBus' ];
64087
-
64088
- function unwrapEvent$1(fn, that) {
64089
- return function(event) {
64090
- return fn.call(that || null, event.context, event.command, event);
64091
- };
64092
- }
64093
-
64094
- /**
64095
- * Register an interceptor for a command execution
64096
- *
64097
- * @param {string|Array<string>} [events] list of commands to register on
64098
- * @param {string} [hook] command hook, i.e. preExecute, executed to listen on
64099
- * @param {number} [priority] the priority on which to hook into the execution
64100
- * @param {Function} handlerFn interceptor to be invoked with (event)
64101
- * @param {boolean} unwrap if true, unwrap the event and pass (context, command, event) to the
64102
- * listener instead
64103
- * @param {Object} [that] Pass context (`this`) to the handler function
64104
- */
64105
- CommandInterceptor$1.prototype.on = function(events, hook, priority, handlerFn, unwrap, that) {
64106
-
64107
- if (isFunction(hook) || isNumber(hook)) {
64108
- that = unwrap;
64109
- unwrap = handlerFn;
64110
- handlerFn = priority;
64111
- priority = hook;
64112
- hook = null;
64113
- }
64114
-
64115
- if (isFunction(priority)) {
64116
- that = unwrap;
64117
- unwrap = handlerFn;
64118
- handlerFn = priority;
64119
- priority = DEFAULT_PRIORITY$7;
64120
- }
64121
-
64122
- if (isObject(unwrap)) {
64123
- that = unwrap;
64124
- unwrap = false;
64125
- }
64126
-
64127
- if (!isFunction(handlerFn)) {
64128
- throw new Error('handlerFn must be a function');
64129
- }
64130
-
64131
- if (!isArray(events)) {
64132
- events = [ events ];
64133
- }
64134
-
64135
- var eventBus = this._eventBus;
64136
-
64137
- forEach(events, function(event) {
64138
-
64139
- // concat commandStack(.event)?(.hook)?
64140
- var fullEvent = [ 'commandStack', event, hook ].filter(function(e) { return e; }).join('.');
64141
-
64142
- eventBus.on(fullEvent, priority, unwrap ? unwrapEvent$1(handlerFn, that) : handlerFn, that);
64143
- });
64144
- };
64145
-
64146
-
64147
- var hooks$1 = [
64148
- 'canExecute',
64149
- 'preExecute',
64150
- 'preExecuted',
64151
- 'execute',
64152
- 'executed',
64153
- 'postExecute',
64154
- 'postExecuted',
64155
- 'revert',
64156
- 'reverted'
64157
- ];
64158
-
64159
- /*
64160
- * Install hook shortcuts
64161
- *
64162
- * This will generate the CommandInterceptor#(preExecute|...|reverted) methods
64163
- * which will in term forward to CommandInterceptor#on.
64164
- */
64165
- forEach(hooks$1, function(hook) {
64166
-
64167
- /**
64168
- * {canExecute|preExecute|preExecuted|execute|executed|postExecute|postExecuted|revert|reverted}
64169
- *
64170
- * A named hook for plugging into the command execution
64171
- *
64172
- * @param {string|Array<string>} [events] list of commands to register on
64173
- * @param {number} [priority] the priority on which to hook into the execution
64174
- * @param {Function} handlerFn interceptor to be invoked with (event)
64175
- * @param {boolean} [unwrap=false] if true, unwrap the event and pass (context, command, event) to the
64176
- * listener instead
64177
- * @param {Object} [that] Pass context (`this`) to the handler function
64178
- */
64179
- CommandInterceptor$1.prototype[hook] = function(events, priority, handlerFn, unwrap, that) {
64180
-
64181
- if (isFunction(events) || isNumber(events)) {
64182
- that = unwrap;
64183
- unwrap = handlerFn;
64184
- handlerFn = priority;
64185
- priority = events;
64186
- events = null;
64187
- }
64188
-
64189
- this.on(events, hook, priority, handlerFn, unwrap, that);
64190
- };
64191
- });
64192
-
64193
63434
  const BpmnPropertiesPanelContext = q({
64194
63435
  selectedElement: null,
64195
63436
  injector: null,
@@ -65746,7 +64987,7 @@
65746
64987
  return element && elementRegistry.get(element.id);
65747
64988
  }
65748
64989
 
65749
- const DEFAULT_PRIORITY$8 = 1000;
64990
+ const DEFAULT_PRIORITY$7 = 1000;
65750
64991
  /**
65751
64992
  * @typedef { import('@bpmn-io/properties-panel').GroupDefinition } GroupDefinition
65752
64993
  * @typedef { import('@bpmn-io/properties-panel').ListGroupDefinition } ListGroupDefinition
@@ -65829,7 +65070,7 @@
65829
65070
  registerProvider(priority, provider) {
65830
65071
  if (!provider) {
65831
65072
  provider = priority;
65832
- priority = DEFAULT_PRIORITY$8;
65073
+ priority = DEFAULT_PRIORITY$7;
65833
65074
  }
65834
65075
 
65835
65076
  if (typeof provider.getGroups !== 'function') {
@@ -67627,7 +66868,7 @@
67627
66868
  categoryValue: [categoryValue]
67628
66869
  }); // add to correct place
67629
66870
 
67630
- add$2(definitions.get('rootElements'), category);
66871
+ add$1(definitions.get('rootElements'), category);
67631
66872
  getBusinessObject(category).$parent = definitions;
67632
66873
  getBusinessObject(categoryValue).$parent = category;
67633
66874
  return categoryValue;
@@ -72643,7 +71884,7 @@
72643
71884
  * it if not.
72644
71885
  */
72645
71886
 
72646
- class ReplaceBehavior$1 extends CommandInterceptor$1 {
71887
+ class ReplaceBehavior$1 extends CommandInterceptor {
72647
71888
  constructor(elementTemplates, injector) {
72648
71889
  super(injector.get('eventBus'));
72649
71890
  this.postExecuted('shape.replace', function (e) {
@@ -75636,7 +74877,7 @@
75636
74877
  * (1) zeebe:CalledDecision
75637
74878
  * (2) zeebe:TaskDefinition and zeebe:TaskHeaders
75638
74879
  */
75639
- class CleanUpBusinessRuleTaskBehavior extends CommandInterceptor$1 {
74880
+ class CleanUpBusinessRuleTaskBehavior extends CommandInterceptor {
75640
74881
  constructor(commandStack, eventBus) {
75641
74882
  super(eventBus);
75642
74883
 
@@ -75873,7 +75114,7 @@
75873
75114
  /**
75874
75115
  * Zeebe BPMN specific behavior for creating call activities.
75875
75116
  */
75876
- class CreateZeebeCallActivityBehavior extends CommandInterceptor$1 {
75117
+ class CreateZeebeCallActivityBehavior extends CommandInterceptor {
75877
75118
  constructor(bpmnFactory, eventBus, modeling) {
75878
75119
  super(eventBus);
75879
75120
 
@@ -76188,7 +75429,7 @@
76188
75429
  /**
76189
75430
  * Zeebe BPMN specific form definition behavior.
76190
75431
  */
76191
- class FormDefinitionBehavior extends CommandInterceptor$1 {
75432
+ class FormDefinitionBehavior extends CommandInterceptor {
76192
75433
  constructor(bpmnFactory, eventBus, modeling) {
76193
75434
  super(eventBus);
76194
75435
 
@@ -76311,7 +75552,7 @@
76311
75552
  * Zeebe BPMN behavior removing zeebe:AssignmentDefinition elements without
76312
75553
  * zeebe:assignee and zeebe:candidateGroups.
76313
75554
  */
76314
- class CleanUpBusinessRuleTaskBehavior$1 extends CommandInterceptor$1 {
75555
+ class CleanUpBusinessRuleTaskBehavior$1 extends CommandInterceptor {
76315
75556
  constructor(commandStack, eventBus) {
76316
75557
  super(eventBus);
76317
75558
 
@@ -76356,7 +75597,7 @@
76356
75597
  * (1) zeebe:propagateAllChildVariables of zeebe:CalledElement is set to true
76357
75598
  * (2) zeebe:IoMapping extension element has zeebe:Output elements
76358
75599
  */
76359
- class UpdatePropagateAllChildVariablesBehavior extends CommandInterceptor$1 {
75600
+ class UpdatePropagateAllChildVariablesBehavior extends CommandInterceptor {
76360
75601
  constructor(commandStack, eventBus, modeling) {
76361
75602
  super(eventBus);
76362
75603
 
@@ -76492,11 +75733,11 @@
76492
75733
  'create.group'
76493
75734
  ];
76494
75735
 
76495
- const LOW_PRIORITY$r = 500;
75736
+ const LOW_PRIORITY$q = 500;
76496
75737
  class PaletteProvider$1 {
76497
75738
 
76498
75739
  constructor(palette) {
76499
- palette.registerProvider(LOW_PRIORITY$r, this);
75740
+ palette.registerProvider(LOW_PRIORITY$q, this);
76500
75741
  }
76501
75742
 
76502
75743
  getPaletteEntries(element) {
@@ -76540,7 +75781,7 @@
76540
75781
  'lane-insert-below'
76541
75782
  ];
76542
75783
 
76543
- const LOW_PRIORITY$s = 500;
75784
+ const LOW_PRIORITY$r = 500;
76544
75785
 
76545
75786
  class ContextPadProvider$1 {
76546
75787
 
@@ -76552,7 +75793,7 @@
76552
75793
  contextPadProvider.autoPlace = injector.get('autoPlace', false);
76553
75794
  }
76554
75795
 
76555
- contextPad.registerProvider(LOW_PRIORITY$s, this);
75796
+ contextPad.registerProvider(LOW_PRIORITY$r, this);
76556
75797
  }
76557
75798
 
76558
75799
  getContextPadEntries(element) {
@@ -76926,93 +76167,6 @@
76926
76167
  zeebeModdleExtension: [ 'type', extension ]
76927
76168
  };
76928
76169
 
76929
- var DEFAULT_RENDER_PRIORITY$2 = 1000;
76930
-
76931
- /**
76932
- * The base implementation of shape and connection renderers.
76933
- *
76934
- * @param {EventBus} eventBus
76935
- * @param {number} [renderPriority=1000]
76936
- */
76937
- function BaseRenderer$1(eventBus, renderPriority) {
76938
- var self = this;
76939
-
76940
- renderPriority = renderPriority || DEFAULT_RENDER_PRIORITY$2;
76941
-
76942
- eventBus.on([ 'render.shape', 'render.connection' ], renderPriority, function(evt, context) {
76943
- var type = evt.type,
76944
- element = context.element,
76945
- visuals = context.gfx,
76946
- attrs = context.attrs;
76947
-
76948
- if (self.canRender(element)) {
76949
- if (type === 'render.shape') {
76950
- return self.drawShape(visuals, element, attrs);
76951
- } else {
76952
- return self.drawConnection(visuals, element, attrs);
76953
- }
76954
- }
76955
- });
76956
-
76957
- eventBus.on([ 'render.getShapePath', 'render.getConnectionPath' ], renderPriority, function(evt, element) {
76958
- if (self.canRender(element)) {
76959
- if (evt.type === 'render.getShapePath') {
76960
- return self.getShapePath(element);
76961
- } else {
76962
- return self.getConnectionPath(element);
76963
- }
76964
- }
76965
- });
76966
- }
76967
-
76968
- /**
76969
- * Should check whether *this* renderer can render
76970
- * the element/connection.
76971
- *
76972
- * @param {element} element
76973
- *
76974
- * @returns {boolean}
76975
- */
76976
- BaseRenderer$1.prototype.canRender = function() {};
76977
-
76978
- /**
76979
- * Provides the shape's snap svg element to be drawn on the `canvas`.
76980
- *
76981
- * @param {djs.Graphics} visuals
76982
- * @param {Shape} shape
76983
- *
76984
- * @returns {Snap.svg} [returns a Snap.svg paper element ]
76985
- */
76986
- BaseRenderer$1.prototype.drawShape = function() {};
76987
-
76988
- /**
76989
- * Provides the shape's snap svg element to be drawn on the `canvas`.
76990
- *
76991
- * @param {djs.Graphics} visuals
76992
- * @param {Connection} connection
76993
- *
76994
- * @returns {Snap.svg} [returns a Snap.svg paper element ]
76995
- */
76996
- BaseRenderer$1.prototype.drawConnection = function() {};
76997
-
76998
- /**
76999
- * Gets the SVG path of a shape that represents it's visual bounds.
77000
- *
77001
- * @param {Shape} shape
77002
- *
77003
- * @return {string} svg path
77004
- */
77005
- BaseRenderer$1.prototype.getShapePath = function() {};
77006
-
77007
- /**
77008
- * Gets the SVG path of a connection that represents it's visual bounds.
77009
- *
77010
- * @param {Connection} connection
77011
- *
77012
- * @return {string} svg path
77013
- */
77014
- BaseRenderer$1.prototype.getConnectionPath = function() {};
77015
-
77016
76170
  function ensureImported$1(element, target) {
77017
76171
 
77018
76172
  if (element.ownerDocument !== target.ownerDocument) {
@@ -77293,10 +76447,10 @@
77293
76447
  ) {
77294
76448
  this._bpmnRenderer = bpmnRenderer;
77295
76449
 
77296
- BaseRenderer$1.call(this, eventBus, HIGH_PRIORITY$r);
76450
+ BaseRenderer.call(this, eventBus, HIGH_PRIORITY$r);
77297
76451
  }
77298
76452
 
77299
- inherits_browser(IconsRenderer, BaseRenderer$1);
76453
+ inherits_browser(IconsRenderer, BaseRenderer);
77300
76454
 
77301
76455
  IconsRenderer.prototype.canRender = function(element) {
77302
76456
 
@@ -77321,8 +76475,10 @@
77321
76475
  var icon = create$2('image');
77322
76476
  attr$2(icon, {
77323
76477
  href: modelerTemplateIcon,
77324
- x: 4,
77325
- y: 4
76478
+ x: 5,
76479
+ y: 5,
76480
+ width: 18,
76481
+ height: 18
77326
76482
  });
77327
76483
 
77328
76484
  append$1(parentGfx, icon);