camunda-bpmn-js 0.13.0 → 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.
Files changed (41) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/assets/bpmn-font/bpmn-codes.css +108 -0
  3. package/dist/assets/bpmn-font/bpmn-embedded.css +161 -0
  4. package/dist/assets/bpmn-font/bpmn.css +164 -0
  5. package/dist/assets/bpmn-font/bpmn.eot +0 -0
  6. package/dist/assets/bpmn-font/bpmn.svg +224 -0
  7. package/dist/assets/bpmn-font/bpmn.ttf +0 -0
  8. package/dist/assets/bpmn-font/bpmn.woff +0 -0
  9. package/dist/assets/bpmn-font/bpmn.woff2 +0 -0
  10. package/dist/assets/bpmn-font/css/bpmn-codes.css +108 -0
  11. package/dist/assets/bpmn-font/css/bpmn-embedded.css +161 -0
  12. package/dist/assets/bpmn-font/css/bpmn.css +164 -0
  13. package/dist/assets/bpmn-font/font/bpmn.eot +0 -0
  14. package/dist/assets/bpmn-font/font/bpmn.svg +224 -0
  15. package/dist/assets/bpmn-font/font/bpmn.ttf +0 -0
  16. package/dist/assets/bpmn-font/font/bpmn.woff +0 -0
  17. package/dist/assets/bpmn-font/font/bpmn.woff2 +0 -0
  18. package/dist/assets/bpmn-js.css +116 -0
  19. package/dist/assets/diagram-js-minimap.css +87 -0
  20. package/dist/assets/diagram-js.css +819 -0
  21. package/dist/assets/element-templates.css +79 -0
  22. package/dist/assets/properties-panel.css +901 -0
  23. package/dist/base-modeler.development.js +272 -866
  24. package/dist/base-modeler.production.min.js +4 -4
  25. package/dist/base-navigated-viewer.development.js +36 -4
  26. package/dist/base-navigated-viewer.production.min.js +2 -2
  27. package/dist/base-viewer.development.js +36 -4
  28. package/dist/base-viewer.production.min.js +2 -2
  29. package/dist/camunda-cloud-modeler.development.js +394 -1215
  30. package/dist/camunda-cloud-modeler.production.min.js +4 -4
  31. package/dist/camunda-cloud-navigated-viewer.development.js +42 -95
  32. package/dist/camunda-cloud-navigated-viewer.production.min.js +2 -2
  33. package/dist/camunda-cloud-viewer.development.js +42 -95
  34. package/dist/camunda-cloud-viewer.production.min.js +2 -2
  35. package/dist/camunda-platform-modeler.development.js +367 -1161
  36. package/dist/camunda-platform-modeler.production.min.js +4 -4
  37. package/dist/camunda-platform-navigated-viewer.development.js +36 -4
  38. package/dist/camunda-platform-navigated-viewer.production.min.js +2 -2
  39. package/dist/camunda-platform-viewer.development.js +36 -4
  40. package/dist/camunda-platform-viewer.production.min.js +2 -2
  41. package/package.json +13 -6
@@ -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);
@@ -61669,19 +61137,19 @@
61669
61137
  getDescriptionForId: () => {}
61670
61138
  });
61671
61139
 
61672
- /**
61673
- * @typedef {Function} <propertiesPanel.showEntry> callback
61674
- *
61675
- * @example
61676
- *
61677
- * useEvent('propertiesPanel.showEntry', ({ focus = false, ...rest }) => {
61678
- * // ...
61679
- * });
61680
- *
61681
- * @param {Object} context
61682
- * @param {boolean} [context.focus]
61683
- *
61684
- * @returns void
61140
+ /**
61141
+ * @typedef {Function} <propertiesPanel.showEntry> callback
61142
+ *
61143
+ * @example
61144
+ *
61145
+ * useEvent('propertiesPanel.showEntry', ({ focus = false, ...rest }) => {
61146
+ * // ...
61147
+ * });
61148
+ *
61149
+ * @param {Object} context
61150
+ * @param {boolean} [context.focus]
61151
+ *
61152
+ * @returns void
61685
61153
  */
61686
61154
  const EventContext = q({
61687
61155
  eventBus: null
@@ -61694,20 +61162,20 @@
61694
61162
  setLayoutForKey: () => {}
61695
61163
  });
61696
61164
 
