camunda-bpmn-js 0.24.0 → 0.24.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.
@@ -55,8 +55,11 @@ ElementTemplatesReplaceProvider.prototype.getPopupMenuEntries = function(element
55
55
  // convert our entries into something sortable
56
56
  let entrySet = Object.entries(entries);
57
57
 
58
- // add unlink template option
59
- this._addPlainElementEntry(element, entrySet);
58
+ if (this._elementTemplates.get(element)) {
59
+
60
+ // add unlink template option
61
+ this._addPlainElementEntry(element, entrySet);
62
+ }
60
63
 
61
64
  // add template entries
62
65
  entrySet = [ ...entrySet, ...this.getTemplateEntries(element) ];
@@ -80,6 +83,10 @@ ElementTemplatesReplaceProvider.prototype._addPlainElementEntry = function(eleme
80
83
 
81
84
  const replaceOption = this._getPlainEntry(element, entries);
82
85
 
86
+ if (!replaceOption) {
87
+ return;
88
+ }
89
+
83
90
  const [
84
91
  insertIndex,
85
92
  entry
@@ -106,11 +113,11 @@ ElementTemplatesReplaceProvider.prototype._getPlainEntry = function(element, ent
106
113
  } = findReplaceOptions(element) || { };
107
114
 
108
115
  if (!options) {
109
- return;
116
+ return null;
110
117
  }
111
118
 
112
119
  const entry = {
113
- id: option.actionName,
120
+ id: 'replace-unlink-element-template',
114
121
  action: () => {
115
122
  this._elementTemplates.applyTemplate(element, null);
116
123
  },
@@ -162,7 +169,7 @@ ElementTemplatesReplaceProvider.prototype.getTemplateEntries = function(element)
162
169
  category,
163
170
  } = template;
164
171
 
165
- const entryId = `replace-with-template-${template.id}`;
172
+ const entryId = `replace.template-${template.id}`;
166
173
 
167
174
  const defaultGroup = {
168
175
  id: 'templates',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camunda-bpmn-js",
3
- "version": "0.24.0",
3
+ "version": "0.24.1",
4
4
  "description": "Embeddable Camunda modeling distributions based on bpmn-js",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -47,7 +47,7 @@
47
47
  "dependencies": {
48
48
  "@bpmn-io/align-to-origin": "^0.7.0",
49
49
  "@bpmn-io/element-templates-icons-renderer": "^0.3.0",
50
- "bpmn-js": "^11.0.1",
50
+ "bpmn-js": "^11.0.5",
51
51
  "bpmn-js-executable-fix": "^0.2.0",
52
52
  "camunda-bpmn-js-behaviors": "^0.4.0",
53
53
  "camunda-bpmn-moddle": "^7.0.1",
@@ -67,7 +67,7 @@
67
67
  "@rollup/plugin-node-resolve": "^14.0.0",
68
68
  "babel-loader": "^9.0.0",
69
69
  "babel-plugin-istanbul": "^6.1.1",
70
- "bpmn-js-connectors-extension": "^0.4.4",
70
+ "bpmn-js-connectors-extension": "^0.4.5",
71
71
  "bpmn-js-properties-panel": "^1.12.0",
72
72
  "chai": "^4.3.7",
73
73
  "cross-env": "^7.0.3",