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);
|
|
@@ -5815,7 +5873,7 @@
|
|
|
5815
5873
|
* @return {Object}
|
|
5816
5874
|
*/
|
|
5817
5875
|
function elementData(semantic, di, attrs) {
|
|
5818
|
-
return assign$
|
|
5876
|
+
return assign$1({
|
|
5819
5877
|
id: semantic.id,
|
|
5820
5878
|
type: semantic.$type,
|
|
5821
5879
|
businessObject: semantic,
|
|
@@ -6370,13 +6428,13 @@
|
|
|
6370
6428
|
}
|
|
6371
6429
|
|
|
6372
6430
|
function registerEvents(svg) {
|
|
6373
|
-
forEach$
|
|
6431
|
+
forEach$1(bindings, function(val, key) {
|
|
6374
6432
|
registerEvent(svg, key, val);
|
|
6375
6433
|
});
|
|
6376
6434
|
}
|
|
6377
6435
|
|
|
6378
6436
|
function unregisterEvents(svg) {
|
|
6379
|
-
forEach$
|
|
6437
|
+
forEach$1(bindings, function(val, key) {
|
|
6380
6438
|
unregisterEvent(svg, key, val);
|
|
6381
6439
|
});
|
|
6382
6440
|
}
|
|
@@ -6447,7 +6505,7 @@
|
|
|
6447
6505
|
|
|
6448
6506
|
function createHitStyle(classNames, attrs) {
|
|
6449
6507
|
|
|
6450
|
-
attrs = assign$
|
|
6508
|
+
attrs = assign$1({
|
|
6451
6509
|
stroke: 'white',
|
|
6452
6510
|
strokeWidth: 15
|
|
6453
6511
|
}, attrs || {});
|
|
@@ -6486,7 +6544,7 @@
|
|
|
6486
6544
|
this.removeHits = function(gfx) {
|
|
6487
6545
|
var hits = all('.djs-hit', gfx);
|
|
6488
6546
|
|
|
6489
|
-
forEach$
|
|
6547
|
+
forEach$1(hits, remove$3);
|
|
6490
6548
|
};
|
|
6491
6549
|
|
|
6492
6550
|
/**
|
|
@@ -6545,7 +6603,7 @@
|
|
|
6545
6603
|
*/
|
|
6546
6604
|
this.createBoxHit = function(gfx, type, attrs) {
|
|
6547
6605
|
|
|
6548
|
-
attrs = assign$
|
|
6606
|
+
attrs = assign$1({
|
|
6549
6607
|
x: 0,
|
|
6550
6608
|
y: 0
|
|
6551
6609
|
}, attrs);
|
|
@@ -6702,7 +6760,7 @@
|
|
|
6702
6760
|
function getBBox(elements, stopRecursion) {
|
|
6703
6761
|
|
|
6704
6762
|
stopRecursion = !!stopRecursion;
|
|
6705
|
-
if (!isArray$
|
|
6763
|
+
if (!isArray$2(elements)) {
|
|
6706
6764
|
elements = [ elements ];
|
|
6707
6765
|
}
|
|
6708
6766
|
|
|
@@ -6711,7 +6769,7 @@
|
|
|
6711
6769
|
maxX,
|
|
6712
6770
|
maxY;
|
|
6713
6771
|
|
|
6714
|
-
forEach$
|
|
6772
|
+
forEach$1(elements, function(element) {
|
|
6715
6773
|
|
|
6716
6774
|
// If element is a connection the bbox must be computed first
|
|
6717
6775
|
var bbox = element;
|
|
@@ -6790,7 +6848,7 @@
|
|
|
6790
6848
|
function createOutline(gfx, bounds) {
|
|
6791
6849
|
var outline = create$2('rect');
|
|
6792
6850
|
|
|
6793
|
-
attr$2(outline, assign$
|
|
6851
|
+
attr$2(outline, assign$1({
|
|
6794
6852
|
x: 10,
|
|
6795
6853
|
y: 10,
|
|
6796
6854
|
rx: 3,
|
|
@@ -6949,7 +7007,7 @@
|
|
|
6949
7007
|
var selectedElements = this._selectedElements,
|
|
6950
7008
|
oldSelection = selectedElements.slice();
|
|
6951
7009
|
|
|
6952
|
-
if (!isArray$
|
|
7010
|
+
if (!isArray$2(elements)) {
|
|
6953
7011
|
elements = elements ? [ elements ] : [];
|
|
6954
7012
|
}
|
|
6955
7013
|
|
|
@@ -6966,7 +7024,7 @@
|
|
|
6966
7024
|
// selection may be cleared by passing an empty array or null
|
|
6967
7025
|
// to the method
|
|
6968
7026
|
if (add) {
|
|
6969
|
-
forEach$
|
|
7027
|
+
forEach$1(elements, function(element) {
|
|
6970
7028
|
if (selectedElements.indexOf(element) !== -1) {
|
|
6971
7029
|
|
|
6972
7030
|
// already selected
|
|
@@ -7035,13 +7093,13 @@
|
|
|
7035
7093
|
var oldSelection = event.oldSelection,
|
|
7036
7094
|
newSelection = event.newSelection;
|
|
7037
7095
|
|
|
7038
|
-
forEach$
|
|
7096
|
+
forEach$1(oldSelection, function(e) {
|
|
7039
7097
|
if (newSelection.indexOf(e) === -1) {
|
|
7040
7098
|
deselect(e);
|
|
7041
7099
|
}
|
|
7042
7100
|
});
|
|
7043
7101
|
|
|
7044
|
-
forEach$
|
|
7102
|
+
forEach$1(newSelection, function(e) {
|
|
7045
7103
|
if (oldSelection.indexOf(e) === -1) {
|
|
7046
7104
|
select(e);
|
|
7047
7105
|
}
|
|
@@ -7083,7 +7141,7 @@
|
|
|
7083
7141
|
|
|
7084
7142
|
var rect = create$2('rect');
|
|
7085
7143
|
|
|
7086
|
-
attr$2(rect, assign$
|
|
7144
|
+
attr$2(rect, assign$1({
|
|
7087
7145
|
rx: 3
|
|
7088
7146
|
}, bBox));
|
|
7089
7147
|
|
|
@@ -7120,7 +7178,7 @@
|
|
|
7120
7178
|
return;
|
|
7121
7179
|
}
|
|
7122
7180
|
|
|
7123
|
-
if (isArray$
|
|
7181
|
+
if (isArray$2(autoSelect)) {
|
|
7124
7182
|
selection.select(autoSelect);
|
|
7125
7183
|
} else {
|
|
7126
7184
|
|
|
@@ -7147,7 +7205,7 @@
|
|
|
7147
7205
|
var shape = elementRegistry.get(event.context.shape.id);
|
|
7148
7206
|
|
|
7149
7207
|
// Always select main shape on move
|
|
7150
|
-
var isSelected = find
|
|
7208
|
+
var isSelected = find(previousSelection, function(selectedShape) {
|
|
7151
7209
|
return shape.id === selectedShape.id;
|
|
7152
7210
|
});
|
|
7153
7211
|
|
|
@@ -7326,7 +7384,7 @@
|
|
|
7326
7384
|
|
|
7327
7385
|
this._ids = ids;
|
|
7328
7386
|
|
|
7329
|
-
this._overlayDefaults = assign$
|
|
7387
|
+
this._overlayDefaults = assign$1({
|
|
7330
7388
|
|
|
7331
7389
|
// no show constraints
|
|
7332
7390
|
show: null,
|
|
@@ -7388,11 +7446,11 @@
|
|
|
7388
7446
|
*/
|
|
7389
7447
|
Overlays.prototype.get = function(search) {
|
|
7390
7448
|
|
|
7391
|
-
if (isString
|
|
7449
|
+
if (isString(search)) {
|
|
7392
7450
|
search = { id: search };
|
|
7393
7451
|
}
|
|
7394
7452
|
|
|
7395
|
-
if (isString
|
|
7453
|
+
if (isString(search.element)) {
|
|
7396
7454
|
search.element = this._elementRegistry.get(search.element);
|
|
7397
7455
|
}
|
|
7398
7456
|
|
|
@@ -7401,13 +7459,13 @@
|
|
|
7401
7459
|
|
|
7402
7460
|
// return a list of overlays when searching by element (+type)
|
|
7403
7461
|
if (container) {
|
|
7404
|
-
return search.type ? filter
|
|
7462
|
+
return search.type ? filter(container.overlays, matchPattern({ type: search.type })) : container.overlays.slice();
|
|
7405
7463
|
} else {
|
|
7406
7464
|
return [];
|
|
7407
7465
|
}
|
|
7408
7466
|
} else
|
|
7409
7467
|
if (search.type) {
|
|
7410
|
-
return filter
|
|
7468
|
+
return filter(this._overlays, matchPattern({ type: search.type }));
|
|
7411
7469
|
} else {
|
|
7412
7470
|
|
|
7413
7471
|
// return single element when searching by id
|
|
@@ -7440,7 +7498,7 @@
|
|
|
7440
7498
|
*/
|
|
7441
7499
|
Overlays.prototype.add = function(element, type, overlay) {
|
|
7442
7500
|
|
|
7443
|
-
if (isObject
|
|
7501
|
+
if (isObject(type)) {
|
|
7444
7502
|
overlay = type;
|
|
7445
7503
|
type = null;
|
|
7446
7504
|
}
|
|
@@ -7463,7 +7521,7 @@
|
|
|
7463
7521
|
|
|
7464
7522
|
var id = this._ids.next();
|
|
7465
7523
|
|
|
7466
|
-
overlay = assign$
|
|
7524
|
+
overlay = assign$1({}, this._overlayDefaults, overlay, {
|
|
7467
7525
|
id: id,
|
|
7468
7526
|
type: type,
|
|
7469
7527
|
element: element,
|
|
@@ -7487,13 +7545,13 @@
|
|
|
7487
7545
|
|
|
7488
7546
|
var overlays = this.get(filter) || [];
|
|
7489
7547
|
|
|
7490
|
-
if (!isArray$
|
|
7548
|
+
if (!isArray$2(overlays)) {
|
|
7491
7549
|
overlays = [ overlays ];
|
|
7492
7550
|
}
|
|
7493
7551
|
|
|
7494
7552
|
var self = this;
|
|
7495
7553
|
|
|
7496
|
-
forEach$
|
|
7554
|
+
forEach$1(overlays, function(overlay) {
|
|
7497
7555
|
|
|
7498
7556
|
var container = self._getOverlayContainer(overlay.element, true);
|
|
7499
7557
|
|
|
@@ -7603,7 +7661,7 @@
|
|
|
7603
7661
|
|
|
7604
7662
|
Overlays.prototype._createOverlayContainer = function(element) {
|
|
7605
7663
|
var html = domify$1('<div class="djs-overlays" />');
|
|
7606
|
-
assign
|
|
7664
|
+
assign(html, { position: 'absolute' });
|
|
7607
7665
|
|
|
7608
7666
|
this._overlayRoot.appendChild(html);
|
|
7609
7667
|
|
|
@@ -7640,7 +7698,7 @@
|
|
|
7640
7698
|
|
|
7641
7699
|
|
|
7642
7700
|
Overlays.prototype._getOverlayContainer = function(element, raw) {
|
|
7643
|
-
var container = find
|
|
7701
|
+
var container = find(this._overlayContainers, function(c) {
|
|
7644
7702
|
return c.element === element;
|
|
7645
7703
|
});
|
|
7646
7704
|
|
|
@@ -7668,14 +7726,14 @@
|
|
|
7668
7726
|
|
|
7669
7727
|
// create proper html elements from
|
|
7670
7728
|
// overlay HTML strings
|
|
7671
|
-
if (isString
|
|
7729
|
+
if (isString(html)) {
|
|
7672
7730
|
html = domify$1(html);
|
|
7673
7731
|
}
|
|
7674
7732
|
|
|
7675
7733
|
overlayContainer = this._getOverlayContainer(element);
|
|
7676
7734
|
|
|
7677
7735
|
htmlContainer = domify$1('<div class="djs-overlay" data-overlay-id="' + id + '">');
|
|
7678
|
-
assign
|
|
7736
|
+
assign(htmlContainer, { position: 'absolute' });
|
|
7679
7737
|
|
|
7680
7738
|
htmlContainer.appendChild(html);
|
|
7681
7739
|
|
|
@@ -7765,7 +7823,7 @@
|
|
|
7765
7823
|
|
|
7766
7824
|
var self = this;
|
|
7767
7825
|
|
|
7768
|
-
forEach$
|
|
7826
|
+
forEach$1(this._overlays, function(overlay) {
|
|
7769
7827
|
self._updateOverlayVisibilty(overlay, viewbox);
|
|
7770
7828
|
});
|
|
7771
7829
|
};
|
|
@@ -7802,7 +7860,7 @@
|
|
|
7802
7860
|
var element = e.element;
|
|
7803
7861
|
var overlays = self.get({ element: element });
|
|
7804
7862
|
|
|
7805
|
-
forEach$
|
|
7863
|
+
forEach$1(overlays, function(o) {
|
|
7806
7864
|
self.remove(o.id);
|
|
7807
7865
|
});
|
|
7808
7866
|
|
|
@@ -7826,7 +7884,7 @@
|
|
|
7826
7884
|
var container = self._getOverlayContainer(element, true);
|
|
7827
7885
|
|
|
7828
7886
|
if (container) {
|
|
7829
|
-
forEach$
|
|
7887
|
+
forEach$1(container.overlays, function(overlay) {
|
|
7830
7888
|
self._updateOverlay(overlay);
|
|
7831
7889
|
});
|
|
7832
7890
|
|
|
@@ -7863,7 +7921,7 @@
|
|
|
7863
7921
|
'<div class="djs-overlay-container" />'
|
|
7864
7922
|
);
|
|
7865
7923
|
|
|
7866
|
-
assign
|
|
7924
|
+
assign(root, {
|
|
7867
7925
|
position: 'absolute',
|
|
7868
7926
|
width: 0,
|
|
7869
7927
|
height: 0
|
|
@@ -7875,7 +7933,7 @@
|
|
|
7875
7933
|
}
|
|
7876
7934
|
|
|
7877
7935
|
function setPosition(el, x, y) {
|
|
7878
|
-
assign
|
|
7936
|
+
assign(el, { left: x + 'px', top: y + 'px' });
|
|
7879
7937
|
}
|
|
7880
7938
|
|
|
7881
7939
|
/**
|
|
@@ -8021,7 +8079,7 @@
|
|
|
8021
8079
|
*/
|
|
8022
8080
|
CommandInterceptor.prototype.on = function(events, hook, priority, handlerFn, unwrap, that) {
|
|
8023
8081
|
|
|
8024
|
-
if (isFunction
|
|
8082
|
+
if (isFunction(hook) || isNumber(hook)) {
|
|
8025
8083
|
that = unwrap;
|
|
8026
8084
|
unwrap = handlerFn;
|
|
8027
8085
|
handlerFn = priority;
|
|
@@ -8029,29 +8087,29 @@
|
|
|
8029
8087
|
hook = null;
|
|
8030
8088
|
}
|
|
8031
8089
|
|
|
8032
|
-
if (isFunction
|
|
8090
|
+
if (isFunction(priority)) {
|
|
8033
8091
|
that = unwrap;
|
|
8034
8092
|
unwrap = handlerFn;
|
|
8035
8093
|
handlerFn = priority;
|
|
8036
8094
|
priority = DEFAULT_PRIORITY$2;
|
|
8037
8095
|
}
|
|
8038
8096
|
|
|
8039
|
-
if (isObject
|
|
8097
|
+
if (isObject(unwrap)) {
|
|
8040
8098
|
that = unwrap;
|
|
8041
8099
|
unwrap = false;
|
|
8042
8100
|
}
|
|
8043
8101
|
|
|
8044
|
-
if (!isFunction
|
|
8102
|
+
if (!isFunction(handlerFn)) {
|
|
8045
8103
|
throw new Error('handlerFn must be a function');
|
|
8046
8104
|
}
|
|
8047
8105
|
|
|
8048
|
-
if (!isArray$
|
|
8106
|
+
if (!isArray$2(events)) {
|
|
8049
8107
|
events = [ events ];
|
|
8050
8108
|
}
|
|
8051
8109
|
|
|
8052
8110
|
var eventBus = this._eventBus;
|
|
8053
8111
|
|
|
8054
|
-
forEach$
|
|
8112
|
+
forEach$1(events, function(event) {
|
|
8055
8113
|
|
|
8056
8114
|
// concat commandStack(.event)?(.hook)?
|
|
8057
8115
|
var fullEvent = [ 'commandStack', event, hook ].filter(function(e) { return e; }).join('.');
|
|
@@ -8079,7 +8137,7 @@
|
|
|
8079
8137
|
* This will generate the CommandInterceptor#(preExecute|...|reverted) methods
|
|
8080
8138
|
* which will in term forward to CommandInterceptor#on.
|
|
8081
8139
|
*/
|
|
8082
|
-
forEach$
|
|
8140
|
+
forEach$1(hooks, function(hook) {
|
|
8083
8141
|
|
|
8084
8142
|
/**
|
|
8085
8143
|
* {canExecute|preExecute|preExecuted|execute|executed|postExecute|postExecuted|revert|reverted}
|
|
@@ -8095,7 +8153,7 @@
|
|
|
8095
8153
|
*/
|
|
8096
8154
|
CommandInterceptor.prototype[hook] = function(events, priority, handlerFn, unwrap, that) {
|
|
8097
8155
|
|
|
8098
|
-
if (isFunction
|
|
8156
|
+
if (isFunction(events) || isNumber(events)) {
|
|
8099
8157
|
that = unwrap;
|
|
8100
8158
|
unwrap = handlerFn;
|
|
8101
8159
|
handlerFn = priority;
|
|
@@ -8315,7 +8373,7 @@
|
|
|
8315
8373
|
var shape = e.element,
|
|
8316
8374
|
bo = getBusinessObject(shape);
|
|
8317
8375
|
|
|
8318
|
-
var isPresent = find
|
|
8376
|
+
var isPresent = find(boParents, function(el) {
|
|
8319
8377
|
return el === bo;
|
|
8320
8378
|
});
|
|
8321
8379
|
|
|
@@ -8938,7 +8996,7 @@
|
|
|
8938
8996
|
*
|
|
8939
8997
|
* @return {boolean}
|
|
8940
8998
|
*/
|
|
8941
|
-
function isArray
|
|
8999
|
+
function isArray(obj) {
|
|
8942
9000
|
return Array.isArray(obj);
|
|
8943
9001
|
}
|
|
8944
9002
|
|
|
@@ -8965,7 +9023,7 @@
|
|
|
8965
9023
|
*/
|
|
8966
9024
|
function annotate(...args) {
|
|
8967
9025
|
|
|
8968
|
-
if (args.length === 1 && isArray
|
|
9026
|
+
if (args.length === 1 && isArray(args[0])) {
|
|
8969
9027
|
args = args[0];
|
|
8970
9028
|
}
|
|
8971
9029
|
|
|
@@ -9106,7 +9164,7 @@
|
|
|
9106
9164
|
}
|
|
9107
9165
|
|
|
9108
9166
|
if (typeof fn !== 'function') {
|
|
9109
|
-
if (isArray
|
|
9167
|
+
if (isArray(fn)) {
|
|
9110
9168
|
fn = annotate(fn.slice());
|
|
9111
9169
|
} else {
|
|
9112
9170
|
throw error(`Cannot invoke "${ fn }". Expected a function!`);
|
|
@@ -9378,7 +9436,7 @@
|
|
|
9378
9436
|
// helpers ///////////////
|
|
9379
9437
|
|
|
9380
9438
|
function arrayUnwrap(type, value) {
|
|
9381
|
-
if (type !== 'value' && isArray
|
|
9439
|
+
if (type !== 'value' && isArray(value)) {
|
|
9382
9440
|
value = annotate(value.slice());
|
|
9383
9441
|
}
|
|
9384
9442
|
|
|
@@ -9423,9 +9481,9 @@
|
|
|
9423
9481
|
});
|
|
9424
9482
|
|
|
9425
9483
|
if (isFrameElement(element)) {
|
|
9426
|
-
attr$2(rect, assign$
|
|
9484
|
+
attr$2(rect, assign$1({}, this.FRAME_STYLE, attrs || {}));
|
|
9427
9485
|
} else {
|
|
9428
|
-
attr$2(rect, assign$
|
|
9486
|
+
attr$2(rect, assign$1({}, this.SHAPE_STYLE, attrs || {}));
|
|
9429
9487
|
}
|
|
9430
9488
|
|
|
9431
9489
|
append$1(visuals, rect);
|
|
@@ -9435,7 +9493,7 @@
|
|
|
9435
9493
|
|
|
9436
9494
|
DefaultRenderer.prototype.drawConnection = function drawConnection(visuals, connection, attrs) {
|
|
9437
9495
|
|
|
9438
|
-
var line = createLine(connection.waypoints, assign$
|
|
9496
|
+
var line = createLine(connection.waypoints, assign$1({}, this.CONNECTION_STYLE, attrs || {}));
|
|
9439
9497
|
append$1(visuals, line);
|
|
9440
9498
|
|
|
9441
9499
|
return line;
|
|
@@ -9511,7 +9569,7 @@
|
|
|
9511
9569
|
this.cls = function(className, traits, additionalAttrs) {
|
|
9512
9570
|
var attrs = this.style(traits, additionalAttrs);
|
|
9513
9571
|
|
|
9514
|
-
return assign$
|
|
9572
|
+
return assign$1(attrs, { 'class': className });
|
|
9515
9573
|
};
|
|
9516
9574
|
|
|
9517
9575
|
/**
|
|
@@ -9524,25 +9582,25 @@
|
|
|
9524
9582
|
*/
|
|
9525
9583
|
this.style = function(traits, additionalAttrs) {
|
|
9526
9584
|
|
|
9527
|
-
if (!isArray$
|
|
9585
|
+
if (!isArray$2(traits) && !additionalAttrs) {
|
|
9528
9586
|
additionalAttrs = traits;
|
|
9529
9587
|
traits = [];
|
|
9530
9588
|
}
|
|
9531
9589
|
|
|
9532
9590
|
var attrs = reduce(traits, function(attrs, t) {
|
|
9533
|
-
return assign$
|
|
9591
|
+
return assign$1(attrs, defaultTraits[t] || {});
|
|
9534
9592
|
}, {});
|
|
9535
9593
|
|
|
9536
|
-
return additionalAttrs ? assign$
|
|
9594
|
+
return additionalAttrs ? assign$1(attrs, additionalAttrs) : attrs;
|
|
9537
9595
|
};
|
|
9538
9596
|
|
|
9539
9597
|
this.computeStyle = function(custom, traits, defaultStyles) {
|
|
9540
|
-
if (!isArray$
|
|
9598
|
+
if (!isArray$2(traits)) {
|
|
9541
9599
|
defaultStyles = traits;
|
|
9542
9600
|
traits = [];
|
|
9543
9601
|
}
|
|
9544
9602
|
|
|
9545
|
-
return self.style(traits || [], assign$
|
|
9603
|
+
return self.style(traits || [], assign$1({}, defaultStyles, custom || {}));
|
|
9546
9604
|
};
|
|
9547
9605
|
}
|
|
9548
9606
|
|
|
@@ -9651,7 +9709,7 @@
|
|
|
9651
9709
|
*/
|
|
9652
9710
|
function createContainer(options) {
|
|
9653
9711
|
|
|
9654
|
-
options = assign$
|
|
9712
|
+
options = assign$1({}, { width: '100%', height: '100%' }, options);
|
|
9655
9713
|
|
|
9656
9714
|
const container = options.container || document.body;
|
|
9657
9715
|
|
|
@@ -9661,7 +9719,7 @@
|
|
|
9661
9719
|
const parent = document.createElement('div');
|
|
9662
9720
|
parent.setAttribute('class', 'djs-container');
|
|
9663
9721
|
|
|
9664
|
-
assign
|
|
9722
|
+
assign(parent, {
|
|
9665
9723
|
position: 'relative',
|
|
9666
9724
|
overflow: 'hidden',
|
|
9667
9725
|
width: ensurePx(options.width),
|
|
@@ -9763,7 +9821,7 @@
|
|
|
9763
9821
|
// debounce canvas.viewbox.changed events
|
|
9764
9822
|
// for smoother diagram interaction
|
|
9765
9823
|
if (config.deferUpdate !== false) {
|
|
9766
|
-
this._viewboxChanged = debounce(bind$
|
|
9824
|
+
this._viewboxChanged = debounce(bind$2(this._viewboxChanged, this), 300);
|
|
9767
9825
|
}
|
|
9768
9826
|
|
|
9769
9827
|
eventBus.on('diagram.init', function() {
|
|
@@ -10064,7 +10122,7 @@
|
|
|
10064
10122
|
};
|
|
10065
10123
|
|
|
10066
10124
|
Canvas.prototype._findPlaneForRoot = function(rootElement) {
|
|
10067
|
-
return find
|
|
10125
|
+
return find(this._planes, function(plane) {
|
|
10068
10126
|
return plane.rootElement === rootElement;
|
|
10069
10127
|
});
|
|
10070
10128
|
};
|
|
@@ -10097,7 +10155,7 @@
|
|
|
10097
10155
|
return;
|
|
10098
10156
|
}
|
|
10099
10157
|
|
|
10100
|
-
forEach$
|
|
10158
|
+
forEach$1([ container.gfx, container.secondaryGfx ], function(gfx) {
|
|
10101
10159
|
if (gfx) {
|
|
10102
10160
|
|
|
10103
10161
|
// invoke either addClass or removeClass based on mode
|
|
@@ -10754,7 +10812,7 @@
|
|
|
10754
10812
|
|
|
10755
10813
|
if (delta) {
|
|
10756
10814
|
this._changeViewbox(function() {
|
|
10757
|
-
delta = assign$
|
|
10815
|
+
delta = assign$1({ dx: 0, dy: 0 }, delta || {});
|
|
10758
10816
|
|
|
10759
10817
|
matrix = this._svg.createSVGMatrix().translate(delta.dx, delta.dy).multiply(matrix);
|
|
10760
10818
|
|
|
@@ -10949,7 +11007,7 @@
|
|
|
10949
11007
|
const currentScale = currentMatrix.a;
|
|
10950
11008
|
|
|
10951
11009
|
if (center) {
|
|
10952
|
-
centerPoint = assign$
|
|
11010
|
+
centerPoint = assign$1(point, center);
|
|
10953
11011
|
|
|
10954
11012
|
// revert applied viewport transformations
|
|
10955
11013
|
originalPoint = centerPoint.matrixTransform(currentMatrix.inverse());
|
|
@@ -11843,7 +11901,7 @@
|
|
|
11843
11901
|
if (!Type) {
|
|
11844
11902
|
throw new Error('unknown type: <' + type + '>');
|
|
11845
11903
|
}
|
|
11846
|
-
return assign$
|
|
11904
|
+
return assign$1(new Type(), attrs);
|
|
11847
11905
|
}
|
|
11848
11906
|
|
|
11849
11907
|
/**
|
|
@@ -11880,7 +11938,7 @@
|
|
|
11880
11938
|
*/
|
|
11881
11939
|
ElementFactory.prototype.create = function(type, attrs) {
|
|
11882
11940
|
|
|
11883
|
-
attrs = assign$
|
|
11941
|
+
attrs = assign$1({}, attrs || {});
|
|
11884
11942
|
|
|
11885
11943
|
if (!attrs.id) {
|
|
11886
11944
|
attrs.id = type + '_' + (this._uid++);
|
|
@@ -12006,9 +12064,9 @@
|
|
|
12006
12064
|
*/
|
|
12007
12065
|
EventBus.prototype.on = function(events, priority, callback, that) {
|
|
12008
12066
|
|
|
12009
|
-
events = isArray$
|
|
12067
|
+
events = isArray$2(events) ? events : [ events ];
|
|
12010
12068
|
|
|
12011
|
-
if (isFunction
|
|
12069
|
+
if (isFunction(priority)) {
|
|
12012
12070
|
that = callback;
|
|
12013
12071
|
callback = priority;
|
|
12014
12072
|
priority = DEFAULT_PRIORITY$1;
|
|
@@ -12021,7 +12079,7 @@
|
|
|
12021
12079
|
var actualCallback = callback;
|
|
12022
12080
|
|
|
12023
12081
|
if (that) {
|
|
12024
|
-
actualCallback = bind$
|
|
12082
|
+
actualCallback = bind$2(callback, that);
|
|
12025
12083
|
|
|
12026
12084
|
// make sure we remember and are able to remove
|
|
12027
12085
|
// bound callbacks via {@link #off} using the original
|
|
@@ -12052,7 +12110,7 @@
|
|
|
12052
12110
|
EventBus.prototype.once = function(event, priority, callback, that) {
|
|
12053
12111
|
var self = this;
|
|
12054
12112
|
|
|
12055
|
-
if (isFunction
|
|
12113
|
+
if (isFunction(priority)) {
|
|
12056
12114
|
that = callback;
|
|
12057
12115
|
callback = priority;
|
|
12058
12116
|
priority = DEFAULT_PRIORITY$1;
|
|
@@ -12091,7 +12149,7 @@
|
|
|
12091
12149
|
*/
|
|
12092
12150
|
EventBus.prototype.off = function(events, callback) {
|
|
12093
12151
|
|
|
12094
|
-
events = isArray$
|
|
12152
|
+
events = isArray$2(events) ? events : [ events ];
|
|
12095
12153
|
|
|
12096
12154
|
var self = this;
|
|
12097
12155
|
|
|
@@ -12386,7 +12444,7 @@
|
|
|
12386
12444
|
};
|
|
12387
12445
|
|
|
12388
12446
|
InternalEvent.prototype.init = function(data) {
|
|
12389
|
-
assign$
|
|
12447
|
+
assign$1(this, data || {});
|
|
12390
12448
|
};
|
|
12391
12449
|
|
|
12392
12450
|
|
|
@@ -12559,7 +12617,7 @@
|
|
|
12559
12617
|
|
|
12560
12618
|
// update all parents of changed and reorganized their children
|
|
12561
12619
|
// in the correct order (as indicated in our model)
|
|
12562
|
-
forEach$
|
|
12620
|
+
forEach$1(parents, function(parent) {
|
|
12563
12621
|
|
|
12564
12622
|
var children = parent.children;
|
|
12565
12623
|
|
|
@@ -12569,7 +12627,7 @@
|
|
|
12569
12627
|
|
|
12570
12628
|
var childrenGfx = self._getChildrenContainer(parent);
|
|
12571
12629
|
|
|
12572
|
-
forEach$
|
|
12630
|
+
forEach$1(children.slice().reverse(), function(child) {
|
|
12573
12631
|
var childGfx = elementRegistry.getGraphics(child);
|
|
12574
12632
|
|
|
12575
12633
|
prependTo(childGfx.parentNode, childrenGfx);
|
|
@@ -12819,193 +12877,6 @@
|
|
|
12819
12877
|
this.get('eventBus').fire('diagram.clear');
|
|
12820
12878
|
};
|
|
12821
12879
|
|
|
12822
|
-
/**
|
|
12823
|
-
* Flatten array, one level deep.
|
|
12824
|
-
*
|
|
12825
|
-
* @param {Array<?>} arr
|
|
12826
|
-
*
|
|
12827
|
-
* @return {Array<?>}
|
|
12828
|
-
*/
|
|
12829
|
-
|
|
12830
|
-
var nativeToString$2 = Object.prototype.toString;
|
|
12831
|
-
function isString$2(obj) {
|
|
12832
|
-
return nativeToString$2.call(obj) === '[object String]';
|
|
12833
|
-
}
|
|
12834
|
-
|
|
12835
|
-
function _extends$2() {
|
|
12836
|
-
_extends$2 = Object.assign || function (target) {
|
|
12837
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
12838
|
-
var source = arguments[i];
|
|
12839
|
-
|
|
12840
|
-
for (var key in source) {
|
|
12841
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12842
|
-
target[key] = source[key];
|
|
12843
|
-
}
|
|
12844
|
-
}
|
|
12845
|
-
}
|
|
12846
|
-
|
|
12847
|
-
return target;
|
|
12848
|
-
};
|
|
12849
|
-
|
|
12850
|
-
return _extends$2.apply(this, arguments);
|
|
12851
|
-
}
|
|
12852
|
-
|
|
12853
|
-
/**
|
|
12854
|
-
* Convenience wrapper for `Object.assign`.
|
|
12855
|
-
*
|
|
12856
|
-
* @param {Object} target
|
|
12857
|
-
* @param {...Object} others
|
|
12858
|
-
*
|
|
12859
|
-
* @return {Object} the target
|
|
12860
|
-
*/
|
|
12861
|
-
|
|
12862
|
-
function assign$2(target) {
|
|
12863
|
-
for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
12864
|
-
others[_key - 1] = arguments[_key];
|
|
12865
|
-
}
|
|
12866
|
-
|
|
12867
|
-
return _extends$2.apply(void 0, [target].concat(others));
|
|
12868
|
-
}
|
|
12869
|
-
|
|
12870
|
-
/**
|
|
12871
|
-
* Flatten array, one level deep.
|
|
12872
|
-
*
|
|
12873
|
-
* @param {Array<?>} arr
|
|
12874
|
-
*
|
|
12875
|
-
* @return {Array<?>}
|
|
12876
|
-
*/
|
|
12877
|
-
|
|
12878
|
-
var nativeToString$1 = Object.prototype.toString;
|
|
12879
|
-
var nativeHasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
12880
|
-
function isUndefined$2(obj) {
|
|
12881
|
-
return obj === undefined;
|
|
12882
|
-
}
|
|
12883
|
-
function isArray$1(obj) {
|
|
12884
|
-
return nativeToString$1.call(obj) === '[object Array]';
|
|
12885
|
-
}
|
|
12886
|
-
function isObject(obj) {
|
|
12887
|
-
return nativeToString$1.call(obj) === '[object Object]';
|
|
12888
|
-
}
|
|
12889
|
-
function isString$1(obj) {
|
|
12890
|
-
return nativeToString$1.call(obj) === '[object String]';
|
|
12891
|
-
}
|
|
12892
|
-
/**
|
|
12893
|
-
* Return true, if target owns a property with the given key.
|
|
12894
|
-
*
|
|
12895
|
-
* @param {Object} target
|
|
12896
|
-
* @param {String} key
|
|
12897
|
-
*
|
|
12898
|
-
* @return {Boolean}
|
|
12899
|
-
*/
|
|
12900
|
-
|
|
12901
|
-
function has$1(target, key) {
|
|
12902
|
-
return nativeHasOwnProperty$1.call(target, key);
|
|
12903
|
-
}
|
|
12904
|
-
/**
|
|
12905
|
-
* Iterate over collection; returning something
|
|
12906
|
-
* (non-undefined) will stop iteration.
|
|
12907
|
-
*
|
|
12908
|
-
* @param {Array|Object} collection
|
|
12909
|
-
* @param {Function} iterator
|
|
12910
|
-
*
|
|
12911
|
-
* @return {Object} return result that stopped the iteration
|
|
12912
|
-
*/
|
|
12913
|
-
|
|
12914
|
-
function forEach$1(collection, iterator) {
|
|
12915
|
-
var val, result;
|
|
12916
|
-
|
|
12917
|
-
if (isUndefined$2(collection)) {
|
|
12918
|
-
return;
|
|
12919
|
-
}
|
|
12920
|
-
|
|
12921
|
-
var convertKey = isArray$1(collection) ? toNum$1 : identity$1;
|
|
12922
|
-
|
|
12923
|
-
for (var key in collection) {
|
|
12924
|
-
if (has$1(collection, key)) {
|
|
12925
|
-
val = collection[key];
|
|
12926
|
-
result = iterator(val, convertKey(key));
|
|
12927
|
-
|
|
12928
|
-
if (result === false) {
|
|
12929
|
-
return val;
|
|
12930
|
-
}
|
|
12931
|
-
}
|
|
12932
|
-
}
|
|
12933
|
-
}
|
|
12934
|
-
|
|
12935
|
-
function identity$1(arg) {
|
|
12936
|
-
return arg;
|
|
12937
|
-
}
|
|
12938
|
-
|
|
12939
|
-
function toNum$1(arg) {
|
|
12940
|
-
return Number(arg);
|
|
12941
|
-
}
|
|
12942
|
-
/**
|
|
12943
|
-
* Bind function against target <this>.
|
|
12944
|
-
*
|
|
12945
|
-
* @param {Function} fn
|
|
12946
|
-
* @param {Object} target
|
|
12947
|
-
*
|
|
12948
|
-
* @return {Function} bound function
|
|
12949
|
-
*/
|
|
12950
|
-
|
|
12951
|
-
function bind(fn, target) {
|
|
12952
|
-
return fn.bind(target);
|
|
12953
|
-
}
|
|
12954
|
-
|
|
12955
|
-
function _extends$1() {
|
|
12956
|
-
_extends$1 = Object.assign || function (target) {
|
|
12957
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
12958
|
-
var source = arguments[i];
|
|
12959
|
-
|
|
12960
|
-
for (var key in source) {
|
|
12961
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12962
|
-
target[key] = source[key];
|
|
12963
|
-
}
|
|
12964
|
-
}
|
|
12965
|
-
}
|
|
12966
|
-
|
|
12967
|
-
return target;
|
|
12968
|
-
};
|
|
12969
|
-
|
|
12970
|
-
return _extends$1.apply(this, arguments);
|
|
12971
|
-
}
|
|
12972
|
-
|
|
12973
|
-
/**
|
|
12974
|
-
* Convenience wrapper for `Object.assign`.
|
|
12975
|
-
*
|
|
12976
|
-
* @param {Object} target
|
|
12977
|
-
* @param {...Object} others
|
|
12978
|
-
*
|
|
12979
|
-
* @return {Object} the target
|
|
12980
|
-
*/
|
|
12981
|
-
|
|
12982
|
-
function assign$1(target) {
|
|
12983
|
-
for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
12984
|
-
others[_key - 1] = arguments[_key];
|
|
12985
|
-
}
|
|
12986
|
-
|
|
12987
|
-
return _extends$1.apply(void 0, [target].concat(others));
|
|
12988
|
-
}
|
|
12989
|
-
/**
|
|
12990
|
-
* Pick given properties from the target object.
|
|
12991
|
-
*
|
|
12992
|
-
* @param {Object} target
|
|
12993
|
-
* @param {Array} properties
|
|
12994
|
-
*
|
|
12995
|
-
* @return {Object} target
|
|
12996
|
-
*/
|
|
12997
|
-
|
|
12998
|
-
function pick(target, properties) {
|
|
12999
|
-
var result = {};
|
|
13000
|
-
var obj = Object(target);
|
|
13001
|
-
forEach$1(properties, function (prop) {
|
|
13002
|
-
if (prop in obj) {
|
|
13003
|
-
result[prop] = target[prop];
|
|
13004
|
-
}
|
|
13005
|
-
});
|
|
13006
|
-
return result;
|
|
13007
|
-
}
|
|
13008
|
-
|
|
13009
12880
|
/**
|
|
13010
12881
|
* Moddle base element.
|
|
13011
12882
|
*/
|
|
@@ -13058,7 +12929,7 @@
|
|
|
13058
12929
|
props.define(this, '$attrs', { value: {} });
|
|
13059
12930
|
props.define(this, '$parent', { writable: true });
|
|
13060
12931
|
|
|
13061
|
-
forEach$1(attrs, bind(function(val, key) {
|
|
12932
|
+
forEach$1(attrs, bind$2(function(val, key) {
|
|
13062
12933
|
this.set(key, val);
|
|
13063
12934
|
}, this));
|
|
13064
12935
|
}
|
|
@@ -13141,6 +13012,7 @@
|
|
|
13141
13012
|
localName = name;
|
|
13142
13013
|
prefix = defaultPrefix;
|
|
13143
13014
|
} else
|
|
13015
|
+
|
|
13144
13016
|
// prefix + local name
|
|
13145
13017
|
if (parts.length === 2) {
|
|
13146
13018
|
localName = parts[1];
|
|
@@ -13347,7 +13219,7 @@
|
|
|
13347
13219
|
return;
|
|
13348
13220
|
}
|
|
13349
13221
|
|
|
13350
|
-
forEach$1(t.properties, bind(function(p) {
|
|
13222
|
+
forEach$1(t.properties, bind$2(function(p) {
|
|
13351
13223
|
|
|
13352
13224
|
// clone property to allow extensions
|
|
13353
13225
|
p = assign$1({}, p, {
|
|
@@ -13394,7 +13266,7 @@
|
|
|
13394
13266
|
|
|
13395
13267
|
this.properties = properties;
|
|
13396
13268
|
|
|
13397
|
-
forEach$1(packages, bind(this.registerPackage, this));
|
|
13269
|
+
forEach$1(packages, bind$2(this.registerPackage, this));
|
|
13398
13270
|
}
|
|
13399
13271
|
|
|
13400
13272
|
|
|
@@ -13418,7 +13290,7 @@
|
|
|
13418
13290
|
ensureAvailable(pkgMap, pkg, 'uri');
|
|
13419
13291
|
|
|
13420
13292
|
// register types
|
|
13421
|
-
forEach$1(pkg.types, bind(function(descriptor) {
|
|
13293
|
+
forEach$1(pkg.types, bind$2(function(descriptor) {
|
|
13422
13294
|
this.registerType(descriptor, pkg);
|
|
13423
13295
|
}, this));
|
|
13424
13296
|
|
|
@@ -13444,7 +13316,7 @@
|
|
|
13444
13316
|
propertiesByName = {};
|
|
13445
13317
|
|
|
13446
13318
|
// parse properties
|
|
13447
|
-
forEach$1(type.properties, bind(function(p) {
|
|
13319
|
+
forEach$1(type.properties, bind$2(function(p) {
|
|
13448
13320
|
|
|
13449
13321
|
// namespace property names
|
|
13450
13322
|
var propertyNs = parseName(p.name, ns.prefix),
|
|
@@ -13470,7 +13342,7 @@
|
|
|
13470
13342
|
propertiesByName: propertiesByName
|
|
13471
13343
|
});
|
|
13472
13344
|
|
|
13473
|
-
forEach$1(type.extends, bind(function(extendsName) {
|
|
13345
|
+
forEach$1(type.extends, bind$2(function(extendsName) {
|
|
13474
13346
|
var extended = this.typeMap[extendsName];
|
|
13475
13347
|
|
|
13476
13348
|
extended.traits = extended.traits || [];
|
|
@@ -13565,7 +13437,7 @@
|
|
|
13565
13437
|
|
|
13566
13438
|
|
|
13567
13439
|
|
|
13568
|
-
|
|
13440
|
+
// helpers ////////////////////////////
|
|
13569
13441
|
|
|
13570
13442
|
function ensureAvailable(packageMap, pkg, identifierKey) {
|
|
13571
13443
|
|
|
@@ -13596,11 +13468,16 @@
|
|
|
13596
13468
|
*/
|
|
13597
13469
|
Properties.prototype.set = function(target, name, value) {
|
|
13598
13470
|
|
|
13471
|
+
if (!isString(name) || !name.length) {
|
|
13472
|
+
throw new TypeError('property name must be a non-empty string');
|
|
13473
|
+
}
|
|
13474
|
+
|
|
13599
13475
|
var property = this.model.getPropertyDescriptor(target, name);
|
|
13600
13476
|
|
|
13601
13477
|
var propertyName = property && property.name;
|
|
13602
13478
|
|
|
13603
|
-
if (isUndefined
|
|
13479
|
+
if (isUndefined(value)) {
|
|
13480
|
+
|
|
13604
13481
|
// unset the property, if the specified value is undefined;
|
|
13605
13482
|
// delete from $attrs (for extensions) or the target itself
|
|
13606
13483
|
if (property) {
|
|
@@ -13609,6 +13486,7 @@
|
|
|
13609
13486
|
delete target.$attrs[name];
|
|
13610
13487
|
}
|
|
13611
13488
|
} else {
|
|
13489
|
+
|
|
13612
13490
|
// set the property, defining well defined properties on the fly
|
|
13613
13491
|
// or simply updating them in target.$attrs (for extensions)
|
|
13614
13492
|
if (property) {
|
|
@@ -13691,7 +13569,7 @@
|
|
|
13691
13569
|
};
|
|
13692
13570
|
|
|
13693
13571
|
|
|
13694
|
-
function isUndefined
|
|
13572
|
+
function isUndefined(val) {
|
|
13695
13573
|
return typeof val === 'undefined';
|
|
13696
13574
|
}
|
|
13697
13575
|
|
|
@@ -13704,7 +13582,7 @@
|
|
|
13704
13582
|
});
|
|
13705
13583
|
}
|
|
13706
13584
|
|
|
13707
|
-
|
|
13585
|
+
// Moddle implementation /////////////////////////////////////////////////
|
|
13708
13586
|
|
|
13709
13587
|
/**
|
|
13710
13588
|
* @class Moddle
|
|
@@ -13780,7 +13658,7 @@
|
|
|
13780
13658
|
|
|
13781
13659
|
var cache = this.typeCache;
|
|
13782
13660
|
|
|
13783
|
-
var name = isString
|
|
13661
|
+
var name = isString(descriptor) ? descriptor : descriptor.ns.name;
|
|
13784
13662
|
|
|
13785
13663
|
var type = cache[name];
|
|
13786
13664
|
|
|
@@ -13913,180 +13791,6 @@
|
|
|
13913
13791
|
return this.registry.typeMap[type];
|
|
13914
13792
|
};
|
|
13915
13793
|
|
|
13916
|
-
/**
|
|
13917
|
-
* Flatten array, one level deep.
|
|
13918
|
-
*
|
|
13919
|
-
* @param {Array<?>} arr
|
|
13920
|
-
*
|
|
13921
|
-
* @return {Array<?>}
|
|
13922
|
-
*/
|
|
13923
|
-
|
|
13924
|
-
var nativeToString = Object.prototype.toString;
|
|
13925
|
-
var nativeHasOwnProperty = Object.prototype.hasOwnProperty;
|
|
13926
|
-
function isUndefined(obj) {
|
|
13927
|
-
return obj === undefined;
|
|
13928
|
-
}
|
|
13929
|
-
function isArray(obj) {
|
|
13930
|
-
return nativeToString.call(obj) === '[object Array]';
|
|
13931
|
-
}
|
|
13932
|
-
function isFunction(obj) {
|
|
13933
|
-
var tag = nativeToString.call(obj);
|
|
13934
|
-
return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object AsyncGeneratorFunction]' || tag === '[object Proxy]';
|
|
13935
|
-
}
|
|
13936
|
-
function isString(obj) {
|
|
13937
|
-
return nativeToString.call(obj) === '[object String]';
|
|
13938
|
-
}
|
|
13939
|
-
/**
|
|
13940
|
-
* Return true, if target owns a property with the given key.
|
|
13941
|
-
*
|
|
13942
|
-
* @param {Object} target
|
|
13943
|
-
* @param {String} key
|
|
13944
|
-
*
|
|
13945
|
-
* @return {Boolean}
|
|
13946
|
-
*/
|
|
13947
|
-
|
|
13948
|
-
function has(target, key) {
|
|
13949
|
-
return nativeHasOwnProperty.call(target, key);
|
|
13950
|
-
}
|
|
13951
|
-
|
|
13952
|
-
/**
|
|
13953
|
-
* Find element in collection.
|
|
13954
|
-
*
|
|
13955
|
-
* @param {Array|Object} collection
|
|
13956
|
-
* @param {Function|Object} matcher
|
|
13957
|
-
*
|
|
13958
|
-
* @return {Object}
|
|
13959
|
-
*/
|
|
13960
|
-
|
|
13961
|
-
function find(collection, matcher) {
|
|
13962
|
-
matcher = toMatcher(matcher);
|
|
13963
|
-
var match;
|
|
13964
|
-
forEach(collection, function (val, key) {
|
|
13965
|
-
if (matcher(val, key)) {
|
|
13966
|
-
match = val;
|
|
13967
|
-
return false;
|
|
13968
|
-
}
|
|
13969
|
-
});
|
|
13970
|
-
return match;
|
|
13971
|
-
}
|
|
13972
|
-
/**
|
|
13973
|
-
* Find element index in collection.
|
|
13974
|
-
*
|
|
13975
|
-
* @param {Array|Object} collection
|
|
13976
|
-
* @param {Function} matcher
|
|
13977
|
-
*
|
|
13978
|
-
* @return {Object}
|
|
13979
|
-
*/
|
|
13980
|
-
|
|
13981
|
-
function findIndex(collection, matcher) {
|
|
13982
|
-
matcher = toMatcher(matcher);
|
|
13983
|
-
var idx = isArray(collection) ? -1 : undefined;
|
|
13984
|
-
forEach(collection, function (val, key) {
|
|
13985
|
-
if (matcher(val, key)) {
|
|
13986
|
-
idx = key;
|
|
13987
|
-
return false;
|
|
13988
|
-
}
|
|
13989
|
-
});
|
|
13990
|
-
return idx;
|
|
13991
|
-
}
|
|
13992
|
-
/**
|
|
13993
|
-
* Find element in collection.
|
|
13994
|
-
*
|
|
13995
|
-
* @param {Array|Object} collection
|
|
13996
|
-
* @param {Function} matcher
|
|
13997
|
-
*
|
|
13998
|
-
* @return {Array} result
|
|
13999
|
-
*/
|
|
14000
|
-
|
|
14001
|
-
function filter(collection, matcher) {
|
|
14002
|
-
var result = [];
|
|
14003
|
-
forEach(collection, function (val, key) {
|
|
14004
|
-
if (matcher(val, key)) {
|
|
14005
|
-
result.push(val);
|
|
14006
|
-
}
|
|
14007
|
-
});
|
|
14008
|
-
return result;
|
|
14009
|
-
}
|
|
14010
|
-
/**
|
|
14011
|
-
* Iterate over collection; returning something
|
|
14012
|
-
* (non-undefined) will stop iteration.
|
|
14013
|
-
*
|
|
14014
|
-
* @param {Array|Object} collection
|
|
14015
|
-
* @param {Function} iterator
|
|
14016
|
-
*
|
|
14017
|
-
* @return {Object} return result that stopped the iteration
|
|
14018
|
-
*/
|
|
14019
|
-
|
|
14020
|
-
function forEach(collection, iterator) {
|
|
14021
|
-
var val, result;
|
|
14022
|
-
|
|
14023
|
-
if (isUndefined(collection)) {
|
|
14024
|
-
return;
|
|
14025
|
-
}
|
|
14026
|
-
|
|
14027
|
-
var convertKey = isArray(collection) ? toNum : identity;
|
|
14028
|
-
|
|
14029
|
-
for (var key in collection) {
|
|
14030
|
-
if (has(collection, key)) {
|
|
14031
|
-
val = collection[key];
|
|
14032
|
-
result = iterator(val, convertKey(key));
|
|
14033
|
-
|
|
14034
|
-
if (result === false) {
|
|
14035
|
-
return val;
|
|
14036
|
-
}
|
|
14037
|
-
}
|
|
14038
|
-
}
|
|
14039
|
-
}
|
|
14040
|
-
|
|
14041
|
-
function toMatcher(matcher) {
|
|
14042
|
-
return isFunction(matcher) ? matcher : function (e) {
|
|
14043
|
-
return e === matcher;
|
|
14044
|
-
};
|
|
14045
|
-
}
|
|
14046
|
-
|
|
14047
|
-
function identity(arg) {
|
|
14048
|
-
return arg;
|
|
14049
|
-
}
|
|
14050
|
-
|
|
14051
|
-
function toNum(arg) {
|
|
14052
|
-
return Number(arg);
|
|
14053
|
-
}
|
|
14054
|
-
|
|
14055
|
-
function _extends() {
|
|
14056
|
-
_extends = Object.assign || function (target) {
|
|
14057
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
14058
|
-
var source = arguments[i];
|
|
14059
|
-
|
|
14060
|
-
for (var key in source) {
|
|
14061
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
14062
|
-
target[key] = source[key];
|
|
14063
|
-
}
|
|
14064
|
-
}
|
|
14065
|
-
}
|
|
14066
|
-
|
|
14067
|
-
return target;
|
|
14068
|
-
};
|
|
14069
|
-
|
|
14070
|
-
return _extends.apply(this, arguments);
|
|
14071
|
-
}
|
|
14072
|
-
|
|
14073
|
-
/**
|
|
14074
|
-
* Convenience wrapper for `Object.assign`.
|
|
14075
|
-
*
|
|
14076
|
-
* @param {Object} target
|
|
14077
|
-
* @param {...Object} others
|
|
14078
|
-
*
|
|
14079
|
-
* @return {Object} the target
|
|
14080
|
-
*/
|
|
14081
|
-
|
|
14082
|
-
function assign(target) {
|
|
14083
|
-
for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
14084
|
-
others[_key - 1] = arguments[_key];
|
|
14085
|
-
}
|
|
14086
|
-
|
|
14087
|
-
return _extends.apply(void 0, [target].concat(others));
|
|
14088
|
-
}
|
|
14089
|
-
|
|
14090
13794
|
var fromCharCode = String.fromCharCode;
|
|
14091
13795
|
|
|
14092
13796
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
@@ -15261,7 +14965,7 @@
|
|
|
15261
14965
|
* @property {Boolean} lax
|
|
15262
14966
|
*/
|
|
15263
14967
|
|
|
15264
|
-
assign(this, options);
|
|
14968
|
+
assign$1(this, options);
|
|
15265
14969
|
|
|
15266
14970
|
this.elementsById = {};
|
|
15267
14971
|
this.references = [];
|
|
@@ -15482,7 +15186,7 @@
|
|
|
15482
15186
|
model = this.model,
|
|
15483
15187
|
propNameNs;
|
|
15484
15188
|
|
|
15485
|
-
forEach(attributes, function(value, name) {
|
|
15189
|
+
forEach$1(attributes, function(value, name) {
|
|
15486
15190
|
|
|
15487
15191
|
var prop = descriptor.propertiesByName[name],
|
|
15488
15192
|
values;
|
|
@@ -15500,7 +15204,7 @@
|
|
|
15500
15204
|
// IDREFS: parse references as whitespace-separated list
|
|
15501
15205
|
values = value.split(' ');
|
|
15502
15206
|
|
|
15503
|
-
forEach(values, function(v) {
|
|
15207
|
+
forEach$1(values, function(v) {
|
|
15504
15208
|
context.addReference({
|
|
15505
15209
|
element: instance,
|
|
15506
15210
|
property: prop.ns.name,
|
|
@@ -15567,7 +15271,7 @@
|
|
|
15567
15271
|
|
|
15568
15272
|
elementType = model.getType(elementTypeName);
|
|
15569
15273
|
|
|
15570
|
-
return assign({}, property, {
|
|
15274
|
+
return assign$1({}, property, {
|
|
15571
15275
|
effectiveType: getModdleDescriptor(elementType).name
|
|
15572
15276
|
});
|
|
15573
15277
|
}
|
|
@@ -15589,7 +15293,7 @@
|
|
|
15589
15293
|
});
|
|
15590
15294
|
|
|
15591
15295
|
if (property) {
|
|
15592
|
-
return assign({}, property, {
|
|
15296
|
+
return assign$1({}, property, {
|
|
15593
15297
|
effectiveType: getModdleDescriptor(elementType).name
|
|
15594
15298
|
});
|
|
15595
15299
|
}
|
|
@@ -15664,7 +15368,7 @@
|
|
|
15664
15368
|
}
|
|
15665
15369
|
|
|
15666
15370
|
if (propertyDesc.isReference) {
|
|
15667
|
-
assign(newElement, {
|
|
15371
|
+
assign$1(newElement, {
|
|
15668
15372
|
element: element
|
|
15669
15373
|
});
|
|
15670
15374
|
|
|
@@ -15773,7 +15477,7 @@
|
|
|
15773
15477
|
};
|
|
15774
15478
|
}
|
|
15775
15479
|
|
|
15776
|
-
assign(this, { lax: false }, options);
|
|
15480
|
+
assign$1(this, { lax: false }, options);
|
|
15777
15481
|
}
|
|
15778
15482
|
|
|
15779
15483
|
/**
|
|
@@ -15828,7 +15532,7 @@
|
|
|
15828
15532
|
var model = this.model,
|
|
15829
15533
|
lax = this.lax;
|
|
15830
15534
|
|
|
15831
|
-
var context = new Context(assign({}, options, { rootHandler: rootHandler })),
|
|
15535
|
+
var context = new Context(assign$1({}, options, { rootHandler: rootHandler })),
|
|
15832
15536
|
parser = new Parser({ proxy: true }),
|
|
15833
15537
|
stack = createStack();
|
|
15834
15538
|
|
|
@@ -16223,14 +15927,14 @@
|
|
|
16223
15927
|
|
|
16224
15928
|
function getElementNs(ns, descriptor) {
|
|
16225
15929
|
if (descriptor.isGeneric) {
|
|
16226
|
-
return assign({ localName: descriptor.ns.localName }, ns);
|
|
15930
|
+
return assign$1({ localName: descriptor.ns.localName }, ns);
|
|
16227
15931
|
} else {
|
|
16228
|
-
return assign({ localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg) }, ns);
|
|
15932
|
+
return assign$1({ localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg) }, ns);
|
|
16229
15933
|
}
|
|
16230
15934
|
}
|
|
16231
15935
|
|
|
16232
15936
|
function getPropertyNs(ns, descriptor) {
|
|
16233
|
-
return assign({ localName: descriptor.ns.localName }, ns);
|
|
15937
|
+
return assign$1({ localName: descriptor.ns.localName }, ns);
|
|
16234
15938
|
}
|
|
16235
15939
|
|
|
16236
15940
|
function getSerializableProperties(element) {
|
|
@@ -16244,7 +15948,7 @@
|
|
|
16244
15948
|
}
|
|
16245
15949
|
|
|
16246
15950
|
// do not serialize defaults
|
|
16247
|
-
if (!has(element, name)) {
|
|
15951
|
+
if (!has$1(element, name)) {
|
|
16248
15952
|
return false;
|
|
16249
15953
|
}
|
|
16250
15954
|
|
|
@@ -16462,7 +16166,7 @@
|
|
|
16462
16166
|
if (this.isLocalNs(effectiveNs)) {
|
|
16463
16167
|
return { localName: ns.localName };
|
|
16464
16168
|
} else {
|
|
16465
|
-
return assign({ localName: ns.localName }, effectiveNs);
|
|
16169
|
+
return assign$1({ localName: ns.localName }, effectiveNs);
|
|
16466
16170
|
}
|
|
16467
16171
|
};
|
|
16468
16172
|
|
|
@@ -16473,7 +16177,7 @@
|
|
|
16473
16177
|
|
|
16474
16178
|
var attributes = [];
|
|
16475
16179
|
|
|
16476
|
-
forEach(element, function(val, key) {
|
|
16180
|
+
forEach$1(element, function(val, key) {
|
|
16477
16181
|
|
|
16478
16182
|
var nonNsAttr;
|
|
16479
16183
|
|
|
@@ -16481,7 +16185,7 @@
|
|
|
16481
16185
|
body.push(new BodySerializer().build({ type: 'String' }, val));
|
|
16482
16186
|
} else
|
|
16483
16187
|
if (key === '$children') {
|
|
16484
|
-
forEach(val, function(child) {
|
|
16188
|
+
forEach$1(val, function(child) {
|
|
16485
16189
|
body.push(new ElementSerializer(self).build(child));
|
|
16486
16190
|
});
|
|
16487
16191
|
} else
|
|
@@ -16551,7 +16255,7 @@
|
|
|
16551
16255
|
// parse namespace attributes first
|
|
16552
16256
|
// and log them. push non namespace attributes to a list
|
|
16553
16257
|
// and process them later
|
|
16554
|
-
forEach(genericAttrs, function(value, name) {
|
|
16258
|
+
forEach$1(genericAttrs, function(value, name) {
|
|
16555
16259
|
|
|
16556
16260
|
var nonNsAttr = self.parseNsAttribute(element, name, value);
|
|
16557
16261
|
|
|
@@ -16567,7 +16271,7 @@
|
|
|
16567
16271
|
|
|
16568
16272
|
var self = this;
|
|
16569
16273
|
|
|
16570
|
-
forEach(attributes, function(attr) {
|
|
16274
|
+
forEach$1(attributes, function(attr) {
|
|
16571
16275
|
|
|
16572
16276
|
// do not serialize xsi:type attribute
|
|
16573
16277
|
// it is set manually based on the actual implementation type
|
|
@@ -16578,6 +16282,8 @@
|
|
|
16578
16282
|
try {
|
|
16579
16283
|
self.addAttribute(self.nsAttributeName(attr.name), attr.value);
|
|
16580
16284
|
} catch (e) {
|
|
16285
|
+
/* global console */
|
|
16286
|
+
|
|
16581
16287
|
console.warn(
|
|
16582
16288
|
'missing namespace information for ',
|
|
16583
16289
|
attr.name, '=', attr.value, 'on', element,
|
|
@@ -16592,7 +16298,7 @@
|
|
|
16592
16298
|
body = this.body,
|
|
16593
16299
|
element = this.element;
|
|
16594
16300
|
|
|
16595
|
-
forEach(properties, function(p) {
|
|
16301
|
+
forEach$1(properties, function(p) {
|
|
16596
16302
|
var value = element.get(p.name),
|
|
16597
16303
|
isReference = p.isReference,
|
|
16598
16304
|
isMany = p.isMany;
|
|
@@ -16605,12 +16311,12 @@
|
|
|
16605
16311
|
body.push(new BodySerializer().build(p, value[0]));
|
|
16606
16312
|
} else
|
|
16607
16313
|
if (isSimple(p.type)) {
|
|
16608
|
-
forEach(value, function(v) {
|
|
16314
|
+
forEach$1(value, function(v) {
|
|
16609
16315
|
body.push(new ValueSerializer(self.addTagName(self.nsPropertyTagName(p))).build(p, v));
|
|
16610
16316
|
});
|
|
16611
16317
|
} else
|
|
16612
16318
|
if (isReference) {
|
|
16613
|
-
forEach(value, function(v) {
|
|
16319
|
+
forEach$1(value, function(v) {
|
|
16614
16320
|
body.push(new ReferenceSerializer(self.addTagName(self.nsPropertyTagName(p))).build(v));
|
|
16615
16321
|
});
|
|
16616
16322
|
} else {
|
|
@@ -16620,7 +16326,7 @@
|
|
|
16620
16326
|
var asType = serializeAsType(p),
|
|
16621
16327
|
asProperty = serializeAsProperty(p);
|
|
16622
16328
|
|
|
16623
|
-
forEach(value, function(v) {
|
|
16329
|
+
forEach$1(value, function(v) {
|
|
16624
16330
|
var serializer;
|
|
16625
16331
|
|
|
16626
16332
|
if (asType) {
|
|
@@ -16728,7 +16434,7 @@
|
|
|
16728
16434
|
var self = this,
|
|
16729
16435
|
element = this.element;
|
|
16730
16436
|
|
|
16731
|
-
forEach(properties, function(p) {
|
|
16437
|
+
forEach$1(properties, function(p) {
|
|
16732
16438
|
|
|
16733
16439
|
var value = element.get(p.name);
|
|
16734
16440
|
|
|
@@ -16739,7 +16445,7 @@
|
|
|
16739
16445
|
}
|
|
16740
16446
|
else {
|
|
16741
16447
|
var values = [];
|
|
16742
|
-
forEach(value, function(v) {
|
|
16448
|
+
forEach$1(value, function(v) {
|
|
16743
16449
|
values.push(v.id);
|
|
16744
16450
|
});
|
|
16745
16451
|
|
|
@@ -16795,7 +16501,7 @@
|
|
|
16795
16501
|
attrs = getNsAttrs(namespaces).concat(attrs);
|
|
16796
16502
|
}
|
|
16797
16503
|
|
|
16798
|
-
forEach(attrs, function(a) {
|
|
16504
|
+
forEach$1(attrs, function(a) {
|
|
16799
16505
|
writer
|
|
16800
16506
|
.append(' ')
|
|
16801
16507
|
.append(nsName(a.name)).append('="').append(a.value).append('"');
|
|
@@ -16822,7 +16528,7 @@
|
|
|
16822
16528
|
.indent();
|
|
16823
16529
|
}
|
|
16824
16530
|
|
|
16825
|
-
forEach(this.body, function(b) {
|
|
16531
|
+
forEach$1(this.body, function(b) {
|
|
16826
16532
|
b.serializeTo(writer);
|
|
16827
16533
|
});
|
|
16828
16534
|
|
|
@@ -16890,7 +16596,7 @@
|
|
|
16890
16596
|
|
|
16891
16597
|
function FormatingWriter(out, format) {
|
|
16892
16598
|
|
|
16893
|
-
var indent = [''];
|
|
16599
|
+
var indent = [ '' ];
|
|
16894
16600
|
|
|
16895
16601
|
this.append = function(str) {
|
|
16896
16602
|
out.write(str);
|
|
@@ -16932,7 +16638,7 @@
|
|
|
16932
16638
|
*/
|
|
16933
16639
|
function Writer(options) {
|
|
16934
16640
|
|
|
16935
|
-
options = assign({ format: false, preamble: true }, options || {});
|
|
16641
|
+
options = assign$1({ format: false, preamble: true }, options || {});
|
|
16936
16642
|
|
|
16937
16643
|
function toXML(tree, writer) {
|
|
16938
16644
|
var internalWriter = writer || new SavingWriter();
|
|
@@ -16999,12 +16705,12 @@
|
|
|
16999
16705
|
*/
|
|
17000
16706
|
BpmnModdle.prototype.fromXML = function(xmlStr, typeName, options) {
|
|
17001
16707
|
|
|
17002
|
-
if (!isString
|
|
16708
|
+
if (!isString(typeName)) {
|
|
17003
16709
|
options = typeName;
|
|
17004
16710
|
typeName = 'bpmn:Definitions';
|
|
17005
16711
|
}
|
|
17006
16712
|
|
|
17007
|
-
var reader = new Reader(assign$
|
|
16713
|
+
var reader = new Reader(assign$1({ model: this, lax: true }, options));
|
|
17008
16714
|
var rootHandler = reader.handler(typeName);
|
|
17009
16715
|
|
|
17010
16716
|
return reader.fromXML(xmlStr, rootHandler);
|
|
@@ -20691,7 +20397,7 @@
|
|
|
20691
20397
|
};
|
|
20692
20398
|
|
|
20693
20399
|
function simple(additionalPackages, options) {
|
|
20694
|
-
var pks = assign$
|
|
20400
|
+
var pks = assign$1({}, packages, additionalPackages);
|
|
20695
20401
|
|
|
20696
20402
|
return new BpmnModdle(pks, options);
|
|
20697
20403
|
}
|
|
@@ -20715,7 +20421,7 @@
|
|
|
20715
20421
|
}
|
|
20716
20422
|
|
|
20717
20423
|
var argLen = arguments.length;
|
|
20718
|
-
if (argLen >= 1 && isFunction
|
|
20424
|
+
if (argLen >= 1 && isFunction(arguments[argLen - 1])) {
|
|
20719
20425
|
|
|
20720
20426
|
var callback = arguments[argLen - 1];
|
|
20721
20427
|
|
|
@@ -20756,7 +20462,7 @@
|
|
|
20756
20462
|
function ensureCompatDiRef(businessObject) {
|
|
20757
20463
|
|
|
20758
20464
|
// bpmnElement can have multiple independent DIs
|
|
20759
|
-
if (!has$
|
|
20465
|
+
if (!has$1(businessObject, 'di')) {
|
|
20760
20466
|
Object.defineProperty(businessObject, 'di', {
|
|
20761
20467
|
enumerable: false,
|
|
20762
20468
|
get: function() {
|
|
@@ -20784,7 +20490,7 @@
|
|
|
20784
20490
|
* correctly specify one.
|
|
20785
20491
|
*/
|
|
20786
20492
|
function findDisplayCandidate(definitions) {
|
|
20787
|
-
return find
|
|
20493
|
+
return find(definitions.rootElements, function(e) {
|
|
20788
20494
|
return is(e, 'bpmn:Process') || is(e, 'bpmn:Collaboration');
|
|
20789
20495
|
});
|
|
20790
20496
|
}
|
|
@@ -20891,7 +20597,7 @@
|
|
|
20891
20597
|
function handlePlane(plane) {
|
|
20892
20598
|
registerDi(plane);
|
|
20893
20599
|
|
|
20894
|
-
forEach$
|
|
20600
|
+
forEach$1(plane.planeElement, handlePlaneElement);
|
|
20895
20601
|
}
|
|
20896
20602
|
|
|
20897
20603
|
function handlePlaneElement(planeElement) {
|
|
@@ -21016,7 +20722,7 @@
|
|
|
21016
20722
|
// walk through all processes that have not yet been drawn and draw them
|
|
21017
20723
|
// if they contain lanes with DI information.
|
|
21018
20724
|
// we do this to pass the free-floating lane test cases in the MIWG test suite
|
|
21019
|
-
var processes = filter
|
|
20725
|
+
var processes = filter(rootElements, function(e) {
|
|
21020
20726
|
return !isHandled(e) && is(e, 'bpmn:Process') && e.laneSets;
|
|
21021
20727
|
});
|
|
21022
20728
|
|
|
@@ -21028,7 +20734,7 @@
|
|
|
21028
20734
|
}
|
|
21029
20735
|
|
|
21030
20736
|
function handleMessageFlows(messageFlows, context) {
|
|
21031
|
-
forEach$
|
|
20737
|
+
forEach$1(messageFlows, contextual(handleMessageFlow, context));
|
|
21032
20738
|
}
|
|
21033
20739
|
|
|
21034
20740
|
function handleDataAssociation(association, context) {
|
|
@@ -21054,7 +20760,7 @@
|
|
|
21054
20760
|
|
|
21055
20761
|
function handleArtifacts(artifacts, context) {
|
|
21056
20762
|
|
|
21057
|
-
forEach$
|
|
20763
|
+
forEach$1(artifacts, function(e) {
|
|
21058
20764
|
if (is(e, 'bpmn:Association')) {
|
|
21059
20765
|
deferred.push(function() {
|
|
21060
20766
|
handleArtifact(e, context);
|
|
@@ -21071,8 +20777,8 @@
|
|
|
21071
20777
|
return;
|
|
21072
20778
|
}
|
|
21073
20779
|
|
|
21074
|
-
forEach$
|
|
21075
|
-
forEach$
|
|
20780
|
+
forEach$1(ioSpecification.dataInputs, contextual(handleDataInput, context));
|
|
20781
|
+
forEach$1(ioSpecification.dataOutputs, contextual(handleDataOutput, context));
|
|
21076
20782
|
}
|
|
21077
20783
|
|
|
21078
20784
|
function handleSubProcess(subProcess, context) {
|
|
@@ -21099,8 +20805,8 @@
|
|
|
21099
20805
|
// * bpmn:CatchEvent
|
|
21100
20806
|
//
|
|
21101
20807
|
deferred.push(function() {
|
|
21102
|
-
forEach$
|
|
21103
|
-
forEach$
|
|
20808
|
+
forEach$1(flowNode.dataInputAssociations, contextual(handleDataAssociation, context));
|
|
20809
|
+
forEach$1(flowNode.dataOutputAssociations, contextual(handleDataAssociation, context));
|
|
21104
20810
|
});
|
|
21105
20811
|
}
|
|
21106
20812
|
|
|
@@ -21127,11 +20833,11 @@
|
|
|
21127
20833
|
}
|
|
21128
20834
|
|
|
21129
20835
|
function handleLaneSet(laneSet, context) {
|
|
21130
|
-
forEach$
|
|
20836
|
+
forEach$1(laneSet.lanes, contextual(handleLane, context));
|
|
21131
20837
|
}
|
|
21132
20838
|
|
|
21133
20839
|
function handleLaneSets(laneSets, context) {
|
|
21134
|
-
forEach$
|
|
20840
|
+
forEach$1(laneSets, contextual(handleLaneSet, context));
|
|
21135
20841
|
}
|
|
21136
20842
|
|
|
21137
20843
|
function handleFlowElementsContainer(container, context) {
|
|
@@ -21143,7 +20849,7 @@
|
|
|
21143
20849
|
}
|
|
21144
20850
|
|
|
21145
20851
|
function handleFlowElements(flowElements, context) {
|
|
21146
|
-
forEach$
|
|
20852
|
+
forEach$1(flowElements, function(e) {
|
|
21147
20853
|
if (is(e, 'bpmn:SequenceFlow')) {
|
|
21148
20854
|
deferred.push(function() {
|
|
21149
20855
|
handleSequenceFlow(e, context);
|
|
@@ -21181,7 +20887,7 @@
|
|
|
21181
20887
|
|
|
21182
20888
|
function handleCollaboration(collaboration, context) {
|
|
21183
20889
|
|
|
21184
|
-
forEach$
|
|
20890
|
+
forEach$1(collaboration.participants, contextual(handleParticipant, context));
|
|
21185
20891
|
|
|
21186
20892
|
handleArtifacts(collaboration.artifacts, context);
|
|
21187
20893
|
|
|
@@ -21195,7 +20901,7 @@
|
|
|
21195
20901
|
function wireFlowNodeRefs(lane) {
|
|
21196
20902
|
|
|
21197
20903
|
// wire the virtual flowNodeRefs <-> relationship
|
|
21198
|
-
forEach$
|
|
20904
|
+
forEach$1(lane.flowNodeRef, function(flowNode) {
|
|
21199
20905
|
var lanes = flowNode.get('lanes');
|
|
21200
20906
|
|
|
21201
20907
|
if (lanes) {
|
|
@@ -21289,7 +20995,7 @@
|
|
|
21289
20995
|
|
|
21290
20996
|
// traverse BPMN 2.0 document model,
|
|
21291
20997
|
// starting at definitions
|
|
21292
|
-
forEach$
|
|
20998
|
+
forEach$1(diagramsToImport, function(diagram) {
|
|
21293
20999
|
walker.handleDefinitions(definitions, diagram);
|
|
21294
21000
|
});
|
|
21295
21001
|
|
|
@@ -21356,12 +21062,12 @@
|
|
|
21356
21062
|
if (is$1(rootElement, 'bpmn:Collaboration')) {
|
|
21357
21063
|
collaboration = rootElement;
|
|
21358
21064
|
} else {
|
|
21359
|
-
collaboration = find
|
|
21065
|
+
collaboration = find(definitions.rootElements, function(element) {
|
|
21360
21066
|
if (!is$1(element, 'bpmn:Collaboration')) {
|
|
21361
21067
|
return;
|
|
21362
21068
|
}
|
|
21363
21069
|
|
|
21364
|
-
return find
|
|
21070
|
+
return find(element.participants, function(participant) {
|
|
21365
21071
|
return participant.processRef === rootElement;
|
|
21366
21072
|
});
|
|
21367
21073
|
});
|
|
@@ -21385,7 +21091,7 @@
|
|
|
21385
21091
|
var diagramsToImport = [ bpmnDiagram ];
|
|
21386
21092
|
var handledElements = [ bpmnElement ];
|
|
21387
21093
|
|
|
21388
|
-
forEach$
|
|
21094
|
+
forEach$1(definitions.diagrams, function(diagram) {
|
|
21389
21095
|
var businessObject = diagram.plane.bpmnElement;
|
|
21390
21096
|
|
|
21391
21097
|
if (
|
|
@@ -21404,7 +21110,7 @@
|
|
|
21404
21110
|
function selfAndAllFlowElements(elements) {
|
|
21405
21111
|
var result = [];
|
|
21406
21112
|
|
|
21407
|
-
forEach$
|
|
21113
|
+
forEach$1(elements, function(element) {
|
|
21408
21114
|
if (!element) {
|
|
21409
21115
|
return;
|
|
21410
21116
|
}
|
|
@@ -21499,11 +21205,11 @@
|
|
|
21499
21205
|
function createLightbox() {
|
|
21500
21206
|
lightbox = domify$1(LIGHTBOX_MARKUP);
|
|
21501
21207
|
|
|
21502
|
-
assign
|
|
21503
|
-
assign
|
|
21504
|
-
assign
|
|
21505
|
-
assign
|
|
21506
|
-
assign
|
|
21208
|
+
assign(lightbox, LIGHTBOX_STYLES);
|
|
21209
|
+
assign(query('svg', lightbox), LOGO_STYLES);
|
|
21210
|
+
assign(query('.backdrop', lightbox), BACKDROP_STYLES);
|
|
21211
|
+
assign(query('.notice', lightbox), NOTICE_STYLES);
|
|
21212
|
+
assign(query('.link', lightbox), LINK_STYLES, {
|
|
21507
21213
|
'margin': '15px 20px 15px 10px',
|
|
21508
21214
|
'alignSelf': 'center'
|
|
21509
21215
|
});
|
|
@@ -21545,7 +21251,7 @@
|
|
|
21545
21251
|
*/
|
|
21546
21252
|
function BaseViewer(options) {
|
|
21547
21253
|
|
|
21548
|
-
options = assign$
|
|
21254
|
+
options = assign$1({}, DEFAULT_OPTIONS, options);
|
|
21549
21255
|
|
|
21550
21256
|
this._moddle = this._createModdle(options);
|
|
21551
21257
|
|
|
@@ -22087,8 +21793,8 @@
|
|
|
22087
21793
|
|
|
22088
21794
|
const diagramModules = [].concat(staticModules, baseModules, additionalModules);
|
|
22089
21795
|
|
|
22090
|
-
const diagramOptions = assign$
|
|
22091
|
-
canvas: assign$
|
|
21796
|
+
const diagramOptions = assign$1(omit(options, [ 'additionalModules' ]), {
|
|
21797
|
+
canvas: assign$1({}, options.canvas, { container: container }),
|
|
22092
21798
|
modules: diagramModules
|
|
22093
21799
|
});
|
|
22094
21800
|
|
|
@@ -22116,7 +21822,7 @@
|
|
|
22116
21822
|
|
|
22117
21823
|
const container = domify$1('<div class="bjs-container"></div>');
|
|
22118
21824
|
|
|
22119
|
-
assign
|
|
21825
|
+
assign(container, {
|
|
22120
21826
|
width: ensureUnit(options.width),
|
|
22121
21827
|
height: ensureUnit(options.height),
|
|
22122
21828
|
position: options.position
|
|
@@ -22126,7 +21832,7 @@
|
|
|
22126
21832
|
};
|
|
22127
21833
|
|
|
22128
21834
|
BaseViewer.prototype._createModdle = function(options) {
|
|
22129
|
-
const moddleOptions = assign$
|
|
21835
|
+
const moddleOptions = assign$1({}, this._moddleExtensions, options.moddleExtensions);
|
|
22130
21836
|
|
|
22131
21837
|
return new simple(moddleOptions);
|
|
22132
21838
|
};
|
|
@@ -22185,7 +21891,7 @@
|
|
|
22185
21891
|
return null;
|
|
22186
21892
|
}
|
|
22187
21893
|
|
|
22188
|
-
return find
|
|
21894
|
+
return find(definitions.diagrams, function(element) {
|
|
22189
21895
|
return element.id === diagramId;
|
|
22190
21896
|
}) || null;
|
|
22191
21897
|
}
|
|
@@ -22212,8 +21918,8 @@
|
|
|
22212
21918
|
|
|
22213
21919
|
const linkElement = domify$1(linkMarkup);
|
|
22214
21920
|
|
|
22215
|
-
assign
|
|
22216
|
-
assign
|
|
21921
|
+
assign(query('svg', linkElement), LOGO_STYLES);
|
|
21922
|
+
assign(linkElement, LINK_STYLES, {
|
|
22217
21923
|
position: 'absolute',
|
|
22218
21924
|
bottom: '15px',
|
|
22219
21925
|
right: '15px',
|
|
@@ -22335,7 +22041,7 @@
|
|
|
22335
22041
|
* @param {KeyboardEvent} event
|
|
22336
22042
|
*/
|
|
22337
22043
|
function isKey(keys, event) {
|
|
22338
|
-
keys = isArray$
|
|
22044
|
+
keys = isArray$2(keys) ? keys : [ keys ];
|
|
22339
22045
|
|
|
22340
22046
|
return keys.indexOf(event.key) !== -1 || keys.indexOf(event.keyCode) !== -1;
|
|
22341
22047
|
}
|
|
@@ -22529,7 +22235,7 @@
|
|
|
22529
22235
|
* @param {string} type
|
|
22530
22236
|
*/
|
|
22531
22237
|
Keyboard.prototype.addListener = function(priority, listener, type) {
|
|
22532
|
-
if (isFunction
|
|
22238
|
+
if (isFunction(priority)) {
|
|
22533
22239
|
type = listener;
|
|
22534
22240
|
listener = priority;
|
|
22535
22241
|
priority = DEFAULT_PRIORITY;
|
|
@@ -22745,7 +22451,7 @@
|
|
|
22745
22451
|
|
|
22746
22452
|
var self = this;
|
|
22747
22453
|
|
|
22748
|
-
this._config = assign$
|
|
22454
|
+
this._config = assign$1({}, DEFAULT_CONFIG, config || {});
|
|
22749
22455
|
|
|
22750
22456
|
keyboard.addListener(arrowsListener);
|
|
22751
22457
|
|
|
@@ -23074,7 +22780,7 @@
|
|
|
23074
22780
|
this._canvas = canvas;
|
|
23075
22781
|
this._container = canvas._container;
|
|
23076
22782
|
|
|
23077
|
-
this._handleWheel = bind$
|
|
22783
|
+
this._handleWheel = bind$2(this._handleWheel, this);
|
|
23078
22784
|
|
|
23079
22785
|
this._totalDelta = 0;
|
|
23080
22786
|
this._scale = config.scale || DEFAULT_SCALE;
|