61697
- /**
61698
- * Accesses the global DescriptionContext and returns a description for a given id and element.
61699
- *
61700
- * @example
61701
- * ```jsx
61702
- * function TextField(props) {
61703
- * const description = useDescriptionContext('input1', element);
61704
- * }
61705
- * ```
61706
- *
61707
- * @param {string} id
61708
- * @param {djs.model.Base} element
61709
- *
61710
- * @returns {string}
61165
+ /**
61166
+ * Accesses the global DescriptionContext and returns a description for a given id and element.
61167
+ *
61168
+ * @example
61169
+ * ```jsx
61170
+ * function TextField(props) {
61171
+ * const description = useDescriptionContext('input1', element);
61172
+ * }
61173
+ * ```
61174
+ *
61175
+ * @param {string} id
61176
+ * @param {djs.model.Base} element
61177
+ *
61178
+ * @returns {string}
61711
61179
  */
61712
61180
 
61713
61181
  function useDescriptionContext(id, element) {
@@ -61718,14 +61186,14 @@
61718
61186
  }
61719
61187
 
61720
61188
  const DEFAULT_PRIORITY$6 = 1000;
61721
- /**
61722
- * Subscribe to an event.
61723
- *
61724
- * @param {string} event
61725
- * @param {Function} callback
61726
- * @param {number} [priority]
61727
- *
61728
- * @returns {import('preact').Ref}
61189
+ /**
61190
+ * Subscribe to an event.
61191
+ *
61192
+ * @param {string} event
61193
+ * @param {Function} callback
61194
+ * @param {number} [priority]
61195
+ *
61196
+ * @returns {import('preact').Ref}
61729
61197
  */
61730
61198
 
61731
61199
  function useEvent(event, callback, priority = DEFAULT_PRIORITY$6) {
@@ -61743,11 +61211,11 @@
61743
61211
  }
61744
61212
 
61745
61213
  const HIGH_PRIORITY$l = 10000;
61746
- /**
61747
- * Buffer events and re-fire during passive effect phase.
61748
- *
61749
- * @param {string[]} bufferedEvents
61750
- * @param {Object} [eventBus]
61214
+ /**
61215
+ * Buffer events and re-fire during passive effect phase.
61216
+ *
61217
+ * @param {string[]} bufferedEvents
61218
+ * @param {Object} [eventBus]
61751
61219
  */
61752
61220
 
61753
61221
  function useEventBuffer(bufferedEvents, eventBus) {
@@ -61795,20 +61263,20 @@
61795
61263
  });
61796
61264
  }
61797
61265
 
61798
- /**
61799
- * Creates a state that persists in the global LayoutContext.
61800
- *
61801
- * @example
61802
- * ```jsx
61803
- * function Group(props) {
61804
- * const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
61805
- * }
61806
- * ```
61807
- *
61808
- * @param {(string|number)[]} path
61809
- * @param {any} [defaultValue]
61810
- *
61811
- * @returns {[ any, Function ]}
61266
+ /**
61267
+ * Creates a state that persists in the global LayoutContext.
61268
+ *
61269
+ * @example
61270
+ * ```jsx
61271
+ * function Group(props) {
61272
+ * const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
61273
+ * }
61274
+ * ```
61275
+ *
61276
+ * @param {(string|number)[]} path
61277
+ * @param {any} [defaultValue]
61278
+ *
61279
+ * @returns {[ any, Function ]}
61812
61280
  */
61813
61281
 
61814
61282
  function useLayoutState(path, defaultValue) {
@@ -61829,11 +61297,11 @@
61829
61297
  return [value, setState];
61830
61298
  }
61831
61299
 
61832
- /**
61833
- * @pinussilvestrus: we need to introduce our own hook to persist the previous
61834
- * state on updates.
61835
- *
61836
- * cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
61300
+ /**
61301
+ * @pinussilvestrus: we need to introduce our own hook to persist the previous
61302
+ * state on updates.
61303
+ *
61304
+ * cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
61837
61305
  */
61838
61306
 
61839
61307
  function usePrevious(value) {
@@ -61844,12 +61312,12 @@
61844
61312
  return ref.current;
61845
61313
  }
61846
61314
 
61847
- /**
61848
- * Subscribe to `propertiesPanel.showEntry`.
61849
- *
61850
- * @param {Function} show
61851
- *
61852
- * @returns {import('preact').Ref}
61315
+ /**
61316
+ * Subscribe to `propertiesPanel.showEntry`.
61317
+ *
61318
+ * @param {Function} show
61319
+ *
61320
+ * @returns {import('preact').Ref}
61853
61321
  */
61854
61322
 
61855
61323
  function useShowEntryEvent(show) {
@@ -61886,14 +61354,14 @@
61886
61354
  return ref;
61887
61355
  }
61888
61356
 
