bpmn-js 17.9.0 → 17.9.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 +71 -65
- package/dist/bpmn-modeler.production.min.js +10 -10
- 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/context-pad/ContextPadProvider.js +20 -28
- package/lib/features/modeling/ElementFactory.js +9 -2
- package/lib/features/replace/BpmnReplace.js +13 -4
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* bpmn-js - bpmn-modeler v17.9.
|
|
2
|
+
* bpmn-js - bpmn-modeler v17.9.2
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2014-present, camunda Services GmbH
|
|
5
5
|
*
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* Source Code: https://github.com/bpmn-io/bpmn-js
|
|
10
10
|
*
|
|
11
|
-
* Date: 2024-
|
|
11
|
+
* Date: 2024-08-05
|
|
12
12
|
*/
|
|
13
13
|
(function (global, factory) {
|
|
14
14
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -27037,7 +27037,7 @@
|
|
|
27037
27037
|
var targets = isArray$3(target) ? target : [ target ];
|
|
27038
27038
|
|
|
27039
27039
|
var targetsChanged = targets.filter(function(element) {
|
|
27040
|
-
return includes$
|
|
27040
|
+
return includes$7(elements, element);
|
|
27041
27041
|
});
|
|
27042
27042
|
|
|
27043
27043
|
if (targetsChanged.length) {
|
|
@@ -27429,7 +27429,7 @@
|
|
|
27429
27429
|
return (
|
|
27430
27430
|
target.length === currentTarget.length &&
|
|
27431
27431
|
every(target, function(element) {
|
|
27432
|
-
return includes$
|
|
27432
|
+
return includes$7(currentTarget, element);
|
|
27433
27433
|
})
|
|
27434
27434
|
);
|
|
27435
27435
|
} else {
|
|
@@ -27624,7 +27624,7 @@
|
|
|
27624
27624
|
*
|
|
27625
27625
|
* @return {boolean}
|
|
27626
27626
|
*/
|
|
27627
|
-
function includes$
|
|
27627
|
+
function includes$7(array, item) {
|
|
27628
27628
|
return array.indexOf(item) !== -1;
|
|
27629
27629
|
}
|
|
27630
27630
|
|
|
@@ -36403,7 +36403,7 @@
|
|
|
36403
36403
|
shapes.forEach(function(shape, index) {
|
|
36404
36404
|
var host = shape.host;
|
|
36405
36405
|
|
|
36406
|
-
if (shouldReplace(shape, includes$
|
|
36406
|
+
if (shouldReplace(shape, includes$6(shapes, host) ? host : newHost)) {
|
|
36407
36407
|
shapes[ index ] = self._replaceShape(shape);
|
|
36408
36408
|
}
|
|
36409
36409
|
});
|
|
@@ -36449,7 +36449,7 @@
|
|
|
36449
36449
|
return !isLabel(shape) && is$1(shape, 'bpmn:BoundaryEvent') && !host;
|
|
36450
36450
|
}
|
|
36451
36451
|
|
|
36452
|
-
function includes$
|
|
36452
|
+
function includes$6(array, item) {
|
|
36453
36453
|
return array.indexOf(item) !== -1;
|
|
36454
36454
|
}
|
|
36455
36455
|
|
|
@@ -42353,7 +42353,7 @@
|
|
|
42353
42353
|
*
|
|
42354
42354
|
* @return {boolean}
|
|
42355
42355
|
*/
|
|
42356
|
-
function includes$
|
|
42356
|
+
function includes$5(elements, element) {
|
|
42357
42357
|
return (elements && element) && elements.indexOf(element) !== -1;
|
|
42358
42358
|
}
|
|
42359
42359
|
|
|
@@ -42368,7 +42368,7 @@
|
|
|
42368
42368
|
return true;
|
|
42369
42369
|
}
|
|
42370
42370
|
|
|
42371
|
-
if (is$1(element, 'bpmn:Lane') && !includes$
|
|
42371
|
+
if (is$1(element, 'bpmn:Lane') && !includes$5(elements, element.parent)) {
|
|
42372
42372
|
return false;
|
|
42373
42373
|
}
|
|
42374
42374
|
|
|
@@ -44748,9 +44748,16 @@
|
|
|
44748
44748
|
hints.moveChildren = false;
|
|
44749
44749
|
}
|
|
44750
44750
|
|
|
44751
|
-
// apply same
|
|
44752
|
-
|
|
44753
|
-
|
|
44751
|
+
// apply same directionality
|
|
44752
|
+
var isHorizontalPool = isHorizontal$3(element);
|
|
44753
|
+
if (!getDi(element).isHorizontal) {
|
|
44754
|
+
getDi(newElement).isHorizontal = isHorizontalPool;
|
|
44755
|
+
}
|
|
44756
|
+
|
|
44757
|
+
// keep the existing size of the pool's direction to
|
|
44758
|
+
// prevent dangling message flows
|
|
44759
|
+
newElement.width = isHorizontalPool ? element.width : elementFactory.getDefaultSize(newElement).width;
|
|
44760
|
+
newElement.height = isHorizontalPool ? elementFactory.getDefaultSize(newElement).height : element.height;
|
|
44754
44761
|
}
|
|
44755
44762
|
|
|
44756
44763
|
if (!rules.allowed('shape.resize', { shape: newBusinessObject })) {
|
|
@@ -45048,12 +45055,12 @@
|
|
|
45048
45055
|
var source = connection.source,
|
|
45049
45056
|
target = connection.target;
|
|
45050
45057
|
|
|
45051
|
-
if (includes$
|
|
45052
|
-
includes$
|
|
45053
|
-
includes$
|
|
45054
|
-
includes$
|
|
45058
|
+
if (includes$4(movingShapes, source) ||
|
|
45059
|
+
includes$4(movingShapes, target) ||
|
|
45060
|
+
includes$4(resizingShapes, source) ||
|
|
45061
|
+
includes$4(resizingShapes, target)) {
|
|
45055
45062
|
|
|
45056
|
-
if (!includes$
|
|
45063
|
+
if (!includes$4(waypointsUpdatingConnections, connection)) {
|
|
45057
45064
|
waypointsUpdatingConnections.push(connection);
|
|
45058
45065
|
}
|
|
45059
45066
|
}
|
|
@@ -45063,7 +45070,7 @@
|
|
|
45063
45070
|
return waypointsUpdatingConnections;
|
|
45064
45071
|
}
|
|
45065
45072
|
|
|
45066
|
-
function includes$
|
|
45073
|
+
function includes$4(array, item) {
|
|
45067
45074
|
return array.indexOf(item) !== -1;
|
|
45068
45075
|
}
|
|
45069
45076
|
|
|
@@ -45467,7 +45474,7 @@
|
|
|
45467
45474
|
forEach$1(attachers, function(attacher) {
|
|
45468
45475
|
var host = attacher.host;
|
|
45469
45476
|
|
|
45470
|
-
if (includes$
|
|
45477
|
+
if (includes$3(allShapes, host)) {
|
|
45471
45478
|
moveShape(attacher);
|
|
45472
45479
|
}
|
|
45473
45480
|
});
|
|
@@ -45480,8 +45487,8 @@
|
|
|
45480
45487
|
target = connection.target,
|
|
45481
45488
|
label = connection.label;
|
|
45482
45489
|
|
|
45483
|
-
if (includes$
|
|
45484
|
-
&& includes$
|
|
45490
|
+
if (includes$3(allShapes, source)
|
|
45491
|
+
&& includes$3(allShapes, target)
|
|
45485
45492
|
&& label) {
|
|
45486
45493
|
moveShape(label);
|
|
45487
45494
|
}
|
|
@@ -45586,13 +45593,13 @@
|
|
|
45586
45593
|
var nonMovingResizingChildren = filter(children, function(child) {
|
|
45587
45594
|
return !isConnection(child) &&
|
|
45588
45595
|
!isLabel(child) &&
|
|
45589
|
-
!includes$
|
|
45590
|
-
!includes$
|
|
45596
|
+
!includes$3(movingShapes, child) &&
|
|
45597
|
+
!includes$3(resizingShapes, child);
|
|
45591
45598
|
});
|
|
45592
45599
|
|
|
45593
45600
|
// find children that are moving
|
|
45594
45601
|
var movingChildren = filter(children, function(child) {
|
|
45595
|
-
return !isConnection(child) && !isLabel(child) && includes$
|
|
45602
|
+
return !isConnection(child) && !isLabel(child) && includes$3(movingShapes, child);
|
|
45596
45603
|
});
|
|
45597
45604
|
|
|
45598
45605
|
var minOrMax,
|
|
@@ -45643,7 +45650,7 @@
|
|
|
45643
45650
|
|
|
45644
45651
|
if (attachers && attachers.length) {
|
|
45645
45652
|
attachers.forEach(function(attacher) {
|
|
45646
|
-
if (includes$
|
|
45653
|
+
if (includes$3(movingShapes, attacher)) {
|
|
45647
45654
|
movingAttachers.push(attacher);
|
|
45648
45655
|
} else {
|
|
45649
45656
|
nonMovingAttachers.push(attacher);
|
|
@@ -45718,7 +45725,7 @@
|
|
|
45718
45725
|
return spaceToolConstraints;
|
|
45719
45726
|
}
|
|
45720
45727
|
|
|
45721
|
-
function includes$
|
|
45728
|
+
function includes$3(array, item) {
|
|
45722
45729
|
return array.indexOf(item) !== -1;
|
|
45723
45730
|
}
|
|
45724
45731
|
|
|
@@ -46989,7 +46996,7 @@
|
|
|
46989
46996
|
attachers = filter(shapes, function(shape) {
|
|
46990
46997
|
var host = shape.host;
|
|
46991
46998
|
|
|
46992
|
-
return isAttacher(shape) && !includes$
|
|
46999
|
+
return isAttacher(shape) && !includes$2(shapes, host);
|
|
46993
47000
|
});
|
|
46994
47001
|
}
|
|
46995
47002
|
|
|
@@ -47185,7 +47192,7 @@
|
|
|
47185
47192
|
return !!shape.host;
|
|
47186
47193
|
}
|
|
47187
47194
|
|
|
47188
|
-
function includes$
|
|
47195
|
+
function includes$2(array, item) {
|
|
47189
47196
|
return array.indexOf(item) !== -1;
|
|
47190
47197
|
}
|
|
47191
47198
|
|
|
@@ -48436,10 +48443,17 @@
|
|
|
48436
48443
|
}
|
|
48437
48444
|
|
|
48438
48445
|
if (is$1(bo, 'bpmn:Participant')) {
|
|
48446
|
+
var isHorizontalPool = di.isHorizontal === undefined || di.isHorizontal === true;
|
|
48439
48447
|
if (isExpanded(bo, di)) {
|
|
48440
|
-
|
|
48448
|
+
if (isHorizontalPool) {
|
|
48449
|
+
return { width: 600, height: 250 };
|
|
48450
|
+
}
|
|
48451
|
+
return { width: 250, height: 600 };
|
|
48441
48452
|
} else {
|
|
48442
|
-
|
|
48453
|
+
if (isHorizontalPool) {
|
|
48454
|
+
return { width: 400, height: 60 };
|
|
48455
|
+
}
|
|
48456
|
+
return { width: 60, height: 400 };
|
|
48443
48457
|
}
|
|
48444
48458
|
}
|
|
48445
48459
|
|
|
@@ -50278,7 +50292,7 @@
|
|
|
50278
50292
|
axis = getAxisFromDirection(direction),
|
|
50279
50293
|
layoutHints = {};
|
|
50280
50294
|
|
|
50281
|
-
if (includes$
|
|
50295
|
+
if (includes$1(affectedShapes, source) && includes$1(affectedShapes, target)) {
|
|
50282
50296
|
|
|
50283
50297
|
// move waypoints
|
|
50284
50298
|
waypoints = map$1(waypoints, function(waypoint) {
|
|
@@ -50300,18 +50314,18 @@
|
|
|
50300
50314
|
self._modeling.updateWaypoints(connection, waypoints, {
|
|
50301
50315
|
labelBehavior: false
|
|
50302
50316
|
});
|
|
50303
|
-
} else if (includes$
|
|
50317
|
+
} else if (includes$1(affectedShapes, source) || includes$1(affectedShapes, target)) {
|
|
50304
50318
|
|
|
50305
50319
|
// re-layout connection with moved start/end
|
|
50306
|
-
if (includes$
|
|
50320
|
+
if (includes$1(movingShapes, source)) {
|
|
50307
50321
|
layoutHints.connectionStart = getMovedSourceAnchor(connection, source, delta);
|
|
50308
|
-
} else if (includes$
|
|
50322
|
+
} else if (includes$1(movingShapes, target)) {
|
|
50309
50323
|
layoutHints.connectionEnd = getMovedTargetAnchor(connection, target, delta);
|
|
50310
|
-
} else if (includes$
|
|
50324
|
+
} else if (includes$1(resizingShapes, source)) {
|
|
50311
50325
|
layoutHints.connectionStart = getResizedSourceAnchor(
|
|
50312
50326
|
connection, source, oldBounds[source.id]
|
|
50313
50327
|
);
|
|
50314
|
-
} else if (includes$
|
|
50328
|
+
} else if (includes$1(resizingShapes, target)) {
|
|
50315
50329
|
layoutHints.connectionEnd = getResizedTargetAnchor(
|
|
50316
50330
|
connection, target, oldBounds[target.id]
|
|
50317
50331
|
);
|
|
@@ -50365,7 +50379,7 @@
|
|
|
50365
50379
|
}
|
|
50366
50380
|
}
|
|
50367
50381
|
|
|
50368
|
-
function includes$
|
|
50382
|
+
function includes$1(array, item) {
|
|
50369
50383
|
return array.indexOf(item) !== -1;
|
|
50370
50384
|
}
|
|
50371
50385
|
|
|
@@ -56865,9 +56879,7 @@
|
|
|
56865
56879
|
});
|
|
56866
56880
|
|
|
56867
56881
|
if (isArray$3(baseAllowed)) {
|
|
56868
|
-
return every(
|
|
56869
|
-
return includes$1(baseAllowed, element);
|
|
56870
|
-
});
|
|
56882
|
+
return every(elements, el => baseAllowed.includes(el));
|
|
56871
56883
|
}
|
|
56872
56884
|
|
|
56873
56885
|
return baseAllowed;
|
|
@@ -56885,7 +56897,6 @@
|
|
|
56885
56897
|
connect = this._connect,
|
|
56886
56898
|
create = this._create,
|
|
56887
56899
|
popupMenu = this._popupMenu,
|
|
56888
|
-
rules = this._rules,
|
|
56889
56900
|
autoPlace = this._autoPlace,
|
|
56890
56901
|
translate = this._translate,
|
|
56891
56902
|
appendPreview = this._appendPreview;
|
|
@@ -56893,6 +56904,10 @@
|
|
|
56893
56904
|
var actions = {};
|
|
56894
56905
|
|
|
56895
56906
|
if (element.type === 'label') {
|
|
56907
|
+
if (this._isDeleteAllowed([ element ])) {
|
|
56908
|
+
assign$1(actions, deleteAction());
|
|
56909
|
+
}
|
|
56910
|
+
|
|
56896
56911
|
return actions;
|
|
56897
56912
|
}
|
|
56898
56913
|
|
|
@@ -56906,6 +56921,19 @@
|
|
|
56906
56921
|
modeling.removeElements([ element ]);
|
|
56907
56922
|
}
|
|
56908
56923
|
|
|
56924
|
+
function deleteAction() {
|
|
56925
|
+
return {
|
|
56926
|
+
'delete': {
|
|
56927
|
+
group: 'edit',
|
|
56928
|
+
className: 'bpmn-icon-trash',
|
|
56929
|
+
title: translate('Delete'),
|
|
56930
|
+
action: {
|
|
56931
|
+
click: removeElement
|
|
56932
|
+
}
|
|
56933
|
+
}
|
|
56934
|
+
};
|
|
56935
|
+
}
|
|
56936
|
+
|
|
56909
56937
|
function getReplaceMenuPosition(element) {
|
|
56910
56938
|
|
|
56911
56939
|
var Y_OFFSET = 5;
|
|
@@ -57230,26 +57258,8 @@
|
|
|
57230
57258
|
});
|
|
57231
57259
|
}
|
|
57232
57260
|
|
|
57233
|
-
|
|
57234
|
-
|
|
57235
|
-
|
|
57236
|
-
if (isArray$3(deleteAllowed)) {
|
|
57237
|
-
|
|
57238
|
-
// was the element returned as a deletion candidate?
|
|
57239
|
-
deleteAllowed = deleteAllowed[0] === element;
|
|
57240
|
-
}
|
|
57241
|
-
|
|
57242
|
-
if (deleteAllowed) {
|
|
57243
|
-
assign$1(actions, {
|
|
57244
|
-
'delete': {
|
|
57245
|
-
group: 'edit',
|
|
57246
|
-
className: 'bpmn-icon-trash',
|
|
57247
|
-
title: translate('Delete'),
|
|
57248
|
-
action: {
|
|
57249
|
-
click: removeElement
|
|
57250
|
-
}
|
|
57251
|
-
}
|
|
57252
|
-
});
|
|
57261
|
+
if (this._isDeleteAllowed([ element ])) {
|
|
57262
|
+
assign$1(actions, deleteAction());
|
|
57253
57263
|
}
|
|
57254
57264
|
|
|
57255
57265
|
return actions;
|
|
@@ -57280,10 +57290,6 @@
|
|
|
57280
57290
|
return isType && isDefinition;
|
|
57281
57291
|
}
|
|
57282
57292
|
|
|
57283
|
-
function includes$1(array, item) {
|
|
57284
|
-
return array.indexOf(item) !== -1;
|
|
57285
|
-
}
|
|
57286
|
-
|
|
57287
57293
|
var ContextPadModule = {
|
|
57288
57294
|
__depends__: [
|
|
57289
57295
|
AppendPreviewModule,
|