camunda-bpmn-js 5.15.0 → 5.16.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.
@@ -69532,6 +69532,7 @@
69532
69532
  this.deserialize = config.deserialize || (() => {
69533
69533
  throw new Error("This node type doesn't define a deserialize function");
69534
69534
  });
69535
+ this.combine = config.combine || null;
69535
69536
  }
69536
69537
  /**
69537
69538
  This is meant to be used with
@@ -69796,7 +69797,10 @@
69796
69797
  if (add) {
69797
69798
  if (!newProps)
69798
69799
  newProps = Object.assign({}, type.props);
69799
- newProps[add[0].id] = add[1];
69800
+ let value = add[1], prop = add[0];
69801
+ if (prop.combine && prop.id in newProps)
69802
+ value = prop.combine(newProps[prop.id], value);
69803
+ newProps[prop.id] = value;
69800
69804
  }
69801
69805
  }
69802
69806
  newTypes.push(newProps ? new NodeType(type.name, newProps, type.id, type.flags) : type);
@@ -70269,6 +70273,7 @@
70269
70273
  get lastChild() { return this.nextChild(this._tree.children.length - 1, -1, 0, 4 /* Side.DontCare */); }
70270
70274
  childAfter(pos) { return this.nextChild(0, 1, pos, 2 /* Side.After */); }
70271
70275
  childBefore(pos) { return this.nextChild(this._tree.children.length - 1, -1, pos, -2 /* Side.Before */); }
