camunda-bpmn-js 0.20.0 → 0.21.1
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/base-modeler.development.js +1297 -2458
- package/dist/base-modeler.production.min.js +4 -4
- package/dist/base-navigated-viewer.development.js +295 -589
- package/dist/base-navigated-viewer.production.min.js +2 -2
- package/dist/base-viewer.development.js +291 -585
- package/dist/base-viewer.production.min.js +2 -2
- package/dist/camunda-cloud-modeler.development.js +1655 -3063
- package/dist/camunda-cloud-modeler.production.min.js +4 -4
- package/dist/camunda-cloud-navigated-viewer.development.js +295 -589
- package/dist/camunda-cloud-navigated-viewer.production.min.js +2 -2
- package/dist/camunda-cloud-viewer.development.js +291 -585
- package/dist/camunda-cloud-viewer.production.min.js +2 -2
- package/dist/camunda-platform-modeler.development.js +1507 -2981
- package/dist/camunda-platform-modeler.production.min.js +4 -4
- package/dist/camunda-platform-navigated-viewer.development.js +295 -589
- package/dist/camunda-platform-navigated-viewer.production.min.js +2 -2
- package/dist/camunda-platform-viewer.development.js +291 -585
- package/dist/camunda-platform-viewer.production.min.js +2 -2
- package/package.json +10 -10
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
* @return {Array<?>}
|
|
51
51
|
*/
|
|
52
52
|
|
|
53
|
-
const nativeToString$
|
|
54
|
-
const nativeHasOwnProperty$
|
|
53
|
+
const nativeToString$1 = Object.prototype.toString;
|
|
54
|
+
const nativeHasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
55
55
|
|
|
56
|
-
function isUndefined$
|
|
56
|
+
function isUndefined$2(obj) {
|
|
57
57
|
return obj === undefined;
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -61,20 +61,20 @@
|
|
|
61
61
|
return obj !== undefined;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
function isArray$
|
|
65
|
-
return nativeToString$
|
|
64
|
+
function isArray$2(obj) {
|
|
65
|
+
return nativeToString$1.call(obj) === '[object Array]';
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
function isObject
|
|
69
|
-
return nativeToString$
|
|
68
|
+
function isObject(obj) {
|
|
69
|
+
return nativeToString$1.call(obj) === '[object Object]';
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
function isNumber(obj) {
|
|
73
|
-
return nativeToString$
|
|
73
|
+
return nativeToString$1.call(obj) === '[object Number]';
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
function isFunction
|
|
77
|
-
const tag = nativeToString$
|
|
76
|
+
function isFunction(obj) {
|
|
77
|
+
const tag = nativeToString$1.call(obj);
|
|
78
78
|
|
|
79
79
|
return (
|
|
80
80
|
tag === '[object Function]' ||
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
function isString
|
|
89
|
-
return nativeToString$
|
|
88
|
+
function isString(obj) {
|
|
89
|
+
return nativeToString$1.call(obj) === '[object String]';
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
/**
|
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
*
|
|
98
98
|
* @return {Boolean}
|
|
99
99
|
*/
|
|
100
|
-
function has$
|
|
101
|
-
return nativeHasOwnProperty$
|
|
100
|
+
function has$1(target, key) {
|
|
101
|
+
return nativeHasOwnProperty$1.call(target, key);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
/**
|
|
@@ -109,13 +109,13 @@
|
|
|
109
109
|
*
|
|
110
110
|
* @return {Object}
|
|
111
111
|
*/
|
|
112
|
-
function find
|
|
112
|
+
function find(collection, matcher) {
|
|
113
113
|
|
|
114
|
-
matcher = toMatcher
|
|
114
|
+
matcher = toMatcher(matcher);
|
|
115
115
|
|
|
116
116
|
let match;
|
|
117
117
|
|
|
118
|
-
forEach$
|
|
118
|
+
forEach$1(collection, function(val, key) {
|
|
119
119
|
if (matcher(val, key)) {
|
|
120
120
|
match = val;
|
|
121
121
|
|
|
@@ -128,6 +128,32 @@
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
|
|
131
|
+
/**
|
|
132
|
+
* Find element index in collection.
|
|
133
|
+
*
|
|
134
|
+
* @param {Array|Object} collection
|
|
135
|
+
* @param {Function} matcher
|
|
136
|
+
*
|
|
137
|
+
* @return {Object}
|
|
138
|
+
*/
|
|
139
|
+
function findIndex(collection, matcher) {
|
|
140
|
+
|
|
141
|
+
matcher = toMatcher(matcher);
|
|
142
|
+
|
|
143
|
+
let idx = isArray$2(collection) ? -1 : undefined;
|
|
144
|
+
|
|
145
|
+
forEach$1(collection, function(val, key) {
|
|
146
|
+
if (matcher(val, key)) {
|
|
147
|
+
idx = key;
|
|
148
|
+
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
return idx;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
|
|
131
157
|
/**
|
|
132
158
|
* Find element in collection.
|
|
133
159
|
*
|
|
@@ -136,11 +162,11 @@
|
|
|
136
162
|
*
|
|
137
163
|
* @return {Array} result
|
|
138
164
|
*/
|
|
139
|
-
function filter
|
|
165
|
+
function filter(collection, matcher) {
|
|
140
166
|
|
|
141
167
|
let result = [];
|
|
142
168
|
|
|
143
|
-
forEach$
|
|
169
|
+
forEach$1(collection, function(val, key) {
|
|
144
170
|
if (matcher(val, key)) {
|
|
145
171
|
result.push(val);
|
|
146
172
|
}
|
|
@@ -159,20 +185,20 @@
|
|
|
159
185
|
*
|
|
160
186
|
* @return {Object} return result that stopped the iteration
|
|
161
187
|
*/
|
|
162
|
-
function forEach$
|
|
188
|
+
function forEach$1(collection, iterator) {
|
|
163
189
|
|
|
164
190
|
let val,
|
|
165
191
|
result;
|
|
166
192
|
|
|
167
|
-
if (isUndefined$
|
|
193
|
+
if (isUndefined$2(collection)) {
|
|
168
194
|
return;
|
|
169
195
|
}
|
|
170
196
|
|
|
171
|
-
const convertKey = isArray$
|
|
197
|
+
const convertKey = isArray$2(collection) ? toNum$1 : identity$1;
|
|
172
198
|
|
|
173
199
|
for (let key in collection) {
|
|
174
200
|
|
|
175
|
-
if (has$
|
|
201
|
+
if (has$1(collection, key)) {
|
|
176
202
|
val = collection[key];
|
|
177
203
|
|
|
178
204
|
result = iterator(val, convertKey(key));
|
|
@@ -196,7 +222,7 @@
|
|
|
196
222
|
*/
|
|
197
223
|
function reduce(collection, iterator, result) {
|
|
198
224
|
|
|
199
|
-
forEach$
|
|
225
|
+
forEach$1(collection, function(value, idx) {
|
|
200
226
|
result = iterator(result, value, idx);
|
|
201
227
|
});
|
|
202
228
|
|
|
@@ -232,7 +258,7 @@
|
|
|
232
258
|
*/
|
|
233
259
|
function some(collection, matcher) {
|
|
234
260
|
|
|
235
|
-
return !!find
|
|
261
|
+
return !!find(collection, matcher);
|
|
236
262
|
}
|
|
237
263
|
|
|
238
264
|
|
|
@@ -249,7 +275,7 @@
|
|
|
249
275
|
|
|
250
276
|
let result = [];
|
|
251
277
|
|
|
252
|
-
forEach$
|
|
278
|
+
forEach$1(collection, function(val, key) {
|
|
253
279
|
result.push(fn(val, key));
|
|
254
280
|
});
|
|
255
281
|
|
|
@@ -282,18 +308,18 @@
|
|
|
282
308
|
}
|
|
283
309
|
|
|
284
310
|
|
|
285
|
-
function toMatcher
|
|
286
|
-
return isFunction
|
|
311
|
+
function toMatcher(matcher) {
|
|
312
|
+
return isFunction(matcher) ? matcher : (e) => {
|
|
287
313
|
return e === matcher;
|
|
288
314
|
};
|
|
289
315
|
}
|
|
290
316
|
|
|
291
317
|
|
|
292
|
-
function identity$
|
|
318
|
+
function identity$1(arg) {
|
|
293
319
|
return arg;
|
|
294
320
|
}
|
|
295
321
|
|
|
296
|
-
function toNum$
|
|
322
|
+
function toNum$1(arg) {
|
|
297
323
|
return Number(arg);
|
|
298
324
|
}
|
|
299
325
|
|
|
@@ -379,7 +405,7 @@
|
|
|
379
405
|
*
|
|
380
406
|
* @return {Function} bound function
|
|
381
407
|
*/
|
|
382
|
-
function bind$
|
|
408
|
+
function bind$2(fn, target) {
|
|
383
409
|
return fn.bind(target);
|
|
384
410
|
}
|
|
385
411
|
|
|
@@ -391,10 +417,34 @@
|
|
|
391
417
|
*
|
|
392
418
|
* @return {Object} the target
|
|
393
419
|
*/
|
|
394
|
-
function assign$
|
|
420
|
+
function assign$1(target, ...others) {
|
|
395
421
|
return Object.assign(target, ...others);
|
|
396
422
|
}
|
|
397
423
|
|
|
424
|
+
/**
|
|
425
|
+
* Pick given properties from the target object.
|
|
426
|
+
*
|
|
427
|
+
* @param {Object} target
|
|
428
|
+
* @param {Array} properties
|
|
429
|
+
*
|
|
430
|
+
* @return {Object} target
|
|
431
|
+
*/
|
|
432
|
+
function pick(target, properties) {
|
|
433
|
+
|
|
434
|
+
let result = {};
|
|
435
|
+
|
|
436
|
+
let obj = Object(target);
|
|
437
|
+
|
|
438
|
+
forEach$1(properties, function(prop) {
|
|
439
|
+
|
|
440
|
+
if (prop in obj) {
|
|
441
|
+
result[prop] = target[prop];
|
|
442
|
+
}
|
|
443
|
+
});
|
|
444
|
+
|
|
445
|
+
return result;
|
|
446
|
+
}
|
|
447
|
+
|
|
398
448
|
/**
|
|
399
449
|
* Pick all target properties, excluding the given ones.
|
|
400
450
|
*
|
|
@@ -409,7 +459,7 @@
|
|
|
409
459
|
|
|
410
460
|
let obj = Object(target);
|
|
411
461
|
|
|
412
|
-
forEach$
|
|
462
|
+
forEach$1(obj, function(prop, key) {
|
|
413
463
|
|
|
414
464
|
if (properties.indexOf(key) === -1) {
|
|
415
465
|
result[key] = prop;
|
|
@@ -1361,14 +1411,17 @@
|
|
|
1361
1411
|
* @return {Array<?>}
|
|
1362
1412
|
*/
|
|
1363
1413
|
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1414
|
+
const nativeToString = Object.prototype.toString;
|
|
1415
|
+
const nativeHasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1416
|
+
|
|
1417
|
+
function isUndefined$1(obj) {
|
|
1367
1418
|
return obj === undefined;
|
|
1368
1419
|
}
|
|
1369
|
-
|
|
1370
|
-
|
|
1420
|
+
|
|
1421
|
+
function isArray$1(obj) {
|
|
1422
|
+
return nativeToString.call(obj) === '[object Array]';
|
|
1371
1423
|
}
|
|
1424
|
+
|
|
1372
1425
|
/**
|
|
1373
1426
|
* Return true, if target owns a property with the given key.
|
|
1374
1427
|
*
|
|
@@ -1377,10 +1430,11 @@
|
|
|
1377
1430
|
*
|
|
1378
1431
|
* @return {Boolean}
|
|
1379
1432
|
*/
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
return nativeHasOwnProperty$2.call(target, key);
|
|
1433
|
+
function has(target, key) {
|
|
1434
|
+
return nativeHasOwnProperty.call(target, key);
|
|
1383
1435
|
}
|
|
1436
|
+
|
|
1437
|
+
|
|
1384
1438
|
/**
|
|
1385
1439
|
* Iterate over collection; returning something
|
|
1386
1440
|
* (non-undefined) will stop iteration.
|
|
@@ -1390,19 +1444,22 @@
|
|
|
1390
1444
|
*
|
|
1391
1445
|
* @return {Object} return result that stopped the iteration
|
|
1392
1446
|
*/
|
|
1447
|
+
function forEach(collection, iterator) {
|
|
1393
1448
|
|
|
1394
|
-
|
|
1395
|
-
|
|
1449
|
+
let val,
|
|
1450
|
+
result;
|
|
1396
1451
|
|
|
1397
|
-
if (isUndefined$
|
|
1452
|
+
if (isUndefined$1(collection)) {
|
|
1398
1453
|
return;
|
|
1399
1454
|
}
|
|
1400
1455
|
|
|
1401
|
-
|
|
1456
|
+
const convertKey = isArray$1(collection) ? toNum : identity;
|
|
1402
1457
|
|
|
1403
|
-
for (
|
|
1404
|
-
|
|
1458
|
+
for (let key in collection) {
|
|
1459
|
+
|
|
1460
|
+
if (has(collection, key)) {
|
|
1405
1461
|
val = collection[key];
|
|
1462
|
+
|
|
1406
1463
|
result = iterator(val, convertKey(key));
|
|
1407
1464
|
|
|
1408
1465
|
if (result === false) {
|
|
@@ -1412,11 +1469,12 @@
|
|
|
1412
1469
|
}
|
|
1413
1470
|
}
|
|
1414
1471
|
|
|
1415
|
-
|
|
1472
|
+
|
|
1473
|
+
function identity(arg) {
|
|
1416
1474
|
return arg;
|
|
1417
1475
|
}
|
|
1418
1476
|
|
|
1419
|
-
function toNum
|
|
1477
|
+
function toNum(arg) {
|
|
1420
1478
|
return Number(arg);
|
|
1421
1479
|
}
|
|
1422
1480
|
|
|
@@ -1428,15 +1486,15 @@
|
|
|
1428
1486
|
*
|
|
1429
1487
|
* @return {Element} the element
|
|
1430
1488
|
*/
|
|
1431
|
-
function assign
|
|
1489
|
+
function assign(element, ...styleSources) {
|
|
1432
1490
|
const target = element.style;
|
|
1433
1491
|
|
|
1434
|
-
forEach
|
|
1492
|
+
forEach(styleSources, function(style) {
|
|
1435
1493
|
if (!style) {
|
|
1436
1494
|
return;
|
|
1437
1495
|
}
|
|
1438
1496
|
|
|
1439
|
-
forEach
|
|
1497
|
+
forEach(style, function(value, key) {
|
|
1440
1498
|
target[key] = value;
|
|
1441
1499
|
});
|
|
1442
1500
|
});
|
|
@@ -1721,7 +1779,7 @@
|
|
|
1721
1779
|
// when delegating.
|
|
1722
1780
|
var forceCaptureEvents = [ 'focus', 'blur' ];
|
|
1723
1781
|
|
|
1724
|
-
function bind
|
|
1782
|
+
function bind(el, selector, type, fn, capture) {
|
|
1725
1783
|
if (forceCaptureEvents.indexOf(type) !== -1) {
|
|
1726
1784
|
capture = true;
|
|
1727
1785
|
}
|
|
@@ -1753,7 +1811,7 @@
|
|
|
1753
1811
|
}
|
|
1754
1812
|
|
|
1755
1813
|
var delegate = {
|
|
1756
|
-
bind
|
|
1814
|
+
bind,
|
|
1757
1815
|
unbind
|
|
1758
1816
|
};
|
|
1759
1817
|
|
|
@@ -2690,7 +2748,7 @@
|
|
|
2690
2748
|
var computeStyle = styles.computeStyle;
|
|
2691
2749
|
|
|
2692
2750
|
function addMarker(id, options) {
|
|
2693
|
-
var attrs = assign$
|
|
2751
|
+
var attrs = assign$1({
|
|
2694
2752
|
fill: black,
|
|
2695
2753
|
strokeWidth: 1,
|
|
2696
2754
|
strokeLinecap: 'round',
|
|
@@ -2862,7 +2920,7 @@
|
|
|
2862
2920
|
|
|
2863
2921
|
function drawCircle(parentGfx, width, height, offset, attrs) {
|
|
2864
2922
|
|
|
2865
|
-
if (isObject
|
|
2923
|
+
if (isObject(offset)) {
|
|
2866
2924
|
attrs = offset;
|
|
2867
2925
|
offset = 0;
|
|
2868
2926
|
}
|
|
@@ -2897,7 +2955,7 @@
|
|
|
2897
2955
|
|
|
2898
2956
|
function drawRect(parentGfx, width, height, r, offset, attrs) {
|
|
2899
2957
|
|
|
2900
|
-
if (isObject
|
|
2958
|
+
if (isObject(offset)) {
|
|
2901
2959
|
attrs = offset;
|
|
2902
2960
|
offset = 0;
|
|
2903
2961
|
}
|
|
@@ -2985,7 +3043,7 @@
|
|
|
2985
3043
|
}
|
|
2986
3044
|
|
|
2987
3045
|
function drawMarker(type, parentGfx, path, attrs) {
|
|
2988
|
-
return drawPath(parentGfx, path, assign$
|
|
3046
|
+
return drawPath(parentGfx, path, assign$1({ 'data-marker': type }, attrs));
|
|
2989
3047
|
}
|
|
2990
3048
|
|
|
2991
3049
|
function renderer(type) {
|
|
@@ -3057,7 +3115,7 @@
|
|
|
3057
3115
|
|
|
3058
3116
|
function renderLabel(parentGfx, label, options) {
|
|
3059
3117
|
|
|
3060
|
-
options = assign$
|
|
3118
|
+
options = assign$1({
|
|
3061
3119
|
size: {
|
|
3062
3120
|
width: 100
|
|
3063
3121
|
}
|
|
@@ -3097,7 +3155,7 @@
|
|
|
3097
3155
|
return renderLabel(parentGfx, getLabel(element), {
|
|
3098
3156
|
box: box,
|
|
3099
3157
|
fitBox: true,
|
|
3100
|
-
style: assign$
|
|
3158
|
+
style: assign$1(
|
|
3101
3159
|
{},
|
|
3102
3160
|
textRenderer.getExternalStyle(),
|
|
3103
3161
|
{
|
|
@@ -3699,7 +3757,7 @@
|
|
|
3699
3757
|
return task;
|
|
3700
3758
|
},
|
|
3701
3759
|
'bpmn:SubProcess': function(parentGfx, element, attrs) {
|
|
3702
|
-
attrs = assign$
|
|
3760
|
+
attrs = assign$1({
|
|
3703
3761
|
fill: getFillColor(element, defaultFillColor),
|
|
3704
3762
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
3705
3763
|
}, attrs);
|
|
@@ -3785,7 +3843,7 @@
|
|
|
3785
3843
|
return lane;
|
|
3786
3844
|
},
|
|
3787
3845
|
'bpmn:Lane': function(parentGfx, element, attrs) {
|
|
3788
|
-
var rect = drawRect(parentGfx, element.width, element.height, 0, assign$
|
|
3846
|
+
var rect = drawRect(parentGfx, element.width, element.height, 0, assign$1({
|
|
3789
3847
|
fill: getFillColor(element, defaultFillColor),
|
|
3790
3848
|
fillOpacity: HIGH_FILL_OPACITY,
|
|
3791
3849
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
@@ -4007,7 +4065,7 @@
|
|
|
4007
4065
|
var fill = getFillColor(element, defaultFillColor),
|
|
4008
4066
|
stroke = getStrokeColor(element, defaultStrokeColor);
|
|
4009
4067
|
|
|
4010
|
-
attrs = assign$
|
|
4068
|
+
attrs = assign$1({
|
|
4011
4069
|
strokeDasharray: '0.5, 5',
|
|
4012
4070
|
strokeLinecap: 'round',
|
|
4013
4071
|
strokeLinejoin: 'round',
|
|
@@ -4195,12 +4253,12 @@
|
|
|
4195
4253
|
}
|
|
4196
4254
|
|
|
4197
4255
|
// apply fillOpacity
|
|
4198
|
-
var outerAttrs = assign$
|
|
4256
|
+
var outerAttrs = assign$1({}, attrs, {
|
|
4199
4257
|
fillOpacity: 1
|
|
4200
4258
|
});
|
|
4201
4259
|
|
|
4202
4260
|
// apply no-fill
|
|
4203
|
-
var innerAttrs = assign$
|
|
4261
|
+
var innerAttrs = assign$1({}, attrs, {
|
|
4204
4262
|
fill: 'none'
|
|
4205
4263
|
});
|
|
4206
4264
|
|
|
@@ -4423,7 +4481,7 @@
|
|
|
4423
4481
|
};
|
|
4424
4482
|
}
|
|
4425
4483
|
|
|
4426
|
-
forEach$
|
|
4484
|
+
forEach$1(taskMarkers, function(marker) {
|
|
4427
4485
|
renderer(marker)(parentGfx, element, position);
|
|
4428
4486
|
});
|
|
4429
4487
|
|
|
@@ -4551,8 +4609,8 @@
|
|
|
4551
4609
|
|
|
4552
4610
|
function parsePadding(padding) {
|
|
4553
4611
|
|
|
4554
|
-
if (isObject
|
|
4555
|
-
return assign$
|
|
4612
|
+
if (isObject(padding)) {
|
|
4613
|
+
return assign$1({ top: 0, left: 0, right: 0, bottom: 0 }, padding);
|
|
4556
4614
|
} else {
|
|
4557
4615
|
return {
|
|
4558
4616
|
top: padding,
|
|
@@ -4716,7 +4774,7 @@
|
|
|
4716
4774
|
id: 'helper-svg'
|
|
4717
4775
|
});
|
|
4718
4776
|
|
|
4719
|
-
assign
|
|
4777
|
+
assign(helperSvg, {
|
|
4720
4778
|
visibility: 'hidden',
|
|
4721
4779
|
position: 'fixed',
|
|
4722
4780
|
width: 0,
|
|
@@ -4741,7 +4799,7 @@
|
|
|
4741
4799
|
*/
|
|
4742
4800
|
function Text(config) {
|
|
4743
4801
|
|
|
4744
|
-
this._config = assign$
|
|
4802
|
+
this._config = assign$1({}, {
|
|
4745
4803
|
size: DEFAULT_LABEL_SIZE$1,
|
|
4746
4804
|
padding: DEFAULT_BOX_PADDING,
|
|
4747
4805
|
style: {},
|
|
@@ -4790,8 +4848,8 @@
|
|
|
4790
4848
|
* @return {Object} { element, dimensions }
|
|
4791
4849
|
*/
|
|
4792
4850
|
Text.prototype.layoutText = function(text, options) {
|
|
4793
|
-
var box = assign$
|
|
4794
|
-
style = assign$
|
|
4851
|
+
var box = assign$1({}, this._config.size, options.box),
|
|
4852
|
+
style = assign$1({}, this._config.style, options.style),
|
|
4795
4853
|
align = parseAlign(options.align || this._config.align),
|
|
4796
4854
|
padding = parsePadding(options.padding !== undefined ? options.padding : this._config.padding),
|
|
4797
4855
|
fitBox = options.fitBox || false;
|
|
@@ -4847,7 +4905,7 @@
|
|
|
4847
4905
|
|
|
4848
4906
|
// layout each line taking into account that parent
|
|
4849
4907
|
// shape might resize to fit text size
|
|
4850
|
-
forEach$
|
|
4908
|
+
forEach$1(layouted, function(line) {
|
|
4851
4909
|
|
|
4852
4910
|
var x;
|
|
4853
4911
|
|
|
@@ -4906,7 +4964,7 @@
|
|
|
4906
4964
|
|
|
4907
4965
|
function TextRenderer(config) {
|
|
4908
4966
|
|
|
4909
|
-
var defaultStyle = assign$
|
|
4967
|
+
var defaultStyle = assign$1({
|
|
4910
4968
|
fontFamily: 'Arial, sans-serif',
|
|
4911
4969
|
fontSize: DEFAULT_FONT_SIZE,
|
|
4912
4970
|
fontWeight: 'normal',
|
|
@@ -4915,7 +4973,7 @@
|
|
|
4915
4973
|
|
|
4916
4974
|
var fontSize = parseInt(defaultStyle.fontSize, 10) - 1;
|
|
4917
4975
|
|
|
4918
|
-
var externalStyle = assign$
|
|
4976
|
+
var externalStyle = assign$1({}, defaultStyle, {
|
|
4919
4977
|
fontSize: fontSize
|
|
4920
4978
|
}, config && config.externalStyle || {});
|
|
4921
4979
|
|
|
@@ -5651,7 +5709,7 @@
|
|
|
5651
5709
|
size = DEFAULT_LABEL_SIZE;
|
|
5652
5710
|
}
|
|
5653
5711
|
|
|
5654
|
-
return assign$
|
|
5712
|
+
return assign$1({
|
|
5655
5713
|
x: mid.x - size.width / 2,
|
|
5656
5714
|
y: mid.y - size.height / 2
|
|
5657
5715
|
}, size);
|
|
@@ -5819,7 +5877,7 @@
|
|
|
5819
5877
|
* @return {Object}
|
|
5820
5878
|
*/
|
|
5821
5879
|
function elementData(semantic, di, attrs) {
|
|
5822
|
-
return assign$
|
|
5880
|
+
return assign$1({
|
|
5823
5881
|
id: semantic.id,
|
|
5824
5882
|
type: semantic.$type,
|
|
5825
5883
|
businessObject: semantic,
|
|
@@ -6374,13 +6432,13 @@
|
|
|
6374
6432
|
}
|
|
6375
6433
|
|
|
6376
6434
|
function registerEvents(svg) {
|
|
6377
|
-
forEach$
|
|
6435
|
+
forEach$1(bindings, function(val, key) {
|
|
6378
6436
|
registerEvent(svg, key, val);
|
|
6379
6437
|
});
|
|
6380
6438
|
}
|
|
6381
6439
|
|
|
6382
6440
|
function unregisterEvents(svg) {
|
|
6383
|
-
forEach$
|
|
6441
|
+
forEach$1(bindings, function(val, key) {
|
|
6384
6442
|
unregisterEvent(svg, key, val);
|
|
6385
6443
|
});
|
|
6386
6444
|
}
|
|
@@ -6451,7 +6509,7 @@
|
|
|
6451
6509
|
|
|
6452
6510
|
function createHitStyle(classNames, attrs) {
|
|
6453
6511
|
|
|
6454
|
-
attrs = assign$
|
|
6512
|
+
attrs = assign$1({
|
|
6455
6513
|
stroke: 'white',
|
|
6456
6514
|
strokeWidth: 15
|
|
6457
6515
|
}, attrs || {});
|
|
@@ -6490,7 +6548,7 @@
|
|
|
6490
6548
|
this.removeHits = function(gfx) {
|
|
6491
6549
|
var hits = all('.djs-hit', gfx);
|
|
6492
6550
|
|
|
6493
|
-
forEach$
|
|
6551
|
+
forEach$1(hits, remove$3);
|
|
6494
6552
|
};
|
|
6495
6553
|
|
|
6496
6554
|
/**
|
|
@@ -6549,7 +6607,7 @@
|
|
|
6549
6607
|
*/
|
|
6550
6608
|
this.createBoxHit = function(gfx, type, attrs) {
|
|
6551
6609
|
|
|
6552
|
-
attrs = assign$
|
|
6610
|
+
attrs = assign$1({
|
|
6553
6611
|
x: 0,
|
|
6554
6612
|
y: 0
|
|
6555
6613
|
}, attrs);
|
|
@@ -6706,7 +6764,7 @@
|
|
|
6706
6764
|
function getBBox(elements, stopRecursion) {
|
|
6707
6765
|
|
|
6708
6766
|
stopRecursion = !!stopRecursion;
|
|
6709
|
-
if (!isArray$
|
|
6767
|
+
if (!isArray$2(elements)) {
|
|
6710
6768
|
elements = [ elements ];
|
|
6711
6769
|
}
|
|
6712
6770
|
|
|
@@ -6715,7 +6773,7 @@
|
|
|
6715
6773
|
maxX,
|
|
6716
6774
|
maxY;
|
|
6717
6775
|
|
|
6718
|
-
forEach$
|
|
6776
|
+
forEach$1(elements, function(element) {
|
|
6719
6777
|
|
|
6720
6778
|
// If element is a connection the bbox must be computed first
|
|
6721
6779
|
var bbox = element;
|
|
@@ -6794,7 +6852,7 @@
|
|
|
6794
6852
|
function createOutline(gfx, bounds) {
|
|
6795
6853
|
var outline = create$3('rect');
|
|
6796
6854
|
|
|
6797
|
-
attr$3(outline, assign$
|
|
6855
|
+
attr$3(outline, assign$1({
|
|
6798
6856
|
x: 10,
|
|
6799
6857
|
y: 10,
|
|
6800
6858
|
rx: 3,
|
|
@@ -6953,7 +7011,7 @@
|
|
|
6953
7011
|
var selectedElements = this._selectedElements,
|
|
6954
7012
|
oldSelection = selectedElements.slice();
|
|
6955
7013
|
|
|
6956
|
-
if (!isArray$
|
|
7014
|
+
if (!isArray$2(elements)) {
|
|
6957
7015
|
elements = elements ? [ elements ] : [];
|
|
6958
7016
|
}
|
|
6959
7017
|
|
|
@@ -6970,7 +7028,7 @@
|
|
|
6970
7028
|
// selection may be cleared by passing an empty array or null
|
|
6971
7029
|
// to the method
|
|
6972
7030
|
if (add) {
|
|
6973
|
-
forEach$
|
|
7031
|
+
forEach$1(elements, function(element) {
|
|
6974
7032
|
if (selectedElements.indexOf(element) !== -1) {
|
|
6975
7033
|
|
|
6976
7034
|
// already selected
|
|
@@ -7039,13 +7097,13 @@
|
|
|
7039
7097
|
var oldSelection = event.oldSelection,
|
|
7040
7098
|
newSelection = event.newSelection;
|
|
7041
7099
|
|
|
7042
|
-
forEach$
|
|
7100
|
+
forEach$1(oldSelection, function(e) {
|
|
7043
7101
|
if (newSelection.indexOf(e) === -1) {
|
|
7044
7102
|
deselect(e);
|
|
7045
7103
|
}
|
|
7046
7104
|
});
|
|
7047
7105
|
|
|
7048
|
-
forEach$
|
|
7106
|
+
forEach$1(newSelection, function(e) {
|
|
7049
7107
|
if (oldSelection.indexOf(e) === -1) {
|
|
7050
7108
|
select(e);
|
|
7051
7109
|
}
|
|
@@ -7087,7 +7145,7 @@
|
|
|
7087
7145
|
|
|
7088
7146
|
var rect = create$3('rect');
|
|
7089
7147
|
|
|
7090
|
-
attr$3(rect, assign$
|
|
7148
|
+
attr$3(rect, assign$1({
|
|
7091
7149
|
rx: 3
|
|
7092
7150
|
}, bBox));
|
|
7093
7151
|
|
|
@@ -7124,7 +7182,7 @@
|
|
|
7124
7182
|
return;
|
|
7125
7183
|
}
|
|
7126
7184
|
|
|
7127
|
-
if (isArray$
|
|
7185
|
+
if (isArray$2(autoSelect)) {
|
|
7128
7186
|
selection.select(autoSelect);
|
|
7129
7187
|
} else {
|
|
7130
7188
|
|
|
@@ -7151,7 +7209,7 @@
|
|
|
7151
7209
|
var shape = elementRegistry.get(event.context.shape.id);
|
|
7152
7210
|
|
|
7153
7211
|
// Always select main shape on move
|
|
7154
|
-
var isSelected = find
|
|
7212
|
+
var isSelected = find(previousSelection, function(selectedShape) {
|
|
7155
7213
|
return shape.id === selectedShape.id;
|
|
7156
7214
|
});
|
|
7157
7215
|
|
|
@@ -7330,7 +7388,7 @@
|
|
|
7330
7388
|
|
|
7331
7389
|
this._ids = ids;
|
|
7332
7390
|
|
|
7333
|
-
this._overlayDefaults = assign$
|
|
7391
|
+
this._overlayDefaults = assign$1({
|
|
7334
7392
|
|
|
7335
7393
|
// no show constraints
|
|
7336
7394
|
show: null,
|
|
@@ -7392,11 +7450,11 @@
|
|
|
7392
7450
|
*/
|
|
7393
7451
|
Overlays.prototype.get = function(search) {
|
|
7394
7452
|
|
|
7395
|
-
if (isString
|
|
7453
|
+
if (isString(search)) {
|
|
7396
7454
|
search = { id: search };
|
|
7397
7455
|
}
|
|
7398
7456
|
|
|
7399
|
-
if (isString
|
|
7457
|
+
if (isString(search.element)) {
|
|
7400
7458
|
search.element = this._elementRegistry.get(search.element);
|
|
7401
7459
|
}
|
|
7402
7460
|
|
|
@@ -7405,13 +7463,13 @@
|
|
|
7405
7463
|
|
|
7406
7464
|
// return a list of overlays when searching by element (+type)
|
|
7407
7465
|
if (container) {
|
|
7408
|
-
return search.type ? filter
|
|
7466
|
+
return search.type ? filter(container.overlays, matchPattern({ type: search.type })) : container.overlays.slice();
|
|
7409
7467
|
} else {
|
|
7410
7468
|
return [];
|
|
7411
7469
|
}
|
|
7412
7470
|
} else
|
|
7413
7471
|
if (search.type) {
|
|
7414
|
-
return filter
|
|
7472
|
+
return filter(this._overlays, matchPattern({ type: search.type }));
|
|
7415
7473
|
} else {
|
|
7416
7474
|
|
|
7417
7475
|
// return single element when searching by id
|
|
@@ -7444,7 +7502,7 @@
|
|
|
7444
7502
|
*/
|
|
7445
7503
|
Overlays.prototype.add = function(element, type, overlay) {
|
|
7446
7504
|
|
|
7447
|
-
if (isObject
|
|
7505
|
+
if (isObject(type)) {
|
|
7448
7506
|
overlay = type;
|
|
7449
7507
|
type = null;
|
|
7450
7508
|
}
|
|
@@ -7467,7 +7525,7 @@
|
|
|
7467
7525
|
|
|
7468
7526
|
var id = this._ids.next();
|
|
7469
7527
|
|
|
7470
|
-
overlay = assign$
|
|
7528
|
+
overlay = assign$1({}, this._overlayDefaults, overlay, {
|
|
7471
7529
|
id: id,
|
|
7472
7530
|
type: type,
|
|
7473
7531
|
element: element,
|
|
@@ -7491,13 +7549,13 @@
|
|
|
7491
7549
|
|
|
7492
7550
|
var overlays = this.get(filter) || [];
|
|
7493
7551
|
|
|
7494
|
-
if (!isArray$
|
|
7552
|
+
if (!isArray$2(overlays)) {
|
|
7495
7553
|
overlays = [ overlays ];
|
|
7496
7554
|
}
|
|
7497
7555
|
|
|
7498
7556
|
var self = this;
|
|
7499
7557
|
|
|
7500
|
-
forEach$
|
|
7558
|
+
forEach$1(overlays, function(overlay) {
|
|
7501
7559
|
|
|
7502
7560
|
var container = self._getOverlayContainer(overlay.element, true);
|
|
7503
7561
|
|
|
@@ -7607,7 +7665,7 @@
|
|
|
7607
7665
|
|
|
7608
7666
|
Overlays.prototype._createOverlayContainer = function(element) {
|
|
7609
7667
|
var html = domify$1('<div class="djs-overlays" />');
|
|
7610
|
-
assign
|
|
7668
|
+
assign(html, { position: 'absolute' });
|
|
7611
7669
|
|
|
7612
7670
|
this._overlayRoot.appendChild(html);
|
|
7613
7671
|
|
|
@@ -7644,7 +7702,7 @@
|
|
|
7644
7702
|
|
|
7645
7703
|
|
|
7646
7704
|
Overlays.prototype._getOverlayContainer = function(element, raw) {
|
|
7647
|
-
var container = find
|
|
7705
|
+
var container = find(this._overlayContainers, function(c) {
|
|
7648
7706
|
return c.element === element;
|
|
7649
7707
|
});
|
|
7650
7708
|
|
|
@@ -7672,14 +7730,14 @@
|
|
|
7672
7730
|
|
|
7673
7731
|
// create proper html elements from
|
|
7674
7732
|
// overlay HTML strings
|
|
7675
|
-
if (isString
|
|
7733
|
+
if (isString(html)) {
|
|
7676
7734
|
html = domify$1(html);
|
|
7677
7735
|
}
|
|
7678
7736
|
|
|
7679
7737
|
overlayContainer = this._getOverlayContainer(element);
|
|
7680
7738
|
|
|
7681
7739
|
htmlContainer = domify$1('<div class="djs-overlay" data-overlay-id="' + id + '">');
|
|
7682
|
-
assign
|
|
7740
|
+
assign(htmlContainer, { position: 'absolute' });
|
|
7683
7741
|
|
|
7684
7742
|
htmlContainer.appendChild(html);
|
|
7685
7743
|
|
|
@@ -7769,7 +7827,7 @@
|
|
|
7769
7827
|
|
|
7770
7828
|
var self = this;
|
|
7771
7829
|
|
|
7772
|
-
forEach$
|
|
7830
|
+
forEach$1(this._overlays, function(overlay) {
|
|
7773
7831
|
self._updateOverlayVisibilty(overlay, viewbox);
|
|
7774
7832
|
});
|
|
7775
7833
|
};
|
|
@@ -7806,7 +7864,7 @@
|
|
|
7806
7864
|
var element = e.element;
|
|
7807
7865
|
var overlays = self.get({ element: element });
|
|
7808
7866
|
|
|
7809
|
-
forEach$
|
|
7867
|
+
forEach$1(overlays, function(o) {
|
|
7810
7868
|
self.remove(o.id);
|
|
7811
7869
|
});
|
|
7812
7870
|
|
|
@@ -7830,7 +7888,7 @@
|
|
|
7830
7888
|
var container = self._getOverlayContainer(element, true);
|
|
7831
7889
|
|
|
7832
7890
|
if (container) {
|
|
7833
|
-
forEach$
|
|
7891
|
+
forEach$1(container.overlays, function(overlay) {
|
|
7834
7892
|
self._updateOverlay(overlay);
|
|
7835
7893
|
});
|
|
7836
7894
|
|
|
@@ -7867,7 +7925,7 @@
|
|
|
7867
7925
|
'<div class="djs-overlay-container" />'
|
|
7868
7926
|
);
|
|
7869
7927
|
|
|
7870
|
-
assign
|
|
7928
|
+
assign(root, {
|
|
7871
7929
|
position: 'absolute',
|
|
7872
7930
|
width: 0,
|
|
7873
7931
|
height: 0
|
|
@@ -7879,7 +7937,7 @@
|
|
|
7879
7937
|
}
|
|
7880
7938
|
|
|
7881
7939
|
function setPosition(el, x, y) {
|
|
7882
|
-
assign
|
|
7940
|
+
assign(el, { left: x + 'px', top: y + 'px' });
|
|
7883
7941
|
}
|
|
7884
7942
|
|
|
7885
7943
|
/**
|
|
@@ -8025,7 +8083,7 @@
|
|
|
8025
8083
|
*/
|
|
8026
8084
|
CommandInterceptor.prototype.on = function(events, hook, priority, handlerFn, unwrap, that) {
|
|
8027
8085
|
|
|
8028
|
-
if (isFunction
|
|
8086
|
+
if (isFunction(hook) || isNumber(hook)) {
|
|
8029
8087
|
that = unwrap;
|
|
8030
8088
|
unwrap = handlerFn;
|
|
8031
8089
|
handlerFn = priority;
|
|
@@ -8033,29 +8091,29 @@
|
|
|
8033
8091
|
hook = null;
|
|
8034
8092
|
}
|
|
8035
8093
|
|
|
8036
|
-
if (isFunction
|
|
8094
|
+
if (isFunction(priority)) {
|
|
8037
8095
|
that = unwrap;
|
|
8038
8096
|
unwrap = handlerFn;
|
|
8039
8097
|
handlerFn = priority;
|
|
8040
8098
|
priority = DEFAULT_PRIORITY$2;
|
|
8041
8099
|
}
|
|
8042
8100
|
|
|
8043
|
-
if (isObject
|
|
8101
|
+
if (isObject(unwrap)) {
|
|
8044
8102
|
that = unwrap;
|
|
8045
8103
|
unwrap = false;
|
|
8046
8104
|
}
|
|
8047
8105
|
|
|
8048
|
-
if (!isFunction
|
|
8106
|
+
if (!isFunction(handlerFn)) {
|
|
8049
8107
|
throw new Error('handlerFn must be a function');
|
|
8050
8108
|
}
|
|
8051
8109
|
|
|
8052
|
-
if (!isArray$
|
|
8110
|
+
if (!isArray$2(events)) {
|
|
8053
8111
|
events = [ events ];
|
|
8054
8112
|
}
|
|
8055
8113
|
|
|
8056
8114
|
var eventBus = this._eventBus;
|
|
8057
8115
|
|
|
8058
|
-
forEach$
|
|
8116
|
+
forEach$1(events, function(event) {
|
|
8059
8117
|
|
|
8060
8118
|
// concat commandStack(.event)?(.hook)?
|
|
8061
8119
|
var fullEvent = [ 'commandStack', event, hook ].filter(function(e) { return e; }).join('.');
|
|
@@ -8083,7 +8141,7 @@
|
|
|
8083
8141
|
* This will generate the CommandInterceptor#(preExecute|...|reverted) methods
|
|
8084
8142
|
* which will in term forward to CommandInterceptor#on.
|
|
8085
8143
|
*/
|
|
8086
|
-
forEach$
|
|
8144
|
+
forEach$1(hooks, function(hook) {
|
|
8087
8145
|
|
|
8088
8146
|
/**
|
|
8089
8147
|
* {canExecute|preExecute|preExecuted|execute|executed|postExecute|postExecuted|revert|reverted}
|
|
@@ -8099,7 +8157,7 @@
|
|
|
8099
8157
|
*/
|
|
8100
8158
|
CommandInterceptor.prototype[hook] = function(events, priority, handlerFn, unwrap, that) {
|
|
8101
8159
|
|
|
8102
|
-
if (isFunction
|
|
8160
|
+
if (isFunction(events) || isNumber(events)) {
|
|
8103
8161
|
that = unwrap;
|
|
8104
8162
|
unwrap = handlerFn;
|
|
8105
8163
|
handlerFn = priority;
|
|
@@ -8319,7 +8377,7 @@
|
|
|
8319
8377
|
var shape = e.element,
|
|
8320
8378
|
bo = getBusinessObject(shape);
|
|
8321
8379
|
|
|
8322
|
-
var isPresent = find
|
|
8380
|
+
var isPresent = find(boParents, function(el) {
|
|
8323
8381
|
return el === bo;
|
|
8324
8382
|
});
|
|
8325
8383
|
|
|
@@ -8942,7 +9000,7 @@
|
|
|
8942
9000
|
*
|
|
8943
9001
|
* @return {boolean}
|
|
8944
9002
|
*/
|
|
8945
|
-
function isArray
|
|
9003
|
+
function isArray(obj) {
|
|
8946
9004
|
return Array.isArray(obj);
|
|
8947
9005
|
}
|
|
8948
9006
|
|
|
@@ -8969,7 +9027,7 @@
|
|
|
8969
9027
|
*/
|
|
8970
9028
|
function annotate(...args) {
|
|
8971
9029
|
|
|
8972
|
-
if (args.length === 1 && isArray
|
|
9030
|
+
if (args.length === 1 && isArray(args[0])) {
|
|
8973
9031
|
args = args[0];
|
|
8974
9032
|
}
|
|
8975
9033
|
|
|
@@ -9110,7 +9168,7 @@
|
|
|
9110
9168
|
}
|
|
9111
9169
|
|
|
9112
9170
|
if (typeof fn !== 'function') {
|
|
9113
|
-
if (isArray
|
|
9171
|
+
if (isArray(fn)) {
|
|
9114
9172
|
fn = annotate(fn.slice());
|
|
9115
9173
|
} else {
|
|
9116
9174
|
throw error(`Cannot invoke "${ fn }". Expected a function!`);
|
|
@@ -9382,7 +9440,7 @@
|
|
|
9382
9440
|
// helpers ///////////////
|
|
9383
9441
|
|
|
9384
9442
|
function arrayUnwrap(type, value) {
|
|
9385
|
-
if (type !== 'value' && isArray
|
|
9443
|
+
if (type !== 'value' && isArray(value)) {
|
|
9386
9444
|
value = annotate(value.slice());
|
|
9387
9445
|
}
|
|
9388
9446
|
|
|
@@ -9427,9 +9485,9 @@
|
|
|
9427
9485
|
});
|
|
9428
9486
|
|
|
9429
9487
|
if (isFrameElement(element)) {
|
|
9430
|
-
attr$3(rect, assign$
|
|
9488
|
+
attr$3(rect, assign$1({}, this.FRAME_STYLE, attrs || {}));
|
|
9431
9489
|
} else {
|
|
9432
|
-
attr$3(rect, assign$
|
|
9490
|
+
attr$3(rect, assign$1({}, this.SHAPE_STYLE, attrs || {}));
|
|
9433
9491
|
}
|
|
9434
9492
|
|
|
9435
9493
|
append$2(visuals, rect);
|
|
@@ -9439,7 +9497,7 @@
|
|
|
9439
9497
|
|
|
9440
9498
|
DefaultRenderer.prototype.drawConnection = function drawConnection(visuals, connection, attrs) {
|
|
9441
9499
|
|
|
9442
|
-
var line = createLine(connection.waypoints, assign$
|
|
9500
|
+
var line = createLine(connection.waypoints, assign$1({}, this.CONNECTION_STYLE, attrs || {}));
|
|
9443
9501
|
append$2(visuals, line);
|
|
9444
9502
|
|
|
9445
9503
|
return line;
|
|
@@ -9515,7 +9573,7 @@
|
|
|
9515
9573
|
this.cls = function(className, traits, additionalAttrs) {
|
|
9516
9574
|
var attrs = this.style(traits, additionalAttrs);
|
|
9517
9575
|
|
|
9518
|
-
return assign$
|
|
9576
|
+
return assign$1(attrs, { 'class': className });
|
|
9519
9577
|
};
|
|
9520
9578
|
|
|
9521
9579
|
/**
|
|
@@ -9528,25 +9586,25 @@
|
|
|
9528
9586
|
*/
|
|
9529
9587
|
this.style = function(traits, additionalAttrs) {
|
|
9530
9588
|
|
|
9531
|
-
if (!isArray$
|
|
9589
|
+
if (!isArray$2(traits) && !additionalAttrs) {
|
|
9532
9590
|
additionalAttrs = traits;
|
|
9533
9591
|
traits = [];
|
|
9534
9592
|
}
|
|
9535
9593
|
|
|
9536
9594
|
var attrs = reduce(traits, function(attrs, t) {
|
|
9537
|
-
return assign$
|
|
9595
|
+
return assign$1(attrs, defaultTraits[t] || {});
|
|
9538
9596
|
}, {});
|
|
9539
9597
|
|
|
9540
|
-
return additionalAttrs ? assign$
|
|
9598
|
+
return additionalAttrs ? assign$1(attrs, additionalAttrs) : attrs;
|
|
9541
9599
|
};
|
|
9542
9600
|
|
|
9543
9601
|
this.computeStyle = function(custom, traits, defaultStyles) {
|
|
9544
|
-
if (!isArray$
|
|
9602
|
+
if (!isArray$2(traits)) {
|
|
9545
9603
|
defaultStyles = traits;
|
|
9546
9604
|
traits = [];
|
|
9547
9605
|
}
|
|
9548
9606
|
|
|
9549
|
-
return self.style(traits || [], assign$
|
|
9607
|
+
return self.style(traits || [], assign$1({}, defaultStyles, custom || {}));
|
|
9550
9608
|
};
|
|
9551
9609
|
}
|
|
9552
9610
|
|
|
@@ -9655,7 +9713,7 @@
|
|
|
9655
9713
|
*/
|
|
9656
9714
|
function createContainer(options) {
|
|
9657
9715
|
|
|
9658
|
-
options = assign$
|
|
9716
|
+
options = assign$1({}, { width: '100%', height: '100%' }, options);
|
|
9659
9717
|
|
|
9660
9718
|
const container = options.container || document.body;
|
|
9661
9719
|
|
|
@@ -9665,7 +9723,7 @@
|
|
|
9665
9723
|
const parent = document.createElement('div');
|
|
9666
9724
|
parent.setAttribute('class', 'djs-container');
|
|
9667
9725
|
|
|
9668
|
-
assign
|
|
9726
|
+
assign(parent, {
|
|
9669
9727
|
position: 'relative',
|
|
9670
9728
|
overflow: 'hidden',
|
|
9671
9729
|
width: ensurePx(options.width),
|
|
@@ -9767,7 +9825,7 @@
|
|
|
9767
9825
|
// debounce canvas.viewbox.changed events
|
|
9768
9826
|
// for smoother diagram interaction
|
|
9769
9827
|
if (config.deferUpdate !== false) {
|
|
9770
|
-
this._viewboxChanged = debounce(bind$
|
|
9828
|
+
this._viewboxChanged = debounce(bind$2(this._viewboxChanged, this), 300);
|
|
9771
9829
|
}
|
|
9772
9830
|
|
|
9773
9831
|
eventBus.on('diagram.init', function() {
|
|
@@ -10068,7 +10126,7 @@
|
|
|
10068
10126
|
};
|
|
10069
10127
|
|
|
10070
10128
|
Canvas.prototype._findPlaneForRoot = function(rootElement) {
|
|
10071
|
-
return find
|
|
10129
|
+
return find(this._planes, function(plane) {
|
|
10072
10130
|
return plane.rootElement === rootElement;
|
|
10073
10131
|
});
|
|
10074
10132
|
};
|
|
@@ -10101,7 +10159,7 @@
|
|
|
10101
10159
|
return;
|
|
10102
10160
|
}
|
|
10103
10161
|
|
|
10104
|
-
forEach$
|
|
10162
|
+
forEach$1([ container.gfx, container.secondaryGfx ], function(gfx) {
|
|
10105
10163
|
if (gfx) {
|
|
10106
10164
|
|
|
10107
10165
|
// invoke either addClass or removeClass based on mode
|
|
@@ -10758,7 +10816,7 @@
|
|
|
10758
10816
|
|
|
10759
10817
|
if (delta) {
|
|
10760
10818
|
this._changeViewbox(function() {
|
|
10761
|
-
delta = assign$
|
|
10819
|
+
delta = assign$1({ dx: 0, dy: 0 }, delta || {});
|
|
10762
10820
|
|
|
10763
10821
|
matrix = this._svg.createSVGMatrix().translate(delta.dx, delta.dy).multiply(matrix);
|
|
10764
10822
|
|
|
@@ -10953,7 +11011,7 @@
|
|
|
10953
11011
|
const currentScale = currentMatrix.a;
|
|
10954
11012
|
|
|
10955
11013
|
if (center) {
|
|
10956
|
-
centerPoint = assign$
|
|
11014
|
+
centerPoint = assign$1(point, center);
|
|
10957
11015
|
|
|
10958
11016
|
// revert applied viewport transformations
|
|
10959
11017
|
originalPoint = centerPoint.matrixTransform(currentMatrix.inverse());
|
|
@@ -11847,7 +11905,7 @@
|
|
|
11847
11905
|
if (!Type) {
|
|
11848
11906
|
throw new Error('unknown type: <' + type + '>');
|
|
11849
11907
|
}
|
|
11850
|
-
return assign$
|
|
11908
|
+
return assign$1(new Type(), attrs);
|
|
11851
11909
|
}
|
|
11852
11910
|
|
|
11853
11911
|
/**
|
|
@@ -11884,7 +11942,7 @@
|
|
|
11884
11942
|
*/
|
|
11885
11943
|
ElementFactory.prototype.create = function(type, attrs) {
|
|
11886
11944
|
|
|
11887
|
-
attrs = assign$
|
|
11945
|
+
attrs = assign$1({}, attrs || {});
|
|
11888
11946
|
|
|
11889
11947
|
if (!attrs.id) {
|
|
11890
11948
|
attrs.id = type + '_' + (this._uid++);
|
|
@@ -12010,9 +12068,9 @@
|
|
|
12010
12068
|
*/
|
|
12011
12069
|
EventBus.prototype.on = function(events, priority, callback, that) {
|
|
12012
12070
|
|
|
12013
|
-
events = isArray$
|
|
12071
|
+
events = isArray$2(events) ? events : [ events ];
|
|
12014
12072
|
|
|
12015
|
-
if (isFunction
|
|
12073
|
+
if (isFunction(priority)) {
|
|
12016
12074
|
that = callback;
|
|
12017
12075
|
callback = priority;
|
|
12018
12076
|
priority = DEFAULT_PRIORITY$1;
|
|
@@ -12025,7 +12083,7 @@
|
|
|
12025
12083
|
var actualCallback = callback;
|
|
12026
12084
|
|
|
12027
12085
|
if (that) {
|
|
12028
|
-
actualCallback = bind$
|
|
12086
|
+
actualCallback = bind$2(callback, that);
|
|
12029
12087
|
|
|
12030
12088
|
// make sure we remember and are able to remove
|
|
12031
12089
|
// bound callbacks via {@link #off} using the original
|
|
@@ -12056,7 +12114,7 @@
|
|
|
12056
12114
|
EventBus.prototype.once = function(event, priority, callback, that) {
|
|
12057
12115
|
var self = this;
|
|
12058
12116
|
|
|
12059
|
-
if (isFunction
|
|
12117
|
+
if (isFunction(priority)) {
|
|
12060
12118
|
that = callback;
|
|
12061
12119
|
callback = priority;
|
|
12062
12120
|
priority = DEFAULT_PRIORITY$1;
|
|
@@ -12095,7 +12153,7 @@
|
|
|
12095
12153
|
*/
|
|
12096
12154
|
EventBus.prototype.off = function(events, callback) {
|
|
12097
12155
|
|
|
12098
|
-
events = isArray$
|
|
12156
|
+
events = isArray$2(events) ? events : [ events ];
|
|
12099
12157
|
|
|
12100
12158
|
var self = this;
|
|
12101
12159
|
|
|
@@ -12390,7 +12448,7 @@
|
|
|
12390
12448
|
};
|
|
12391
12449
|
|
|
12392
12450
|
InternalEvent.prototype.init = function(data) {
|
|
12393
|
-
assign$
|
|
12451
|
+
assign$1(this, data || {});
|
|
12394
12452
|
};
|
|
12395
12453
|
|
|
12396
12454
|
|
|
@@ -12563,7 +12621,7 @@
|
|
|
12563
12621
|
|
|
12564
12622
|
// update all parents of changed and reorganized their children
|
|
12565
12623
|
// in the correct order (as indicated in our model)
|
|
12566
|
-
forEach$
|
|
12624
|
+
forEach$1(parents, function(parent) {
|
|
12567
12625
|
|
|
12568
12626
|
var children = parent.children;
|
|
12569
12627
|
|
|
@@ -12573,7 +12631,7 @@
|
|
|
12573
12631
|
|
|
12574
12632
|
var childrenGfx = self._getChildrenContainer(parent);
|
|
12575
12633
|
|
|
12576
|
-
forEach$
|
|
12634
|
+
forEach$1(children.slice().reverse(), function(child) {
|
|
12577
12635
|
var childGfx = elementRegistry.getGraphics(child);
|
|
12578
12636
|
|
|
12579
12637
|
prependTo(childGfx.parentNode, childrenGfx);
|
|
@@ -12823,193 +12881,6 @@
|
|
|
12823
12881
|
this.get('eventBus').fire('diagram.clear');
|
|
12824
12882
|
};
|
|
12825
12883
|
|
|
12826
|
-
/**
|
|
12827
|
-
* Flatten array, one level deep.
|
|
12828
|
-
*
|
|
12829
|
-
* @param {Array<?>} arr
|
|
12830
|
-
*
|
|
12831
|
-
* @return {Array<?>}
|
|
12832
|
-
*/
|
|
12833
|
-
|
|
12834
|
-
var nativeToString$2 = Object.prototype.toString;
|
|
12835
|
-
function isString$2(obj) {
|
|
12836
|
-
return nativeToString$2.call(obj) === '[object String]';
|
|
12837
|
-
}
|
|
12838
|
-
|
|
12839
|
-
function _extends$2() {
|
|
12840
|
-
_extends$2 = Object.assign || function (target) {
|
|
12841
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
12842
|
-
var source = arguments[i];
|
|
12843
|
-
|
|
12844
|
-
for (var key in source) {
|
|
12845
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12846
|
-
target[key] = source[key];
|
|
12847
|
-
}
|
|
12848
|
-
}
|
|
12849
|
-
}
|
|
12850
|
-
|
|
12851
|
-
return target;
|
|
12852
|
-
};
|
|
12853
|
-
|
|
12854
|
-
return _extends$2.apply(this, arguments);
|
|
12855
|
-
}
|
|
12856
|
-
|
|
12857
|
-
/**
|
|
12858
|
-
* Convenience wrapper for `Object.assign`.
|
|
12859
|
-
*
|
|
12860
|
-
* @param {Object} target
|
|
12861
|
-
* @param {...Object} others
|
|
12862
|
-
*
|
|
12863
|
-
* @return {Object} the target
|
|
12864
|
-
*/
|
|
12865
|
-
|
|
12866
|
-
function assign$2(target) {
|
|
12867
|
-
for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
12868
|
-
others[_key - 1] = arguments[_key];
|
|
12869
|
-
}
|
|
12870
|
-
|
|
12871
|
-
return _extends$2.apply(void 0, [target].concat(others));
|
|
12872
|
-
}
|
|
12873
|
-
|
|
12874
|
-
/**
|
|
12875
|
-
* Flatten array, one level deep.
|
|
12876
|
-
*
|
|
12877
|
-
* @param {Array<?>} arr
|
|
12878
|
-
*
|
|
12879
|
-
* @return {Array<?>}
|
|
12880
|
-
*/
|
|
12881
|
-
|
|
12882
|
-
var nativeToString$1 = Object.prototype.toString;
|
|
12883
|
-
var nativeHasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
12884
|
-
function isUndefined$2(obj) {
|
|
12885
|
-
return obj === undefined;
|
|
12886
|
-
}
|
|
12887
|
-
function isArray$1(obj) {
|
|
12888
|
-
return nativeToString$1.call(obj) === '[object Array]';
|
|
12889
|
-
}
|
|
12890
|
-
function isObject(obj) {
|
|
12891
|
-
return nativeToString$1.call(obj) === '[object Object]';
|
|
12892
|
-
}
|
|
12893
|
-
function isString$1(obj) {
|
|
12894
|
-
return nativeToString$1.call(obj) === '[object String]';
|
|
12895
|
-
}
|
|
12896
|
-
/**
|
|
12897
|
-
* Return true, if target owns a property with the given key.
|
|
12898
|
-
*
|
|
12899
|
-
* @param {Object} target
|
|
12900
|
-
* @param {String} key
|
|
12901
|
-
*
|
|
12902
|
-
* @return {Boolean}
|
|
12903
|
-
*/
|
|
12904
|
-
|
|
12905
|
-
function has$1(target, key) {
|
|
12906
|
-
return nativeHasOwnProperty$1.call(target, key);
|
|
12907
|
-
}
|
|
12908
|
-
/**
|
|
12909
|
-
* Iterate over collection; returning something
|
|
12910
|
-
* (non-undefined) will stop iteration.
|
|
12911
|
-
*
|
|
12912
|
-
* @param {Array|Object} collection
|
|
12913
|
-
* @param {Function} iterator
|
|
12914
|
-
*
|
|
12915
|
-
* @return {Object} return result that stopped the iteration
|
|
12916
|
-
*/
|
|
12917
|
-
|
|
12918
|
-
function forEach$1(collection, iterator) {
|
|
12919
|
-
var val, result;
|
|
12920
|
-
|
|
12921
|
-
if (isUndefined$2(collection)) {
|
|
12922
|
-
return;
|
|
12923
|
-
}
|
|
12924
|
-
|
|
12925
|
-
var convertKey = isArray$1(collection) ? toNum$1 : identity$1;
|
|
12926
|
-
|
|
12927
|
-
for (var key in collection) {
|
|
12928
|
-
if (has$1(collection, key)) {
|
|
12929
|
-
val = collection[key];
|
|
12930
|
-
result = iterator(val, convertKey(key));
|
|
12931
|
-
|
|
12932
|
-
if (result === false) {
|
|
12933
|
-
return val;
|
|
12934
|
-
}
|
|
12935
|
-
}
|
|
12936
|
-
}
|
|
12937
|
-
}
|
|
12938
|
-
|
|
12939
|
-
function identity$1(arg) {
|
|
12940
|
-
return arg;
|
|
12941
|
-
}
|
|
12942
|
-
|
|
12943
|
-
function toNum$1(arg) {
|
|
12944
|
-
return Number(arg);
|
|
12945
|
-
}
|
|
12946
|
-
/**
|
|
12947
|
-
* Bind function against target <this>.
|
|
12948
|
-
*
|
|
12949
|
-
* @param {Function} fn
|
|
12950
|
-
* @param {Object} target
|
|
12951
|
-
*
|
|
12952
|
-
* @return {Function} bound function
|
|
12953
|
-
*/
|
|
12954
|
-
|
|
12955
|
-
function bind(fn, target) {
|
|
12956
|
-
return fn.bind(target);
|
|
12957
|
-
}
|
|
12958
|
-
|
|
12959
|
-
function _extends$1() {
|
|
12960
|
-
_extends$1 = Object.assign || function (target) {
|
|
12961
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
12962
|
-
var source = arguments[i];
|
|
12963
|
-
|
|
12964
|
-
for (var key in source) {
|
|
12965
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12966
|
-
target[key] = source[key];
|
|
12967
|
-
}
|
|
12968
|
-
}
|
|
12969
|
-
}
|
|
12970
|
-
|
|
12971
|
-
return target;
|
|
12972
|
-
};
|
|
12973
|
-
|
|
12974
|
-
return _extends$1.apply(this, arguments);
|
|
12975
|
-
}
|
|
12976
|
-
|
|
12977
|
-
/**
|
|
12978
|
-
* Convenience wrapper for `Object.assign`.
|
|
12979
|
-
*
|
|
12980
|
-
* @param {Object} target
|
|
12981
|
-
* @param {...Object} others
|
|
12982
|
-
*
|
|
12983
|
-
* @return {Object} the target
|
|
12984
|
-
*/
|
|
12985
|
-
|
|
12986
|
-
function assign$1(target) {
|
|
12987
|
-
for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
12988
|
-
others[_key - 1] = arguments[_key];
|
|
12989
|
-
}
|
|
12990
|
-
|
|
12991
|
-
return _extends$1.apply(void 0, [target].concat(others));
|
|
12992
|
-
}
|
|
12993
|
-
/**
|
|
12994
|
-
* Pick given properties from the target object.
|
|
12995
|
-
*
|
|
12996
|
-
* @param {Object} target
|
|
12997
|
-
* @param {Array} properties
|
|
12998
|
-
*
|
|
12999
|
-
* @return {Object} target
|
|
13000
|
-
*/
|
|
13001
|
-
|
|
13002
|
-
function pick(target, properties) {
|
|
13003
|
-
var result = {};
|
|
13004
|
-
var obj = Object(target);
|
|
13005
|
-
forEach$1(properties, function (prop) {
|
|
13006
|
-
if (prop in obj) {
|
|
13007
|
-
result[prop] = target[prop];
|
|
13008
|
-
}
|
|
13009
|
-
});
|
|
13010
|
-
return result;
|
|
13011
|
-
}
|
|
13012
|
-
|
|
13013
12884
|
/**
|
|
13014
12885
|
* Moddle base element.
|
|
13015
12886
|
*/
|
|
@@ -13062,7 +12933,7 @@
|
|
|
13062
12933
|
props.define(this, '$attrs', { value: {} });
|
|
13063
12934
|
props.define(this, '$parent', { writable: true });
|
|
13064
12935
|
|
|
13065
|
-
forEach$1(attrs, bind(function(val, key) {
|
|
12936
|
+
forEach$1(attrs, bind$2(function(val, key) {
|
|
13066
12937
|
this.set(key, val);
|
|
13067
12938
|
}, this));
|
|
13068
12939
|
}
|
|
@@ -13145,6 +13016,7 @@
|
|
|
13145
13016
|
localName = name;
|
|
13146
13017
|
prefix = defaultPrefix;
|
|
13147
13018
|
} else
|
|
13019
|
+
|
|
13148
13020
|
// prefix + local name
|
|
13149
13021
|
if (parts.length === 2) {
|
|
13150
13022
|
localName = parts[1];
|
|
@@ -13351,7 +13223,7 @@
|
|
|
13351
13223
|
return;
|
|
13352
13224
|
}
|
|
13353
13225
|
|
|
13354
|
-
forEach$1(t.properties, bind(function(p) {
|
|
13226
|
+
forEach$1(t.properties, bind$2(function(p) {
|
|
13355
13227
|
|
|
13356
13228
|
// clone property to allow extensions
|
|
13357
13229
|
p = assign$1({}, p, {
|
|
@@ -13398,7 +13270,7 @@
|
|
|
13398
13270
|
|
|
13399
13271
|
this.properties = properties;
|
|
13400
13272
|
|
|
13401
|
-
forEach$1(packages, bind(this.registerPackage, this));
|
|
13273
|
+
forEach$1(packages, bind$2(this.registerPackage, this));
|
|
13402
13274
|
}
|
|
13403
13275
|
|
|
13404
13276
|
|
|
@@ -13422,7 +13294,7 @@
|
|
|
13422
13294
|
ensureAvailable(pkgMap, pkg, 'uri');
|
|
13423
13295
|
|
|
13424
13296
|
// register types
|
|
13425
|
-
forEach$1(pkg.types, bind(function(descriptor) {
|
|
13297
|
+
forEach$1(pkg.types, bind$2(function(descriptor) {
|
|
13426
13298
|
this.registerType(descriptor, pkg);
|
|
13427
13299
|
}, this));
|
|
13428
13300
|
|
|
@@ -13448,7 +13320,7 @@
|
|
|
13448
13320
|
propertiesByName = {};
|
|
13449
13321
|
|
|
13450
13322
|
// parse properties
|
|
13451
|
-
forEach$1(type.properties, bind(function(p) {
|
|
13323
|
+
forEach$1(type.properties, bind$2(function(p) {
|
|
13452
13324
|
|
|
13453
13325
|
// namespace property names
|
|
13454
13326
|
var propertyNs = parseName(p.name, ns.prefix),
|
|
@@ -13474,7 +13346,7 @@
|
|
|
13474
13346
|
propertiesByName: propertiesByName
|
|
13475
13347
|
});
|
|
13476
13348
|
|
|
13477
|
-
forEach$1(type.extends, bind(function(extendsName) {
|
|
13349
|
+
forEach$1(type.extends, bind$2(function(extendsName) {
|
|
13478
13350
|
var extended = this.typeMap[extendsName];
|
|
13479
13351
|
|
|
13480
13352
|
extended.traits = extended.traits || [];
|
|
@@ -13569,7 +13441,7 @@
|
|
|
13569
13441
|
|
|
13570
13442
|
|
|
13571
13443
|
|
|
13572
|
-
|
|
13444
|
+
// helpers ////////////////////////////
|
|
13573
13445
|
|
|
13574
13446
|
function ensureAvailable(packageMap, pkg, identifierKey) {
|
|
13575
13447
|
|
|
@@ -13600,11 +13472,16 @@
|
|
|
13600
13472
|
*/
|
|
13601
13473
|
Properties.prototype.set = function(target, name, value) {
|
|
13602
13474
|
|
|
13475
|
+
if (!isString(name) || !name.length) {
|
|
13476
|
+
throw new TypeError('property name must be a non-empty string');
|
|
13477
|
+
}
|
|
13478
|
+
|
|
13603
13479
|
var property = this.model.getPropertyDescriptor(target, name);
|
|
13604
13480
|
|
|
13605
13481
|
var propertyName = property && property.name;
|
|
13606
13482
|
|
|
13607
|
-
if (isUndefined
|
|
13483
|
+
if (isUndefined(value)) {
|
|
13484
|
+
|
|
13608
13485
|
// unset the property, if the specified value is undefined;
|
|
13609
13486
|
// delete from $attrs (for extensions) or the target itself
|
|
13610
13487
|
if (property) {
|
|
@@ -13613,6 +13490,7 @@
|
|
|
13613
13490
|
delete target.$attrs[name];
|
|
13614
13491
|
}
|
|
13615
13492
|
} else {
|
|
13493
|
+
|
|
13616
13494
|
// set the property, defining well defined properties on the fly
|
|
13617
13495
|
// or simply updating them in target.$attrs (for extensions)
|
|
13618
13496
|
if (property) {
|
|
@@ -13695,7 +13573,7 @@
|
|
|
13695
13573
|
};
|
|
13696
13574
|
|
|
13697
13575
|
|
|
13698
|
-
function isUndefined
|
|
13576
|
+
function isUndefined(val) {
|
|
13699
13577
|
return typeof val === 'undefined';
|
|
13700
13578
|
}
|
|
13701
13579
|
|
|
@@ -13708,7 +13586,7 @@
|
|
|
13708
13586
|
});
|
|
13709
13587
|
}
|
|
13710
13588
|
|
|
13711
|
-
|
|
13589
|
+
// Moddle implementation /////////////////////////////////////////////////
|
|
13712
13590
|
|
|
13713
13591
|
/**
|
|
13714
13592
|
* @class Moddle
|
|
@@ -13784,7 +13662,7 @@
|
|
|
13784
13662
|
|
|
13785
13663
|
var cache = this.typeCache;
|
|
13786
13664
|
|
|
13787
|
-
var name = isString
|
|
13665
|
+
var name = isString(descriptor) ? descriptor : descriptor.ns.name;
|
|
13788
13666
|
|
|
13789
13667
|
var type = cache[name];
|
|
13790
13668
|
|
|
@@ -13917,180 +13795,6 @@
|
|
|
13917
13795
|
return this.registry.typeMap[type];
|
|
13918
13796
|
};
|
|
13919
13797
|
|
|
13920
|
-
/**
|
|
13921
|
-
* Flatten array, one level deep.
|
|
13922
|
-
*
|
|
13923
|
-
* @param {Array<?>} arr
|
|
13924
|
-
*
|
|
13925
|
-
* @return {Array<?>}
|
|
13926
|
-
*/
|
|
13927
|
-
|
|
13928
|
-
var nativeToString = Object.prototype.toString;
|
|
13929
|
-
var nativeHasOwnProperty = Object.prototype.hasOwnProperty;
|
|
13930
|
-
function isUndefined(obj) {
|
|
13931
|
-
return obj === undefined;
|
|
13932
|
-
}
|
|
13933
|
-
function isArray(obj) {
|
|
13934
|
-
return nativeToString.call(obj) === '[object Array]';
|
|
13935
|
-
}
|
|
13936
|
-
function isFunction(obj) {
|
|
13937
|
-
var tag = nativeToString.call(obj);
|
|
13938
|
-
return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object AsyncGeneratorFunction]' || tag === '[object Proxy]';
|
|
13939
|
-
}
|
|
13940
|
-
function isString(obj) {
|
|
13941
|
-
return nativeToString.call(obj) === '[object String]';
|
|
13942
|
-
}
|
|
13943
|
-
/**
|
|
13944
|
-
* Return true, if target owns a property with the given key.
|
|
13945
|
-
*
|
|
13946
|
-
* @param {Object} target
|
|
13947
|
-
* @param {String} key
|
|
13948
|
-
*
|
|
13949
|
-
* @return {Boolean}
|
|
13950
|
-
*/
|
|
13951
|
-
|
|
13952
|
-
function has(target, key) {
|
|
13953
|
-
return nativeHasOwnProperty.call(target, key);
|
|
13954
|
-
}
|
|
13955
|
-
|
|
13956
|
-
/**
|
|
13957
|
-
* Find element in collection.
|
|
13958
|
-
*
|
|
13959
|
-
* @param {Array|Object} collection
|
|
13960
|
-
* @param {Function|Object} matcher
|
|
13961
|
-
*
|
|
13962
|
-
* @return {Object}
|
|
13963
|
-
*/
|
|
13964
|
-
|
|
13965
|
-
function find(collection, matcher) {
|
|
13966
|
-
matcher = toMatcher(matcher);
|
|
13967
|
-
var match;
|
|
13968
|
-
forEach(collection, function (val, key) {
|
|
13969
|
-
if (matcher(val, key)) {
|
|
13970
|
-
match = val;
|
|
13971
|
-
return false;
|
|
13972
|
-
}
|
|
13973
|
-
});
|
|
13974
|
-
return match;
|
|
13975
|
-
}
|
|
13976
|
-
/**
|
|
13977
|
-
* Find element index in collection.
|
|
13978
|
-
*
|
|
13979
|
-
* @param {Array|Object} collection
|
|
13980
|
-
* @param {Function} matcher
|
|
13981
|
-
*
|
|
13982
|
-
* @return {Object}
|
|
13983
|
-
*/
|
|
13984
|
-
|
|
13985
|
-
function findIndex(collection, matcher) {
|
|
13986
|
-
matcher = toMatcher(matcher);
|
|
13987
|
-
var idx = isArray(collection) ? -1 : undefined;
|
|
13988
|
-
forEach(collection, function (val, key) {
|
|
13989
|
-
if (matcher(val, key)) {
|
|
13990
|
-
idx = key;
|
|
13991
|
-
return false;
|
|
13992
|
-
}
|
|
13993
|
-
});
|
|
13994
|
-
return idx;
|
|
13995
|
-
}
|
|
13996
|
-
/**
|
|
13997
|
-
* Find element in collection.
|
|
13998
|
-
*
|
|
13999
|
-
* @param {Array|Object} collection
|
|
14000
|
-
* @param {Function} matcher
|
|
14001
|
-
*
|
|
14002
|
-
* @return {Array} result
|
|
14003
|
-
*/
|
|
14004
|
-
|
|
14005
|
-
function filter(collection, matcher) {
|
|
14006
|
-
var result = [];
|
|
14007
|
-
forEach(collection, function (val, key) {
|
|
14008
|
-
if (matcher(val, key)) {
|
|
14009
|
-
result.push(val);
|
|
14010
|
-
}
|
|
14011
|
-
});
|
|
14012
|
-
return result;
|
|
14013
|
-
}
|
|
14014
|
-
/**
|
|
14015
|
-
* Iterate over collection; returning something
|
|
14016
|
-
* (non-undefined) will stop iteration.
|
|
14017
|
-
*
|
|
14018
|
-
* @param {Array|Object} collection
|
|
14019
|
-
* @param {Function} iterator
|
|
14020
|
-
*
|
|
14021
|
-
* @return {Object} return result that stopped the iteration
|
|
14022
|
-
*/
|
|
14023
|
-
|
|
14024
|
-
function forEach(collection, iterator) {
|
|
14025
|
-
var val, result;
|
|
14026
|
-
|
|
14027
|
-
if (isUndefined(collection)) {
|
|
14028
|
-
return;
|
|
14029
|
-
}
|
|
14030
|
-
|
|
14031
|
-
var convertKey = isArray(collection) ? toNum : identity;
|
|
14032
|
-
|
|
14033
|
-
for (var key in collection) {
|
|
14034
|
-
if (has(collection, key)) {
|
|
14035
|
-
val = collection[key];
|
|
14036
|
-
result = iterator(val, convertKey(key));
|
|
14037
|
-
|
|
14038
|
-
if (result === false) {
|
|
14039
|
-
return val;
|
|
14040
|
-
}
|
|
14041
|
-
}
|
|
14042
|
-
}
|
|
14043
|
-
}
|
|
14044
|
-
|
|
14045
|
-
function toMatcher(matcher) {
|
|
14046
|
-
return isFunction(matcher) ? matcher : function (e) {
|
|
14047
|
-
return e === matcher;
|
|
14048
|
-
};
|
|
14049
|
-
}
|
|
14050
|
-
|
|
14051
|
-
function identity(arg) {
|
|
14052
|
-
return arg;
|
|
14053
|
-
}
|
|
14054
|
-
|
|
14055
|
-
function toNum(arg) {
|
|
14056
|
-
return Number(arg);
|
|
14057
|
-
}
|
|
14058
|
-
|
|
14059
|
-
function _extends() {
|
|
14060
|
-
_extends = Object.assign || function (target) {
|
|
14061
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
14062
|
-
var source = arguments[i];
|
|
14063
|
-
|
|
14064
|
-
for (var key in source) {
|
|
14065
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
14066
|
-
target[key] = source[key];
|
|
14067
|
-
}
|
|
14068
|
-
}
|
|
14069
|
-
}
|
|
14070
|
-
|
|
14071
|
-
return target;
|
|
14072
|
-
};
|
|
14073
|
-
|
|
14074
|
-
return _extends.apply(this, arguments);
|
|
14075
|
-
}
|
|
14076
|
-
|
|
14077
|
-
/**
|
|
14078
|
-
* Convenience wrapper for `Object.assign`.
|
|
14079
|
-
*
|
|
14080
|
-
* @param {Object} target
|
|
14081
|
-
* @param {...Object} others
|
|
14082
|
-
*
|
|
14083
|
-
* @return {Object} the target
|
|
14084
|
-
*/
|
|
14085
|
-
|
|
14086
|
-
function assign(target) {
|
|
14087
|
-
for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
14088
|
-
others[_key - 1] = arguments[_key];
|
|
14089
|
-
}
|
|
14090
|
-
|
|
14091
|
-
return _extends.apply(void 0, [target].concat(others));
|
|
14092
|
-
}
|
|
14093
|
-
|
|
14094
13798
|
var fromCharCode = String.fromCharCode;
|
|
14095
13799
|
|
|
14096
13800
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
@@ -15265,7 +14969,7 @@
|
|
|
15265
14969
|
* @property {Boolean} lax
|
|
15266
14970
|
*/
|
|
15267
14971
|
|
|
15268
|
-
assign(this, options);
|
|
14972
|
+
assign$1(this, options);
|
|
15269
14973
|
|
|
15270
14974
|
this.elementsById = {};
|
|
15271
14975
|
this.references = [];
|
|
@@ -15486,7 +15190,7 @@
|
|
|
15486
15190
|
model = this.model,
|
|
15487
15191
|
propNameNs;
|
|
15488
15192
|
|
|
15489
|
-
forEach(attributes, function(value, name) {
|
|
15193
|
+
forEach$1(attributes, function(value, name) {
|
|
15490
15194
|
|
|
15491
15195
|
var prop = descriptor.propertiesByName[name],
|
|
15492
15196
|
values;
|
|
@@ -15504,7 +15208,7 @@
|
|
|
15504
15208
|
// IDREFS: parse references as whitespace-separated list
|
|
15505
15209
|
values = value.split(' ');
|
|
15506
15210
|
|
|
15507
|
-
forEach(values, function(v) {
|
|
15211
|
+
forEach$1(values, function(v) {
|
|
15508
15212
|
context.addReference({
|
|
15509
15213
|
element: instance,
|
|
15510
15214
|
property: prop.ns.name,
|
|
@@ -15571,7 +15275,7 @@
|
|
|
15571
15275
|
|
|
15572
15276
|
elementType = model.getType(elementTypeName);
|
|
15573
15277
|
|
|
15574
|
-
return assign({}, property, {
|
|
15278
|
+
return assign$1({}, property, {
|
|
15575
15279
|
effectiveType: getModdleDescriptor(elementType).name
|
|
15576
15280
|
});
|
|
15577
15281
|
}
|
|
@@ -15593,7 +15297,7 @@
|
|
|
15593
15297
|
});
|
|
15594
15298
|
|
|
15595
15299
|
if (property) {
|
|
15596
|
-
return assign({}, property, {
|
|
15300
|
+
return assign$1({}, property, {
|
|
15597
15301
|
effectiveType: getModdleDescriptor(elementType).name
|
|
15598
15302
|
});
|
|
15599
15303
|
}
|
|
@@ -15668,7 +15372,7 @@
|
|
|
15668
15372
|
}
|
|
15669
15373
|
|
|
15670
15374
|
if (propertyDesc.isReference) {
|
|
15671
|
-
assign(newElement, {
|
|
15375
|
+
assign$1(newElement, {
|
|
15672
15376
|
element: element
|
|
15673
15377
|
});
|
|
15674
15378
|
|
|
@@ -15777,7 +15481,7 @@
|
|
|
15777
15481
|
};
|
|
15778
15482
|
}
|
|
15779
15483
|
|
|
15780
|
-
assign(this, { lax: false }, options);
|
|
15484
|
+
assign$1(this, { lax: false }, options);
|
|
15781
15485
|
}
|
|
15782
15486
|
|
|
15783
15487
|
/**
|
|
@@ -15832,7 +15536,7 @@
|
|
|
15832
15536
|
var model = this.model,
|
|
15833
15537
|
lax = this.lax;
|
|
15834
15538
|
|
|
15835
|
-
var context = new Context(assign({}, options, { rootHandler: rootHandler })),
|
|
15539
|
+
var context = new Context(assign$1({}, options, { rootHandler: rootHandler })),
|
|
15836
15540
|
parser = new Parser({ proxy: true }),
|
|
15837
15541
|
stack = createStack();
|
|
15838
15542
|
|
|
@@ -16227,14 +15931,14 @@
|
|
|
16227
15931
|
|
|
16228
15932
|
function getElementNs(ns, descriptor) {
|
|
16229
15933
|
if (descriptor.isGeneric) {
|
|
16230
|
-
return assign({ localName: descriptor.ns.localName }, ns);
|
|
15934
|
+
return assign$1({ localName: descriptor.ns.localName }, ns);
|
|
16231
15935
|
} else {
|
|
16232
|
-
return assign({ localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg) }, ns);
|
|
15936
|
+
return assign$1({ localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg) }, ns);
|
|
16233
15937
|
}
|
|
16234
15938
|
}
|
|
16235
15939
|
|
|
16236
15940
|
function getPropertyNs(ns, descriptor) {
|
|
16237
|
-
return assign({ localName: descriptor.ns.localName }, ns);
|
|
15941
|
+
return assign$1({ localName: descriptor.ns.localName }, ns);
|
|
16238
15942
|
}
|
|
16239
15943
|
|
|
16240
15944
|
function getSerializableProperties(element) {
|
|
@@ -16248,7 +15952,7 @@
|
|
|
16248
15952
|
}
|
|
16249
15953
|
|
|
16250
15954
|
// do not serialize defaults
|
|
16251
|
-
if (!has(element, name)) {
|
|
15955
|
+
if (!has$1(element, name)) {
|
|
16252
15956
|
return false;
|
|
16253
15957
|
}
|
|
16254
15958
|
|
|
@@ -16466,7 +16170,7 @@
|
|
|
16466
16170
|
if (this.isLocalNs(effectiveNs)) {
|
|
16467
16171
|
return { localName: ns.localName };
|
|
16468
16172
|
} else {
|
|
16469
|
-
return assign({ localName: ns.localName }, effectiveNs);
|
|
16173
|
+
return assign$1({ localName: ns.localName }, effectiveNs);
|
|
16470
16174
|
}
|
|
16471
16175
|
};
|
|
16472
16176
|
|
|
@@ -16477,7 +16181,7 @@
|
|
|
16477
16181
|
|
|
16478
16182
|
var attributes = [];
|
|
16479
16183
|
|
|
16480
|
-
forEach(element, function(val, key) {
|
|
16184
|
+
forEach$1(element, function(val, key) {
|
|
16481
16185
|
|
|
16482
16186
|
var nonNsAttr;
|
|
16483
16187
|
|
|
@@ -16485,7 +16189,7 @@
|
|
|
16485
16189
|
body.push(new BodySerializer().build({ type: 'String' }, val));
|
|
16486
16190
|
} else
|
|
16487
16191
|
if (key === '$children') {
|
|
16488
|
-
forEach(val, function(child) {
|
|
16192
|
+
forEach$1(val, function(child) {
|
|
16489
16193
|
body.push(new ElementSerializer(self).build(child));
|
|
16490
16194
|
});
|
|
16491
16195
|
} else
|
|
@@ -16555,7 +16259,7 @@
|
|
|
16555
16259
|
// parse namespace attributes first
|
|
16556
16260
|
// and log them. push non namespace attributes to a list
|
|
16557
16261
|
// and process them later
|
|
16558
|
-
forEach(genericAttrs, function(value, name) {
|
|
16262
|
+
forEach$1(genericAttrs, function(value, name) {
|
|
16559
16263
|
|
|
16560
16264
|
var nonNsAttr = self.parseNsAttribute(element, name, value);
|
|
16561
16265
|
|
|
@@ -16571,7 +16275,7 @@
|
|
|
16571
16275
|
|
|
16572
16276
|
var self = this;
|
|
16573
16277
|
|
|
16574
|
-
forEach(attributes, function(attr) {
|
|
16278
|
+
forEach$1(attributes, function(attr) {
|
|
16575
16279
|
|
|
16576
16280
|
// do not serialize xsi:type attribute
|
|
16577
16281
|
// it is set manually based on the actual implementation type
|
|
@@ -16582,6 +16286,8 @@
|
|
|
16582
16286
|
try {
|
|
16583
16287
|
self.addAttribute(self.nsAttributeName(attr.name), attr.value);
|
|
16584
16288
|
} catch (e) {
|
|
16289
|
+
/* global console */
|
|
16290
|
+
|
|
16585
16291
|
console.warn(
|
|
16586
16292
|
'missing namespace information for ',
|
|
16587
16293
|
attr.name, '=', attr.value, 'on', element,
|
|
@@ -16596,7 +16302,7 @@
|
|
|
16596
16302
|
body = this.body,
|
|
16597
16303
|
element = this.element;
|
|
16598
16304
|
|
|
16599
|
-
forEach(properties, function(p) {
|
|
16305
|
+
forEach$1(properties, function(p) {
|
|
16600
16306
|
var value = element.get(p.name),
|
|
16601
16307
|
isReference = p.isReference,
|
|
16602
16308
|
isMany = p.isMany;
|
|
@@ -16609,12 +16315,12 @@
|
|
|
16609
16315
|
body.push(new BodySerializer().build(p, value[0]));
|
|
16610
16316
|
} else
|
|
16611
16317
|
if (isSimple(p.type)) {
|
|
16612
|
-
forEach(value, function(v) {
|
|
16318
|
+
forEach$1(value, function(v) {
|
|
16613
16319
|
body.push(new ValueSerializer(self.addTagName(self.nsPropertyTagName(p))).build(p, v));
|
|
16614
16320
|
});
|
|
16615
16321
|
} else
|
|
16616
16322
|
if (isReference) {
|
|
16617
|
-
forEach(value, function(v) {
|
|
16323
|
+
forEach$1(value, function(v) {
|
|
16618
16324
|
body.push(new ReferenceSerializer(self.addTagName(self.nsPropertyTagName(p))).build(v));
|
|
16619
16325
|
});
|
|
16620
16326
|
} else {
|
|
@@ -16624,7 +16330,7 @@
|
|
|
16624
16330
|
var asType = serializeAsType(p),
|
|
16625
16331
|
asProperty = serializeAsProperty(p);
|
|
16626
16332
|
|
|
16627
|
-
forEach(value, function(v) {
|
|
16333
|
+
forEach$1(value, function(v) {
|
|
16628
16334
|
var serializer;
|
|
16629
16335
|
|
|
16630
16336
|
if (asType) {
|
|
@@ -16732,7 +16438,7 @@
|
|
|
16732
16438
|
var self = this,
|
|
16733
16439
|
element = this.element;
|
|
16734
16440
|
|
|
16735
|
-
forEach(properties, function(p) {
|
|
16441
|
+
forEach$1(properties, function(p) {
|
|
16736
16442
|
|
|
16737
16443
|
var value = element.get(p.name);
|
|
16738
16444
|
|
|
@@ -16743,7 +16449,7 @@
|
|
|
16743
16449
|
}
|
|
16744
16450
|
else {
|
|
16745
16451
|
var values = [];
|
|
16746
|
-
forEach(value, function(v) {
|
|
16452
|
+
forEach$1(value, function(v) {
|
|
16747
16453
|
values.push(v.id);
|
|
16748
16454
|
});
|
|
16749
16455
|
|
|
@@ -16799,7 +16505,7 @@
|
|
|
16799
16505
|
attrs = getNsAttrs(namespaces).concat(attrs);
|
|
16800
16506
|
}
|
|
16801
16507
|
|
|
16802
|
-
forEach(attrs, function(a) {
|
|
16508
|
+
forEach$1(attrs, function(a) {
|
|
16803
16509
|
writer
|
|
16804
16510
|
.append(' ')
|
|
16805
16511
|
.append(nsName(a.name)).append('="').append(a.value).append('"');
|
|
@@ -16826,7 +16532,7 @@
|
|
|
16826
16532
|
.indent();
|
|
16827
16533
|
}
|
|
16828
16534
|
|
|
16829
|
-
forEach(this.body, function(b) {
|
|
16535
|
+
forEach$1(this.body, function(b) {
|
|
16830
16536
|
b.serializeTo(writer);
|
|
16831
16537
|
});
|
|
16832
16538
|
|
|
@@ -16894,7 +16600,7 @@
|
|
|
16894
16600
|
|
|
16895
16601
|
function FormatingWriter(out, format) {
|
|
16896
16602
|
|
|
16897
|
-
var indent = [''];
|
|
16603
|
+
var indent = [ '' ];
|
|
16898
16604
|
|
|
16899
16605
|
this.append = function(str) {
|
|
16900
16606
|
out.write(str);
|
|
@@ -16936,7 +16642,7 @@
|
|
|
16936
16642
|
*/
|
|
16937
16643
|
function Writer(options) {
|
|
16938
16644
|
|
|
16939
|
-
options = assign({ format: false, preamble: true }, options || {});
|
|
16645
|
+
options = assign$1({ format: false, preamble: true }, options || {});
|
|
16940
16646
|
|
|
16941
16647
|
function toXML(tree, writer) {
|
|
16942
16648
|
var internalWriter = writer || new SavingWriter();
|
|
@@ -17003,12 +16709,12 @@
|
|
|
17003
16709
|
*/
|
|
17004
16710
|
BpmnModdle.prototype.fromXML = function(xmlStr, typeName, options) {
|
|
17005
16711
|
|
|
17006
|
-
if (!isString
|
|
16712
|
+
if (!isString(typeName)) {
|
|
17007
16713
|
options = typeName;
|
|
17008
16714
|
typeName = 'bpmn:Definitions';
|
|
17009
16715
|
}
|
|
17010
16716
|
|
|
17011
|
-
var reader = new Reader(assign$
|
|
16717
|
+
var reader = new Reader(assign$1({ model: this, lax: true }, options));
|
|
17012
16718
|
var rootHandler = reader.handler(typeName);
|
|
17013
16719
|
|
|
17014
16720
|
return reader.fromXML(xmlStr, rootHandler);
|
|
@@ -20695,7 +20401,7 @@
|
|
|
20695
20401
|
};
|
|
20696
20402
|
|
|
20697
20403
|
function simple(additionalPackages, options) {
|
|
20698
|
-
var pks = assign$
|
|
20404
|
+
var pks = assign$1({}, packages, additionalPackages);
|
|
20699
20405
|
|
|
20700
20406
|
return new BpmnModdle(pks, options);
|
|
20701
20407
|
}
|
|
@@ -20719,7 +20425,7 @@
|
|
|
20719
20425
|
}
|
|
20720
20426
|
|
|
20721
20427
|
var argLen = arguments.length;
|
|
20722
|
-
if (argLen >= 1 && isFunction
|
|
20428
|
+
if (argLen >= 1 && isFunction(arguments[argLen - 1])) {
|
|
20723
20429
|
|
|
20724
20430
|
var callback = arguments[argLen - 1];
|
|
20725
20431
|
|
|
@@ -20760,7 +20466,7 @@
|
|
|
20760
20466
|
function ensureCompatDiRef(businessObject) {
|
|
20761
20467
|
|
|
20762
20468
|
// bpmnElement can have multiple independent DIs
|
|
20763
|
-
if (!has$
|
|
20469
|
+
if (!has$1(businessObject, 'di')) {
|
|
20764
20470
|
Object.defineProperty(businessObject, 'di', {
|
|
20765
20471
|
enumerable: false,
|
|
20766
20472
|
get: function() {
|
|
@@ -20788,7 +20494,7 @@
|
|
|
20788
20494
|
* correctly specify one.
|
|
20789
20495
|
*/
|
|
20790
20496
|
function findDisplayCandidate(definitions) {
|
|
20791
|
-
return find
|
|
20497
|
+
return find(definitions.rootElements, function(e) {
|
|
20792
20498
|
return is(e, 'bpmn:Process') || is(e, 'bpmn:Collaboration');
|
|
20793
20499
|
});
|
|
20794
20500
|
}
|
|
@@ -20895,7 +20601,7 @@
|
|
|
20895
20601
|
function handlePlane(plane) {
|
|
20896
20602
|
registerDi(plane);
|
|
20897
20603
|
|
|
20898
|
-
forEach$
|
|
20604
|
+
forEach$1(plane.planeElement, handlePlaneElement);
|
|
20899
20605
|
}
|
|
20900
20606
|
|
|
20901
20607
|
function handlePlaneElement(planeElement) {
|
|
@@ -21020,7 +20726,7 @@
|
|
|
21020
20726
|
// walk through all processes that have not yet been drawn and draw them
|
|
21021
20727
|
// if they contain lanes with DI information.
|
|
21022
20728
|
// we do this to pass the free-floating lane test cases in the MIWG test suite
|
|
21023
|
-
var processes = filter
|
|
20729
|
+
var processes = filter(rootElements, function(e) {
|
|
21024
20730
|
return !isHandled(e) && is(e, 'bpmn:Process') && e.laneSets;
|
|
21025
20731
|
});
|
|
21026
20732
|
|
|
@@ -21032,7 +20738,7 @@
|
|
|
21032
20738
|
}
|
|
21033
20739
|
|
|
21034
20740
|
function handleMessageFlows(messageFlows, context) {
|
|
21035
|
-
forEach$
|
|
20741
|
+
forEach$1(messageFlows, contextual(handleMessageFlow, context));
|
|
21036
20742
|
}
|
|
21037
20743
|
|
|
21038
20744
|
function handleDataAssociation(association, context) {
|
|
@@ -21058,7 +20764,7 @@
|
|
|
21058
20764
|
|
|
21059
20765
|
function handleArtifacts(artifacts, context) {
|
|
21060
20766
|
|
|
21061
|
-
forEach$
|
|
20767
|
+
forEach$1(artifacts, function(e) {
|
|
21062
20768
|
if (is(e, 'bpmn:Association')) {
|
|
21063
20769
|
deferred.push(function() {
|
|
21064
20770
|
handleArtifact(e, context);
|
|
@@ -21075,8 +20781,8 @@
|
|
|
21075
20781
|
return;
|
|
21076
20782
|
}
|
|
21077
20783
|
|
|
21078
|
-
forEach$
|
|
21079
|
-
forEach$
|
|
20784
|
+
forEach$1(ioSpecification.dataInputs, contextual(handleDataInput, context));
|
|
20785
|
+
forEach$1(ioSpecification.dataOutputs, contextual(handleDataOutput, context));
|
|
21080
20786
|
}
|
|
21081
20787
|
|
|
21082
20788
|
function handleSubProcess(subProcess, context) {
|
|
@@ -21103,8 +20809,8 @@
|
|
|
21103
20809
|
// * bpmn:CatchEvent
|
|
21104
20810
|
//
|
|
21105
20811
|
deferred.push(function() {
|
|
21106
|
-
forEach$
|
|
21107
|
-
forEach$
|
|
20812
|
+
forEach$1(flowNode.dataInputAssociations, contextual(handleDataAssociation, context));
|
|
20813
|
+
forEach$1(flowNode.dataOutputAssociations, contextual(handleDataAssociation, context));
|
|
21108
20814
|
});
|
|
21109
20815
|
}
|
|
21110
20816
|
|
|
@@ -21131,11 +20837,11 @@
|
|
|
21131
20837
|
}
|
|
21132
20838
|
|
|
21133
20839
|
function handleLaneSet(laneSet, context) {
|
|
21134
|
-
forEach$
|
|
20840
|
+
forEach$1(laneSet.lanes, contextual(handleLane, context));
|
|
21135
20841
|
}
|
|
21136
20842
|
|
|
21137
20843
|
function handleLaneSets(laneSets, context) {
|
|
21138
|
-
forEach$
|
|
20844
|
+
forEach$1(laneSets, contextual(handleLaneSet, context));
|
|
21139
20845
|
}
|
|
21140
20846
|
|
|
21141
20847
|
function handleFlowElementsContainer(container, context) {
|
|
@@ -21147,7 +20853,7 @@
|
|
|
21147
20853
|
}
|
|
21148
20854
|
|
|
21149
20855
|
function handleFlowElements(flowElements, context) {
|
|
21150
|
-
forEach$
|
|
20856
|
+
forEach$1(flowElements, function(e) {
|
|
21151
20857
|
if (is(e, 'bpmn:SequenceFlow')) {
|
|
21152
20858
|
deferred.push(function() {
|
|
21153
20859
|
handleSequenceFlow(e, context);
|
|
@@ -21185,7 +20891,7 @@
|
|
|
21185
20891
|
|
|
21186
20892
|
function handleCollaboration(collaboration, context) {
|
|
21187
20893
|
|
|
21188
|
-
forEach$
|
|
20894
|
+
forEach$1(collaboration.participants, contextual(handleParticipant, context));
|
|
21189
20895
|
|
|
21190
20896
|
handleArtifacts(collaboration.artifacts, context);
|
|
21191
20897
|
|
|
@@ -21199,7 +20905,7 @@
|
|
|
21199
20905
|
function wireFlowNodeRefs(lane) {
|
|
21200
20906
|
|
|
21201
20907
|
// wire the virtual flowNodeRefs <-> relationship
|
|
21202
|
-
forEach$
|
|
20908
|
+
forEach$1(lane.flowNodeRef, function(flowNode) {
|
|
21203
20909
|
var lanes = flowNode.get('lanes');
|
|
21204
20910
|
|
|
21205
20911
|
if (lanes) {
|
|
@@ -21293,7 +20999,7 @@
|
|
|
21293
20999
|
|
|
21294
21000
|
// traverse BPMN 2.0 document model,
|
|
21295
21001
|
// starting at definitions
|
|
21296
|
-
forEach$
|
|
21002
|
+
forEach$1(diagramsToImport, function(diagram) {
|
|
21297
21003
|
walker.handleDefinitions(definitions, diagram);
|
|
21298
21004
|
});
|
|
21299
21005
|
|
|
@@ -21360,12 +21066,12 @@
|
|
|
21360
21066
|
if (is$1(rootElement, 'bpmn:Collaboration')) {
|
|
21361
21067
|
collaboration = rootElement;
|
|
21362
21068
|
} else {
|
|
21363
|
-
collaboration = find
|
|
21069
|
+
collaboration = find(definitions.rootElements, function(element) {
|
|
21364
21070
|
if (!is$1(element, 'bpmn:Collaboration')) {
|
|
21365
21071
|
return;
|
|
21366
21072
|
}
|
|
21367
21073
|
|
|
21368
|
-
return find
|
|
21074
|
+
return find(element.participants, function(participant) {
|
|
21369
21075
|
return participant.processRef === rootElement;
|
|
21370
21076
|
});
|
|
21371
21077
|
});
|
|
@@ -21389,7 +21095,7 @@
|
|
|
21389
21095
|
var diagramsToImport = [ bpmnDiagram ];
|
|
21390
21096
|
var handledElements = [ bpmnElement ];
|
|
21391
21097
|
|
|
21392
|
-
forEach$
|
|
21098
|
+
forEach$1(definitions.diagrams, function(diagram) {
|
|
21393
21099
|
var businessObject = diagram.plane.bpmnElement;
|
|
21394
21100
|
|
|
21395
21101
|
if (
|
|
@@ -21408,7 +21114,7 @@
|
|
|
21408
21114
|
function selfAndAllFlowElements(elements) {
|
|
21409
21115
|
var result = [];
|
|
21410
21116
|
|
|
21411
|
-
forEach$
|
|
21117
|
+
forEach$1(elements, function(element) {
|
|
21412
21118
|
if (!element) {
|
|
21413
21119
|
return;
|
|
21414
21120
|
}
|
|
@@ -21503,11 +21209,11 @@
|
|
|
21503
21209
|
function createLightbox() {
|
|
21504
21210
|
lightbox = domify$1(LIGHTBOX_MARKUP);
|
|
21505
21211
|
|
|
21506
|
-
assign
|
|
21507
|
-
assign
|
|
21508
|
-
assign
|
|
21509
|
-
assign
|
|
21510
|
-
assign
|
|
21212
|
+
assign(lightbox, LIGHTBOX_STYLES);
|
|
21213
|
+
assign(query('svg', lightbox), LOGO_STYLES);
|
|
21214
|
+
assign(query('.backdrop', lightbox), BACKDROP_STYLES);
|
|
21215
|
+
assign(query('.notice', lightbox), NOTICE_STYLES);
|
|
21216
|
+
assign(query('.link', lightbox), LINK_STYLES, {
|
|
21511
21217
|
'margin': '15px 20px 15px 10px',
|
|
21512
21218
|
'alignSelf': 'center'
|
|
21513
21219
|
});
|
|
@@ -21549,7 +21255,7 @@
|
|
|
21549
21255
|
*/
|
|
21550
21256
|
function BaseViewer(options) {
|
|
21551
21257
|
|
|
21552
|
-
options = assign$
|
|
21258
|
+
options = assign$1({}, DEFAULT_OPTIONS, options);
|
|
21553
21259
|
|
|
21554
21260
|
this._moddle = this._createModdle(options);
|
|
21555
21261
|
|
|
@@ -22091,8 +21797,8 @@
|
|
|
22091
21797
|
|
|
22092
21798
|
const diagramModules = [].concat(staticModules, baseModules, additionalModules);
|
|
22093
21799
|
|
|
22094
|
-
const diagramOptions = assign$
|
|
22095
|
-
canvas: assign$
|
|
21800
|
+
const diagramOptions = assign$1(omit(options, [ 'additionalModules' ]), {
|
|
21801
|
+
canvas: assign$1({}, options.canvas, { container: container }),
|
|
22096
21802
|
modules: diagramModules
|
|
22097
21803
|
});
|
|
22098
21804
|
|
|
@@ -22120,7 +21826,7 @@
|
|
|
22120
21826
|
|
|
22121
21827
|
const container = domify$1('<div class="bjs-container"></div>');
|
|
22122
21828
|
|
|
22123
|
-
assign
|
|
21829
|
+
assign(container, {
|
|
22124
21830
|
width: ensureUnit(options.width),
|
|
22125
21831
|
height: ensureUnit(options.height),
|
|
22126
21832
|
position: options.position
|
|
@@ -22130,7 +21836,7 @@
|
|
|
22130
21836
|
};
|
|
22131
21837
|
|
|
22132
21838
|
BaseViewer.prototype._createModdle = function(options) {
|
|
22133
|
-
const moddleOptions = assign$
|
|
21839
|
+
const moddleOptions = assign$1({}, this._moddleExtensions, options.moddleExtensions);
|
|
22134
21840
|
|
|
22135
21841
|
return new simple(moddleOptions);
|
|
22136
21842
|
};
|
|
@@ -22189,7 +21895,7 @@
|
|
|
22189
21895
|
return null;
|
|
22190
21896
|
}
|
|
22191
21897
|
|
|
22192
|
-
return find
|
|
21898
|
+
return find(definitions.diagrams, function(element) {
|
|
22193
21899
|
return element.id === diagramId;
|
|
22194
21900
|
}) || null;
|
|
22195
21901
|
}
|
|
@@ -22216,8 +21922,8 @@
|
|
|
22216
21922
|
|
|
22217
21923
|
const linkElement = domify$1(linkMarkup);
|
|
22218
21924
|
|
|
22219
|
-
assign
|
|
22220
|
-
assign
|
|
21925
|
+
assign(query('svg', linkElement), LOGO_STYLES);
|
|
21926
|
+
assign(linkElement, LINK_STYLES, {
|
|
22221
21927
|
position: 'absolute',
|
|
22222
21928
|
bottom: '15px',
|
|
22223
21929
|
right: '15px',
|
|
@@ -22339,7 +22045,7 @@
|
|
|
22339
22045
|
* @param {KeyboardEvent} event
|
|
22340
22046
|
*/
|
|
22341
22047
|
function isKey(keys, event) {
|
|
22342
|
-
keys = isArray$
|
|
22048
|
+
keys = isArray$2(keys) ? keys : [ keys ];
|
|
22343
22049
|
|
|
22344
22050
|
return keys.indexOf(event.key) !== -1 || keys.indexOf(event.keyCode) !== -1;
|
|
22345
22051
|
}
|
|
@@ -22533,7 +22239,7 @@
|
|
|
22533
22239
|
* @param {string} type
|
|
22534
22240
|
*/
|
|
22535
22241
|
Keyboard.prototype.addListener = function(priority, listener, type) {
|
|
22536
|
-
if (isFunction
|
|
22242
|
+
if (isFunction(priority)) {
|
|
22537
22243
|
type = listener;
|
|
22538
22244
|
listener = priority;
|
|
22539
22245
|
priority = DEFAULT_PRIORITY;
|
|
@@ -22749,7 +22455,7 @@
|
|
|
22749
22455
|
|
|
22750
22456
|
var self = this;
|
|
22751
22457
|
|
|
22752
|
-
this._config = assign$
|
|
22458
|
+
this._config = assign$1({}, DEFAULT_CONFIG, config || {});
|
|
22753
22459
|
|
|
22754
22460
|
keyboard.addListener(arrowsListener);
|
|
22755
22461
|
|
|
@@ -23078,7 +22784,7 @@
|
|
|
23078
22784
|
this._canvas = canvas;
|
|
23079
22785
|
this._container = canvas._container;
|
|
23080
22786
|
|
|
23081
|
-
this._handleWheel = bind$
|
|
22787
|
+
this._handleWheel = bind$2(this._handleWheel, this);
|
|
23082
22788
|
|
|
23083
22789
|
this._totalDelta = 0;
|
|
23084
22790
|
this._scale = config.scale || DEFAULT_SCALE;
|