bpmn-js 9.0.1 → 9.0.4
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 +22 -5
- package/dist/assets/bpmn-js.css +6 -3
- package/dist/bpmn-modeler.development.js +159 -77
- package/dist/bpmn-modeler.production.min.js +4 -4
- package/dist/bpmn-navigated-viewer.development.js +142 -34
- package/dist/bpmn-navigated-viewer.production.min.js +6 -6
- package/dist/bpmn-viewer.development.js +140 -32
- package/dist/bpmn-viewer.production.min.js +6 -6
- package/lib/features/drilldown/DrilldownOverlayBehavior.js +1 -1
- package/lib/features/drilldown/SubprocessCompatibility.js +20 -3
- package/lib/features/label-editing/LabelEditingProvider.js +2 -1
- package/lib/features/label-editing/cmd/UpdateLabelHandler.js +1 -1
- package/lib/features/modeling/behavior/GroupBehavior.js +6 -18
- package/lib/features/modeling/behavior/SubProcessStartEventBehavior.js +1 -1
- package/lib/features/ordering/BpmnOrderingProvider.js +1 -1
- package/lib/features/popup-menu/ReplaceMenuProvider.js +7 -6
- package/lib/import/Importer.js +1 -1
- package/package.json +2 -2
|
@@ -80,7 +80,7 @@ export default function DrilldownOverlayBehavior(
|
|
|
80
80
|
}, true);
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
eventBus.on('import.
|
|
83
|
+
eventBus.on('import.render.complete', function() {
|
|
84
84
|
elementRegistry.filter(function(e) {
|
|
85
85
|
return self.canDrillDown(e);
|
|
86
86
|
}).map(function(el) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { asBounds, asTRBL } from 'diagram-js/lib/layout/LayoutUtil';
|
|
3
|
-
import { is } from '../../util/ModelUtil';
|
|
3
|
+
import { is, isAny } from '../../util/ModelUtil';
|
|
4
4
|
|
|
5
5
|
var DEFAULT_POSITION = {
|
|
6
6
|
x: 180,
|
|
@@ -79,7 +79,7 @@ SubprocessCompatibility.prototype.createNewDiagrams = function(plane) {
|
|
|
79
79
|
collapsedElements.push(bo);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
if (
|
|
82
|
+
if (shouldMoveToPlane(bo, plane)) {
|
|
83
83
|
|
|
84
84
|
// don't change the array while we iterate over it
|
|
85
85
|
elementsToMove.push({ diElement: diElement, parent: parent });
|
|
@@ -168,7 +168,7 @@ SubprocessCompatibility.prototype.createDiagram = function(bo) {
|
|
|
168
168
|
SubprocessCompatibility.$inject = [ 'eventBus', 'moddle' ];
|
|
169
169
|
|
|
170
170
|
|
|
171
|
-
// helpers
|
|
171
|
+
// helpers //////////////////////////
|
|
172
172
|
|
|
173
173
|
function findRootDiagram(element) {
|
|
174
174
|
if (is(element, 'bpmndi:BPMNDiagram')) {
|
|
@@ -199,3 +199,20 @@ function getPlaneBounds(plane) {
|
|
|
199
199
|
|
|
200
200
|
return asBounds(planeTrbl);
|
|
201
201
|
}
|
|
202
|
+
|
|
203
|
+
function shouldMoveToPlane(bo, plane) {
|
|
204
|
+
var parent = bo.$parent;
|
|
205
|
+
|
|
206
|
+
// don't move elements that are already on the plane
|
|
207
|
+
if (!is(parent, 'bpmn:SubProcess') || parent === plane.bpmnElement) {
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// dataAssociations are children of the subprocess but rendered on process level
|
|
212
|
+
// cf. https://github.com/bpmn-io/bpmn-js/issues/1619
|
|
213
|
+
if (isAny(bo, ['bpmn:DataInputAssociation', 'bpmn:DataOutputAssociation'])) {
|
|
214
|
+
return false;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
return true;
|
|
218
|
+
}
|
|
@@ -24,7 +24,7 @@ var HIGH_PRIORITY = 2000;
|
|
|
24
24
|
*/
|
|
25
25
|
export default function GroupBehavior(
|
|
26
26
|
bpmnFactory,
|
|
27
|
-
|
|
27
|
+
bpmnjs,
|
|
28
28
|
elementRegistry,
|
|
29
29
|
eventBus,
|
|
30
30
|
injector,
|
|
@@ -32,18 +32,6 @@ export default function GroupBehavior(
|
|
|
32
32
|
) {
|
|
33
33
|
injector.invoke(CommandInterceptor, this);
|
|
34
34
|
|
|
35
|
-
/**
|
|
36
|
-
* Gets process definitions
|
|
37
|
-
*
|
|
38
|
-
* @return {ModdleElement} definitions
|
|
39
|
-
*/
|
|
40
|
-
function getDefinitions() {
|
|
41
|
-
var rootElement = canvas.getRootElement(),
|
|
42
|
-
businessObject = getBusinessObject(rootElement);
|
|
43
|
-
|
|
44
|
-
return businessObject.$parent;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
35
|
/**
|
|
48
36
|
* Removes a referenced category value for a given group shape
|
|
49
37
|
*
|
|
@@ -79,7 +67,7 @@ export default function GroupBehavior(
|
|
|
79
67
|
*/
|
|
80
68
|
function removeCategory(category) {
|
|
81
69
|
|
|
82
|
-
var definitions = getDefinitions();
|
|
70
|
+
var definitions = bpmnjs.getDefinitions();
|
|
83
71
|
|
|
84
72
|
collectionRemove(definitions.get('rootElements'), category);
|
|
85
73
|
}
|
|
@@ -144,7 +132,7 @@ export default function GroupBehavior(
|
|
|
144
132
|
|
|
145
133
|
var businessObject = getBusinessObject(shape),
|
|
146
134
|
categoryValueRef = businessObject.categoryValueRef,
|
|
147
|
-
definitions = getDefinitions(),
|
|
135
|
+
definitions = bpmnjs.getDefinitions(),
|
|
148
136
|
category = categoryValueRef ? categoryValueRef.$parent : null;
|
|
149
137
|
|
|
150
138
|
collectionAdd(category.get('categoryValue'), categoryValueRef);
|
|
@@ -162,7 +150,7 @@ export default function GroupBehavior(
|
|
|
162
150
|
|
|
163
151
|
if (is(businessObject, 'bpmn:Group') && !businessObject.categoryValueRef) {
|
|
164
152
|
|
|
165
|
-
var definitions = getDefinitions(),
|
|
153
|
+
var definitions = bpmnjs.getDefinitions(),
|
|
166
154
|
categoryValue = createCategoryValue(definitions, bpmnFactory);
|
|
167
155
|
|
|
168
156
|
// link the reference to the Group
|
|
@@ -190,7 +178,7 @@ export default function GroupBehavior(
|
|
|
190
178
|
categoryValue;
|
|
191
179
|
|
|
192
180
|
if (is(property, 'bpmn:CategoryValue')) {
|
|
193
|
-
categoryValue = createCategoryValue(getDefinitions(), bpmnFactory);
|
|
181
|
+
categoryValue = createCategoryValue(bpmnjs.getDefinitions(), bpmnFactory);
|
|
194
182
|
|
|
195
183
|
// return copy of category
|
|
196
184
|
return moddleCopy.copyElement(property, categoryValue);
|
|
@@ -201,7 +189,7 @@ export default function GroupBehavior(
|
|
|
201
189
|
|
|
202
190
|
GroupBehavior.$inject = [
|
|
203
191
|
'bpmnFactory',
|
|
204
|
-
'
|
|
192
|
+
'bpmnjs',
|
|
205
193
|
'elementRegistry',
|
|
206
194
|
'eventBus',
|
|
207
195
|
'injector',
|
|
@@ -20,7 +20,7 @@ export default function SubProcessStartEventBehavior(injector, modeling) {
|
|
|
20
20
|
|
|
21
21
|
if (
|
|
22
22
|
!is(newShape, 'bpmn:SubProcess') ||
|
|
23
|
-
!is(oldShape, 'bpmn:Task') ||
|
|
23
|
+
! (is(oldShape, 'bpmn:Task') || is(oldShape, 'bpmn:CallActivity')) ||
|
|
24
24
|
!isExpanded(newShape)
|
|
25
25
|
) {
|
|
26
26
|
return;
|
|
@@ -131,7 +131,7 @@ export default function BpmnOrderingProvider(eventBus, canvas, translate) {
|
|
|
131
131
|
// render labels always on top
|
|
132
132
|
if (element.labelTarget) {
|
|
133
133
|
return {
|
|
134
|
-
parent: canvas.findRoot(
|
|
134
|
+
parent: canvas.findRoot(newParent) || canvas.getRootElement(),
|
|
135
135
|
index: -1
|
|
136
136
|
};
|
|
137
137
|
}
|
|
@@ -14,7 +14,8 @@ import {
|
|
|
14
14
|
|
|
15
15
|
import {
|
|
16
16
|
forEach,
|
|
17
|
-
filter
|
|
17
|
+
filter,
|
|
18
|
+
isUndefined
|
|
18
19
|
} from 'min-dash';
|
|
19
20
|
|
|
20
21
|
import * as replaceOptions from '../replace/ReplaceOptions';
|
|
@@ -426,16 +427,16 @@ ReplaceMenuProvider.prototype._getLoopEntries = function(element) {
|
|
|
426
427
|
var translate = this._translate;
|
|
427
428
|
|
|
428
429
|
function toggleLoopEntry(event, entry) {
|
|
429
|
-
var loopCharacteristics;
|
|
430
|
+
var loopCharacteristics = getBusinessObject(element).loopCharacteristics;
|
|
430
431
|
|
|
431
432
|
if (entry.active) {
|
|
432
433
|
loopCharacteristics = undefined;
|
|
433
434
|
} else {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
if (entry.options.isSequential) {
|
|
437
|
-
loopCharacteristics.isSequential = entry.options.isSequential;
|
|
435
|
+
if (isUndefined(entry.options.isSequential) || !loopCharacteristics) {
|
|
436
|
+
loopCharacteristics = self._moddle.create(entry.options.loopCharacteristics);
|
|
438
437
|
}
|
|
438
|
+
|
|
439
|
+
loopCharacteristics.isSequential = entry.options.isSequential;
|
|
439
440
|
}
|
|
440
441
|
self._modeling.updateProperties(element, { loopCharacteristics: loopCharacteristics });
|
|
441
442
|
}
|
package/lib/import/Importer.js
CHANGED
|
@@ -124,7 +124,7 @@ export function importBpmnDiagram(diagram, definitions, bpmnDiagram) {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
|
-
* Returns all diagrams in the same
|
|
127
|
+
* Returns all diagrams in the same hierarchy as the requested diagram.
|
|
128
128
|
* Includes all parent and sub process diagrams.
|
|
129
129
|
*
|
|
130
130
|
* @param {Array} definitions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpmn-js",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.4",
|
|
4
4
|
"description": "A bpmn 2.0 toolkit and web modeler",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"dependencies": {
|
|
101
101
|
"bpmn-moddle": "^7.1.2",
|
|
102
102
|
"css.escape": "^1.5.1",
|
|
103
|
-
"diagram-js": "^8.
|
|
103
|
+
"diagram-js": "^8.2.0",
|
|
104
104
|
"diagram-js-direct-editing": "^1.6.3",
|
|
105
105
|
"ids": "^1.0.0",
|
|
106
106
|
"inherits": "^2.0.4",
|