70276
+ prop(prop) { return this._tree.prop(prop); }
70272
70277
  enter(pos, side, mode = 0) {
70273
70278
  let mounted;
70274
70279
  if (!(mode & IterMode.IgnoreOverlays) && (mounted = MountedTree.get(this._tree)) && mounted.overlay) {
@@ -70362,6 +70367,7 @@
70362
70367
  get lastChild() { return this.child(-1, 0, 4 /* Side.DontCare */); }
70363
70368
  childAfter(pos) { return this.child(1, pos, 2 /* Side.After */); }
70364
70369
  childBefore(pos) { return this.child(-1, pos, -2 /* Side.Before */); }
70370
+ prop(prop) { return this.type.prop(prop); }
70365
70371
  enter(pos, side, mode = 0) {
70366
70372
  if (mode & IterMode.ExcludeBuffers)
70367
70373
  return null;
@@ -70779,7 +70785,7 @@
70779
70785
  function takeNode(parentStart, minPos, children, positions, inRepeat, depth) {
70780
70786
  let { id, start, end, size } = cursor;
70781
70787
  let lookAheadAtStart = lookAhead, contextAtStart = contextHash;
70782
- while (size < 0) {
70788
+ if (size < 0) {
70783
70789
  cursor.next();
70784
70790
  if (size == -1 /* SpecialRecord.Reuse */) {
70785
70791
  let node = reused[id];
@@ -70943,7 +70949,7 @@
70943
70949
  fork.next();
70944
70950
  while (fork.pos > startPos) {
70945
70951
  if (fork.size < 0) {
70946
- if (fork.size == -3 /* SpecialRecord.ContextChange */)
70952
+ if (fork.size == -3 /* SpecialRecord.ContextChange */ || fork.size == -4 /* SpecialRecord.LookAhead */)
70947
70953
  localSkipped += 4;
70948
70954
  else
70949
70955
  break scan;
@@ -71332,8 +71338,15 @@
71332
71338
  }
71333
71339
  else if (!cursor.type.isAnonymous && (nest = this.nest(cursor, this.input)) &&
71334
71340
  (cursor.from < cursor.to || !nest.overlay)) {
71335
- if (!cursor.tree)
71341
+ if (!cursor.tree) {
71336
71342
  materialize(cursor);
71343
+ // materialize create one more level of nesting
71344
+ // we need to add depth to active overlay for going backwards
71345
+ if (overlay)
71346
+ overlay.depth++;
71347
+ if (covered)
71348
+ covered.depth++;
71349
+ }
71337
71350
  let oldMounts = fragmentCursor.findMounts(cursor.from, nest.parser);
71338
71351
  if (typeof nest.overlay == "function") {
71339
71352
  overlay = new ActiveOverlay(nest.parser, nest.overlay, oldMounts, this.inner.length, cursor.from, cursor.tree, overlay);
@@ -71745,9 +71758,7 @@
71745
71758
  var _a;
71746
71759
  let depth = action >> 19 /* Action.ReduceDepthShift */, type = action & 65535 /* Action.ValueMask */;
71747
71760
  let { parser } = this.p;
71748
- let lookaheadRecord = this.reducePos < this.pos - 25 /* Lookahead.Margin */;
71749
- if (lookaheadRecord)
71750
- this.setLookAhead(this.pos);
71761
+ let lookaheadRecord = this.reducePos < this.pos - 25 /* Lookahead.Margin */ && this.setLookAhead(this.pos);
71751
71762
  let dPrec = parser.dynamicPrecedence(type);
71752
71763
  if (dPrec)
71753
71764
  this.score += dPrec;
@@ -71825,7 +71836,7 @@
71825
71836
  }
71826
71837
  else { // There may be skipped nodes that have to be moved forward
71827
71838
  let index = this.buffer.length;
71828
- if (index > 0 && this.buffer[index - 4] != 0 /* Term.Err */) {
71839
+ if (index > 0 && (this.buffer[index - 4] != 0 /* Term.Err */ || this.buffer[index - 1] < 0)) {
71829
71840
  let mustMove = false;
71830
71841
  for (let scan = index; scan > 0 && this.buffer[scan - 2] > end; scan -= 4) {
71831
71842
  if (this.buffer[scan - 1] >= 0) {
@@ -72138,10 +72149,11 @@
72138
72149
  @internal
72139
72150
  */
72140
72151
  setLookAhead(lookAhead) {
72141
- if (lookAhead > this.lookAhead) {
72142
- this.emitLookAhead();
72143
- this.lookAhead = lookAhead;
72144
- }
72152
+ if (lookAhead <= this.lookAhead)
72153
+ return false;
72154
+ this.emitLookAhead();
72155
+ this.lookAhead = lookAhead;
72156
+ return true;
72145
72157
  }
72146
72158
  /**
72147
72159
  @internal
@@ -72970,8 +72982,10 @@
72970
72982
  }
72971
72983
  }
72972
72984
  }
72973
- if (newStacks.length > 12 /* Rec.MaxStackCount */)
72985
+ if (newStacks.length > 12 /* Rec.MaxStackCount */) {
72986
+ newStacks.sort((a, b) => b.score - a.score);
72974
72987
  newStacks.splice(12 /* Rec.MaxStackCount */, newStacks.length - 12 /* Rec.MaxStackCount */);
72988
+ }
72975
72989
  }
72976
72990
  this.minStackPos = newStacks[0].pos;
72977
72991
  for (let i = 1; i < newStacks.length; i++)
@@ -73072,7 +73086,7 @@
73072
73086
  continue;
73073
73087
  }
73074
73088
  let force = stack.split(), forceBase = base;
73075
- for (let j = 0; force.forceReduce() && j < 10 /* Rec.ForceReduceLimit */; j++) {
73089
+ for (let j = 0; j < 10 /* Rec.ForceReduceLimit */ && force.forceReduce(); j++) {
73076
73090
  if (verbose)
73077
73091
  console.log(forceBase + this.stackID(force) + " (via force-reduce)");
73078
73092
  let done = this.advanceFully(force, newStacks);
@@ -73633,7 +73647,7 @@
73633
73647
  For example:
73634
73648
 
73635
73649
  ```javascript
73636
- parser.withProps(
73650
+ parser.configure({props: [
73637
73651
  styleTags({
73638
73652
  // Style Number and BigNumber nodes
73639
73653
  "Number BigNumber": tags.number,
@@ -73648,7 +73662,7 @@
73648
73662
  // Style the node named "/" as punctuation
73649
73663
  '"/"': tags.punctuation
73650
73664
  })
73651
- )
73665
+ ]})
73652
73666
  ```
73653
73667
  */
73654
73668
  function styleTags(spec) {
@@ -73690,7 +73704,30 @@
73690
73704
  }
73691
73705
  return ruleNodeProp.add(byName);
73692
73706
  }
73693
- const ruleNodeProp = new NodeProp();
73707
+ const ruleNodeProp = new NodeProp({
73708
+ combine(a, b) {
73709
+ let cur, root, take;
73710
+ while (a || b) {
73711
+ if (!a || b && a.depth >= b.depth) {
73712
+ take = b;
73713
+ b = b.next;
73714
+ }
73715
+ else {
73716
+ take = a;
73717
+ a = a.next;
73718
+ }
73719
+ if (cur && cur.mode == take.mode && !take.context && !cur.context)
73720
+ continue;
73721
+ let copy = new Rule(take.tags, take.mode, take.context);
73722
+ if (cur)
73723
+ cur.next = copy;
73724
+ else
73725
+ root = copy;
73726
+ cur = copy;
73727
+ }
73728
+ return root;
73729
+ }
73730
+ });
73694
73731
  class Rule {
73695
73732
  constructor(tags, mode, context, next) {
73696
73733
  this.tags = tags;
@@ -108019,16 +108056,16 @@
108019
108056
  parserDialect: 'camunda'
108020
108057
  };
108021
108058
 
108022
- /**
108023
- * @param {Object} props
108024
- * @param {djs.model.Base|Array<djs.model.Base>} [props.element]
108025
- * @param {Injector} props.injector
108026
- * @param { (djs.model.Base) => Array<PropertiesProvider> } props.getProviders
108027
- * @param {Object} props.layoutConfig
108028
- * @param {Object} props.descriptionConfig
108029
- * @param {Object} props.tooltipConfig
108030
- * @param {HTMLElement} props.feelPopupContainer
108031
- * @param {Function} props.getFeelPopupLinks
108059
+ /**
108060
+ * @param {Object} props
108061
+ * @param {djs.model.Base|Array<djs.model.Base>} [props.element]
108062
+ * @param {Injector} props.injector
108063
+ * @param { (djs.model.Base) => Array<PropertiesProvider> } props.getProviders
108064
+ * @param {Object} props.layoutConfig
108065
+ * @param {Object} props.descriptionConfig
108066
+ * @param {Object} props.tooltipConfig
108067
+ * @param {HTMLElement} props.feelPopupContainer
108068
+ * @param {Function} props.getFeelPopupLinks
108032
108069
  */
108033
108070
  function BpmnPropertiesPanel(props) {
108034
108071
  const {
@@ -108050,8 +108087,8 @@
108050
108087
  });
108051
108088
  const selectedElement = state.selectedElement;
108052
108089
 
108053
- /**
108054
- * @param {djs.model.Base | Array<djs.model.Base>} element
108090
+ /**
108091
+ * @param {djs.model.Base | Array<djs.model.Base>} element
108055
108092
  */
108056
108093
  const _update = element => {
108057
108094
  if (!element) {
@@ -108113,17 +108150,17 @@
108113
108150
  };
108114
108151
  }, [selectedElement]);
108115
108152
 
108116
- // (2c) root element changed
108153
+ // (2c) import done
108117
108154
  p(() => {
108118
- const onRootAdded = e => {
108119
- const element = e.element;
108120
- _update(element);
108155
+ const onImportDone = () => {
108156
+ const rootElement = canvas.getRootElement();
108157
+ _update(rootElement);
108121
108158
  };
108122
- eventBus.on('root.added', onRootAdded);
108159
+ eventBus.on('import.done', onImportDone);
108123
108160
  return () => {
108124
- eventBus.off('root.added', onRootAdded);
108161
+ eventBus.off('import.done', onImportDone);
108125
108162
  };
108126
- }, [selectedElement]);
108163
+ }, []);
108127
108164
 
108128
108165
  // (2d) provided entries changed
108129
108166
  p(() => {
@@ -108239,10 +108276,10 @@
108239
108276
 
108240
108277
  const DEFAULT_PRIORITY = 1000;
108241
108278
 
108242
- /**
108243
- * @typedef { import('@bpmn-io/properties-panel').GroupDefinition } GroupDefinition
108244
- * @typedef { import('@bpmn-io/properties-panel').ListGroupDefinition } ListGroupDefinition
108245
- * @typedef { { getGroups: (ModdleElement) => (Array{GroupDefinition|ListGroupDefinition}) => Array{GroupDefinition|ListGroupDefinition}) } PropertiesProvider
108279
+ /**
108280
+ * @typedef { import('@bpmn-io/properties-panel').GroupDefinition } GroupDefinition
108281
+ * @typedef { import('@bpmn-io/properties-panel').ListGroupDefinition } ListGroupDefinition
108282
+ * @typedef { { getGroups: (ModdleElement) => (Array{GroupDefinition|ListGroupDefinition}) => Array{GroupDefinition|ListGroupDefinition}) } PropertiesProvider
108246
108283
  */
108247
108284
 
108248
108285
  class BpmnPropertiesPanelRenderer {
@@ -108281,10 +108318,10 @@
108281
108318
  });
108282
108319
  }
108283
108320
 
108284
- /**
108285
- * Attach the properties panel to a parent node.
108286
- *
108287
- * @param {HTMLElement} container
108321
+ /**
108322
+ * Attach the properties panel to a parent node.
108323
+ *
108324
+ * @param {HTMLElement} container
108288
108325
  */
108289
108326
  attachTo(container) {
108290
108327
  if (!container) {
@@ -108309,8 +108346,8 @@
108309
108346
  this._eventBus.fire('propertiesPanel.attach');
108310
108347
  }
108311
108348
 
108312
- /**
108313
- * Detach the properties panel from its parent node.
108349
+ /**
108350
+ * Detach the properties panel from its parent node.
108314
108351
  */
108315
108352
  detach() {
108316
108353
  const parentNode = this._container.parentNode;
@@ -108320,11 +108357,11 @@
108320
108357
  }
108321
108358
  }
108322
108359
 
108323
- /**
108324
- * Register a new properties provider to the properties panel.
108325
- *
108326
- * @param {Number} [priority]
108327
- * @param {PropertiesProvider} provider
108360
+ /**
108361
+ * Register a new properties provider to the properties panel.
108362
+ *
108363
+ * @param {Number} [priority]
108364
+ * @param {PropertiesProvider} provider
108328
108365
  */
108329
108366
  registerProvider(priority, provider) {
108330
108367
  if (!provider) {
@@ -108341,9 +108378,9 @@
108341
108378
  this._eventBus.fire('propertiesPanel.providersChanged');
108342
108379
  }
108343
108380
 
108344
- /**
108345
- * Updates the layout of the properties panel.
108346
- * @param {Object} layout
108381
+ /**
108382
+ * Updates the layout of the properties panel.
108383
+ * @param {Object} layout
108347
108384
  */
108348
108385
  setLayout(layout) {
108349
108386
  this._eventBus.fire('propertiesPanel.setLayout', {
@@ -108393,12 +108430,12 @@
108393
108430
  return element && element.isImplicit;
108394
108431
  }
108395
108432
 
108396
- /**
108397
- * Setup keyboard bindings (undo, redo) on the given container.
108398
- *
108399
- * @param {Element} container
108400
- * @param {EventBus} eventBus
108401
- * @param {CommandStack} commandStack
108433
+ /**
108434
+ * Setup keyboard bindings (undo, redo) on the given container.
108435
+ *
108436
+ * @param {Element} container
108437
+ * @param {EventBus} eventBus
108438
+ * @param {CommandStack} commandStack
108402
108439
  */
108403
108440
  function setupKeyboard(container, eventBus, commandStack) {
108404
108441
  function cancel(event) {
@@ -108423,14 +108460,14 @@
108423
108460
  });
108424
108461
  }
108425
108462
 
108426
- /**
108427
- * A handler that combines and executes multiple commands.
108428
- *
108429
- * All updates are bundled on the command stack and executed in one step.
108430
- * This also makes it possible to revert the changes in one step.
108431
- *
108432
- * Example use case: remove the camunda:formKey attribute and in addition
108433
- * add all form fields needed for the camunda:formData property.
108463
+ /**
108464
+ * A handler that combines and executes multiple commands.
108465
+ *
108466
+ * All updates are bundled on the command stack and executed in one step.
108467
+ * This also makes it possible to revert the changes in one step.
108468
+ *
108469
+ * Example use case: remove the camunda:formKey attribute and in addition
108470
+ * add all form fields needed for the camunda:formData property.
108434
108471
  */
108435
108472
  class MultiCommandHandler {
108436
108473
  constructor(commandStack) {
@@ -108466,15 +108503,15 @@
108466
108503
  propertiesPanel: ['type', BpmnPropertiesPanelRenderer]
108467
108504
  };
108468
108505
 
108469
- /**
108470
- * Create a new element and (optionally) set its parent.
108471
- *
108472
- * @param {string} type
108473
- * @param {Object} properties
108474
- * @param {import('bpmn-js/lib/model/Types').ModdleElement} parent
108475
- * @param {import('bpmn-js/lib/features/modeling/BpmnFactory').default} bpmnFactory
108476
- *
108477
- * @returns {import('bpmn-js/lib/model/Types').ModdleElement}
108506
+ /**
108507
+ * Create a new element and (optionally) set its parent.
108508
+ *
108509
+ * @param {string} type
108510
+ * @param {Object} properties
108511
+ * @param {import('bpmn-js/lib/model/Types').ModdleElement} parent
108512
+ * @param {import('bpmn-js/lib/features/modeling/BpmnFactory').default} bpmnFactory
108513
+ *
108514
+ * @returns {import('bpmn-js/lib/model/Types').ModdleElement}
108478
108515
  */
108479
108516
  function createElement(type, properties, parent, bpmnFactory) {
108480
108517
  const element = bpmnFactory.create(type, properties);
@@ -108484,8 +108521,8 @@
108484
108521
  return element;
108485
108522
  }
108486
108523
 
108487
- /**
108488
- * generate a semantic id with given prefix
108524
+ /**
108525
+ * generate a semantic id with given prefix
108489
108526
  */
108490
108527
  function nextId(prefix) {
108491
108528
  const ids = new Ids$1([32, 32, 1]);
@@ -108511,32 +108548,32 @@
108511
108548
  return elements.find(element => element.id === id);
108512
108549
  }
108513
108550
 
108514
- /**
108515
- * createOrUpdateFormalExpression - upserts a specific formal expression
108516
- *
108517
- * If the value is falsy, the formal expression is removed.
108518
- *
108519
- * @param {djs.model.Base} element
108520
- * @param {ModdleElement} moddleElement
108521
- * @param {string} propertyName
108522
- * @param {string} newValue
108523
- * @param {BpmnFactory} bpmnFactory
108524
- * @param {CommandStack} commandStack
108551
+ /**
108552
+ * createOrUpdateFormalExpression - upserts a specific formal expression
108553
+ *
108554
+ * If the value is falsy, the formal expression is removed.
108555
+ *
108556
+ * @param {djs.model.Base} element
108557
+ * @param {ModdleElement} moddleElement
108558
+ * @param {string} propertyName
108559
+ * @param {string} newValue
108560
+ * @param {BpmnFactory} bpmnFactory
108561
+ * @param {CommandStack} commandStack
108525
108562
  */
108526
108563
  function createOrUpdateFormalExpression(element, moddleElement, propertyName, newValue, bpmnFactory, commandStack) {
108527
108564
  return commandStack.execute('element.updateModdleProperties', createOrUpdateFormalExpressionCommand(element, moddleElement, propertyName, newValue, bpmnFactory));
108528
108565
  }
108529
108566
 
108530
- /**
108531
- * createOrUpdateFormalExpressionCommand - creates a command to upsert a specific formal expression
108532
- *
108533
- * If the value is falsy, the formal expression is removed.
108534
- *
108535
- * @param {djs.model.Base} element
108536
- * @param {ModdleElement} moddleElement
108537
- * @param {string} propertyName
108538
- * @param {string} newValue
108539
- * @param {BpmnFactory} bpmnFactory
108567
+ /**
108568
+ * createOrUpdateFormalExpressionCommand - creates a command to upsert a specific formal expression
108569
+ *
108570
+ * If the value is falsy, the formal expression is removed.
108571
+ *
108572
+ * @param {djs.model.Base} element
108573
+ * @param {ModdleElement} moddleElement
108574
+ * @param {string} propertyName
108575
+ * @param {string} newValue
108576
+ * @param {BpmnFactory} bpmnFactory
108540
108577
  */
108541
108578
  function createOrUpdateFormalExpressionCommand(element, moddleElement, propertyName, newValue, bpmnFactory) {
108542
108579
  const expressionProps = {};
@@ -108572,12 +108609,12 @@
108572
108609
  };
108573
108610
  }
108574
108611
 
108575
- /**
108576
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
108612
+ /**
108613
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
108577
108614
  */
108578
108615
 
108579
- /**
108580
- * @returns {Array<Entry>} entries
108616
+ /**
108617
+ * @returns {Array<Entry>} entries
108581
108618
  */
108582
108619
  function AdHocCompletionProps$1(props) {
108583
108620
  const {
@@ -108739,12 +108776,12 @@
108739
108776
  return compensateEventDefinition && compensateEventDefinition.get('activityRef');
108740
108777
  }
108741
108778
 
108742
- /**
108743
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
108779
+ /**
108780
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
108744
108781
  */
108745
108782
 
108746
- /**
108747
- * @returns {Array<Entry>} entries
108783
+ /**
108784
+ * @returns {Array<Entry>} entries
108748
108785
  */
108749
108786
  function CompensationProps(props) {
108750
108787
  const {
@@ -108854,12 +108891,12 @@
108854
108891
  return getFlowElements(element, 'bpmn:BoundaryEvent');
108855
108892
  }
108856
108893
 
108857
- /**
108858
- * Checks whether an Activity is attaching a CompensateEvent of the parent container.
108859
- *
108860
- * @param {ModdleElement} activity
108861
- * @param {Array<ModdleElement>} boundaryEvents
108862
- * @returns {Boolean}
108894
+ /**
108895
+ * Checks whether an Activity is attaching a CompensateEvent of the parent container.
108896
+ *
108897
+ * @param {ModdleElement} activity
108898
+ * @param {Array<ModdleElement>} boundaryEvents
108899
+ * @returns {Boolean}
108863
108900
  */
108864
108901
  function hasCompensationEventAttached(activity, boundaryEvents) {
108865
108902
  const {
@@ -108874,15 +108911,15 @@
108874
108911
  });
108875
108912
  }
108876
108913
 
108877
- /**
108878
- * Checks whether an Activity can be compensated. That's the case when it is
108879
- * a) a CallActivity
108880
- * b) a SubProcess, when it is not event based and not a compensation
108881
- * c) any other Activity, when it is attaching a CompensateEvent of the parent container
108882
- *
108883
- * @param {ModdleElement} activity
108884
- * @param {Array<ModdleElement>} boundaryEvents
108885
- * @returns {Boolean}
108914
+ /**
108915
+ * Checks whether an Activity can be compensated. That's the case when it is
108916
+ * a) a CallActivity
108917
+ * b) a SubProcess, when it is not event based and not a compensation
108918
+ * c) any other Activity, when it is attaching a CompensateEvent of the parent container
108919
+ *
108920
+ * @param {ModdleElement} activity
108921
+ * @param {Array<ModdleElement>} boundaryEvents
108922
+ * @returns {Boolean}
108886
108923
  */
108887
108924
  function canBeCompensated(activity, boundaryEvents) {
108888
108925
  return is(activity, 'bpmn:CallActivity') || is(activity, 'bpmn:SubProcess') && !activity.triggeredByEvent && !activity.isForCompensation || hasCompensationEventAttached(activity, boundaryEvents);
@@ -108895,11 +108932,11 @@
108895
108932
  });
108896
108933
  }
108897
108934
 
108898
- /**
108899
- * Retrieves all possible activities to reference for a Compensation.
108900
- *
108901
- * @param {djs.model.Base} element
108902
- * @returns {Array<ModdleElement>}
108935
+ /**
108936
+ * Retrieves all possible activities to reference for a Compensation.
108937
+ *
108938
+ * @param {djs.model.Base} element
108939
+ * @returns {Array<ModdleElement>}
108903
108940
  */
108904
108941
  function findActivityRefs(element) {
108905
108942
  const businessObject = getBusinessObject(element);
@@ -108919,13 +108956,13 @@
108919
108956
  return activities;
108920
108957
  }
108921
108958
 
108922
- /**
108923
- * Retrieves an option label in the form
108924
- * a) with name: "my Task (id=Task_1)"
108925
- * b) without name: "(id=Task_1)"
108926
- *
108927
- * @param {ModdleElement} activity
108928
- * @returns {String}
108959
+ /**
108960
+ * Retrieves an option label in the form
108961
+ * a) with name: "my Task (id=Task_1)"
108962
+ * b) without name: "(id=Task_1)"
108963
+ *
108964
+ * @param {ModdleElement} activity
108965
+ * @returns {String}
108929
108966
  */
108930
108967
  function createOptionLabel(activity) {
108931
108968
  const {
@@ -108940,12 +108977,12 @@
108940
108977
 
108941
108978
  const DOCUMENTATION_TEXT_FORMAT = 'text/plain';
108942
108979
 
108943
- /**
108944
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
108980
+ /**
108981
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
108945
108982
  */
108946
108983
 
108947
- /**
108948
- * @returns {Array<Entry>} entries
108984
+ /**
108985
+ * @returns {Array<Entry>} entries
108949
108986
  */
108950
108987
  function DocumentationProps(props) {
108951
108988
  const {
@@ -109016,12 +109053,12 @@
109016
109053
  });
109017
109054
  }
109018
109055
 
109019
- /**
109020
- * Retrieves a documentation element from a given moddle element.
109021
- *
109022
- * @param {ModdleElement} businessObject
109023
- *
109024
- * @returns {ModdleElement} documentation element inside the given moddle element.
109056
+ /**
109057
+ * Retrieves a documentation element from a given moddle element.
109058
+ *
109059
+ * @param {ModdleElement} businessObject
109060
+ *
109061
+ * @returns {ModdleElement} documentation element inside the given moddle element.
109025
109062
  */
109026
109063
  function getDocumentation(businessObject) {
109027
109064
  return function () {
@@ -109030,10 +109067,10 @@
109030
109067
  };
109031
109068
  }
109032
109069
 
109033
- /**
109034
- * Sets a documentation element for a given moddle element.
109035
- *
109036
- * @param {ModdleElement} businessObject
109070
+ /**
109071
+ * Sets a documentation element for a given moddle element.
109072
+ *
109073
+ * @param {ModdleElement} businessObject
109037
109074
  */
109038
109075
  function setDocumentation(element, businessObject, bpmnFactory, commandStack) {
109039
109076
  return function (value) {
@@ -109079,12 +109116,12 @@
109079
109116
  const EMPTY_OPTION$4 = '';
109080
109117
  const CREATE_NEW_OPTION$4 = 'create-new';
109081
109118
 
109082
- /**
109083
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
109119
+ /**
109120
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
109084
109121
  */
109085
109122
 
109086
- /**
109087
- * @returns {Array<Entry>} entries
109123
+ /**
109124
+ * @returns {Array<Entry>} entries
109088
109125
  */
109089
109126
  function ErrorProps$2(props) {
109090
109127
  const {
@@ -109260,12 +109297,12 @@
109260
109297
 
109261
109298
  const CREATE_NEW_OPTION$3 = 'create-new';
109262
109299
 
109263
- /**
109264
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
109300
+ /**
109301
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
109265
109302
  */
109266
109303
 
109267
- /**
109268
- * @returns {Array<Entry>} entries
109304
+ /**
109305
+ * @returns {Array<Entry>} entries
109269
109306
  */
109270
109307
  function EscalationProps$2(props) {
109271
109308
  const {
@@ -109438,12 +109475,12 @@
109438
109475
  return sortBy(elements, e => (e.name || '').toLowerCase());
109439
109476
  }
109440
109477
 
109441
- /**
109442
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
109478
+ /**
109479
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
109443
109480
  */
109444
109481
 
109445
- /**
109446
- * @returns {Array<Entry>} entries
109482
+ /**
109483
+ * @returns {Array<Entry>} entries
109447
109484
  */
109448
109485
  function ExecutableProps(props) {
109449
109486
  const {
@@ -109514,14 +109551,14 @@
109514
109551
  // for ID validation as per BPMN Schema (QName - Namespace)
109515
109552
  const ID_REGEX = /^[a-z_][\w-.]*$/i;
109516
109553
 
109517
- /**
109518
- * checks whether the id value is valid
109519
- *
109520
- * @param {ModdleElement} element
109521
- * @param {String} idValue
109522
- * @param {Function} translate
109523
- *
109524
- * @return {String} error message
109554
+ /**
109555
+ * checks whether the id value is valid
109556
+ *
109557
+ * @param {ModdleElement} element
109558
+ * @param {String} idValue
109559
+ * @param {Function} translate
109560
+ *
109561
+ * @return {String} error message
109525
109562
  */
109526
109563
  function isIdValid(element, idValue, translate) {
109527
109564
  const assigned = element.$model.ids.assigned(idValue);
@@ -109549,12 +109586,12 @@
109549
109586
  return SPACE_REGEX.test(value);
109550
109587
  }
109551
109588
 
109552
- /**
109553
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
109589
+ /**
109590
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
109554
109591
  */
109555
109592
 
109556
- /**
109557
- * @returns {Array<Entry>} entries
109593
+ /**
109594
+ * @returns {Array<Entry>} entries
109558
109595
  */
109559
109596
  function IdProps$1() {
109560
109597
  return [{
@@ -109596,12 +109633,12 @@
109596
109633
  });
109597
109634
  }
109598
109635
 
109599
- /**
109600
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
109636
+ /**
109637
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
109601
109638
  */
109602
109639
 
109603
- /**
109604
- * @returns {Array<Entry>} entries
109640
+ /**
109641
+ * @returns {Array<Entry>} entries
109605
109642
  */
109606
109643
  function LinkProps(props) {
109607
109644
  const {
@@ -109649,12 +109686,12 @@
109649
109686
  const EMPTY_OPTION$3 = '';
109650
109687
  const CREATE_NEW_OPTION$2 = 'create-new';
109651
109688
 
109652
- /**
109653
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
109689
+ /**
109690
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
109654
109691
  */
109655
109692
 
109656
- /**
109657
- * @returns {Array<Entry>} entries
109693
+ /**
109694
+ * @returns {Array<Entry>} entries
109658
109695
  */
109659
109696
  function MessageProps$1(props) {
109660
109697
  const {
@@ -109797,12 +109834,12 @@
109797
109834
  return sortBy(elements, e => (e.name || '').toLowerCase());
109798
109835
  }
109799
109836
 
109800
- /**
109801
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
109837
+ /**
109838
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
109802
109839
  */
109803
109840
 
109804
- /**
109805
- * @returns {Array<Entry>} entries
109841
+ /**
109842
+ * @returns {Array<Entry>} entries
109806
109843
  */
109807
109844
  function MultiInstanceProps$2(props) {
109808
109845
  const {
@@ -109873,45 +109910,45 @@
109873
109910
 
109874
109911
  // generic ///////////////////////////
109875
109912
 
109876
- /**
109877
- * isMultiInstanceSupported - check whether given element supports MultiInstanceLoopCharacteristics.
109878
- *
109879
- * @param {djs.model.Base} element
109880
- * @return {boolean}
109913
+ /**
109914
+ * isMultiInstanceSupported - check whether given element supports MultiInstanceLoopCharacteristics.
109915
+ *
109916
+ * @param {djs.model.Base} element
109917
+ * @return {boolean}
109881
109918
  */
109882
109919
  function isMultiInstanceSupported$1(element) {
109883
109920
  const loopCharacteristics = getLoopCharacteristics$2(element);
109884
109921
  return !!loopCharacteristics && is(loopCharacteristics, 'bpmn:MultiInstanceLoopCharacteristics');
109885
109922
  }
109886
109923
 
109887
- /**
109888
- * getBody - get the body of a given expression.
109889
- *
109890
- * @param {ModdleElement<bpmn:FormalExpression>} expression
109891
- * @return {string} the body (value) of the expression
109924
+ /**
109925
+ * getBody - get the body of a given expression.
109926
+ *
109927
+ * @param {ModdleElement<bpmn:FormalExpression>} expression
109928
+ * @return {string} the body (value) of the expression
109892
109929
  */
109893
109930
  function getBody(expression) {
109894
109931
  return expression && expression.get('body');
109895
109932
  }
109896
109933
 
109897
- /**
109898
- * getProperty - get a property value of the loop characteristics.
109899
- *
109900
- * @param {djs.model.Base} element
109901
- * @param {string} propertyName
109902
- *
109903
- * @return {any} the property value
109934
+ /**
109935
+ * getProperty - get a property value of the loop characteristics.
109936
+ *
109937
+ * @param {djs.model.Base} element
109938
+ * @param {string} propertyName
109939
+ *
109940
+ * @return {any} the property value
109904
109941
  */
109905
109942
  function getProperty$3(element, propertyName) {
109906
109943
  const loopCharacteristics = getLoopCharacteristics$2(element);
109907
109944
  return loopCharacteristics && loopCharacteristics.get(propertyName);
109908
109945
  }
109909
109946
 
109910
- /**
109911
- * getLoopCharacteristics - get loopCharacteristics of a given element.
109912
- *
109913
- * @param {djs.model.Base} element
109914
- * @return {ModdleElement<bpmn:MultiInstanceLoopCharacteristics> | undefined}
109947
+ /**
109948
+ * getLoopCharacteristics - get loopCharacteristics of a given element.
109949
+ *
109950
+ * @param {djs.model.Base} element
109951
+ * @return {ModdleElement<bpmn:MultiInstanceLoopCharacteristics> | undefined}
109915
109952
  */
109916
109953
  function getLoopCharacteristics$2(element) {
109917
109954
  const bo = getBusinessObject(element);
@@ -109920,23 +109957,23 @@
109920
109957
 
109921
109958
  // loopCardinality
109922
109959
 
109923
- /**
109924
- * getLoopCardinality - get the loop cardinality of the loop characteristics.
109925
- *
109926
- * @param {djs.model.Base} element
109927
- *
109928
- * @return {ModdleElement<bpmn:FormalExpression>} an expression representing the loop cardinality
109960
+ /**
109961
+ * getLoopCardinality - get the loop cardinality of the loop characteristics.
109962
+ *
109963
+ * @param {djs.model.Base} element
109964
+ *
109965
+ * @return {ModdleElement<bpmn:FormalExpression>} an expression representing the loop cardinality
109929
109966
  */
109930
109967
  function getLoopCardinality(element) {
109931
109968
  return getProperty$3(element, 'loopCardinality');
109932
109969
  }
109933
109970
 
109934
- /**
109935
- * getLoopCardinalityValue - get the loop cardinality value of the loop characteristics.
109936
- *
109937
- * @param {djs.model.Base} element
109938
- *
109939
- * @return {string} the loop cardinality value
109971
+ /**
109972
+ * getLoopCardinalityValue - get the loop cardinality value of the loop characteristics.
109973
+ *
109974
+ * @param {djs.model.Base} element
109975
+ *
109976
+ * @return {string} the loop cardinality value
109940
109977
  */
109941
109978
  function getLoopCardinalityValue(element) {
109942
109979
  const loopCardinality = getLoopCardinality(element);
@@ -109945,35 +109982,35 @@
109945
109982
 
109946
109983
  // completionCondition /////////////////////
109947
109984
 
109948
- /**
109949
- * getCompletionCondition - get the completion condition of the loop characteristics.
109950
- *
109951
- * @param {djs.model.Base} element
109952
- *
109953
- * @return {ModdleElement<bpmn:FormalExpression>} an expression representing the completion condition
109985
+ /**
109986
+ * getCompletionCondition - get the completion condition of the loop characteristics.
109987
+ *
109988
+ * @param {djs.model.Base} element
109989
+ *
109990
+ * @return {ModdleElement<bpmn:FormalExpression>} an expression representing the completion condition
109954
109991
  */
109955
109992
  function getCompletionCondition$1(element) {
109956
109993
  return getProperty$3(element, 'completionCondition');
109957
109994
  }
109958
109995
 
109959
- /**
109960
- * getCompletionConditionValue - get the completion condition value of the loop characteristics.
109961
- *
109962
- * @param {djs.model.Base} element
109963
- *
109964
- * @return {string} the completion condition value
109996
+ /**
109997
+ * getCompletionConditionValue - get the completion condition value of the loop characteristics.
109998
+ *
109999
+ * @param {djs.model.Base} element
110000
+ *
110001
+ * @return {string} the completion condition value
109965
110002
  */
109966
110003
  function getCompletionConditionValue(element) {
109967
110004
  const completionCondition = getCompletionCondition$1(element);
109968
110005
  return getBody(completionCondition);
109969
110006
  }
109970
110007
 
109971
- /**
109972
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
110008
+ /**
110009
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
109973
110010
  */
109974
110011
 
109975
- /**
109976
- * @returns {Array<Entry>} entries
110012
+ /**
110013
+ * @returns {Array<Entry>} entries
109977
110014
  */
109978
110015
  function NameProps(props) {
109979
110016
  const {
@@ -110077,12 +110114,12 @@
110077
110114
  return categoryValue;
110078
110115
  }
110079
110116
 
110080
- /**
110081
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
110117
+ /**
110118
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
110082
110119
  */
110083
110120
 
110084
- /**
110085
- * @returns {Array<Entry>} entries
110121
+ /**
110122
+ * @returns {Array<Entry>} entries
110086
110123
  */
110087
110124
  function ProcessProps$1(props) {
110088
110125
  const {
@@ -110173,15 +110210,15 @@
110173
110210
  return is(element, 'bpmn:Participant') && element.businessObject.get('processRef');
110174
110211
  }
110175
110212
 
110176
- /**
110177
- * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
110213
+ /**
110214
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
110178
110215
  */
110179
110216
 
110180
110217
  const EMPTY_OPTION$2 = '';
110181
110218
  const CREATE_NEW_OPTION$1 = 'create-new';
110182
110219
 
110183
- /**
110184
- * @returns {Entry[]}
110220
+ /**
110221
+ * @returns {Entry[]}
110185
110222
  */
110186
110223
  function SignalProps$1(props) {
110187
110224
  const {
@@ -110327,12 +110364,12 @@
110327
110364
  return isAny(element, ['bpmn:StartEvent', 'bpmn:IntermediateCatchEvent', 'bpmn:BoundaryEvent']) && !!getTimerEventDefinition(element);
110328
110365
  }
110329
110366
 
110330
- /**
110331
- * Get the timer definition type for a given timer event definition.
110332
- *
110333
- * @param {ModdleElement<bpmn:TimerEventDefinition>} timer
110334
- *
110335
- * @return {string|undefined} the timer definition type
110367
+ /**
110368
+ * Get the timer definition type for a given timer event definition.
110369
+ *
110370
+ * @param {ModdleElement<bpmn:TimerEventDefinition>} timer
110371
+ *
110372
+ * @return {string|undefined} the timer definition type
110336
110373
  */
110337
110374
  function getTimerDefinitionType(timer) {
110338
110375
  if (!timer) {
@@ -110362,6 +110399,13 @@
110362
110399
  });
110363
110400
  }
110364
110401
 
110402
+ /**
110403
+ * @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
110404
+ */
110405
+
110406
+ /**
110407
+ * @returns {Array<Entry>} entries
110408
+ */
110365
110409
  function TimerProps$2(props) {
110366
110410
  const {
110367
110411
  element,
@@ -110402,12 +110446,12 @@
110402
110446
  return entries;
110403
110447
  }
110404
110448
 
110405
- /**
110406
- * TimerEventDefinitionType - Generic select entry allowing to select a specific
110407
- * timerEventDefintionType. To be used together with timerEventDefinitionValue.
110408
- *
110409
- * @param {type} props
110410
- * @return {SelectEntry}
110449
+ /**
110450
+ * TimerEventDefinitionType - Generic select entry allowing to select a specific
110451
+ * timerEventDefintionType. To be used together with timerEventDefinitionValue.
110452
+ *
110453
+ * @param {type} props
110454
+ * @return {SelectEntry}
110411
110455
  */
110412
110456
  function TimerEventDefinitionType$2(props) {
110413
110457
  const {
@@ -110475,13 +110519,13 @@
110475
110519
  });
110476
110520
  }
110477
110521
 
110478
- /**
110479
- * TimerEventDefinitionValue - Generic textField entry allowing to specify the
110480
- * timerEventDefintionValue based on the set timerEventDefintionType. To be used
110481
- * together with timerEventDefinitionType.
110482
- *
110483
- * @param {type} props
110484
- * @return {TextFieldEntry}
110522
+ /**
110523
+ * TimerEventDefinitionValue - Generic textField entry allowing to specify the
110524
+ * timerEventDefintionValue based on the set timerEventDefintionType. To be used
110525
+ * together with timerEventDefinitionType.
110526
+ *
110527
+ * @param {type} props
110528
+ * @return {TextFieldEntry}
110485
110529
  */
110486
110530
  function TimerEventDefinitionValue$2(props) {
110487
110531
  const {