61889
- /**
61890
- * Subscribe to `propertiesPanel.showError`. On `propertiesPanel.showError` set
61891
- * temporary error. Fire `propertiesPanel.showEntry` for temporary error to be
61892
- * visible. Unset error on `propertiesPanel.updated`.
61893
- *
61894
- * @param {Function} show
61895
- *
61896
- * @returns {import('preact').Ref}
61357
+ /**
61358
+ * Subscribe to `propertiesPanel.showError`. On `propertiesPanel.showError` set
61359
+ * temporary error. Fire `propertiesPanel.showEntry` for temporary error to be
61360
+ * visible. Unset error on `propertiesPanel.updated`.
61361
+ *
61362
+ * @param {Function} show
61363
+ *
61364
+ * @returns {import('preact').Ref}
61897
61365
  */
61898
61366
 
61899
61367
  function useShowErrorEvent(show) {
@@ -62004,66 +61472,66 @@
62004
61472
  };
62005
61473
  const DEFAULT_DESCRIPTION = {};
62006
61474
  const bufferedEvents = ['propertiesPanel.showEntry', 'propertiesPanel.showError'];
62007
- /**
62008
- * @typedef { {
62009
- * component: import('preact').Component,
62010
- * id: String,
62011
- * isEdited?: Function
62012
- * } } EntryDefinition
62013
- *
62014
- * @typedef { {
62015
- * autoFocusEntry: String,
62016
- * autoOpen?: Boolean,
62017
- * entries: Array<EntryDefinition>,
62018
- * id: String,
62019
- * label: String,
62020
- * remove: (event: MouseEvent) => void
62021
- * } } ListItemDefinition
62022
- *
62023
- * @typedef { {
62024
- * add: (event: MouseEvent) => void,
62025
- * component: import('preact').Component,
62026
- * element: Object,
62027
- * id: String,
62028
- * items: Array<ListItemDefinition>,
62029
- * label: String,
62030
- * shouldSort?: Boolean,
62031
- * shouldOpen?: Boolean
62032
- * } } ListGroupDefinition
62033
- *
62034
- * @typedef { {
62035
- * component?: import('preact').Component,
62036
- * entries: Array<EntryDefinition>,
62037
- * id: String,
62038
- * label: String,
62039
- * shouldOpen?: Boolean
62040
- * } } GroupDefinition
62041
- *
62042
- * @typedef { {
62043
- * [id: String]: GetDescriptionFunction
62044
- * } } DescriptionConfig
62045
- *
62046
- * @callback { {
62047
- * @param {string} id
62048
- * @param {djs.model.base} element
62049
- * @returns {string}
62050
- * } } GetDescriptionFunction
62051
- *
61475
+ /**
61476
+ * @typedef { {
61477
+ * component: import('preact').Component,
61478
+ * id: String,
61479
+ * isEdited?: Function
61480
+ * } } EntryDefinition
61481
+ *
61482
+ * @typedef { {
61483
+ * autoFocusEntry: String,
61484
+ * autoOpen?: Boolean,
61485
+ * entries: Array<EntryDefinition>,
61486
+ * id: String,
61487
+ * label: String,
61488
+ * remove: (event: MouseEvent) => void
61489
+ * } } ListItemDefinition
61490
+ *
61491
+ * @typedef { {
61492
+ * add: (event: MouseEvent) => void,
61493
+ * component: import('preact').Component,
61494
+ * element: Object,
61495
+ * id: String,
61496
+ * items: Array<ListItemDefinition>,
61497
+ * label: String,
61498
+ * shouldSort?: Boolean,
61499
+ * shouldOpen?: Boolean
61500
+ * } } ListGroupDefinition
61501
+ *
61502
+ * @typedef { {
61503
+ * component?: import('preact').Component,
61504
+ * entries: Array<EntryDefinition>,
61505
+ * id: String,
61506
+ * label: String,
61507
+ * shouldOpen?: Boolean
61508
+ * } } GroupDefinition
61509
+ *
61510
+ * @typedef { {
61511
+ * [id: String]: GetDescriptionFunction
61512
+ * } } DescriptionConfig
61513
+ *
61514
+ * @callback { {
61515
+ * @param {string} id
61516
+ * @param {djs.model.base} element
61517
+ * @returns {string}
61518
+ * } } GetDescriptionFunction
61519
+ *
62052
61520
  */
62053
61521
 
