bpmn-js 18.25.0 → 18.26.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.
@@ -1 +1 @@
1
- {"version":3,"file":"DrilldownBreadcrumbs.d.ts","mappings":";;;;AA4BAA;IAqFAC;;;;;;IArFAC;;;cAlBa,OAAO,4BAA4B,EAAE;uBACrC,OAAO,qCAAqC,EAAE;gBAC9C,OAAO,8BAA8B,EAAE;eAEvC,OAAO,mBAAmB,EAAE;aAC5B,OAAO,mBAAmB,EAAE","names":["DrilldownBreadcrumbs class","DrilldownBreadcrumbs#$inject","DrilldownBreadcrumbs constructor"],"ignoreList":[],"sources":["DrilldownBreadcrumbs.js"]}
1
+ {"version":3,"file":"DrilldownBreadcrumbs.d.ts","mappings":";;;;AA4BAA;IA6GAC;;;;;;IA7GAC;;;cAlBa,OAAO,4BAA4B,EAAE;uBACrC,OAAO,qCAAqC,EAAE;gBAC9C,OAAO,8BAA8B,EAAE;eAEvC,OAAO,mBAAmB,EAAE;aAC5B,OAAO,mBAAmB,EAAE","names":["DrilldownBreadcrumbs class","DrilldownBreadcrumbs#$inject","DrilldownBreadcrumbs constructor"],"ignoreList":[],"sources":["DrilldownBreadcrumbs.js"]}
@@ -83,14 +83,7 @@ export default function DrilldownBreadcrumbs(eventBus, elementRegistry, canvas)
83
83
  return [];
84
84
  }
85
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
-
89
- link.addEventListener('click', function() {
90
- canvas.setRootElement(parentPlane);
91
- });
92
-
93
- return link;
86
+ return [ { parent: parent, parentPlane: parentPlane } ];
94
87
  });
95
88
 
96
89
  breadcrumbs.innerHTML = '';
@@ -100,8 +93,39 @@ export default function DrilldownBreadcrumbs(eventBus, elementRegistry, canvas)
100
93
 
101
94
  containerClasses.toggle(OPEN_CLASS, visible);
102
95
 
103
- path.forEach(function(element) {
104
- breadcrumbs.appendChild(element);
96
+ path.forEach(function(entry, index) {
97
+ var parent = entry.parent,
98
+ parentPlane = entry.parentPlane,
99
+ title = escapeHTML(parent.name || parent.id);
100
+
101
+ // the last crumb represents the current plane; render it as
102
+ // plain, non-interactive text
103
+ var isCurrent = index === path.length - 1;
104
+
105
+ var crumb;
106
+
107
+ if (isCurrent) {
108
+ crumb = domify(
109
+ '<li><span class="bjs-crumb" title="' + title + '">' + title + '</span></li>'
110
+ );
111
+ } else {
112
+
113
+ // render navigable crumbs as local links so they are focusable
114
+ // and keyboard-operable
115
+ var href = '#' + escapeHTML(parent.id);
116
+
117
+ crumb = domify(
118
+ '<li><a class="bjs-crumb" href="' + href + '" title="' + title + '">' + title + '</a></li>'
119
+ );
120
+
121
+ crumb.addEventListener('click', function(event) {
122
+ event.preventDefault();
123
+
124
+ canvas.setRootElement(parentPlane);
125
+ });
126
+ }
127
+
128
+ breadcrumbs.appendChild(crumb);
105
129
  });
106
130
  }
107
131
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpmn-js",
3
- "version": "18.25.0",
3
+ "version": "18.26.0",
4
4
  "description": "A bpmn 2.0 toolkit and web modeler",
5
5
  "main": "lib/index.js",
6
6
  "files": [
@@ -74,7 +74,7 @@
74
74
  "babel-loader": "^10.1.1",
75
75
  "babel-plugin-istanbul": "^8.0.0",
76
76
  "bio-dts": "^0.15.3",
77
- "bpmn-font": "^0.12.1",
77
+ "bpmn-font": "^0.13.0",
78
78
  "camunda-bpmn-moddle": "^4.0.1",
79
79
  "chai": "^6.2.2",
80
80
  "chai-match": "^1.1.1",
@@ -110,8 +110,8 @@
110
110
  "webpack": "^5.107.2"
111
111
  },
112
112
  "dependencies": {
113
- "bpmn-moddle": "^10.0.0",
114
- "diagram-js": "^15.24.0",
113
+ "bpmn-moddle": "^10.2.0",
114
+ "diagram-js": "^15.25.0",
115
115
  "diagram-js-direct-editing": "^3.5.1",
116
116
  "ids": "^3.0.2",
117
117
  "inherits-browser": "^0.1.0",