bpmn-js 17.8.0 → 17.8.2

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.
@@ -61,24 +61,31 @@ export default function DrilldownBreadcrumbs(eventBus, elementRegistry, canvas)
61
61
  businessObjectParents = getBusinessObjectParentChain(element);
62
62
  }
63
63
 
64
- var path = businessObjectParents.map(function(parent) {
65
- var title = escapeHTML(parent.name || parent.id);
66
- var link = domify('<li><span class="bjs-crumb"><a title="' + title + '">' + title + '</a></span></li>');
67
-
68
- var parentPlane = canvas.findRoot(getPlaneIdFromShape(parent)) || canvas.findRoot(parent.id);
69
-
70
- // when the root is a collaboration, the process does not have a corresponding
71
- // element in the elementRegisty. Instead, we search for the corresponding participant
64
+ var path = businessObjectParents.flatMap(function(parent) {
65
+ var parentPlane =
66
+ canvas.findRoot(getPlaneIdFromShape(parent)) ||
67
+ canvas.findRoot(parent.id);
68
+
69
+ // when the root is a collaboration, the process does not have a
70
+ // corresponding element in the elementRegisty. Instead, we search
71
+ // for the corresponding participant
72
72
  if (!parentPlane && is(parent, 'bpmn:Process')) {
73
73
  var participant = elementRegistry.find(function(element) {
74
74
  var businessObject = getBusinessObject(element);
75
75
 
76
- return businessObject && businessObject.get('processRef') && businessObject.get('processRef') === parent;
76
+ return businessObject && businessObject.get('processRef') === parent;
77
77
  });
78
78
 
79
- parentPlane = canvas.findRoot(participant.id);
79
+ parentPlane = participant && canvas.findRoot(participant.id);
80
80
  }
81
81
 
82
+ if (!parentPlane) {
83
+ return [];
84
+ }
85
+
86
+ var title = escapeHTML(parent.name || parent.id);
87
+ var link = domify('<li><span class="bjs-crumb"><a title="' + title + '">' + title + '</a></span></li>');
88
+
82
89
  link.addEventListener('click', function() {
83
90
  canvas.setRootElement(parentPlane);
84
91
  });
@@ -45,7 +45,7 @@ BpmnSearchProvider.$inject = [
45
45
  * @return {SearchResult[]}
46
46
  */
47
47
  BpmnSearchProvider.prototype.find = function(pattern) {
48
- var rootElement = this._canvas.getRootElement();
48
+ var rootElements = this._canvas.getRootElements();
49
49
 
50
50
  var elements = this._elementRegistry.filter(function(element) {
51
51
  if (element.labelTarget) {
@@ -56,7 +56,7 @@ BpmnSearchProvider.prototype.find = function(pattern) {
56
56
 
57
57
  // do not include root element
58
58
  elements = filter(elements, function(element) {
59
- return element !== rootElement;
59
+ return !rootElements.includes(element);
60
60
  });
61
61
 
62
62
  elements = map(elements, function(element) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpmn-js",
3
- "version": "17.8.0",
3
+ "version": "17.8.2",
4
4
  "description": "A bpmn 2.0 toolkit and web modeler",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -64,11 +64,11 @@
64
64
  ],
65
65
  "devDependencies": {
66
66
  "@babel/core": "^7.20.2",
67
- "@rollup/plugin-commonjs": "^25.0.0",
68
- "@rollup/plugin-json": "^6.0.0",
69
- "@rollup/plugin-node-resolve": "^15.0.1",
70
- "@rollup/plugin-replace": "^5.0.2",
71
- "@rollup/plugin-terser": "^0.4.0",
67
+ "@rollup/plugin-commonjs": "^26.0.0",
68
+ "@rollup/plugin-json": "^6.1.0",
69
+ "@rollup/plugin-node-resolve": "^15.2.3",
70
+ "@rollup/plugin-replace": "^5.0.7",
71
+ "@rollup/plugin-terser": "^0.4.4",
72
72
  "axe-core": "^4.9.0",
73
73
  "babel-loader": "^9.1.0",
74
74
  "babel-plugin-istanbul": "^6.1.1",
@@ -102,8 +102,8 @@
102
102
  "puppeteer": "^22.0.0",
103
103
  "remark-cli": "^12.0.0",
104
104
  "remark-preset-bpmn-io": "^0.2.1",
105
- "rollup": "^3.19.1",
106
- "rollup-plugin-license": "^3.0.0",
105
+ "rollup": "^4.0.0",
106
+ "rollup-plugin-license": "^3.4.0",
107
107
  "sinon": "^17.0.0",
108
108
  "sinon-chai": "^3.7.0",
109
109
  "ts-expect": "^1.3.0",
@@ -112,13 +112,13 @@
112
112
  },
113
113
  "dependencies": {
114
114
  "bpmn-moddle": "^8.1.0",
115
- "diagram-js": "^14.7.0",
115
+ "diagram-js": "^14.7.1",
116
116
  "diagram-js-direct-editing": "^3.0.1",
117
117
  "ids": "^1.0.5",
118
118
  "inherits-browser": "^0.1.0",
119
119
  "min-dash": "^4.1.1",
120
- "min-dom": "^4.0.3",
121
- "tiny-svg": "^3.0.0"
120
+ "min-dom": "^4.2.1",
121
+ "tiny-svg": "^3.1.2"
122
122
  },
123
123
  "remarkConfig": {
124
124
  "plugins": [
@@ -284,9 +284,9 @@ export function enableLogging(modeler, force) {
284
284
  var saveXML = logConfigured('save-xml', force);
285
285
 
286
286
  saveXML && modeler.on('commandStack.changed', function() {
287
- modeler.saveXML({ format: true }).then(function(result) {
288
- console.log(result.xml);
289
- });
287
+ Promise.resolve()
288
+ .then(() => modeler.saveXML({ format: true }))
289
+ .then((result) => console.log(result.xml));
290
290
  });
291
291
  }
292
292