bpmn-js 10.2.0 → 10.3.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/dist/bpmn-modeler.development.js +1990 -1833
- package/dist/bpmn-modeler.production.min.js +7 -7
- 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/EventBasedGatewayBehavior.js +47 -36
- package/lib/features/modeling/index.js +1 -1
- package/lib/features/palette/index.js +1 -1
- package/lib/features/rules/BpmnRules.js +0 -23
- package/lib/features/space-tool/BpmnSpaceTool.js +27 -0
- package/lib/features/space-tool/index.js +8 -0
- package/package.json +14 -14
|
@@ -3,6 +3,7 @@ import RulesModule from '../rules';
|
|
|
3
3
|
import DiOrderingModule from '../di-ordering';
|
|
4
4
|
import OrderingModule from '../ordering';
|
|
5
5
|
import ReplaceModule from '../replace';
|
|
6
|
+
import SpaceToolModule from '../space-tool';
|
|
6
7
|
|
|
7
8
|
import CommandModule from 'diagram-js/lib/command';
|
|
8
9
|
import TooltipsModule from 'diagram-js/lib/features/tooltips';
|
|
@@ -10,7 +11,6 @@ import LabelSupportModule from 'diagram-js/lib/features/label-support';
|
|
|
10
11
|
import AttachSupportModule from 'diagram-js/lib/features/attach-support';
|
|
11
12
|
import SelectionModule from 'diagram-js/lib/features/selection';
|
|
12
13
|
import ChangeSupportModule from 'diagram-js/lib/features/change-support';
|
|
13
|
-
import SpaceToolModule from 'diagram-js/lib/features/space-tool';
|
|
14
14
|
|
|
15
15
|
import BpmnFactory from './BpmnFactory';
|
|
16
16
|
import BpmnUpdater from './BpmnUpdater';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PaletteModule from 'diagram-js/lib/features/palette';
|
|
2
2
|
import CreateModule from 'diagram-js/lib/features/create';
|
|
3
|
-
import SpaceToolModule from '
|
|
3
|
+
import SpaceToolModule from '../space-tool';
|
|
4
4
|
import LassoToolModule from 'diagram-js/lib/features/lasso-tool';
|
|
5
5
|
import HandToolModule from 'diagram-js/lib/features/hand-tool';
|
|
6
6
|
import GlobalConnectModule from 'diagram-js/lib/features/global-connect';
|
|
@@ -855,16 +855,6 @@ function canConnectMessageFlow(source, target) {
|
|
|
855
855
|
}
|
|
856
856
|
|
|
857
857
|
function canConnectSequenceFlow(source, target) {
|
|
858
|
-
|
|
859
|
-
if (
|
|
860
|
-
isEventBasedTarget(target) &&
|
|
861
|
-
target.incoming.length > 0 &&
|
|
862
|
-
areOutgoingEventBasedGatewayConnections(target.incoming) &&
|
|
863
|
-
!is(source, 'bpmn:EventBasedGateway')
|
|
864
|
-
) {
|
|
865
|
-
return false;
|
|
866
|
-
}
|
|
867
|
-
|
|
868
858
|
return isSequenceFlowSource(source) &&
|
|
869
859
|
isSequenceFlowTarget(target) &&
|
|
870
860
|
isSameScope(source, target) &&
|
|
@@ -936,19 +926,6 @@ function canCopy(elements, element) {
|
|
|
936
926
|
return true;
|
|
937
927
|
}
|
|
938
928
|
|
|
939
|
-
function isOutgoingEventBasedGatewayConnection(connection) {
|
|
940
|
-
|
|
941
|
-
if (connection && connection.source) {
|
|
942
|
-
return is(connection.source, 'bpmn:EventBasedGateway');
|
|
943
|
-
}
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
function areOutgoingEventBasedGatewayConnections(connections) {
|
|
947
|
-
connections = connections || [];
|
|
948
|
-
|
|
949
|
-
return connections.some(isOutgoingEventBasedGatewayConnection);
|
|
950
|
-
}
|
|
951
|
-
|
|
952
929
|
function getRootElement(element) {
|
|
953
930
|
return getParent(element, 'bpmn:Process') || getParent(element, 'bpmn:Collaboration');
|
|
954
931
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import inherits from 'inherits-browser';
|
|
2
|
+
|
|
3
|
+
import SpaceTool from 'diagram-js/lib/features/space-tool/SpaceTool';
|
|
4
|
+
|
|
5
|
+
import { is } from '../../util/ModelUtil';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export default function BpmnSpaceTool(injector) {
|
|
9
|
+
injector.invoke(SpaceTool, this);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
BpmnSpaceTool.$inject = [
|
|
13
|
+
'injector'
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
inherits(BpmnSpaceTool, SpaceTool);
|
|
17
|
+
|
|
18
|
+
BpmnSpaceTool.prototype.calculateAdjustments = function(elements, axis, delta, start) {
|
|
19
|
+
var adjustments = SpaceTool.prototype.calculateAdjustments.call(this, elements, axis, delta, start);
|
|
20
|
+
|
|
21
|
+
// do not resize text annotations
|
|
22
|
+
adjustments.resizingShapes = adjustments.resizingShapes.filter(function(shape) {
|
|
23
|
+
return !is(shape, 'bpmn:TextAnnotation');
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
return adjustments;
|
|
27
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpmn-js",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.3.0",
|
|
4
4
|
"description": "A bpmn 2.0 toolkit and web modeler",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -53,10 +53,13 @@
|
|
|
53
53
|
"*.css"
|
|
54
54
|
],
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@babel/core": "^7.
|
|
57
|
-
"@rollup/plugin-commonjs": "^
|
|
58
|
-
"@rollup/plugin-
|
|
59
|
-
"
|
|
56
|
+
"@babel/core": "^7.20.2",
|
|
57
|
+
"@rollup/plugin-commonjs": "^23.0.2",
|
|
58
|
+
"@rollup/plugin-json": "^5.0.1",
|
|
59
|
+
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
60
|
+
"@rollup/plugin-replace": "^5.0.1",
|
|
61
|
+
"@rollup/plugin-terser": "^0.1.0",
|
|
62
|
+
"babel-loader": "^9.1.0",
|
|
60
63
|
"babel-plugin-istanbul": "^6.1.1",
|
|
61
64
|
"bpmn-font": "^0.10.0",
|
|
62
65
|
"camunda-bpmn-moddle": "^4.0.1",
|
|
@@ -80,23 +83,20 @@
|
|
|
80
83
|
"karma-sinon-chai": "^2.0.2",
|
|
81
84
|
"karma-webpack": "^5.0.0",
|
|
82
85
|
"mkdirp": "^0.5.1",
|
|
83
|
-
"mocha": "^
|
|
86
|
+
"mocha": "^10.1.0",
|
|
84
87
|
"mocha-test-container-support": "0.2.0",
|
|
85
88
|
"npm-run-all": "^4.1.2",
|
|
86
|
-
"puppeteer": "^
|
|
87
|
-
"rollup": "^2.
|
|
88
|
-
"rollup-plugin-
|
|
89
|
-
"
|
|
90
|
-
"rollup-plugin-replace": "^2.2.0",
|
|
91
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
92
|
-
"sinon": "^7.5.0",
|
|
89
|
+
"puppeteer": "^19.2.2",
|
|
90
|
+
"rollup": "^2.79.1",
|
|
91
|
+
"rollup-plugin-license": "^2.9.1",
|
|
92
|
+
"sinon": "^9.2.4",
|
|
93
93
|
"sinon-chai": "^3.7.0",
|
|
94
94
|
"webpack": "^5.74.0"
|
|
95
95
|
},
|
|
96
96
|
"dependencies": {
|
|
97
97
|
"bpmn-moddle": "^8.0.0",
|
|
98
98
|
"css.escape": "^1.5.1",
|
|
99
|
-
"diagram-js": "^
|
|
99
|
+
"diagram-js": "^10.0.0",
|
|
100
100
|
"diagram-js-direct-editing": "^2.0.0",
|
|
101
101
|
"ids": "^1.0.0",
|
|
102
102
|
"inherits-browser": "^0.1.0",
|