62054
- /**
62055
- * A basic properties panel component. Describes *how* content will be rendered, accepts
62056
- * data from implementor to describe *what* will be rendered.
62057
- *
62058
- * @param {Object} props
62059
- * @param {Object} props.element
62060
- * @param {import('./components/Header').HeaderProvider} props.headerProvider
62061
- * @param {Array<GroupDefinition|ListGroupDefinition>} props.groups
62062
- * @param {Object} [props.layoutConfig]
62063
- * @param {Function} [props.layoutChanged]
62064
- * @param {DescriptionConfig} [props.descriptionConfig]
62065
- * @param {Function} [props.descriptionLoaded]
62066
- * @param {Object} [props.eventBus]
61522
+ /**
61523
+ * A basic properties panel component. Describes *how* content will be rendered, accepts
61524
+ * data from implementor to describe *what* will be rendered.
61525
+ *
61526
+ * @param {Object} props
61527
+ * @param {Object} props.element
61528
+ * @param {import('./components/Header').HeaderProvider} props.headerProvider
61529
+ * @param {Array<GroupDefinition|ListGroupDefinition>} props.groups
61530
+ * @param {Object} [props.layoutConfig]
61531
+ * @param {Function} [props.layoutChanged]
61532
+ * @param {DescriptionConfig} [props.descriptionConfig]
61533
+ * @param {Function} [props.descriptionLoaded]
61534
+ * @param {Object} [props.eventBus]
62067
61535
  */
62068
61536
 
62069
61537
  function PropertiesPanel(props) {
@@ -62230,15 +61698,15 @@
62230
61698
  })]
62231
61699
  });
62232
61700
  }
62233
- /**
62234
- * @param {Object} props
62235
- * @param {Object} props.element
62236
- * @param {String} props.id
62237
- * @param {String} props.description
62238
- * @param {String} props.label
62239
- * @param {Function} props.getValue
62240
- * @param {Function} props.setValue
62241
- * @param {boolean} [props.disabled]
61701
+ /**
61702
+ * @param {Object} props
61703
+ * @param {Object} props.element
61704
+ * @param {String} props.id
61705
+ * @param {String} props.description
61706
+ * @param {String} props.label
61707
+ * @param {Function} props.getValue
61708
+ * @param {Function} props.setValue
61709
+ * @param {boolean} [props.disabled]
62242
61710
  */
62243
61711
 
62244
61712
 
@@ -62284,21 +61752,21 @@
62284
61752
  }
62285
61753
 
62286
61754
  const noop$1 = () => {};
62287
- /**
62288
- * @typedef { { value: string, label: string, disabled: boolean } } Option
61755
+ /**
61756
+ * @typedef { { value: string, label: string, disabled: boolean } } Option
62289
61757
  */
62290
61758
 
62291
- /**
62292
- * Provides basic select input.
62293
- *
62294
- * @param {object} props
62295
- * @param {string} props.id
62296
- * @param {string[]} props.path
62297
- * @param {string} props.label
62298
- * @param {Function} props.onChange
62299
- * @param {Array<Option>} [props.options]
62300
- * @param {string} props.value
62301
- * @param {boolean} [props.disabled]
61759
+ /**
61760
+ * Provides basic select input.
61761
+ *
61762
+ * @param {object} props
61763
+ * @param {string} props.id
61764
+ * @param {string[]} props.path
61765
+ * @param {string} props.label
61766
+ * @param {Function} props.onChange
61767
+ * @param {Array<Option>} [props.options]
61768
+ * @param {string} props.value
61769
+ * @param {boolean} [props.disabled]
62302
61770
  */
62303
61771
 
62304
61772
 
@@ -62344,16 +61812,16 @@
62344
61812
  })]
62345
61813
  });
62346
61814
  }
62347
- /**
62348
- * @param {object} props
62349
- * @param {object} props.element
62350
- * @param {string} props.id
62351
- * @param {string} [props.description]
62352
- * @param {string} props.label
62353
- * @param {Function} props.getValue
62354
- * @param {Function} props.setValue
62355
- * @param {Function} props.getOptions
62356
- * @param {boolean} [props.disabled]
61815
+ /**
61816
+ * @param {object} props
61817
+ * @param {object} props.element
61818
+ * @param {string} props.id
61819
+ * @param {string} [props.description]
61820
+ * @param {string} props.label
61821
+ * @param {Function} props.getValue
61822
+ * @param {Function} props.setValue
61823
+ * @param {Function} props.getOptions
61824
+ * @param {boolean} [props.disabled]
62357
61825
  */
62358
61826
 
62359
61827
 
@@ -62455,18 +61923,18 @@
62455
61923
  })]
62456
61924
  });
62457
61925
  }
