camunda-bpmn-js 3.10.1 → 3.10.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.
|
@@ -32858,7 +32858,7 @@
|
|
|
32858
32858
|
* @typedef {import('../../core/EventBus').default} EventBus
|
|
32859
32859
|
*/
|
|
32860
32860
|
|
|
32861
|
-
var HIGH_PRIORITY$
|
|
32861
|
+
var HIGH_PRIORITY$o = 1500;
|
|
32862
32862
|
|
|
32863
32863
|
|
|
32864
32864
|
/**
|
|
@@ -32926,7 +32926,7 @@
|
|
|
32926
32926
|
*/
|
|
32927
32927
|
eventBus.on('drag.start', function(event) {
|
|
32928
32928
|
|
|
32929
|
-
eventBus.once('drag.move', HIGH_PRIORITY$
|
|
32929
|
+
eventBus.once('drag.move', HIGH_PRIORITY$o, function(event) {
|
|
32930
32930
|
|
|
32931
32931
|
ensureHover(event);
|
|
32932
32932
|
|
|
@@ -32957,7 +32957,7 @@
|
|
|
32957
32957
|
hover = event.element;
|
|
32958
32958
|
});
|
|
32959
32959
|
|
|
32960
|
-
eventBus.on('element.hover', HIGH_PRIORITY$
|
|
32960
|
+
eventBus.on('element.hover', HIGH_PRIORITY$o, function(event) {
|
|
32961
32961
|
|
|
32962
32962
|
// (3) am I on an element still?
|
|
32963
32963
|
if (hover) {
|
|
@@ -34909,7 +34909,7 @@
|
|
|
34909
34909
|
MARKER_CONNECT_UPDATING$1 = 'djs-updating',
|
|
34910
34910
|
MARKER_DRAGGER = 'djs-dragging';
|
|
34911
34911
|
|
|
34912
|
-
var HIGH_PRIORITY$
|
|
34912
|
+
var HIGH_PRIORITY$n = 1100;
|
|
34913
34913
|
|
|
34914
34914
|
/**
|
|
34915
34915
|
* Preview connection while moving bendpoints.
|
|
@@ -34977,7 +34977,7 @@
|
|
|
34977
34977
|
eventBus.on([
|
|
34978
34978
|
'bendpoint.move.out',
|
|
34979
34979
|
'bendpoint.move.cleanup'
|
|
34980
|
-
], HIGH_PRIORITY$
|
|
34980
|
+
], HIGH_PRIORITY$n, function(event) {
|
|
34981
34981
|
var context = event.context,
|
|
34982
34982
|
hover = context.hover,
|
|
34983
34983
|
target = context.target;
|
|
@@ -35063,7 +35063,7 @@
|
|
|
35063
35063
|
eventBus.on([
|
|
35064
35064
|
'bendpoint.move.end',
|
|
35065
35065
|
'bendpoint.move.cancel'
|
|
35066
|
-
], HIGH_PRIORITY$
|
|
35066
|
+
], HIGH_PRIORITY$n, function(event) {
|
|
35067
35067
|
var context = event.context,
|
|
35068
35068
|
connection = context.connection,
|
|
35069
35069
|
draggerGfx = context.draggerGfx,
|
|
@@ -36079,7 +36079,7 @@
|
|
|
36079
36079
|
* @typedef {import('../../core/EventBus').default} EventBus
|
|
36080
36080
|
*/
|
|
36081
36081
|
|
|
36082
|
-
var HIGH_PRIORITY$
|
|
36082
|
+
var HIGH_PRIORITY$m = 1100,
|
|
36083
36083
|
LOW_PRIORITY$p = 900;
|
|
36084
36084
|
|
|
36085
36085
|
var MARKER_OK$3 = 'connect-ok',
|
|
@@ -36140,7 +36140,7 @@
|
|
|
36140
36140
|
eventBus.on([
|
|
36141
36141
|
'connect.out',
|
|
36142
36142
|
'connect.cleanup'
|
|
36143
|
-
], HIGH_PRIORITY$
|
|
36143
|
+
], HIGH_PRIORITY$m, function(event) {
|
|
36144
36144
|
var hover = event.hover;
|
|
36145
36145
|
|
|
36146
36146
|
if (hover) {
|
|
@@ -37466,7 +37466,7 @@
|
|
|
37466
37466
|
|
|
37467
37467
|
var PARTICIPANT_BORDER_WIDTH = 30;
|
|
37468
37468
|
|
|
37469
|
-
var HIGH_PRIORITY$
|
|
37469
|
+
var HIGH_PRIORITY$l = 2000;
|
|
37470
37470
|
|
|
37471
37471
|
|
|
37472
37472
|
/**
|
|
@@ -37483,7 +37483,7 @@
|
|
|
37483
37483
|
eventBus.on([
|
|
37484
37484
|
'create.start',
|
|
37485
37485
|
'shape.move.start'
|
|
37486
|
-
], HIGH_PRIORITY$
|
|
37486
|
+
], HIGH_PRIORITY$l, function(event) {
|
|
37487
37487
|
var context = event.context,
|
|
37488
37488
|
shape = context.shape,
|
|
37489
37489
|
rootElement = canvas.getRootElement();
|
|
@@ -37518,7 +37518,7 @@
|
|
|
37518
37518
|
});
|
|
37519
37519
|
|
|
37520
37520
|
// force hovering process when creating first participant
|
|
37521
|
-
eventBus.on('create.start', HIGH_PRIORITY$
|
|
37521
|
+
eventBus.on('create.start', HIGH_PRIORITY$l, function(event) {
|
|
37522
37522
|
var context = event.context,
|
|
37523
37523
|
shape = context.shape,
|
|
37524
37524
|
rootElement = canvas.getRootElement(),
|
|
@@ -37530,7 +37530,7 @@
|
|
|
37530
37530
|
}
|
|
37531
37531
|
|
|
37532
37532
|
if (is$6(shape, 'bpmn:Participant') && is$6(rootElement, 'bpmn:Process')) {
|
|
37533
|
-
eventBus.on('element.hover', HIGH_PRIORITY$
|
|
37533
|
+
eventBus.on('element.hover', HIGH_PRIORITY$l, ensureHoveringProcess);
|
|
37534
37534
|
|
|
37535
37535
|
eventBus.once('create.cleanup', function() {
|
|
37536
37536
|
eventBus.off('element.hover', ensureHoveringProcess);
|
|
@@ -37551,7 +37551,7 @@
|
|
|
37551
37551
|
|
|
37552
37552
|
// when creating mutliple elements through `elements.create` parent must be set to collaboration
|
|
37553
37553
|
// and passed to `shape.create` as hint
|
|
37554
|
-
this.preExecute('elements.create', HIGH_PRIORITY$
|
|
37554
|
+
this.preExecute('elements.create', HIGH_PRIORITY$l, function(context) {
|
|
37555
37555
|
var elements = context.elements,
|
|
37556
37556
|
parent = context.parent,
|
|
37557
37557
|
participant = findParticipant(elements),
|
|
@@ -38973,7 +38973,7 @@
|
|
|
38973
38973
|
* @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
|
|
38974
38974
|
*/
|
|
38975
38975
|
|
|
38976
|
-
var HIGH_PRIORITY$
|
|
38976
|
+
var HIGH_PRIORITY$k = 1500;
|
|
38977
38977
|
var HIGHEST_PRIORITY = 2000;
|
|
38978
38978
|
|
|
38979
38979
|
|
|
@@ -38995,7 +38995,7 @@
|
|
|
38995
38995
|
'shape.move.move',
|
|
38996
38996
|
'shape.move.out',
|
|
38997
38997
|
'shape.move.end'
|
|
38998
|
-
], HIGH_PRIORITY$
|
|
38998
|
+
], HIGH_PRIORITY$k, function(event) {
|
|
38999
38999
|
var context = event.context,
|
|
39000
39000
|
shape = context.shape || event.shape,
|
|
39001
39001
|
hover = event.hover;
|
|
@@ -39026,7 +39026,7 @@
|
|
|
39026
39026
|
'global-connect.out',
|
|
39027
39027
|
'global-connect.end',
|
|
39028
39028
|
'global-connect.cleanup'
|
|
39029
|
-
], HIGH_PRIORITY$
|
|
39029
|
+
], HIGH_PRIORITY$k, function(event) {
|
|
39030
39030
|
var hover = event.hover;
|
|
39031
39031
|
|
|
39032
39032
|
// ensure connections start/end on bpmn:Participant,
|
|
@@ -39040,7 +39040,7 @@
|
|
|
39040
39040
|
|
|
39041
39041
|
eventBus.on([
|
|
39042
39042
|
'bendpoint.move.hover'
|
|
39043
|
-
], HIGH_PRIORITY$
|
|
39043
|
+
], HIGH_PRIORITY$k, function(event) {
|
|
39044
39044
|
var context = event.context,
|
|
39045
39045
|
hover = event.hover,
|
|
39046
39046
|
type = context.type;
|
|
@@ -39056,7 +39056,7 @@
|
|
|
39056
39056
|
|
|
39057
39057
|
eventBus.on([
|
|
39058
39058
|
'connect.start'
|
|
39059
|
-
], HIGH_PRIORITY$
|
|
39059
|
+
], HIGH_PRIORITY$k, function(event) {
|
|
39060
39060
|
var context = event.context,
|
|
39061
39061
|
start = context.start;
|
|
39062
39062
|
|
|
@@ -41506,7 +41506,7 @@
|
|
|
41506
41506
|
'selection'
|
|
41507
41507
|
];
|
|
41508
41508
|
|
|
41509
|
-
var HIGH_PRIORITY$
|
|
41509
|
+
var HIGH_PRIORITY$j = 1500;
|
|
41510
41510
|
|
|
41511
41511
|
/**
|
|
41512
41512
|
* @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
|
|
@@ -41549,7 +41549,7 @@
|
|
|
41549
41549
|
* @param {EventBus} eventBus
|
|
41550
41550
|
*/
|
|
41551
41551
|
function ResizeBehavior$1(eventBus) {
|
|
41552
|
-
eventBus.on('resize.start', HIGH_PRIORITY$
|
|
41552
|
+
eventBus.on('resize.start', HIGH_PRIORITY$j, function(event) {
|
|
41553
41553
|
var context = event.context,
|
|
41554
41554
|
shape = context.shape,
|
|
41555
41555
|
direction = context.direction,
|
|
@@ -42092,7 +42092,7 @@
|
|
|
42092
42092
|
*/
|
|
42093
42093
|
|
|
42094
42094
|
var LOW_PRIORITY$k = 400;
|
|
42095
|
-
var HIGH_PRIORITY$
|
|
42095
|
+
var HIGH_PRIORITY$i = 600;
|
|
42096
42096
|
|
|
42097
42097
|
var DEFAULT_POSITION = {
|
|
42098
42098
|
x: 180,
|
|
@@ -42379,7 +42379,7 @@
|
|
|
42379
42379
|
}, true);
|
|
42380
42380
|
|
|
42381
42381
|
// move elements between planes
|
|
42382
|
-
this.postExecuted('shape.toggleCollapse', HIGH_PRIORITY$
|
|
42382
|
+
this.postExecuted('shape.toggleCollapse', HIGH_PRIORITY$i, function(context) {
|
|
42383
42383
|
var shape = context.shape;
|
|
42384
42384
|
|
|
42385
42385
|
if (!is$6(shape, 'bpmn:SubProcess')) {
|
|
@@ -43027,7 +43027,7 @@
|
|
|
43027
43027
|
*/
|
|
43028
43028
|
|
|
43029
43029
|
var LOW_PRIORITY$i = 500,
|
|
43030
|
-
HIGH_PRIORITY$
|
|
43030
|
+
HIGH_PRIORITY$h = 5000;
|
|
43031
43031
|
|
|
43032
43032
|
|
|
43033
43033
|
/**
|
|
@@ -43101,7 +43101,7 @@
|
|
|
43101
43101
|
|
|
43102
43102
|
// listen to a lot of stuff to group lane updates
|
|
43103
43103
|
|
|
43104
|
-
this.preExecute(laneRefUpdateEvents, HIGH_PRIORITY$
|
|
43104
|
+
this.preExecute(laneRefUpdateEvents, HIGH_PRIORITY$h, function(event) {
|
|
43105
43105
|
initContext();
|
|
43106
43106
|
});
|
|
43107
43107
|
|
|
@@ -44429,7 +44429,7 @@
|
|
|
44429
44429
|
* @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
|
|
44430
44430
|
*/
|
|
44431
44431
|
|
|
44432
|
-
var HIGH_PRIORITY$
|
|
44432
|
+
var HIGH_PRIORITY$g = 2000;
|
|
44433
44433
|
|
|
44434
44434
|
/**
|
|
44435
44435
|
* @param {EventBus} eventBus
|
|
@@ -44437,7 +44437,7 @@
|
|
|
44437
44437
|
*/
|
|
44438
44438
|
function BpmnDiOrdering(eventBus, canvas) {
|
|
44439
44439
|
|
|
44440
|
-
eventBus.on('saveXML.start', HIGH_PRIORITY$
|
|
44440
|
+
eventBus.on('saveXML.start', HIGH_PRIORITY$g, orderDi);
|
|
44441
44441
|
|
|
44442
44442
|
function orderDi() {
|
|
44443
44443
|
var rootElements = canvas.getRootElements();
|
|
@@ -44804,7 +44804,7 @@
|
|
|
44804
44804
|
|
|
44805
44805
|
var PREFIX = 'create';
|
|
44806
44806
|
|
|
44807
|
-
var HIGH_PRIORITY$
|
|
44807
|
+
var HIGH_PRIORITY$f = 2000;
|
|
44808
44808
|
|
|
44809
44809
|
|
|
44810
44810
|
/**
|
|
@@ -45032,7 +45032,7 @@
|
|
|
45032
45032
|
eventBus.on('create.init', function() {
|
|
45033
45033
|
eventBus.on('elements.changed', cancel);
|
|
45034
45034
|
|
|
45035
|
-
eventBus.once([ 'create.cancel', 'create.end' ], HIGH_PRIORITY$
|
|
45035
|
+
eventBus.once([ 'create.cancel', 'create.end' ], HIGH_PRIORITY$f, function() {
|
|
45036
45036
|
eventBus.off('elements.changed', cancel);
|
|
45037
45037
|
});
|
|
45038
45038
|
});
|
|
@@ -47172,7 +47172,7 @@
|
|
|
47172
47172
|
e: 'right'
|
|
47173
47173
|
};
|
|
47174
47174
|
|
|
47175
|
-
var HIGH_PRIORITY$
|
|
47175
|
+
var HIGH_PRIORITY$e = 1500;
|
|
47176
47176
|
|
|
47177
47177
|
var DIRECTION_TO_OPPOSITE = {
|
|
47178
47178
|
n: 's',
|
|
@@ -47221,7 +47221,7 @@
|
|
|
47221
47221
|
});
|
|
47222
47222
|
});
|
|
47223
47223
|
|
|
47224
|
-
eventBus.on('spaceTool.move', HIGH_PRIORITY$
|
|
47224
|
+
eventBus.on('spaceTool.move', HIGH_PRIORITY$e , function(event) {
|
|
47225
47225
|
var context = event.context,
|
|
47226
47226
|
initialized = context.initialized;
|
|
47227
47227
|
|
|
@@ -48710,7 +48710,7 @@
|
|
|
48710
48710
|
}
|
|
48711
48711
|
|
|
48712
48712
|
var LOW_PRIORITY$d = 250,
|
|
48713
|
-
HIGH_PRIORITY$
|
|
48713
|
+
HIGH_PRIORITY$d = 1400;
|
|
48714
48714
|
|
|
48715
48715
|
/**
|
|
48716
48716
|
* @typedef {import('../../model/Types').Element} Element
|
|
@@ -48737,7 +48737,7 @@
|
|
|
48737
48737
|
|
|
48738
48738
|
// remove labels from the collection that are being
|
|
48739
48739
|
// moved with other elements anyway
|
|
48740
|
-
eventBus.on('shape.move.start', HIGH_PRIORITY$
|
|
48740
|
+
eventBus.on('shape.move.start', HIGH_PRIORITY$d, function(e) {
|
|
48741
48741
|
|
|
48742
48742
|
var context = e.context,
|
|
48743
48743
|
shapes = context.shapes,
|
|
@@ -48776,7 +48776,7 @@
|
|
|
48776
48776
|
});
|
|
48777
48777
|
|
|
48778
48778
|
// add all labels to move closure
|
|
48779
|
-
this.preExecuted('elements.move', HIGH_PRIORITY$
|
|
48779
|
+
this.preExecuted('elements.move', HIGH_PRIORITY$d, function(e) {
|
|
48780
48780
|
var context = e.context,
|
|
48781
48781
|
closure = context.closure,
|
|
48782
48782
|
enclosedElements = closure.enclosedElements;
|
|
@@ -48892,7 +48892,7 @@
|
|
|
48892
48892
|
*/
|
|
48893
48893
|
|
|
48894
48894
|
var LOW_PRIORITY$c = 251,
|
|
48895
|
-
HIGH_PRIORITY$
|
|
48895
|
+
HIGH_PRIORITY$c = 1401;
|
|
48896
48896
|
|
|
48897
48897
|
var MARKER_ATTACH$1 = 'attach-ok';
|
|
48898
48898
|
|
|
@@ -48921,7 +48921,7 @@
|
|
|
48921
48921
|
|
|
48922
48922
|
// remove all the attached elements from the shapes to be validated
|
|
48923
48923
|
// add all the attached shapes to the overall list of moved shapes
|
|
48924
|
-
eventBus.on('shape.move.start', HIGH_PRIORITY$
|
|
48924
|
+
eventBus.on('shape.move.start', HIGH_PRIORITY$c, function(e) {
|
|
48925
48925
|
|
|
48926
48926
|
var context = e.context,
|
|
48927
48927
|
shapes = context.shapes,
|
|
@@ -48974,7 +48974,7 @@
|
|
|
48974
48974
|
});
|
|
48975
48975
|
|
|
48976
48976
|
// add all attachers to move closure
|
|
48977
|
-
this.preExecuted('elements.move', HIGH_PRIORITY$
|
|
48977
|
+
this.preExecuted('elements.move', HIGH_PRIORITY$c, function(e) {
|
|
48978
48978
|
var context = e.context,
|
|
48979
48979
|
closure = context.closure,
|
|
48980
48980
|
shapes = context.shapes,
|
|
@@ -60622,7 +60622,7 @@
|
|
|
60622
60622
|
* @typedef {import('../../grid-snapping/GridSnapping').default} GridSnapping
|
|
60623
60623
|
*/
|
|
60624
60624
|
|
|
60625
|
-
var HIGH_PRIORITY$
|
|
60625
|
+
var HIGH_PRIORITY$b = 2000;
|
|
60626
60626
|
|
|
60627
60627
|
/**
|
|
60628
60628
|
* Integrates space tool with grid snapping.
|
|
@@ -60634,7 +60634,7 @@
|
|
|
60634
60634
|
eventBus.on([
|
|
60635
60635
|
'spaceTool.move',
|
|
60636
60636
|
'spaceTool.end'
|
|
60637
|
-
], HIGH_PRIORITY$
|
|
60637
|
+
], HIGH_PRIORITY$b, function(event) {
|
|
60638
60638
|
var context = event.context;
|
|
60639
60639
|
|
|
60640
60640
|
if (!context.initialized) {
|
|
@@ -60693,14 +60693,14 @@
|
|
|
60693
60693
|
* @typedef {import('diagram-js/lib/util/Types').Axis} Axis
|
|
60694
60694
|
*/
|
|
60695
60695
|
|
|
60696
|
-
var HIGH_PRIORITY$
|
|
60696
|
+
var HIGH_PRIORITY$a = 2000;
|
|
60697
60697
|
|
|
60698
60698
|
/**
|
|
60699
60699
|
* @param {EventBus} eventBus
|
|
60700
60700
|
* @param {GridSnapping} gridSnapping
|
|
60701
60701
|
*/
|
|
60702
60702
|
function GridSnappingAutoPlaceBehavior(eventBus, gridSnapping) {
|
|
60703
|
-
eventBus.on('autoPlace', HIGH_PRIORITY$
|
|
60703
|
+
eventBus.on('autoPlace', HIGH_PRIORITY$a, function(context) {
|
|
60704
60704
|
var source = context.source,
|
|
60705
60705
|
sourceMid = getMid(source),
|
|
60706
60706
|
shape = context.shape;
|
|
@@ -60809,7 +60809,7 @@
|
|
|
60809
60809
|
* @typedef {import('diagram-js/lib/util/Types').Point} Point
|
|
60810
60810
|
*/
|
|
60811
60811
|
|
|
60812
|
-
var HIGH_PRIORITY$
|
|
60812
|
+
var HIGH_PRIORITY$9 = 3000;
|
|
60813
60813
|
|
|
60814
60814
|
|
|
60815
60815
|
/**
|
|
@@ -60829,7 +60829,7 @@
|
|
|
60829
60829
|
this.postExecuted([
|
|
60830
60830
|
'connection.create',
|
|
60831
60831
|
'connection.layout'
|
|
60832
|
-
], HIGH_PRIORITY$
|
|
60832
|
+
], HIGH_PRIORITY$9, function(event) {
|
|
60833
60833
|
var context = event.context,
|
|
60834
60834
|
connection = context.connection,
|
|
60835
60835
|
hints = context.hints || {},
|
|
@@ -62058,7 +62058,7 @@
|
|
|
62058
62058
|
* } } DirectEditingContext
|
|
62059
62059
|
*/
|
|
62060
62060
|
|
|
62061
|
-
var HIGH_PRIORITY$
|
|
62061
|
+
var HIGH_PRIORITY$8 = 2000;
|
|
62062
62062
|
|
|
62063
62063
|
/**
|
|
62064
62064
|
* @param {EventBus} eventBus
|
|
@@ -62103,7 +62103,7 @@
|
|
|
62103
62103
|
eventBus.on([
|
|
62104
62104
|
'shape.remove',
|
|
62105
62105
|
'connection.remove'
|
|
62106
|
-
], HIGH_PRIORITY$
|
|
62106
|
+
], HIGH_PRIORITY$8, function(event) {
|
|
62107
62107
|
|
|
62108
62108
|
if (directEditing.isActive(event.element)) {
|
|
62109
62109
|
directEditing.cancel();
|
|
@@ -63075,7 +63075,7 @@
|
|
|
63075
63075
|
|
|
63076
63076
|
var LOW_PRIORITY$8 = 500,
|
|
63077
63077
|
MEDIUM_PRIORITY = 1250,
|
|
63078
|
-
HIGH_PRIORITY$
|
|
63078
|
+
HIGH_PRIORITY$7 = 1500;
|
|
63079
63079
|
|
|
63080
63080
|
var round = Math.round;
|
|
63081
63081
|
|
|
@@ -63125,7 +63125,7 @@
|
|
|
63125
63125
|
// * validatedShapes: a list of shapes that are being checked
|
|
63126
63126
|
// against the rules before and during move
|
|
63127
63127
|
//
|
|
63128
|
-
eventBus.on('shape.move.start', HIGH_PRIORITY$
|
|
63128
|
+
eventBus.on('shape.move.start', HIGH_PRIORITY$7, function(event) {
|
|
63129
63129
|
|
|
63130
63130
|
var context = event.context,
|
|
63131
63131
|
shape = event.shape,
|
|
@@ -64554,7 +64554,7 @@
|
|
|
64554
64554
|
* @typedef {import('../tool-manager/ToolManager').default} ToolManager
|
|
64555
64555
|
*/
|
|
64556
64556
|
|
|
64557
|
-
var HIGH_PRIORITY$
|
|
64557
|
+
var HIGH_PRIORITY$6 = 1500;
|
|
64558
64558
|
var HAND_CURSOR = 'grab';
|
|
64559
64559
|
|
|
64560
64560
|
/**
|
|
@@ -64580,7 +64580,7 @@
|
|
|
64580
64580
|
dragging: 'hand.move'
|
|
64581
64581
|
});
|
|
64582
64582
|
|
|
64583
|
-
eventBus.on('element.mousedown', HIGH_PRIORITY$
|
|
64583
|
+
eventBus.on('element.mousedown', HIGH_PRIORITY$6, function(event) {
|
|
64584
64584
|
|
|
64585
64585
|
if (!hasPrimaryModifier(event)) {
|
|
64586
64586
|
return;
|
|
@@ -64591,7 +64591,7 @@
|
|
|
64591
64591
|
return false;
|
|
64592
64592
|
});
|
|
64593
64593
|
|
|
64594
|
-
keyboard && keyboard.addListener(HIGH_PRIORITY$
|
|
64594
|
+
keyboard && keyboard.addListener(HIGH_PRIORITY$6, function(e) {
|
|
64595
64595
|
if (!isSpace$1(e.keyEvent) || self.isActive()) {
|
|
64596
64596
|
return;
|
|
64597
64597
|
}
|
|
@@ -64601,7 +64601,7 @@
|
|
|
64601
64601
|
self.activateMove(mouseEvent, !!mouseEvent);
|
|
64602
64602
|
}, 'keyboard.keydown');
|
|
64603
64603
|
|
|
64604
|
-
keyboard && keyboard.addListener(HIGH_PRIORITY$
|
|
64604
|
+
keyboard && keyboard.addListener(HIGH_PRIORITY$6, function(e) {
|
|
64605
64605
|
if (!isSpace$1(e.keyEvent) || !self.isActive()) {
|
|
64606
64606
|
return;
|
|
64607
64607
|
}
|
|
@@ -65897,7 +65897,7 @@
|
|
|
65897
65897
|
* @typedef {import('../../model/Types').Shape} Shape
|
|
65898
65898
|
*/
|
|
65899
65899
|
|
|
65900
|
-
var HIGH_PRIORITY$
|
|
65900
|
+
var HIGH_PRIORITY$5 = 1500;
|
|
65901
65901
|
|
|
65902
65902
|
|
|
65903
65903
|
/**
|
|
@@ -65910,7 +65910,7 @@
|
|
|
65910
65910
|
injector.invoke(CreateMoveSnapping, this);
|
|
65911
65911
|
|
|
65912
65912
|
// creating first participant
|
|
65913
|
-
eventBus.on([ 'create.move', 'create.end' ], HIGH_PRIORITY$
|
|
65913
|
+
eventBus.on([ 'create.move', 'create.end' ], HIGH_PRIORITY$5, setSnappedIfConstrained);
|
|
65914
65914
|
|
|
65915
65915
|
// snap boundary events
|
|
65916
65916
|
eventBus.on([
|
|
@@ -65918,7 +65918,7 @@
|
|
|
65918
65918
|
'create.end',
|
|
65919
65919
|
'shape.move.move',
|
|
65920
65920
|
'shape.move.end'
|
|
65921
|
-
], HIGH_PRIORITY$
|
|
65921
|
+
], HIGH_PRIORITY$5, function(event) {
|
|
65922
65922
|
var context = event.context,
|
|
65923
65923
|
canExecute = context.canExecute,
|
|
65924
65924
|
target = context.target;
|
|
@@ -116869,7 +116869,7 @@
|
|
|
116869
116869
|
});
|
|
116870
116870
|
}
|
|
116871
116871
|
|
|
116872
|
-
const HIGH_PRIORITY$
|
|
116872
|
+
const HIGH_PRIORITY$4 = 5000;
|
|
116873
116873
|
|
|
116874
116874
|
|
|
116875
116875
|
/**
|
|
@@ -116883,7 +116883,7 @@
|
|
|
116883
116883
|
this.postExecute([
|
|
116884
116884
|
'element.updateProperties',
|
|
116885
116885
|
'element.updateModdleProperties'
|
|
116886
|
-
], HIGH_PRIORITY$
|
|
116886
|
+
], HIGH_PRIORITY$4, function(context) {
|
|
116887
116887
|
const {
|
|
116888
116888
|
element,
|
|
116889
116889
|
moddleElement,
|
|
@@ -116954,7 +116954,7 @@
|
|
|
116954
116954
|
'modeling'
|
|
116955
116955
|
];
|
|
116956
116956
|
|
|
116957
|
-
const HIGH_PRIORITY$
|
|
116957
|
+
const HIGH_PRIORITY$3 = 5000;
|
|
116958
116958
|
|
|
116959
116959
|
|
|
116960
116960
|
/**
|
|
@@ -116969,7 +116969,7 @@
|
|
|
116969
116969
|
this.postExecute([
|
|
116970
116970
|
'element.updateProperties',
|
|
116971
116971
|
'element.updateModdleProperties'
|
|
116972
|
-
], HIGH_PRIORITY$
|
|
116972
|
+
], HIGH_PRIORITY$3, function(context) {
|
|
116973
116973
|
const {
|
|
116974
116974
|
element,
|
|
116975
116975
|
moddleElement,
|
|
@@ -117134,7 +117134,7 @@
|
|
|
117134
117134
|
'modeling'
|
|
117135
117135
|
];
|
|
117136
117136
|
|
|
117137
|
-
const HIGH_PRIORITY$
|
|
117137
|
+
const HIGH_PRIORITY$2 = 5000;
|
|
117138
117138
|
|
|
117139
117139
|
|
|
117140
117140
|
/**
|
|
@@ -117148,7 +117148,7 @@
|
|
|
117148
117148
|
this.preExecute([
|
|
117149
117149
|
'element.updateProperties',
|
|
117150
117150
|
'element.updateModdleProperties',
|
|
117151
|
-
], HIGH_PRIORITY$
|
|
117151
|
+
], HIGH_PRIORITY$2, function(context) {
|
|
117152
117152
|
const {
|
|
117153
117153
|
element,
|
|
117154
117154
|
moddleElement,
|
|
@@ -117243,7 +117243,7 @@
|
|
|
117243
117243
|
'eventBus'
|
|
117244
117244
|
];
|
|
117245
117245
|
|
|
117246
|
-
const HIGH_PRIORITY = 5000;
|
|
117246
|
+
const HIGH_PRIORITY$1 = 5000;
|
|
117247
117247
|
|
|
117248
117248
|
|
|
117249
117249
|
/**
|
|
@@ -117257,7 +117257,7 @@
|
|
|
117257
117257
|
this.preExecute([
|
|
117258
117258
|
'element.updateProperties',
|
|
117259
117259
|
'element.updateModdleProperties'
|
|
117260
|
-
], HIGH_PRIORITY, function(context) {
|
|
117260
|
+
], HIGH_PRIORITY$1, function(context) {
|
|
117261
117261
|
const {
|
|
117262
117262
|
element,
|
|
117263
117263
|
moddleElement,
|
|
@@ -118379,11 +118379,11 @@
|
|
|
118379
118379
|
}
|
|
118380
118380
|
businessObject = eventDefinitions[0];
|
|
118381
118381
|
}
|
|
118382
|
+
if (!businessObject) {
|
|
118383
|
+
return;
|
|
118384
|
+
}
|
|
118382
118385
|
return businessObject.get('messageRef');
|
|
118383
118386
|
}
|
|
118384
|
-
function findZeebeSubscription(message) {
|
|
118385
|
-
return findExtension$1(message, 'zeebe:Subscription');
|
|
118386
|
-
}
|
|
118387
118387
|
function getDefaultValue(property) {
|
|
118388
118388
|
if (property.value !== undefined) {
|
|
118389
118389
|
return property.value;
|
|
@@ -118969,242 +118969,6 @@
|
|
|
118969
118969
|
// should never throw as templates are validated beforehand
|
|
118970
118970
|
throw unknownBindingError$1(element, property);
|
|
118971
118971
|
}
|
|
118972
|
-
function unsetProperty(commandStack, element, property) {
|
|
118973
|
-
let businessObject = getBusinessObject$2(element);
|
|
118974
|
-
const {
|
|
118975
|
-
binding
|
|
118976
|
-
} = property;
|
|
118977
|
-
const {
|
|
118978
|
-
type
|
|
118979
|
-
} = binding;
|
|
118980
|
-
let extensionElements;
|
|
118981
|
-
const commands = [];
|
|
118982
|
-
const context = {
|
|
118983
|
-
element,
|
|
118984
|
-
property
|
|
118985
|
-
};
|
|
118986
|
-
if (MESSAGE_BINDING_TYPES.includes(type)) {
|
|
118987
|
-
businessObject = findMessage(businessObject);
|
|
118988
|
-
if (!businessObject) {
|
|
118989
|
-
return;
|
|
118990
|
-
}
|
|
118991
|
-
}
|
|
118992
|
-
|
|
118993
|
-
// property
|
|
118994
|
-
if (PROPERTY_BINDING_TYPES.includes(type)) {
|
|
118995
|
-
const {
|
|
118996
|
-
name
|
|
118997
|
-
} = binding;
|
|
118998
|
-
commands.push({
|
|
118999
|
-
cmd: 'element.updateModdleProperties',
|
|
119000
|
-
context: {
|
|
119001
|
-
...context,
|
|
119002
|
-
moddleElement: businessObject,
|
|
119003
|
-
properties: {
|
|
119004
|
-
[name]: undefined
|
|
119005
|
-
}
|
|
119006
|
-
}
|
|
119007
|
-
});
|
|
119008
|
-
}
|
|
119009
|
-
if (EXTENSION_BINDING_TYPES$1.includes(type)) {
|
|
119010
|
-
extensionElements = businessObject.get('extensionElements');
|
|
119011
|
-
if (!extensionElements) return;
|
|
119012
|
-
}
|
|
119013
|
-
|
|
119014
|
-
// zeebe:taskDefinition
|
|
119015
|
-
if (TASK_DEFINITION_TYPES.includes(type)) {
|
|
119016
|
-
const oldTaskDefinition = findExtension$1(extensionElements, 'zeebe:TaskDefinition');
|
|
119017
|
-
const propertyName = getTaskDefinitionPropertyName(binding);
|
|
119018
|
-
if (oldTaskDefinition) {
|
|
119019
|
-
if (isOnlyProperty(oldTaskDefinition, propertyName)) {
|
|
119020
|
-
// remove task definition
|
|
119021
|
-
commands.push({
|
|
119022
|
-
cmd: 'element.updateModdleProperties',
|
|
119023
|
-
context: {
|
|
119024
|
-
...context,
|
|
119025
|
-
moddleElement: extensionElements,
|
|
119026
|
-
properties: {
|
|
119027
|
-
values: without(extensionElements.get('values'), oldTaskDefinition)
|
|
119028
|
-
}
|
|
119029
|
-
}
|
|
119030
|
-
});
|
|
119031
|
-
} else {
|
|
119032
|
-
// remove property
|
|
119033
|
-
commands.push({
|
|
119034
|
-
cmd: 'element.updateModdleProperties',
|
|
119035
|
-
context: {
|
|
119036
|
-
...context,
|
|
119037
|
-
moddleElement: oldTaskDefinition,
|
|
119038
|
-
properties: {
|
|
119039
|
-
[propertyName]: undefined
|
|
119040
|
-
}
|
|
119041
|
-
}
|
|
119042
|
-
});
|
|
119043
|
-
}
|
|
119044
|
-
}
|
|
119045
|
-
}
|
|
119046
|
-
|
|
119047
|
-
// zeebe:IoMapping
|
|
119048
|
-
if (IO_BINDING_TYPES$1.includes(type)) {
|
|
119049
|
-
let ioMapping = findExtension$1(extensionElements, 'zeebe:IoMapping');
|
|
119050
|
-
if (!ioMapping) return;
|
|
119051
|
-
|
|
119052
|
-
// zeebe:Input
|
|
119053
|
-
if (type === ZEBBE_INPUT_TYPE) {
|
|
119054
|
-
const oldZeebeInputParameter = findInputParameter$1(ioMapping, binding);
|
|
119055
|
-
const values = ioMapping.get('inputParameters').filter(value => value !== oldZeebeInputParameter);
|
|
119056
|
-
if (ioMapping.get('outputParameters').length == 0 && values.length == 0) {
|
|
119057
|
-
commands.push({
|
|
119058
|
-
cmd: 'element.updateModdleProperties',
|
|
119059
|
-
context: {
|
|
119060
|
-
...context,
|
|
119061
|
-
moddleElement: extensionElements,
|
|
119062
|
-
properties: {
|
|
119063
|
-
values: without(extensionElements.get('values'), ioMapping)
|
|
119064
|
-
}
|
|
119065
|
-
}
|
|
119066
|
-
});
|
|
119067
|
-
} else {
|
|
119068
|
-
commands.push({
|
|
119069
|
-
cmd: 'element.updateModdleProperties',
|
|
119070
|
-
context: {
|
|
119071
|
-
...context,
|
|
119072
|
-
moddleElement: ioMapping,
|
|
119073
|
-
properties: {
|
|
119074
|
-
inputParameters: [...values]
|
|
119075
|
-
}
|
|
119076
|
-
}
|
|
119077
|
-
});
|
|
119078
|
-
}
|
|
119079
|
-
}
|
|
119080
|
-
|
|
119081
|
-
// zeebe:Output
|
|
119082
|
-
if (type === ZEEBE_OUTPUT_TYPE) {
|
|
119083
|
-
const oldZeebeOutputParameter = findOutputParameter$1(ioMapping, binding);
|
|
119084
|
-
const values = ioMapping.get('outputParameters').filter(value => value !== oldZeebeOutputParameter);
|
|
119085
|
-
if (ioMapping.get('inputParameters').length == 0 && values.length == 0) {
|
|
119086
|
-
commands.push({
|
|
119087
|
-
cmd: 'element.updateModdleProperties',
|
|
119088
|
-
context: {
|
|
119089
|
-
...context,
|
|
119090
|
-
moddleElement: extensionElements,
|
|
119091
|
-
properties: {
|
|
119092
|
-
values: without(extensionElements.get('values'), ioMapping)
|
|
119093
|
-
}
|
|
119094
|
-
}
|
|
119095
|
-
});
|
|
119096
|
-
}
|
|
119097
|
-
commands.push({
|
|
119098
|
-
cmd: 'element.updateModdleProperties',
|
|
119099
|
-
context: {
|
|
119100
|
-
...context,
|
|
119101
|
-
moddleElement: ioMapping,
|
|
119102
|
-
properties: {
|
|
119103
|
-
'outputParameters': [...values]
|
|
119104
|
-
}
|
|
119105
|
-
}
|
|
119106
|
-
});
|
|
119107
|
-
}
|
|
119108
|
-
}
|
|
119109
|
-
|
|
119110
|
-
// zeebe:taskHeaders
|
|
119111
|
-
if (type === ZEEBE_TASK_HEADER_TYPE) {
|
|
119112
|
-
let taskHeaders = findExtension$1(extensionElements, 'zeebe:TaskHeaders');
|
|
119113
|
-
if (!taskHeaders) return;
|
|
119114
|
-
const oldTaskHeader = findTaskHeader(taskHeaders, binding);
|
|
119115
|
-
const values = taskHeaders.get('values').filter(value => value !== oldTaskHeader);
|
|
119116
|
-
if (values.length === 0) {
|
|
119117
|
-
commands.push({
|
|
119118
|
-
cmd: 'element.updateModdleProperties',
|
|
119119
|
-
context: {
|
|
119120
|
-
...context,
|
|
119121
|
-
moddleElement: extensionElements,
|
|
119122
|
-
properties: {
|
|
119123
|
-
values: without(extensionElements.get('values'), taskHeaders)
|
|
119124
|
-
}
|
|
119125
|
-
}
|
|
119126
|
-
});
|
|
119127
|
-
} else {
|
|
119128
|
-
commands.push({
|
|
119129
|
-
cmd: 'element.updateModdleProperties',
|
|
119130
|
-
context: {
|
|
119131
|
-
...context,
|
|
119132
|
-
moddleElement: taskHeaders,
|
|
119133
|
-
properties: {
|
|
119134
|
-
values: [...values]
|
|
119135
|
-
}
|
|
119136
|
-
}
|
|
119137
|
-
});
|
|
119138
|
-
}
|
|
119139
|
-
}
|
|
119140
|
-
|
|
119141
|
-
// zeebe:Property
|
|
119142
|
-
if (type === ZEEBE_PROPERTY_TYPE) {
|
|
119143
|
-
let zeebeProperties = findExtension$1(extensionElements, 'zeebe:Properties');
|
|
119144
|
-
if (!zeebeProperties) return;
|
|
119145
|
-
const oldZeebeProperty = findZeebeProperty(zeebeProperties, binding);
|
|
119146
|
-
const properties = zeebeProperties.get('properties').filter(property => property !== oldZeebeProperty);
|
|
119147
|
-
if (!properties.length) {
|
|
119148
|
-
commands.push({
|
|
119149
|
-
cmd: 'element.updateModdleProperties',
|
|
119150
|
-
context: {
|
|
119151
|
-
...context,
|
|
119152
|
-
moddleElement: extensionElements,
|
|
119153
|
-
properties: {
|
|
119154
|
-
values: without(extensionElements.get('values'), zeebeProperties)
|
|
119155
|
-
}
|
|
119156
|
-
}
|
|
119157
|
-
});
|
|
119158
|
-
} else {
|
|
119159
|
-
commands.push({
|
|
119160
|
-
cmd: 'element.updateModdleProperties',
|
|
119161
|
-
context: {
|
|
119162
|
-
...context,
|
|
119163
|
-
moddleElement: zeebeProperties,
|
|
119164
|
-
properties: {
|
|
119165
|
-
properties: [...properties]
|
|
119166
|
-
}
|
|
119167
|
-
}
|
|
119168
|
-
});
|
|
119169
|
-
}
|
|
119170
|
-
}
|
|
119171
|
-
|
|
119172
|
-
// bpmn:Message#property
|
|
119173
|
-
if (type === MESSAGE_PROPERTY_TYPE) {
|
|
119174
|
-
commands.push({
|
|
119175
|
-
cmd: 'element.updateModdleProperties',
|
|
119176
|
-
context: {
|
|
119177
|
-
...context,
|
|
119178
|
-
moddleElement: businessObject,
|
|
119179
|
-
properties: {
|
|
119180
|
-
[binding.name]: undefined
|
|
119181
|
-
}
|
|
119182
|
-
}
|
|
119183
|
-
});
|
|
119184
|
-
}
|
|
119185
|
-
|
|
119186
|
-
// bpmn:Message#zeebe:subscription#property
|
|
119187
|
-
if (type === MESSAGE_ZEEBE_SUBSCRIPTION_PROPERTY_TYPE) {
|
|
119188
|
-
const subscription = findZeebeSubscription(businessObject);
|
|
119189
|
-
if (!subscription) {
|
|
119190
|
-
return;
|
|
119191
|
-
}
|
|
119192
|
-
commands.push({
|
|
119193
|
-
cmd: 'element.updateModdleProperties',
|
|
119194
|
-
context: {
|
|
119195
|
-
...context,
|
|
119196
|
-
moddleElement: subscription,
|
|
119197
|
-
properties: {
|
|
119198
|
-
[binding.name]: undefined
|
|
119199
|
-
}
|
|
119200
|
-
}
|
|
119201
|
-
});
|
|
119202
|
-
}
|
|
119203
|
-
if (commands.length) {
|
|
119204
|
-
commandStack.execute('properties-panel.multi-command-executor', commands);
|
|
119205
|
-
return;
|
|
119206
|
-
}
|
|
119207
|
-
}
|
|
119208
118972
|
|
|
119209
118973
|
// helpers
|
|
119210
118974
|
function unknownBindingError$1(element, property) {
|
|
@@ -119218,14 +118982,6 @@
|
|
|
119218
118982
|
} = binding;
|
|
119219
118983
|
return new Error(`unknown binding <${type}> for element <${id}>, this should never happen`);
|
|
119220
118984
|
}
|
|
119221
|
-
function isOnlyProperty(moddleElement, propertyName) {
|
|
119222
|
-
const descriptor = moddleElement.$descriptor;
|
|
119223
|
-
return descriptor.properties.every(({
|
|
119224
|
-
name
|
|
119225
|
-
}) => {
|
|
119226
|
-
return propertyName === name || moddleElement.get(name) === undefined;
|
|
119227
|
-
});
|
|
119228
|
-
}
|
|
119229
118985
|
|
|
119230
118986
|
/**
|
|
119231
118987
|
* Based on conditions, remove properties from the template.
|
|
@@ -119304,49 +119060,7 @@
|
|
|
119304
119060
|
return true;
|
|
119305
119061
|
}
|
|
119306
119062
|
|
|
119307
|
-
|
|
119308
|
-
const modeling = injector.get('modeling'),
|
|
119309
|
-
canvas = injector.get('canvas'),
|
|
119310
|
-
bpmnjs = injector.get('bpmnjs');
|
|
119311
|
-
const element = canvas.getRootElement(),
|
|
119312
|
-
definitions = bpmnjs.getDefinitions(),
|
|
119313
|
-
rootElements = definitions.get('rootElements');
|
|
119314
|
-
const newRootElements = rootElements.filter(e => e !== rootElement);
|
|
119315
|
-
|
|
119316
|
-
// short-circuit to prevent unnecessary updates
|
|
119317
|
-
if (newRootElements.length === rootElements.length) {
|
|
119318
|
-
return;
|
|
119319
|
-
}
|
|
119320
|
-
modeling.updateModdleProperties(element, definitions, {
|
|
119321
|
-
rootElements: newRootElements
|
|
119322
|
-
});
|
|
119323
|
-
}
|
|
119324
|
-
|
|
119325
|
-
/**
|
|
119326
|
-
* Remove message from element and the diagram.
|
|
119327
|
-
*
|
|
119328
|
-
* @param {import('bpmn-js/lib/model/Types').Element} element
|
|
119329
|
-
* @param {import('didi').Injector} injector
|
|
119330
|
-
*/
|
|
119331
|
-
function removeMessage(element, injector) {
|
|
119332
|
-
const modeling = injector.get('modeling');
|
|
119333
|
-
const bo = getReferringElement(element);
|
|
119334
|
-
const message = findMessage(bo);
|
|
119335
|
-
if (!message) {
|
|
119336
|
-
return;
|
|
119337
|
-
}
|
|
119338
|
-
modeling.updateModdleProperties(element, bo, {
|
|
119339
|
-
messageRef: undefined
|
|
119340
|
-
});
|
|
119341
|
-
removeRootElement(message, injector);
|
|
119342
|
-
}
|
|
119343
|
-
function getReferringElement(element) {
|
|
119344
|
-
const bo = getBusinessObject$2(element);
|
|
119345
|
-
if (is$6(bo, 'bpmn:Event')) {
|
|
119346
|
-
return bo.get('eventDefinitions')[0];
|
|
119347
|
-
}
|
|
119348
|
-
return bo;
|
|
119349
|
-
}
|
|
119063
|
+
const HIGH_PRIORITY = 2500;
|
|
119350
119064
|
|
|
119351
119065
|
/**
|
|
119352
119066
|
* Checks the conditions of an element template and sets/resets the
|
|
@@ -119362,6 +119076,20 @@
|
|
|
119362
119076
|
this._injector = injector;
|
|
119363
119077
|
this.preExecute(['element.updateProperties', 'element.updateModdleProperties'], this._saveConditionalState, true, this);
|
|
119364
119078
|
this.postExecute(['element.updateProperties', 'element.updateModdleProperties', 'propertiesPanel.zeebe.changeTemplate', 'element.move'], this._applyConditions, true, this);
|
|
119079
|
+
|
|
119080
|
+
// Apply Conditions before changing properties. This persists the template so we can check if conditions apply
|
|
119081
|
+
// after upgrading the template.
|
|
119082
|
+
this.preExecute(['propertiesPanel.zeebe.changeTemplate'], HIGH_PRIORITY, this._handleTemplateUpgrade, true, this);
|
|
119083
|
+
}
|
|
119084
|
+
_handleTemplateUpgrade(context) {
|
|
119085
|
+
const {
|
|
119086
|
+
element,
|
|
119087
|
+
newTemplate
|
|
119088
|
+
} = context;
|
|
119089
|
+
if (!element || !newTemplate) {
|
|
119090
|
+
return;
|
|
119091
|
+
}
|
|
119092
|
+
context.newTemplate = applyConditions(context.element, context.newTemplate);
|
|
119365
119093
|
}
|
|
119366
119094
|
_saveConditionalState(context) {
|
|
119367
119095
|
const {
|
|
@@ -119376,29 +119104,52 @@
|
|
|
119376
119104
|
_applyConditions(context) {
|
|
119377
119105
|
const {
|
|
119378
119106
|
element,
|
|
119379
|
-
|
|
119107
|
+
hints = {}
|
|
119380
119108
|
} = context;
|
|
119109
|
+
if (hints.skipConditionUpdate) {
|
|
119110
|
+
return;
|
|
119111
|
+
}
|
|
119381
119112
|
const template = this._elementTemplates.get(element);
|
|
119113
|
+
|
|
119114
|
+
// New Template is persisted before applying default values,
|
|
119115
|
+
// new conditions might apply after the defaults are present.
|
|
119116
|
+
const oldTemplate = context.oldTemplate || context.newTemplate;
|
|
119382
119117
|
if (!template || !oldTemplate || template.id !== oldTemplate.id) {
|
|
119383
119118
|
return;
|
|
119384
119119
|
}
|
|
119385
119120
|
const newTemplate = applyConditions(element, template);
|
|
119386
|
-
|
|
119387
|
-
|
|
119388
|
-
this._updateReferencedElement(element, oldTemplate, newTemplate);
|
|
119389
|
-
propertiesToAdd.forEach(property => setPropertyValue(this._bpmnFactory, this._commandStack, element, property, property.value));
|
|
119390
|
-
propertiesToRemove.forEach(property => unsetProperty(this._commandStack, element, property));
|
|
119391
|
-
}
|
|
119392
|
-
_updateReferencedElement(element, oldTemplate, newTemplate) {
|
|
119393
|
-
if (hasMessageProperties(oldTemplate) && !hasMessageProperties(newTemplate)) {
|
|
119394
|
-
removeMessage(element, this._injector);
|
|
119121
|
+
if (!hasDifferentPropertyBindings(newTemplate, oldTemplate)) {
|
|
119122
|
+
return;
|
|
119395
119123
|
}
|
|
119124
|
+
const changeContext = {
|
|
119125
|
+
element,
|
|
119126
|
+
newTemplate,
|
|
119127
|
+
oldTemplate,
|
|
119128
|
+
hints: {
|
|
119129
|
+
skipConditionUpdate: true
|
|
119130
|
+
}
|
|
119131
|
+
};
|
|
119132
|
+
this._commandStack.execute('propertiesPanel.zeebe.changeTemplate', changeContext);
|
|
119396
119133
|
}
|
|
119397
119134
|
}
|
|
119398
119135
|
ElementTemplatesConditionChecker.$inject = ['eventBus', 'elementTemplates', 'commandStack', 'bpmnFactory', 'injector'];
|
|
119399
119136
|
|
|
119400
119137
|
// helpers
|
|
119401
119138
|
|
|
119139
|
+
function hasDifferentPropertyBindings(sourceTemplate, targetTemplate) {
|
|
119140
|
+
return hasNewProperties(sourceTemplate, targetTemplate) || hasRemovedProperties(sourceTemplate, targetTemplate);
|
|
119141
|
+
}
|
|
119142
|
+
function hasNewProperties(sourceTemplate, targetTemplate) {
|
|
119143
|
+
let properties = targetTemplate.properties;
|
|
119144
|
+
return properties.some(targetProp => !sourceTemplate.properties.find(sourceProp => compareProps(sourceProp, targetProp)));
|
|
119145
|
+
}
|
|
119146
|
+
function hasRemovedProperties(oldTemplate, newTemplate) {
|
|
119147
|
+
const oldProperties = getMissingProperties(newTemplate, oldTemplate);
|
|
119148
|
+
|
|
119149
|
+
// ensure XML properties are mantained for properties with
|
|
119150
|
+
// different conditions but same bindings
|
|
119151
|
+
return oldProperties.some(property => !findPropertyWithBinding(newTemplate, property));
|
|
119152
|
+
}
|
|
119402
119153
|
function getMissingProperties(sourceTemplate, targetTemplate) {
|
|
119403
119154
|
let properties = targetTemplate.properties;
|
|
119404
119155
|
return properties.filter(targetProp => !sourceTemplate.properties.find(sourceProp => compareProps(sourceProp, targetProp)));
|
|
@@ -119409,13 +119160,6 @@
|
|
|
119409
119160
|
function findPropertyWithBinding(template, prop1) {
|
|
119410
119161
|
return template.properties.some(prop2 => areBindingsEqual(prop1.binding, prop2.binding));
|
|
119411
119162
|
}
|
|
119412
|
-
function getPropertiesToRemove(newTemplate, oldTemplate) {
|
|
119413
|
-
const oldProperties = getMissingProperties(newTemplate, oldTemplate);
|
|
119414
|
-
|
|
119415
|
-
// ensure XML properties are mantained for properties with
|
|
119416
|
-
// different conditions but same bindings
|
|
119417
|
-
return oldProperties.filter(property => !findPropertyWithBinding(newTemplate, property));
|
|
119418
|
-
}
|
|
119419
119163
|
function normalizeReplacer$1(key, value) {
|
|
119420
119164
|
if (isObject$1(value)) {
|
|
119421
119165
|
const keys = Object.keys(value).sort();
|
|
@@ -119448,9 +119192,6 @@
|
|
|
119448
119192
|
function equals(a, b) {
|
|
119449
119193
|
return JSON.stringify(a, normalizeReplacer$1) === JSON.stringify(b, normalizeReplacer$1);
|
|
119450
119194
|
}
|
|
119451
|
-
function hasMessageProperties(template) {
|
|
119452
|
-
return template.properties.some(p => MESSAGE_BINDING_TYPES.includes(p.binding.type));
|
|
119453
|
-
}
|
|
119454
119195
|
|
|
119455
119196
|
/**
|
|
119456
119197
|
* The BPMN 2.0 extension attribute name under
|
|
@@ -120360,6 +120101,31 @@
|
|
|
120360
120101
|
return !is$6(eventDefinitions[0], eventDefinition);
|
|
120361
120102
|
}
|
|
120362
120103
|
|
|
120104
|
+
function removeRootElement(rootElement, injector) {
|
|
120105
|
+
const modeling = injector.get('modeling'),
|
|
120106
|
+
canvas = injector.get('canvas'),
|
|
120107
|
+
bpmnjs = injector.get('bpmnjs');
|
|
120108
|
+
const element = canvas.getRootElement(),
|
|
120109
|
+
definitions = bpmnjs.getDefinitions(),
|
|
120110
|
+
rootElements = definitions.get('rootElements');
|
|
120111
|
+
const newRootElements = rootElements.filter(e => e !== rootElement);
|
|
120112
|
+
|
|
120113
|
+
// short-circuit to prevent unnecessary updates
|
|
120114
|
+
if (newRootElements.length === rootElements.length) {
|
|
120115
|
+
return;
|
|
120116
|
+
}
|
|
120117
|
+
modeling.updateModdleProperties(element, definitions, {
|
|
120118
|
+
rootElements: newRootElements
|
|
120119
|
+
});
|
|
120120
|
+
}
|
|
120121
|
+
function getReferringElement(element) {
|
|
120122
|
+
const bo = getBusinessObject$2(element);
|
|
120123
|
+
if (is$6(bo, 'bpmn:Event')) {
|
|
120124
|
+
return bo.get('eventDefinitions')[0];
|
|
120125
|
+
}
|
|
120126
|
+
return bo;
|
|
120127
|
+
}
|
|
120128
|
+
|
|
120363
120129
|
class RemoveElementTemplateHandler {
|
|
120364
120130
|
constructor(modeling, elementFactory, elementRegistry, canvas, bpmnFactory, replace, commandStack) {
|
|
120365
120131
|
this._modeling = modeling;
|