bpmn-js 9.3.0 → 9.4.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.
- package/CHANGELOG.md +27 -1
- package/dist/assets/bpmn-js.css +4 -5
- package/dist/bpmn-modeler.development.js +3416 -3163
- package/dist/bpmn-modeler.production.min.js +8 -8
- package/dist/bpmn-navigated-viewer.development.js +357 -283
- package/dist/bpmn-navigated-viewer.production.min.js +6 -6
- package/dist/bpmn-viewer.development.js +323 -269
- package/dist/bpmn-viewer.production.min.js +6 -6
- package/lib/draw/BpmnRenderUtil.js +25 -25
- package/lib/draw/BpmnRenderer.js +4 -4
- package/lib/draw/PathMap.js +42 -42
- package/lib/features/align-elements/index.js +1 -1
- package/lib/features/copy-paste/BpmnCopyPaste.js +75 -69
- package/lib/features/copy-paste/ModdleCopy.js +26 -13
- package/lib/features/drilldown/DrilldownOverlayBehavior.js +2 -2
- package/lib/features/drilldown/SubprocessCompatibility.js +1 -1
- package/lib/features/drilldown/index.js +1 -1
- package/lib/features/grid-snapping/behavior/{AutoPlaceBehavior.js → GridSnappingAutoPlaceBehavior.js} +2 -2
- package/lib/features/grid-snapping/behavior/{LayoutConnectionBehavior.js → GridSnappingLayoutConnectionBehavior.js} +4 -4
- package/lib/features/grid-snapping/behavior/{CreateParticipantBehavior.js → GridSnappingParticipantBehavior.js} +2 -2
- package/lib/features/grid-snapping/behavior/index.js +7 -7
- package/lib/features/keyboard/BpmnKeyboardBindings.js +7 -7
- package/lib/features/label-editing/LabelEditingProvider.js +1 -23
- package/lib/features/modeling/ElementFactory.js +18 -8
- package/lib/features/modeling/behavior/BoundaryEventBehavior.js +1 -16
- package/lib/features/modeling/behavior/DropOnFlowBehavior.js +1 -1
- package/lib/features/modeling/behavior/GroupBehavior.js +205 -93
- package/lib/features/modeling/behavior/ReplaceElementBehaviour.js +8 -4
- package/lib/features/modeling/behavior/ResizeBehavior.js +2 -0
- package/lib/features/modeling/behavior/RootElementReferenceBehavior.js +7 -8
- package/lib/features/modeling/behavior/SpaceToolBehavior.js +5 -0
- package/lib/features/modeling/behavior/SubProcessPlaneBehavior.js +9 -0
- package/lib/features/modeling/behavior/index.js +1 -1
- package/lib/features/modeling/behavior/util/CategoryUtil.js +66 -13
- package/lib/features/modeling/behavior/util/LayoutUtil.js +6 -6
- package/lib/features/modeling/cmd/UpdateModdlePropertiesHandler.js +4 -1
- package/lib/features/ordering/BpmnOrderingProvider.js +3 -1
- package/lib/features/replace/BpmnReplace.js +12 -0
- package/lib/features/search/index.js +1 -1
- package/lib/import/BpmnImporter.js +0 -5
- package/lib/util/CompatibilityUtil.js +1 -0
- package/package.json +21 -24
- package/test/helper/index.js +26 -1
- package/.babelrc +0 -3
- package/lib/features/.DS_Store +0 -0
- package/lib/features/align-elements/.DS_Store +0 -0
- package/lib/features/distribute-elements/.DS_Store +0 -0
- package/lib/features/distribute-elements/dist/distribute-horizontally-tool.svg +0 -1
- package/lib/features/distribute-elements/dist/distribute-vertically-tool.svg +0 -1
|
@@ -24,10 +24,12 @@ export default function BpmnOrderingProvider(eventBus, canvas, translate) {
|
|
|
24
24
|
|
|
25
25
|
var orders = [
|
|
26
26
|
{ type: 'bpmn:SubProcess', order: { level: 6 } },
|
|
27
|
+
|
|
28
|
+
// handle SequenceFlow(s) like message flows and render them always on top
|
|
27
29
|
{
|
|
28
30
|
type: 'bpmn:SequenceFlow',
|
|
29
31
|
order: {
|
|
30
|
-
level:
|
|
32
|
+
level: 9,
|
|
31
33
|
containers: [
|
|
32
34
|
'bpmn:Participant',
|
|
33
35
|
'bpmn:FlowElementsContainer'
|
|
@@ -199,6 +199,18 @@ export default function BpmnReplace(
|
|
|
199
199
|
// else if property is explicitly set, use it
|
|
200
200
|
else if (target && has(target, 'isExpanded')) {
|
|
201
201
|
newElement.isExpanded = target.isExpanded;
|
|
202
|
+
|
|
203
|
+
// assign default size of new expanded element
|
|
204
|
+
var defaultSize = elementFactory.getDefaultSize(newBusinessObject, {
|
|
205
|
+
isExpanded: newElement.isExpanded
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
newElement.width = defaultSize.width;
|
|
209
|
+
newElement.height = defaultSize.height;
|
|
210
|
+
|
|
211
|
+
// keep element centered
|
|
212
|
+
newElement.x = element.x - (newElement.width - element.width) / 2;
|
|
213
|
+
newElement.y = element.y - (newElement.height - element.height) / 2;
|
|
202
214
|
}
|
|
203
215
|
|
|
204
216
|
// TODO: need also to respect min/max Size
|
|
@@ -186,11 +186,6 @@ BpmnImporter.prototype.add = function(semantic, di, parentElement) {
|
|
|
186
186
|
parentElement = this._canvas.findRoot(parentElement);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
// insert sequence flows behind other flow nodes (cf. #727)
|
|
190
|
-
if (is(semantic, 'bpmn:SequenceFlow')) {
|
|
191
|
-
parentIndex = 0;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
189
|
this._canvas.addConnection(element, parentElement, parentIndex);
|
|
195
190
|
} else {
|
|
196
191
|
throw new Error(translate('unknown di {di} for element {semantic}', {
|
|
@@ -65,6 +65,7 @@ export function ensureCompatDiRef(businessObject) {
|
|
|
65
65
|
// bpmnElement can have multiple independent DIs
|
|
66
66
|
if (!has(businessObject, 'di')) {
|
|
67
67
|
Object.defineProperty(businessObject, 'di', {
|
|
68
|
+
enumerable: false,
|
|
68
69
|
get: function() {
|
|
69
70
|
throw new Error(DI_ERROR_MESSAGE);
|
|
70
71
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpmn-js",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.4.0",
|
|
4
4
|
"description": "A bpmn 2.0 toolkit and web modeler",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
7
|
-
".babelrc",
|
|
8
7
|
"dist",
|
|
9
8
|
"lib",
|
|
10
9
|
"test/util",
|
|
@@ -54,8 +53,11 @@
|
|
|
54
53
|
"*.css"
|
|
55
54
|
],
|
|
56
55
|
"devDependencies": {
|
|
57
|
-
"@
|
|
58
|
-
"@rollup/plugin-
|
|
56
|
+
"@babel/core": "^7.18.10",
|
|
57
|
+
"@rollup/plugin-commonjs": "^22.0.2",
|
|
58
|
+
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
59
|
+
"babel-loader": "^8.2.5",
|
|
60
|
+
"babel-plugin-istanbul": "^6.1.1",
|
|
59
61
|
"bpmn-font": "^0.10.0",
|
|
60
62
|
"camunda-bpmn-moddle": "^4.0.1",
|
|
61
63
|
"chai": "4.1.2",
|
|
@@ -63,20 +65,17 @@
|
|
|
63
65
|
"cpx": "^1.5.0",
|
|
64
66
|
"cross-env": "^7.0.3",
|
|
65
67
|
"del": "^6.0.0",
|
|
66
|
-
"eslint": "^
|
|
67
|
-
"eslint-plugin-bpmn-io": "^0.
|
|
68
|
-
"eslint-plugin-import": "^2.
|
|
68
|
+
"eslint": "^8.22.0",
|
|
69
|
+
"eslint-plugin-bpmn-io": "^0.14.1",
|
|
70
|
+
"eslint-plugin-import": "^2.26.0",
|
|
69
71
|
"execa": "^5.1.1",
|
|
70
|
-
"
|
|
71
|
-
"karma": "^
|
|
72
|
-
"karma-
|
|
73
|
-
"karma-coverage": "^2.0.3",
|
|
72
|
+
"karma": "^6.4.0",
|
|
73
|
+
"karma-chrome-launcher": "^3.1.1",
|
|
74
|
+
"karma-coverage": "^2.2.0",
|
|
74
75
|
"karma-debug-launcher": "0.0.4",
|
|
75
76
|
"karma-env-preprocessor": "^0.1.1",
|
|
76
|
-
"karma-firefox-launcher": "^2.1.
|
|
77
|
-
"karma-ie-launcher": "^1.0.0",
|
|
77
|
+
"karma-firefox-launcher": "^2.1.2",
|
|
78
78
|
"karma-mocha": "^2.0.1",
|
|
79
|
-
"karma-phantomjs-launcher": "^1.0.4",
|
|
80
79
|
"karma-safari-launcher": "^1.0.0",
|
|
81
80
|
"karma-sinon-chai": "^2.0.2",
|
|
82
81
|
"karma-webpack": "^5.0.0",
|
|
@@ -84,29 +83,27 @@
|
|
|
84
83
|
"mocha": "^8.4.0",
|
|
85
84
|
"mocha-test-container-support": "0.2.0",
|
|
86
85
|
"npm-run-all": "^4.1.2",
|
|
87
|
-
"phantomjs-prebuilt": "^2.1.12",
|
|
88
86
|
"promise-polyfill": "^8.2.0",
|
|
89
|
-
"puppeteer": "^
|
|
90
|
-
"
|
|
91
|
-
"rollup": "^2.52.2",
|
|
87
|
+
"puppeteer": "^16.1.1",
|
|
88
|
+
"rollup": "^2.78.0",
|
|
92
89
|
"rollup-plugin-json": "^4.0.0",
|
|
93
|
-
"rollup-plugin-license": "^2.
|
|
90
|
+
"rollup-plugin-license": "^2.8.1",
|
|
94
91
|
"rollup-plugin-replace": "^2.2.0",
|
|
95
92
|
"rollup-plugin-terser": "^7.0.2",
|
|
96
93
|
"sinon": "^7.5.0",
|
|
97
94
|
"sinon-chai": "^3.7.0",
|
|
98
|
-
"webpack": "^
|
|
95
|
+
"webpack": "^5.74.0"
|
|
99
96
|
},
|
|
100
97
|
"dependencies": {
|
|
101
|
-
"bpmn-moddle": "^7.1.
|
|
98
|
+
"bpmn-moddle": "^7.1.3",
|
|
102
99
|
"css.escape": "^1.5.1",
|
|
103
|
-
"diagram-js": "^8.
|
|
100
|
+
"diagram-js": "^8.9.0",
|
|
104
101
|
"diagram-js-direct-editing": "^1.7.0",
|
|
105
102
|
"ids": "^1.0.0",
|
|
106
103
|
"inherits-browser": "0.0.1",
|
|
107
104
|
"min-dash": "^3.5.2",
|
|
108
|
-
"min-dom": "^3.2.
|
|
105
|
+
"min-dom": "^3.2.1",
|
|
109
106
|
"object-refs": "^0.3.0",
|
|
110
|
-
"tiny-svg": "^2.2.
|
|
107
|
+
"tiny-svg": "^2.2.4"
|
|
111
108
|
}
|
|
112
109
|
}
|
package/test/helper/index.js
CHANGED
|
@@ -104,7 +104,7 @@ export function bootstrapBpmnJS(BpmnJS, diagram, options, locals) {
|
|
|
104
104
|
var mockModule = {};
|
|
105
105
|
|
|
106
106
|
forEach(_locals, function(v, k) {
|
|
107
|
-
mockModule[k] = ['value', v];
|
|
107
|
+
mockModule[k] = [ 'value', v ];
|
|
108
108
|
});
|
|
109
109
|
|
|
110
110
|
_options.modules = [].concat(_options.modules || [], [ mockModule ]);
|
|
@@ -267,6 +267,31 @@ export function createViewer(container, viewerInstance, xml, diagramId) {
|
|
|
267
267
|
});
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
+
function logConfigured(type, force) {
|
|
271
|
+
var url = new URL(window.location.href);
|
|
272
|
+
|
|
273
|
+
var log = ('searchParams' in url) && url.searchParams.get('log') || '';
|
|
274
|
+
|
|
275
|
+
return force || log.includes('save-xml');
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Enable logging on a modeler instance.
|
|
280
|
+
*
|
|
281
|
+
* @param {import('bpmn-js')} modeler
|
|
282
|
+
* @param {boolean} [force=false]
|
|
283
|
+
*/
|
|
284
|
+
export function enableLogging(modeler, force) {
|
|
285
|
+
|
|
286
|
+
var saveXML = logConfigured('save-xml', force);
|
|
287
|
+
|
|
288
|
+
saveXML && modeler.on('commandStack.changed', function() {
|
|
289
|
+
modeler.saveXML({ format: true }).then(function(result) {
|
|
290
|
+
console.log(result.xml);
|
|
291
|
+
});
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
|
|
270
295
|
export function setBpmnJS(instance) {
|
|
271
296
|
BPMN_JS = instance;
|
|
272
297
|
}
|
package/.babelrc
DELETED
package/lib/features/.DS_Store
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
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
|