camunda-bpmn-js 2.3.1 → 2.5.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/assets/properties-panel.css +40 -12
- package/dist/base-modeler.development.js +173 -250
- package/dist/base-modeler.production.min.js +31 -33
- package/dist/base-navigated-viewer.development.js +52 -33
- package/dist/base-navigated-viewer.production.min.js +1 -1
- package/dist/base-viewer.development.js +52 -33
- package/dist/base-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-modeler.development.js +867 -460
- package/dist/camunda-cloud-modeler.production.min.js +32 -34
- package/dist/camunda-cloud-navigated-viewer.development.js +119 -99
- package/dist/camunda-cloud-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-viewer.development.js +119 -99
- package/dist/camunda-cloud-viewer.production.min.js +1 -1
- package/dist/camunda-platform-modeler.development.js +591 -346
- package/dist/camunda-platform-modeler.production.min.js +31 -33
- package/dist/camunda-platform-navigated-viewer.development.js +52 -33
- package/dist/camunda-platform-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-platform-viewer.development.js +52 -33
- package/dist/camunda-platform-viewer.production.min.js +1 -1
- package/lib/camunda-cloud/util/commonModules.js +1 -1
- package/package.json +9 -10
|
@@ -1000,7 +1000,7 @@
|
|
|
1000
1000
|
*
|
|
1001
1001
|
* @return {Object} the target
|
|
1002
1002
|
*/
|
|
1003
|
-
function merge(target, ...sources) {
|
|
1003
|
+
function merge$1(target, ...sources) {
|
|
1004
1004
|
|
|
1005
1005
|
if (!sources.length) {
|
|
1006
1006
|
return target;
|
|
@@ -1029,7 +1029,7 @@
|
|
|
1029
1029
|
targetVal = {};
|
|
1030
1030
|
}
|
|
1031
1031
|
|
|
1032
|
-
target[key] = merge(targetVal, sourceVal);
|
|
1032
|
+
target[key] = merge$1(targetVal, sourceVal);
|
|
1033
1033
|
} else {
|
|
1034
1034
|
target[key] = sourceVal;
|
|
1035
1035
|
}
|
|
@@ -1066,7 +1066,7 @@
|
|
|
1066
1066
|
keys: keys,
|
|
1067
1067
|
map: map$2,
|
|
1068
1068
|
matchPattern: matchPattern,
|
|
1069
|
-
merge: merge,
|
|
1069
|
+
merge: merge$1,
|
|
1070
1070
|
omit: omit,
|
|
1071
1071
|
pick: pick,
|
|
1072
1072
|
reduce: reduce,
|
|
@@ -4783,7 +4783,29 @@
|
|
|
4783
4783
|
|
|
4784
4784
|
var intersect = findPathIntersections;
|
|
4785
4785
|
|
|
4786
|
-
var intersectPaths = intersect;
|
|
4786
|
+
var intersectPaths = /*@__PURE__*/getDefaultExportFromCjs(intersect);
|
|
4787
|
+
|
|
4788
|
+
/**
|
|
4789
|
+
* Checks whether a value is an instance of Connection.
|
|
4790
|
+
*
|
|
4791
|
+
* @param {any} value
|
|
4792
|
+
*
|
|
4793
|
+
* @return {boolean}
|
|
4794
|
+
*/
|
|
4795
|
+
function isConnection$2(value) {
|
|
4796
|
+
return isObject$1(value) && has$2(value, 'waypoints');
|
|
4797
|
+
}
|
|
4798
|
+
|
|
4799
|
+
/**
|
|
4800
|
+
* Checks whether a value is an instance of Label.
|
|
4801
|
+
*
|
|
4802
|
+
* @param {any} value
|
|
4803
|
+
*
|
|
4804
|
+
* @return {boolean}
|
|
4805
|
+
*/
|
|
4806
|
+
function isLabel$2(value) {
|
|
4807
|
+
return isObject$1(value) && has$2(value, 'labelTarget');
|
|
4808
|
+
}
|
|
4787
4809
|
|
|
4788
4810
|
/**
|
|
4789
4811
|
* @typedef {import('../core/Types').ElementLike} Element
|
|
@@ -4939,7 +4961,7 @@
|
|
|
4939
4961
|
* @return {Point}
|
|
4940
4962
|
*/
|
|
4941
4963
|
function getMid(element) {
|
|
4942
|
-
if (isConnection$
|
|
4964
|
+
if (isConnection$2(element)) {
|
|
4943
4965
|
return getConnectionMid(element);
|
|
4944
4966
|
}
|
|
4945
4967
|
|
|
@@ -5079,10 +5101,6 @@
|
|
|
5079
5101
|
return Math.sqrt(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2));
|
|
5080
5102
|
}
|
|
5081
5103
|
|
|
5082
|
-
function isConnection$h(element) {
|
|
5083
|
-
return !!element.waypoints;
|
|
5084
|
-
}
|
|
5085
|
-
|
|
5086
5104
|
/**
|
|
5087
5105
|
* @typedef {import('./Types').ConnectionLike} ConnectionLike
|
|
5088
5106
|
* @typedef {import('./Types').RootLike} RootLike
|
|
@@ -6826,11 +6844,7 @@
|
|
|
6826
6844
|
}
|
|
6827
6845
|
};
|
|
6828
6846
|
|
|
6829
|
-
var
|
|
6830
|
-
var objectRefs = {
|
|
6831
|
-
get exports(){ return objectRefsExports; },
|
|
6832
|
-
set exports(v){ objectRefsExports = v; },
|
|
6833
|
-
};
|
|
6847
|
+
var objectRefs = {exports: {}};
|
|
6834
6848
|
|
|
6835
6849
|
var collection = {};
|
|
6836
6850
|
|
|
@@ -7144,12 +7158,11 @@
|
|
|
7144
7158
|
|
|
7145
7159
|
var refs = Refs$1;
|
|
7146
7160
|
|
|
7147
|
-
|
|
7148
|
-
module.exports = refs;
|
|
7161
|
+
objectRefs.exports = refs;
|
|
7149
7162
|
|
|
7150
|
-
|
|
7151
|
-
} (objectRefs));
|
|
7163
|
+
objectRefs.exports.Collection = collection;
|
|
7152
7164
|
|
|
7165
|
+
var objectRefsExports = objectRefs.exports;
|
|
7153
7166
|
var Refs = /*@__PURE__*/getDefaultExportFromCjs(objectRefsExports);
|
|
7154
7167
|
|
|
7155
7168
|
var parentRefs = new Refs({ name: 'children', enumerable: true, collection: true }, { name: 'parent' }),
|
|
@@ -7391,6 +7404,7 @@
|
|
|
7391
7404
|
*
|
|
7392
7405
|
* @return {Root}
|
|
7393
7406
|
*/
|
|
7407
|
+
|
|
7394
7408
|
/**
|
|
7395
7409
|
* Creates a connection.
|
|
7396
7410
|
*
|
|
@@ -7414,6 +7428,7 @@
|
|
|
7414
7428
|
*
|
|
7415
7429
|
* @return {Connection}
|
|
7416
7430
|
*/
|
|
7431
|
+
|
|
7417
7432
|
/**
|
|
7418
7433
|
* Creates a shape.
|
|
7419
7434
|
*
|
|
@@ -7437,6 +7452,7 @@
|
|
|
7437
7452
|
*
|
|
7438
7453
|
* @return {Shape}
|
|
7439
7454
|
*/
|
|
7455
|
+
|
|
7440
7456
|
/**
|
|
7441
7457
|
* Creates a label.
|
|
7442
7458
|
*
|
|
@@ -7456,6 +7472,7 @@
|
|
|
7456
7472
|
*
|
|
7457
7473
|
* @param {'label'} type
|
|
7458
7474
|
* @param {Object} [attrs]
|
|
7475
|
+
*
|
|
7459
7476
|
* @return {Label}
|
|
7460
7477
|
*/
|
|
7461
7478
|
function create(type, attrs) {
|
|
@@ -7470,6 +7487,7 @@
|
|
|
7470
7487
|
* Checks whether an object is a model instance.
|
|
7471
7488
|
*
|
|
7472
7489
|
* @param {any} obj
|
|
7490
|
+
*
|
|
7473
7491
|
* @return {boolean}
|
|
7474
7492
|
*/
|
|
7475
7493
|
function isModelElement(obj) {
|
|
@@ -18171,7 +18189,7 @@
|
|
|
18171
18189
|
* @return {boolean}
|
|
18172
18190
|
*/
|
|
18173
18191
|
function hasExternalLabel(element) {
|
|
18174
|
-
return isLabel$
|
|
18192
|
+
return isLabel$2(element.label);
|
|
18175
18193
|
}
|
|
18176
18194
|
|
|
18177
18195
|
/**
|
|
@@ -18295,19 +18313,10 @@
|
|
|
18295
18313
|
}
|
|
18296
18314
|
|
|
18297
18315
|
/**
|
|
18298
|
-
* @param {
|
|
18316
|
+
* @param {ModdleElement} semantic
|
|
18299
18317
|
*
|
|
18300
|
-
* @
|
|
18301
|
-
*/
|
|
18302
|
-
function isLabel$7(element) {
|
|
18303
|
-
return element && !!element.labelTarget;
|
|
18304
|
-
}
|
|
18305
|
-
|
|
18306
|
-
|
|
18307
|
-
/**
|
|
18308
|
-
* @typedef { import('../model').DiagramElement } DiagramElement
|
|
18318
|
+
* @returns {string}
|
|
18309
18319
|
*/
|
|
18310
|
-
|
|
18311
18320
|
function getLabelAttr(semantic) {
|
|
18312
18321
|
if (
|
|
18313
18322
|
is$6(semantic, 'bpmn:FlowElement') ||
|
|
@@ -18330,6 +18339,11 @@
|
|
|
18330
18339
|
}
|
|
18331
18340
|
}
|
|
18332
18341
|
|
|
18342
|
+
/**
|
|
18343
|
+
* @param {ModdleElement} semantic
|
|
18344
|
+
*
|
|
18345
|
+
* @returns {string}
|
|
18346
|
+
*/
|
|
18333
18347
|
function getCategoryValue(semantic) {
|
|
18334
18348
|
var categoryValueRef = semantic['categoryValueRef'];
|
|
18335
18349
|
|
|
@@ -18342,9 +18356,9 @@
|
|
|
18342
18356
|
}
|
|
18343
18357
|
|
|
18344
18358
|
/**
|
|
18345
|
-
* @param {
|
|
18359
|
+
* @param {Element} element
|
|
18346
18360
|
*
|
|
18347
|
-
* @return {string}
|
|
18361
|
+
* @return {string}
|
|
18348
18362
|
*/
|
|
18349
18363
|
function getLabel(element) {
|
|
18350
18364
|
var semantic = element.businessObject,
|
|
@@ -18363,10 +18377,10 @@
|
|
|
18363
18377
|
|
|
18364
18378
|
|
|
18365
18379
|
/**
|
|
18366
|
-
* @param {
|
|
18380
|
+
* @param {Element} element
|
|
18367
18381
|
* @param {string} text
|
|
18368
18382
|
*
|
|
18369
|
-
* @return {
|
|
18383
|
+
* @return {Element}
|
|
18370
18384
|
*/
|
|
18371
18385
|
function setLabel(element, text) {
|
|
18372
18386
|
var semantic = element.businessObject,
|
|
@@ -18588,7 +18602,7 @@
|
|
|
18588
18602
|
*/
|
|
18589
18603
|
|
|
18590
18604
|
/**
|
|
18591
|
-
* @typedef { import('../model').
|
|
18605
|
+
* @typedef { import('../model/Types').Element } Element
|
|
18592
18606
|
*/
|
|
18593
18607
|
|
|
18594
18608
|
/**
|
|
@@ -18954,8 +18968,8 @@
|
|
|
18954
18968
|
}
|
|
18955
18969
|
|
|
18956
18970
|
function as(type) {
|
|
18957
|
-
return function(parentGfx, element) {
|
|
18958
|
-
return renderer(type)(parentGfx, element);
|
|
18971
|
+
return function(parentGfx, element, options) {
|
|
18972
|
+
return renderer(type)(parentGfx, element, options);
|
|
18959
18973
|
};
|
|
18960
18974
|
}
|
|
18961
18975
|
|
|
@@ -19094,7 +19108,7 @@
|
|
|
19094
19108
|
|
|
19095
19109
|
return drawCircle(parentGfx, element.width, element.height, attrs);
|
|
19096
19110
|
},
|
|
19097
|
-
'bpmn:StartEvent': function(parentGfx, element) {
|
|
19111
|
+
'bpmn:StartEvent': function(parentGfx, element, options) {
|
|
19098
19112
|
var attrs = {
|
|
19099
19113
|
fill: getFillColor(element, defaultFillColor),
|
|
19100
19114
|
stroke: getStrokeColor$1(element, defaultStrokeColor)
|
|
@@ -19112,7 +19126,9 @@
|
|
|
19112
19126
|
|
|
19113
19127
|
var circle = renderer('bpmn:Event')(parentGfx, element, attrs);
|
|
19114
19128
|
|
|
19115
|
-
|
|
19129
|
+
if (!options || options.renderIcon !== false) {
|
|
19130
|
+
renderEventContent(element, parentGfx);
|
|
19131
|
+
}
|
|
19116
19132
|
|
|
19117
19133
|
return circle;
|
|
19118
19134
|
},
|
|
@@ -19365,14 +19381,16 @@
|
|
|
19365
19381
|
stroke: getStrokeColor$1(event, defaultStrokeColor)
|
|
19366
19382
|
});
|
|
19367
19383
|
},
|
|
19368
|
-
'bpmn:EndEvent': function(parentGfx, element) {
|
|
19384
|
+
'bpmn:EndEvent': function(parentGfx, element, options) {
|
|
19369
19385
|
var circle = renderer('bpmn:Event')(parentGfx, element, {
|
|
19370
19386
|
strokeWidth: 4,
|
|
19371
19387
|
fill: getFillColor(element, defaultFillColor),
|
|
19372
19388
|
stroke: getStrokeColor$1(element, defaultStrokeColor)
|
|
19373
19389
|
});
|
|
19374
19390
|
|
|
19375
|
-
|
|
19391
|
+
if (!options || options.renderIcon !== false) {
|
|
19392
|
+
renderEventContent(element, parentGfx);
|
|
19393
|
+
}
|
|
19376
19394
|
|
|
19377
19395
|
return circle;
|
|
19378
19396
|
},
|
|
@@ -19385,7 +19403,7 @@
|
|
|
19385
19403
|
|
|
19386
19404
|
return circle;
|
|
19387
19405
|
},
|
|
19388
|
-
'bpmn:IntermediateEvent': function(parentGfx, element) {
|
|
19406
|
+
'bpmn:IntermediateEvent': function(parentGfx, element, options) {
|
|
19389
19407
|
var outer = renderer('bpmn:Event')(parentGfx, element, {
|
|
19390
19408
|
strokeWidth: 1.5,
|
|
19391
19409
|
fill: getFillColor(element, defaultFillColor),
|
|
@@ -19399,7 +19417,9 @@
|
|
|
19399
19417
|
stroke: getStrokeColor$1(element, defaultStrokeColor)
|
|
19400
19418
|
});
|
|
19401
19419
|
|
|
19402
|
-
|
|
19420
|
+
if (!options || options.renderIcon !== false) {
|
|
19421
|
+
renderEventContent(element, parentGfx);
|
|
19422
|
+
}
|
|
19403
19423
|
|
|
19404
19424
|
return outer;
|
|
19405
19425
|
},
|
|
@@ -20117,7 +20137,7 @@
|
|
|
20117
20137
|
|
|
20118
20138
|
return elementStore;
|
|
20119
20139
|
},
|
|
20120
|
-
'bpmn:BoundaryEvent': function(parentGfx, element) {
|
|
20140
|
+
'bpmn:BoundaryEvent': function(parentGfx, element, options) {
|
|
20121
20141
|
|
|
20122
20142
|
var semantic = getBusinessObject$2(element),
|
|
20123
20143
|
cancel = semantic.cancelActivity;
|
|
@@ -20148,7 +20168,9 @@
|
|
|
20148
20168
|
|
|
20149
20169
|
/* inner path */ drawCircle(parentGfx, element.width, element.height, INNER_OUTER_DIST, innerAttrs);
|
|
20150
20170
|
|
|
20151
|
-
|
|
20171
|
+
if (!options || options.renderIcon !== false) {
|
|
20172
|
+
renderEventContent(element, parentGfx);
|
|
20173
|
+
}
|
|
20152
20174
|
|
|
20153
20175
|
return outer;
|
|
20154
20176
|
},
|
|
@@ -20429,7 +20451,7 @@
|
|
|
20429
20451
|
|
|
20430
20452
|
|
|
20431
20453
|
/**
|
|
20432
|
-
* @param {
|
|
20454
|
+
* @param {Element} element
|
|
20433
20455
|
*
|
|
20434
20456
|
* @return {boolean}
|
|
20435
20457
|
*/
|
|
@@ -20441,7 +20463,7 @@
|
|
|
20441
20463
|
* Draw shape into parentGfx.
|
|
20442
20464
|
*
|
|
20443
20465
|
* @param {SVGElement} parentGfx
|
|
20444
|
-
* @param {
|
|
20466
|
+
* @param {Element} element
|
|
20445
20467
|
*
|
|
20446
20468
|
* @return {SVGElement} mainGfx
|
|
20447
20469
|
*/
|
|
@@ -20457,7 +20479,7 @@
|
|
|
20457
20479
|
* Draw connection into parentGfx.
|
|
20458
20480
|
*
|
|
20459
20481
|
* @param {SVGElement} parentGfx
|
|
20460
|
-
* @param {
|
|
20482
|
+
* @param {Element} element
|
|
20461
20483
|
*
|
|
20462
20484
|
* @return {SVGElement} mainGfx
|
|
20463
20485
|
*/
|
|
@@ -20472,7 +20494,7 @@
|
|
|
20472
20494
|
/**
|
|
20473
20495
|
* Get shape path.
|
|
20474
20496
|
*
|
|
20475
|
-
* @param {
|
|
20497
|
+
* @param {Element} element
|
|
20476
20498
|
*
|
|
20477
20499
|
* @return {string} path
|
|
20478
20500
|
*/
|
|
@@ -24012,7 +24034,7 @@
|
|
|
24012
24034
|
* @param {boolean} [unwrap] whether the event should be unwrapped
|
|
24013
24035
|
* @param {any} [that]
|
|
24014
24036
|
*/
|
|
24015
|
-
CommandInterceptor$1.prototype.canExecute = createHook('canExecute');
|
|
24037
|
+
CommandInterceptor$1.prototype.canExecute = createHook$1('canExecute');
|
|
24016
24038
|
|
|
24017
24039
|
/**
|
|
24018
24040
|
* Add a <preExecute> phase of command interceptor.
|
|
@@ -24023,7 +24045,7 @@
|
|
|
24023
24045
|
* @param {boolean} [unwrap] whether the event should be unwrapped
|
|
24024
24046
|
* @param {any} [that]
|
|
24025
24047
|
*/
|
|
24026
|
-
CommandInterceptor$1.prototype.preExecute = createHook('preExecute');
|
|
24048
|
+
CommandInterceptor$1.prototype.preExecute = createHook$1('preExecute');
|
|
24027
24049
|
|
|
24028
24050
|
/**
|
|
24029
24051
|
* Add a <preExecuted> phase of command interceptor.
|
|
@@ -24034,7 +24056,7 @@
|
|
|
24034
24056
|
* @param {boolean} [unwrap] whether the event should be unwrapped
|
|
24035
24057
|
* @param {any} [that]
|
|
24036
24058
|
*/
|
|
24037
|
-
CommandInterceptor$1.prototype.preExecuted = createHook('preExecuted');
|
|
24059
|
+
CommandInterceptor$1.prototype.preExecuted = createHook$1('preExecuted');
|
|
24038
24060
|
|
|
24039
24061
|
/**
|
|
24040
24062
|
* Add a <execute> phase of command interceptor.
|
|
@@ -24045,7 +24067,7 @@
|
|
|
24045
24067
|
* @param {boolean} [unwrap] whether the event should be unwrapped
|
|
24046
24068
|
* @param {any} [that]
|
|
24047
24069
|
*/
|
|
24048
|
-
CommandInterceptor$1.prototype.execute = createHook('execute');
|
|
24070
|
+
CommandInterceptor$1.prototype.execute = createHook$1('execute');
|
|
24049
24071
|
|
|
24050
24072
|
/**
|
|
24051
24073
|
* Add a <executed> phase of command interceptor.
|
|
@@ -24056,7 +24078,7 @@
|
|
|
24056
24078
|
* @param {boolean} [unwrap] whether the event should be unwrapped
|
|
24057
24079
|
* @param {any} [that]
|
|
24058
24080
|
*/
|
|
24059
|
-
CommandInterceptor$1.prototype.executed = createHook('executed');
|
|
24081
|
+
CommandInterceptor$1.prototype.executed = createHook$1('executed');
|
|
24060
24082
|
|
|
24061
24083
|
/**
|
|
24062
24084
|
* Add a <postExecute> phase of command interceptor.
|
|
@@ -24067,7 +24089,7 @@
|
|
|
24067
24089
|
* @param {boolean} [unwrap] whether the event should be unwrapped
|
|
24068
24090
|
* @param {any} [that]
|
|
24069
24091
|
*/
|
|
24070
|
-
CommandInterceptor$1.prototype.postExecute = createHook('postExecute');
|
|
24092
|
+
CommandInterceptor$1.prototype.postExecute = createHook$1('postExecute');
|
|
24071
24093
|
|
|
24072
24094
|
/**
|
|
24073
24095
|
* Add a <postExecuted> phase of command interceptor.
|
|
@@ -24078,7 +24100,7 @@
|
|
|
24078
24100
|
* @param {boolean} [unwrap] whether the event should be unwrapped
|
|
24079
24101
|
* @param {any} [that]
|
|
24080
24102
|
*/
|
|
24081
|
-
CommandInterceptor$1.prototype.postExecuted = createHook('postExecuted');
|
|
24103
|
+
CommandInterceptor$1.prototype.postExecuted = createHook$1('postExecuted');
|
|
24082
24104
|
|
|
24083
24105
|
/**
|
|
24084
24106
|
* Add a <revert> phase of command interceptor.
|
|
@@ -24089,7 +24111,7 @@
|
|
|
24089
24111
|
* @param {boolean} [unwrap] whether the event should be unwrapped
|
|
24090
24112
|
* @param {any} [that]
|
|
24091
24113
|
*/
|
|
24092
|
-
CommandInterceptor$1.prototype.revert = createHook('revert');
|
|
24114
|
+
CommandInterceptor$1.prototype.revert = createHook$1('revert');
|
|
24093
24115
|
|
|
24094
24116
|
/**
|
|
24095
24117
|
* Add a <reverted> phase of command interceptor.
|
|
@@ -24100,7 +24122,7 @@
|
|
|
24100
24122
|
* @param {boolean} [unwrap] whether the event should be unwrapped
|
|
24101
24123
|
* @param {any} [that]
|
|
24102
24124
|
*/
|
|
24103
|
-
CommandInterceptor$1.prototype.reverted = createHook('reverted');
|
|
24125
|
+
CommandInterceptor$1.prototype.reverted = createHook$1('reverted');
|
|
24104
24126
|
|
|
24105
24127
|
/*
|
|
24106
24128
|
* Add prototype methods for each phase of command execution (e.g. execute,
|
|
@@ -24115,7 +24137,7 @@
|
|
|
24115
24137
|
* unwrap?: boolean
|
|
24116
24138
|
* ) => any }
|
|
24117
24139
|
*/
|
|
24118
|
-
function createHook(hook) {
|
|
24140
|
+
function createHook$1(hook) {
|
|
24119
24141
|
|
|
24120
24142
|
/**
|
|
24121
24143
|
* @this {CommandInterceptor}
|
|
@@ -26189,11 +26211,7 @@
|
|
|
26189
26211
|
NavigatedViewer.prototype._navigationModules
|
|
26190
26212
|
);
|
|
26191
26213
|
|
|
26192
|
-
var
|
|
26193
|
-
var hammer = {
|
|
26194
|
-
get exports(){ return hammerExports; },
|
|
26195
|
-
set exports(v){ hammerExports = v; },
|
|
26196
|
-
};
|
|
26214
|
+
var hammer = {exports: {}};
|
|
26197
26215
|
|
|
26198
26216
|
/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
26199
26217
|
* http://hammerjs.github.io/
|
|
@@ -28838,10 +28856,11 @@
|
|
|
28838
28856
|
window[exportName] = Hammer;
|
|
28839
28857
|
}
|
|
28840
28858
|
|
|
28841
|
-
})(window, document, 'Hammer');
|
|
28859
|
+
})(window, document, 'Hammer');
|
|
28842
28860
|
} (hammer));
|
|
28843
28861
|
|
|
28844
|
-
var
|
|
28862
|
+
var hammerExports = hammer.exports;
|
|
28863
|
+
var Hammer = /*@__PURE__*/getDefaultExportFromCjs(hammerExports);
|
|
28845
28864
|
|
|
28846
28865
|
/**
|
|
28847
28866
|
* @typedef {import('didi').Injector} Injector
|
|
@@ -30985,7 +31004,7 @@
|
|
|
30985
31004
|
let element = closest(event.delegateTarget || event.target, '.entry', true);
|
|
30986
31005
|
let entryId = attr$1(element, DATA_REF);
|
|
30987
31006
|
|
|
30988
|
-
entry = this._getEntry(entryId);
|
|
31007
|
+
entry = { id: entryId, ...this._getEntry(entryId) };
|
|
30989
31008
|
}
|
|
30990
31009
|
|
|
30991
31010
|
const handler = entry.action;
|
|
@@ -31958,7 +31977,7 @@
|
|
|
31958
31977
|
y: sourceTrbl.top - 50 - element.height / 2
|
|
31959
31978
|
};
|
|
31960
31979
|
|
|
31961
|
-
if (isConnection$
|
|
31980
|
+
if (isConnection$2(source)) {
|
|
31962
31981
|
position = getMid(source);
|
|
31963
31982
|
position.x += 100;
|
|
31964
31983
|
position.y -= 50;
|
|
@@ -32003,10 +32022,6 @@
|
|
|
32003
32022
|
return findFreePosition(source, element, position, generateGetNextPosition(nextPositionDirection));
|
|
32004
32023
|
}
|
|
32005
32024
|
|
|
32006
|
-
function isConnection$g(element) {
|
|
32007
|
-
return !!element.waypoints;
|
|
32008
|
-
}
|
|
32009
|
-
|
|
32010
32025
|
/**
|
|
32011
32026
|
* @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
|
|
32012
32027
|
*/
|
|
@@ -32444,7 +32459,7 @@
|
|
|
32444
32459
|
|
|
32445
32460
|
forEach$2(elements, function(element) {
|
|
32446
32461
|
|
|
32447
|
-
if (is$6(element, 'bpmn:Lane') || isLabel$
|
|
32462
|
+
if (is$6(element, 'bpmn:Lane') || isLabel$2(element)) {
|
|
32448
32463
|
canResize = false;
|
|
32449
32464
|
return;
|
|
32450
32465
|
}
|
|
@@ -35458,7 +35473,7 @@
|
|
|
35458
35473
|
hoverMid = hover && getSnapPoint(hover, event);
|
|
35459
35474
|
|
|
35460
35475
|
// only snap on connections, elements can have multiple connect endpoints
|
|
35461
|
-
if (!isConnection$
|
|
35476
|
+
if (!isConnection$2(hover) || !hoverMid || !hoverMid.x || !hoverMid.y) {
|
|
35462
35477
|
return;
|
|
35463
35478
|
}
|
|
35464
35479
|
|
|
@@ -35510,13 +35525,6 @@
|
|
|
35510
35525
|
|
|
35511
35526
|
BendpointSnapping.$inject = [ 'eventBus' ];
|
|
35512
35527
|
|
|
35513
|
-
|
|
35514
|
-
// helpers //////////////////////
|
|
35515
|
-
|
|
35516
|
-
function isConnection$f(element) {
|
|
35517
|
-
return element && !!element.waypoints;
|
|
35518
|
-
}
|
|
35519
|
-
|
|
35520
35528
|
/**
|
|
35521
35529
|
* @type { import('didi').ModuleDeclaration }
|
|
35522
35530
|
*/
|
|
@@ -37043,11 +37051,11 @@
|
|
|
37043
37051
|
elements = filter(elements, function(element) {
|
|
37044
37052
|
var labelTarget = element.labelTarget;
|
|
37045
37053
|
|
|
37046
|
-
return !element.parent && !(isLabel$
|
|
37054
|
+
return !element.parent && !(isLabel$2(element) && elements.indexOf(labelTarget) !== -1);
|
|
37047
37055
|
});
|
|
37048
37056
|
|
|
37049
37057
|
var shape = find$2(elements, function(element) {
|
|
37050
|
-
return !isConnection$
|
|
37058
|
+
return !isConnection$2(element);
|
|
37051
37059
|
});
|
|
37052
37060
|
|
|
37053
37061
|
var attach = false,
|
|
@@ -37202,7 +37210,7 @@
|
|
|
37202
37210
|
|
|
37203
37211
|
// update shape
|
|
37204
37212
|
shape = find$2(elements, function(element) {
|
|
37205
|
-
return !isConnection$
|
|
37213
|
+
return !isConnection$2(element);
|
|
37206
37214
|
});
|
|
37207
37215
|
}
|
|
37208
37216
|
|
|
@@ -37243,7 +37251,7 @@
|
|
|
37243
37251
|
}
|
|
37244
37252
|
|
|
37245
37253
|
var shape = find$2(elements, function(element) {
|
|
37246
|
-
return !isConnection$
|
|
37254
|
+
return !isConnection$2(element);
|
|
37247
37255
|
});
|
|
37248
37256
|
|
|
37249
37257
|
if (!shape) {
|
|
@@ -37277,7 +37285,7 @@
|
|
|
37277
37285
|
|
|
37278
37286
|
// center elements around cursor
|
|
37279
37287
|
forEach$2(elements, function(element) {
|
|
37280
|
-
if (isConnection$
|
|
37288
|
+
if (isConnection$2(element)) {
|
|
37281
37289
|
element.waypoints = map$2(element.waypoints, function(waypoint) {
|
|
37282
37290
|
return {
|
|
37283
37291
|
x: waypoint.x - bbox.x - bbox.width / 2,
|
|
@@ -37339,16 +37347,8 @@
|
|
|
37339
37347
|
}
|
|
37340
37348
|
}
|
|
37341
37349
|
|
|
37342
|
-
function isConnection$e(element) {
|
|
37343
|
-
return !!element.waypoints;
|
|
37344
|
-
}
|
|
37345
|
-
|
|
37346
37350
|
function isSingleShape(elements) {
|
|
37347
|
-
return elements && elements.length === 1 && !isConnection$
|
|
37348
|
-
}
|
|
37349
|
-
|
|
37350
|
-
function isLabel$6(element) {
|
|
37351
|
-
return !!element.labelTarget;
|
|
37351
|
+
return elements && elements.length === 1 && !isConnection$2(elements[ 0 ]);
|
|
37352
37352
|
}
|
|
37353
37353
|
|
|
37354
37354
|
/**
|
|
@@ -37681,7 +37681,7 @@
|
|
|
37681
37681
|
}
|
|
37682
37682
|
|
|
37683
37683
|
// connections (priority = 3)
|
|
37684
|
-
if (isConnection$
|
|
37684
|
+
if (isConnection$2(element)) {
|
|
37685
37685
|
descriptor.priority = 3;
|
|
37686
37686
|
|
|
37687
37687
|
descriptor.source = element.source.id;
|
|
@@ -37691,7 +37691,7 @@
|
|
|
37691
37691
|
}
|
|
37692
37692
|
|
|
37693
37693
|
// labels (priority = 4)
|
|
37694
|
-
if (isLabel$
|
|
37694
|
+
if (isLabel$2(element)) {
|
|
37695
37695
|
descriptor.priority = 4;
|
|
37696
37696
|
|
|
37697
37697
|
descriptor.labelTarget = element.labelTarget.id;
|
|
@@ -37824,7 +37824,7 @@
|
|
|
37824
37824
|
|
|
37825
37825
|
// center elements around cursor
|
|
37826
37826
|
forEach$2(elements, function(element) {
|
|
37827
|
-
if (isConnection$
|
|
37827
|
+
if (isConnection$2(element)) {
|
|
37828
37828
|
element.waypoints = map$2(element.waypoints, function(waypoint) {
|
|
37829
37829
|
return {
|
|
37830
37830
|
x: waypoint.x - bbox.x - bbox.width / 2,
|
|
@@ -37877,7 +37877,7 @@
|
|
|
37877
37877
|
|
|
37878
37878
|
var element;
|
|
37879
37879
|
|
|
37880
|
-
if (isConnection$
|
|
37880
|
+
if (isConnection$2(attrs)) {
|
|
37881
37881
|
attrs.source = cache[ descriptor.source ];
|
|
37882
37882
|
attrs.target = cache[ descriptor.target ];
|
|
37883
37883
|
|
|
@@ -37888,7 +37888,7 @@
|
|
|
37888
37888
|
return;
|
|
37889
37889
|
}
|
|
37890
37890
|
|
|
37891
|
-
if (isLabel$
|
|
37891
|
+
if (isLabel$2(attrs)) {
|
|
37892
37892
|
attrs.labelTarget = cache[ attrs.labelTarget ];
|
|
37893
37893
|
|
|
37894
37894
|
element = cache[ descriptor.id ] = self.createLabel(attrs);
|
|
@@ -37943,7 +37943,7 @@
|
|
|
37943
37943
|
source,
|
|
37944
37944
|
target;
|
|
37945
37945
|
|
|
37946
|
-
if (isConnection$
|
|
37946
|
+
if (isConnection$2(element)) {
|
|
37947
37947
|
source = find$2(elements, matchPattern({ id: element.source.id }));
|
|
37948
37948
|
target = find$2(elements, matchPattern({ id: element.target.id }));
|
|
37949
37949
|
|
|
@@ -37952,7 +37952,7 @@
|
|
|
37952
37952
|
}
|
|
37953
37953
|
}
|
|
37954
37954
|
|
|
37955
|
-
if (isLabel$
|
|
37955
|
+
if (isLabel$2(element)) {
|
|
37956
37956
|
labelTarget = find$2(elements, matchPattern({ id: element.labelTarget.id }));
|
|
37957
37957
|
|
|
37958
37958
|
if (!labelTarget) {
|
|
@@ -38045,7 +38045,7 @@
|
|
|
38045
38045
|
eachElement$2(parents, function(element, _index, depth) {
|
|
38046
38046
|
|
|
38047
38047
|
// do NOT add external labels directly
|
|
38048
|
-
if (isLabel$
|
|
38048
|
+
if (isLabel$2(element)) {
|
|
38049
38049
|
return;
|
|
38050
38050
|
}
|
|
38051
38051
|
|
|
@@ -38143,14 +38143,6 @@
|
|
|
38143
38143
|
return !!element.host;
|
|
38144
38144
|
}
|
|
38145
38145
|
|
|
38146
|
-
function isConnection$d(element) {
|
|
38147
|
-
return !!element.waypoints;
|
|
38148
|
-
}
|
|
38149
|
-
|
|
38150
|
-
function isLabel$5(element) {
|
|
38151
|
-
return !!element.labelTarget;
|
|
38152
|
-
}
|
|
38153
|
-
|
|
38154
38146
|
function copyWaypoints$1(element) {
|
|
38155
38147
|
return map$2(element.waypoints, function(waypoint) {
|
|
38156
38148
|
|
|
@@ -38234,7 +38226,7 @@
|
|
|
38234
38226
|
|
|
38235
38227
|
// do not copy business object + di for labels;
|
|
38236
38228
|
// will be pulled from the referenced label target
|
|
38237
|
-
if (isLabel$
|
|
38229
|
+
if (isLabel$2(element)) {
|
|
38238
38230
|
return descriptor;
|
|
38239
38231
|
}
|
|
38240
38232
|
|
|
@@ -38302,7 +38294,7 @@
|
|
|
38302
38294
|
di = descriptor.di;
|
|
38303
38295
|
|
|
38304
38296
|
// wire existing di + businessObject for external label
|
|
38305
|
-
if (isLabel$
|
|
38297
|
+
if (isLabel$2(descriptor)) {
|
|
38306
38298
|
descriptor.businessObject = getBusinessObject$2(cache[ descriptor.labelTarget ]);
|
|
38307
38299
|
descriptor.di = getDi$1(cache[ descriptor.labelTarget ]);
|
|
38308
38300
|
|
|
@@ -44383,7 +44375,7 @@
|
|
|
44383
44375
|
ResizeHandles.prototype.addResizer = function(element) {
|
|
44384
44376
|
var self = this;
|
|
44385
44377
|
|
|
44386
|
-
if (isConnection$
|
|
44378
|
+
if (isConnection$2(element) || !this._resize.canResize({ shape: element })) {
|
|
44387
44379
|
return;
|
|
44388
44380
|
}
|
|
44389
44381
|
|
|
@@ -44435,10 +44427,6 @@
|
|
|
44435
44427
|
return offset;
|
|
44436
44428
|
}
|
|
44437
44429
|
|
|
44438
|
-
function isConnection$c(element) {
|
|
44439
|
-
return !!element.waypoints;
|
|
44440
|
-
}
|
|
44441
|
-
|
|
44442
44430
|
/**
|
|
44443
44431
|
* @type { import('didi').ModuleDeclaration }
|
|
44444
44432
|
*/
|
|
@@ -44798,7 +44786,7 @@
|
|
|
44798
44786
|
// external label not yet created
|
|
44799
44787
|
if (isLabelExternal(target)
|
|
44800
44788
|
&& !hasExternalLabel(target)
|
|
44801
|
-
&& !isLabel$
|
|
44789
|
+
&& !isLabel$2(target)) {
|
|
44802
44790
|
|
|
44803
44791
|
var externalLabelMid = getExternalLabelMid(element);
|
|
44804
44792
|
|
|
@@ -45475,7 +45463,7 @@
|
|
|
45475
45463
|
}
|
|
45476
45464
|
|
|
45477
45465
|
function shouldReplace$1(shape, host) {
|
|
45478
|
-
return !isLabel$
|
|
45466
|
+
return !isLabel$2(shape) &&
|
|
45479
45467
|
isAny$1(shape, [ 'bpmn:IntermediateThrowEvent', 'bpmn:IntermediateCatchEvent' ]) && !!host;
|
|
45480
45468
|
}
|
|
45481
45469
|
|
|
@@ -45652,8 +45640,8 @@
|
|
|
45652
45640
|
// ignore connections, groups and labels
|
|
45653
45641
|
var children = rootElement.children.filter(function(element) {
|
|
45654
45642
|
return !is$6(element, 'bpmn:Group') &&
|
|
45655
|
-
!isLabel$
|
|
45656
|
-
!isConnection$
|
|
45643
|
+
!isLabel$2(element) &&
|
|
45644
|
+
!isConnection$2(element);
|
|
45657
45645
|
});
|
|
45658
45646
|
|
|
45659
45647
|
// ensure for available children to calculate bounds
|
|
@@ -45824,10 +45812,6 @@
|
|
|
45824
45812
|
};
|
|
45825
45813
|
}
|
|
45826
45814
|
|
|
45827
|
-
function isConnection$b(element) {
|
|
45828
|
-
return !!element.waypoints;
|
|
45829
|
-
}
|
|
45830
|
-
|
|
45831
45815
|
function findParticipant(elements) {
|
|
45832
45816
|
return find$2(elements, function(element) {
|
|
45833
45817
|
return is$6(element, 'bpmn:Participant');
|
|
@@ -46432,7 +46416,7 @@
|
|
|
46432
46416
|
}
|
|
46433
46417
|
|
|
46434
46418
|
function shouldReplace(shape, host) {
|
|
46435
|
-
return !isLabel$
|
|
46419
|
+
return !isLabel$2(shape) && is$6(shape, 'bpmn:BoundaryEvent') && !host;
|
|
46436
46420
|
}
|
|
46437
46421
|
|
|
46438
46422
|
function includes$6(array, item) {
|
|
@@ -48139,7 +48123,7 @@
|
|
|
48139
48123
|
|
|
48140
48124
|
var element = context.shape || context.connection;
|
|
48141
48125
|
|
|
48142
|
-
if (isLabel$
|
|
48126
|
+
if (isLabel$2(element) || !isLabelExternal(element)) {
|
|
48143
48127
|
return;
|
|
48144
48128
|
}
|
|
48145
48129
|
|
|
@@ -50678,7 +50662,7 @@
|
|
|
50678
50662
|
shape = context.shape,
|
|
50679
50663
|
shapeBo = shape.businessObject;
|
|
50680
50664
|
|
|
50681
|
-
if (isLabel$
|
|
50665
|
+
if (isLabel$2(shape)) {
|
|
50682
50666
|
return;
|
|
50683
50667
|
}
|
|
50684
50668
|
|
|
@@ -51127,12 +51111,12 @@
|
|
|
51127
51111
|
position = context.position,
|
|
51128
51112
|
target = context.target;
|
|
51129
51113
|
|
|
51130
|
-
if (isConnection$
|
|
51114
|
+
if (isConnection$2(target) && !canInsert(elements, target)) {
|
|
51131
51115
|
return false;
|
|
51132
51116
|
}
|
|
51133
51117
|
|
|
51134
51118
|
return every(elements, function(element) {
|
|
51135
|
-
if (isConnection$
|
|
51119
|
+
if (isConnection$2(element)) {
|
|
51136
51120
|
return canConnect(element.source, element.target, element);
|
|
51137
51121
|
}
|
|
51138
51122
|
|
|
@@ -51241,7 +51225,7 @@
|
|
|
51241
51225
|
* @return {boolean}
|
|
51242
51226
|
*/
|
|
51243
51227
|
function nonExistingOrLabel(element) {
|
|
51244
|
-
return !element || isLabel$
|
|
51228
|
+
return !element || isLabel$2(element);
|
|
51245
51229
|
}
|
|
51246
51230
|
|
|
51247
51231
|
function isSame$1(a, b) {
|
|
@@ -51475,15 +51459,6 @@
|
|
|
51475
51459
|
);
|
|
51476
51460
|
}
|
|
51477
51461
|
|
|
51478
|
-
/**
|
|
51479
|
-
* @param {Element} element
|
|
51480
|
-
*
|
|
51481
|
-
* @return {boolean}
|
|
51482
|
-
*/
|
|
51483
|
-
function isConnection$a(element) {
|
|
51484
|
-
return element.waypoints;
|
|
51485
|
-
}
|
|
51486
|
-
|
|
51487
51462
|
/**
|
|
51488
51463
|
* @param {Element} element
|
|
51489
51464
|
*
|
|
@@ -51574,7 +51549,7 @@
|
|
|
51574
51549
|
function canDrop(element, target) {
|
|
51575
51550
|
|
|
51576
51551
|
// can move labels and groups everywhere
|
|
51577
|
-
if (isLabel$
|
|
51552
|
+
if (isLabel$2(element) || isGroup(element)) {
|
|
51578
51553
|
return true;
|
|
51579
51554
|
}
|
|
51580
51555
|
|
|
@@ -51664,7 +51639,7 @@
|
|
|
51664
51639
|
* @return {boolean}
|
|
51665
51640
|
*/
|
|
51666
51641
|
function isBoundaryEvent(element) {
|
|
51667
|
-
return !isLabel$
|
|
51642
|
+
return !isLabel$2(element) && is$6(element, 'bpmn:BoundaryEvent');
|
|
51668
51643
|
}
|
|
51669
51644
|
|
|
51670
51645
|
/**
|
|
@@ -51773,7 +51748,7 @@
|
|
|
51773
51748
|
var element = elements[0];
|
|
51774
51749
|
|
|
51775
51750
|
// do not attach labels
|
|
51776
|
-
if (isLabel$
|
|
51751
|
+
if (isLabel$2(element)) {
|
|
51777
51752
|
return false;
|
|
51778
51753
|
}
|
|
51779
51754
|
|
|
@@ -51945,7 +51920,7 @@
|
|
|
51945
51920
|
return false;
|
|
51946
51921
|
}
|
|
51947
51922
|
|
|
51948
|
-
if (isLabel$
|
|
51923
|
+
if (isLabel$2(shape) || isGroup(shape)) {
|
|
51949
51924
|
return true;
|
|
51950
51925
|
}
|
|
51951
51926
|
|
|
@@ -52126,7 +52101,7 @@
|
|
|
52126
52101
|
// return true if shape can be inserted into connection parent
|
|
52127
52102
|
return (
|
|
52128
52103
|
isAny$1(connection, [ 'bpmn:SequenceFlow', 'bpmn:MessageFlow' ]) &&
|
|
52129
|
-
!isLabel$
|
|
52104
|
+
!isLabel$2(connection) &&
|
|
52130
52105
|
is$6(shape, 'bpmn:FlowNode') &&
|
|
52131
52106
|
!is$6(shape, 'bpmn:BoundaryEvent') &&
|
|
52132
52107
|
canDrop(shape, connection.parent));
|
|
@@ -52149,7 +52124,7 @@
|
|
|
52149
52124
|
* @return {boolean}
|
|
52150
52125
|
*/
|
|
52151
52126
|
function canCopy(elements, element) {
|
|
52152
|
-
if (isLabel$
|
|
52127
|
+
if (isLabel$2(element)) {
|
|
52153
52128
|
return true;
|
|
52154
52129
|
}
|
|
52155
52130
|
|
|
@@ -53057,12 +53032,12 @@
|
|
|
53057
53032
|
}
|
|
53058
53033
|
|
|
53059
53034
|
forEach$2(elements, function(element) {
|
|
53060
|
-
if (!element.parent || isLabel$
|
|
53035
|
+
if (!element.parent || isLabel$2(element)) {
|
|
53061
53036
|
return;
|
|
53062
53037
|
}
|
|
53063
53038
|
|
|
53064
53039
|
// handle connections separately
|
|
53065
|
-
if (isConnection$
|
|
53040
|
+
if (isConnection$2(element)) {
|
|
53066
53041
|
connections.push(element);
|
|
53067
53042
|
|
|
53068
53043
|
return;
|
|
@@ -53233,15 +53208,15 @@
|
|
|
53233
53208
|
|
|
53234
53209
|
// find children that are not moving or resizing
|
|
53235
53210
|
var nonMovingResizingChildren = filter(children, function(child) {
|
|
53236
|
-
return !isConnection$
|
|
53237
|
-
!isLabel$
|
|
53211
|
+
return !isConnection$2(child) &&
|
|
53212
|
+
!isLabel$2(child) &&
|
|
53238
53213
|
!includes$3(movingShapes, child) &&
|
|
53239
53214
|
!includes$3(resizingShapes, child);
|
|
53240
53215
|
});
|
|
53241
53216
|
|
|
53242
53217
|
// find children that are moving
|
|
53243
53218
|
var movingChildren = filter(children, function(child) {
|
|
53244
|
-
return !isConnection$
|
|
53219
|
+
return !isConnection$2(child) && !isLabel$2(child) && includes$3(movingShapes, child);
|
|
53245
53220
|
});
|
|
53246
53221
|
|
|
53247
53222
|
var minOrMax,
|
|
@@ -53375,14 +53350,6 @@
|
|
|
53375
53350
|
return !!element.host;
|
|
53376
53351
|
}
|
|
53377
53352
|
|
|
53378
|
-
function isConnection$9(element) {
|
|
53379
|
-
return !!element.waypoints;
|
|
53380
|
-
}
|
|
53381
|
-
|
|
53382
|
-
function isLabel$4(element) {
|
|
53383
|
-
return !!element.labelTarget;
|
|
53384
|
-
}
|
|
53385
|
-
|
|
53386
53353
|
var MARKER_DRAGGING$1 = 'djs-dragging',
|
|
53387
53354
|
MARKER_RESIZING = 'djs-resizing';
|
|
53388
53355
|
|
|
@@ -53541,7 +53508,7 @@
|
|
|
53541
53508
|
});
|
|
53542
53509
|
});
|
|
53543
53510
|
|
|
53544
|
-
return isConnection$
|
|
53511
|
+
return isConnection$2(element)
|
|
53545
53512
|
&& (sourceIsMoving || sourceIsResizing)
|
|
53546
53513
|
&& (targetIsMoving || targetIsResizing);
|
|
53547
53514
|
});
|
|
@@ -53671,16 +53638,6 @@
|
|
|
53671
53638
|
'previewSupport'
|
|
53672
53639
|
];
|
|
53673
53640
|
|
|
53674
|
-
|
|
53675
|
-
// helpers //////////////////////
|
|
53676
|
-
|
|
53677
|
-
/**
|
|
53678
|
-
* Checks if an element is a connection.
|
|
53679
|
-
*/
|
|
53680
|
-
function isConnection$8(element) {
|
|
53681
|
-
return element.waypoints;
|
|
53682
|
-
}
|
|
53683
|
-
|
|
53684
53641
|
/**
|
|
53685
53642
|
* @type { import('didi').ModuleDeclaration }
|
|
53686
53643
|
*/
|
|
@@ -55720,7 +55677,7 @@
|
|
|
55720
55677
|
BpmnUpdater.prototype.updateParent = function(element, oldParent) {
|
|
55721
55678
|
|
|
55722
55679
|
// do not update BPMN 2.0 label parent
|
|
55723
|
-
if (isLabel$
|
|
55680
|
+
if (isLabel$2(element)) {
|
|
55724
55681
|
return;
|
|
55725
55682
|
}
|
|
55726
55683
|
|
|
@@ -55785,7 +55742,7 @@
|
|
|
55785
55742
|
});
|
|
55786
55743
|
}
|
|
55787
55744
|
|
|
55788
|
-
var target = isLabel$
|
|
55745
|
+
var target = isLabel$2(shape) ? this._getLabel(di) : di;
|
|
55789
55746
|
|
|
55790
55747
|
var bounds = target.bounds;
|
|
55791
55748
|
|
|
@@ -56846,7 +56803,7 @@
|
|
|
56846
56803
|
|
|
56847
56804
|
// center elements around position
|
|
56848
56805
|
forEach$2(elements, function(element) {
|
|
56849
|
-
if (isConnection$
|
|
56806
|
+
if (isConnection$2(element)) {
|
|
56850
56807
|
element.waypoints = map$2(element.waypoints, function(waypoint) {
|
|
56851
56808
|
return {
|
|
56852
56809
|
x: round$3(waypoint.x - bbox.x - bbox.width / 2 + position.x),
|
|
@@ -56866,7 +56823,7 @@
|
|
|
56866
56823
|
var cache = {};
|
|
56867
56824
|
|
|
56868
56825
|
forEach$2(elements, function(element) {
|
|
56869
|
-
if (isConnection$
|
|
56826
|
+
if (isConnection$2(element)) {
|
|
56870
56827
|
cache[ element.id ] = isNumber$1(parentIndex) ?
|
|
56871
56828
|
modeling.createConnection(
|
|
56872
56829
|
cache[ element.source.id ],
|
|
@@ -56893,6 +56850,10 @@
|
|
|
56893
56850
|
createShapeHints.autoResize = false;
|
|
56894
56851
|
}
|
|
56895
56852
|
|
|
56853
|
+
if (isLabel$2(element)) {
|
|
56854
|
+
createShapeHints = omit(createShapeHints, [ 'attach' ]);
|
|
56855
|
+
}
|
|
56856
|
+
|
|
56896
56857
|
cache[ element.id ] = isNumber$1(parentIndex) ?
|
|
56897
56858
|
modeling.createShape(
|
|
56898
56859
|
element,
|
|
@@ -56910,13 +56871,7 @@
|
|
|
56910
56871
|
});
|
|
56911
56872
|
|
|
56912
56873
|
context.elements = values(cache);
|
|
56913
|
-
};
|
|
56914
|
-
|
|
56915
|
-
// helpers //////////
|
|
56916
|
-
|
|
56917
|
-
function isConnection$7(element) {
|
|
56918
|
-
return !!element.waypoints;
|
|
56919
|
-
}
|
|
56874
|
+
};
|
|
56920
56875
|
|
|
56921
56876
|
/**
|
|
56922
56877
|
* @typedef {import('../../../model/Types').Element} Element
|
|
@@ -57239,7 +57194,7 @@
|
|
|
57239
57194
|
|
|
57240
57195
|
// remove child shapes and connections
|
|
57241
57196
|
saveClear(shape.children, function(child) {
|
|
57242
|
-
if (isConnection$
|
|
57197
|
+
if (isConnection$2(child)) {
|
|
57243
57198
|
modeling.removeConnection(child, { nested: true });
|
|
57244
57199
|
} else {
|
|
57245
57200
|
modeling.removeShape(child, { nested: true });
|
|
@@ -57287,10 +57242,6 @@
|
|
|
57287
57242
|
return shape;
|
|
57288
57243
|
};
|
|
57289
57244
|
|
|
57290
|
-
function isConnection$6(element) {
|
|
57291
|
-
return element.waypoints;
|
|
57292
|
-
}
|
|
57293
|
-
|
|
57294
57245
|
/**
|
|
57295
57246
|
* @typedef {import('../Modeling').default} Modeling
|
|
57296
57247
|
*/
|
|
@@ -60421,13 +60372,13 @@
|
|
|
60421
60372
|
}
|
|
60422
60373
|
|
|
60423
60374
|
forEach$2(elements, function(element) {
|
|
60424
|
-
var assignedDi = isConnection$
|
|
60375
|
+
var assignedDi = isConnection$2(element) ? pick(di, [ 'border-color' ]) : di,
|
|
60425
60376
|
elementDi = getDi$1(element);
|
|
60426
60377
|
|
|
60427
60378
|
// TODO @barmac: remove once we drop bpmn.io properties
|
|
60428
60379
|
ensureLegacySupport(assignedDi);
|
|
60429
60380
|
|
|
60430
|
-
if (isLabel$
|
|
60381
|
+
if (isLabel$2(element)) {
|
|
60431
60382
|
|
|
60432
60383
|
// set label colors as bpmndi:BPMNLabel#color
|
|
60433
60384
|
self._commandStack.execute('element.updateModdleProperties', {
|
|
@@ -60487,10 +60438,6 @@
|
|
|
60487
60438
|
return /^#[0-9a-fA-F]{6}$/.test(context.fillStyle) ? context.fillStyle : null;
|
|
60488
60439
|
}
|
|
60489
60440
|
|
|
60490
|
-
function isConnection$5(element) {
|
|
60491
|
-
return !!element.waypoints;
|
|
60492
|
-
}
|
|
60493
|
-
|
|
60494
60441
|
/**
|
|
60495
60442
|
* Add legacy properties if required.
|
|
60496
60443
|
*
|
|
@@ -60553,7 +60500,7 @@
|
|
|
60553
60500
|
businessObject = element.businessObject,
|
|
60554
60501
|
newLabel = ctx.newLabel;
|
|
60555
60502
|
|
|
60556
|
-
if (!isLabel$
|
|
60503
|
+
if (!isLabel$2(element)
|
|
60557
60504
|
&& isLabelExternal(element)
|
|
60558
60505
|
&& !hasExternalLabel(element)
|
|
60559
60506
|
&& !isEmptyText(newLabel)) {
|
|
@@ -60593,11 +60540,11 @@
|
|
|
60593
60540
|
hints = ctx.hints || {};
|
|
60594
60541
|
|
|
60595
60542
|
// ignore internal labels for elements except text annotations
|
|
60596
|
-
if (!isLabel$
|
|
60543
|
+
if (!isLabel$2(label) && !is$6(label, 'bpmn:TextAnnotation')) {
|
|
60597
60544
|
return;
|
|
60598
60545
|
}
|
|
60599
60546
|
|
|
60600
|
-
if (isLabel$
|
|
60547
|
+
if (isLabel$2(label) && isEmptyText(newLabel)) {
|
|
60601
60548
|
|
|
60602
60549
|
if (hints.removeShape !== false) {
|
|
60603
60550
|
modeling.removeShape(label, { unsetLabel: false });
|
|
@@ -62706,7 +62653,7 @@
|
|
|
62706
62653
|
|
|
62707
62654
|
var filteredElements = filter(elements, function(element) {
|
|
62708
62655
|
|
|
62709
|
-
if (!isConnection$
|
|
62656
|
+
if (!isConnection$2(element)) {
|
|
62710
62657
|
return true;
|
|
62711
62658
|
} else {
|
|
62712
62659
|
|
|
@@ -62724,13 +62671,6 @@
|
|
|
62724
62671
|
return size(groupBy(elements, function(e) { return e.parent && e.parent.id; })) !== 1;
|
|
62725
62672
|
}
|
|
62726
62673
|
|
|
62727
|
-
/**
|
|
62728
|
-
* Checks if an element is a connection.
|
|
62729
|
-
*/
|
|
62730
|
-
function isConnection$4(element) {
|
|
62731
|
-
return element.waypoints;
|
|
62732
|
-
}
|
|
62733
|
-
|
|
62734
62674
|
/**
|
|
62735
62675
|
* @type { import('didi').ModuleDeclaration }
|
|
62736
62676
|
*/
|
|
@@ -64787,7 +64727,7 @@
|
|
|
64787
64727
|
});
|
|
64788
64728
|
|
|
64789
64729
|
// snap labels to mid only
|
|
64790
|
-
if (isLabel$
|
|
64730
|
+
if (isLabel$2(shape)) {
|
|
64791
64731
|
return snapContext;
|
|
64792
64732
|
}
|
|
64793
64733
|
|
|
@@ -64810,9 +64750,9 @@
|
|
|
64810
64750
|
forEach$2(snapTargets, function(snapTarget) {
|
|
64811
64751
|
|
|
64812
64752
|
// handle labels
|
|
64813
|
-
if (isLabel$
|
|
64753
|
+
if (isLabel$2(snapTarget)) {
|
|
64814
64754
|
|
|
64815
|
-
if (isLabel$
|
|
64755
|
+
if (isLabel$2(shape)) {
|
|
64816
64756
|
snapPoints.add('mid', mid$2(snapTarget));
|
|
64817
64757
|
}
|
|
64818
64758
|
|
|
@@ -64820,7 +64760,7 @@
|
|
|
64820
64760
|
}
|
|
64821
64761
|
|
|
64822
64762
|
// handle connections
|
|
64823
|
-
if (isConnection$
|
|
64763
|
+
if (isConnection$2(snapTarget)) {
|
|
64824
64764
|
|
|
64825
64765
|
// ignore single segment connections
|
|
64826
64766
|
if (snapTarget.waypoints.length < 3) {
|
|
@@ -64861,16 +64801,8 @@
|
|
|
64861
64801
|
|
|
64862
64802
|
// helpers //////////
|
|
64863
64803
|
|
|
64864
|
-
function isConnection$3(element) {
|
|
64865
|
-
return !!element.waypoints;
|
|
64866
|
-
}
|
|
64867
|
-
|
|
64868
64804
|
function isHidden$1(element) {
|
|
64869
64805
|
return !!element.hidden;
|
|
64870
|
-
}
|
|
64871
|
-
|
|
64872
|
-
function isLabel$3(element) {
|
|
64873
|
-
return !!element.labelTarget;
|
|
64874
64806
|
}
|
|
64875
64807
|
|
|
64876
64808
|
/**
|
|
@@ -65279,18 +65211,10 @@
|
|
|
65279
65211
|
return element.host === host;
|
|
65280
65212
|
}
|
|
65281
65213
|
|
|
65282
|
-
function isConnection$2(element) {
|
|
65283
|
-
return !!element.waypoints;
|
|
65284
|
-
}
|
|
65285
|
-
|
|
65286
65214
|
function isHidden(element) {
|
|
65287
65215
|
return !!element.hidden;
|
|
65288
65216
|
}
|
|
65289
65217
|
|
|
65290
|
-
function isLabel$2(element) {
|
|
65291
|
-
return !!element.labelTarget;
|
|
65292
|
-
}
|
|
65293
|
-
|
|
65294
65218
|
function isHorizontal(direction) {
|
|
65295
65219
|
return direction === 'n' || direction === 's';
|
|
65296
65220
|
}
|
|
@@ -67820,11 +67744,7 @@
|
|
|
67820
67744
|
|
|
67821
67745
|
var t$1,u,r,o$2=0,i$2=[],c=n$1.__b,f=n$1.__r,e$2=n$1.diffed,a$1=n$1.__c,v=n$1.unmount;function m(t,r){n$1.__h&&n$1.__h(u,t,o$2||r),o$2=0;var i=u.__H||(u.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({}),i.__[t]}function l$1(n){return o$2=1,p$1(w$1,n)}function p$1(n,r,o){var i=m(t$1++,2);return i.t=n,i.__c||(i.__=[o?o(r):w$1(void 0,r),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}));}],i.__c=u),i.__}function y(r,o){var i=m(t$1++,3);!n$1.__s&&k$1(i.__H,o)&&(i.__=r,i.__H=o,u.__H.__h.push(i));}function h(r,o){var i=m(t$1++,4);!n$1.__s&&k$1(i.__H,o)&&(i.__=r,i.__H=o,u.__h.push(i));}function s(n){return o$2=5,d(function(){return {current:n}},[])}function _(n,t,u){o$2=6,h(function(){"function"==typeof n?n(t()):n&&(n.current=t());},null==u?u:u.concat(n));}function d(n,u){var r=m(t$1++,7);return k$1(r.__H,u)&&(r.__=n(),r.__H=u,r.__h=n),r.__}function A$1(n,t){return o$2=8,d(function(){return n},t)}function F$1(n){var r=u.context[n.__c],o=m(t$1++,9);return o.__c=n,r?(null==o.__&&(o.__=!0,r.sub(u)),r.props.value):n.__}function T$1(t,u){n$1.useDebugValue&&n$1.useDebugValue(u?u(t):t);}function x$1(){i$2.forEach(function(t){if(t.__P)try{t.__H.__h.forEach(g$1),t.__H.__h.forEach(j$1),t.__H.__h=[];}catch(u){t.__H.__h=[],n$1.__e(u,t.__v);}}),i$2=[];}n$1.__b=function(n){u=null,c&&c(n);},n$1.__r=function(n){f&&f(n),t$1=0;var r=(u=n.__c).__H;r&&(r.__h.forEach(g$1),r.__h.forEach(j$1),r.__h=[]);},n$1.diffed=function(t){e$2&&e$2(t);var o=t.__c;o&&o.__H&&o.__H.__h.length&&(1!==i$2.push(o)&&r===n$1.requestAnimationFrame||((r=n$1.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(r),b&&cancelAnimationFrame(t),setTimeout(n);},r=setTimeout(u,100);b&&(t=requestAnimationFrame(u));})(x$1)),u=void 0;},n$1.__c=function(t,u){u.some(function(t){try{t.__h.forEach(g$1),t.__h=t.__h.filter(function(n){return !n.__||j$1(n)});}catch(r){u.some(function(n){n.__h&&(n.__h=[]);}),u=[],n$1.__e(r,t.__v);}}),a$1&&a$1(t,u);},n$1.unmount=function(t){v&&v(t);var u=t.__c;if(u&&u.__H)try{u.__H.__.forEach(g$1);}catch(t){n$1.__e(t,u.__v);}};var b="function"==typeof requestAnimationFrame;function g$1(n){var t=u;"function"==typeof n.__c&&n.__c(),u=t;}function j$1(n){var t=u;n.__c=n.__(),u=t;}function k$1(n,t){return !n||n.length!==t.length||t.some(function(t,u){return t!==n[u]})}function w$1(n,t){return "function"==typeof t?t(n):t}
|
|
67822
67746
|
|
|
67823
|
-
var
|
|
67824
|
-
var classnames$1 = {
|
|
67825
|
-
get exports(){ return classnamesExports; },
|
|
67826
|
-
set exports(v){ classnamesExports = v; },
|
|
67827
|
-
};
|
|
67747
|
+
var classnames$1 = {exports: {}};
|
|
67828
67748
|
|
|
67829
67749
|
/*!
|
|
67830
67750
|
Copyright (c) 2018 Jed Watson.
|
|
@@ -67879,10 +67799,11 @@
|
|
|
67879
67799
|
} else {
|
|
67880
67800
|
window.classNames = classNames;
|
|
67881
67801
|
}
|
|
67882
|
-
}());
|
|
67802
|
+
}());
|
|
67883
67803
|
} (classnames$1));
|
|
67884
67804
|
|
|
67885
|
-
var
|
|
67805
|
+
var classnamesExports = classnames$1.exports;
|
|
67806
|
+
var classnames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
67886
67807
|
|
|
67887
67808
|
function C$1(n,t){for(var e in t)n[e]=t[e];return n}function S(n,t){for(var e in n)if("__source"!==e&&!(e in t))return !0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return !0;return !1}function E(n){this.props=n;}function g(n,t){function e(n){var e=this.props.ref,r=e==n.ref;return !r&&e&&(e.call?e(null):e.current=null),t?!t(this.props,n)||!r:S(this.props,n)}function r(t){return this.shouldComponentUpdate=e,a$2(n,t)}return r.displayName="Memo("+(n.displayName||n.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(E.prototype=new p$2).isPureReactComponent=!0,E.prototype.shouldComponentUpdate=function(n,t){return S(this.props,n)||S(this.state,t)};var w=n$1.__b;n$1.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),w&&w(n);};var R="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function x(n){function t(t,e){var r=C$1({},t);return delete r.ref,n(r,(e=t.ref||e)&&("object"!=typeof e||"current"in e)?e:null)}return t.$$typeof=R,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(n.displayName||n.name)+")",t}var N=function(n,t){return null==n?null:w$2(w$2(n).map(t))},k={map:N,forEach:N,count:function(n){return n?w$2(n).length:0},only:function(n){var t=w$2(n);if(1!==t.length)throw "Children.only";return t[0]},toArray:w$2},A=n$1.__e;n$1.__e=function(n,t,e){if(n.then)for(var r,u=t;u=u.__;)if((r=u.__c)&&r.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),r.__c(n,t);A(n,t,e);};var O=n$1.unmount;function L(){this.__u=0,this.t=null,this.__b=null;}function U(n){var t=n.__.__c;return t&&t.__e&&t.__e(n)}function D(n){var t,e,r;function u(u){if(t||(t=n()).then(function(n){e=n.default||n;},function(n){r=n;}),r)throw r;if(!e)throw t;return a$2(e,u)}return u.displayName="Lazy",u.__f=!0,u}function F(){this.u=null,this.o=null;}n$1.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&!0===n.__h&&(n.type=null),O&&O(n);},(L.prototype=new p$2).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=U(r.__v),o=!1,i=function(){o||(o=!0,e.__R=null,u?u(l):l());};e.__R=i;var l=function(){if(!--r.__u){if(r.state.__e){var n=r.state.__e;r.__v.__k[0]=function n(t,e,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return n(t,e,r)}),t.__c&&t.__c.__P===e&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(n,n.__c.__P,n.__c.__O);}var t;for(r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate();}},f=!0===t.__h;r.__u++||f||r.setState({__e:r.__b=r.__v.__k[0]}),n.then(i,i);},L.prototype.componentWillUnmount=function(){this.t=[];},L.prototype.render=function(n,t){if(this.__b){if(this.__v.__k){var e=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function n(t,e,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c();}),t.__c.__H=null),null!=(t=C$1({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return n(t,e,r)})),t}(this.__b,e,r.__O=r.__P);}this.__b=null;}var u=t.__e&&a$2(y$1,null,n.fallback);return u&&(u.__h=null),[a$2(y$1,null,t.__e?null:n.children),u]};var M=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.u=e=e[2];}};function T(n){return this.getChildContext=function(){return n.context},n.children}function j(n){var t=this,e=n.i;t.componentWillUnmount=function(){N$1(null,t.l),t.l=null,t.i=null;},t.i&&t.i!==e&&t.componentWillUnmount(),n.__v?(t.l||(t.i=e,t.l={nodeType:1,parentNode:e,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n);},insertBefore:function(n,e){this.childNodes.push(n),t.i.appendChild(n);},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n);}}),N$1(a$2(T,{context:t.context},n.__v),t.l)):t.l&&t.componentWillUnmount();}function I(n,t){return a$2(j,{__v:n,i:t})}(F.prototype=new p$2).__e=function(n){var t=this,e=U(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),M(t,n,r)):u();};e?e(o):o();}},F.prototype.render=function(n){this.u=null,this.o=new Map;var t=w$2(n.children);n.revealOrder&&"b"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.o.set(t[e],this.u=[1,0,this.u]);return n.children},F.prototype.componentDidUpdate=F.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){M(n,e,t);});};var W="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,P=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,V=function(n){return ("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(n)};function z(n,t,e){return null==t.__k&&(t.textContent=""),N$1(n,t),"function"==typeof e&&e(),n?n.__c:null}function B(n,t,e){return O$1(n,t),"function"==typeof e&&e(),n?n.__c:null}p$2.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(n){Object.defineProperty(p$2.prototype,n,{configurable:!0,get:function(){return this["UNSAFE_"+n]},set:function(t){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:t});}});});var H=n$1.event;function Z(){}function Y(){return this.cancelBubble}function $(){return this.defaultPrevented}n$1.event=function(n){return H&&(n=H(n)),n.persist=Z,n.isPropagationStopped=Y,n.isDefaultPrevented=$,n.nativeEvent=n};var q,G={configurable:!0,get:function(){return this.class}},J=n$1.vnode;n$1.vnode=function(n){var t=n.type,e=n.props,r=e;if("string"==typeof t){for(var u in r={},e){var o=e[u];"value"===u&&"defaultValue"in e&&null==o||("defaultValue"===u&&"value"in e&&null==e.value?u="value":"download"===u&&!0===o?o="":/ondoubleclick/i.test(u)?u="ondblclick":/^onchange(textarea|input)/i.test(u+t)&&!V(e.type)?u="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(u)?u=u.toLowerCase():P.test(u)?u=u.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===o&&(o=void 0),r[u]=o);}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=w$2(e.children).forEach(function(n){n.props.selected=-1!=r.value.indexOf(n.props.value);})),"select"==t&&null!=r.defaultValue&&(r.value=w$2(e.children).forEach(function(n){n.props.selected=r.multiple?-1!=r.defaultValue.indexOf(n.props.value):r.defaultValue==n.props.value;})),n.props=r;}t&&e.class!=e.className&&(G.enumerable="className"in e,null!=e.className&&(r.class=e.className),Object.defineProperty(r,"className",G)),n.$$typeof=W,J&&J(n);};var K=n$1.__r;n$1.__r=function(n){K&&K(n),q=n.__c;};var Q={ReactCurrentDispatcher:{current:{readContext:function(n){return q.__n[n.__c].props.value}}}};"object"==typeof performance&&"function"==typeof performance.now?performance.now.bind(performance):function(){return Date.now()};function fn(n){return a$2.bind(null,n)}function cn(n){return !!n&&n.$$typeof===W}function an(n){return cn(n)?S$1.apply(null,arguments):n}function sn(n){return !!n.__k&&(N$1(null,n),!0)}function hn(n){return n&&(n.base||1===n.nodeType&&n)||null}var pn=function(n,t){return n(t)};var React = {useState:l$1,useReducer:p$1,useEffect:y,useLayoutEffect:h,useRef:s,useImperativeHandle:_,useMemo:d,useCallback:A$1,useContext:F$1,useDebugValue:T$1,version:"16.8.0",Children:k,render:z,hydrate:B,unmountComponentAtNode:sn,createPortal:I,createElement:a$2,createContext:q$1,createFactory:fn,cloneElement:an,createRef:h$1,Fragment:y$1,isValidElement:cn,findDOMNode:hn,Component:p$2,PureComponent:E,memo:g,forwardRef:x,unstable_batchedUpdates:pn,StrictMode:y$1,Suspense:L,SuspenseList:F,lazy:D,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Q};
|
|
67888
67809
|
|
|
@@ -98230,11 +98151,7 @@
|
|
|
98230
98151
|
zeebe.getVariablesForElement = getVariablesForElement;
|
|
98231
98152
|
zeebe.getVariablesForScope = getVariablesForScope$1;
|
|
98232
98153
|
|
|
98233
|
-
var
|
|
98234
|
-
var arrayMove$1 = {
|
|
98235
|
-
get exports(){ return arrayMoveExports; },
|
|
98236
|
-
set exports(v){ arrayMoveExports = v; },
|
|
98237
|
-
};
|
|
98154
|
+
var arrayMove$1 = {exports: {}};
|
|
98238
98155
|
|
|
98239
98156
|
const arrayMoveMutate = (array, from, to) => {
|
|
98240
98157
|
const startIndex = from < 0 ? array.length + from : from;
|
|
@@ -98254,7 +98171,7 @@
|
|
|
98254
98171
|
};
|
|
98255
98172
|
|
|
98256
98173
|
arrayMove$1.exports = arrayMove;
|
|
98257
|
-
var mutate =
|
|
98174
|
+
var mutate = arrayMove$1.exports.mutate = arrayMoveMutate;
|
|
98258
98175
|
|
|
98259
98176
|
var dist = {};
|
|
98260
98177
|
|
|
@@ -99049,6 +98966,8 @@
|
|
|
99049
98966
|
return 0;
|
|
99050
98967
|
};
|
|
99051
98968
|
|
|
98969
|
+
var semverCompare$1 = /*@__PURE__*/getDefaultExportFromCjs(semverCompare);
|
|
98970
|
+
|
|
99052
98971
|
var version$1 = "0.12.1";
|
|
99053
98972
|
|
|
99054
98973
|
var standaloneValidator = {exports: {}};
|
|
@@ -101286,7 +101205,7 @@
|
|
|
101286
101205
|
eventBus.fire('propertiesPanel.layoutChanged', {
|
|
101287
101206
|
layout: newLayout
|
|
101288
101207
|
});
|
|
101289
|
-
}, [eventBus
|
|
101208
|
+
}, [eventBus]);
|
|
101290
101209
|
|
|
101291
101210
|
// React to external layout changes
|
|
101292
101211
|
y(() => {
|
|
@@ -101616,17 +101535,17 @@
|
|
|
101616
101535
|
function getLinkEventDefinition(element) {
|
|
101617
101536
|
return getEventDefinition$1(element, 'bpmn:LinkEventDefinition');
|
|
101618
101537
|
}
|
|
101619
|
-
function getSignalEventDefinition(element) {
|
|
101538
|
+
function getSignalEventDefinition$1(element) {
|
|
101620
101539
|
return getEventDefinition$1(element, 'bpmn:SignalEventDefinition');
|
|
101621
101540
|
}
|
|
101622
101541
|
function isLinkSupported(element) {
|
|
101623
101542
|
return isAny$1(element, ['bpmn:IntermediateThrowEvent', 'bpmn:IntermediateCatchEvent']) && !!getLinkEventDefinition(element);
|
|
101624
101543
|
}
|
|
101625
|
-
function isSignalSupported(element) {
|
|
101626
|
-
return is$6(element, 'bpmn:Event') && !!getSignalEventDefinition(element);
|
|
101544
|
+
function isSignalSupported$1(element) {
|
|
101545
|
+
return is$6(element, 'bpmn:Event') && !!getSignalEventDefinition$1(element);
|
|
101627
101546
|
}
|
|
101628
|
-
function getSignal(element) {
|
|
101629
|
-
const signalEventDefinition = getSignalEventDefinition(element);
|
|
101547
|
+
function getSignal$1(element) {
|
|
101548
|
+
const signalEventDefinition = getSignalEventDefinition$1(element);
|
|
101630
101549
|
return signalEventDefinition && signalEventDefinition.get('signalRef');
|
|
101631
101550
|
}
|
|
101632
101551
|
function getEscalationEventDefinition(element) {
|
|
@@ -103179,24 +103098,24 @@
|
|
|
103179
103098
|
return is$6(element, 'bpmn:Participant') && element.businessObject.get('processRef');
|
|
103180
103099
|
}
|
|
103181
103100
|
|
|
103182
|
-
const EMPTY_OPTION$3 = '';
|
|
103183
|
-
const CREATE_NEW_OPTION$2 = 'create-new';
|
|
103184
|
-
|
|
103185
103101
|
/**
|
|
103186
103102
|
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
103187
103103
|
*/
|
|
103188
103104
|
|
|
103105
|
+
const EMPTY_OPTION$3 = '';
|
|
103106
|
+
const CREATE_NEW_OPTION$2 = 'create-new';
|
|
103107
|
+
|
|
103189
103108
|
/**
|
|
103190
|
-
* @returns {
|
|
103109
|
+
* @returns {Entry[]}
|
|
103191
103110
|
*/
|
|
103192
|
-
function SignalProps(props) {
|
|
103111
|
+
function SignalProps$1(props) {
|
|
103193
103112
|
const {
|
|
103194
103113
|
element
|
|
103195
103114
|
} = props;
|
|
103196
|
-
if (!isSignalSupported(element)) {
|
|
103115
|
+
if (!isSignalSupported$1(element)) {
|
|
103197
103116
|
return [];
|
|
103198
103117
|
}
|
|
103199
|
-
const signal = getSignal(element);
|
|
103118
|
+
const signal = getSignal$1(element);
|
|
103200
103119
|
let entries = [{
|
|
103201
103120
|
id: 'signalRef',
|
|
103202
103121
|
component: SignalRef,
|
|
@@ -103205,7 +103124,7 @@
|
|
|
103205
103124
|
if (signal) {
|
|
103206
103125
|
entries = [...entries, {
|
|
103207
103126
|
id: 'signalName',
|
|
103208
|
-
component: SignalName,
|
|
103127
|
+
component: SignalName$1,
|
|
103209
103128
|
isEdited: isEdited$1
|
|
103210
103129
|
}];
|
|
103211
103130
|
}
|
|
@@ -103218,9 +103137,9 @@
|
|
|
103218
103137
|
const bpmnFactory = useService('bpmnFactory');
|
|
103219
103138
|
const commandStack = useService('commandStack');
|
|
103220
103139
|
const translate = useService('translate');
|
|
103221
|
-
const signalEventDefinition = getSignalEventDefinition(element);
|
|
103140
|
+
const signalEventDefinition = getSignalEventDefinition$1(element);
|
|
103222
103141
|
const getValue = () => {
|
|
103223
|
-
const signal = getSignal(element);
|
|
103142
|
+
const signal = getSignal$1(element);
|
|
103224
103143
|
if (signal) {
|
|
103225
103144
|
return signal.get('id');
|
|
103226
103145
|
}
|
|
@@ -103294,14 +103213,14 @@
|
|
|
103294
103213
|
getOptions
|
|
103295
103214
|
});
|
|
103296
103215
|
}
|
|
103297
|
-
function SignalName(props) {
|
|
103216
|
+
function SignalName$1(props) {
|
|
103298
103217
|
const {
|
|
103299
103218
|
element
|
|
103300
103219
|
} = props;
|
|
103301
103220
|
const commandStack = useService('commandStack');
|
|
103302
103221
|
const translate = useService('translate');
|
|
103303
103222
|
const debounce = useService('debounceInput');
|
|
103304
|
-
const signal = getSignal(element);
|
|
103223
|
+
const signal = getSignal$1(element);
|
|
103305
103224
|
const getValue = () => {
|
|
103306
103225
|
return signal.get('name');
|
|
103307
103226
|
};
|
|
@@ -103679,7 +103598,7 @@
|
|
|
103679
103598
|
id: 'signal',
|
|
103680
103599
|
label: translate('Signal'),
|
|
103681
103600
|
component: Group,
|
|
103682
|
-
entries: [...SignalProps({
|
|
103601
|
+
entries: [...SignalProps$1({
|
|
103683
103602
|
element
|
|
103684
103603
|
})]
|
|
103685
103604
|
};
|
|
@@ -105370,7 +105289,7 @@
|
|
|
105370
105289
|
component: VariableName,
|
|
105371
105290
|
isEdited: isEdited$1
|
|
105372
105291
|
});
|
|
105373
|
-
if (!is$6(element, 'bpmn:StartEvent')) {
|
|
105292
|
+
if (!is$6(element, 'bpmn:StartEvent') || isInEventSubProcess$1(element)) {
|
|
105374
105293
|
entries.push({
|
|
105375
105294
|
id: 'conditionVariableEvents',
|
|
105376
105295
|
component: VariableEvents,
|
|
@@ -105503,6 +105422,11 @@
|
|
|
105503
105422
|
function createFormalExpression(parent, attributes, bpmnFactory) {
|
|
105504
105423
|
return createElement('bpmn:FormalExpression', attributes, is$6(parent, 'bpmn:SequenceFlow') ? getBusinessObject$2(parent) : getConditionalEventDefinition(parent), bpmnFactory);
|
|
105505
105424
|
}
|
|
105425
|
+
function isInEventSubProcess$1(element) {
|
|
105426
|
+
const bo = getBusinessObject$2(element),
|
|
105427
|
+
parent = bo.$parent;
|
|
105428
|
+
return is$6(parent, 'bpmn:SubProcess') && parent.triggeredByEvent;
|
|
105429
|
+
}
|
|
105506
105430
|
|
|
105507
105431
|
/**
|
|
105508
105432
|
* Cf. https://docs.camunda.org/manual/latest/user-guide/process-engine/scripting/
|
|
@@ -109579,14 +109503,14 @@
|
|
|
109579
109503
|
}
|
|
109580
109504
|
};
|
|
109581
109505
|
function addInMapping() {
|
|
109582
|
-
const businessObject = getSignalEventDefinition(element) || getBusinessObject$2(element);
|
|
109506
|
+
const businessObject = getSignalEventDefinition$1(element) || getBusinessObject$2(element);
|
|
109583
109507
|
const mapping = createElement('camunda:In', {
|
|
109584
109508
|
variables: 'all'
|
|
109585
109509
|
}, null, bpmnFactory);
|
|
109586
109510
|
addExtensionElements(element, businessObject, mapping, bpmnFactory, commandStack);
|
|
109587
109511
|
}
|
|
109588
109512
|
function removeInMapping() {
|
|
109589
|
-
const businessObject = getSignalEventDefinition(element) || getBusinessObject$2(element);
|
|
109513
|
+
const businessObject = getSignalEventDefinition$1(element) || getBusinessObject$2(element);
|
|
109590
109514
|
const mappings = findRelevantInMappings(element);
|
|
109591
109515
|
removeExtensionElements$1(element, businessObject, mappings, commandStack);
|
|
109592
109516
|
}
|
|
@@ -109628,7 +109552,7 @@
|
|
|
109628
109552
|
// helper //////////////////////////
|
|
109629
109553
|
|
|
109630
109554
|
function areInMappingsSupported$1(element) {
|
|
109631
|
-
const signalEventDefinition = getSignalEventDefinition(element);
|
|
109555
|
+
const signalEventDefinition = getSignalEventDefinition$1(element);
|
|
109632
109556
|
if (signalEventDefinition) {
|
|
109633
109557
|
return isAny$1(element, ['bpmn:IntermediateThrowEvent', 'bpmn:EndEvent']);
|
|
109634
109558
|
}
|
|
@@ -109636,7 +109560,7 @@
|
|
|
109636
109560
|
}
|
|
109637
109561
|
function getInMappings$1(element) {
|
|
109638
109562
|
const businessObject = getBusinessObject$2(element);
|
|
109639
|
-
const signalEventDefinition = getSignalEventDefinition(businessObject);
|
|
109563
|
+
const signalEventDefinition = getSignalEventDefinition$1(businessObject);
|
|
109640
109564
|
return getExtensionElementsList$1(signalEventDefinition || businessObject, 'camunda:In');
|
|
109641
109565
|
}
|
|
109642
109566
|
function findRelevantInMappings(element) {
|
|
@@ -109927,7 +109851,7 @@
|
|
|
109927
109851
|
}) {
|
|
109928
109852
|
return function (event) {
|
|
109929
109853
|
event.stopPropagation();
|
|
109930
|
-
const businessObject = getSignalEventDefinition(element) || getBusinessObject$2(element);
|
|
109854
|
+
const businessObject = getSignalEventDefinition$1(element) || getBusinessObject$2(element);
|
|
109931
109855
|
removeExtensionElements$1(element, businessObject, mapping, commandStack);
|
|
109932
109856
|
};
|
|
109933
109857
|
}
|
|
@@ -109938,7 +109862,7 @@
|
|
|
109938
109862
|
}) {
|
|
109939
109863
|
return function (event) {
|
|
109940
109864
|
event.stopPropagation();
|
|
109941
|
-
const businessObject = getSignalEventDefinition(element) || getBusinessObject$2(element);
|
|
109865
|
+
const businessObject = getSignalEventDefinition$1(element) || getBusinessObject$2(element);
|
|
109942
109866
|
const newMapping = createElement('camunda:In', {
|
|
109943
109867
|
source: '' // source is the default type
|
|
109944
109868
|
}, null, bpmnFactory);
|
|
@@ -109950,7 +109874,7 @@
|
|
|
109950
109874
|
|
|
109951
109875
|
function getInMappings(element) {
|
|
109952
109876
|
const businessObject = getBusinessObject$2(element);
|
|
109953
|
-
const signalEventDefinition = getSignalEventDefinition(businessObject);
|
|
109877
|
+
const signalEventDefinition = getSignalEventDefinition$1(businessObject);
|
|
109954
109878
|
const mappings = getExtensionElementsList$1(signalEventDefinition || businessObject, 'camunda:In');
|
|
109955
109879
|
|
|
109956
109880
|
// only retrieve relevant mappings here, others are handled in other groups
|
|
@@ -109961,7 +109885,7 @@
|
|
|
109961
109885
|
});
|
|
109962
109886
|
}
|
|
109963
109887
|
function areInMappingsSupported(element) {
|
|
109964
|
-
const signalEventDefinition = getSignalEventDefinition(element);
|
|
109888
|
+
const signalEventDefinition = getSignalEventDefinition$1(element);
|
|
109965
109889
|
if (signalEventDefinition) {
|
|
109966
109890
|
return isAny$1(element, ['bpmn:IntermediateThrowEvent', 'bpmn:EndEvent']);
|
|
109967
109891
|
}
|
|
@@ -114220,7 +114144,7 @@
|
|
|
114220
114144
|
schemaVersion = template.$schema && getSchemaVersion(template.$schema);
|
|
114221
114145
|
|
|
114222
114146
|
// (1) compatibility
|
|
114223
|
-
if (schemaVersion && semverCompare(SUPPORTED_SCHEMA_VERSION$1, schemaVersion) < 0) {
|
|
114147
|
+
if (schemaVersion && semverCompare$1(SUPPORTED_SCHEMA_VERSION$1, schemaVersion) < 0) {
|
|
114224
114148
|
return this._logError(`unsupported element template schema version <${schemaVersion}>. Your installation only supports up to version <${SUPPORTED_SCHEMA_VERSION$1}>. Please update your installation`, template);
|
|
114225
114149
|
}
|
|
114226
114150
|
|
|
@@ -114426,7 +114350,7 @@
|
|
|
114426
114350
|
}
|
|
114427
114351
|
|
|
114428
114352
|
// (2) compatibility
|
|
114429
|
-
if (schemaVersion && semverCompare(SUPPORTED_SCHEMA_VERSION, schemaVersion) < 0) {
|
|
114353
|
+
if (schemaVersion && semverCompare$1(SUPPORTED_SCHEMA_VERSION, schemaVersion) < 0) {
|
|
114430
114354
|
return this._logError(`unsupported element template schema version <${schemaVersion}>. Your installation only supports up to version <${SUPPORTED_SCHEMA_VERSION}>. Please update your installation`, template);
|
|
114431
114355
|
}
|
|
114432
114356
|
|
|
@@ -114555,7 +114479,11 @@
|
|
|
114555
114479
|
ElementTemplatesLoader.$inject = ['config.elementTemplates', 'eventBus', 'elementTemplates', 'moddle'];
|
|
114556
114480
|
|
|
114557
114481
|
function unlinkTemplate$1(element, injector) {
|
|
114558
|
-
const modeling = injector.get('modeling')
|
|
114482
|
+
const modeling = injector.get('modeling'),
|
|
114483
|
+
eventBus = injector.get('eventBus');
|
|
114484
|
+
eventBus.fire('elementTemplates.unlink', {
|
|
114485
|
+
element
|
|
114486
|
+
});
|
|
114559
114487
|
modeling.updateProperties(element, {
|
|
114560
114488
|
'camunda:modelerTemplate': null,
|
|
114561
114489
|
'camunda:modelerTemplateVersion': null
|
|
@@ -114563,7 +114491,11 @@
|
|
|
114563
114491
|
}
|
|
114564
114492
|
function removeTemplate(element, injector) {
|
|
114565
114493
|
const replace = injector.get('replace'),
|
|
114566
|
-
selection = injector.get('selection')
|
|
114494
|
+
selection = injector.get('selection'),
|
|
114495
|
+
eventBus = injector.get('eventBus');
|
|
114496
|
+
eventBus.fire('elementTemplates.remove', {
|
|
114497
|
+
element
|
|
114498
|
+
});
|
|
114567
114499
|
const businessObject = getBusinessObject$2(element);
|
|
114568
114500
|
const type = businessObject.$type,
|
|
114569
114501
|
eventDefinitionType = getEventDefinitionType(businessObject);
|
|
@@ -114576,7 +114508,12 @@
|
|
|
114576
114508
|
selection.select(newElement);
|
|
114577
114509
|
}
|
|
114578
114510
|
function updateTemplate$1(element, newTemplate, injector) {
|
|
114579
|
-
const elementTemplates = injector.get('elementTemplates')
|
|
114511
|
+
const elementTemplates = injector.get('elementTemplates'),
|
|
114512
|
+
eventBus = injector.get('eventBus');
|
|
114513
|
+
eventBus.fire('elementTemplates.update', {
|
|
114514
|
+
element,
|
|
114515
|
+
newTemplate
|
|
114516
|
+
});
|
|
114580
114517
|
return elementTemplates.applyTemplate(element, newTemplate);
|
|
114581
114518
|
}
|
|
114582
114519
|
function getVersionOrDateFromTemplate(template) {
|
|
@@ -114650,7 +114587,11 @@
|
|
|
114650
114587
|
}
|
|
114651
114588
|
|
|
114652
114589
|
function unlinkTemplate(element, injector) {
|
|
114653
|
-
const modeling = injector.get('modeling')
|
|
114590
|
+
const modeling = injector.get('modeling'),
|
|
114591
|
+
eventBus = injector.get('eventBus');
|
|
114592
|
+
eventBus.fire('elementTemplates.unlink', {
|
|
114593
|
+
element
|
|
114594
|
+
});
|
|
114654
114595
|
|
|
114655
114596
|
// remove template attributes
|
|
114656
114597
|
modeling.updateProperties(element, {
|
|
@@ -115531,7 +115472,7 @@
|
|
|
115531
115472
|
}
|
|
115532
115473
|
|
|
115533
115474
|
/**
|
|
115534
|
-
*
|
|
115475
|
+
* Unlink referenced element when template is unlinked.
|
|
115535
115476
|
*/
|
|
115536
115477
|
_handlePropertiesUpdate(context) {
|
|
115537
115478
|
const {
|
|
@@ -115547,11 +115488,9 @@
|
|
|
115547
115488
|
const bo = getBusinessObject$2(element);
|
|
115548
115489
|
const message = findMessage(bo);
|
|
115549
115490
|
if (message && getTemplateId$1(message)) {
|
|
115550
|
-
|
|
115551
|
-
|
|
115552
|
-
'messageRef': undefined
|
|
115491
|
+
this._modeling.updateModdleProperties(element, message, {
|
|
115492
|
+
[TEMPLATE_ID_ATTR$1]: null
|
|
115553
115493
|
});
|
|
115554
|
-
this._removeRootElement(message);
|
|
115555
115494
|
}
|
|
115556
115495
|
}
|
|
115557
115496
|
|
|
@@ -116324,7 +116263,7 @@
|
|
|
116324
116263
|
}
|
|
116325
116264
|
|
|
116326
116265
|
// get extension elements of either signal event definition or call activity
|
|
116327
|
-
const extensionElements = this._getOrCreateExtensionElements(getSignalEventDefinition(element) || element);
|
|
116266
|
+
const extensionElements = this._getOrCreateExtensionElements(getSignalEventDefinition$1(element) || element);
|
|
116328
116267
|
const oldInsAndOuts = findExtensions(extensionElements, ['camunda:In', 'camunda:Out']);
|
|
116329
116268
|
newProperties.forEach(newProperty => {
|
|
116330
116269
|
const oldProperty = findOldProperty(oldTemplate, newProperty),
|
|
@@ -119888,7 +119827,17 @@
|
|
|
119888
119827
|
const variables = {};
|
|
119889
119828
|
|
|
119890
119829
|
const workerTasks = bpmnjs.getDefinitions().get('rootElements').map(async element => {
|
|
119891
|
-
|
|
119830
|
+
|
|
119831
|
+
const elementVariables = await this._baseExtractor(element, [ this._extractor.bind(this) ]);
|
|
119832
|
+
|
|
119833
|
+
// Annotate variables with extractor information
|
|
119834
|
+
variables[element.id] = elementVariables.map(variable => {
|
|
119835
|
+
if (!variable.provider) {
|
|
119836
|
+
variable.provider = [ this._baseExtractor ];
|
|
119837
|
+
}
|
|
119838
|
+
|
|
119839
|
+
return variable;
|
|
119840
|
+
});
|
|
119892
119841
|
});
|
|
119893
119842
|
|
|
119894
119843
|
await Promise.all(workerTasks);
|
|
@@ -119923,7 +119872,8 @@
|
|
|
119923
119872
|
);
|
|
119924
119873
|
|
|
119925
119874
|
if (existingVariable) {
|
|
119926
|
-
|
|
119875
|
+
merge('origin', existingVariable, variable);
|
|
119876
|
+
merge('provider', existingVariable, variable);
|
|
119927
119877
|
mergeEntries(existingVariable, variable);
|
|
119928
119878
|
} else {
|
|
119929
119879
|
mergedVariables.push(variable);
|
|
@@ -119972,7 +119922,8 @@
|
|
|
119972
119922
|
processVariables.push({
|
|
119973
119923
|
...cloneVariable(variable),
|
|
119974
119924
|
origin: [ element ],
|
|
119975
|
-
scope: variable.scope || getScope(element, containerElement, variable.name)
|
|
119925
|
+
scope: variable.scope || getScope(element, containerElement, variable.name),
|
|
119926
|
+
provider: [ provider ]
|
|
119976
119927
|
});
|
|
119977
119928
|
});
|
|
119978
119929
|
});
|
|
@@ -120061,10 +120012,18 @@
|
|
|
120061
120012
|
return parent;
|
|
120062
120013
|
}
|
|
120063
120014
|
|
|
120064
|
-
function
|
|
120065
|
-
|
|
120015
|
+
function merge(property, target, source) {
|
|
120016
|
+
if (!source[property]) {
|
|
120017
|
+
source[property] = [];
|
|
120018
|
+
}
|
|
120019
|
+
|
|
120020
|
+
if (!target[property]) {
|
|
120021
|
+
target[property] = [];
|
|
120022
|
+
}
|
|
120023
|
+
|
|
120024
|
+
const originToAdd = source[property].filter(o => !target.origin.includes(o));
|
|
120066
120025
|
|
|
120067
|
-
target.
|
|
120026
|
+
target[property].push(...originToAdd);
|
|
120068
120027
|
}
|
|
120069
120028
|
|
|
120070
120029
|
function mergeEntries(target, source) {
|
|
@@ -121504,9 +121463,11 @@
|
|
|
121504
121463
|
/**
|
|
121505
121464
|
* Flatten array, one level deep.
|
|
121506
121465
|
*
|
|
121507
|
-
* @
|
|
121466
|
+
* @template T
|
|
121508
121467
|
*
|
|
121509
|
-
* @
|
|
121468
|
+
* @param {T[][]} arr
|
|
121469
|
+
*
|
|
121470
|
+
* @return {T[]}
|
|
121510
121471
|
*/
|
|
121511
121472
|
|
|
121512
121473
|
const nativeToString = Object.prototype.toString;
|
|
@@ -121528,6 +121489,11 @@
|
|
|
121528
121489
|
return nativeToString.call(obj) === '[object Number]';
|
|
121529
121490
|
}
|
|
121530
121491
|
|
|
121492
|
+
/**
|
|
121493
|
+
* @param {any} obj
|
|
121494
|
+
*
|
|
121495
|
+
* @return {boolean}
|
|
121496
|
+
*/
|
|
121531
121497
|
function isFunction(obj) {
|
|
121532
121498
|
const tag = nativeToString.call(obj);
|
|
121533
121499
|
|
|
@@ -121552,22 +121518,74 @@
|
|
|
121552
121518
|
return nativeHasOwnProperty.call(target, key);
|
|
121553
121519
|
}
|
|
121554
121520
|
|
|
121521
|
+
/**
|
|
121522
|
+
* @template T
|
|
121523
|
+
* @typedef { (
|
|
121524
|
+
* ((e: T) => boolean) |
|
|
121525
|
+
* ((e: T, idx: number) => boolean) |
|
|
121526
|
+
* ((e: T, key: string) => boolean) |
|
|
121527
|
+
* string |
|
|
121528
|
+
* number
|
|
121529
|
+
* ) } Matcher
|
|
121530
|
+
*/
|
|
121531
|
+
|
|
121532
|
+
/**
|
|
121533
|
+
* @template T
|
|
121534
|
+
* @template U
|
|
121535
|
+
*
|
|
121536
|
+
* @typedef { (
|
|
121537
|
+
* ((e: T) => U) | string | number
|
|
121538
|
+
* ) } Extractor
|
|
121539
|
+
*/
|
|
121540
|
+
|
|
121541
|
+
|
|
121542
|
+
/**
|
|
121543
|
+
* @template T
|
|
121544
|
+
* @typedef { (val: T, key: any) => boolean } MatchFn
|
|
121545
|
+
*/
|
|
121546
|
+
|
|
121547
|
+
/**
|
|
121548
|
+
* @template T
|
|
121549
|
+
* @typedef { T[] } ArrayCollection
|
|
121550
|
+
*/
|
|
121551
|
+
|
|
121552
|
+
/**
|
|
121553
|
+
* @template T
|
|
121554
|
+
* @typedef { { [key: string]: T } } StringKeyValueCollection
|
|
121555
|
+
*/
|
|
121556
|
+
|
|
121557
|
+
/**
|
|
121558
|
+
* @template T
|
|
121559
|
+
* @typedef { { [key: number]: T } } NumberKeyValueCollection
|
|
121560
|
+
*/
|
|
121561
|
+
|
|
121562
|
+
/**
|
|
121563
|
+
* @template T
|
|
121564
|
+
* @typedef { StringKeyValueCollection<T> | NumberKeyValueCollection<T> } KeyValueCollection
|
|
121565
|
+
*/
|
|
121566
|
+
|
|
121567
|
+
/**
|
|
121568
|
+
* @template T
|
|
121569
|
+
* @typedef { KeyValueCollection<T> | ArrayCollection<T> } Collection
|
|
121570
|
+
*/
|
|
121571
|
+
|
|
121555
121572
|
/**
|
|
121556
121573
|
* Find element in collection.
|
|
121557
121574
|
*
|
|
121558
|
-
* @
|
|
121559
|
-
* @param
|
|
121575
|
+
* @template T
|
|
121576
|
+
* @param {Collection<T>} collection
|
|
121577
|
+
* @param {Matcher<T>} matcher
|
|
121560
121578
|
*
|
|
121561
121579
|
* @return {Object}
|
|
121562
121580
|
*/
|
|
121563
121581
|
function find(collection, matcher) {
|
|
121564
121582
|
|
|
121565
|
-
|
|
121583
|
+
const matchFn = toMatcher(matcher);
|
|
121566
121584
|
|
|
121567
121585
|
let match;
|
|
121568
121586
|
|
|
121569
121587
|
forEach(collection, function(val, key) {
|
|
121570
|
-
if (
|
|
121588
|
+
if (matchFn(val, key)) {
|
|
121571
121589
|
match = val;
|
|
121572
121590
|
|
|
121573
121591
|
return false;
|
|
@@ -121583,10 +121601,11 @@
|
|
|
121583
121601
|
* Iterate over collection; returning something
|
|
121584
121602
|
* (non-undefined) will stop iteration.
|
|
121585
121603
|
*
|
|
121586
|
-
* @
|
|
121587
|
-
* @param
|
|
121604
|
+
* @template T
|
|
121605
|
+
* @param {Collection<T>} collection
|
|
121606
|
+
* @param { ((item: T, idx: number) => (boolean|void)) | ((item: T, key: string) => (boolean|void)) } iterator
|
|
121588
121607
|
*
|
|
121589
|
-
* @return {
|
|
121608
|
+
* @return {T} return result that stopped the iteration
|
|
121590
121609
|
*/
|
|
121591
121610
|
function forEach(collection, iterator) {
|
|
121592
121611
|
|
|
@@ -121629,6 +121648,12 @@
|
|
|
121629
121648
|
}
|
|
121630
121649
|
|
|
121631
121650
|
|
|
121651
|
+
/**
|
|
121652
|
+
* @template T
|
|
121653
|
+
* @param {Matcher<T>} matcher
|
|
121654
|
+
*
|
|
121655
|
+
* @return {MatchFn<T>}
|
|
121656
|
+
*/
|
|
121632
121657
|
function toMatcher(matcher) {
|
|
121633
121658
|
return isFunction(matcher) ? matcher : (e) => {
|
|
121634
121659
|
return e === matcher;
|
|
@@ -122460,8 +122485,12 @@
|
|
|
122460
122485
|
* To change the icons, modify the SVGs in `./resources`, execute `npx svgo -f resources --datauri enc -o dist`,
|
|
122461
122486
|
* and then replace respective icons with the optimized data URIs in `./dist`.
|
|
122462
122487
|
*/
|
|
122463
|
-
const appendIcon =
|
|
122464
|
-
|
|
122488
|
+
const appendIcon = `<svg width="22" height="22" viewBox="0 0 5.82 5.82" xmlns="http://www.w3.org/2000/svg">
|
|
122489
|
+
<path d="M1.3 3.4c.3 0 .5-.2.5-.5s-.2-.4-.5-.4c-.2 0-.4.1-.4.4 0 .3.2.5.4.5zM3 3.4c.2 0 .4-.2.4-.5s-.2-.4-.4-.4c-.3 0-.5.1-.5.4 0 .3.2.5.5.5zM4.6 3.4c.2 0 .4-.2.4-.5s-.2-.4-.4-.4c-.3 0-.5.1-.5.4 0 .3.2.5.5.5z"/>
|
|
122490
|
+
</svg>`;
|
|
122491
|
+
const createIcon = `<svg width="46" height="46" viewBox="-2 -2 9.82 9.82" xmlns="http://www.w3.org/2000/svg">
|
|
122492
|
+
<path d="M1.3 3.4c.3 0 .5-.2.5-.5s-.2-.4-.5-.4c-.2 0-.4.1-.4.4 0 .3.2.5.4.5zM3 3.4c.2 0 .4-.2.4-.5s-.2-.4-.4-.4c-.3 0-.5.1-.5.4 0 .3.2.5.5.5zM4.6 3.4c.2 0 .4-.2.4-.5s-.2-.4-.4-.4c-.3 0-.5.1-.5.4 0 .3.2.5.5.5z"/>
|
|
122493
|
+
</svg>`;
|
|
122465
122494
|
|
|
122466
122495
|
/**
|
|
122467
122496
|
* A provider for append context pad button
|
|
@@ -122507,7 +122536,7 @@
|
|
|
122507
122536
|
return {
|
|
122508
122537
|
'append': {
|
|
122509
122538
|
group: 'model',
|
|
122510
|
-
|
|
122539
|
+
html: `<div class="entry">${appendIcon}</div>`,
|
|
122511
122540
|
title: translate('Append element'),
|
|
122512
122541
|
action: {
|
|
122513
122542
|
click: function(event, element) {
|
|
@@ -122553,10 +122582,15 @@
|
|
|
122553
122582
|
|
|
122554
122583
|
function e(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}));}
|
|
122555
122584
|
|
|
122585
|
+
/**
|
|
122586
|
+
* @typedef { import('../model/Types').Element } Element
|
|
122587
|
+
* @typedef { import('../model/Types').ModdleElement } ModdleElement
|
|
122588
|
+
*/
|
|
122589
|
+
|
|
122556
122590
|
/**
|
|
122557
122591
|
* Is an element of the given BPMN type?
|
|
122558
122592
|
*
|
|
122559
|
-
* @param {
|
|
122593
|
+
* @param {Element|ModdleElement} element
|
|
122560
122594
|
* @param {string} type
|
|
122561
122595
|
*
|
|
122562
122596
|
* @return {boolean}
|
|
@@ -122571,8 +122605,8 @@
|
|
|
122571
122605
|
/**
|
|
122572
122606
|
* Return true if element has any of the given types.
|
|
122573
122607
|
*
|
|
122574
|
-
* @param {
|
|
122575
|
-
* @param {
|
|
122608
|
+
* @param {Element|ModdleElement} element
|
|
122609
|
+
* @param {string[]} types
|
|
122576
122610
|
*
|
|
122577
122611
|
* @return {boolean}
|
|
122578
122612
|
*/
|
|
@@ -122585,7 +122619,7 @@
|
|
|
122585
122619
|
/**
|
|
122586
122620
|
* Return the business object for a given element.
|
|
122587
122621
|
*
|
|
122588
|
-
* @param
|
|
122622
|
+
* @param {Element|ModdleElement} element
|
|
122589
122623
|
*
|
|
122590
122624
|
* @return {ModdleElement}
|
|
122591
122625
|
*/
|
|
@@ -122596,7 +122630,7 @@
|
|
|
122596
122630
|
/**
|
|
122597
122631
|
* Return the di object for a given element.
|
|
122598
122632
|
*
|
|
122599
|
-
* @param
|
|
122633
|
+
* @param {Element} element
|
|
122600
122634
|
*
|
|
122601
122635
|
* @return {ModdleElement}
|
|
122602
122636
|
*/
|
|
@@ -122604,14 +122638,25 @@
|
|
|
122604
122638
|
return element && element.di;
|
|
122605
122639
|
}
|
|
122606
122640
|
|
|
122607
|
-
|
|
122608
|
-
|
|
122641
|
+
/**
|
|
122642
|
+
* Checks whether a value is an instance of Label.
|
|
122643
|
+
*
|
|
122644
|
+
* @param {any} value
|
|
122645
|
+
*
|
|
122646
|
+
* @return {boolean}
|
|
122647
|
+
*/
|
|
122648
|
+
function isLabel(value) {
|
|
122649
|
+
return isObject(value) && has(value, 'labelTarget');
|
|
122609
122650
|
}
|
|
122610
122651
|
|
|
122611
122652
|
/**
|
|
122653
|
+
* @typedef {import('../core/Types').ElementLike} ElementLike
|
|
122612
122654
|
* @typedef {import('../core/EventBus').default} EventBus
|
|
122613
|
-
* @typedef {import(./
|
|
122614
|
-
*
|
|
122655
|
+
* @typedef {import('./CommandStack').CommandContext} CommandContext
|
|
122656
|
+
*
|
|
122657
|
+
* @typedef {string|string[]} Events
|
|
122658
|
+
* @typedef { (context: CommandContext) => ElementLike[] | void } HandlerFunction
|
|
122659
|
+
* @typedef { (context: CommandContext) => void } ComposeHandlerFunction
|
|
122615
122660
|
*/
|
|
122616
122661
|
|
|
122617
122662
|
var DEFAULT_PRIORITY = 1000;
|
|
@@ -122623,10 +122668,9 @@
|
|
|
122623
122668
|
* @class
|
|
122624
122669
|
* @constructor
|
|
122625
122670
|
*
|
|
122626
|
-
* @param {EventBus} eventBus
|
|
122627
|
-
*
|
|
122628
122671
|
* @example
|
|
122629
122672
|
*
|
|
122673
|
+
* ```javascript
|
|
122630
122674
|
* import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
|
|
122631
122675
|
*
|
|
122632
122676
|
* class CommandLogger extends CommandInterceptor {
|
|
@@ -122637,6 +122681,9 @@
|
|
|
122637
122681
|
* console.log('commandStack.shape-create.preExecute', event);
|
|
122638
122682
|
* });
|
|
122639
122683
|
* }
|
|
122684
|
+
* ```
|
|
122685
|
+
*
|
|
122686
|
+
* @param {EventBus} eventBus
|
|
122640
122687
|
*/
|
|
122641
122688
|
function CommandInterceptor(eventBus) {
|
|
122642
122689
|
|
|
@@ -122654,16 +122701,17 @@
|
|
|
122654
122701
|
};
|
|
122655
122702
|
}
|
|
122656
122703
|
|
|
122704
|
+
|
|
122657
122705
|
/**
|
|
122658
|
-
|
|
122659
|
-
|
|
122660
|
-
|
|
122661
|
-
|
|
122662
|
-
|
|
122663
|
-
|
|
122664
|
-
|
|
122665
|
-
|
|
122666
|
-
|
|
122706
|
+
* Intercept a command during one of the phases.
|
|
122707
|
+
*
|
|
122708
|
+
* @param {Events} [events] command(s) to intercept
|
|
122709
|
+
* @param {string} [hook] phase to intercept
|
|
122710
|
+
* @param {number} [priority]
|
|
122711
|
+
* @param {ComposeHandlerFunction|HandlerFunction} handlerFn
|
|
122712
|
+
* @param {boolean} [unwrap] whether the event should be unwrapped
|
|
122713
|
+
* @param {any} [that]
|
|
122714
|
+
*/
|
|
122667
122715
|
CommandInterceptor.prototype.on = function(events, hook, priority, handlerFn, unwrap, that) {
|
|
122668
122716
|
|
|
122669
122717
|
if (isFunction(hook) || isNumber(hook)) {
|
|
@@ -122705,35 +122753,130 @@
|
|
|
122705
122753
|
});
|
|
122706
122754
|
};
|
|
122707
122755
|
|
|
122756
|
+
/**
|
|
122757
|
+
* Add a <canExecute> phase of command interceptor.
|
|
122758
|
+
*
|
|
122759
|
+
* @param {Events} [events] command(s) to intercept
|
|
122760
|
+
* @param {number} [priority]
|
|
122761
|
+
* @param {ComposeHandlerFunction|HandlerFunction} handlerFn
|
|
122762
|
+
* @param {boolean} [unwrap] whether the event should be unwrapped
|
|
122763
|
+
* @param {any} [that]
|
|
122764
|
+
*/
|
|
122765
|
+
CommandInterceptor.prototype.canExecute = createHook('canExecute');
|
|
122766
|
+
|
|
122767
|
+
/**
|
|
122768
|
+
* Add a <preExecute> phase of command interceptor.
|
|
122769
|
+
*
|
|
122770
|
+
* @param {Events} [events] command(s) to intercept
|
|
122771
|
+
* @param {number} [priority]
|
|
122772
|
+
* @param {ComposeHandlerFunction|HandlerFunction} handlerFn
|
|
122773
|
+
* @param {boolean} [unwrap] whether the event should be unwrapped
|
|
122774
|
+
* @param {any} [that]
|
|
122775
|
+
*/
|
|
122776
|
+
CommandInterceptor.prototype.preExecute = createHook('preExecute');
|
|
122708
122777
|
|
|
122709
|
-
|
|
122710
|
-
|
|
122711
|
-
|
|
122712
|
-
|
|
122713
|
-
|
|
122714
|
-
|
|
122715
|
-
|
|
122716
|
-
|
|
122717
|
-
|
|
122718
|
-
|
|
122719
|
-
|
|
122778
|
+
/**
|
|
122779
|
+
* Add a <preExecuted> phase of command interceptor.
|
|
122780
|
+
*
|
|
122781
|
+
* @param {Events} [events] command(s) to intercept
|
|
122782
|
+
* @param {number} [priority]
|
|
122783
|
+
* @param {ComposeHandlerFunction|HandlerFunction} handlerFn
|
|
122784
|
+
* @param {boolean} [unwrap] whether the event should be unwrapped
|
|
122785
|
+
* @param {any} [that]
|
|
122786
|
+
*/
|
|
122787
|
+
CommandInterceptor.prototype.preExecuted = createHook('preExecuted');
|
|
122788
|
+
|
|
122789
|
+
/**
|
|
122790
|
+
* Add a <execute> phase of command interceptor.
|
|
122791
|
+
*
|
|
122792
|
+
* @param {Events} [events] command(s) to intercept
|
|
122793
|
+
* @param {number} [priority]
|
|
122794
|
+
* @param {ComposeHandlerFunction|HandlerFunction} handlerFn
|
|
122795
|
+
* @param {boolean} [unwrap] whether the event should be unwrapped
|
|
122796
|
+
* @param {any} [that]
|
|
122797
|
+
*/
|
|
122798
|
+
CommandInterceptor.prototype.execute = createHook('execute');
|
|
122799
|
+
|
|
122800
|
+
/**
|
|
122801
|
+
* Add a <executed> phase of command interceptor.
|
|
122802
|
+
*
|
|
122803
|
+
* @param {Events} [events] command(s) to intercept
|
|
122804
|
+
* @param {number} [priority]
|
|
122805
|
+
* @param {ComposeHandlerFunction|HandlerFunction} handlerFn
|
|
122806
|
+
* @param {boolean} [unwrap] whether the event should be unwrapped
|
|
122807
|
+
* @param {any} [that]
|
|
122808
|
+
*/
|
|
122809
|
+
CommandInterceptor.prototype.executed = createHook('executed');
|
|
122810
|
+
|
|
122811
|
+
/**
|
|
122812
|
+
* Add a <postExecute> phase of command interceptor.
|
|
122813
|
+
*
|
|
122814
|
+
* @param {Events} [events] command(s) to intercept
|
|
122815
|
+
* @param {number} [priority]
|
|
122816
|
+
* @param {ComposeHandlerFunction|HandlerFunction} handlerFn
|
|
122817
|
+
* @param {boolean} [unwrap] whether the event should be unwrapped
|
|
122818
|
+
* @param {any} [that]
|
|
122819
|
+
*/
|
|
122820
|
+
CommandInterceptor.prototype.postExecute = createHook('postExecute');
|
|
122821
|
+
|
|
122822
|
+
/**
|
|
122823
|
+
* Add a <postExecuted> phase of command interceptor.
|
|
122824
|
+
*
|
|
122825
|
+
* @param {Events} [events] command(s) to intercept
|
|
122826
|
+
* @param {number} [priority]
|
|
122827
|
+
* @param {ComposeHandlerFunction|HandlerFunction} handlerFn
|
|
122828
|
+
* @param {boolean} [unwrap] whether the event should be unwrapped
|
|
122829
|
+
* @param {any} [that]
|
|
122830
|
+
*/
|
|
122831
|
+
CommandInterceptor.prototype.postExecuted = createHook('postExecuted');
|
|
122832
|
+
|
|
122833
|
+
/**
|
|
122834
|
+
* Add a <revert> phase of command interceptor.
|
|
122835
|
+
*
|
|
122836
|
+
* @param {Events} [events] command(s) to intercept
|
|
122837
|
+
* @param {number} [priority]
|
|
122838
|
+
* @param {ComposeHandlerFunction|HandlerFunction} handlerFn
|
|
122839
|
+
* @param {boolean} [unwrap] whether the event should be unwrapped
|
|
122840
|
+
* @param {any} [that]
|
|
122841
|
+
*/
|
|
122842
|
+
CommandInterceptor.prototype.revert = createHook('revert');
|
|
122843
|
+
|
|
122844
|
+
/**
|
|
122845
|
+
* Add a <reverted> phase of command interceptor.
|
|
122846
|
+
*
|
|
122847
|
+
* @param {Events} [events] command(s) to intercept
|
|
122848
|
+
* @param {number} [priority]
|
|
122849
|
+
* @param {ComposeHandlerFunction|HandlerFunction} handlerFn
|
|
122850
|
+
* @param {boolean} [unwrap] whether the event should be unwrapped
|
|
122851
|
+
* @param {any} [that]
|
|
122852
|
+
*/
|
|
122853
|
+
CommandInterceptor.prototype.reverted = createHook('reverted');
|
|
122720
122854
|
|
|
122721
122855
|
/*
|
|
122722
122856
|
* Add prototype methods for each phase of command execution (e.g. execute,
|
|
122723
122857
|
* revert).
|
|
122858
|
+
*
|
|
122859
|
+
* @param {string} hook
|
|
122860
|
+
*
|
|
122861
|
+
* @return { (
|
|
122862
|
+
* events?: Events,
|
|
122863
|
+
* priority?: number,
|
|
122864
|
+
* handlerFn: ComposeHandlerFunction|HandlerFunction,
|
|
122865
|
+
* unwrap?: boolean
|
|
122866
|
+
* ) => any }
|
|
122724
122867
|
*/
|
|
122725
|
-
|
|
122868
|
+
function createHook(hook) {
|
|
122726
122869
|
|
|
122727
122870
|
/**
|
|
122728
|
-
*
|
|
122871
|
+
* @this {CommandInterceptor}
|
|
122729
122872
|
*
|
|
122730
|
-
* @param {
|
|
122731
|
-
* @param {number} [priority]
|
|
122732
|
-
* @param {ComposeHandlerFunction|HandlerFunction} handlerFn
|
|
122733
|
-
* @param {boolean} [unwrap]
|
|
122734
|
-
* @param {
|
|
122873
|
+
* @param {Events} [events]
|
|
122874
|
+
* @param {number} [priority]
|
|
122875
|
+
* @param {ComposeHandlerFunction|HandlerFunction} handlerFn
|
|
122876
|
+
* @param {boolean} [unwrap]
|
|
122877
|
+
* @param {any} [that]
|
|
122735
122878
|
*/
|
|
122736
|
-
|
|
122879
|
+
const hookFn = function(events, priority, handlerFn, unwrap, that) {
|
|
122737
122880
|
|
|
122738
122881
|
if (isFunction(events) || isNumber(events)) {
|
|
122739
122882
|
that = unwrap;
|
|
@@ -122745,7 +122888,9 @@
|
|
|
122745
122888
|
|
|
122746
122889
|
this.on(events, hook, priority, handlerFn, unwrap, that);
|
|
122747
122890
|
};
|
|
122748
|
-
|
|
122891
|
+
|
|
122892
|
+
return hookFn;
|
|
122893
|
+
}
|
|
122749
122894
|
|
|
122750
122895
|
/**
|
|
122751
122896
|
* @typedef {import('../../core/EventBus').default} EventBus
|
|
@@ -122757,6 +122902,8 @@
|
|
|
122757
122902
|
* Extensions should implement the init method to actually add their custom
|
|
122758
122903
|
* modeling checks. Checks may be added via the #addRule(action, fn) method.
|
|
122759
122904
|
*
|
|
122905
|
+
* @class
|
|
122906
|
+
*
|
|
122760
122907
|
* @param {EventBus} eventBus
|
|
122761
122908
|
*/
|
|
122762
122909
|
function RuleProvider(eventBus) {
|
|
@@ -122774,15 +122921,16 @@
|
|
|
122774
122921
|
* Adds a modeling rule for the given action, implemented through
|
|
122775
122922
|
* a callback function.
|
|
122776
122923
|
*
|
|
122777
|
-
* The
|
|
122924
|
+
* The callback receives a modeling specific action context
|
|
122778
122925
|
* to perform its check. It must return `false` to disallow the
|
|
122779
|
-
* action from happening or `true` to allow the action.
|
|
122780
|
-
*
|
|
122781
|
-
*
|
|
122782
|
-
* rules
|
|
122926
|
+
* action from happening or `true` to allow the action. Usually returing
|
|
122927
|
+
* `null` denotes that a particular interaction shall be ignored.
|
|
122928
|
+
* By returning nothing or `undefined` you pass evaluation to lower
|
|
122929
|
+
* priority rules.
|
|
122783
122930
|
*
|
|
122784
122931
|
* @example
|
|
122785
122932
|
*
|
|
122933
|
+
* ```javascript
|
|
122786
122934
|
* ResizableRules.prototype.init = function() {
|
|
122787
122935
|
*
|
|
122788
122936
|
* \/**
|
|
@@ -122809,10 +122957,11 @@
|
|
|
122809
122957
|
* }
|
|
122810
122958
|
* });
|
|
122811
122959
|
* };
|
|
122960
|
+
* ```
|
|
122812
122961
|
*
|
|
122813
|
-
* @param {string|
|
|
122962
|
+
* @param {string|string[]} actions the identifier for the modeling action to check
|
|
122814
122963
|
* @param {number} [priority] the priority at which this rule is being applied
|
|
122815
|
-
* @param {
|
|
122964
|
+
* @param {(any) => any} fn the callback function that performs the actual check
|
|
122816
122965
|
*/
|
|
122817
122966
|
RuleProvider.prototype.addRule = function(actions, priority, fn) {
|
|
122818
122967
|
|
|
@@ -123105,7 +123254,7 @@
|
|
|
123105
123254
|
return {
|
|
123106
123255
|
'create': {
|
|
123107
123256
|
group: 'create',
|
|
123108
|
-
|
|
123257
|
+
html: `<div class="entry"> ${createIcon}</div>`,
|
|
123109
123258
|
title: translate('Create element'),
|
|
123110
123259
|
action: {
|
|
123111
123260
|
click: function(event) {
|
|
@@ -123208,6 +123357,7 @@
|
|
|
123208
123357
|
|
|
123209
123358
|
/**
|
|
123210
123359
|
* @param {KeyboardEvent} event
|
|
123360
|
+
* @return {boolean}
|
|
123211
123361
|
*/
|
|
123212
123362
|
function isCmd(event) {
|
|
123213
123363
|
|
|
@@ -123223,8 +123373,9 @@
|
|
|
123223
123373
|
/**
|
|
123224
123374
|
* Checks if key pressed is one of provided keys.
|
|
123225
123375
|
*
|
|
123226
|
-
* @param {string|
|
|
123376
|
+
* @param {string|string[]} keys
|
|
123227
123377
|
* @param {KeyboardEvent} event
|
|
123378
|
+
* @return {boolean}
|
|
123228
123379
|
*/
|
|
123229
123380
|
function isKey(keys, event) {
|
|
123230
123381
|
keys = isArray(keys) ? keys : [ keys ];
|
|
@@ -123239,18 +123390,30 @@
|
|
|
123239
123390
|
return event.shiftKey;
|
|
123240
123391
|
}
|
|
123241
123392
|
|
|
123393
|
+
/**
|
|
123394
|
+
* @param {KeyboardEvent} event
|
|
123395
|
+
*/
|
|
123242
123396
|
function isCopy(event) {
|
|
123243
123397
|
return isCmd(event) && isKey(KEYS_COPY, event);
|
|
123244
123398
|
}
|
|
123245
123399
|
|
|
123400
|
+
/**
|
|
123401
|
+
* @param {KeyboardEvent} event
|
|
123402
|
+
*/
|
|
123246
123403
|
function isPaste(event) {
|
|
123247
123404
|
return isCmd(event) && isKey(KEYS_PASTE, event);
|
|
123248
123405
|
}
|
|
123249
123406
|
|
|
123407
|
+
/**
|
|
123408
|
+
* @param {KeyboardEvent} event
|
|
123409
|
+
*/
|
|
123250
123410
|
function isUndo(event) {
|
|
123251
123411
|
return isCmd(event) && !isShift(event) && isKey(KEYS_UNDO, event);
|
|
123252
123412
|
}
|
|
123253
123413
|
|
|
123414
|
+
/**
|
|
123415
|
+
* @param {KeyboardEvent} event
|
|
123416
|
+
*/
|
|
123254
123417
|
function isRedo(event) {
|
|
123255
123418
|
return isCmd(event) && (
|
|
123256
123419
|
isKey(KEYS_REDO, event) || (
|
|
@@ -123526,6 +123689,17 @@
|
|
|
123526
123689
|
],
|
|
123527
123690
|
};
|
|
123528
123691
|
|
|
123692
|
+
/**
|
|
123693
|
+
* @typedef {import('../model/Types').Element} Element
|
|
123694
|
+
* @typedef {import('../model/Types').ModdleElement} ModdleElement
|
|
123695
|
+
*/
|
|
123696
|
+
|
|
123697
|
+
/**
|
|
123698
|
+
* @param {Element} element
|
|
123699
|
+
* @param {ModdleElement} [di]
|
|
123700
|
+
*
|
|
123701
|
+
* @return {boolean}
|
|
123702
|
+
*/
|
|
123529
123703
|
function isExpanded(element, di) {
|
|
123530
123704
|
|
|
123531
123705
|
if (is(element, 'bpmn:CallActivity')) {
|
|
@@ -123549,14 +123723,21 @@
|
|
|
123549
123723
|
return true;
|
|
123550
123724
|
}
|
|
123551
123725
|
|
|
123726
|
+
/**
|
|
123727
|
+
* @typedef {import('../../../model/Types').Element} Element
|
|
123728
|
+
* @typedef {import('diagram-js/lib/features/popup-menu/PopupMenu').PopupMenuTarget} PopupMenuTarget
|
|
123729
|
+
*
|
|
123730
|
+
* @typedef {(entry: PopupMenuTarget) => boolean} DifferentTypeValidator
|
|
123731
|
+
*/
|
|
123732
|
+
|
|
123552
123733
|
/**
|
|
123553
123734
|
* Returns true, if an element is from a different type
|
|
123554
123735
|
* than a target definition. Takes into account the type,
|
|
123555
123736
|
* event definition type and triggeredByEvent property.
|
|
123556
123737
|
*
|
|
123557
|
-
* @param {
|
|
123738
|
+
* @param {Element} element
|
|
123558
123739
|
*
|
|
123559
|
-
* @return {
|
|
123740
|
+
* @return {DifferentTypeValidator}
|
|
123560
123741
|
*/
|
|
123561
123742
|
function isDifferentType(element) {
|
|
123562
123743
|
|
|
@@ -123587,6 +123768,28 @@
|
|
|
123587
123768
|
};
|
|
123588
123769
|
}
|
|
123589
123770
|
|
|
123771
|
+
/**
|
|
123772
|
+
* @typedef { () => string } LabelGetter
|
|
123773
|
+
*
|
|
123774
|
+
* @typedef { {
|
|
123775
|
+
* label: string | LabelGetter;
|
|
123776
|
+
* actionName: string;
|
|
123777
|
+
* className: string;
|
|
123778
|
+
* target?: {
|
|
123779
|
+
* type: string;
|
|
123780
|
+
* isExpanded?: boolean;
|
|
123781
|
+
* isInterrupting?: boolean;
|
|
123782
|
+
* triggeredByEvent?: boolean;
|
|
123783
|
+
* cancelActivity?: boolean;
|
|
123784
|
+
* eventDefinitionType?: string;
|
|
123785
|
+
* eventDefinitionAttrs?: Record<string, any>
|
|
123786
|
+
* };
|
|
123787
|
+
* } } ReplaceOption
|
|
123788
|
+
*/
|
|
123789
|
+
|
|
123790
|
+
/**
|
|
123791
|
+
* @type {ReplaceOption[]}
|
|
123792
|
+
*/
|
|
123590
123793
|
var START_EVENT = [
|
|
123591
123794
|
{
|
|
123592
123795
|
label: 'Start Event',
|
|
@@ -123650,6 +123853,9 @@
|
|
|
123650
123853
|
}
|
|
123651
123854
|
];
|
|
123652
123855
|
|
|
123856
|
+
/**
|
|
123857
|
+
* @type {ReplaceOption[]}
|
|
123858
|
+
*/
|
|
123653
123859
|
var START_EVENT_SUB_PROCESS = [
|
|
123654
123860
|
{
|
|
123655
123861
|
label: 'Start Event',
|
|
@@ -123677,6 +123883,9 @@
|
|
|
123677
123883
|
}
|
|
123678
123884
|
];
|
|
123679
123885
|
|
|
123886
|
+
/**
|
|
123887
|
+
* @type {ReplaceOption[]}
|
|
123888
|
+
*/
|
|
123680
123889
|
var INTERMEDIATE_EVENT = [
|
|
123681
123890
|
{
|
|
123682
123891
|
label: 'Start Event',
|
|
@@ -123800,6 +124009,9 @@
|
|
|
123800
124009
|
}
|
|
123801
124010
|
];
|
|
123802
124011
|
|
|
124012
|
+
/**
|
|
124013
|
+
* @type {ReplaceOption[]}
|
|
124014
|
+
*/
|
|
123803
124015
|
var END_EVENT = [
|
|
123804
124016
|
{
|
|
123805
124017
|
label: 'Start Event',
|
|
@@ -123890,6 +124102,9 @@
|
|
|
123890
124102
|
}
|
|
123891
124103
|
];
|
|
123892
124104
|
|
|
124105
|
+
/**
|
|
124106
|
+
* @type {ReplaceOption[]}
|
|
124107
|
+
*/
|
|
123893
124108
|
var GATEWAY = [
|
|
123894
124109
|
{
|
|
123895
124110
|
label: 'Exclusive Gateway',
|
|
@@ -123959,6 +124174,9 @@
|
|
|
123959
124174
|
// }
|
|
123960
124175
|
];
|
|
123961
124176
|
|
|
124177
|
+
/**
|
|
124178
|
+
* @type {ReplaceOption[]}
|
|
124179
|
+
*/
|
|
123962
124180
|
var SUBPROCESS_EXPANDED = [
|
|
123963
124181
|
{
|
|
123964
124182
|
label: 'Transaction',
|
|
@@ -123990,6 +124208,9 @@
|
|
|
123990
124208
|
}
|
|
123991
124209
|
];
|
|
123992
124210
|
|
|
124211
|
+
/**
|
|
124212
|
+
* @type {ReplaceOption[]}
|
|
124213
|
+
*/
|
|
123993
124214
|
var TRANSACTION = [
|
|
123994
124215
|
{
|
|
123995
124216
|
label: 'Transaction',
|
|
@@ -124021,8 +124242,14 @@
|
|
|
124021
124242
|
}
|
|
124022
124243
|
];
|
|
124023
124244
|
|
|
124245
|
+
/**
|
|
124246
|
+
* @type {ReplaceOption[]}
|
|
124247
|
+
*/
|
|
124024
124248
|
var EVENT_SUB_PROCESS = TRANSACTION;
|
|
124025
124249
|
|
|
124250
|
+
/**
|
|
124251
|
+
* @type {ReplaceOption[]}
|
|
124252
|
+
*/
|
|
124026
124253
|
var TASK = [
|
|
124027
124254
|
{
|
|
124028
124255
|
label: 'Task',
|
|
@@ -124116,6 +124343,9 @@
|
|
|
124116
124343
|
}
|
|
124117
124344
|
];
|
|
124118
124345
|
|
|
124346
|
+
/**
|
|
124347
|
+
* @type {ReplaceOption[]}
|
|
124348
|
+
*/
|
|
124119
124349
|
var DATA_OBJECT_REFERENCE = [
|
|
124120
124350
|
{
|
|
124121
124351
|
label: 'Data Store Reference',
|
|
@@ -124127,6 +124357,9 @@
|
|
|
124127
124357
|
}
|
|
124128
124358
|
];
|
|
124129
124359
|
|
|
124360
|
+
/**
|
|
124361
|
+
* @type {ReplaceOption[]}
|
|
124362
|
+
*/
|
|
124130
124363
|
var DATA_STORE_REFERENCE = [
|
|
124131
124364
|
{
|
|
124132
124365
|
label: 'Data Object Reference',
|
|
@@ -124138,6 +124371,9 @@
|
|
|
124138
124371
|
}
|
|
124139
124372
|
];
|
|
124140
124373
|
|
|
124374
|
+
/**
|
|
124375
|
+
* @type {ReplaceOption[]}
|
|
124376
|
+
*/
|
|
124141
124377
|
var BOUNDARY_EVENT = [
|
|
124142
124378
|
{
|
|
124143
124379
|
label: 'Message Boundary Event',
|
|
@@ -124263,6 +124499,9 @@
|
|
|
124263
124499
|
}
|
|
124264
124500
|
];
|
|
124265
124501
|
|
|
124502
|
+
/**
|
|
124503
|
+
* @type {ReplaceOption[]}
|
|
124504
|
+
*/
|
|
124266
124505
|
var EVENT_SUB_PROCESS_START_EVENT = [
|
|
124267
124506
|
{
|
|
124268
124507
|
label: 'Message Start Event',
|
|
@@ -124379,6 +124618,9 @@
|
|
|
124379
124618
|
}
|
|
124380
124619
|
];
|
|
124381
124620
|
|
|
124621
|
+
/**
|
|
124622
|
+
* @type {ReplaceOption[]}
|
|
124623
|
+
*/
|
|
124382
124624
|
var SEQUENCE_FLOW = [
|
|
124383
124625
|
{
|
|
124384
124626
|
label: 'Sequence Flow',
|
|
@@ -124397,6 +124639,9 @@
|
|
|
124397
124639
|
}
|
|
124398
124640
|
];
|
|
124399
124641
|
|
|
124642
|
+
/**
|
|
124643
|
+
* @type {ReplaceOption[]}
|
|
124644
|
+
*/
|
|
124400
124645
|
var PARTICIPANT = [
|
|
124401
124646
|
{
|
|
124402
124647
|
label: 'Expanded Pool',
|