bpmn-js 18.3.0 → 18.3.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.
- package/dist/bpmn-modeler.development.js +37 -7
- package/dist/bpmn-modeler.production.min.js +37 -37
- package/dist/bpmn-navigated-viewer.development.js +2 -2
- package/dist/bpmn-navigated-viewer.production.min.js +1 -1
- package/dist/bpmn-viewer.development.js +2 -2
- package/dist/bpmn-viewer.production.min.js +1 -1
- package/lib/features/modeling/behavior/SubProcessStartEventBehavior.js +1 -0
- package/lib/features/modeling/behavior/index.d.ts +84 -1
- package/lib/features/modeling-feedback/ModelingFeedback.js +7 -2
- package/lib/features/space-tool/BpmnSpaceTool.d.ts +16 -13
- package/lib/features/space-tool/BpmnSpaceTool.js +30 -3
- package/package.json +5 -5
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
export default class BpmnSpaceTool extends SpaceTool {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @param injector
|
|
4
|
+
* @param canvas
|
|
5
|
+
*/
|
|
6
|
+
constructor(injector: Injector, canvas: Canvas);
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @param elements
|
|
10
|
+
* @param axis
|
|
11
|
+
* @param delta
|
|
12
|
+
* @param start
|
|
13
|
+
*
|
|
14
|
+
* @return
|
|
15
|
+
*/
|
|
16
|
+
calculateAdjustments(elements: Shape[], axis: Axis, delta: Point, start: number): any;
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
type Injector = import("didi").Injector;
|
|
20
|
+
type Canvas = import("diagram-js/lib/core/Canvas").default;
|
|
18
21
|
type Shape = import("../../model/Types").Shape;
|
|
19
22
|
type Axis = import("diagram-js/lib/util/Types").Axis;
|
|
20
23
|
type Point = import("diagram-js/lib/util/Types").Point;
|
|
@@ -2,12 +2,16 @@ import inherits from 'inherits-browser';
|
|
|
2
2
|
|
|
3
3
|
import SpaceTool from 'diagram-js/lib/features/space-tool/SpaceTool';
|
|
4
4
|
|
|
5
|
+
import { getEnclosedElements, getBBox } from 'diagram-js/lib/util/Elements';
|
|
6
|
+
|
|
5
7
|
import { getBusinessObject, is } from '../../util/ModelUtil';
|
|
6
8
|
|
|
7
9
|
import { isHorizontal } from '../../util/DiUtil';
|
|
10
|
+
import { values } from 'min-dash';
|
|
8
11
|
|
|
9
12
|
/**
|
|
10
13
|
* @typedef {import('didi').Injector} Injector
|
|
14
|
+
* @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
|
|
11
15
|
*
|
|
12
16
|
* @typedef {import('../../model/Types').Shape} Shape
|
|
13
17
|
*
|
|
@@ -17,13 +21,17 @@ import { isHorizontal } from '../../util/DiUtil';
|
|
|
17
21
|
|
|
18
22
|
/**
|
|
19
23
|
* @param {Injector} injector
|
|
24
|
+
* @param {Canvas} canvas
|
|
20
25
|
*/
|
|
21
|
-
export default function BpmnSpaceTool(injector) {
|
|
26
|
+
export default function BpmnSpaceTool(injector, canvas) {
|
|
22
27
|
injector.invoke(SpaceTool, this);
|
|
28
|
+
|
|
29
|
+
this._canvas = canvas;
|
|
23
30
|
}
|
|
24
31
|
|
|
25
32
|
BpmnSpaceTool.$inject = [
|
|
26
|
-
'injector'
|
|
33
|
+
'injector',
|
|
34
|
+
'canvas'
|
|
27
35
|
];
|
|
28
36
|
|
|
29
37
|
inherits(BpmnSpaceTool, SpaceTool);
|
|
@@ -37,7 +45,26 @@ inherits(BpmnSpaceTool, SpaceTool);
|
|
|
37
45
|
* @return {Object}
|
|
38
46
|
*/
|
|
39
47
|
BpmnSpaceTool.prototype.calculateAdjustments = function(elements, axis, delta, start) {
|
|
40
|
-
|
|
48
|
+
|
|
49
|
+
var canvasRoot = this._canvas.getRootElement(),
|
|
50
|
+
spaceRoot = elements[0] === canvasRoot ? null : elements[0],
|
|
51
|
+
enclosedArtifacts = [];
|
|
52
|
+
|
|
53
|
+
// ensure
|
|
54
|
+
if (spaceRoot) {
|
|
55
|
+
enclosedArtifacts = values(
|
|
56
|
+
getEnclosedElements(
|
|
57
|
+
canvasRoot.children.filter(
|
|
58
|
+
(child) => is(child, 'bpmn:Artifact')
|
|
59
|
+
),
|
|
60
|
+
getBBox(spaceRoot)
|
|
61
|
+
)
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const elementsToMove = [ ...elements, ...enclosedArtifacts ];
|
|
66
|
+
|
|
67
|
+
var adjustments = SpaceTool.prototype.calculateAdjustments.call(this, elementsToMove, axis, delta, start);
|
|
41
68
|
|
|
42
69
|
// do not resize:
|
|
43
70
|
//
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpmn-js",
|
|
3
|
-
"version": "18.3.
|
|
3
|
+
"version": "18.3.2",
|
|
4
4
|
"description": "A bpmn 2.0 toolkit and web modeler",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
71
71
|
"@rollup/plugin-replace": "^6.0.0",
|
|
72
72
|
"@rollup/plugin-terser": "^0.4.4",
|
|
73
|
-
"babel-loader": "^
|
|
73
|
+
"babel-loader": "^10.0.0",
|
|
74
74
|
"babel-plugin-istanbul": "^7.0.0",
|
|
75
75
|
"bio-dts": "^0.11.0",
|
|
76
76
|
"bpmn-font": "^0.12.1",
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"cross-env": "^7.0.3",
|
|
82
82
|
"del": "^8.0.0",
|
|
83
83
|
"del-cli": "^6.0.0",
|
|
84
|
-
"eslint": "^9.
|
|
85
|
-
"eslint-plugin-bpmn-io": "^2.0
|
|
84
|
+
"eslint": "^9.21.0",
|
|
85
|
+
"eslint-plugin-bpmn-io": "^2.2.0",
|
|
86
86
|
"execa": "^9.0.0",
|
|
87
87
|
"file-drops": "^0.5.0",
|
|
88
88
|
"karma": "^6.4.4",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"sinon": "^17.0.1",
|
|
107
107
|
"sinon-chai": "^3.7.0",
|
|
108
108
|
"ts-expect": "^1.3.0",
|
|
109
|
-
"typescript": "^5.
|
|
109
|
+
"typescript": "^5.7.3",
|
|
110
110
|
"webpack": "^5.95.0"
|
|
111
111
|
},
|
|
112
112
|
"dependencies": {
|