camunda-bpmn-js 2.3.1 → 2.5.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.
@@ -1000,7 +1000,7 @@
1000
1000
  *
1001
1001
  * @return {Object} the target
1002
1002
  */
1003
- function merge(target, ...sources) {
1003
+ function merge$1(target, ...sources) {
1004
1004
 
1005
1005
  if (!sources.length) {
1006
1006
  return target;
@@ -1029,7 +1029,7 @@
1029
1029
  targetVal = {};
1030
1030
  }
1031
1031
 
1032
- target[key] = merge(targetVal, sourceVal);
1032
+ target[key] = merge$1(targetVal, sourceVal);
1033
1033
  } else {
1034
1034
  target[key] = sourceVal;
1035
1035
  }
@@ -1066,7 +1066,7 @@
1066
1066
  keys: keys,
1067
1067
  map: map$2,
1068
1068
  matchPattern: matchPattern,
1069
- merge: merge,
1069
+ merge: merge$1,
1070
1070
  omit: omit,
1071
1071
  pick: pick,
1072
1072
  reduce: reduce,
@@ -4783,7 +4783,29 @@
4783
4783
 
4784
4784
  var intersect = findPathIntersections;
4785
4785
 
4786
- var intersectPaths = intersect;
4786
+ var intersectPaths = /*@__PURE__*/getDefaultExportFromCjs(intersect);
4787
+
4788
+ /**
4789
+ * Checks whether a value is an instance of Connection.
4790
+ *
4791
+ * @param {any} value
4792
+ *
4793
+ * @return {boolean}
4794
+ */
4795
+ function isConnection$2(value) {
4796
+ return isObject$1(value) && has$2(value, 'waypoints');
4797
+ }
4798
+
4799
+ /**
4800
+ * Checks whether a value is an instance of Label.
4801
+ *
4802
+ * @param {any} value
4803
+ *
4804
+ * @return {boolean}
4805
+ */
4806
+ function isLabel$2(value) {
4807
+ return isObject$1(value) && has$2(value, 'labelTarget');
4808
+ }
4787
4809
 
4788
4810
  /**
4789
4811
  * @typedef {import('../core/Types').ElementLike} Element
@@ -4939,7 +4961,7 @@
4939
4961
  * @return {Point}
4940
4962
  */
4941
4963
  function getMid(element) {
4942
- if (isConnection$h(element)) {
4964
+ if (isConnection$2(element)) {
4943
4965
  return getConnectionMid(element);
4944
4966
  }
4945
4967
 
@@ -5079,10 +5101,6 @@
5079
5101
  return Math.sqrt(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2));
5080
5102
  }
5081
5103
 
5082
- function isConnection$h(element) {
5083
- return !!element.waypoints;
5084
- }
5085
-
5086
5104
  /**
5087
5105
  * @typedef {import('./Types').ConnectionLike} ConnectionLike
5088
5106
  * @typedef {import('./Types').RootLike} RootLike
@@ -6826,11 +6844,7 @@
6826
6844
  }
6827
6845
  };
6828
6846
 
6829
- var objectRefsExports = {};
6830
- var objectRefs = {
6831
- get exports(){ return objectRefsExports; },
6832
- set exports(v){ objectRefsExports = v; },
6833
- };
6847
+ var objectRefs = {exports: {}};
6834
6848
 
6835
6849
  var collection = {};
6836
6850
 
@@ -7144,12 +7158,11 @@
7144
7158
 
7145
7159
  var refs = Refs$1;
7146
7160
 
7147
- (function (module) {
7148
- module.exports = refs;
7161
+ objectRefs.exports = refs;
7149
7162
 
7150
- module.exports.Collection = collection;
7151
- } (objectRefs));
7163
+ objectRefs.exports.Collection = collection;
7152
7164
 
7165
+ var objectRefsExports = objectRefs.exports;
7153
7166
  var Refs = /*@__PURE__*/getDefaultExportFromCjs(objectRefsExports);
7154
7167
 
7155
7168
  var parentRefs = new Refs({ name: 'children', enumerable: true, collection: true }, { name: 'parent' }),
@@ -7391,6 +7404,7 @@
7391
7404
  *
7392
7405
  * @return {Root}
7393
7406
  */
7407
+
7394
7408
  /**
7395
7409
  * Creates a connection.
7396
7410
  *
@@ -7414,6 +7428,7 @@
7414
7428
  *
7415
7429
  * @return {Connection}
7416
7430
  */
7431
+
7417
7432
  /**
7418
7433
  * Creates a shape.
7419
7434
  *
@@ -7437,6 +7452,7 @@
7437
7452
  *
7438
7453
  * @return {Shape}
7439
7454
  */
7455
+
7440
7456
  /**
7441
7457
  * Creates a label.
7442
7458
  *
@@ -7456,6 +7472,7 @@
7456
7472
  *
7457
7473
  * @param {'label'} type
7458
7474
  * @param {Object} [attrs]
7475
+ *
7459
7476
  * @return {Label}
7460
7477
  */
7461
7478
  function create(type, attrs) {
@@ -7470,6 +7487,7 @@
7470
7487
  * Checks whether an object is a model instance.
7471
7488
  *
7472
7489
  * @param {any} obj
7490
+ *
7473
7491
  * @return {boolean}
7474
7492
  */
7475
7493
  function isModelElement(obj) {
@@ -18171,7 +18189,7 @@
18171
18189
  * @return {boolean}
18172
18190
  */
18173
18191
  function hasExternalLabel(element) {
18174
- return isLabel$7(element.label);
18192
+ return isLabel$2(element.label);
18175
18193
  }
18176
18194
 
18177
18195
  /**
@@ -18295,19 +18313,10 @@
18295
18313
  }
18296
18314
 
18297
18315
  /**
18298
- * @param {Element} element
18316
+ * @param {ModdleElement} semantic
18299
18317
  *
18300
- * @return {boolean}
18301
- */
18302
- function isLabel$7(element) {
18303
- return element && !!element.labelTarget;
18304
- }
18305
-
18306
-
18307
- /**
18308
- * @typedef { import('../model').DiagramElement } DiagramElement
18318
+ * @returns {string}
18309
18319
  */
18310
-
18311
18320
  function getLabelAttr(semantic) {
18312
18321
  if (
18313
18322
  is$6(semantic, 'bpmn:FlowElement') ||
@@ -18330,6 +18339,11 @@
18330
18339
  }
18331
18340
  }
18332
18341
 
18342
+ /**
18343
+ * @param {ModdleElement} semantic
18344
+ *
18345
+ * @returns {string}
18346
+ */
18333
18347
  function getCategoryValue(semantic) {
18334
18348
  var categoryValueRef = semantic['categoryValueRef'];
18335
18349
 
@@ -18342,9 +18356,9 @@
18342
18356
  }
18343
18357
 
18344
18358
  /**
18345
- * @param {DiagramElement} element
18359
+ * @param {Element} element
18346
18360
  *
18347
- * @return {string} label
18361
+ * @return {string}
18348
18362
  */
18349
18363
  function getLabel(element) {
18350
18364
  var semantic = element.businessObject,
@@ -18363,10 +18377,10 @@
18363
18377
 
18364
18378
 
18365
18379
  /**
18366
- * @param {DiagramElement} element
18380
+ * @param {Element} element
18367
18381
  * @param {string} text
18368
18382
  *
18369
- * @return {DiagramElement} element
18383
+ * @return {Element}
18370
18384
  */
18371
18385
  function setLabel(element, text) {
18372
18386
  var semantic = element.businessObject,
@@ -18588,7 +18602,7 @@
18588
18602
  */
18589
18603
 
18590
18604
  /**
18591
- * @typedef { import('../model').DiagramElement } DiagramElement
18605
+ * @typedef { import('../model/Types').Element } Element
18592
18606
  */
18593
18607
 
18594
18608
  /**
@@ -18954,8 +18968,8 @@
18954
18968
  }
18955
18969
 
18956
18970
  function as(type) {
18957
- return function(parentGfx, element) {
18958
- return renderer(type)(parentGfx, element);
18971
+ return function(parentGfx, element, options) {
18972
+ return renderer(type)(parentGfx, element, options);
18959
18973
  };
18960
18974
  }
18961
18975
 
@@ -19094,7 +19108,7 @@
19094
19108
 
19095
19109
  return drawCircle(parentGfx, element.width, element.height, attrs);
19096
19110
  },
19097
- 'bpmn:StartEvent': function(parentGfx, element) {
19111
+ 'bpmn:StartEvent': function(parentGfx, element, options) {
19098
19112
  var attrs = {
19099
19113
  fill: getFillColor(element, defaultFillColor),
19100
19114
  stroke: getStrokeColor$1(element, defaultStrokeColor)
@@ -19112,7 +19126,9 @@
19112
19126
 
19113
19127
  var circle = renderer('bpmn:Event')(parentGfx, element, attrs);
19114
19128
 
19115
- renderEventContent(element, parentGfx);
19129
+ if (!options || options.renderIcon !== false) {
19130
+ renderEventContent(element, parentGfx);
19131
+ }
19116
19132
 
19117
19133
  return circle;
19118
19134
  },
@@ -19365,14 +19381,16 @@
19365
19381
  stroke: getStrokeColor$1(event, defaultStrokeColor)
19366
19382
  });
19367
19383
  },
19368
- 'bpmn:EndEvent': function(parentGfx, element) {
19384
+ 'bpmn:EndEvent': function(parentGfx, element, options) {
19369
19385
  var circle = renderer('bpmn:Event')(parentGfx, element, {
19370
19386
  strokeWidth: 4,
19371
19387
  fill: getFillColor(element, defaultFillColor),
19372
19388
  stroke: getStrokeColor$1(element, defaultStrokeColor)
19373
19389
  });
19374
19390
 
19375
- renderEventContent(element, parentGfx);
19391
+ if (!options || options.renderIcon !== false) {
19392
+ renderEventContent(element, parentGfx);
19393
+ }
19376
19394
 
19377
19395
  return circle;
19378
19396
  },
@@ -19385,7 +19403,7 @@
19385
19403
 
19386
19404
  return circle;
19387
19405
  },
19388
- 'bpmn:IntermediateEvent': function(parentGfx, element) {
19406
+ 'bpmn:IntermediateEvent': function(parentGfx, element, options) {
19389
19407
  var outer = renderer('bpmn:Event')(parentGfx, element, {
19390
19408
  strokeWidth: 1.5,
19391
19409
  fill: getFillColor(element, defaultFillColor),
@@ -19399,7 +19417,9 @@
19399
19417
  stroke: getStrokeColor$1(element, defaultStrokeColor)
19400
19418
  });
19401
19419
 
19402
- renderEventContent(element, parentGfx);
19420
+ if (!options || options.renderIcon !== false) {
19421
+ renderEventContent(element, parentGfx);
19422
+ }
19403
19423
 
19404
19424
  return outer;
19405
19425
  },
@@ -20117,7 +20137,7 @@
20117
20137
 
20118
20138
  return elementStore;
20119
20139
  },
20120
- 'bpmn:BoundaryEvent': function(parentGfx, element) {
20140
+ 'bpmn:BoundaryEvent': function(parentGfx, element, options) {
20121
20141
 
20122
20142
  var semantic = getBusinessObject$2(element),
20123
20143
  cancel = semantic.cancelActivity;
@@ -20148,7 +20168,9 @@
20148
20168
 
20149
20169
  /* inner path */ drawCircle(parentGfx, element.width, element.height, INNER_OUTER_DIST, innerAttrs);
20150
20170
 
20151
- renderEventContent(element, parentGfx);
20171
+ if (!options || options.renderIcon !== false) {
20172
+ renderEventContent(element, parentGfx);
20173
+ }
20152
20174
 
20153
20175
  return outer;
20154
20176
  },
@@ -20429,7 +20451,7 @@
20429
20451
 
20430
20452
 
20431
20453
  /**
20432
- * @param {DiagramElement} element
20454
+ * @param {Element} element
20433
20455
  *
20434
20456
  * @return {boolean}
20435
20457
  */
@@ -20441,7 +20463,7 @@
20441
20463
  * Draw shape into parentGfx.
20442
20464
  *
20443
20465
  * @param {SVGElement} parentGfx
20444
- * @param {DiagramElement} element
20466
+ * @param {Element} element
20445
20467
  *
20446
20468
  * @return {SVGElement} mainGfx
20447
20469
  */
@@ -20457,7 +20479,7 @@
20457
20479
  * Draw connection into parentGfx.
20458
20480
  *
20459
20481
  * @param {SVGElement} parentGfx
20460
- * @param {DiagramElement} element
20482
+ * @param {Element} element
20461
20483
  *
20462
20484
  * @return {SVGElement} mainGfx
20463
20485
  */
@@ -20472,7 +20494,7 @@
20472
20494
  /**
20473
20495
  * Get shape path.
20474
20496
  *
20475
- * @param {DiagramElement} element
20497
+ * @param {Element} element
20476
20498
  *
20477
20499
  * @return {string} path
20478
20500
  */
@@ -24012,7 +24034,7 @@
24012
24034
  * @param {boolean} [unwrap] whether the event should be unwrapped
24013
24035
  * @param {any} [that]
24014
24036
  */
24015
- CommandInterceptor$1.prototype.canExecute = createHook('canExecute');
24037
+ CommandInterceptor$1.prototype.canExecute = createHook$1('canExecute');
24016
24038
 
24017
24039
  /**
24018
24040
  * Add a <preExecute> phase of command interceptor.
@@ -24023,7 +24045,7 @@
24023
24045
  * @param {boolean} [unwrap] whether the event should be unwrapped
24024
24046
  * @param {any} [that]
24025
24047
  */
24026
- CommandInterceptor$1.prototype.preExecute = createHook('preExecute');
24048
+ CommandInterceptor$1.prototype.preExecute = createHook$1('preExecute');
24027
24049
 
24028
24050
  /**
24029
24051
  * Add a <preExecuted> phase of command interceptor.
@@ -24034,7 +24056,7 @@
24034
24056
  * @param {boolean} [unwrap] whether the event should be unwrapped
24035
24057
  * @param {any} [that]
24036
24058
  */
24037
- CommandInterceptor$1.prototype.preExecuted = createHook('preExecuted');
24059
+ CommandInterceptor$1.prototype.preExecuted = createHook$1('preExecuted');
24038
24060
 
24039
24061
  /**
24040
24062
  * Add a <execute> phase of command interceptor.
@@ -24045,7 +24067,7 @@
24045
24067
  * @param {boolean} [unwrap] whether the event should be unwrapped
24046
24068
  * @param {any} [that]
24047
24069
  */
24048
- CommandInterceptor$1.prototype.execute = createHook('execute');
24070
+ CommandInterceptor$1.prototype.execute = createHook$1('execute');
24049
24071
 
24050
24072
  /**
24051
24073
  * Add a <executed> phase of command interceptor.
@@ -24056,7 +24078,7 @@
24056
24078
  * @param {boolean} [unwrap] whether the event should be unwrapped
24057
24079
  * @param {any} [that]
24058
24080
  */
24059
- CommandInterceptor$1.prototype.executed = createHook('executed');
24081
+ CommandInterceptor$1.prototype.executed = createHook$1('executed');
24060
24082
 
24061
24083
  /**
24062
24084
  * Add a <postExecute> phase of command interceptor.
@@ -24067,7 +24089,7 @@
24067
24089
  * @param {boolean} [unwrap] whether the event should be unwrapped
24068
24090
  * @param {any} [that]
24069
24091
  */
24070
- CommandInterceptor$1.prototype.postExecute = createHook('postExecute');
24092
+ CommandInterceptor$1.prototype.postExecute = createHook$1('postExecute');
24071
24093
 
24072
24094
  /**
24073
24095
  * Add a <postExecuted> phase of command interceptor.
@@ -24078,7 +24100,7 @@
24078
24100
  * @param {boolean} [unwrap] whether the event should be unwrapped
24079
24101
  * @param {any} [that]
24080
24102
  */
24081
- CommandInterceptor$1.prototype.postExecuted = createHook('postExecuted');
24103
+ CommandInterceptor$1.prototype.postExecuted = createHook$1('postExecuted');
24082
24104
 
24083
24105
  /**
24084
24106
  * Add a <revert> phase of command interceptor.
@@ -24089,7 +24111,7 @@
24089
24111
  * @param {boolean} [unwrap] whether the event should be unwrapped
24090
24112
  * @param {any} [that]
24091
24113
  */
24092
- CommandInterceptor$1.prototype.revert = createHook('revert');
24114
+ CommandInterceptor$1.prototype.revert = createHook$1('revert');
24093
24115
 
24094
24116
  /**
24095
24117
  * Add a <reverted> phase of command interceptor.
@@ -24100,7 +24122,7 @@
24100
24122
  * @param {boolean} [unwrap] whether the event should be unwrapped
24101
24123
  * @param {any} [that]
24102
24124
  */
24103
- CommandInterceptor$1.prototype.reverted = createHook('reverted');
24125
+ CommandInterceptor$1.prototype.reverted = createHook$1('reverted');
24104
24126
 
24105
24127
  /*
24106
24128
  * Add prototype methods for each phase of command execution (e.g. execute,
@@ -24115,7 +24137,7 @@
24115
24137
  * unwrap?: boolean
24116
24138
  * ) => any }
24117
24139
  */
24118
- function createHook(hook) {
24140
+ function createHook$1(hook) {
24119
24141
 
24120
24142
  /**
24121
24143
  * @this {CommandInterceptor}
@@ -26189,11 +26211,7 @@
26189
26211
  NavigatedViewer.prototype._navigationModules
26190
26212
  );
26191
26213
 
26192
- var hammerExports = {};
26193
- var hammer = {
26194
- get exports(){ return hammerExports; },
26195
- set exports(v){ hammerExports = v; },
26196
- };
26214
+ var hammer = {exports: {}};
26197
26215
 
26198
26216
  /*! Hammer.JS - v2.0.7 - 2016-04-22
26199
26217
  * http://hammerjs.github.io/
@@ -28838,10 +28856,11 @@
28838
28856
  window[exportName] = Hammer;
28839
28857
  }
28840
28858
 
28841
- })(window, document, 'Hammer');
28859
+ })(window, document, 'Hammer');
28842
28860
  } (hammer));
28843
28861
 
28844
- var Hammer = hammerExports;
28862
+ var hammerExports = hammer.exports;
28863
+ var Hammer = /*@__PURE__*/getDefaultExportFromCjs(hammerExports);
28845
28864
 
28846
28865
  /**
28847
28866
  * @typedef {import('didi').Injector} Injector
@@ -30985,7 +31004,7 @@
30985
31004
  let element = closest(event.delegateTarget || event.target, '.entry', true);
30986
31005
  let entryId = attr$1(element, DATA_REF);
30987
31006
 
30988
- entry = this._getEntry(entryId);
31007
+ entry = { id: entryId, ...this._getEntry(entryId) };
30989
31008
  }
30990
31009
 
30991
31010
  const handler = entry.action;
@@ -31958,7 +31977,7 @@
31958
31977
  y: sourceTrbl.top - 50 - element.height / 2
31959
31978
  };
31960
31979
 
31961
- if (isConnection$g(source)) {
31980
+ if (isConnection$2(source)) {
31962
31981
  position = getMid(source);
31963
31982
  position.x += 100;
31964
31983
  position.y -= 50;
@@ -32003,10 +32022,6 @@
32003
32022
  return findFreePosition(source, element, position, generateGetNextPosition(nextPositionDirection));
32004
32023
  }
32005
32024
 
32006
- function isConnection$g(element) {
32007
- return !!element.waypoints;
32008
- }
32009
-
32010
32025
  /**
32011
32026
  * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
32012
32027
  */
@@ -32444,7 +32459,7 @@
32444
32459
 
32445
32460
  forEach$2(elements, function(element) {
32446
32461
 
32447
- if (is$6(element, 'bpmn:Lane') || isLabel$7(element)) {
32462
+ if (is$6(element, 'bpmn:Lane') || isLabel$2(element)) {
32448
32463
  canResize = false;
32449
32464
  return;
32450
32465
  }
@@ -35458,7 +35473,7 @@
35458
35473
  hoverMid = hover && getSnapPoint(hover, event);
35459
35474
 
35460
35475
  // only snap on connections, elements can have multiple connect endpoints
35461
- if (!isConnection$f(hover) || !hoverMid || !hoverMid.x || !hoverMid.y) {
35476
+ if (!isConnection$2(hover) || !hoverMid || !hoverMid.x || !hoverMid.y) {
35462
35477
  return;
35463
35478
  }
35464
35479
 
@@ -35510,13 +35525,6 @@
35510
35525
 
35511
35526
  BendpointSnapping.$inject = [ 'eventBus' ];
35512
35527
 
35513
-
35514
- // helpers //////////////////////
35515
-
35516
- function isConnection$f(element) {
35517
- return element && !!element.waypoints;
35518
- }
35519
-
35520
35528
  /**
35521
35529
  * @type { import('didi').ModuleDeclaration }
35522
35530
  */
@@ -37043,11 +37051,11 @@
37043
37051
  elements = filter(elements, function(element) {
37044
37052
  var labelTarget = element.labelTarget;
37045
37053
 
37046
- return !element.parent && !(isLabel$6(element) && elements.indexOf(labelTarget) !== -1);
37054
+ return !element.parent && !(isLabel$2(element) && elements.indexOf(labelTarget) !== -1);
37047
37055
  });
37048
37056
 
37049
37057
  var shape = find$2(elements, function(element) {
37050
- return !isConnection$e(element);
37058
+ return !isConnection$2(element);
37051
37059
  });
37052
37060
 
37053
37061
  var attach = false,
@@ -37202,7 +37210,7 @@
37202
37210
 
37203
37211
  // update shape
37204
37212
  shape = find$2(elements, function(element) {
37205
- return !isConnection$e(element);
37213
+ return !isConnection$2(element);
37206
37214
  });
37207
37215
  }
37208
37216
 
@@ -37243,7 +37251,7 @@
37243
37251
  }
37244
37252
 
37245
37253
  var shape = find$2(elements, function(element) {
37246
- return !isConnection$e(element);
37254
+ return !isConnection$2(element);
37247
37255
  });
37248
37256
 
37249
37257
  if (!shape) {
@@ -37277,7 +37285,7 @@
37277
37285
 
37278
37286
  // center elements around cursor
37279
37287
  forEach$2(elements, function(element) {
37280
- if (isConnection$e(element)) {
37288
+ if (isConnection$2(element)) {
37281
37289
  element.waypoints = map$2(element.waypoints, function(waypoint) {
37282
37290
  return {
37283
37291
  x: waypoint.x - bbox.x - bbox.width / 2,
@@ -37339,16 +37347,8 @@
37339
37347
  }
37340
37348
  }
37341
37349
 
37342
- function isConnection$e(element) {
37343
- return !!element.waypoints;
37344
- }
37345
-
37346
37350
  function isSingleShape(elements) {
37347
- return elements && elements.length === 1 && !isConnection$e(elements[0]);
37348
- }
37349
-
37350
- function isLabel$6(element) {
37351
- return !!element.labelTarget;
37351
+ return elements && elements.length === 1 && !isConnection$2(elements[ 0 ]);
37352
37352
  }
37353
37353
 
37354
37354
  /**
@@ -37681,7 +37681,7 @@
37681
37681
  }
37682
37682
 
37683
37683
  // connections (priority = 3)
37684
- if (isConnection$d(element)) {
37684
+ if (isConnection$2(element)) {
37685
37685
  descriptor.priority = 3;
37686
37686
 
37687
37687
  descriptor.source = element.source.id;
@@ -37691,7 +37691,7 @@
37691
37691
  }
37692
37692
 
37693
37693
  // labels (priority = 4)
37694
- if (isLabel$5(element)) {
37694
+ if (isLabel$2(element)) {
37695
37695
  descriptor.priority = 4;
37696
37696
 
37697
37697
  descriptor.labelTarget = element.labelTarget.id;
@@ -37824,7 +37824,7 @@
37824
37824
 
37825
37825
  // center elements around cursor
37826
37826
  forEach$2(elements, function(element) {
37827
- if (isConnection$d(element)) {
37827
+ if (isConnection$2(element)) {
37828
37828
  element.waypoints = map$2(element.waypoints, function(waypoint) {
37829
37829
  return {
37830
37830
  x: waypoint.x - bbox.x - bbox.width / 2,
@@ -37877,7 +37877,7 @@
37877
37877
 
37878
37878
  var element;
37879
37879
 
37880
- if (isConnection$d(attrs)) {
37880
+ if (isConnection$2(attrs)) {
37881
37881
  attrs.source = cache[ descriptor.source ];
37882
37882
  attrs.target = cache[ descriptor.target ];
37883
37883
 
@@ -37888,7 +37888,7 @@
37888
37888
  return;
37889
37889
  }
37890
37890
 
37891
- if (isLabel$5(attrs)) {
37891
+ if (isLabel$2(attrs)) {
37892
37892
  attrs.labelTarget = cache[ attrs.labelTarget ];
37893
37893
 
37894
37894
  element = cache[ descriptor.id ] = self.createLabel(attrs);
@@ -37943,7 +37943,7 @@
37943
37943
  source,
37944
37944
  target;
37945
37945
 
37946
- if (isConnection$d(element)) {
37946
+ if (isConnection$2(element)) {
37947
37947
  source = find$2(elements, matchPattern({ id: element.source.id }));
37948
37948
  target = find$2(elements, matchPattern({ id: element.target.id }));
37949
37949
 
@@ -37952,7 +37952,7 @@
37952
37952
  }
37953
37953
  }
37954
37954
 
37955
- if (isLabel$5(element)) {
37955
+ if (isLabel$2(element)) {
37956
37956
  labelTarget = find$2(elements, matchPattern({ id: element.labelTarget.id }));
37957
37957
 
37958
37958
  if (!labelTarget) {
@@ -38045,7 +38045,7 @@
38045
38045
  eachElement$2(parents, function(element, _index, depth) {
38046
38046
 
38047
38047
  // do NOT add external labels directly
38048
- if (isLabel$5(element)) {
38048
+ if (isLabel$2(element)) {
38049
38049
  return;
38050
38050
  }
38051
38051
 
@@ -38143,14 +38143,6 @@
38143
38143
  return !!element.host;
38144
38144
  }
38145
38145
 
38146
- function isConnection$d(element) {
38147
- return !!element.waypoints;
38148
- }
38149
-
38150
- function isLabel$5(element) {
38151
- return !!element.labelTarget;
38152
- }
38153
-
38154
38146
  function copyWaypoints$1(element) {
38155
38147
  return map$2(element.waypoints, function(waypoint) {
38156
38148
 
@@ -38234,7 +38226,7 @@
38234
38226
 
38235
38227
  // do not copy business object + di for labels;
38236
38228
  // will be pulled from the referenced label target
38237
- if (isLabel$7(element)) {
38229
+ if (isLabel$2(element)) {
38238
38230
  return descriptor;
38239
38231
  }
38240
38232
 
@@ -38302,7 +38294,7 @@
38302
38294
  di = descriptor.di;
38303
38295
 
38304
38296
  // wire existing di + businessObject for external label
38305
- if (isLabel$7(descriptor)) {
38297
+ if (isLabel$2(descriptor)) {
38306
38298
  descriptor.businessObject = getBusinessObject$2(cache[ descriptor.labelTarget ]);
38307
38299
  descriptor.di = getDi$1(cache[ descriptor.labelTarget ]);
38308
38300
 
@@ -44383,7 +44375,7 @@
44383
44375
  ResizeHandles.prototype.addResizer = function(element) {
44384
44376
  var self = this;
44385
44377
 
44386
- if (isConnection$c(element) || !this._resize.canResize({ shape: element })) {
44378
+ if (isConnection$2(element) || !this._resize.canResize({ shape: element })) {
44387
44379
  return;
44388
44380
  }
44389
44381
 
@@ -44435,10 +44427,6 @@
44435
44427
  return offset;
44436
44428
  }
44437
44429
 
44438
- function isConnection$c(element) {
44439
- return !!element.waypoints;
44440
- }
44441
-
44442
44430
  /**
44443
44431
  * @type { import('didi').ModuleDeclaration }
44444
44432
  */
@@ -44798,7 +44786,7 @@
44798
44786
  // external label not yet created
44799
44787
  if (isLabelExternal(target)
44800
44788
  && !hasExternalLabel(target)
44801
- && !isLabel$7(target)) {
44789
+ && !isLabel$2(target)) {
44802
44790
 
44803
44791
  var externalLabelMid = getExternalLabelMid(element);
44804
44792
 
@@ -45475,7 +45463,7 @@
45475
45463
  }
45476
45464
 
45477
45465
  function shouldReplace$1(shape, host) {
45478
- return !isLabel$7(shape) &&
45466
+ return !isLabel$2(shape) &&
45479
45467
  isAny$1(shape, [ 'bpmn:IntermediateThrowEvent', 'bpmn:IntermediateCatchEvent' ]) && !!host;
45480
45468
  }
45481
45469
 
@@ -45652,8 +45640,8 @@
45652
45640
  // ignore connections, groups and labels
45653
45641
  var children = rootElement.children.filter(function(element) {
45654
45642
  return !is$6(element, 'bpmn:Group') &&
45655
- !isLabel$7(element) &&
45656
- !isConnection$b(element);
45643
+ !isLabel$2(element) &&
45644
+ !isConnection$2(element);
45657
45645
  });
45658
45646
 
45659
45647
  // ensure for available children to calculate bounds
@@ -45824,10 +45812,6 @@
45824
45812
  };
45825
45813
  }
45826
45814
 
45827
- function isConnection$b(element) {
45828
- return !!element.waypoints;
45829
- }
45830
-
45831
45815
  function findParticipant(elements) {
45832
45816
  return find$2(elements, function(element) {
45833
45817
  return is$6(element, 'bpmn:Participant');
@@ -46432,7 +46416,7 @@
46432
46416
  }
46433
46417
 
46434
46418
  function shouldReplace(shape, host) {
46435
- return !isLabel$7(shape) && is$6(shape, 'bpmn:BoundaryEvent') && !host;
46419
+ return !isLabel$2(shape) && is$6(shape, 'bpmn:BoundaryEvent') && !host;
46436
46420
  }
46437
46421
 
46438
46422
  function includes$6(array, item) {
@@ -48139,7 +48123,7 @@
48139
48123
 
48140
48124
  var element = context.shape || context.connection;
48141
48125
 
48142
- if (isLabel$7(element) || !isLabelExternal(element)) {
48126
+ if (isLabel$2(element) || !isLabelExternal(element)) {
48143
48127
  return;
48144
48128
  }
48145
48129
 
@@ -50678,7 +50662,7 @@
50678
50662
  shape = context.shape,
50679
50663
  shapeBo = shape.businessObject;
50680
50664
 
50681
- if (isLabel$7(shape)) {
50665
+ if (isLabel$2(shape)) {
50682
50666
  return;
50683
50667
  }
50684
50668
 
@@ -51127,12 +51111,12 @@
51127
51111
  position = context.position,
51128
51112
  target = context.target;
51129
51113
 
51130
- if (isConnection$a(target) && !canInsert(elements, target)) {
51114
+ if (isConnection$2(target) && !canInsert(elements, target)) {
51131
51115
  return false;
51132
51116
  }
51133
51117
 
51134
51118
  return every(elements, function(element) {
51135
- if (isConnection$a(element)) {
51119
+ if (isConnection$2(element)) {
51136
51120
  return canConnect(element.source, element.target, element);
51137
51121
  }
51138
51122
 
@@ -51241,7 +51225,7 @@
51241
51225
  * @return {boolean}
51242
51226
  */
51243
51227
  function nonExistingOrLabel(element) {
51244
- return !element || isLabel$7(element);
51228
+ return !element || isLabel$2(element);
51245
51229
  }
51246
51230
 
51247
51231
  function isSame$1(a, b) {
@@ -51475,15 +51459,6 @@
51475
51459
  );
51476
51460
  }
51477
51461
 
51478
- /**
51479
- * @param {Element} element
51480
- *
51481
- * @return {boolean}
51482
- */
51483
- function isConnection$a(element) {
51484
- return element.waypoints;
51485
- }
51486
-
51487
51462
  /**
51488
51463
  * @param {Element} element
51489
51464
  *
@@ -51574,7 +51549,7 @@
51574
51549
  function canDrop(element, target) {
51575
51550
 
51576
51551
  // can move labels and groups everywhere
51577
- if (isLabel$7(element) || isGroup(element)) {
51552
+ if (isLabel$2(element) || isGroup(element)) {
51578
51553
  return true;
51579
51554
  }
51580
51555
 
@@ -51664,7 +51639,7 @@
51664
51639
  * @return {boolean}
51665
51640
  */
51666
51641
  function isBoundaryEvent(element) {
51667
- return !isLabel$7(element) && is$6(element, 'bpmn:BoundaryEvent');
51642
+ return !isLabel$2(element) && is$6(element, 'bpmn:BoundaryEvent');
51668
51643
  }
51669
51644
 
51670
51645
  /**
@@ -51773,7 +51748,7 @@
51773
51748
  var element = elements[0];
51774
51749
 
51775
51750
  // do not attach labels
51776
- if (isLabel$7(element)) {
51751
+ if (isLabel$2(element)) {
51777
51752
  return false;
51778
51753
  }
51779
51754
 
@@ -51945,7 +51920,7 @@
51945
51920
  return false;
51946
51921
  }
51947
51922
 
51948
- if (isLabel$7(shape) || isGroup(shape)) {
51923
+ if (isLabel$2(shape) || isGroup(shape)) {
51949
51924
  return true;
51950
51925
  }
51951
51926
 
@@ -52126,7 +52101,7 @@
52126
52101
  // return true if shape can be inserted into connection parent
52127
52102
  return (
52128
52103
  isAny$1(connection, [ 'bpmn:SequenceFlow', 'bpmn:MessageFlow' ]) &&
52129
- !isLabel$7(connection) &&
52104
+ !isLabel$2(connection) &&
52130
52105
  is$6(shape, 'bpmn:FlowNode') &&
52131
52106
  !is$6(shape, 'bpmn:BoundaryEvent') &&
52132
52107
  canDrop(shape, connection.parent));
@@ -52149,7 +52124,7 @@
52149
52124
  * @return {boolean}
52150
52125
  */
52151
52126
  function canCopy(elements, element) {
52152
- if (isLabel$7(element)) {
52127
+ if (isLabel$2(element)) {
52153
52128
  return true;
52154
52129
  }
52155
52130
 
@@ -53057,12 +53032,12 @@
53057
53032
  }
53058
53033
 
53059
53034
  forEach$2(elements, function(element) {
53060
- if (!element.parent || isLabel$4(element)) {
53035
+ if (!element.parent || isLabel$2(element)) {
53061
53036
  return;
53062
53037
  }
53063
53038
 
53064
53039
  // handle connections separately
53065
- if (isConnection$9(element)) {
53040
+ if (isConnection$2(element)) {
53066
53041
  connections.push(element);
53067
53042
 
53068
53043
  return;
@@ -53233,15 +53208,15 @@
53233
53208
 
53234
53209
  // find children that are not moving or resizing
53235
53210
  var nonMovingResizingChildren = filter(children, function(child) {
53236
- return !isConnection$9(child) &&
53237
- !isLabel$4(child) &&
53211
+ return !isConnection$2(child) &&
53212
+ !isLabel$2(child) &&
53238
53213
  !includes$3(movingShapes, child) &&
53239
53214
  !includes$3(resizingShapes, child);
53240
53215
  });
53241
53216
 
53242
53217
  // find children that are moving
53243
53218
  var movingChildren = filter(children, function(child) {
53244
- return !isConnection$9(child) && !isLabel$4(child) && includes$3(movingShapes, child);
53219
+ return !isConnection$2(child) && !isLabel$2(child) && includes$3(movingShapes, child);
53245
53220
  });
53246
53221
 
53247
53222
  var minOrMax,
@@ -53375,14 +53350,6 @@
53375
53350
  return !!element.host;
53376
53351
  }
53377
53352
 
53378
- function isConnection$9(element) {
53379
- return !!element.waypoints;
53380
- }
53381
-
53382
- function isLabel$4(element) {
53383
- return !!element.labelTarget;
53384
- }
53385
-
53386
53353
  var MARKER_DRAGGING$1 = 'djs-dragging',
53387
53354
  MARKER_RESIZING = 'djs-resizing';
53388
53355
 
@@ -53541,7 +53508,7 @@
53541
53508
  });
53542
53509
  });
53543
53510
 
53544
- return isConnection$8(element)
53511
+ return isConnection$2(element)
53545
53512
  && (sourceIsMoving || sourceIsResizing)
53546
53513
  && (targetIsMoving || targetIsResizing);
53547
53514
  });
@@ -53671,16 +53638,6 @@
53671
53638
  'previewSupport'
53672
53639
  ];
53673
53640
 
53674
-
53675
- // helpers //////////////////////
53676
-
53677
- /**
53678
- * Checks if an element is a connection.
53679
- */
53680
- function isConnection$8(element) {
53681
- return element.waypoints;
53682
- }
53683
-
53684
53641
  /**
53685
53642
  * @type { import('didi').ModuleDeclaration }
53686
53643
  */
@@ -55720,7 +55677,7 @@
55720
55677
  BpmnUpdater.prototype.updateParent = function(element, oldParent) {
55721
55678
 
55722
55679
  // do not update BPMN 2.0 label parent
55723
- if (isLabel$7(element)) {
55680
+ if (isLabel$2(element)) {
55724
55681
  return;
55725
55682
  }
55726
55683
 
@@ -55785,7 +55742,7 @@
55785
55742
  });
55786
55743
  }
55787
55744
 
55788
- var target = isLabel$7(shape) ? this._getLabel(di) : di;
55745
+ var target = isLabel$2(shape) ? this._getLabel(di) : di;
55789
55746
 
55790
55747
  var bounds = target.bounds;
55791
55748
 
@@ -56846,7 +56803,7 @@
56846
56803
 
56847
56804
  // center elements around position
56848
56805
  forEach$2(elements, function(element) {
56849
- if (isConnection$7(element)) {
56806
+ if (isConnection$2(element)) {
56850
56807
  element.waypoints = map$2(element.waypoints, function(waypoint) {
56851
56808
  return {
56852
56809
  x: round$3(waypoint.x - bbox.x - bbox.width / 2 + position.x),
@@ -56866,7 +56823,7 @@
56866
56823
  var cache = {};
56867
56824
 
56868
56825
  forEach$2(elements, function(element) {
56869
- if (isConnection$7(element)) {
56826
+ if (isConnection$2(element)) {
56870
56827
  cache[ element.id ] = isNumber$1(parentIndex) ?
56871
56828
  modeling.createConnection(
56872
56829
  cache[ element.source.id ],
@@ -56893,6 +56850,10 @@
56893
56850
  createShapeHints.autoResize = false;
56894
56851
  }
56895
56852
 
56853
+ if (isLabel$2(element)) {
56854
+ createShapeHints = omit(createShapeHints, [ 'attach' ]);
56855
+ }
56856
+
56896
56857
  cache[ element.id ] = isNumber$1(parentIndex) ?
56897
56858
  modeling.createShape(
56898
56859
  element,
@@ -56910,13 +56871,7 @@
56910
56871
  });
56911
56872
 
56912
56873
  context.elements = values(cache);
56913
- };
56914
-
56915
- // helpers //////////
56916
-
56917
- function isConnection$7(element) {
56918
- return !!element.waypoints;
56919
- }
56874
+ };
56920
56875
 
56921
56876
  /**
56922
56877
  * @typedef {import('../../../model/Types').Element} Element
@@ -57239,7 +57194,7 @@
57239
57194
 
57240
57195
  // remove child shapes and connections
57241
57196
  saveClear(shape.children, function(child) {
57242
- if (isConnection$6(child)) {
57197
+ if (isConnection$2(child)) {
57243
57198
  modeling.removeConnection(child, { nested: true });
57244
57199
  } else {
57245
57200
  modeling.removeShape(child, { nested: true });
@@ -57287,10 +57242,6 @@
57287
57242
  return shape;
57288
57243
  };
57289
57244
 
57290
- function isConnection$6(element) {
57291
- return element.waypoints;
57292
- }
57293
-
57294
57245
  /**
57295
57246
  * @typedef {import('../Modeling').default} Modeling
57296
57247
  */
@@ -60421,13 +60372,13 @@
60421
60372
  }
60422
60373
 
60423
60374
  forEach$2(elements, function(element) {
60424
- var assignedDi = isConnection$5(element) ? pick(di, [ 'border-color' ]) : di,
60375
+ var assignedDi = isConnection$2(element) ? pick(di, [ 'border-color' ]) : di,
60425
60376
  elementDi = getDi$1(element);
60426
60377
 
60427
60378
  // TODO @barmac: remove once we drop bpmn.io properties
60428
60379
  ensureLegacySupport(assignedDi);
60429
60380
 
60430
- if (isLabel$7(element)) {
60381
+ if (isLabel$2(element)) {
60431
60382
 
60432
60383
  // set label colors as bpmndi:BPMNLabel#color
60433
60384
  self._commandStack.execute('element.updateModdleProperties', {
@@ -60487,10 +60438,6 @@
60487
60438
  return /^#[0-9a-fA-F]{6}$/.test(context.fillStyle) ? context.fillStyle : null;
60488
60439
  }
60489
60440
 
60490
- function isConnection$5(element) {
60491
- return !!element.waypoints;
60492
- }
60493
-
60494
60441
  /**
60495
60442
  * Add legacy properties if required.
60496
60443
  *
@@ -60553,7 +60500,7 @@
60553
60500
  businessObject = element.businessObject,
60554
60501
  newLabel = ctx.newLabel;
60555
60502
 
60556
- if (!isLabel$7(element)
60503
+ if (!isLabel$2(element)
60557
60504
  && isLabelExternal(element)
60558
60505
  && !hasExternalLabel(element)
60559
60506
  && !isEmptyText(newLabel)) {
@@ -60593,11 +60540,11 @@
60593
60540
  hints = ctx.hints || {};
60594
60541
 
60595
60542
  // ignore internal labels for elements except text annotations
60596
- if (!isLabel$7(label) && !is$6(label, 'bpmn:TextAnnotation')) {
60543
+ if (!isLabel$2(label) && !is$6(label, 'bpmn:TextAnnotation')) {
60597
60544
  return;
60598
60545
  }
60599
60546
 
60600
- if (isLabel$7(label) && isEmptyText(newLabel)) {
60547
+ if (isLabel$2(label) && isEmptyText(newLabel)) {
60601
60548
 
60602
60549
  if (hints.removeShape !== false) {
60603
60550
  modeling.removeShape(label, { unsetLabel: false });
@@ -62706,7 +62653,7 @@
62706
62653
 
62707
62654
  var filteredElements = filter(elements, function(element) {
62708
62655
 
62709
- if (!isConnection$4(element)) {
62656
+ if (!isConnection$2(element)) {
62710
62657
  return true;
62711
62658
  } else {
62712
62659
 
@@ -62724,13 +62671,6 @@
62724
62671
  return size(groupBy(elements, function(e) { return e.parent && e.parent.id; })) !== 1;
62725
62672
  }
62726
62673
 
62727
- /**
62728
- * Checks if an element is a connection.
62729
- */
62730
- function isConnection$4(element) {
62731
- return element.waypoints;
62732
- }
62733
-
62734
62674
  /**
62735
62675
  * @type { import('didi').ModuleDeclaration }
62736
62676
  */
@@ -64787,7 +64727,7 @@
64787
64727
  });
64788
64728
 
64789
64729
  // snap labels to mid only
64790
- if (isLabel$3(shape)) {
64730
+ if (isLabel$2(shape)) {
64791
64731
  return snapContext;
64792
64732
  }
64793
64733
 
@@ -64810,9 +64750,9 @@
64810
64750
  forEach$2(snapTargets, function(snapTarget) {
64811
64751
 
64812
64752
  // handle labels
64813
- if (isLabel$3(snapTarget)) {
64753
+ if (isLabel$2(snapTarget)) {
64814
64754
 
64815
- if (isLabel$3(shape)) {
64755
+ if (isLabel$2(shape)) {
64816
64756
  snapPoints.add('mid', mid$2(snapTarget));
64817
64757
  }
64818
64758
 
@@ -64820,7 +64760,7 @@
64820
64760
  }
64821
64761
 
64822
64762
  // handle connections
64823
- if (isConnection$3(snapTarget)) {
64763
+ if (isConnection$2(snapTarget)) {
64824
64764
 
64825
64765
  // ignore single segment connections
64826
64766
  if (snapTarget.waypoints.length < 3) {
@@ -64861,16 +64801,8 @@
64861
64801
 
64862
64802
  // helpers //////////
64863
64803
 
64864
- function isConnection$3(element) {
64865
- return !!element.waypoints;
64866
- }
64867
-
64868
64804
  function isHidden$1(element) {
64869
64805
  return !!element.hidden;
64870
- }
64871
-
64872
- function isLabel$3(element) {
64873
- return !!element.labelTarget;
64874
64806
  }
64875
64807
 
64876
64808
  /**
@@ -65279,18 +65211,10 @@
65279
65211
  return element.host === host;
65280
65212
  }
65281
65213
 
65282
- function isConnection$2(element) {
65283
- return !!element.waypoints;
65284
- }
65285
-
65286
65214
  function isHidden(element) {
65287
65215
  return !!element.hidden;
65288
65216
  }
65289
65217
 
65290
- function isLabel$2(element) {
65291
- return !!element.labelTarget;
65292
- }
65293
-
65294
65218
  function isHorizontal(direction) {
65295
65219
  return direction === 'n' || direction === 's';
65296
65220
  }
@@ -67820,11 +67744,7 @@
67820
67744
 
67821
67745
  var t$1,u,r,o$2=0,i$2=[],c=n$1.__b,f=n$1.__r,e$2=n$1.diffed,a$1=n$1.__c,v=n$1.unmount;function m(t,r){n$1.__h&&n$1.__h(u,t,o$2||r),o$2=0;var i=u.__H||(u.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({}),i.__[t]}function l$1(n){return o$2=1,p$1(w$1,n)}function p$1(n,r,o){var i=m(t$1++,2);return i.t=n,i.__c||(i.__=[o?o(r):w$1(void 0,r),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}));}],i.__c=u),i.__}function y(r,o){var i=m(t$1++,3);!n$1.__s&&k$1(i.__H,o)&&(i.__=r,i.__H=o,u.__H.__h.push(i));}function h(r,o){var i=m(t$1++,4);!n$1.__s&&k$1(i.__H,o)&&(i.__=r,i.__H=o,u.__h.push(i));}function s(n){return o$2=5,d(function(){return {current:n}},[])}function _(n,t,u){o$2=6,h(function(){"function"==typeof n?n(t()):n&&(n.current=t());},null==u?u:u.concat(n));}function d(n,u){var r=m(t$1++,7);return k$1(r.__H,u)&&(r.__=n(),r.__H=u,r.__h=n),r.__}function A$1(n,t){return o$2=8,d(function(){return n},t)}function F$1(n){var r=u.context[n.__c],o=m(t$1++,9);return o.__c=n,r?(null==o.__&&(o.__=!0,r.sub(u)),r.props.value):n.__}function T$1(t,u){n$1.useDebugValue&&n$1.useDebugValue(u?u(t):t);}function x$1(){i$2.forEach(function(t){if(t.__P)try{t.__H.__h.forEach(g$1),t.__H.__h.forEach(j$1),t.__H.__h=[];}catch(u){t.__H.__h=[],n$1.__e(u,t.__v);}}),i$2=[];}n$1.__b=function(n){u=null,c&&c(n);},n$1.__r=function(n){f&&f(n),t$1=0;var r=(u=n.__c).__H;r&&(r.__h.forEach(g$1),r.__h.forEach(j$1),r.__h=[]);},n$1.diffed=function(t){e$2&&e$2(t);var o=t.__c;o&&o.__H&&o.__H.__h.length&&(1!==i$2.push(o)&&r===n$1.requestAnimationFrame||((r=n$1.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(r),b&&cancelAnimationFrame(t),setTimeout(n);},r=setTimeout(u,100);b&&(t=requestAnimationFrame(u));})(x$1)),u=void 0;},n$1.__c=function(t,u){u.some(function(t){try{t.__h.forEach(g$1),t.__h=t.__h.filter(function(n){return !n.__||j$1(n)});}catch(r){u.some(function(n){n.__h&&(n.__h=[]);}),u=[],n$1.__e(r,t.__v);}}),a$1&&a$1(t,u);},n$1.unmount=function(t){v&&v(t);var u=t.__c;if(u&&u.__H)try{u.__H.__.forEach(g$1);}catch(t){n$1.__e(t,u.__v);}};var b="function"==typeof requestAnimationFrame;function g$1(n){var t=u;"function"==typeof n.__c&&n.__c(),u=t;}function j$1(n){var t=u;n.__c=n.__(),u=t;}function k$1(n,t){return !n||n.length!==t.length||t.some(function(t,u){return t!==n[u]})}function w$1(n,t){return "function"==typeof t?t(n):t}
67822
67746
 
67823
- var classnamesExports = {};
67824
- var classnames$1 = {
67825
- get exports(){ return classnamesExports; },
67826
- set exports(v){ classnamesExports = v; },
67827
- };
67747
+ var classnames$1 = {exports: {}};
67828
67748
 
67829
67749
  /*!
67830
67750
  Copyright (c) 2018 Jed Watson.
@@ -67879,10 +67799,11 @@
67879
67799
  } else {
67880
67800
  window.classNames = classNames;
67881
67801
  }
67882
- }());
67802
+ }());
67883
67803
  } (classnames$1));
67884
67804
 
67885
- var classnames = classnamesExports;
67805
+ var classnamesExports = classnames$1.exports;
67806
+ var classnames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
67886
67807
 
67887
67808
  function C$1(n,t){for(var e in t)n[e]=t[e];return n}function S(n,t){for(var e in n)if("__source"!==e&&!(e in t))return !0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return !0;return !1}function E(n){this.props=n;}function g(n,t){function e(n){var e=this.props.ref,r=e==n.ref;return !r&&e&&(e.call?e(null):e.current=null),t?!t(this.props,n)||!r:S(this.props,n)}function r(t){return this.shouldComponentUpdate=e,a$2(n,t)}return r.displayName="Memo("+(n.displayName||n.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(E.prototype=new p$2).isPureReactComponent=!0,E.prototype.shouldComponentUpdate=function(n,t){return S(this.props,n)||S(this.state,t)};var w=n$1.__b;n$1.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),w&&w(n);};var R="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function x(n){function t(t,e){var r=C$1({},t);return delete r.ref,n(r,(e=t.ref||e)&&("object"!=typeof e||"current"in e)?e:null)}return t.$$typeof=R,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(n.displayName||n.name)+")",t}var N=function(n,t){return null==n?null:w$2(w$2(n).map(t))},k={map:N,forEach:N,count:function(n){return n?w$2(n).length:0},only:function(n){var t=w$2(n);if(1!==t.length)throw "Children.only";return t[0]},toArray:w$2},A=n$1.__e;n$1.__e=function(n,t,e){if(n.then)for(var r,u=t;u=u.__;)if((r=u.__c)&&r.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),r.__c(n,t);A(n,t,e);};var O=n$1.unmount;function L(){this.__u=0,this.t=null,this.__b=null;}function U(n){var t=n.__.__c;return t&&t.__e&&t.__e(n)}function D(n){var t,e,r;function u(u){if(t||(t=n()).then(function(n){e=n.default||n;},function(n){r=n;}),r)throw r;if(!e)throw t;return a$2(e,u)}return u.displayName="Lazy",u.__f=!0,u}function F(){this.u=null,this.o=null;}n$1.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&!0===n.__h&&(n.type=null),O&&O(n);},(L.prototype=new p$2).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=U(r.__v),o=!1,i=function(){o||(o=!0,e.__R=null,u?u(l):l());};e.__R=i;var l=function(){if(!--r.__u){if(r.state.__e){var n=r.state.__e;r.__v.__k[0]=function n(t,e,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return n(t,e,r)}),t.__c&&t.__c.__P===e&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(n,n.__c.__P,n.__c.__O);}var t;for(r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate();}},f=!0===t.__h;r.__u++||f||r.setState({__e:r.__b=r.__v.__k[0]}),n.then(i,i);},L.prototype.componentWillUnmount=function(){this.t=[];},L.prototype.render=function(n,t){if(this.__b){if(this.__v.__k){var e=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function n(t,e,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c();}),t.__c.__H=null),null!=(t=C$1({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return n(t,e,r)})),t}(this.__b,e,r.__O=r.__P);}this.__b=null;}var u=t.__e&&a$2(y$1,null,n.fallback);return u&&(u.__h=null),[a$2(y$1,null,t.__e?null:n.children),u]};var M=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.u=e=e[2];}};function T(n){return this.getChildContext=function(){return n.context},n.children}function j(n){var t=this,e=n.i;t.componentWillUnmount=function(){N$1(null,t.l),t.l=null,t.i=null;},t.i&&t.i!==e&&t.componentWillUnmount(),n.__v?(t.l||(t.i=e,t.l={nodeType:1,parentNode:e,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n);},insertBefore:function(n,e){this.childNodes.push(n),t.i.appendChild(n);},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n);}}),N$1(a$2(T,{context:t.context},n.__v),t.l)):t.l&&t.componentWillUnmount();}function I(n,t){return a$2(j,{__v:n,i:t})}(F.prototype=new p$2).__e=function(n){var t=this,e=U(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),M(t,n,r)):u();};e?e(o):o();}},F.prototype.render=function(n){this.u=null,this.o=new Map;var t=w$2(n.children);n.revealOrder&&"b"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.o.set(t[e],this.u=[1,0,this.u]);return n.children},F.prototype.componentDidUpdate=F.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){M(n,e,t);});};var W="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,P=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,V=function(n){return ("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(n)};function z(n,t,e){return null==t.__k&&(t.textContent=""),N$1(n,t),"function"==typeof e&&e(),n?n.__c:null}function B(n,t,e){return O$1(n,t),"function"==typeof e&&e(),n?n.__c:null}p$2.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(n){Object.defineProperty(p$2.prototype,n,{configurable:!0,get:function(){return this["UNSAFE_"+n]},set:function(t){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:t});}});});var H=n$1.event;function Z(){}function Y(){return this.cancelBubble}function $(){return this.defaultPrevented}n$1.event=function(n){return H&&(n=H(n)),n.persist=Z,n.isPropagationStopped=Y,n.isDefaultPrevented=$,n.nativeEvent=n};var q,G={configurable:!0,get:function(){return this.class}},J=n$1.vnode;n$1.vnode=function(n){var t=n.type,e=n.props,r=e;if("string"==typeof t){for(var u in r={},e){var o=e[u];"value"===u&&"defaultValue"in e&&null==o||("defaultValue"===u&&"value"in e&&null==e.value?u="value":"download"===u&&!0===o?o="":/ondoubleclick/i.test(u)?u="ondblclick":/^onchange(textarea|input)/i.test(u+t)&&!V(e.type)?u="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(u)?u=u.toLowerCase():P.test(u)?u=u.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===o&&(o=void 0),r[u]=o);}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=w$2(e.children).forEach(function(n){n.props.selected=-1!=r.value.indexOf(n.props.value);})),"select"==t&&null!=r.defaultValue&&(r.value=w$2(e.children).forEach(function(n){n.props.selected=r.multiple?-1!=r.defaultValue.indexOf(n.props.value):r.defaultValue==n.props.value;})),n.props=r;}t&&e.class!=e.className&&(G.enumerable="className"in e,null!=e.className&&(r.class=e.className),Object.defineProperty(r,"className",G)),n.$$typeof=W,J&&J(n);};var K=n$1.__r;n$1.__r=function(n){K&&K(n),q=n.__c;};var Q={ReactCurrentDispatcher:{current:{readContext:function(n){return q.__n[n.__c].props.value}}}};"object"==typeof performance&&"function"==typeof performance.now?performance.now.bind(performance):function(){return Date.now()};function fn(n){return a$2.bind(null,n)}function cn(n){return !!n&&n.$$typeof===W}function an(n){return cn(n)?S$1.apply(null,arguments):n}function sn(n){return !!n.__k&&(N$1(null,n),!0)}function hn(n){return n&&(n.base||1===n.nodeType&&n)||null}var pn=function(n,t){return n(t)};var React = {useState:l$1,useReducer:p$1,useEffect:y,useLayoutEffect:h,useRef:s,useImperativeHandle:_,useMemo:d,useCallback:A$1,useContext:F$1,useDebugValue:T$1,version:"16.8.0",Children:k,render:z,hydrate:B,unmountComponentAtNode:sn,createPortal:I,createElement:a$2,createContext:q$1,createFactory:fn,cloneElement:an,createRef:h$1,Fragment:y$1,isValidElement:cn,findDOMNode:hn,Component:p$2,PureComponent:E,memo:g,forwardRef:x,unstable_batchedUpdates:pn,StrictMode:y$1,Suspense:L,SuspenseList:F,lazy:D,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Q};
67888
67809
 
@@ -98354,11 +98275,7 @@
98354
98275
  var getVariablesForElement_1 = zeebe.getVariablesForElement = getVariablesForElement;
98355
98276
  zeebe.getVariablesForScope = getVariablesForScope$1;
98356
98277
 
98357
- var arrayMoveExports = {};
98358
- var arrayMove$1 = {
98359
- get exports(){ return arrayMoveExports; },
98360
- set exports(v){ arrayMoveExports = v; },
98361
- };
98278
+ var arrayMove$1 = {exports: {}};
98362
98279
 
98363
98280
  const arrayMoveMutate = (array, from, to) => {
98364
98281
  const startIndex = from < 0 ? array.length + from : from;
@@ -98378,7 +98295,7 @@
98378
98295
  };
98379
98296
 
98380
98297
  arrayMove$1.exports = arrayMove;
98381
- arrayMoveExports.mutate = arrayMoveMutate;
98298
+ arrayMove$1.exports.mutate = arrayMoveMutate;
98382
98299
 
98383
98300
  var dist = {};
98384
98301
 
@@ -99173,6 +99090,8 @@
99173
99090
  return 0;
99174
99091
  };
99175
99092
 
99093
+ var semverCompare$1 = /*@__PURE__*/getDefaultExportFromCjs(semverCompare);
99094
+
99176
99095
  var version$1 = "0.12.1";
99177
99096
 
99178
99097
  var standaloneValidator = {exports: {}};
@@ -101410,7 +101329,7 @@
101410
101329
  eventBus.fire('propertiesPanel.layoutChanged', {
101411
101330
  layout: newLayout
101412
101331
  });
101413
- }, [eventBus, layoutConfig]);
101332
+ }, [eventBus]);
101414
101333
 
101415
101334
  // React to external layout changes
101416
101335
  y(() => {
@@ -101737,17 +101656,17 @@
101737
101656
  function getLinkEventDefinition(element) {
101738
101657
  return getEventDefinition$1(element, 'bpmn:LinkEventDefinition');
101739
101658
  }
101740
- function getSignalEventDefinition(element) {
101659
+ function getSignalEventDefinition$1(element) {
101741
101660
  return getEventDefinition$1(element, 'bpmn:SignalEventDefinition');
101742
101661
  }
101743
101662
  function isLinkSupported(element) {
101744
101663
  return isAny$1(element, ['bpmn:IntermediateThrowEvent', 'bpmn:IntermediateCatchEvent']) && !!getLinkEventDefinition(element);
101745
101664
  }
101746
- function isSignalSupported(element) {
101747
- return is$6(element, 'bpmn:Event') && !!getSignalEventDefinition(element);
101665
+ function isSignalSupported$1(element) {
101666
+ return is$6(element, 'bpmn:Event') && !!getSignalEventDefinition$1(element);
101748
101667
  }
101749
- function getSignal(element) {
101750
- const signalEventDefinition = getSignalEventDefinition(element);
101668
+ function getSignal$1(element) {
101669
+ const signalEventDefinition = getSignalEventDefinition$1(element);
101751
101670
  return signalEventDefinition && signalEventDefinition.get('signalRef');
101752
101671
  }
101753
101672
  function getEscalationEventDefinition(element) {
@@ -103300,24 +103219,24 @@
103300
103219
  return is$6(element, 'bpmn:Participant') && element.businessObject.get('processRef');
103301
103220
  }
103302
103221
 
103303
- const EMPTY_OPTION$3 = '';
103304
- const CREATE_NEW_OPTION$2 = 'create-new';
103305
-
103306
103222
  /**
103307
103223
  * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
103308
103224
  */
103309
103225
 
103226
+ const EMPTY_OPTION$3 = '';
103227
+ const CREATE_NEW_OPTION$2 = 'create-new';
103228
+
103310
103229
  /**
103311
- * @returns {Array<Entry>} entries
103230
+ * @returns {Entry[]}
103312
103231
  */
103313
- function SignalProps(props) {
103232
+ function SignalProps$1(props) {
103314
103233
  const {
103315
103234
  element
103316
103235
  } = props;
103317
- if (!isSignalSupported(element)) {
103236
+ if (!isSignalSupported$1(element)) {
103318
103237
  return [];
103319
103238
  }
103320
- const signal = getSignal(element);
103239
+ const signal = getSignal$1(element);
103321
103240
  let entries = [{
103322
103241
  id: 'signalRef',
103323
103242
  component: SignalRef,
@@ -103326,7 +103245,7 @@
103326
103245
  if (signal) {
103327
103246
  entries = [...entries, {
103328
103247
  id: 'signalName',
103329
- component: SignalName,
103248
+ component: SignalName$1,
103330
103249
  isEdited: isEdited$1
103331
103250
  }];
103332
103251
  }
@@ -103339,9 +103258,9 @@
103339
103258
  const bpmnFactory = useService('bpmnFactory');
103340
103259
  const commandStack = useService('commandStack');
103341
103260
  const translate = useService('translate');
103342
- const signalEventDefinition = getSignalEventDefinition(element);
103261
+ const signalEventDefinition = getSignalEventDefinition$1(element);
103343
103262
  const getValue = () => {
103344
- const signal = getSignal(element);
103263
+ const signal = getSignal$1(element);
103345
103264
  if (signal) {
103346
103265
  return signal.get('id');
103347
103266
  }
@@ -103415,14 +103334,14 @@
103415
103334
  getOptions
103416
103335
  });
103417
103336
  }
103418
- function SignalName(props) {
103337
+ function SignalName$1(props) {
103419
103338
  const {
103420
103339
  element
103421
103340
  } = props;
103422
103341
  const commandStack = useService('commandStack');
103423
103342
  const translate = useService('translate');
103424
103343
  const debounce = useService('debounceInput');
103425
- const signal = getSignal(element);
103344
+ const signal = getSignal$1(element);
103426
103345
  const getValue = () => {
103427
103346
  return signal.get('name');
103428
103347
  };
@@ -103502,6 +103421,16 @@
103502
103421
  const messageEventDefinition = getMessageEventDefinition(element);
103503
103422
  return messageEventDefinition && messageEventDefinition.get('messageRef');
103504
103423
  }
103424
+ function getSignalEventDefinition(element) {
103425
+ return getEventDefinition(element, 'bpmn:SignalEventDefinition');
103426
+ }
103427
+ function isSignalSupported(element) {
103428
+ return is$6(element, 'bpmn:Event') && !!getSignalEventDefinition(element);
103429
+ }
103430
+ function getSignal(element) {
103431
+ const signalEventDefinition = getSignalEventDefinition(element);
103432
+ return signalEventDefinition && signalEventDefinition.get('signalRef');
103433
+ }
103505
103434
 
103506
103435
  function TimerProps$2(props) {
103507
103436
  const {
@@ -103813,7 +103742,7 @@
103813
103742
  id: 'signal',
103814
103743
  label: translate('Signal'),
103815
103744
  component: Group,
103816
- entries: [...SignalProps({
103745
+ entries: [...SignalProps$1({
103817
103746
  element
103818
103747
  })]
103819
103748
  };
@@ -105518,7 +105447,7 @@
105518
105447
  return getParameters$1.apply(this, [element, 'outputParameters']);
105519
105448
  }
105520
105449
  function areInputParametersSupported$1(element) {
105521
- return isAny$1(element, ['bpmn:UserTask', 'bpmn:SubProcess', 'bpmn:CallActivity', 'bpmn:BusinessRuleTask', 'bpmn:ScriptTask']) || isZeebeServiceTask(element);
105450
+ return isAny$1(element, ['bpmn:UserTask', 'bpmn:SubProcess', 'bpmn:CallActivity', 'bpmn:BusinessRuleTask', 'bpmn:ScriptTask']) || isZeebeServiceTask(element) || isSignalThrowEvent(element);
105522
105451
  }
105523
105452
  function areOutputParametersSupported$1(element) {
105524
105453
  return isAny$1(element, ['zeebe:ZeebeServiceTask', 'bpmn:UserTask', 'bpmn:SubProcess', 'bpmn:ReceiveTask', 'bpmn:CallActivity', 'bpmn:Event', 'bpmn:BusinessRuleTask']);
@@ -105526,6 +105455,12 @@
105526
105455
  function createIOMapping(properties, parent, bpmnFactory) {
105527
105456
  return createElement$1('zeebe:IoMapping', properties, parent, bpmnFactory);
105528
105457
  }
105458
+ function isSignalThrowEvent(element) {
105459
+ if (!isAny$1(element, ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent'])) {
105460
+ return false;
105461
+ }
105462
+ return !!getEventDefinition$1(element, 'bpmn:SignalEventDefinition');
105463
+ }
105529
105464
 
105530
105465
  function InputProps$1({
105531
105466
  element,
@@ -106688,6 +106623,58 @@
106688
106623
  return getExtensionElementsList$2(businessObject, 'zeebe:Script')[0];
106689
106624
  }
106690
106625
 
106626
+ /**
106627
+ * @returns {Entry[]}
106628
+ */
106629
+ function SignalProps(props) {
106630
+ const {
106631
+ element
106632
+ } = props;
106633
+ if (!isSignalSupported(element)) {
106634
+ return [];
106635
+ }
106636
+ const signal = getSignal(element);
106637
+ let entries = [];
106638
+ if (signal) {
106639
+ entries = [...entries, {
106640
+ id: 'signalName',
106641
+ component: SignalName,
106642
+ isEdited: isEdited$7
106643
+ }];
106644
+ }
106645
+ return entries;
106646
+ }
106647
+ function SignalName(props) {
106648
+ const {
106649
+ element
106650
+ } = props;
106651
+ const commandStack = useService('commandStack');
106652
+ const translate = useService('translate');
106653
+ const debounce = useService('debounceInput');
106654
+ const signal = getSignal(element);
106655
+ const getValue = () => {
106656
+ return signal.get('name');
106657
+ };
106658
+ const setValue = value => {
106659
+ return commandStack.execute('element.updateModdleProperties', {
106660
+ element,
106661
+ moddleElement: signal,
106662
+ properties: {
106663
+ name: value
106664
+ }
106665
+ });
106666
+ };
106667
+ return FeelEntryWithVariableContext({
106668
+ element,
106669
+ id: 'signalName',
106670
+ label: translate('Name'),
106671
+ feel: 'optional',
106672
+ getValue,
106673
+ setValue,
106674
+ debounce
106675
+ });
106676
+ }
106677
+
106691
106678
  function TargetProps(props) {
106692
106679
  const {
106693
106680
  element
@@ -107438,9 +107425,9 @@
107438
107425
  }
107439
107426
  }
107440
107427
  function isInterruptingStartEvent$1(bo) {
107441
- return isInEventSubProcess$1(bo) && bo.get('isInterrupting') !== false;
107428
+ return isInEventSubProcess$2(bo) && bo.get('isInterrupting') !== false;
107442
107429
  }
107443
- function isInEventSubProcess$1(bo) {
107430
+ function isInEventSubProcess$2(bo) {
107444
107431
  const parent = bo.$parent;
107445
107432
  return is$6(parent, 'bpmn:SubProcess') && parent.triggeredByEvent;
107446
107433
  }
@@ -107715,6 +107702,10 @@
107715
107702
  return properties && properties.get(getPropertyName(namespace));
107716
107703
  }
107717
107704
 
107705
+ /**
107706
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
107707
+ */
107708
+
107718
107709
  const LOW_PRIORITY$1$1 = 500;
107719
107710
  const ZEEBE_GROUPS = [BusinessRuleImplementationGroup, CalledDecisionGroup, ScriptImplementationGroup, ScriptGroup$1, TaskDefinitionGroup, AssignmentDefinitionGroup, FormGroup$1, ConditionGroup$1, TargetGroup, InputGroup$1, OutputPropagationGroup, OutputGroup$1, HeaderGroup, ExtensionPropertiesGroup$1];
107720
107711
  let ZeebePropertiesProvider$1 = class ZeebePropertiesProvider {
@@ -107731,6 +107722,7 @@
107731
107722
  updateErrorGroup$1(groups, element);
107732
107723
  updateEscalationGroup$1(groups, element);
107733
107724
  updateMessageGroup$1(groups, element);
107725
+ updateSignalGroup(groups, element);
107734
107726
  updateTimerGroup$1(groups, element, this._injector);
107735
107727
  updateMultiInstanceGroup$1(groups, element);
107736
107728
 
@@ -107915,7 +107907,7 @@
107915
107907
  if (!errorGroup) {
107916
107908
  return;
107917
107909
  }
107918
- errorGroup.entries = overrideGenericEntries$1(errorGroup.entries, ErrorProps$1({
107910
+ errorGroup.entries = replaceEntries(errorGroup.entries, ErrorProps$1({
107919
107911
  element
107920
107912
  }));
107921
107913
  }
@@ -107924,7 +107916,16 @@
107924
107916
  if (!escalationGroup) {
107925
107917
  return;
107926
107918
  }
107927
- escalationGroup.entries = overrideGenericEntries$1(escalationGroup.entries, EscalationProps$1({
107919
+ escalationGroup.entries = replaceEntries(escalationGroup.entries, EscalationProps$1({
107920
+ element
107921
+ }));
107922
+ }
107923
+ function updateSignalGroup(groups, element) {
107924
+ const signalGroup = findGroup$2(groups, 'signal');
107925
+ if (!signalGroup) {
107926
+ return;
107927
+ }
107928
+ signalGroup.entries = replaceEntries(signalGroup.entries, SignalProps({
107928
107929
  element
107929
107930
  }));
107930
107931
  }
@@ -107933,7 +107934,7 @@
107933
107934
  if (!messageGroup) {
107934
107935
  return;
107935
107936
  }
107936
- messageGroup.entries = overrideGenericEntries$1(messageGroup.entries, MessageProps$1({
107937
+ messageGroup.entries = replaceEntries(messageGroup.entries, MessageProps$1({
107937
107938
  element
107938
107939
  }));
107939
107940
  }
@@ -107977,13 +107978,14 @@
107977
107978
  }
107978
107979
 
107979
107980
  /**
107980
- * Replace generic bpmn components with specific zeebe ones.
107981
+ * Replace entries with the same ID.
107982
+ *s
107983
+ * @param {Entry[]} oldEntries
107984
+ * @param {Entry[]} newEntries
107981
107985
  *
107982
- * @param {Array} oldEntries
107983
- * @param {Array} newEntries
107984
- * @returns {Array} combined entries
107986
+ * @returns {Entry[]} combined entries
107985
107987
  */
107986
- function overrideGenericEntries$1(oldEntries, newEntries) {
107988
+ function replaceEntries(oldEntries, newEntries) {
107987
107989
  const filteredEntries = oldEntries.filter(oldEntry => !newEntries.find(newEntry => newEntry.id === oldEntry.id));
107988
107990
  return [...filteredEntries, ...newEntries];
107989
107991
  }
@@ -109344,7 +109346,7 @@
109344
109346
  schemaVersion = template.$schema && getSchemaVersion(template.$schema);
109345
109347
 
109346
109348
  // (1) compatibility
109347
- if (schemaVersion && semverCompare(SUPPORTED_SCHEMA_VERSION$1, schemaVersion) < 0) {
109349
+ if (schemaVersion && semverCompare$1(SUPPORTED_SCHEMA_VERSION$1, schemaVersion) < 0) {
109348
109350
  return this._logError(`unsupported element template schema version <${schemaVersion}>. Your installation only supports up to version <${SUPPORTED_SCHEMA_VERSION$1}>. Please update your installation`, template);
109349
109351
  }
109350
109352
 
@@ -109550,7 +109552,7 @@
109550
109552
  }
109551
109553
 
109552
109554
  // (2) compatibility
109553
- if (schemaVersion && semverCompare(SUPPORTED_SCHEMA_VERSION, schemaVersion) < 0) {
109555
+ if (schemaVersion && semverCompare$1(SUPPORTED_SCHEMA_VERSION, schemaVersion) < 0) {
109554
109556
  return this._logError(`unsupported element template schema version <${schemaVersion}>. Your installation only supports up to version <${SUPPORTED_SCHEMA_VERSION}>. Please update your installation`, template);
109555
109557
  }
109556
109558
 
@@ -109679,7 +109681,11 @@
109679
109681
  ElementTemplatesLoader.$inject = ['config.elementTemplates', 'eventBus', 'elementTemplates', 'moddle'];
109680
109682
 
109681
109683
  function unlinkTemplate$1(element, injector) {
109682
- const modeling = injector.get('modeling');
109684
+ const modeling = injector.get('modeling'),
109685
+ eventBus = injector.get('eventBus');
109686
+ eventBus.fire('elementTemplates.unlink', {
109687
+ element
109688
+ });
109683
109689
  modeling.updateProperties(element, {
109684
109690
  'camunda:modelerTemplate': null,
109685
109691
  'camunda:modelerTemplateVersion': null
@@ -109687,7 +109693,11 @@
109687
109693
  }
109688
109694
  function removeTemplate(element, injector) {
109689
109695
  const replace = injector.get('replace'),
109690
- selection = injector.get('selection');
109696
+ selection = injector.get('selection'),
109697
+ eventBus = injector.get('eventBus');
109698
+ eventBus.fire('elementTemplates.remove', {
109699
+ element
109700
+ });
109691
109701
  const businessObject = getBusinessObject$2(element);
109692
109702
  const type = businessObject.$type,
109693
109703
  eventDefinitionType = getEventDefinitionType(businessObject);
@@ -109700,7 +109710,12 @@
109700
109710
  selection.select(newElement);
109701
109711
  }
109702
109712
  function updateTemplate$1(element, newTemplate, injector) {
109703
- const elementTemplates = injector.get('elementTemplates');
109713
+ const elementTemplates = injector.get('elementTemplates'),
109714
+ eventBus = injector.get('eventBus');
109715
+ eventBus.fire('elementTemplates.update', {
109716
+ element,
109717
+ newTemplate
109718
+ });
109704
109719
  return elementTemplates.applyTemplate(element, newTemplate);
109705
109720
  }
109706
109721
  function getVersionOrDateFromTemplate(template) {
@@ -109774,7 +109789,11 @@
109774
109789
  }
109775
109790
 
109776
109791
  function unlinkTemplate(element, injector) {
109777
- const modeling = injector.get('modeling');
109792
+ const modeling = injector.get('modeling'),
109793
+ eventBus = injector.get('eventBus');
109794
+ eventBus.fire('elementTemplates.unlink', {
109795
+ element
109796
+ });
109778
109797
 
109779
109798
  // remove template attributes
109780
109799
  modeling.updateProperties(element, {
@@ -109784,7 +109803,12 @@
109784
109803
  });
109785
109804
  }
109786
109805
  function updateTemplate(element, newTemplate, injector) {
109787
- const elementTemplates = injector.get('elementTemplates');
109806
+ const elementTemplates = injector.get('elementTemplates'),
109807
+ eventBus = injector.get('eventBus');
109808
+ eventBus.fire('elementTemplates.update', {
109809
+ element,
109810
+ newTemplate
109811
+ });
109788
109812
  return elementTemplates.applyTemplate(element, newTemplate);
109789
109813
  }
109790
109814
 
@@ -111895,7 +111919,8 @@
111895
111919
  label
111896
111920
  } = property;
111897
111921
  const bpmnFactory = useService('bpmnFactory'),
111898
- commandStack = useService('commandStack');
111922
+ commandStack = useService('commandStack'),
111923
+ translate = useService('translate');
111899
111924
  const getOptions = () => {
111900
111925
  const {
111901
111926
  choices,
@@ -111929,6 +111954,7 @@
111929
111954
  }),
111930
111955
  getValue: propertyGetter$1(element, property),
111931
111956
  setValue: propertySetter$1(bpmnFactory, commandStack, element, property),
111957
+ validate: propertyValidator$1(translate, property),
111932
111958
  disabled: editable === false
111933
111959
  });
111934
111960
  }
@@ -112042,7 +112068,8 @@
112042
112068
  } = property;
112043
112069
  const bpmnFactory = useService('bpmnFactory'),
112044
112070
  commandStack = useService('commandStack'),
112045
- debounce = useService('debounceInput');
112071
+ debounce = useService('debounceInput'),
112072
+ translate = useService('translate');
112046
112073
  return TextAreaEntry({
112047
112074
  debounce,
112048
112075
  element,
@@ -112056,6 +112083,7 @@
112056
112083
  }),
112057
112084
  getValue: propertyGetter$1(element, property),
112058
112085
  setValue: propertySetter$1(bpmnFactory, commandStack, element, property),
112086
+ validate: propertyValidator$1(translate, property),
112059
112087
  disabled: editable === false
112060
112088
  });
112061
112089
  }
@@ -112079,15 +112107,15 @@
112079
112107
  minLength,
112080
112108
  notEmpty
112081
112109
  } = constraints;
112082
- if (notEmpty && isEmptyString$1(value)) {
112110
+ if (notEmpty && isEmpty(value)) {
112083
112111
  return translate('Must not be empty.');
112084
112112
  }
112085
- if (maxLength && value.length > maxLength) {
112113
+ if (maxLength && (value || '').length > maxLength) {
112086
112114
  return translate('Must have max length {maxLength}.', {
112087
112115
  maxLength
112088
112116
  });
112089
112117
  }
112090
- if (minLength && value.length < minLength) {
112118
+ if (minLength && (value || '').length < minLength) {
112091
112119
  return translate('Must have min length {minLength}.', {
112092
112120
  minLength
112093
112121
  });
@@ -112109,8 +112137,11 @@
112109
112137
  }
112110
112138
  };
112111
112139
  }
112112
- function isEmptyString$1(string) {
112113
- return !string || !string.trim().length;
112140
+ function isEmpty(value) {
112141
+ if (typeof value === 'string') {
112142
+ return !value.trim().length;
112143
+ }
112144
+ return value === undefined;
112114
112145
  }
112115
112146
  function matchesPattern$1(string, pattern) {
112116
112147
  return new RegExp(pattern).test(string);
@@ -112518,7 +112549,7 @@
112518
112549
  }
112519
112550
 
112520
112551
  /**
112521
- * Remove referenced element when template is unlinked.
112552
+ * Unlink referenced element when template is unlinked.
112522
112553
  */
112523
112554
  _handlePropertiesUpdate(context) {
112524
112555
  const {
@@ -112534,11 +112565,9 @@
112534
112565
  const bo = getBusinessObject$2(element);
112535
112566
  const message = findMessage(bo);
112536
112567
  if (message && getTemplateId$1(message)) {
112537
- const messageEventDefinition = bo.eventDefinitions[0];
112538
- this._modeling.updateModdleProperties(element, messageEventDefinition, {
112539
- 'messageRef': undefined
112568
+ this._modeling.updateModdleProperties(element, message, {
112569
+ [TEMPLATE_ID_ATTR$1]: null
112540
112570
  });
112541
- this._removeRootElement(message);
112542
112571
  }
112543
112572
  }
112544
112573
 
@@ -112765,7 +112794,7 @@
112765
112794
  },
112766
112795
  messageName: element => {
112767
112796
  const translate = useService('translate');
112768
- if (is$6(element, 'bpmn:StartEvent') && !isInEventSubProcess$2(element)) {
112797
+ if (is$6(element, 'bpmn:StartEvent') && !isInEventSubProcess$1(element)) {
112769
112798
  return o$1("a", {
112770
112799
  href: "https://docs.camunda.io/docs/components/modeler/bpmn/message-events/#messages",
112771
112800
  target: "_blank",
@@ -112857,7 +112886,7 @@
112857
112886
 
112858
112887
  // helper ////////////
112859
112888
 
112860
- function isInEventSubProcess$2(element) {
112889
+ function isInEventSubProcess$1(element) {
112861
112890
  const bo = getBusinessObject$2(element),
112862
112891
  parent = bo.$parent;
112863
112892
  return is$6(parent, 'bpmn:SubProcess') && parent.triggeredByEvent;
@@ -114039,7 +114068,7 @@
114039
114068
  */
114040
114069
  function canAttach(elements, target, source, position) {
114041
114070
  function isBoundaryEvent(element) {
114042
- return !isLabel$7(element) && is$6(element, 'bpmn:BoundaryEvent');
114071
+ return !isLabel$2(element) && is$6(element, 'bpmn:BoundaryEvent');
114043
114072
  }
114044
114073
 
114045
114074
  /**
@@ -114085,7 +114114,7 @@
114085
114114
  const element = elements[0];
114086
114115
 
114087
114116
  // do not attach labels
114088
- if (isLabel$7(element)) {
114117
+ if (isLabel$2(element)) {
114089
114118
  return false;
114090
114119
  }
114091
114120
 
@@ -114364,7 +114393,17 @@
114364
114393
  const variables = {};
114365
114394
 
114366
114395
  const workerTasks = bpmnjs.getDefinitions().get('rootElements').map(async element => {
114367
- variables[element.id] = await this._baseExtractor(element, [ this._extractor.bind(this) ]);
114396
+
114397
+ const elementVariables = await this._baseExtractor(element, [ this._extractor.bind(this) ]);
114398
+
114399
+ // Annotate variables with extractor information
114400
+ variables[element.id] = elementVariables.map(variable => {
114401
+ if (!variable.provider) {
114402
+ variable.provider = [ this._baseExtractor ];
114403
+ }
114404
+
114405
+ return variable;
114406
+ });
114368
114407
  });
114369
114408
 
114370
114409
  await Promise.all(workerTasks);
@@ -114399,7 +114438,8 @@
114399
114438
  );
114400
114439
 
114401
114440
  if (existingVariable) {
114402
- mergeOrigin(existingVariable, variable);
114441
+ merge('origin', existingVariable, variable);
114442
+ merge('provider', existingVariable, variable);
114403
114443
  mergeEntries(existingVariable, variable);
114404
114444
  } else {
114405
114445
  mergedVariables.push(variable);
@@ -114448,7 +114488,8 @@
114448
114488
  processVariables.push({
114449
114489
  ...cloneVariable(variable),
114450
114490
  origin: [ element ],
114451
- scope: variable.scope || getScope(element, containerElement, variable.name)
114491
+ scope: variable.scope || getScope(element, containerElement, variable.name),
114492
+ provider: [ provider ]
114452
114493
  });
114453
114494
  });
114454
114495
  });
@@ -114537,10 +114578,18 @@
114537
114578
  return parent;
114538
114579
  }
114539
114580
 
114540
- function mergeOrigin(target, source) {
114541
- const originToAdd = source.origin.filter(o => !target.origin.includes(o));
114581
+ function merge(property, target, source) {
114582
+ if (!source[property]) {
114583
+ source[property] = [];
114584
+ }
114585
+
114586
+ if (!target[property]) {
114587
+ target[property] = [];
114588
+ }
114542
114589
 
114543
- target.origin.push(...originToAdd);
114590
+ const originToAdd = source[property].filter(o => !target.origin.includes(o));
114591
+
114592
+ target[property].push(...originToAdd);
114544
114593
  }
114545
114594
 
114546
114595
  function mergeEntries(target, source) {
@@ -116201,68 +116250,89 @@
116201
116250
  return scopedResults;
116202
116251
  }
116203
116252
 
116253
+ const HIGH_PRIORITY$1 = 2000;
116254
+
116204
116255
  /**
116205
- * TODO: This method tries to mirror the behavior of ConnectorMappings. However, this is not possible in all cases,
116206
- * as the absence of the header has execution implications. This should be replaced with engine behavior in the
116207
- * Connector Implementation at one point.
116256
+ * The Camunda 8 Implementation for the VariableResolver.
116208
116257
  */
116209
- const ConnectorVariableProvider = {
116210
- getVariables(element) {
116258
+ class ZeebeVariableResolver extends BaseVariableResolver {
116259
+ constructor(eventBus, bpmnjs) {
116260
+ super(eventBus, bpmnjs);
116261
+ this._baseExtractor = getProcessVariables_1;
116211
116262
 
116212
- const result = [];
116263
+ eventBus.on('variableResolver.parseVariables', HIGH_PRIORITY$1, this._resolveIoMappings);
116264
+ }
116213
116265
 
116214
- const taskheaders = getExtensionElementsList(element, 'zeebe:TaskHeaders')[0];
116266
+ async getVariablesForElement(element, moddleElement) {
116267
+ const variables = await super.getVariablesForElement(element);
116215
116268
 
116216
- if (!taskheaders || !taskheaders.values) {
116217
- return;
116269
+ const bo = getBusinessObject$2(element);
116270
+
116271
+ if (!moddleElement) {
116272
+ return variables;
116218
116273
  }
116219
116274
 
116220
- const headers = taskheaders.values;
116275
+ const inputOutput = getInputOutput(bo);
116221
116276
 
116222
- const resultVariable = headers.find(header => {
116223
- return header.key === 'resultVariable';
116224
- });
116277
+ if (!inputOutput) {
116278
+ return variables;
116279
+ }
116225
116280
 
116226
- const resultExpression = headers.find(header => {
116227
- return header.key === 'resultExpression';
116228
- });
116281
+ const namesToFilter = [];
116229
116282
 
116230
- if (resultVariable && resultVariable.value) {
116231
- result.push({
116232
- name: resultVariable.value
116233
- });
116283
+ // Input: remove all inputs defined after the current input definition
116284
+ if (is$6(moddleElement, 'zeebe:Input')) {
116285
+ const allInputs = inputOutput.inputParameters;
116286
+
116287
+ const inputsToFilter =
116288
+ allInputs
116289
+ .slice(allInputs.indexOf(moddleElement))
116290
+ .map(o => o.target);
116291
+
116292
+ namesToFilter.push(...inputsToFilter);
116234
116293
  }
116235
116294
 
116236
- if (resultExpression) {
116295
+ const allOutputs = inputOutput.outputParameters;
116237
116296
 
116238
- // parse with FEEL
116239
- const resultContext = getResultContext(resultExpression.value.substring(1));
116297
+ // Output: remove all outputs defined after the current output definition
116298
+ if (is$6(moddleElement, 'zeebe:Output')) {
116240
116299
 
116241
- const expressionVariables = toUnifiedFormat(resultContext.computedValue());
116300
+ // Get all output mappings defined after the current element, including own name
116301
+ const outputsToFilter = allOutputs
116302
+ .slice(allOutputs.indexOf(moddleElement))
116303
+ .map(o => o.target);
116242
116304
 
116243
- if (expressionVariables && expressionVariables.length > 0) {
116244
- result.push(
116245
- ...expressionVariables[0].entries
116246
- );
116247
- }
116305
+ namesToFilter.push(...outputsToFilter);
116248
116306
  }
116249
116307
 
116250
- return result;
116251
- }
116252
- };
116308
+ // Input or general property: remove all outputs
116309
+ else if (allOutputs) {
116253
116310
 
116254
- const HIGH_PRIORITY$1 = 2000;
116311
+ // Input or execution-related element, remove all outputs
116312
+ const outputsToFilter = allOutputs
116313
+ .map(o => o.target);
116255
116314
 
116256
- /**
116257
- * The Camunda 8 Implementation for the VariableResolver.
116258
- */
116259
- class ZeebeVariableResolver extends BaseVariableResolver {
116260
- constructor(eventBus, bpmnjs) {
116261
- super(eventBus, bpmnjs);
116262
- this._baseExtractor = getProcessVariables_1;
116315
+ namesToFilter.push(...outputsToFilter);
116316
+ }
116263
116317
 
116264
- eventBus.on('variableResolver.parseVariables', HIGH_PRIORITY$1, this._resolveIoMappings);
116265
- this.registerProvider(ConnectorVariableProvider);
116318
+ return variables.filter(v => {
116319
+
116320
+ // Keep all variables that are also defined in other elements
116321
+ if (v.origin.length > 1 || v.origin[0] !== bo) {
116322
+ return true;
116323
+ }
116324
+
116325
+ // Keep all variables from external data providers in outputs
116326
+ if (
116327
+ is$6(moddleElement, 'zeebe:Output') &&
116328
+ v.provider.find(extractor => extractor !== this._baseExtractor)
116329
+ ) {
116330
+ return true;
116331
+ }
116332
+
116333
+ // Filter all pre-defined variables
116334
+ return !namesToFilter.includes(v.name);
116335
+ });
116266
116336
  }
116267
116337
 
116268
116338
  /**
@@ -116342,11 +116412,63 @@
116342
116412
 
116343
116413
  VariableProvider.$inject = [ 'variableResolver' ];
116344
116414
 
116415
+ /**
116416
+ * TODO: This method tries to mirror the behavior of ConnectorMappings. However, this is not possible in all cases,
116417
+ * as the absence of the header has execution implications. This should be replaced with engine behavior in the
116418
+ * Connector Implementation at one point.
116419
+ */
116420
+ class ConnectorVariableProvider extends VariableProvider {
116421
+ getVariables(element) {
116422
+
116423
+ const result = [];
116424
+
116425
+ const taskheaders = getExtensionElementsList(element, 'zeebe:TaskHeaders')[0];
116426
+
116427
+ if (!taskheaders || !taskheaders.values) {
116428
+ return;
116429
+ }
116430
+
116431
+ const headers = taskheaders.values;
116432
+
116433
+ const resultVariable = headers.find(header => {
116434
+ return header.key === 'resultVariable';
116435
+ });
116436
+
116437
+ const resultExpression = headers.find(header => {
116438
+ return header.key === 'resultExpression';
116439
+ });
116440
+
116441
+ if (resultVariable && resultVariable.value) {
116442
+ result.push({
116443
+ name: resultVariable.value
116444
+ });
116445
+ }
116446
+
116447
+ if (resultExpression && resultExpression.value) {
116448
+
116449
+ // parse with FEEL
116450
+ const resultContext = getResultContext(resultExpression.value.substring(1));
116451
+
116452
+ const expressionVariables = toUnifiedFormat(resultContext.computedValue());
116453
+
116454
+ if (expressionVariables && expressionVariables.length > 0) {
116455
+ result.push(
116456
+ ...expressionVariables[0].entries
116457
+ );
116458
+ }
116459
+ }
116460
+
116461
+ return result;
116462
+ }
116463
+ }
116464
+
116345
116465
  const ZeebeVariableResolverModule = {
116346
116466
  __init__: [
116347
116467
  'variableResolver',
116468
+ 'connectorVariableProvider'
116348
116469
  ],
116349
116470
  variableResolver: [ 'type', ZeebeVariableResolver ],
116471
+ connectorVariableProvider: [ 'type', ConnectorVariableProvider ]
116350
116472
  };
116351
116473
 
116352
116474
  const EXAMPLE_JSON_PROPERTY_NAME = 'camundaModeler:exampleOutputJson';
@@ -117116,101 +117238,100 @@
117116
117238
  elementTemplateChooserEntryProvider: [ 'type', ElementTemplateChooserEntryProvider ]
117117
117239
  };
117118
117240
 
117119
- var inherits_browserExports = {};
117120
- var inherits_browser = {
117121
- get exports(){ return inherits_browserExports; },
117122
- set exports(v){ inherits_browserExports = v; },
117123
- };
117124
-
117125
- if (typeof Object.create === 'function') {
117126
- // implementation from standard node.js 'util' module
117127
- inherits_browser.exports = function inherits(ctor, superCtor) {
117128
- if (superCtor) {
117129
- ctor.super_ = superCtor;
117130
- ctor.prototype = Object.create(superCtor.prototype, {
117131
- constructor: {
117132
- value: ctor,
117133
- enumerable: false,
117134
- writable: true,
117135
- configurable: true
117136
- }
117137
- });
117138
- }
117139
- };
117140
- } else {
117141
- // old school shim for old browsers
117142
- inherits_browser.exports = function inherits(ctor, superCtor) {
117143
- if (superCtor) {
117144
- ctor.super_ = superCtor;
117145
- var TempCtor = function () {};
117146
- TempCtor.prototype = superCtor.prototype;
117147
- ctor.prototype = new TempCtor();
117148
- ctor.prototype.constructor = ctor;
117149
- }
117150
- };
117151
- }
117241
+ /**
117242
+ * Get icon defined on a moddle element.
117243
+ *
117244
+ * @param { ModdleElement } element
117245
+ * @param { string } iconProperty
117246
+ *
117247
+ * @return { string }
117248
+ */
117249
+ function getModelerTemplateIcon(element, iconProperty) {
117250
+ iconProperty = iconProperty || 'zeebe:modelerTemplateIcon';
117152
117251
 
117153
- function getModelerTemplateIcon(element) {
117154
- var modelerTemplateIcon = getBusinessObject$2(element).get('zeebe:modelerTemplateIcon');
117155
- return modelerTemplateIcon;
117252
+ return getBusinessObject$2(element).get(iconProperty);
117156
117253
  }
117157
117254
 
117158
117255
  var HIGH_PRIORITY = 1250;
117159
117256
 
117160
117257
 
117161
- function IconsRenderer(
117258
+ function ElementTemplateIconRenderer(
117259
+ config,
117162
117260
  bpmnRenderer,
117163
- eventBus
117164
- ) {
117261
+ eventBus) {
117262
+
117165
117263
  this._bpmnRenderer = bpmnRenderer;
117166
117264
 
117265
+ this._iconProperty = config && config.iconProperty;
117266
+
117167
117267
  BaseRenderer.call(this, eventBus, HIGH_PRIORITY);
117168
117268
  }
117169
117269
 
117170
- inherits_browserExports(IconsRenderer, BaseRenderer);
117270
+ e$7(ElementTemplateIconRenderer, BaseRenderer);
117171
117271
 
117172
- IconsRenderer.prototype.canRender = function(element) {
117272
+ ElementTemplateIconRenderer.prototype.canRender = function(element) {
117173
117273
 
117174
- if (isLabel$7(element)) {
117274
+ if (isLabel$2(element)) {
117175
117275
  return false;
117176
117276
  }
117177
117277
 
117178
- return (
117179
- is$6(element, 'bpmn:Task') &&
117180
- !!getModelerTemplateIcon(element)
117278
+ return !!(
117279
+ isAny$1(element, [ 'bpmn:Task', 'bpmn:Event' ]) && this._getIcon(element)
117181
117280
  );
117182
117281
  };
117183
117282
 
117184
- IconsRenderer.prototype.drawShape = function(parentGfx, element) {
117283
+ ElementTemplateIconRenderer.prototype._getIcon = function(element) {
117284
+ return getModelerTemplateIcon(element, this._iconProperty);
117285
+ };
117286
+
117287
+ ElementTemplateIconRenderer.prototype.drawShape = function(parentGfx, element) {
117185
117288
 
117186
- var renderer = this._bpmnRenderer.handlers['bpmn:Task'];
117289
+ var renderer = this._bpmnRenderer.handlers[
117290
+ [
117291
+ 'bpmn:Task',
117292
+ 'bpmn:StartEvent',
117293
+ 'bpmn:IntermediateEvent',
117294
+ 'bpmn:BoundaryEvent',
117295
+ 'bpmn:EndEvent'
117296
+ ].find(t => is$6(element, t))
117297
+ ];
117298
+
117299
+ var gfx = renderer(parentGfx, element, { renderIcon: false });
117187
117300
 
117188
- var gfx = renderer(parentGfx, element);
117301
+ var icon = this._getIcon(element);
117189
117302
 
117190
- var modelerTemplateIcon = getModelerTemplateIcon(element);
117303
+ var size = 18;
117191
117304
 
117192
- var icon = create$1('image');
117193
- attr(icon, {
117194
- href: modelerTemplateIcon,
117305
+ var padding = is$6(element, 'bpmn:Task') ? {
117195
117306
  x: 5,
117196
- y: 5,
117197
- width: 18,
117198
- height: 18
117307
+ y: 5
117308
+ } : {
117309
+ x: (element.width - size) / 2,
117310
+ y: (element.height - size) / 2
117311
+ };
117312
+
117313
+ var img = create$1('image');
117314
+ attr(img, {
117315
+ href: icon,
117316
+ width: size,
117317
+ height: size,
117318
+ ...padding
117199
117319
  });
117200
117320
 
117201
- append(parentGfx, icon);
117321
+ append(parentGfx, img);
117202
117322
 
117203
117323
  return gfx;
117204
117324
  };
117205
117325
 
117206
- IconsRenderer.$inject = [
117326
+ ElementTemplateIconRenderer.$inject = [
117327
+ 'config.elementTemplateIconRenderer',
117207
117328
  'bpmnRenderer',
117208
117329
  'eventBus'
117209
117330
  ];
117210
117331
 
117211
117332
  var iconRendererModule = {
117212
- __init__: [ 'elementTemplatesIconsRenderer' ],
117213
- elementTemplatesIconsRenderer: [ 'type', IconsRenderer ]
117333
+ __init__: [ 'elementTemplateIconRenderer' ],
117334
+ elementTemplateIconRenderer: [ 'type', ElementTemplateIconRenderer ]
117214
117335
  };
117215
117336
 
117216
117337
  var name = "zeebe";
@@ -117693,9 +117814,11 @@
117693
117814
  /**
117694
117815
  * Flatten array, one level deep.
117695
117816
  *
117696
- * @param {Array<?>} arr
117817
+ * @template T
117697
117818
  *
117698
- * @return {Array<?>}
117819
+ * @param {T[][]} arr
117820
+ *
117821
+ * @return {T[]}
117699
117822
  */
117700
117823
 
117701
117824
  const nativeToString = Object.prototype.toString;
@@ -117717,6 +117840,11 @@
117717
117840
  return nativeToString.call(obj) === '[object Number]';
117718
117841
  }
117719
117842
 
117843
+ /**
117844
+ * @param {any} obj
117845
+ *
117846
+ * @return {boolean}
117847
+ */
117720
117848
  function isFunction(obj) {
117721
117849
  const tag = nativeToString.call(obj);
117722
117850
 
@@ -117741,22 +117869,74 @@
117741
117869
  return nativeHasOwnProperty.call(target, key);
117742
117870
  }
117743
117871
 
117872
+ /**
117873
+ * @template T
117874
+ * @typedef { (
117875
+ * ((e: T) => boolean) |
117876
+ * ((e: T, idx: number) => boolean) |
117877
+ * ((e: T, key: string) => boolean) |
117878
+ * string |
117879
+ * number
117880
+ * ) } Matcher
117881
+ */
117882
+
117883
+ /**
117884
+ * @template T
117885
+ * @template U
117886
+ *
117887
+ * @typedef { (
117888
+ * ((e: T) => U) | string | number
117889
+ * ) } Extractor
117890
+ */
117891
+
117892
+
117893
+ /**
117894
+ * @template T
117895
+ * @typedef { (val: T, key: any) => boolean } MatchFn
117896
+ */
117897
+
117898
+ /**
117899
+ * @template T
117900
+ * @typedef { T[] } ArrayCollection
117901
+ */
117902
+
117903
+ /**
117904
+ * @template T
117905
+ * @typedef { { [key: string]: T } } StringKeyValueCollection
117906
+ */
117907
+
117908
+ /**
117909
+ * @template T
117910
+ * @typedef { { [key: number]: T } } NumberKeyValueCollection
117911
+ */
117912
+
117913
+ /**
117914
+ * @template T
117915
+ * @typedef { StringKeyValueCollection<T> | NumberKeyValueCollection<T> } KeyValueCollection
117916
+ */
117917
+
117918
+ /**
117919
+ * @template T
117920
+ * @typedef { KeyValueCollection<T> | ArrayCollection<T> } Collection
117921
+ */
117922
+
117744
117923
  /**
117745
117924
  * Find element in collection.
117746
117925
  *
117747
- * @param {Array|Object} collection
117748
- * @param {Function|Object} matcher
117926
+ * @template T
117927
+ * @param {Collection<T>} collection
117928
+ * @param {Matcher<T>} matcher
117749
117929
  *
117750
117930
  * @return {Object}
117751
117931
  */
117752
117932
  function find(collection, matcher) {
117753
117933
 
117754
- matcher = toMatcher(matcher);
117934
+ const matchFn = toMatcher(matcher);
117755
117935
 
117756
117936
  let match;
117757
117937
 
117758
117938
  forEach(collection, function(val, key) {
117759
- if (matcher(val, key)) {
117939
+ if (matchFn(val, key)) {
117760
117940
  match = val;
117761
117941
 
117762
117942
  return false;
@@ -117772,10 +117952,11 @@
117772
117952
  * Iterate over collection; returning something
117773
117953
  * (non-undefined) will stop iteration.
117774
117954
  *
117775
- * @param {Array|Object} collection
117776
- * @param {Function} iterator
117955
+ * @template T
117956
+ * @param {Collection<T>} collection
117957
+ * @param { ((item: T, idx: number) => (boolean|void)) | ((item: T, key: string) => (boolean|void)) } iterator
117777
117958
  *
117778
- * @return {Object} return result that stopped the iteration
117959
+ * @return {T} return result that stopped the iteration
117779
117960
  */
117780
117961
  function forEach(collection, iterator) {
117781
117962
 
@@ -117818,6 +117999,12 @@
117818
117999
  }
117819
118000
 
117820
118001
 
118002
+ /**
118003
+ * @template T
118004
+ * @param {Matcher<T>} matcher
118005
+ *
118006
+ * @return {MatchFn<T>}
118007
+ */
117821
118008
  function toMatcher(matcher) {
117822
118009
  return isFunction(matcher) ? matcher : (e) => {
117823
118010
  return e === matcher;
@@ -118649,8 +118836,12 @@
118649
118836
  * To change the icons, modify the SVGs in `./resources`, execute `npx svgo -f resources --datauri enc -o dist`,
118650
118837
  * and then replace respective icons with the optimized data URIs in `./dist`.
118651
118838
  */
118652
- const appendIcon = 'data:image/svg+xml,%3Csvg%20width%3D%2222%22%20height%3D%2222%22%20viewBox%3D%220%200%205.82%205.82%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Cpath%20d%3D%22M1.3%203.4c.3%200%20.5-.2.5-.5s-.2-.4-.5-.4c-.2%200-.4.1-.4.4%200%20.3.2.5.4.5zM3%203.4c.2%200%20.4-.2.4-.5s-.2-.4-.4-.4c-.3%200-.5.1-.5.4%200%20.3.2.5.5.5zM4.6%203.4c.2%200%20.4-.2.4-.5s-.2-.4-.4-.4c-.3%200-.5.1-.5.4%200%20.3.2.5.5.5z%22%2F%3E%0A%3C%2Fsvg%3E';
118653
- const createIcon = 'data:image/svg+xml,%3Csvg%20width%3D%2246%22%20height%3D%2246%22%20viewBox%3D%22-2%20-2%209.82%209.82%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20d%3D%22M1.3%203.4c.3%200%20.5-.2.5-.5s-.2-.4-.5-.4c-.2%200-.4.1-.4.4%200%20.3.2.5.4.5zM3%203.4c.2%200%20.4-.2.4-.5s-.2-.4-.4-.4c-.3%200-.5.1-.5.4%200%20.3.2.5.5.5zM4.6%203.4c.2%200%20.4-.2.4-.5s-.2-.4-.4-.4c-.3%200-.5.1-.5.4%200%20.3.2.5.5.5z%22%2F%3E%0A%3C%2Fsvg%3E';
118839
+ const appendIcon = `<svg width="22" height="22" viewBox="0 0 5.82 5.82" xmlns="http://www.w3.org/2000/svg">
118840
+ <path d="M1.3 3.4c.3 0 .5-.2.5-.5s-.2-.4-.5-.4c-.2 0-.4.1-.4.4 0 .3.2.5.4.5zM3 3.4c.2 0 .4-.2.4-.5s-.2-.4-.4-.4c-.3 0-.5.1-.5.4 0 .3.2.5.5.5zM4.6 3.4c.2 0 .4-.2.4-.5s-.2-.4-.4-.4c-.3 0-.5.1-.5.4 0 .3.2.5.5.5z"/>
118841
+ </svg>`;
118842
+ const createIcon = `<svg width="46" height="46" viewBox="-2 -2 9.82 9.82" xmlns="http://www.w3.org/2000/svg">
118843
+ <path d="M1.3 3.4c.3 0 .5-.2.5-.5s-.2-.4-.5-.4c-.2 0-.4.1-.4.4 0 .3.2.5.4.5zM3 3.4c.2 0 .4-.2.4-.5s-.2-.4-.4-.4c-.3 0-.5.1-.5.4 0 .3.2.5.5.5zM4.6 3.4c.2 0 .4-.2.4-.5s-.2-.4-.4-.4c-.3 0-.5.1-.5.4 0 .3.2.5.5.5z"/>
118844
+ </svg>`;
118654
118845
 
118655
118846
  /**
118656
118847
  * A provider for append context pad button
@@ -118696,7 +118887,7 @@
118696
118887
  return {
118697
118888
  'append': {
118698
118889
  group: 'model',
118699
- imageUrl: appendIcon,
118890
+ html: `<div class="entry">${appendIcon}</div>`,
118700
118891
  title: translate('Append element'),
118701
118892
  action: {
118702
118893
  click: function(event, element) {
@@ -118742,10 +118933,15 @@
118742
118933
 
118743
118934
  function e(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}));}
118744
118935
 
118936
+ /**
118937
+ * @typedef { import('../model/Types').Element } Element
118938
+ * @typedef { import('../model/Types').ModdleElement } ModdleElement
118939
+ */
118940
+
118745
118941
  /**
118746
118942
  * Is an element of the given BPMN type?
118747
118943
  *
118748
- * @param {djs.model.Base|ModdleElement} element
118944
+ * @param {Element|ModdleElement} element
118749
118945
  * @param {string} type
118750
118946
  *
118751
118947
  * @return {boolean}
@@ -118760,8 +118956,8 @@
118760
118956
  /**
118761
118957
  * Return true if element has any of the given types.
118762
118958
  *
118763
- * @param {djs.model.Base} element
118764
- * @param {Array<string>} types
118959
+ * @param {Element|ModdleElement} element
118960
+ * @param {string[]} types
118765
118961
  *
118766
118962
  * @return {boolean}
118767
118963
  */
@@ -118774,7 +118970,7 @@
118774
118970
  /**
118775
118971
  * Return the business object for a given element.
118776
118972
  *
118777
- * @param {djs.model.Base|ModdleElement} element
118973
+ * @param {Element|ModdleElement} element
118778
118974
  *
118779
118975
  * @return {ModdleElement}
118780
118976
  */
@@ -118785,7 +118981,7 @@
118785
118981
  /**
118786
118982
  * Return the di object for a given element.
118787
118983
  *
118788
- * @param {djs.model.Base} element
118984
+ * @param {Element} element
118789
118985
  *
118790
118986
  * @return {ModdleElement}
118791
118987
  */
@@ -118793,14 +118989,25 @@
118793
118989
  return element && element.di;
118794
118990
  }
118795
118991
 
118796
- function isLabel(element) {
118797
- return element && !!element.labelTarget;
118992
+ /**
118993
+ * Checks whether a value is an instance of Label.
118994
+ *
118995
+ * @param {any} value
118996
+ *
118997
+ * @return {boolean}
118998
+ */
118999
+ function isLabel(value) {
119000
+ return isObject(value) && has(value, 'labelTarget');
118798
119001
  }
118799
119002
 
118800
119003
  /**
119004
+ * @typedef {import('../core/Types').ElementLike} ElementLike
118801
119005
  * @typedef {import('../core/EventBus').default} EventBus
118802
- * @typedef {import(./CommandInterceptor).HandlerFunction} HandlerFunction
118803
- * @typedef {import(./CommandInterceptor).ComposeHandlerFunction} ComposeHandlerFunction
119006
+ * @typedef {import('./CommandStack').CommandContext} CommandContext
119007
+ *
119008
+ * @typedef {string|string[]} Events
119009
+ * @typedef { (context: CommandContext) => ElementLike[] | void } HandlerFunction
119010
+ * @typedef { (context: CommandContext) => void } ComposeHandlerFunction
118804
119011
  */
118805
119012
 
118806
119013
  var DEFAULT_PRIORITY = 1000;
@@ -118812,10 +119019,9 @@
118812
119019
  * @class
118813
119020
  * @constructor
118814
119021
  *
118815
- * @param {EventBus} eventBus
118816
- *
118817
119022
  * @example
118818
119023
  *
119024
+ * ```javascript
118819
119025
  * import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
118820
119026
  *
118821
119027
  * class CommandLogger extends CommandInterceptor {
@@ -118826,6 +119032,9 @@
118826
119032
  * console.log('commandStack.shape-create.preExecute', event);
118827
119033
  * });
118828
119034
  * }
119035
+ * ```
119036
+ *
119037
+ * @param {EventBus} eventBus
118829
119038
  */
118830
119039
  function CommandInterceptor(eventBus) {
118831
119040
 
@@ -118843,16 +119052,17 @@
118843
119052
  };
118844
119053
  }
118845
119054
 
119055
+
118846
119056
  /**
118847
- * Intercept a command during one of the phases.
118848
- *
118849
- * @param {string|string[]} [events] One or more commands to intercept.
118850
- * @param {string} [hook] Phase during which to intercept command.
118851
- * @param {number} [priority] Priority with which command will be intercepted.
118852
- * @param {ComposeHandlerFunction|HandlerFunction} handlerFn Callback.
118853
- * @param {boolean} [unwrap] Whether the event should be unwrapped.
118854
- * @param {*} [that] `this` value the callback will be called with.
118855
- */
119057
+ * Intercept a command during one of the phases.
119058
+ *
119059
+ * @param {Events} [events] command(s) to intercept
119060
+ * @param {string} [hook] phase to intercept
119061
+ * @param {number} [priority]
119062
+ * @param {ComposeHandlerFunction|HandlerFunction} handlerFn
119063
+ * @param {boolean} [unwrap] whether the event should be unwrapped
119064
+ * @param {any} [that]
119065
+ */
118856
119066
  CommandInterceptor.prototype.on = function(events, hook, priority, handlerFn, unwrap, that) {
118857
119067
 
118858
119068
  if (isFunction(hook) || isNumber(hook)) {
@@ -118894,35 +119104,130 @@
118894
119104
  });
118895
119105
  };
118896
119106
 
119107
+ /**
119108
+ * Add a <canExecute> phase of command interceptor.
119109
+ *
119110
+ * @param {Events} [events] command(s) to intercept
119111
+ * @param {number} [priority]
119112
+ * @param {ComposeHandlerFunction|HandlerFunction} handlerFn
119113
+ * @param {boolean} [unwrap] whether the event should be unwrapped
119114
+ * @param {any} [that]
119115
+ */
119116
+ CommandInterceptor.prototype.canExecute = createHook('canExecute');
118897
119117
 
118898
- var hooks = [
118899
- 'canExecute',
118900
- 'preExecute',
118901
- 'preExecuted',
118902
- 'execute',
118903
- 'executed',
118904
- 'postExecute',
118905
- 'postExecuted',
118906
- 'revert',
118907
- 'reverted'
118908
- ];
119118
+ /**
119119
+ * Add a <preExecute> phase of command interceptor.
119120
+ *
119121
+ * @param {Events} [events] command(s) to intercept
119122
+ * @param {number} [priority]
119123
+ * @param {ComposeHandlerFunction|HandlerFunction} handlerFn
119124
+ * @param {boolean} [unwrap] whether the event should be unwrapped
119125
+ * @param {any} [that]
119126
+ */
119127
+ CommandInterceptor.prototype.preExecute = createHook('preExecute');
119128
+
119129
+ /**
119130
+ * Add a <preExecuted> phase of command interceptor.
119131
+ *
119132
+ * @param {Events} [events] command(s) to intercept
119133
+ * @param {number} [priority]
119134
+ * @param {ComposeHandlerFunction|HandlerFunction} handlerFn
119135
+ * @param {boolean} [unwrap] whether the event should be unwrapped
119136
+ * @param {any} [that]
119137
+ */
119138
+ CommandInterceptor.prototype.preExecuted = createHook('preExecuted');
119139
+
119140
+ /**
119141
+ * Add a <execute> phase of command interceptor.
119142
+ *
119143
+ * @param {Events} [events] command(s) to intercept
119144
+ * @param {number} [priority]
119145
+ * @param {ComposeHandlerFunction|HandlerFunction} handlerFn
119146
+ * @param {boolean} [unwrap] whether the event should be unwrapped
119147
+ * @param {any} [that]
119148
+ */
119149
+ CommandInterceptor.prototype.execute = createHook('execute');
119150
+
119151
+ /**
119152
+ * Add a <executed> phase of command interceptor.
119153
+ *
119154
+ * @param {Events} [events] command(s) to intercept
119155
+ * @param {number} [priority]
119156
+ * @param {ComposeHandlerFunction|HandlerFunction} handlerFn
119157
+ * @param {boolean} [unwrap] whether the event should be unwrapped
119158
+ * @param {any} [that]
119159
+ */
119160
+ CommandInterceptor.prototype.executed = createHook('executed');
119161
+
119162
+ /**
119163
+ * Add a <postExecute> phase of command interceptor.
119164
+ *
119165
+ * @param {Events} [events] command(s) to intercept
119166
+ * @param {number} [priority]
119167
+ * @param {ComposeHandlerFunction|HandlerFunction} handlerFn
119168
+ * @param {boolean} [unwrap] whether the event should be unwrapped
119169
+ * @param {any} [that]
119170
+ */
119171
+ CommandInterceptor.prototype.postExecute = createHook('postExecute');
119172
+
119173
+ /**
119174
+ * Add a <postExecuted> phase of command interceptor.
119175
+ *
119176
+ * @param {Events} [events] command(s) to intercept
119177
+ * @param {number} [priority]
119178
+ * @param {ComposeHandlerFunction|HandlerFunction} handlerFn
119179
+ * @param {boolean} [unwrap] whether the event should be unwrapped
119180
+ * @param {any} [that]
119181
+ */
119182
+ CommandInterceptor.prototype.postExecuted = createHook('postExecuted');
119183
+
119184
+ /**
119185
+ * Add a <revert> phase of command interceptor.
119186
+ *
119187
+ * @param {Events} [events] command(s) to intercept
119188
+ * @param {number} [priority]
119189
+ * @param {ComposeHandlerFunction|HandlerFunction} handlerFn
119190
+ * @param {boolean} [unwrap] whether the event should be unwrapped
119191
+ * @param {any} [that]
119192
+ */
119193
+ CommandInterceptor.prototype.revert = createHook('revert');
119194
+
119195
+ /**
119196
+ * Add a <reverted> phase of command interceptor.
119197
+ *
119198
+ * @param {Events} [events] command(s) to intercept
119199
+ * @param {number} [priority]
119200
+ * @param {ComposeHandlerFunction|HandlerFunction} handlerFn
119201
+ * @param {boolean} [unwrap] whether the event should be unwrapped
119202
+ * @param {any} [that]
119203
+ */
119204
+ CommandInterceptor.prototype.reverted = createHook('reverted');
118909
119205
 
118910
119206
  /*
118911
119207
  * Add prototype methods for each phase of command execution (e.g. execute,
118912
119208
  * revert).
119209
+ *
119210
+ * @param {string} hook
119211
+ *
119212
+ * @return { (
119213
+ * events?: Events,
119214
+ * priority?: number,
119215
+ * handlerFn: ComposeHandlerFunction|HandlerFunction,
119216
+ * unwrap?: boolean
119217
+ * ) => any }
118913
119218
  */
118914
- forEach(hooks, function(hook) {
119219
+ function createHook(hook) {
118915
119220
 
118916
119221
  /**
118917
- * Add prototype method for a specific phase of command execution.
119222
+ * @this {CommandInterceptor}
118918
119223
  *
118919
- * @param {string|string[]} [events] One or more commands to intercept.
118920
- * @param {number} [priority] Priority with which command will be intercepted.
118921
- * @param {ComposeHandlerFunction|HandlerFunction} handlerFn Callback.
118922
- * @param {boolean} [unwrap] Whether the event should be unwrapped.
118923
- * @param {*} [that] `this` value the callback will be called with.
119224
+ * @param {Events} [events]
119225
+ * @param {number} [priority]
119226
+ * @param {ComposeHandlerFunction|HandlerFunction} handlerFn
119227
+ * @param {boolean} [unwrap]
119228
+ * @param {any} [that]
118924
119229
  */
118925
- CommandInterceptor.prototype[hook] = function(events, priority, handlerFn, unwrap, that) {
119230
+ const hookFn = function(events, priority, handlerFn, unwrap, that) {
118926
119231
 
118927
119232
  if (isFunction(events) || isNumber(events)) {
118928
119233
  that = unwrap;
@@ -118934,7 +119239,9 @@
118934
119239
 
118935
119240
  this.on(events, hook, priority, handlerFn, unwrap, that);
118936
119241
  };
118937
- });
119242
+
119243
+ return hookFn;
119244
+ }
118938
119245
 
118939
119246
  /**
118940
119247
  * @typedef {import('../../core/EventBus').default} EventBus
@@ -118946,6 +119253,8 @@
118946
119253
  * Extensions should implement the init method to actually add their custom
118947
119254
  * modeling checks. Checks may be added via the #addRule(action, fn) method.
118948
119255
  *
119256
+ * @class
119257
+ *
118949
119258
  * @param {EventBus} eventBus
118950
119259
  */
118951
119260
  function RuleProvider(eventBus) {
@@ -118963,15 +119272,16 @@
118963
119272
  * Adds a modeling rule for the given action, implemented through
118964
119273
  * a callback function.
118965
119274
  *
118966
- * The function will receive the modeling specific action context
119275
+ * The callback receives a modeling specific action context
118967
119276
  * to perform its check. It must return `false` to disallow the
118968
- * action from happening or `true` to allow the action.
118969
- *
118970
- * A rule provider may pass over the evaluation to lower priority
118971
- * rules by returning return nothing (or <code>undefined</code>).
119277
+ * action from happening or `true` to allow the action. Usually returing
119278
+ * `null` denotes that a particular interaction shall be ignored.
119279
+ * By returning nothing or `undefined` you pass evaluation to lower
119280
+ * priority rules.
118972
119281
  *
118973
119282
  * @example
118974
119283
  *
119284
+ * ```javascript
118975
119285
  * ResizableRules.prototype.init = function() {
118976
119286
  *
118977
119287
  * \/**
@@ -118998,10 +119308,11 @@
118998
119308
  * }
118999
119309
  * });
119000
119310
  * };
119311
+ * ```
119001
119312
  *
119002
- * @param {string|Array<string>} actions the identifier for the modeling action to check
119313
+ * @param {string|string[]} actions the identifier for the modeling action to check
119003
119314
  * @param {number} [priority] the priority at which this rule is being applied
119004
- * @param {Function} fn the callback function that performs the actual check
119315
+ * @param {(any) => any} fn the callback function that performs the actual check
119005
119316
  */
119006
119317
  RuleProvider.prototype.addRule = function(actions, priority, fn) {
119007
119318
 
@@ -119294,7 +119605,7 @@
119294
119605
  return {
119295
119606
  'create': {
119296
119607
  group: 'create',
119297
- imageUrl: createIcon,
119608
+ html: `<div class="entry"> ${createIcon}</div>`,
119298
119609
  title: translate('Create element'),
119299
119610
  action: {
119300
119611
  click: function(event) {
@@ -119397,6 +119708,7 @@
119397
119708
 
119398
119709
  /**
119399
119710
  * @param {KeyboardEvent} event
119711
+ * @return {boolean}
119400
119712
  */
119401
119713
  function isCmd(event) {
119402
119714
 
@@ -119412,8 +119724,9 @@
119412
119724
  /**
119413
119725
  * Checks if key pressed is one of provided keys.
119414
119726
  *
119415
- * @param {string|Array<string>} keys
119727
+ * @param {string|string[]} keys
119416
119728
  * @param {KeyboardEvent} event
119729
+ * @return {boolean}
119417
119730
  */
119418
119731
  function isKey(keys, event) {
119419
119732
  keys = isArray(keys) ? keys : [ keys ];
@@ -119428,18 +119741,30 @@
119428
119741
  return event.shiftKey;
119429
119742
  }
119430
119743
 
119744
+ /**
119745
+ * @param {KeyboardEvent} event
119746
+ */
119431
119747
  function isCopy(event) {
119432
119748
  return isCmd(event) && isKey(KEYS_COPY, event);
119433
119749
  }
119434
119750
 
119751
+ /**
119752
+ * @param {KeyboardEvent} event
119753
+ */
119435
119754
  function isPaste(event) {
119436
119755
  return isCmd(event) && isKey(KEYS_PASTE, event);
119437
119756
  }
119438
119757
 
119758
+ /**
119759
+ * @param {KeyboardEvent} event
119760
+ */
119439
119761
  function isUndo(event) {
119440
119762
  return isCmd(event) && !isShift(event) && isKey(KEYS_UNDO, event);
119441
119763
  }
119442
119764
 
119765
+ /**
119766
+ * @param {KeyboardEvent} event
119767
+ */
119443
119768
  function isRedo(event) {
119444
119769
  return isCmd(event) && (
119445
119770
  isKey(KEYS_REDO, event) || (
@@ -120118,6 +120443,17 @@
120118
120443
  elementTemplatesReplaceProvider: [ 'type', ElementTemplatesReplaceProvider ]
120119
120444
  };
120120
120445
 
120446
+ /**
120447
+ * @typedef {import('../model/Types').Element} Element
120448
+ * @typedef {import('../model/Types').ModdleElement} ModdleElement
120449
+ */
120450
+
120451
+ /**
120452
+ * @param {Element} element
120453
+ * @param {ModdleElement} [di]
120454
+ *
120455
+ * @return {boolean}
120456
+ */
120121
120457
  function isExpanded(element, di) {
120122
120458
 
120123
120459
  if (is(element, 'bpmn:CallActivity')) {
@@ -120141,14 +120477,21 @@
120141
120477
  return true;
120142
120478
  }
120143
120479
 
120480
+ /**
120481
+ * @typedef {import('../../../model/Types').Element} Element
120482
+ * @typedef {import('diagram-js/lib/features/popup-menu/PopupMenu').PopupMenuTarget} PopupMenuTarget
120483
+ *
120484
+ * @typedef {(entry: PopupMenuTarget) => boolean} DifferentTypeValidator
120485
+ */
120486
+
120144
120487
  /**
120145
120488
  * Returns true, if an element is from a different type
120146
120489
  * than a target definition. Takes into account the type,
120147
120490
  * event definition type and triggeredByEvent property.
120148
120491
  *
120149
- * @param {djs.model.Base} element
120492
+ * @param {Element} element
120150
120493
  *
120151
- * @return {boolean}
120494
+ * @return {DifferentTypeValidator}
120152
120495
  */
120153
120496
  function isDifferentType(element) {
120154
120497
 
@@ -120179,6 +120522,28 @@
120179
120522
  };
120180
120523
  }
120181
120524
 
120525
+ /**
120526
+ * @typedef { () => string } LabelGetter
120527
+ *
120528
+ * @typedef { {
120529
+ * label: string | LabelGetter;
120530
+ * actionName: string;
120531
+ * className: string;
120532
+ * target?: {
120533
+ * type: string;
120534
+ * isExpanded?: boolean;
120535
+ * isInterrupting?: boolean;
120536
+ * triggeredByEvent?: boolean;
120537
+ * cancelActivity?: boolean;
120538
+ * eventDefinitionType?: string;
120539
+ * eventDefinitionAttrs?: Record<string, any>
120540
+ * };
120541
+ * } } ReplaceOption
120542
+ */
120543
+
120544
+ /**
120545
+ * @type {ReplaceOption[]}
120546
+ */
120182
120547
  var START_EVENT = [
120183
120548
  {
120184
120549
  label: 'Start Event',
@@ -120242,6 +120607,9 @@
120242
120607
  }
120243
120608
  ];
120244
120609
 
120610
+ /**
120611
+ * @type {ReplaceOption[]}
120612
+ */
120245
120613
  var START_EVENT_SUB_PROCESS = [
120246
120614
  {
120247
120615
  label: 'Start Event',
@@ -120269,6 +120637,9 @@
120269
120637
  }
120270
120638
  ];
120271
120639
 
120640
+ /**
120641
+ * @type {ReplaceOption[]}
120642
+ */
120272
120643
  var INTERMEDIATE_EVENT = [
120273
120644
  {
120274
120645
  label: 'Start Event',
@@ -120392,6 +120763,9 @@
120392
120763
  }
120393
120764
  ];
120394
120765
 
120766
+ /**
120767
+ * @type {ReplaceOption[]}
120768
+ */
120395
120769
  var END_EVENT = [
120396
120770
  {
120397
120771
  label: 'Start Event',
@@ -120482,6 +120856,9 @@
120482
120856
  }
120483
120857
  ];
120484
120858
 
120859
+ /**
120860
+ * @type {ReplaceOption[]}
120861
+ */
120485
120862
  var GATEWAY = [
120486
120863
  {
120487
120864
  label: 'Exclusive Gateway',
@@ -120551,6 +120928,9 @@
120551
120928
  // }
120552
120929
  ];
120553
120930
 
120931
+ /**
120932
+ * @type {ReplaceOption[]}
120933
+ */
120554
120934
  var SUBPROCESS_EXPANDED = [
120555
120935
  {
120556
120936
  label: 'Transaction',
@@ -120582,6 +120962,9 @@
120582
120962
  }
120583
120963
  ];
120584
120964
 
120965
+ /**
120966
+ * @type {ReplaceOption[]}
120967
+ */
120585
120968
  var TRANSACTION = [
120586
120969
  {
120587
120970
  label: 'Transaction',
@@ -120613,8 +120996,14 @@
120613
120996
  }
120614
120997
  ];
120615
120998
 
120999
+ /**
121000
+ * @type {ReplaceOption[]}
121001
+ */
120616
121002
  var EVENT_SUB_PROCESS = TRANSACTION;
120617
121003
 
121004
+ /**
121005
+ * @type {ReplaceOption[]}
121006
+ */
120618
121007
  var TASK = [
120619
121008
  {
120620
121009
  label: 'Task',
@@ -120708,6 +121097,9 @@
120708
121097
  }
120709
121098
  ];
120710
121099
 
121100
+ /**
121101
+ * @type {ReplaceOption[]}
121102
+ */
120711
121103
  var DATA_OBJECT_REFERENCE = [
120712
121104
  {
120713
121105
  label: 'Data Store Reference',
@@ -120719,6 +121111,9 @@
120719
121111
  }
120720
121112
  ];
120721
121113
 
121114
+ /**
121115
+ * @type {ReplaceOption[]}
121116
+ */
120722
121117
  var DATA_STORE_REFERENCE = [
120723
121118
  {
120724
121119
  label: 'Data Object Reference',
@@ -120730,6 +121125,9 @@
120730
121125
  }
120731
121126
  ];
120732
121127
 
121128
+ /**
121129
+ * @type {ReplaceOption[]}
121130
+ */
120733
121131
  var BOUNDARY_EVENT = [
120734
121132
  {
120735
121133
  label: 'Message Boundary Event',
@@ -120855,6 +121253,9 @@
120855
121253
  }
120856
121254
  ];
120857
121255
 
121256
+ /**
121257
+ * @type {ReplaceOption[]}
121258
+ */
120858
121259
  var EVENT_SUB_PROCESS_START_EVENT = [
120859
121260
  {
120860
121261
  label: 'Message Start Event',
@@ -120971,6 +121372,9 @@
120971
121372
  }
120972
121373
  ];
120973
121374
 
121375
+ /**
121376
+ * @type {ReplaceOption[]}
121377
+ */
120974
121378
  var SEQUENCE_FLOW = [
120975
121379
  {
120976
121380
  label: 'Sequence Flow',
@@ -120989,6 +121393,9 @@
120989
121393
  }
120990
121394
  ];
120991
121395
 
121396
+ /**
121397
+ * @type {ReplaceOption[]}
121398
+ */
120992
121399
  var PARTICIPANT = [
120993
121400
  {
120994
121401
  label: 'Expanded Pool',