62458
- /**
62459
- * @param {object} props
62460
- * @param {object} props.element
62461
- * @param {string} props.id
62462
- * @param {string} props.description
62463
- * @param {boolean} props.debounce
62464
- * @param {string} props.label
62465
- * @param {Function} props.getValue
62466
- * @param {Function} props.setValue
62467
- * @param {number} props.rows
62468
- * @param {boolean} props.monospace
62469
- * @param {boolean} [props.disabled]
61926
+ /**
61927
+ * @param {object} props
61928
+ * @param {object} props.element
61929
+ * @param {string} props.id
61930
+ * @param {string} props.description
61931
+ * @param {boolean} props.debounce
61932
+ * @param {string} props.label
61933
+ * @param {Function} props.getValue
61934
+ * @param {Function} props.setValue
61935
+ * @param {number} props.rows
61936
+ * @param {boolean} props.monospace
61937
+ * @param {boolean} [props.disabled]
62470
61938
  */
62471
61939
 
62472
61940
 
@@ -62557,17 +62025,17 @@
62557
62025
  })]
62558
62026
  });
62559
62027
  }
62560
- /**
62561
- * @param {Object} props
62562
- * @param {Object} props.element
62563
- * @param {String} props.id
62564
- * @param {String} props.description
62565
- * @param {Boolean} props.debounce
62566
- * @param {Boolean} props.disabled
62567
- * @param {String} props.label
62568
- * @param {Function} props.getValue
62569
- * @param {Function} props.setValue
62570
- * @param {Function} props.validate
62028
+ /**
62029
+ * @param {Object} props
62030
+ * @param {Object} props.element
62031
+ * @param {String} props.id
62032
+ * @param {String} props.description
62033
+ * @param {Boolean} props.debounce
62034
+ * @param {Boolean} props.disabled
62035
+ * @param {String} props.label
62036
+ * @param {Function} props.getValue
62037
+ * @param {Function} props.setValue
62038
+ * @param {Function} props.validate
62571
62039
  */
62572
62040
 
62573
62041
 
@@ -62804,66 +62272,6 @@
62804
62272
  return path.join(separator);
62805
62273
  }
62806
62274
 
62807
- /**
62808
- * Failsafe remove an element from a collection
62809
- *
62810
- * @param {Array<Object>} [collection]
62811
- * @param {Object} [element]
62812
- *
62813
- * @return {number} the previous index of the element
62814
- */
62815
-
62816
- /**
62817
- * Fail save add an element to the given connection, ensuring
62818
- * it does not yet exist.
62819
- *
62820
- * @param {Array<Object>} collection
62821
- * @param {Object} element
62822
- * @param {number} idx
62823
- */
62824
- function add$2(collection, element, idx) {
62825
-
62826
- if (!collection || !element) {
62827
- return;
62828
- }
62829
-
62830
- if (typeof idx !== 'number') {
62831
- idx = -1;
62832
- }
62833
-
62834
- var currentIdx = collection.indexOf(element);
62835
-
62836
- if (currentIdx !== -1) {
62837
-
62838
- if (currentIdx === idx) {
62839
-
62840
- // nothing to do, position has not changed
62841
- return;
62842
- } else {
62843
-
62844
- if (idx !== -1) {
62845
-
62846
- // remove from current position
62847
- collection.splice(currentIdx, 1);
62848
- } else {
62849
-
62850
- // already exists in collection
62851
- return;
62852
- }
62853
- }
62854
- }
62855
-
62856
- if (idx !== -1) {
62857
-
62858
- // insert at specified position
62859
- collection.splice(idx, 0, element);
62860
- } else {
62861
-
62862
- // push to end
62863
- collection.push(element);
62864
- }
62865
- }
62866
-
62867
62275
  const BpmnPropertiesPanelContext = q({
62868
62276
  selectedElement: null,
62869
62277
  injector: null,
@@ -64246,9 +63654,7 @@
64246
63654
  }
64247
63655
 
64248
63656
  function getTemplate(element, elementTemplates) {
64249
- const templateId = elementTemplates._getTemplateId(element);
64250
-
64251
- return templateId && elementTemplates.get(templateId);
63657
+ return elementTemplates.get(element);
64252
63658
  }
64253
63659
 
64254
63660
  function getTemplateDocumentation(element, elementTemplates) {
@@ -66303,7 +65709,7 @@
66303
65709
  categoryValue: [categoryValue]
66304
65710
  }); // add to correct place
66305
65711
 
66306
- add$2(definitions.get('rootElements'), category);
65712
+ add$1(definitions.get('rootElements'), category);
66307
65713
  getBusinessObject(category).$parent = definitions;
66308
65714
  getBusinessObject(categoryValue).$parent = category;
66309
65715
  return categoryValue;