camunda-bpmn-js 0.15.0 → 0.15.1

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.
@@ -84203,6 +84203,16 @@
84203
84203
  function isArray$4(obj) {
84204
84204
  return nativeToString$2.call(obj) === '[object Array]';
84205
84205
  }
84206
+ function isObject$1(obj) {
84207
+ return nativeToString$2.call(obj) === '[object Object]';
84208
+ }
84209
+ function isNumber$1(obj) {
84210
+ return nativeToString$2.call(obj) === '[object Number]';
84211
+ }
84212
+ function isFunction$1(obj) {
84213
+ var tag = nativeToString$2.call(obj);
84214
+ return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object AsyncGeneratorFunction]' || tag === '[object Proxy]';
84215
+ }
84206
84216
  /**
84207
84217
  * Return true, if target owns a property with the given key.
84208
84218
  *
@@ -84215,6 +84225,205 @@
84215
84225
  function has$2(target, key) {
84216
84226
  return nativeHasOwnProperty$2.call(target, key);
84217
84227
  }
84228
+ /**
84229
+ * Iterate over collection; returning something
84230
+ * (non-undefined) will stop iteration.
84231
+ *
84232
+ * @param {Array|Object} collection
84233
+ * @param {Function} iterator
84234
+ *
84235
+ * @return {Object} return result that stopped the iteration
84236
+ */
84237
+
84238
+ function forEach$2(collection, iterator) {
84239
+ var val, result;
84240
+
84241
+ if (isUndefined$4(collection)) {
84242
+ return;
84243
+ }
84244
+
84245
+ var convertKey = isArray$4(collection) ? toNum$2 : identity$2;
84246
+
84247
+ for (var key in collection) {
84248
+ if (has$2(collection, key)) {
84249
+ val = collection[key];
84250
+ result = iterator(val, convertKey(key));
84251
+
84252
+ if (result === false) {
84253
+ return val;
84254
+ }
84255
+ }
84256
+ }
84257
+ }
84258
+
84259
+ function identity$2(arg) {
84260
+ return arg;
84261
+ }
84262
+
84263
+ function toNum$2(arg) {
84264
+ return Number(arg);
84265
+ }
84266
+
84267
+ var DEFAULT_PRIORITY$8 = 1000;
84268
+
84269
+ /**
84270
+ * A utility that can be used to plug-in into the command execution for
84271
+ * extension and/or validation.
84272
+ *
84273
+ * @param {EventBus} eventBus
84274
+ *
84275
+ * @example
84276
+ *
84277
+ * import inherits from 'inherits';
84278
+ *
84279
+ * import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
84280
+ *
84281
+ * function CommandLogger(eventBus) {
84282
+ * CommandInterceptor.call(this, eventBus);
84283
+ *
84284
+ * this.preExecute(function(event) {
84285
+ * console.log('command pre-execute', event);
84286
+ * });
84287
+ * }
84288
+ *
84289
+ * inherits(CommandLogger, CommandInterceptor);
84290
+ *
84291
+ */
84292
+ function CommandInterceptor$2(eventBus) {
84293
+ this._eventBus = eventBus;
84294
+ }
84295
+
84296
+ CommandInterceptor$2.$inject = [ 'eventBus' ];
84297
+
84298
+ function unwrapEvent$1(fn, that) {
84299
+ return function(event) {
84300
+ return fn.call(that || null, event.context, event.command, event);
84301
+ };
84302
+ }
84303
+
84304
+ /**
84305
+ * Register an interceptor for a command execution
84306
+ *
84307
+ * @param {string|Array<string>} [events] list of commands to register on
84308
+ * @param {string} [hook] command hook, i.e. preExecute, executed to listen on
84309
+ * @param {number} [priority] the priority on which to hook into the execution
84310
+ * @param {Function} handlerFn interceptor to be invoked with (event)
84311
+ * @param {boolean} unwrap if true, unwrap the event and pass (context, command, event) to the
84312
+ * listener instead
84313
+ * @param {Object} [that] Pass context (`this`) to the handler function
84314
+ */
84315
+ CommandInterceptor$2.prototype.on = function(events, hook, priority, handlerFn, unwrap, that) {
84316
+
84317
+ if (isFunction$1(hook) || isNumber$1(hook)) {
84318
+ that = unwrap;
84319
+ unwrap = handlerFn;
84320
+ handlerFn = priority;
84321
+ priority = hook;
84322
+ hook = null;
84323
+ }
84324
+
84325
+ if (isFunction$1(priority)) {
84326
+ that = unwrap;
84327
+ unwrap = handlerFn;
84328
+ handlerFn = priority;
84329
+ priority = DEFAULT_PRIORITY$8;
84330
+ }
84331
+
84332
+ if (isObject$1(unwrap)) {
84333
+ that = unwrap;
84334
+ unwrap = false;
84335
+ }
84336
+
84337
+ if (!isFunction$1(handlerFn)) {
84338
+ throw new Error('handlerFn must be a function');
84339
+ }
84340
+
84341
+ if (!isArray$4(events)) {
84342
+ events = [ events ];
84343
+ }
84344
+
84345
+ var eventBus = this._eventBus;
84346
+
84347
+ forEach$2(events, function(event) {
84348
+
84349
+ // concat commandStack(.event)?(.hook)?
84350
+ var fullEvent = [ 'commandStack', event, hook ].filter(function(e) { return e; }).join('.');
84351
+
84352
+ eventBus.on(fullEvent, priority, unwrap ? unwrapEvent$1(handlerFn, that) : handlerFn, that);
84353
+ });
84354
+ };
84355
+
84356
+
84357
+ var hooks$1 = [
84358
+ 'canExecute',
84359
+ 'preExecute',
84360
+ 'preExecuted',
84361
+ 'execute',
84362
+ 'executed',
84363
+ 'postExecute',
84364
+ 'postExecuted',
84365
+ 'revert',
84366
+ 'reverted'
84367
+ ];
84368
+
84369
+ /*
84370
+ * Install hook shortcuts
84371
+ *
84372
+ * This will generate the CommandInterceptor#(preExecute|...|reverted) methods
84373
+ * which will in term forward to CommandInterceptor#on.
84374
+ */
84375
+ forEach$2(hooks$1, function(hook) {
84376
+
84377
+ /**
84378
+ * {canExecute|preExecute|preExecuted|execute|executed|postExecute|postExecuted|revert|reverted}
84379
+ *
84380
+ * A named hook for plugging into the command execution
84381
+ *
84382
+ * @param {string|Array<string>} [events] list of commands to register on
84383
+ * @param {number} [priority] the priority on which to hook into the execution
84384
+ * @param {Function} handlerFn interceptor to be invoked with (event)
84385
+ * @param {boolean} [unwrap=false] if true, unwrap the event and pass (context, command, event) to the
84386
+ * listener instead
84387
+ * @param {Object} [that] Pass context (`this`) to the handler function
84388
+ */
84389
+ CommandInterceptor$2.prototype[hook] = function(events, priority, handlerFn, unwrap, that) {
84390
+
84391
+ if (isFunction$1(events) || isNumber$1(events)) {
84392
+ that = unwrap;
84393
+ unwrap = handlerFn;
84394
+ handlerFn = priority;
84395
+ priority = events;
84396
+ events = null;
84397
+ }
84398
+
84399
+ this.on(events, hook, priority, handlerFn, unwrap, that);
84400
+ };
84401
+ });
84402
+
84403
+ /**
84404
+ * Is an element of the given BPMN type?
84405
+ *
84406
+ * @param {djs.model.Base|ModdleElement} element
84407
+ * @param {string} type
84408
+ *
84409
+ * @return {boolean}
84410
+ */
84411
+ function is$4(element, type) {
84412
+ var bo = getBusinessObject$1(element);
84413
+
84414
+ return bo && (typeof bo.$instanceOf === 'function') && bo.$instanceOf(type);
84415
+ }
84416
+
84417
+ /**
84418
+ * Return the business object for a given element.
84419
+ *
84420
+ * @param {djs.model.Base|ModdleElement} element
84421
+ *
84422
+ * @return {ModdleElement}
84423
+ */
84424
+ function getBusinessObject$1(element) {
84425
+ return (element && element.businessObject) || element;
84426
+ }
84218
84427
 
