camunda-bpmn-js 2.6.1 → 2.7.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.
@@ -30033,9 +30033,8 @@
30033
30033
  <span
30034
30034
  class=${ clsx('djs-popup-entry-name', entry.className) }
30035
30035
  >
30036
- ${ entry.imageUrl ? m$3`
30037
- <img class="djs-popup-entry-icon" src=${ entry.imageUrl } alt="" />
30038
- ` : null }
30036
+ ${(entry.imageUrl && m$3`<img class="djs-popup-entry-icon" src=${ entry.imageUrl } alt="" />`) ||
30037
+ (entry.imageHtml && m$3`<div class="djs-popup-entry-icon" dangerouslySetInnerHTML=${ { __html: entry.imageHtml } } />`)}
30039
30038
 
30040
30039
  ${ entry.label ? m$3`
30041
30040
  <span class="djs-popup-label">
@@ -31056,13 +31055,41 @@
31056
31055
  * and then replace respective icons with the optimized data URIs in `./dist`.
31057
31056
  */
31058
31057
  var icons$1 = {
31059
- align: 'data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%202000%202000%22%3E%3Cpath%20style%3D%22stroke%3AcurrentColor%3Bstroke-width%3A100%3Bstroke-linecap%3Around%22%20d%3D%22M200%20150v1700%22%2F%3E%3Crect%20x%3D%22500%22%20y%3D%22150%22%20width%3D%221300%22%20height%3D%22700%22%20rx%3D%221%22%20style%3D%22fill%3Anone%3Bstroke%3AcurrentColor%3Bstroke-width%3A100%22%2F%3E%3Crect%20x%3D%22500%22%20y%3D%221150%22%20width%3D%22700%22%20height%3D%22700%22%20rx%3D%221%22%20style%3D%22fill%3AcurrentColor%3Bstroke%3AcurrentColor%3Bstroke-width%3A100%3Bopacity%3A.5%22%2F%3E%3C%2Fsvg%3E',
31060
- bottom: 'data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201800%201800%22%3E%3Cpath%20style%3D%22stroke%3AcurrentColor%3Bstroke-width%3A100%3Bstroke-linecap%3Around%22%20d%3D%22M150%201650h1500%22%2F%3E%3Crect%20x%3D%22150%22%20y%3D%22350%22%20width%3D%22600%22%20height%3D%221300%22%20rx%3D%221%22%20style%3D%22fill%3Anone%3Bstroke%3AcurrentColor%3Bstroke-width%3A100%22%2F%3E%3Crect%20x%3D%221050%22%20y%3D%22850%22%20width%3D%22600%22%20height%3D%22800%22%20rx%3D%221%22%20style%3D%22fill%3AcurrentColor%3Bstroke%3AcurrentColor%3Bstroke-width%3A100%3Bopacity%3A.5%22%2F%3E%3C%2Fsvg%3E',
31061
- center: 'data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201800%201800%22%3E%3Cpath%20style%3D%22stroke%3AcurrentColor%3Bstroke-width%3A100%3Bstroke-linecap%3Around%22%20d%3D%22M900%20150v1500%22%2F%3E%3Crect%20x%3D%22250%22%20y%3D%22150%22%20width%3D%221300%22%20height%3D%22600%22%20rx%3D%221%22%20style%3D%22fill%3Anone%3Bstroke%3AcurrentColor%3Bstroke-width%3A100%22%2F%3E%3Crect%20x%3D%22500%22%20y%3D%221050%22%20width%3D%22800%22%20height%3D%22600%22%20rx%3D%221%22%20style%3D%22fill%3AcurrentColor%3Bstroke%3AcurrentColor%3Bstroke-width%3A100%3Bopacity%3A.5%22%2F%3E%3C%2Fsvg%3E',
31062
- left: 'data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201800%201800%22%3E%3Cpath%20style%3D%22stroke%3AcurrentColor%3Bstroke-width%3A100%3Bstroke-linecap%3Around%22%20d%3D%22M100%20150v1500%22%2F%3E%3Crect%20x%3D%22100%22%20y%3D%22150%22%20width%3D%221300%22%20height%3D%22600%22%20rx%3D%221%22%20style%3D%22fill%3Anone%3Bstroke%3AcurrentColor%3Bstroke-width%3A100%22%2F%3E%3Crect%20x%3D%22100%22%20y%3D%221050%22%20width%3D%22800%22%20height%3D%22600%22%20rx%3D%221%22%20style%3D%22fill%3AcurrentColor%3Bstroke%3AcurrentColor%3Bstroke-width%3A100%3Bopacity%3A.5%22%2F%3E%3C%2Fsvg%3E',
31063
- right: 'data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201800%201800%22%3E%3Cpath%20style%3D%22stroke%3AcurrentColor%3Bstroke-width%3A100%3Bstroke-linecap%3Around%22%20d%3D%22M1650%20150v1500%22%2F%3E%3Crect%20x%3D%22350%22%20y%3D%22150%22%20width%3D%221300%22%20height%3D%22600%22%20rx%3D%221%22%20style%3D%22fill%3Anone%3Bstroke%3AcurrentColor%3Bstroke-width%3A100%22%2F%3E%3Crect%20x%3D%22850%22%20y%3D%221050%22%20width%3D%22800%22%20height%3D%22600%22%20rx%3D%221%22%20style%3D%22fill%3AcurrentColor%3Bstroke%3AcurrentColor%3Bstroke-width%3A100%3Bopacity%3A.5%22%2F%3E%3C%2Fsvg%3E',
31064
- top: 'data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201800%201800%22%3E%3Cpath%20style%3D%22stroke%3AcurrentColor%3Bstroke-width%3A100%3Bstroke-linecap%3Around%22%20d%3D%22M150%20150h1500%22%2F%3E%3Crect%20x%3D%22150%22%20y%3D%22150%22%20width%3D%22600%22%20height%3D%221300%22%20rx%3D%221%22%20style%3D%22fill%3Anone%3Bstroke%3AcurrentColor%3Bstroke-width%3A100%22%2F%3E%3Crect%20x%3D%221050%22%20y%3D%22150%22%20width%3D%22600%22%20height%3D%22800%22%20rx%3D%221%22%20style%3D%22fill%3AcurrentColor%3Bstroke%3AcurrentColor%3Bstroke-width%3A100%3Bopacity%3A.5%22%2F%3E%3C%2Fsvg%3E',
31065
- middle: 'data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201800%201800%22%3E%3Cpath%20style%3D%22stroke%3AcurrentColor%3Bstroke-width%3A100%3Bstroke-linecap%3Around%22%20d%3D%22M150%20900h1500%22%2F%3E%3Crect%20x%3D%22150%22%20y%3D%22250%22%20width%3D%22600%22%20height%3D%221300%22%20rx%3D%221%22%20style%3D%22fill%3Anone%3Bstroke%3AcurrentColor%3Bstroke-width%3A100%22%2F%3E%3Crect%20x%3D%221050%22%20y%3D%22500%22%20width%3D%22600%22%20height%3D%22800%22%20rx%3D%221%22%20style%3D%22fill%3AcurrentColor%3Bstroke%3AcurrentColor%3Bstroke-width%3A100%3Bopacity%3A.5%22%2F%3E%3C%2Fsvg%3E'
31058
+ align: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2000 2000">
31059
+ <line x1="200" y1="150" x2="200" y2="1850" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/>
31060
+ <rect x="500" y="150" width="1300" height="700" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>
31061
+ <rect x="500" y="1150" width="700" height="700" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>
31062
+ </svg>`,
31063
+ bottom: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">
31064
+ <line x1="150" y1="1650" x2="1650" y2="1650" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/>
31065
+ <rect x="150" y="350" width="600" height="1300" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>
31066
+ <rect x="1050" y="850" width="600" height="800" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>
31067
+ </svg>`,
31068
+ center: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">
31069
+ <line x1="900" y1="150" x2="900" y2="1650" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/>
31070
+ <rect x="250" y="150" width="1300" height="600" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>
31071
+ <rect x="500" y="1050" width="800" height="600" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>
31072
+ </svg>`,
31073
+ left: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">
31074
+ <line x1="100" y1="150" x2="100" y2="1650" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/>
31075
+ <rect x="100" y="150" width="1300" height="600" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>
31076
+ <rect x="100" y="1050" width="800" height="600" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>
31077
+ </svg>`,
31078
+ right: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">
31079
+ <line x1="1650" y1="150" x2="1650" y2="1650" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/>
31080
+ <rect x="350" y="150" width="1300" height="600" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>
31081
+ <rect x="850" y="1050" width="800" height="600" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>
31082
+ </svg>`,
31083
+ top: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">
31084
+ <line x1="150" y1="150" x2="1650" y2="150" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/>
31085
+ <rect x="150" y="150" width="600" height="1300" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>
31086
+ <rect x="1050" y="150" width="600" height="800" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>
31087
+ </svg>`,
31088
+ middle: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">
31089
+ <line x1="150" y1="900" x2="1650" y2="900" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/>
31090
+ <rect x="150" y="250" width="600" height="1300" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>
31091
+ <rect x="1050" y="500" width="600" height="800" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>
31092
+ </svg>`
31066
31093
  };