84219
84428
  /**
84220
84429
  * Get extension elements of business object. Optionally filter by type.
@@ -84224,7 +84433,7 @@
84224
84433
  * @returns {Array<ModdleElement>}
84225
84434
  */
84226
84435
  function getExtensionElementsList$1(element, type = undefined) {
84227
- const businessObject = getBusinessObject(element),
84436
+ const businessObject = getBusinessObject$1(element),
84228
84437
  extensionElements = businessObject.get('extensionElements');
84229
84438
 
84230
84439
  if (!extensionElements) {
@@ -84238,7 +84447,7 @@
84238
84447
  }
84239
84448
 
84240
84449
  if (type) {
84241
- return values.filter(value => is$1(value, type));
84450
+ return values.filter(value => is$4(value, type));
84242
84451
  }
84243
84452
 
84244
84453
  return values;
@@ -84276,7 +84485,7 @@
84276
84485
  * Camunda BPMN specific behavior ensuring camunda:ErrorEventDefinition extension elements are removed
84277
84486
  * if type of e.g. bpmn:ServiceTask is set to something other than external.
84278
84487
  */
84279
- class DeleteErrorEventDefinitionBehavior extends CommandInterceptor {
84488
+ class DeleteErrorEventDefinitionBehavior extends CommandInterceptor$2 {
84280
84489
  constructor(commandStack, eventBus) {
84281
84490
  super(eventBus);
84282
84491
 
@@ -84290,10 +84499,10 @@
84290
84499
  properties
84291
84500
  } = context;
84292
84501
 
84293
- const businessObject = moddleElement || getBusinessObject(element);
84502
+ const businessObject = moddleElement || getBusinessObject$1(element);
84294
84503
 
84295
- if (is$1(element, 'camunda:ExternalCapable')
84296
- && is$1(businessObject, 'camunda:ExternalCapable')
84504
+ if (is$4(element, 'camunda:ExternalCapable')
84505
+ && is$4(businessObject, 'camunda:ExternalCapable')
84297
84506
  && properties[ 'camunda:type' ] !== 'external'
84298
84507
  ) {
84299
84508
  const errorEventDefinitions = getExtensionElementsList$1(businessObject, 'camunda:ErrorEventDefinition');
@@ -84320,7 +84529,7 @@
84320
84529
  * removed when both camunda:asyncAfter and camunda:asyncBefore set to false.
84321
84530
  * Doesn't apply if element has bpmn:TimerEventDefinition.
84322
84531
  */
84323
- class DeleteRetryTimeCycleBehavior extends CommandInterceptor {
84532
+ class DeleteRetryTimeCycleBehavior extends CommandInterceptor$2 {
84324
84533
  constructor(commandStack, eventBus) {
84325
84534
  super(eventBus);
84326
84535
 
@@ -84337,13 +84546,13 @@
84337
84546
  const asyncAfter = properties[ 'camunda:asyncAfter' ],
84338
84547
  asyncBefore = properties[ 'camunda:asyncBefore' ];
84339
84548
 
84340
- const businessObject = moddleElement || getBusinessObject(element);
84549
+ const businessObject = moddleElement || getBusinessObject$1(element);
84341
84550
 
84342
84551
  const failedJobRetryTimeCycle = getFailedJobRetryTimeCycle(element);
84343
84552
 
84344
84553
  if (
84345
- !is$1(element, 'camunda:AsyncCapable')
84346
- || !is$1(businessObject, 'camunda:AsyncCapable')
84554
+ !is$4(element, 'camunda:AsyncCapable')
84555
+ || !is$4(businessObject, 'camunda:AsyncCapable')
84347
84556
  || (asyncAfter !== false && asyncBefore !== false)
84348
84557
  || !failedJobRetryTimeCycle
84349
84558
  || getTimerEventDefinition$1(element)
@@ -84384,7 +84593,7 @@
84384
84593
  }
84385
84594
 
84386
84595
  function getEventDefinition$3(element, type) {
84387
- const businessObject = getBusinessObject(element);
84596
+ const businessObject = getBusinessObject$1(element);
84388
84597
 
84389
84598
  const eventDefinitions = businessObject.get('eventDefinitions');
84390
84599
 
@@ -84393,7 +84602,7 @@
84393
84602
  }
84394
84603
 
84395
84604
  return eventDefinitions.find((eventDefinition) => {
84396
- return is$1(eventDefinition, type);
84605
+ return is$4(eventDefinition, type);
84397
84606
  });
84398
84607
  }
84399
84608
 
@@ -84404,7 +84613,7 @@
84404
84613
  * Camunda BPMN specific behavior ensuring camunda:exclusive is set to true if
84405
84614
  * camunda:asyncBefore or camunda:asyncAfter is set to false.
84406
84615
  */
84407
- class UpdateCamundaExclusiveBehavior extends CommandInterceptor {
84616
+ class UpdateCamundaExclusiveBehavior extends CommandInterceptor$2 {
84408
84617
  constructor(eventBus) {
84409
84618
  super(eventBus);
84410
84619
 
@@ -84418,13 +84627,13 @@
84418
84627
  properties = {}
84419
84628
  } = context;
84420
84629
 
84421
- const businessObject = moddleElement || getBusinessObject(element);
84630
+ const businessObject = moddleElement || getBusinessObject$1(element);
84422
84631
 
84423
84632
  const asyncAfter = properties[ 'camunda:asyncAfter' ],
84424
84633
  asyncBefore = properties[ 'camunda:asyncBefore' ];
84425
84634
 
84426
- if (!is$1(element, 'camunda:AsyncCapable')
84427
- || !is$1(businessObject, 'camunda:AsyncCapable')
84635
+ if (!is$4(element, 'camunda:AsyncCapable')
84636
+ || !is$4(businessObject, 'camunda:AsyncCapable')
84428
84637
  || (asyncAfter !== false && asyncBefore !== false)
84429
84638
  || isExclusive$2(businessObject)
84430
84639
  || (isAsyncAfter$4(businessObject) && asyncAfter !== false)
@@ -84480,7 +84689,7 @@
84480
84689
  /**
84481
84690
  * Camunda BPMN specific behavior ensuring empty camunda:InputOutput is removed.
84482
84691
  */
84483
- class UpdateInputOutputBehavior extends CommandInterceptor {
84692
+ class UpdateInputOutputBehavior extends CommandInterceptor$2 {
84484
84693
  constructor(commandStack, eventBus) {
84485
84694
  super(eventBus);
84486
84695
 
@@ -84490,12 +84699,12 @@
84490
84699
  moddleElement
84491
84700
  } = context;
84492
84701
 
84493
- if (!is$1(moddleElement, 'camunda:InputOutput')) {
84702
+ if (!is$4(moddleElement, 'camunda:InputOutput')) {
84494
84703
  return;
84495
84704
  }
84496
84705
 
84497
84706
  if (isInputOutputEmpty(moddleElement)) {
84498
- removeExtensionElements$1(element, getBusinessObject(element), moddleElement, commandStack);
84707
+ removeExtensionElements$1(element, getBusinessObject$1(element), moddleElement, commandStack);
84499
84708
  }
84500
84709
  }, true);
84501
84710
  }
@@ -84513,7 +84722,7 @@
84513
84722
  * Camunda BPMN specific camunda:resultVariable behavior ensuring
84514
84723
  * camunda:mapDecisionResult is removed when camunda:resultVariable is removed.
84515
84724
  */
84516
- class UpdateResultVariableBehavior extends CommandInterceptor {
84725
+ class UpdateResultVariableBehavior extends CommandInterceptor$2 {
84517
84726
  constructor(eventBus) {
84518
84727
  super(eventBus);
84519
84728
 
@@ -84527,11 +84736,11 @@
84527
84736
  properties
84528
84737
  } = context;
84529
84738
 
84530
- const businessObject = moddleElement || getBusinessObject(element);
84739
+ const businessObject = moddleElement || getBusinessObject$1(element);
84531
84740
 
84532
84741
  if (
84533
- is$1(element, 'camunda:DmnCapable')
84534
- && is$1(businessObject, 'camunda:DmnCapable')
84742
+ is$4(element, 'camunda:DmnCapable')
84743
+ && is$4(businessObject, 'camunda:DmnCapable')
84535
84744
  && has$2(properties, 'camunda:resultVariable')
84536
84745
  && isEmpty(properties[ 'camunda:resultVariable' ])
84537
84746
  ) {
@@ -84555,7 +84764,7 @@
84555
84764
  /**
84556
84765
  * Camunda BPMN specific user task forms behavior.
84557
84766
  */
84558
- class UserTaskFormsBehavior extends CommandInterceptor {
84767
+ class UserTaskFormsBehavior extends CommandInterceptor$2 {
84559
84768
  constructor(eventBus) {
84560
84769
  super(eventBus);
84561
84770
 
@@ -84575,7 +84784,7 @@
84575
84784
  properties
84576
84785
  } = context;
84577
84786
 
84578
- const businessObject = moddleElement || getBusinessObject(element);
84787
+ const businessObject = moddleElement || getBusinessObject$1(element);
84579
84788
 
84580
84789
  if (has$2(properties, 'camunda:formKey')) {
84581
84790
  Object.assign(properties, {
@@ -84621,7 +84830,7 @@
84621
84830
  * 2. Updates camunda:FormData#businessKey if camunda:FormField#id is changed.
84622
84831
  * 3. Removes camunda:FormData#businessKey if camunda:FormField is removed.
84623
84832
  */
84624
- class UserTaskFormsBehavior$1 extends CommandInterceptor {
84833
+ class UserTaskFormsBehavior$1 extends CommandInterceptor$2 {
84625
84834
  constructor(eventBus, modeling) {
84626
84835
  super(eventBus);
84627
84836
 
@@ -84635,7 +84844,7 @@
84635
84844
  properties
84636
84845
  } = context;
84637
84846
 
84638
- if (!is$1(moddleElement, 'camunda:FormField')) {
84847
+ if (!is$4(moddleElement, 'camunda:FormField')) {
84639
84848
  return;
84640
84849
  }
84641
84850
 
@@ -84657,7 +84866,7 @@
84657
84866
  properties
84658
84867
  } = context;
84659
84868
 
84660
- if (!is$1(moddleElement, 'camunda:FormField')
84869
+ if (!is$4(moddleElement, 'camunda:FormField')
84661
84870
  || (!has$2(properties, 'id') && !has$2(properties, 'camunda:id'))
84662
84871
  ) {
84663
84872
  return;
@@ -84682,7 +84891,7 @@
84682
84891
  properties
84683
84892
  } = context;
84684
84893
 
84685
- if (!is$1(moddleElement, 'camunda:FormData') || !has$2(properties, 'fields')) {
84894
+ if (!is$4(moddleElement, 'camunda:FormData') || !has$2(properties, 'fields')) {
84686
84895
  return;
84687
84896
  }
84688
84897
 
@@ -84715,7 +84924,7 @@
84715
84924
  }
84716
84925
 
84717
84926
  function getFormData$4(element) {
84718
- const businessObject = getBusinessObject(element),
84927
+ const businessObject = getBusinessObject$1(element),
84719
84928
  extensionElements = businessObject.get('extensionElements');
84720
84929
 
84721
84930
  if (!extensionElements) {
@@ -84725,7 +84934,7 @@
84725
84934
  const values = extensionElements.get('values');
84726
84935
 
84727
84936
  return values.find((value) => {
84728
- return is$1(value, 'camunda:FormData');
84937
+ return is$4(value, 'camunda:FormData');
84729
84938
  });
84730
84939
  }
84731
84940
 
@@ -84748,8 +84957,8 @@
84748
84957
  userTaskGeneratedFormsBehavior: [ 'type', UserTaskFormsBehavior$1 ]
84749
84958
  };
84750
84959
 
84751
- var isFunction$1 = require$$0.isFunction,
84752
- isObject$1 = require$$0.isObject,
84960
+ var isFunction$2 = require$$0.isFunction,
84961
+ isObject$2 = require$$0.isObject,
84753
84962
  some$1 = require$$0.some;
84754
84963
 
84755
84964
  var WILDCARD = '*';
@@ -84775,14 +84984,14 @@
84775
84984
  CopyPasteBehavior.prototype.canCopyProperty = function(property, parent) {
84776
84985
 
84777
84986
  // (1) check wether property is allowed in parent
84778
- if (isObject$1(property) && !isAllowedInParent(property, parent)) {
84987
+ if (isObject$2(property) && !isAllowedInParent(property, parent)) {
84779
84988
 
84780
84989
  return false;
84781
84990
  }
84782
84991
 
84783
84992
  // (2) check more complex scenarios
84784
84993
 
84785
- if (is$4(property, 'camunda:InputOutput') && !this.canHostInputOutput(parent)) {
84994
+ if (is$5(property, 'camunda:InputOutput') && !this.canHostInputOutput(parent)) {
84786
84995
  return false;
84787
84996
  }
84788
84997
 
@@ -84790,7 +84999,7 @@
84790
84999
  return false;
84791
85000
  }
84792
85001
 
84793
- if (is$4(property, 'camunda:In') && !this.canHostIn(parent)) {
85002
+ if (is$5(property, 'camunda:In') && !this.canHostIn(parent)) {
84794
85003
  return false;
84795
85004
  }
84796
85005
  };
@@ -84815,7 +85024,7 @@
84815
85024
  return false;
84816
85025
  }
84817
85026
 
84818
- if (is$4(flowNode, 'bpmn:SubProcess') && flowNode.get('triggeredByEvent')) {
85027
+ if (is$5(flowNode, 'bpmn:SubProcess') && flowNode.get('triggeredByEvent')) {
84819
85028
  return false;
84820
85029
  }
84821
85030
 
@@ -84826,7 +85035,7 @@
84826
85035
 
84827
85036
  var serviceTaskLike = getParent$2(parent, 'camunda:ServiceTaskLike');
84828
85037
 
84829
- if (is$4(serviceTaskLike, 'bpmn:MessageEventDefinition')) {
85038
+ if (is$5(serviceTaskLike, 'bpmn:MessageEventDefinition')) {
84830
85039
 
84831
85040
  // only allow on throw and end events
84832
85041
  return (
@@ -84864,13 +85073,13 @@
84864
85073
 
84865
85074
  // helpers //////////
84866
85075
 
84867
- function is$4(element, type) {
84868
- return element && isFunction$1(element.$instanceOf) && element.$instanceOf(type);
85076
+ function is$5(element, type) {
85077
+ return element && isFunction$2(element.$instanceOf) && element.$instanceOf(type);
84869
85078
  }
84870
85079
 
84871
85080
  function isAny$1(element, types) {
84872
85081
  return some$1(types, function(t) {
84873
- return is$4(element, t);
85082
+ return is$5(element, t);
84874
85083
  });
84875
85084
  }
84876
85085
 
@@ -84879,7 +85088,7 @@
84879
85088
  return element.$parent;
84880
85089
  }
84881
85090
 
84882
- if (is$4(element, type)) {
85091
+ if (is$5(element, type)) {
84883
85092
  return element;
84884
85093
  }
84885
85094
 
@@ -84920,13 +85129,13 @@
84920
85129
  var find$1 = require$$0.find,
84921
85130
  matchPattern$1 = require$$0.matchPattern;
84922
85131
 
84923
- var CommandInterceptor$2 = require$$0$1.default;
85132
+ var CommandInterceptor$3 = require$$0$1.default;
84924
85133
 
84925
85134
  var collectionAdd = require$$2.add,
84926
85135
  collectionRemove = require$$2.remove;
84927
85136
 
84928
- var getBusinessObject$1 = require$$1.getBusinessObject,
84929
- is$5 = require$$1.is;
85137
+ var getBusinessObject$2 = require$$1.getBusinessObject,
85138
+ is$6 = require$$1.is;
84930
85139
 
84931
85140
  var LOW_PRIORITY$u = 500;
84932
85141
 
@@ -84939,7 +85148,7 @@
84939
85148
  bpmnjs, eventBus, injector, moddleCopy, bpmnFactory
84940
85149
  ) {
84941
85150
 
84942
- injector.invoke(CommandInterceptor$2, this);
85151
+ injector.invoke(CommandInterceptor$3, this);
84943
85152
 
84944
85153
 
84945
85154
  function hasRootElement(rootElement) {
@@ -84954,7 +85163,7 @@
84954
85163
  this.executed('shape.create', function(context) {
84955
85164
 
84956
85165
  var shape = context.shape,
84957
- businessObject = getBusinessObject$1(shape);
85166
+ businessObject = getBusinessObject$2(shape);
84958
85167
 
84959
85168
  if (!canHaveNestedRootElementReference(businessObject)) {
84960
85169
  return;
@@ -84996,7 +85205,7 @@
84996
85205
  eventBus.on('copyPaste.copyElement', function(context) {
84997
85206
  var descriptor = context.descriptor,
84998
85207
  element = context.element,
84999
- businessObject = getBusinessObject$1(element);
85208
+ businessObject = getBusinessObject$2(element);
85000
85209
 
85001
85210
  if (!canHaveNestedRootElementReference(businessObject)) {
85002
85211
  return;
@@ -85054,7 +85263,7 @@
85054
85263
  'bpmnFactory'
85055
85264
  ];
85056
85265
 
85057
- inherits_browser(CopyPasteRootElementBehavior, CommandInterceptor$2);
85266
+ inherits_browser(CopyPasteRootElementBehavior, CommandInterceptor$3);
85058
85267
 
85059
85268
  var CopyPasteRootElementBehavior_1 = CopyPasteRootElementBehavior;
85060
85269
 
@@ -85062,19 +85271,19 @@
85062
85271
  // helpers //////////////////////////
85063
85272
 
85064
85273
  function getReferencingElement(element) {
85065
- if (is$5(element, 'bpmn:ServiceTask')) {
85274
+ if (is$6(element, 'bpmn:ServiceTask')) {
85066
85275
  return 'camunda:ErrorEventDefinition';
85067
85276
  }
85068
85277
  }
85069
85278
 
85070
85279
  function getRootElementReferencePropertyName(bo) {
85071
- if (is$5(bo, 'camunda:ErrorEventDefinition')) {
85280
+ if (is$6(bo, 'camunda:ErrorEventDefinition')) {
85072
85281
  return 'errorRef';
85073
85282
  }
85074
85283
  }
85075
85284
 
85076
85285
  function canHaveNestedRootElementReference(bo) {
85077
- var isExternalServiceTask = is$5(bo, 'bpmn:ServiceTask') && bo.type === 'external';
85286
+ var isExternalServiceTask = is$6(bo, 'bpmn:ServiceTask') && bo.type === 'external';
85078
85287
  return isExternalServiceTask;
85079
85288
  }
85080
85289
 
@@ -85102,7 +85311,7 @@
85102
85311
 
85103
85312
  if (extensionElements) {
85104
85313
  filteredExtensionElements = extensionElements.values.filter(function(element) {
85105
- return is$5(element, extensionElementType);
85314
+ return is$6(element, extensionElementType);
85106
85315
  });
85107
85316
  }
85108
85317
 
@@ -85139,9 +85348,9 @@
85139
85348
  return extensionElements.values.indexOf(extensionElement);
85140
85349
  }
85141
85350
 
85142
- var CommandInterceptor$3 = require$$0$1.default;
85143
- var is$6 = require$$1.is;
85144
- var getBusinessObject$2 = require$$1.getBusinessObject;
85351
+ var CommandInterceptor$4 = require$$0$1.default;
85352
+ var is$7 = require$$1.is;
85353
+ var getBusinessObject$3 = require$$1.getBusinessObject;
85145
85354
 
85146
85355
  /**
85147
85356
  * Remove `camunda:initiator` property when a startEvent is moved to or created within a subProcess.
@@ -85150,19 +85359,19 @@
85150
85359
  modeling, injector
85151
85360
  ) {
85152
85361
 
85153
- injector.invoke(CommandInterceptor$3, this);
85362
+ injector.invoke(CommandInterceptor$4, this);
85154
85363
 
85155
85364
  this.postExecuted(['shape.create','shape.move'], function(context) {
85156
85365
 
85157
85366
  var shape = context.shape,
85158
85367
  newParent = context.newParent || context.parent,
85159
- businessObject = getBusinessObject$2(shape);
85368
+ businessObject = getBusinessObject$3(shape);
85160
85369
 
85161
85370
  // if shape is a startEvent and has an initiator proterty
85162
- if (is$6(shape, 'bpmn:StartEvent') && businessObject.get('camunda:initiator') !== undefined) {
85371
+ if (is$7(shape, 'bpmn:StartEvent') && businessObject.get('camunda:initiator') !== undefined) {
85163
85372
 
85164
85373
  // if subProcess becomes the new parent
85165
- if ((is$6(newParent, 'bpmn:SubProcess'))) {
85374
+ if ((is$7(newParent, 'bpmn:SubProcess'))) {
85166
85375
 
85167
85376
  // remove initiator property
85168
85377
  modeling.updateProperties(shape, { 'camunda:initiator': undefined });
@@ -85178,13 +85387,13 @@
85178
85387
  'injector',
85179
85388
  ];
85180
85389
 
85181
- inherits_browser(RemoveInitiatorBehaviour, CommandInterceptor$3);
85390
+ inherits_browser(RemoveInitiatorBehaviour, CommandInterceptor$4);
85182
85391
 
85183
85392
  var RemoveInitiatorBehaviour_1 = RemoveInitiatorBehaviour;
85184
85393
 
85185
- var CommandInterceptor$4 = require$$0$1.default;
85186
- var is$7 = require$$1.is;
85187
- var getBusinessObject$3 = require$$1.getBusinessObject;
85394
+ var CommandInterceptor$5 = require$$0$1.default;
85395
+ var is$8 = require$$1.is;
85396
+ var getBusinessObject$4 = require$$1.getBusinessObject;
85188
85397
 
85189
85398
  /**
85190
85399
  * Remove 'camunda:variableEvents' property when a startEvent is moved out of an event subProcess.
@@ -85192,27 +85401,27 @@
85192
85401
  function RemoveVariableEventBehaviour(
85193
85402
  modeling, injector, bpmnFactory, moddleCopy
85194
85403
  ) {
85195
- injector.invoke(CommandInterceptor$4, this);
85404
+ injector.invoke(CommandInterceptor$5, this);
85196
85405
 
85197
85406
  this.postExecuted(['shape.move', 'shape.create'], function(context) {
85198
85407
 
85199
85408
  var newParent = context.newParent || context.parent,
85200
- newParentBusinessObject = getBusinessObject$3(newParent),
85409
+ newParentBusinessObject = getBusinessObject$4(newParent),
85201
85410
  shape = context.shape,
85202
- shapeBusinessObject = getBusinessObject$3(shape),
85411
+ shapeBusinessObject = getBusinessObject$4(shape),
85203
85412
  eventDefinitions, definitionsCopy;
85204
85413
 
85205
85414
  var update = false;
85206
85415
 
85207
- if (is$7(shape, 'bpmn:StartEvent')) {
85416
+ if (is$8(shape, 'bpmn:StartEvent')) {
85208
85417
 
85209
- if (!(is$7(newParent, 'bpmn:SubProcess') && newParentBusinessObject.get('triggeredByEvent'))) {
85418
+ if (!(is$8(newParent, 'bpmn:SubProcess') && newParentBusinessObject.get('triggeredByEvent'))) {
85210
85419
 
85211
85420
  eventDefinitions = shapeBusinessObject.get('eventDefinitions');
85212
85421
  definitionsCopy = eventDefinitions.slice();
85213
85422
 
85214
85423
  definitionsCopy.forEach(function(eventDefinition, index) {
85215
- if (!is$7(eventDefinition, 'bpmn:ConditionalEventDefinition')) {
85424
+ if (!is$8(eventDefinition, 'bpmn:ConditionalEventDefinition')) {
85216
85425
  return;
85217
85426
  }
85218
85427
 
@@ -85244,7 +85453,7 @@
85244
85453
  'moddleCopy'
85245
85454
  ];
85246
85455
 
85247
- inherits_browser(RemoveVariableEventBehaviour, CommandInterceptor$4);
85456
+ inherits_browser(RemoveVariableEventBehaviour, CommandInterceptor$5);
85248
85457
 
85249
85458
  var RemoveVariableEventBehaviour_1 = RemoveVariableEventBehaviour;
85250
85459