31067
31094
 
31068
31095
  var ICONS$1 = icons$1;
@@ -31133,7 +31160,7 @@
31133
31160
  'align-elements': {
31134
31161
  group: 'align-elements',
31135
31162
  title: self._translate('Align elements'),
31136
- imageUrl: ICONS$1['align'],
31163
+ html: `<div class="entry">${ICONS$1['align']}</div>`,
31137
31164
  action: {
31138
31165
  click: function(event, target) {
31139
31166
  var position = self._getMenuPosition(target);
@@ -31250,7 +31277,7 @@
31250
31277
  group: 'align',
31251
31278
  title: translate('Align elements ' + alignment),
31252
31279
  className: 'bjs-align-elements-menu-entry',
31253
- imageUrl: ICONS$1[ alignment ],
31280
+ imageHtml: ICONS$1[ alignment ],
31254
31281
  action: function() {
31255
31282
  alignElements.trigger(target, alignment);
31256
31283
  popupMenu.close();
@@ -41905,8 +41932,16 @@
41905
41932
  * and then replace respective icons with the optimized data URIs in `./dist`.
41906
41933
  */
41907
41934
  var icons = {
41908
- horizontal: 'data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201800%201800%22%3E%3Cpath%20style%3D%22fill%3Anone%3Bstroke%3AcurrentColor%3Bstroke-width%3A100%3Bstroke-linejoin%3Around%22%20d%3D%22M450%20400V150h900v250%22%2F%3E%3Crect%20x%3D%22150%22%20y%3D%22450%22%20width%3D%22600%22%20height%3D%221200%22%20rx%3D%221%22%20style%3D%22fill%3Anone%3Bstroke%3AcurrentColor%3Bstroke-width%3A100%22%2F%3E%3Crect%20x%3D%221050%22%20y%3D%22450%22%20width%3D%22600%22%20height%3D%22800%22%20rx%3D%221%22%20style%3D%22fill%3AcurrentColor%3Bstroke%3AcurrentColor%3Bstroke-width%3A100%3Bopacity%3A.5%22%2F%3E%3C%2Fsvg%3E',
41909
- vertical: 'data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201800%201800%22%3E%3Cpath%20style%3D%22fill%3Anone%3Bstroke%3AcurrentColor%3Bstroke-width%3A100%3Bstroke-linejoin%3Around%22%20d%3D%22M400%201350H150V450h250%22%2F%3E%3Crect%20x%3D%22450%22%20y%3D%22150%22%20width%3D%221200%22%20height%3D%22600%22%20rx%3D%221%22%20style%3D%22fill%3Anone%3Bstroke%3AcurrentColor%3Bstroke-width%3A100%22%2F%3E%3Crect%20x%3D%22450%22%20y%3D%221050%22%20width%3D%22800%22%20height%3D%22600%22%20rx%3D%221%22%20style%3D%22fill%3AcurrentColor%3Bstroke%3AcurrentColor%3Bstroke-width%3A100%3Bopacity%3A.5%22%2F%3E%3C%2Fsvg%3E',
41935
+ horizontal: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">
41936
+ <polyline points="450 400 450 150 1350 150 1350 400" style="fill:none;stroke:currentColor;stroke-width:100;stroke-linejoin:round;"/>
41937
+ <rect x="150" y="450" width="600" height="1200" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>
41938
+ <rect x="1050" y="450" width="600" height="800" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>
41939
+ </svg>`,
41940
+ vertical: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">
41941
+ <polyline points="400 1350 150 1350 150 450 400 450" style="fill:none;stroke:currentColor;stroke-width:100;stroke-linejoin:round;"/>
41942
+ <rect x="450" y="150" width="1200" height="600" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>
41943
+ <rect x="450" y="1050" width="800" height="600" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>
41944
+ </svg>`
41910
41945
  };
41911
41946
 
41912
41947
  var ICONS = icons;
@@ -41980,7 +42015,7 @@
41980
42015
  group: 'distribute',
41981
42016
  title: translate('Distribute elements horizontally'),
41982
42017
  className: 'bjs-align-elements-menu-entry',
41983
- imageUrl: ICONS['horizontal'],
42018
+ imageHtml: ICONS['horizontal'],
41984
42019
  action: function(event, entry) {
41985
42020
  distributeElements.trigger(elements, 'horizontal');
41986
42021
  popupMenu.close();
@@ -41989,7 +42024,7 @@
41989
42024
  'distribute-elements-vertical': {
41990
42025
  group: 'distribute',
41991
42026
  title: translate('Distribute elements vertically'),
41992
- imageUrl: ICONS['vertical'],
42027
+ imageHtml: ICONS['vertical'],
41993
42028
  action: function(event, entry) {
41994
42029
  distributeElements.trigger(elements, 'vertical');
41995
42030
  popupMenu.close();
@@ -113822,17 +113857,62 @@
113822
113857
  return getPropertyValue$1(element, property);
113823
113858
  }
113824
113859
 
113860
+ function removeRootElement(rootElement, injector) {
113861
+ const modeling = injector.get('modeling'),
113862
+ canvas = injector.get('canvas'),
113863
+ bpmnjs = injector.get('bpmnjs');
113864
+ const element = canvas.getRootElement(),
113865
+ definitions = bpmnjs.getDefinitions(),
113866
+ rootElements = definitions.get('rootElements');
113867
+ const newRootElements = rootElements.filter(e => e !== rootElement);
113868
+
113869
+ // short-circuit to prevent unnecessary updates
113870
+ if (newRootElements.length === rootElements.length) {
113871
+ return;
113872
+ }
113873
+ modeling.updateModdleProperties(element, definitions, {
113874
+ rootElements: newRootElements
113875
+ });
113876
+ }
113877
+
113878
+ /**
113879
+ * Remove message from element and the diagram.
113880
+ *
113881
+ * @param {import('bpmn-js/lib/model/Types').Element} element
113882
+ * @param {import('didi').Injector} injector
113883
+ */
113884
+ function removeMessage(element, injector) {
113885
+ const modeling = injector.get('modeling');
113886
+ const bo = getReferringElement(element);
113887
+ const message = findMessage(bo);
113888
+ if (!message) {
113889
+ return;
113890
+ }
113891
+ modeling.updateModdleProperties(element, bo, {
113892
+ messageRef: undefined
113893
+ });
113894
+ removeRootElement(message, injector);
113895
+ }
113896
+ function getReferringElement(element) {
113897
+ const bo = getBusinessObject$2(element);
113898
+ if (is$6(bo, 'bpmn:Event')) {
113899
+ return bo.get('eventDefinitions')[0];
113900
+ }
113901
+ return bo;
113902
+ }
113903
+
113825
113904
  /**
113826
113905
  * Checks the conditions of an element template and sets/resets the
113827
113906
  * corresponding properties on the element.
113828
113907
  */
113829
113908
  class ElementTemplatesConditionChecker extends CommandInterceptor$1 {
113830
- constructor(eventBus, elementTemplates, commandStack, bpmnFactory) {
113909
+ constructor(eventBus, elementTemplates, commandStack, bpmnFactory, injector) {
113831
113910
  super(eventBus);
113832
113911
  this._eventBus = eventBus;
113833
113912
  this._elementTemplates = elementTemplates;
113834
113913
  this._commandStack = commandStack;
113835
113914
  this._bpmnFactory = bpmnFactory;
113915
+ this._injector = injector;
113836
113916
  this.preExecute(['element.updateProperties', 'element.updateModdleProperties'], this._saveConditionalState, true, this);
113837
113917
  this.postExecute(['element.updateProperties', 'element.updateModdleProperties', 'propertiesPanel.zeebe.changeTemplate'], this._applyConditions, true, this);
113838
113918
  }
@@ -113858,11 +113938,17 @@
113858
113938
  const newTemplate = applyConditions(element, template);
113859
113939
  const propertiesToAdd = getMissingProperties(oldTemplate, newTemplate);
113860
113940
  const propertiesToRemove = getPropertiesToRemove(newTemplate, oldTemplate);
113941
+ this._updateReferencedElement(element, oldTemplate, newTemplate);
113861
113942
  propertiesToAdd.forEach(property => setPropertyValue(this._bpmnFactory, this._commandStack, element, property, property.value));
113862
113943
  propertiesToRemove.forEach(property => unsetProperty(this._commandStack, element, property));
113863
113944
  }
113945
+ _updateReferencedElement(element, oldTemplate, newTemplate) {
113946
+ if (hasMessageProperties(oldTemplate) && !hasMessageProperties(newTemplate)) {
113947
+ removeMessage(element, this._injector);
113948
+ }
113949
+ }
113864
113950
  }
113865
- ElementTemplatesConditionChecker.$inject = ['eventBus', 'elementTemplates', 'commandStack', 'bpmnFactory'];
113951
+ ElementTemplatesConditionChecker.$inject = ['eventBus', 'elementTemplates', 'commandStack', 'bpmnFactory', 'injector'];
113866
113952
 
113867
113953
  // helpers
113868
113954
 
@@ -113896,6 +113982,9 @@
113896
113982
  function equals(a, b) {
113897
113983
  return JSON.stringify(a, normalizeReplacer$1) === JSON.stringify(b, normalizeReplacer$1);
113898
113984
  }
113985
+ function hasMessageProperties(template) {
113986
+ return template.properties.some(p => MESSAGE_BINDING_TYPES.includes(p.binding.type));
113987
+ }
113899
113988
 
113900
113989
  /**
113901
113990
  * The BPMN 2.0 extension attribute name under
@@ -115651,13 +115740,12 @@
115651
115740
  * Handles referenced elements.
115652
115741
  */
115653
115742
  class ReferencedElementBehavior extends CommandInterceptor$1 {
115654
- constructor(eventBus, elementTemplates, modeling, canvas, bpmnjs, moddleCopy, bpmnFactory) {
115743
+ constructor(eventBus, elementTemplates, modeling, injector, moddleCopy, bpmnFactory) {
115655
115744
  super(eventBus);
115656
115745
  this._eventBus = eventBus;
115657
115746
  this._elementTemplates = elementTemplates;
115658
115747
  this._modeling = modeling;
115659
- this._canvas = canvas;
115660
- this._bpmnjs = bpmnjs;
115748
+ this._injector = injector;
115661
115749
  this.postExecuted(['element.updateProperties', 'element.updateModdleProperties'], this._handlePropertiesUpdate, true, this);
115662
115750
  this.postExecuted('shape.replace', this._handleReplacement, true, this);
115663
115751
  this.postExecuted('shape.delete', this._handleRemoval, true, this);
@@ -115720,7 +115808,7 @@
115720
115808
  return;
115721
115809
  }
115722
115810
  if (!canHaveReferencedElement(newShape) || !newTemplate) {
115723
- this._removeRootElement(message);
115811
+ removeRootElement(message, this._injector);
115724
115812
  return;
115725
115813
  }
115726
115814
  this._addMessage(newShape, message);
@@ -115741,17 +115829,9 @@
115741
115829
  const bo = getBusinessObject$2(shape);
115742
115830
  const message = findMessage(bo);
115743
115831
  if (message && getTemplateId$1(message)) {
115744
- this._removeRootElement(message);
115832
+ removeRootElement(message, this._injector);
115745
115833
  }
115746
115834
  }
115747
- _removeRootElement(rootElement) {
115748
- const element = this._canvas.getRootElement();
115749
- const definitions = this._bpmnjs.getDefinitions();
115750
- const rootElements = definitions.get('rootElements');
115751
- this._modeling.updateModdleProperties(element, definitions, {
115752
- rootElements: rootElements.filter(e => e !== rootElement)
115753
- });
115754
- }
115755
115835
  _addMessage(element, message) {
115756
115836
  const bo = getReferringElement(element);
115757
115837
  this._modeling.updateModdleProperties(element, bo, {
@@ -115759,17 +115839,10 @@
115759
115839
  });
115760
115840
  }
115761
115841
  }
115762
- ReferencedElementBehavior.$inject = ['eventBus', 'elementTemplates', 'modeling', 'canvas', 'bpmnjs', 'moddleCopy', 'bpmnFactory'];
115842
+ ReferencedElementBehavior.$inject = ['eventBus', 'elementTemplates', 'modeling', 'injector', 'moddleCopy', 'bpmnFactory'];
115763
115843
  function canHaveReferencedElement(element) {
115764
115844
  return isAny$1(element, ['bpmn:ReceiveTask', 'bpmn:SendTask', 'bpmn:Event']);
115765
115845
  }
115766
- function getReferringElement(element) {
115767
- const bo = getBusinessObject$2(element);
115768
- if (is$6(bo, 'bpmn:Event')) {
115769
- return bo.get('eventDefinitions')[0];
115770
- }
115771
- return bo;
115772
- }
115773
115846
  function isLabel$1(element) {
115774
115847
  return element.type === 'label';
115775
115848
  }
@@ -121487,9 +121560,9 @@
121487
121560
  camunda: camundaModdle
121488
121561
  };
121489
121562
 
121490
- const colorImageSvg = '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22"><path d="m12.5 5.5.3-.4 3.6-3.6c.5-.5 1.3-.5 1.7 0l1 1c.5.4.5 1.2 0 1.7l-3.6 3.6-.4.2v.2c0 1.4.6 2 1 2.7v.6l-1.7 1.6c-.2.2-.4.2-.6 0L7.3 6.6a.4.4 0 0 1 0-.6l.3-.3.5-.5.8-.8c.2-.2.4-.1.6 0 .9.5 1.5 1.1 3 1.1zm-9.9 6 4.2-4.2 6.3 6.3-4.2 4.2c-.3.3-.9.3-1.2 0l-.8-.8-.9-.8-2.3-2.9" /></svg>';
121491
-
121492
- const colorImageUrl = 'data:image/svg+xml;utf8,' + encodeURIComponent(colorImageSvg);
121563
+ const colorImageSvg = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" fill="currentColor">
121564
+ <path d="m12.5 5.5.3-.4 3.6-3.6c.5-.5 1.3-.5 1.7 0l1 1c.5.4.5 1.2 0 1.7l-3.6 3.6-.4.2v.2c0 1.4.6 2 1 2.7v.6l-1.7 1.6c-.2.2-.4.2-.6 0L7.3 6.6a.4.4 0 0 1 0-.6l.3-.3.5-.5.8-.8c.2-.2.4-.1.6 0 .9.5 1.5 1.1 3 1.1zm-9.9 6 4.2-4.2 6.3 6.3-4.2 4.2c-.3.3-.9.3-1.2 0l-.8-.8-.9-.8-2.3-2.9" />
121565
+ </svg>`;
121493
121566
 
121494
121567
 
121495
121568
  function ColorContextPadProvider(contextPad, popupMenu, canvas, translate) {
@@ -121533,7 +121606,7 @@
121533
121606
  group: 'edit',
121534
121607
  className: 'bpmn-icon-color',
121535
121608
  title: translate('Set Color'),
121536
- imageUrl: colorImageUrl,
121609
+ html: `<div class="entry">${colorImageSvg}</div>`,
121537
121610
  action: {
121538
121611
  click: (event, element) => {
121539
121612
 
@@ -121606,12 +121679,14 @@
121606
121679
  } ];
121607
121680
 
121608
121681
 
121609
- function ColorPopupProvider(config, popupMenu, modeling, translate) {
121682
+ function ColorPopupProvider(config, bpmnRendererConfig, popupMenu, modeling, translate) {
121610
121683
  this._popupMenu = popupMenu;
121611
121684
  this._modeling = modeling;
121612
121685
  this._translate = translate;
121613
121686
 
121614
121687
  this._colors = config && config.colors || COLORS;
121688
+ this._defaultFillColor = bpmnRendererConfig && bpmnRendererConfig.defaultFillColor || 'white';
121689
+ this._defaultStrokeColor = bpmnRendererConfig && bpmnRendererConfig.defaultStrokeColor || 'rgb(34, 36, 42)';
121615
121690
 
121616
121691
  this._popupMenu.registerProvider('color-picker', this);
121617
121692
  }
@@ -121619,6 +121694,7 @@
121619
121694
 
121620
121695
  ColorPopupProvider.$inject = [
121621
121696
  'config.colorPicker',
121697
+ 'config.bpmnRenderer',
121622
121698
  'popupMenu',
121623
121699
  'modeling',
121624
121700
  'translate'
@@ -121630,14 +121706,14 @@
121630
121706
 
121631
121707
  var colorIcon = domify$1(`
121632
121708
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="100%">
121633
- <rect rx="2" x="1" y="1" width="22" height="22" fill="var(--fill-color)" stroke="var(--stroke-color)"></rect>
121709
+ <rect rx="2" x="1" y="1" width="22" height="22" fill="var(--fill-color)" stroke="var(--stroke-color)" style="stroke-width:2"></rect>
121634
121710
  </svg>
121635
121711
  `);
121636
121712
 
121637
121713
  var entries = this._colors.map(function(color) {
121638
121714
 
121639
- colorIcon.style.setProperty('--fill-color', color.fill || 'white');
121640
- colorIcon.style.setProperty('--stroke-color', color.stroke || 'rgb(34, 36, 42)');
121715
+ colorIcon.style.setProperty('--fill-color', color.fill || self._defaultFillColor);
121716
+ colorIcon.style.setProperty('--stroke-color', color.stroke || self._defaultStrokeColor);
121641
121717
 
121642
121718
  return {
121643
121719
  title: self._translate(color.label),
@@ -122687,16 +122763,12 @@
122687
122763
  return true;
122688
122764
  };
122689
122765
 
122690
- /**
122691
- * To change the icons, modify the SVGs in `./resources`, execute `npx svgo -f resources --datauri enc -o dist`,
122692
- * and then replace respective icons with the optimized data URIs in `./dist`.
122693
- */
122694
- const appendIcon = `<svg width="22" height="22" viewBox="0 0 5.82 5.82" xmlns="http://www.w3.org/2000/svg">
122695
- <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"/>
122696
- </svg>`;
122697
- const createIcon = `<svg width="46" height="46" viewBox="-2 -2 9.82 9.82" xmlns="http://www.w3.org/2000/svg">
122698
- <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"/>
122699
- </svg>`;
122766
+ const appendIcon = `<svg width="22" height="22" viewBox="0 0 5.82 5.82" xmlns="http://www.w3.org/2000/svg" fill="currentColor">
122767
+ <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"/>
122768
+ </svg>`;
122769
+ const createIcon = `<svg width="46" height="46" viewBox="-2 -2 9.82 9.82" xmlns="http://www.w3.org/2000/svg" fill="currentColor">
122770
+ <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"/>
122771
+ </svg>`;
122700
122772
 
122701
122773
  /**
122702
122774
  * A provider for append context pad button