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,
|
|
@@ -6353,13 +6411,13 @@
|
|
|
6353
6411
|
}
|
|
6354
6412
|
|
|
6355
6413
|
function registerEvents(svg) {
|
|
6356
|
-
forEach$
|
|
6414
|
+
forEach$1(bindings, function(val, key) {
|
|
6357
6415
|
registerEvent(svg, key, val);
|
|
6358
6416
|
});
|
|
6359
6417
|
}
|
|
6360
6418
|
|
|
6361
6419
|
function unregisterEvents(svg) {
|
|
6362
|
-
forEach$
|
|
6420
|
+
forEach$1(bindings, function(val, key) {
|
|
6363
6421
|
unregisterEvent(svg, key, val);
|
|
6364
6422
|
});
|
|
6365
6423
|
}
|
|
@@ -6430,7 +6488,7 @@
|
|
|
6430
6488
|
|
|
6431
6489
|
function createHitStyle(classNames, attrs) {
|
|
6432
6490
|
|
|
6433
|
-
attrs = assign$
|
|
6491
|
+
attrs = assign$1({
|
|
6434
6492
|
stroke: 'white',
|
|
6435
6493
|
strokeWidth: 15
|
|
6436
6494
|
}, attrs || {});
|
|
@@ -6469,7 +6527,7 @@
|
|
|
6469
6527
|
this.removeHits = function(gfx) {
|
|
6470
6528
|
var hits = all('.djs-hit', gfx);
|
|
6471
6529
|
|
|
6472
|
-
forEach$
|
|
6530
|
+
forEach$1(hits, remove$3);
|
|
6473
6531
|
};
|
|
6474
6532
|
|
|
6475
6533
|
/**
|
|
@@ -6528,7 +6586,7 @@
|
|
|
6528
6586
|
*/
|
|
6529
6587
|
this.createBoxHit = function(gfx, type, attrs) {
|
|
6530
6588
|
|
|
6531
|
-
attrs = assign$
|
|
6589
|
+
attrs = assign$1({
|
|
6532
6590
|
x: 0,
|
|
6533
6591
|
y: 0
|
|
6534
6592
|
}, attrs);
|
|
@@ -6685,7 +6743,7 @@
|
|
|
6685
6743
|
function getBBox(elements, stopRecursion) {
|
|
6686
6744
|
|
|
6687
6745
|
stopRecursion = !!stopRecursion;
|
|
6688
|
-
if (!isArray$
|
|
6746
|
+
if (!isArray$2(elements)) {
|
|
6689
6747
|
elements = [ elements ];
|
|
6690
6748
|
}
|
|
6691
6749
|
|
|
@@ -6694,7 +6752,7 @@
|
|
|
6694
6752
|
maxX,
|
|
6695
6753
|
maxY;
|
|
6696
6754
|
|
|
6697
|
-
forEach$
|
|
6755
|
+
forEach$1(elements, function(element) {
|
|
6698
6756
|
|
|
6699
6757
|
// If element is a connection the bbox must be computed first
|
|
6700
6758
|
var bbox = element;
|
|
@@ -6773,7 +6831,7 @@
|
|
|
6773
6831
|
function createOutline(gfx, bounds) {
|
|
6774
6832
|
var outline = create$2('rect');
|
|
6775
6833
|
|
|
6776
|
-
attr$2(outline, assign$
|
|
6834
|
+
attr$2(outline, assign$1({
|
|
6777
6835
|
x: 10,
|
|
6778
6836
|
y: 10,
|
|
6779
6837
|
rx: 3,
|
|
@@ -6932,7 +6990,7 @@
|
|
|
6932
6990
|
var selectedElements = this._selectedElements,
|
|
6933
6991
|
oldSelection = selectedElements.slice();
|
|
6934
6992
|
|
|
6935
|
-
if (!isArray$
|
|
6993
|
+
if (!isArray$2(elements)) {
|
|
6936
6994
|
elements = elements ? [ elements ] : [];
|
|
6937
6995
|
}
|
|
6938
6996
|
|
|
@@ -6949,7 +7007,7 @@
|
|
|
6949
7007
|
// selection may be cleared by passing an empty array or null
|
|
6950
7008
|
// to the method
|
|
6951
7009
|
if (add) {
|
|
6952
|
-
forEach$
|
|
7010
|
+
forEach$1(elements, function(element) {
|
|
6953
7011
|
if (selectedElements.indexOf(element) !== -1) {
|
|
6954
7012
|
|
|
6955
7013
|
// already selected
|
|
@@ -7018,13 +7076,13 @@
|
|
|
7018
7076
|
var oldSelection = event.oldSelection,
|
|
7019
7077
|
newSelection = event.newSelection;
|
|
7020
7078
|
|
|
7021
|
-
forEach$
|
|
7079
|
+
forEach$1(oldSelection, function(e) {
|
|
7022
7080
|
if (newSelection.indexOf(e) === -1) {
|
|
7023
7081
|
deselect(e);
|
|
7024
7082
|
}
|
|
7025
7083
|
});
|
|
7026
7084
|
|
|
7027
|
-
forEach$
|
|
7085
|
+
forEach$1(newSelection, function(e) {
|
|
7028
7086
|
if (oldSelection.indexOf(e) === -1) {
|
|
7029
7087
|
select(e);
|
|
7030
7088
|
}
|
|
@@ -7066,7 +7124,7 @@
|
|
|
7066
7124
|
|
|
7067
7125
|
var rect = create$2('rect');
|
|
7068
7126
|
|
|
7069
|
-
attr$2(rect, assign$
|
|
7127
|
+
attr$2(rect, assign$1({
|
|
7070
7128
|
rx: 3
|
|
7071
7129
|
}, bBox));
|
|
7072
7130
|
|
|
@@ -7103,7 +7161,7 @@
|
|
|
7103
7161
|
return;
|
|
7104
7162
|
}
|
|
7105
7163
|
|
|
7106
|
-
if (isArray$
|
|
7164
|
+
if (isArray$2(autoSelect)) {
|
|
7107
7165
|
selection.select(autoSelect);
|
|
7108
7166
|
} else {
|
|
7109
7167
|
|
|
@@ -7130,7 +7188,7 @@
|
|
|
7130
7188
|
var shape = elementRegistry.get(event.context.shape.id);
|
|
7131
7189
|
|
|
7132
7190
|
// Always select main shape on move
|
|
7133
|
-
var isSelected = find
|
|
7191
|
+
var isSelected = find(previousSelection, function(selectedShape) {
|
|
7134
7192
|
return shape.id === selectedShape.id;
|
|
7135
7193
|
});
|
|
7136
7194
|
|
|
@@ -7309,7 +7367,7 @@
|
|
|
7309
7367
|
|
|
7310
7368
|
this._ids = ids;
|
|
7311
7369
|
|
|
7312
|
-
this._overlayDefaults = assign$
|
|
7370
|
+
this._overlayDefaults = assign$1({
|
|
7313
7371
|
|
|
7314
7372
|
// no show constraints
|
|
7315
7373
|
show: null,
|
|
@@ -7371,11 +7429,11 @@
|
|
|
7371
7429
|
*/
|
|
7372
7430
|
Overlays.prototype.get = function(search) {
|
|
7373
7431
|
|
|
7374
|
-
if (isString
|
|
7432
|
+
if (isString(search)) {
|
|
7375
7433
|
search = { id: search };
|
|
7376
7434
|
}
|
|
7377
7435
|
|
|
7378
|
-
if (isString
|
|
7436
|
+
if (isString(search.element)) {
|
|
7379
7437
|
search.element = this._elementRegistry.get(search.element);
|
|
7380
7438
|
}
|
|
7381
7439
|
|
|
@@ -7384,13 +7442,13 @@
|
|
|
7384
7442
|
|
|
7385
7443
|
// return a list of overlays when searching by element (+type)
|
|
7386
7444
|
if (container) {
|
|
7387
|
-
return search.type ? filter
|
|
7445
|
+
return search.type ? filter(container.overlays, matchPattern({ type: search.type })) : container.overlays.slice();
|
|
7388
7446
|
} else {
|
|
7389
7447
|
return [];
|
|
7390
7448
|
}
|
|
7391
7449
|
} else
|
|
7392
7450
|
if (search.type) {
|
|
7393
|
-
return filter
|
|
7451
|
+
return filter(this._overlays, matchPattern({ type: search.type }));
|
|
7394
7452
|
} else {
|
|
7395
7453
|
|
|
7396
7454
|
// return single element when searching by id
|
|
@@ -7423,7 +7481,7 @@
|
|
|
7423
7481
|
*/
|
|
7424
7482
|
Overlays.prototype.add = function(element, type, overlay) {
|
|
7425
7483
|
|
|
7426
|
-
if (isObject
|
|
7484
|
+
if (isObject(type)) {
|
|
7427
7485
|
overlay = type;
|
|
7428
7486
|
type = null;
|
|
7429
7487
|
}
|
|
@@ -7446,7 +7504,7 @@
|
|
|
7446
7504
|
|
|
7447
7505
|
var id = this._ids.next();
|
|
7448
7506
|
|
|
7449
|
-
overlay = assign$
|
|
7507
|
+
overlay = assign$1({}, this._overlayDefaults, overlay, {
|
|
7450
7508
|
id: id,
|
|
7451
7509
|
type: type,
|
|
7452
7510
|
element: element,
|
|
@@ -7470,13 +7528,13 @@
|
|
|
7470
7528
|
|
|
7471
7529
|
var overlays = this.get(filter) || [];
|
|
7472
7530
|
|
|
7473
|
-
if (!isArray$
|
|
7531
|
+
if (!isArray$2(overlays)) {
|
|
7474
7532
|
overlays = [ overlays ];
|
|
7475
7533
|
}
|
|
7476
7534
|
|
|
7477
7535
|
var self = this;
|
|
7478
7536
|
|
|
7479
|
-
forEach$
|
|
7537
|
+
forEach$1(overlays, function(overlay) {
|
|
7480
7538
|
|
|
7481
7539
|
var container = self._getOverlayContainer(overlay.element, true);
|
|
7482
7540
|
|
|
@@ -7586,7 +7644,7 @@
|
|
|
7586
7644
|
|
|
7587
7645
|
Overlays.prototype._createOverlayContainer = function(element) {
|
|
7588
7646
|
var html = domify$1('<div class="djs-overlays" />');
|
|
7589
|
-
assign
|
|
7647
|
+
assign(html, { position: 'absolute' });
|
|
7590
7648
|
|
|
7591
7649
|
this._overlayRoot.appendChild(html);
|
|
7592
7650
|
|
|
@@ -7623,7 +7681,7 @@
|
|
|
7623
7681
|
|
|
7624
7682
|
|
|
7625
7683
|
Overlays.prototype._getOverlayContainer = function(element, raw) {
|
|
7626
|
-
var container = find
|
|
7684
|
+
var container = find(this._overlayContainers, function(c) {
|
|
7627
7685
|
return c.element === element;
|
|
7628
7686
|
});
|
|
7629
7687
|
|
|
@@ -7651,14 +7709,14 @@
|
|
|
7651
7709
|
|
|
7652
7710
|
// create proper html elements from
|
|
7653
7711
|
// overlay HTML strings
|
|
7654
|
-
if (isString
|
|
7712
|
+
if (isString(html)) {
|
|
7655
7713
|
html = domify$1(html);
|
|
7656
7714
|
}
|
|
7657
7715
|
|
|
7658
7716
|
overlayContainer = this._getOverlayContainer(element);
|
|
7659
7717
|
|
|
7660
7718
|
htmlContainer = domify$1('<div class="djs-overlay" data-overlay-id="' + id + '">');
|
|
7661
|
-
assign
|
|
7719
|
+
assign(htmlContainer, { position: 'absolute' });
|
|
7662
7720
|
|
|
7663
7721
|
htmlContainer.appendChild(html);
|
|
7664
7722
|
|
|
@@ -7748,7 +7806,7 @@
|
|
|
7748
7806
|
|
|
7749
7807
|
var self = this;
|
|
7750
7808
|
|
|
7751
|
-
forEach$
|
|
7809
|
+
forEach$1(this._overlays, function(overlay) {
|
|
7752
7810
|
self._updateOverlayVisibilty(overlay, viewbox);
|
|
7753
7811
|
});
|
|
7754
7812
|
};
|
|
@@ -7785,7 +7843,7 @@
|
|
|
7785
7843
|
var element = e.element;
|
|
7786
7844
|
var overlays = self.get({ element: element });
|
|
7787
7845
|
|
|
7788
|
-
forEach$
|
|
7846
|
+
forEach$1(overlays, function(o) {
|
|
7789
7847
|
self.remove(o.id);
|
|
7790
7848
|
});
|
|
7791
7849
|
|
|
@@ -7809,7 +7867,7 @@
|
|
|
7809
7867
|
var container = self._getOverlayContainer(element, true);
|
|
7810
7868
|
|
|
7811
7869
|
if (container) {
|
|
7812
|
-
forEach$
|
|
7870
|
+
forEach$1(container.overlays, function(overlay) {
|
|
7813
7871
|
self._updateOverlay(overlay);
|
|
7814
7872
|
});
|
|
7815
7873
|
|
|
@@ -7846,7 +7904,7 @@
|
|
|
7846
7904
|
'<div class="djs-overlay-container" />'
|
|
7847
7905
|
);
|
|
7848
7906
|
|
|
7849
|
-
assign
|
|
7907
|
+
assign(root, {
|
|
7850
7908
|
position: 'absolute',
|
|
7851
7909
|
width: 0,
|
|
7852
7910
|
height: 0
|
|
@@ -7858,7 +7916,7 @@
|
|
|
7858
7916
|
}
|
|
7859
7917
|
|
|
7860
7918
|
function setPosition(el, x, y) {
|
|
7861
|
-
assign
|
|
7919
|
+
assign(el, { left: x + 'px', top: y + 'px' });
|
|
7862
7920
|
}
|
|
7863
7921
|
|
|
7864
7922
|
/**
|
|
@@ -8004,7 +8062,7 @@
|
|
|
8004
8062
|
*/
|
|
8005
8063
|
CommandInterceptor.prototype.on = function(events, hook, priority, handlerFn, unwrap, that) {
|
|
8006
8064
|
|
|
8007
|
-
if (isFunction
|
|
8065
|
+
if (isFunction(hook) || isNumber(hook)) {
|
|
8008
8066
|
that = unwrap;
|
|
8009
8067
|
unwrap = handlerFn;
|
|
8010
8068
|
handlerFn = priority;
|
|
@@ -8012,29 +8070,29 @@
|
|
|
8012
8070
|
hook = null;
|
|
8013
8071
|
}
|
|
8014
8072
|
|
|
8015
|
-
if (isFunction
|
|
8073
|
+
if (isFunction(priority)) {
|
|
8016
8074
|
that = unwrap;
|
|
8017
8075
|
unwrap = handlerFn;
|
|
8018
8076
|
handlerFn = priority;
|
|
8019
8077
|
priority = DEFAULT_PRIORITY$1;
|
|
8020
8078
|
}
|
|
8021
8079
|
|
|
8022
|
-
if (isObject
|
|
8080
|
+
if (isObject(unwrap)) {
|
|
8023
8081
|
that = unwrap;
|
|
8024
8082
|
unwrap = false;
|
|
8025
8083
|
}
|
|
8026
8084
|
|
|
8027
|
-
if (!isFunction
|
|
8085
|
+
if (!isFunction(handlerFn)) {
|
|
8028
8086
|
throw new Error('handlerFn must be a function');
|
|
8029
8087
|
}
|
|
8030
8088
|
|
|
8031
|
-
if (!isArray$
|
|
8089
|
+
if (!isArray$2(events)) {
|
|
8032
8090
|
events = [ events ];
|
|
8033
8091
|
}
|
|
8034
8092
|
|
|
8035
8093
|
var eventBus = this._eventBus;
|
|
8036
8094
|
|
|
8037
|
-
forEach$
|
|
8095
|
+
forEach$1(events, function(event) {
|
|
8038
8096
|
|
|
8039
8097
|
// concat commandStack(.event)?(.hook)?
|
|
8040
8098
|
var fullEvent = [ 'commandStack', event, hook ].filter(function(e) { return e; }).join('.');
|
|
@@ -8062,7 +8120,7 @@
|
|
|
8062
8120
|
* This will generate the CommandInterceptor#(preExecute|...|reverted) methods
|
|
8063
8121
|
* which will in term forward to CommandInterceptor#on.
|
|
8064
8122
|
*/
|
|
8065
|
-
forEach$
|
|
8123
|
+
forEach$1(hooks, function(hook) {
|
|
8066
8124
|
|
|
8067
8125
|
/**
|
|
8068
8126
|
* {canExecute|preExecute|preExecuted|execute|executed|postExecute|postExecuted|revert|reverted}
|
|
@@ -8078,7 +8136,7 @@
|
|
|
8078
8136
|
*/
|
|
8079
8137
|
CommandInterceptor.prototype[hook] = function(events, priority, handlerFn, unwrap, that) {
|
|
8080
8138
|
|
|
8081
|
-
if (isFunction
|
|
8139
|
+
if (isFunction(events) || isNumber(events)) {
|
|
8082
8140
|
that = unwrap;
|
|
8083
8141
|
unwrap = handlerFn;
|
|
8084
8142
|
handlerFn = priority;
|
|
@@ -8298,7 +8356,7 @@
|
|
|
8298
8356
|
var shape = e.element,
|
|
8299
8357
|
bo = getBusinessObject(shape);
|
|
8300
8358
|
|
|
8301
|
-
var isPresent = find
|
|
8359
|
+
var isPresent = find(boParents, function(el) {
|
|
8302
8360
|
return el === bo;
|
|
8303
8361
|
});
|
|
8304
8362
|
|
|
@@ -8921,7 +8979,7 @@
|
|
|
8921
8979
|
*
|
|
8922
8980
|
* @return {boolean}
|
|
8923
8981
|
*/
|
|
8924
|
-
function isArray
|
|
8982
|
+
function isArray(obj) {
|
|
8925
8983
|
return Array.isArray(obj);
|
|
8926
8984
|
}
|
|
8927
8985
|
|
|
@@ -8948,7 +9006,7 @@
|
|
|
8948
9006
|
*/
|
|
8949
9007
|
function annotate(...args) {
|
|
8950
9008
|
|
|
8951
|
-
if (args.length === 1 && isArray
|
|
9009
|
+
if (args.length === 1 && isArray(args[0])) {
|
|
8952
9010
|
args = args[0];
|
|
8953
9011
|
}
|
|
8954
9012
|
|
|
@@ -9089,7 +9147,7 @@
|
|
|
9089
9147
|
}
|
|
9090
9148
|
|
|
9091
9149
|
if (typeof fn !== 'function') {
|
|
9092
|
-
if (isArray
|
|
9150
|
+
if (isArray(fn)) {
|
|
9093
9151
|
fn = annotate(fn.slice());
|
|
9094
9152
|
} else {
|
|
9095
9153
|
throw error(`Cannot invoke "${ fn }". Expected a function!`);
|
|
@@ -9361,7 +9419,7 @@
|
|
|
9361
9419
|
// helpers ///////////////
|
|
9362
9420
|
|
|
9363
9421
|
function arrayUnwrap(type, value) {
|
|
9364
|
-
if (type !== 'value' && isArray
|
|
9422
|
+
if (type !== 'value' && isArray(value)) {
|
|
9365
9423
|
value = annotate(value.slice());
|
|
9366
9424
|
}
|
|
9367
9425
|
|
|
@@ -9406,9 +9464,9 @@
|
|
|
9406
9464
|
});
|
|
9407
9465
|
|
|
9408
9466
|
if (isFrameElement(element)) {
|
|
9409
|
-
attr$2(rect, assign$
|
|
9467
|
+
attr$2(rect, assign$1({}, this.FRAME_STYLE, attrs || {}));
|
|
9410
9468
|
} else {
|
|
9411
|
-
attr$2(rect, assign$
|
|
9469
|
+
attr$2(rect, assign$1({}, this.SHAPE_STYLE, attrs || {}));
|
|
9412
9470
|
}
|
|
9413
9471
|
|
|
9414
9472
|
append$1(visuals, rect);
|
|
@@ -9418,7 +9476,7 @@
|
|
|
9418
9476
|
|
|
9419
9477
|
DefaultRenderer.prototype.drawConnection = function drawConnection(visuals, connection, attrs) {
|
|
9420
9478
|
|
|
9421
|
-
var line = createLine(connection.waypoints, assign$
|
|
9479
|
+
var line = createLine(connection.waypoints, assign$1({}, this.CONNECTION_STYLE, attrs || {}));
|
|
9422
9480
|
append$1(visuals, line);
|
|
9423
9481
|
|
|
9424
9482
|
return line;
|
|
@@ -9494,7 +9552,7 @@
|
|
|
9494
9552
|
this.cls = function(className, traits, additionalAttrs) {
|
|
9495
9553
|
var attrs = this.style(traits, additionalAttrs);
|
|
9496
9554
|
|
|
9497
|
-
return assign$
|
|
9555
|
+
return assign$1(attrs, { 'class': className });
|
|
9498
9556
|
};
|
|
9499
9557
|
|
|
9500
9558
|
/**
|
|
@@ -9507,25 +9565,25 @@
|
|
|
9507
9565
|
*/
|
|
9508
9566
|
this.style = function(traits, additionalAttrs) {
|
|
9509
9567
|
|
|
9510
|
-
if (!isArray$
|
|
9568
|
+
if (!isArray$2(traits) && !additionalAttrs) {
|
|
9511
9569
|
additionalAttrs = traits;
|
|
9512
9570
|
traits = [];
|
|
9513
9571
|
}
|
|
9514
9572
|
|
|
9515
9573
|
var attrs = reduce(traits, function(attrs, t) {
|
|
9516
|
-
return assign$
|
|
9574
|
+
return assign$1(attrs, defaultTraits[t] || {});
|
|
9517
9575
|
}, {});
|
|
9518
9576
|
|
|
9519
|
-
return additionalAttrs ? assign$
|
|
9577
|
+
return additionalAttrs ? assign$1(attrs, additionalAttrs) : attrs;
|
|
9520
9578
|
};
|
|
9521
9579
|
|
|
9522
9580
|
this.computeStyle = function(custom, traits, defaultStyles) {
|
|
9523
|
-
if (!isArray$
|
|
9581
|
+
if (!isArray$2(traits)) {
|
|
9524
9582
|
defaultStyles = traits;
|
|
9525
9583
|
traits = [];
|
|
9526
9584
|
}
|
|
9527
9585
|
|
|
9528
|
-
return self.style(traits || [], assign$
|
|
9586
|
+
return self.style(traits || [], assign$1({}, defaultStyles, custom || {}));
|
|
9529
9587
|
};
|
|
9530
9588
|
}
|
|
9531
9589
|
|
|
@@ -9634,7 +9692,7 @@
|
|
|
9634
9692
|
*/
|
|
9635
9693
|
function createContainer(options) {
|
|
9636
9694
|
|
|
9637
|
-
options = assign$
|
|
9695
|
+
options = assign$1({}, { width: '100%', height: '100%' }, options);
|
|
9638
9696
|
|
|
9639
9697
|
const container = options.container || document.body;
|
|
9640
9698
|
|
|
@@ -9644,7 +9702,7 @@
|
|
|
9644
9702
|
const parent = document.createElement('div');
|
|
9645
9703
|
parent.setAttribute('class', 'djs-container');
|
|
9646
9704
|
|
|
9647
|
-
assign
|
|
9705
|
+
assign(parent, {
|
|
9648
9706
|
position: 'relative',
|
|
9649
9707
|
overflow: 'hidden',
|
|
9650
9708
|
width: ensurePx(options.width),
|
|
@@ -9746,7 +9804,7 @@
|
|
|
9746
9804
|
// debounce canvas.viewbox.changed events
|
|
9747
9805
|
// for smoother diagram interaction
|
|
9748
9806
|
if (config.deferUpdate !== false) {
|
|
9749
|
-
this._viewboxChanged = debounce(bind$
|
|
9807
|
+
this._viewboxChanged = debounce(bind$2(this._viewboxChanged, this), 300);
|
|
9750
9808
|
}
|
|
9751
9809
|
|
|
9752
9810
|
eventBus.on('diagram.init', function() {
|
|
@@ -10047,7 +10105,7 @@
|
|
|
10047
10105
|
};
|
|
10048
10106
|
|
|
10049
10107
|
Canvas.prototype._findPlaneForRoot = function(rootElement) {
|
|
10050
|
-
return find
|
|
10108
|
+
return find(this._planes, function(plane) {
|
|
10051
10109
|
return plane.rootElement === rootElement;
|
|
10052
10110
|
});
|
|
10053
10111
|
};
|
|
@@ -10080,7 +10138,7 @@
|
|
|
10080
10138
|
return;
|
|
10081
10139
|
}
|
|
10082
10140
|
|
|
10083
|
-
forEach$
|
|
10141
|
+
forEach$1([ container.gfx, container.secondaryGfx ], function(gfx) {
|
|
10084
10142
|
if (gfx) {
|
|
10085
10143
|
|
|
10086
10144
|
// invoke either addClass or removeClass based on mode
|
|
@@ -10737,7 +10795,7 @@
|
|
|
10737
10795
|
|
|
10738
10796
|
if (delta) {
|
|
10739
10797
|
this._changeViewbox(function() {
|
|
10740
|
-
delta = assign$
|
|
10798
|
+
delta = assign$1({ dx: 0, dy: 0 }, delta || {});
|
|
10741
10799
|
|
|
10742
10800
|
matrix = this._svg.createSVGMatrix().translate(delta.dx, delta.dy).multiply(matrix);
|
|
10743
10801
|
|
|
@@ -10932,7 +10990,7 @@
|
|
|
10932
10990
|
const currentScale = currentMatrix.a;
|
|
10933
10991
|
|
|
10934
10992
|
if (center) {
|
|
10935
|
-
centerPoint = assign$
|
|
10993
|
+
centerPoint = assign$1(point, center);
|
|
10936
10994
|
|
|
10937
10995
|
// revert applied viewport transformations
|
|
10938
10996
|
originalPoint = centerPoint.matrixTransform(currentMatrix.inverse());
|
|
@@ -11826,7 +11884,7 @@
|
|
|
11826
11884
|
if (!Type) {
|
|
11827
11885
|
throw new Error('unknown type: <' + type + '>');
|
|
11828
11886
|
}
|
|
11829
|
-
return assign$
|
|
11887
|
+
return assign$1(new Type(), attrs);
|
|
11830
11888
|
}
|
|
11831
11889
|
|
|
11832
11890
|
/**
|
|
@@ -11863,7 +11921,7 @@
|
|
|
11863
11921
|
*/
|
|
11864
11922
|
ElementFactory.prototype.create = function(type, attrs) {
|
|
11865
11923
|
|
|
11866
|
-
attrs = assign$
|
|
11924
|
+
attrs = assign$1({}, attrs || {});
|
|
11867
11925
|
|
|
11868
11926
|
if (!attrs.id) {
|
|
11869
11927
|
attrs.id = type + '_' + (this._uid++);
|
|
@@ -11989,9 +12047,9 @@
|
|
|
11989
12047
|
*/
|
|
11990
12048
|
EventBus.prototype.on = function(events, priority, callback, that) {
|
|
11991
12049
|
|
|
11992
|
-
events = isArray$
|
|
12050
|
+
events = isArray$2(events) ? events : [ events ];
|
|
11993
12051
|
|
|
11994
|
-
if (isFunction
|
|
12052
|
+
if (isFunction(priority)) {
|
|
11995
12053
|
that = callback;
|
|
11996
12054
|
callback = priority;
|
|
11997
12055
|
priority = DEFAULT_PRIORITY;
|
|
@@ -12004,7 +12062,7 @@
|
|
|
12004
12062
|
var actualCallback = callback;
|
|
12005
12063
|
|
|
12006
12064
|
if (that) {
|
|
12007
|
-
actualCallback = bind$
|
|
12065
|
+
actualCallback = bind$2(callback, that);
|
|
12008
12066
|
|
|
12009
12067
|
// make sure we remember and are able to remove
|
|
12010
12068
|
// bound callbacks via {@link #off} using the original
|
|
@@ -12035,7 +12093,7 @@
|
|
|
12035
12093
|
EventBus.prototype.once = function(event, priority, callback, that) {
|
|
12036
12094
|
var self = this;
|
|
12037
12095
|
|
|
12038
|
-
if (isFunction
|
|
12096
|
+
if (isFunction(priority)) {
|
|
12039
12097
|
that = callback;
|
|
12040
12098
|
callback = priority;
|
|
12041
12099
|
priority = DEFAULT_PRIORITY;
|
|
@@ -12074,7 +12132,7 @@
|
|
|
12074
12132
|
*/
|
|
12075
12133
|
EventBus.prototype.off = function(events, callback) {
|
|
12076
12134
|
|
|
12077
|
-
events = isArray$
|
|
12135
|
+
events = isArray$2(events) ? events : [ events ];
|
|
12078
12136
|
|
|
12079
12137
|
var self = this;
|
|
12080
12138
|
|
|
@@ -12369,7 +12427,7 @@
|
|
|
12369
12427
|
};
|
|
12370
12428
|
|
|
12371
12429
|
InternalEvent.prototype.init = function(data) {
|
|
12372
|
-
assign$
|
|
12430
|
+
assign$1(this, data || {});
|
|
12373
12431
|
};
|
|
12374
12432
|
|
|
12375
12433
|
|
|
@@ -12542,7 +12600,7 @@
|
|
|
12542
12600
|
|
|
12543
12601
|
// update all parents of changed and reorganized their children
|
|
12544
12602
|
// in the correct order (as indicated in our model)
|
|
12545
|
-
forEach$
|
|
12603
|
+
forEach$1(parents, function(parent) {
|
|
12546
12604
|
|
|
12547
12605
|
var children = parent.children;
|
|
12548
12606
|
|
|
@@ -12552,7 +12610,7 @@
|
|
|
12552
12610
|
|
|
12553
12611
|
var childrenGfx = self._getChildrenContainer(parent);
|
|
12554
12612
|
|
|
12555
|
-
forEach$
|
|
12613
|
+
forEach$1(children.slice().reverse(), function(child) {
|
|
12556
12614
|
var childGfx = elementRegistry.getGraphics(child);
|
|
12557
12615
|
|
|
12558
12616
|
prependTo(childGfx.parentNode, childrenGfx);
|
|
@@ -12802,193 +12860,6 @@
|
|
|
12802
12860
|
this.get('eventBus').fire('diagram.clear');
|
|
12803
12861
|
};
|
|
12804
12862
|
|
|
12805
|
-
/**
|
|
12806
|
-
* Flatten array, one level deep.
|
|
12807
|
-
*
|
|
12808
|
-
* @param {Array<?>} arr
|
|
12809
|
-
*
|
|
12810
|
-
* @return {Array<?>}
|
|
12811
|
-
*/
|
|
12812
|
-
|
|
12813
|
-
var nativeToString$2 = Object.prototype.toString;
|
|
12814
|
-
function isString$2(obj) {
|
|
12815
|
-
return nativeToString$2.call(obj) === '[object String]';
|
|
12816
|
-
}
|
|
12817
|
-
|
|
12818
|
-
function _extends$2() {
|
|
12819
|
-
_extends$2 = Object.assign || function (target) {
|
|
12820
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
12821
|
-
var source = arguments[i];
|
|
12822
|
-
|
|
12823
|
-
for (var key in source) {
|
|
12824
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12825
|
-
target[key] = source[key];
|
|
12826
|
-
}
|
|
12827
|
-
}
|
|
12828
|
-
}
|
|
12829
|
-
|
|
12830
|
-
return target;
|
|
12831
|
-
};
|
|
12832
|
-
|
|
12833
|
-
return _extends$2.apply(this, arguments);
|
|
12834
|
-
}
|
|
12835
|
-
|
|
12836
|
-
/**
|
|
12837
|
-
* Convenience wrapper for `Object.assign`.
|
|
12838
|
-
*
|
|
12839
|
-
* @param {Object} target
|
|
12840
|
-
* @param {...Object} others
|
|
12841
|
-
*
|
|
12842
|
-
* @return {Object} the target
|
|
12843
|
-
*/
|
|
12844
|
-
|
|
12845
|
-
function assign$2(target) {
|
|
12846
|
-
for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
12847
|
-
others[_key - 1] = arguments[_key];
|
|
12848
|
-
}
|
|
12849
|
-
|
|
12850
|
-
return _extends$2.apply(void 0, [target].concat(others));
|
|
12851
|
-
}
|
|
12852
|
-
|
|
12853
|
-
/**
|
|
12854
|
-
* Flatten array, one level deep.
|
|
12855
|
-
*
|
|
12856
|
-
* @param {Array<?>} arr
|
|
12857
|
-
*
|
|
12858
|
-
* @return {Array<?>}
|
|
12859
|
-
*/
|
|
12860
|
-
|
|
12861
|
-
var nativeToString$1 = Object.prototype.toString;
|
|
12862
|
-
var nativeHasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
12863
|
-
function isUndefined$2(obj) {
|
|
12864
|
-
return obj === undefined;
|
|
12865
|
-
}
|
|
12866
|
-
function isArray$1(obj) {
|
|
12867
|
-
return nativeToString$1.call(obj) === '[object Array]';
|
|
12868
|
-
}
|
|
12869
|
-
function isObject(obj) {
|
|
12870
|
-
return nativeToString$1.call(obj) === '[object Object]';
|
|
12871
|
-
}
|
|
12872
|
-
function isString$1(obj) {
|
|
12873
|
-
return nativeToString$1.call(obj) === '[object String]';
|
|
12874
|
-
}
|
|
12875
|
-
/**
|
|
12876
|
-
* Return true, if target owns a property with the given key.
|
|
12877
|
-
*
|
|
12878
|
-
* @param {Object} target
|
|
12879
|
-
* @param {String} key
|
|
12880
|
-
*
|
|
12881
|
-
* @return {Boolean}
|
|
12882
|
-
*/
|
|
12883
|
-
|
|
12884
|
-
function has$1(target, key) {
|
|
12885
|
-
return nativeHasOwnProperty$1.call(target, key);
|
|
12886
|
-
}
|
|
12887
|
-
/**
|
|
12888
|
-
* Iterate over collection; returning something
|
|
12889
|
-
* (non-undefined) will stop iteration.
|
|
12890
|
-
*
|
|
12891
|
-
* @param {Array|Object} collection
|
|
12892
|
-
* @param {Function} iterator
|
|
12893
|
-
*
|
|
12894
|
-
* @return {Object} return result that stopped the iteration
|
|
12895
|
-
*/
|
|
12896
|
-
|
|
12897
|
-
function forEach$1(collection, iterator) {
|
|
12898
|
-
var val, result;
|
|
12899
|
-
|
|
12900
|
-
if (isUndefined$2(collection)) {
|
|
12901
|
-
return;
|
|
12902
|
-
}
|
|
12903
|
-
|
|
12904
|
-
var convertKey = isArray$1(collection) ? toNum$1 : identity$1;
|
|
12905
|
-
|
|
12906
|
-
for (var key in collection) {
|
|
12907
|
-
if (has$1(collection, key)) {
|
|
12908
|
-
val = collection[key];
|
|
12909
|
-
result = iterator(val, convertKey(key));
|
|
12910
|
-
|
|
12911
|
-
if (result === false) {
|
|
12912
|
-
return val;
|
|
12913
|
-
}
|
|
12914
|
-
}
|
|
12915
|
-
}
|
|
12916
|
-
}
|
|
12917
|
-
|
|
12918
|
-
function identity$1(arg) {
|
|
12919
|
-
return arg;
|
|
12920
|
-
}
|
|
12921
|
-
|
|
12922
|
-
function toNum$1(arg) {
|
|
12923
|
-
return Number(arg);
|
|
12924
|
-
}
|
|
12925
|
-
/**
|
|
12926
|
-
* Bind function against target <this>.
|
|
12927
|
-
*
|
|
12928
|
-
* @param {Function} fn
|
|
12929
|
-
* @param {Object} target
|
|
12930
|
-
*
|
|
12931
|
-
* @return {Function} bound function
|
|
12932
|
-
*/
|
|
12933
|
-
|
|
12934
|
-
function bind(fn, target) {
|
|
12935
|
-
return fn.bind(target);
|
|
12936
|
-
}
|
|
12937
|
-
|
|
12938
|
-
function _extends$1() {
|
|
12939
|
-
_extends$1 = Object.assign || function (target) {
|
|
12940
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
12941
|
-
var source = arguments[i];
|
|
12942
|
-
|
|
12943
|
-
for (var key in source) {
|
|
12944
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12945
|
-
target[key] = source[key];
|
|
12946
|
-
}
|
|
12947
|
-
}
|
|
12948
|
-
}
|
|
12949
|
-
|
|
12950
|
-
return target;
|
|
12951
|
-
};
|
|
12952
|
-
|
|
12953
|
-
return _extends$1.apply(this, arguments);
|
|
12954
|
-
}
|
|
12955
|
-
|
|
12956
|
-
/**
|
|
12957
|
-
* Convenience wrapper for `Object.assign`.
|
|
12958
|
-
*
|
|
12959
|
-
* @param {Object} target
|
|
12960
|
-
* @param {...Object} others
|
|
12961
|
-
*
|
|
12962
|
-
* @return {Object} the target
|
|
12963
|
-
*/
|
|
12964
|
-
|
|
12965
|
-
function assign$1(target) {
|
|
12966
|
-
for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
12967
|
-
others[_key - 1] = arguments[_key];
|
|
12968
|
-
}
|
|
12969
|
-
|
|
12970
|
-
return _extends$1.apply(void 0, [target].concat(others));
|
|
12971
|
-
}
|
|
12972
|
-
/**
|
|
12973
|
-
* Pick given properties from the target object.
|
|
12974
|
-
*
|
|
12975
|
-
* @param {Object} target
|
|
12976
|
-
* @param {Array} properties
|
|
12977
|
-
*
|
|
12978
|
-
* @return {Object} target
|
|
12979
|
-
*/
|
|
12980
|
-
|
|
12981
|
-
function pick(target, properties) {
|
|
12982
|
-
var result = {};
|
|
12983
|
-
var obj = Object(target);
|
|
12984
|
-
forEach$1(properties, function (prop) {
|
|
12985
|
-
if (prop in obj) {
|
|
12986
|
-
result[prop] = target[prop];
|
|
12987
|
-
}
|
|
12988
|
-
});
|
|
12989
|
-
return result;
|
|
12990
|
-
}
|
|
12991
|
-
|
|
12992
12863
|
/**
|
|
12993
12864
|
* Moddle base element.
|
|
12994
12865
|
*/
|
|
@@ -13041,7 +12912,7 @@
|
|
|
13041
12912
|
props.define(this, '$attrs', { value: {} });
|
|
13042
12913
|
props.define(this, '$parent', { writable: true });
|
|
13043
12914
|
|
|
13044
|
-
forEach$1(attrs, bind(function(val, key) {
|
|
12915
|
+
forEach$1(attrs, bind$2(function(val, key) {
|
|
13045
12916
|
this.set(key, val);
|
|
13046
12917
|
}, this));
|
|
13047
12918
|
}
|
|
@@ -13124,6 +12995,7 @@
|
|
|
13124
12995
|
localName = name;
|
|
13125
12996
|
prefix = defaultPrefix;
|
|
13126
12997
|
} else
|
|
12998
|
+
|
|
13127
12999
|
// prefix + local name
|
|
13128
13000
|
if (parts.length === 2) {
|
|
13129
13001
|
localName = parts[1];
|
|
@@ -13330,7 +13202,7 @@
|
|
|
13330
13202
|
return;
|
|
13331
13203
|
}
|
|
13332
13204
|
|
|
13333
|
-
forEach$1(t.properties, bind(function(p) {
|
|
13205
|
+
forEach$1(t.properties, bind$2(function(p) {
|
|
13334
13206
|
|
|
13335
13207
|
// clone property to allow extensions
|
|
13336
13208
|
p = assign$1({}, p, {
|
|
@@ -13377,7 +13249,7 @@
|
|
|
13377
13249
|
|
|
13378
13250
|
this.properties = properties;
|
|
13379
13251
|
|
|
13380
|
-
forEach$1(packages, bind(this.registerPackage, this));
|
|
13252
|
+
forEach$1(packages, bind$2(this.registerPackage, this));
|
|
13381
13253
|
}
|
|
13382
13254
|
|
|
13383
13255
|
|
|
@@ -13401,7 +13273,7 @@
|
|
|
13401
13273
|
ensureAvailable(pkgMap, pkg, 'uri');
|
|
13402
13274
|
|
|
13403
13275
|
// register types
|
|
13404
|
-
forEach$1(pkg.types, bind(function(descriptor) {
|
|
13276
|
+
forEach$1(pkg.types, bind$2(function(descriptor) {
|
|
13405
13277
|
this.registerType(descriptor, pkg);
|
|
13406
13278
|
}, this));
|
|
13407
13279
|
|
|
@@ -13427,7 +13299,7 @@
|
|
|
13427
13299
|
propertiesByName = {};
|
|
13428
13300
|
|
|
13429
13301
|
// parse properties
|
|
13430
|
-
forEach$1(type.properties, bind(function(p) {
|
|
13302
|
+
forEach$1(type.properties, bind$2(function(p) {
|
|
13431
13303
|
|
|
13432
13304
|
// namespace property names
|
|
13433
13305
|
var propertyNs = parseName(p.name, ns.prefix),
|
|
@@ -13453,7 +13325,7 @@
|
|
|
13453
13325
|
propertiesByName: propertiesByName
|
|
13454
13326
|
});
|
|
13455
13327
|
|
|
13456
|
-
forEach$1(type.extends, bind(function(extendsName) {
|
|
13328
|
+
forEach$1(type.extends, bind$2(function(extendsName) {
|
|
13457
13329
|
var extended = this.typeMap[extendsName];
|
|
13458
13330
|
|
|
13459
13331
|
extended.traits = extended.traits || [];
|
|
@@ -13548,7 +13420,7 @@
|
|
|
13548
13420
|
|
|
13549
13421
|
|
|
13550
13422
|
|
|
13551
|
-
|
|
13423
|
+
// helpers ////////////////////////////
|
|
13552
13424
|
|
|
13553
13425
|
function ensureAvailable(packageMap, pkg, identifierKey) {
|
|
13554
13426
|
|
|
@@ -13579,11 +13451,16 @@
|
|
|
13579
13451
|
*/
|
|
13580
13452
|
Properties.prototype.set = function(target, name, value) {
|
|
13581
13453
|
|
|
13454
|
+
if (!isString(name) || !name.length) {
|
|
13455
|
+
throw new TypeError('property name must be a non-empty string');
|
|
13456
|
+
}
|
|
13457
|
+
|
|
13582
13458
|
var property = this.model.getPropertyDescriptor(target, name);
|
|
13583
13459
|
|
|
13584
13460
|
var propertyName = property && property.name;
|
|
13585
13461
|
|
|
13586
|
-
if (isUndefined
|
|
13462
|
+
if (isUndefined(value)) {
|
|
13463
|
+
|
|
13587
13464
|
// unset the property, if the specified value is undefined;
|
|
13588
13465
|
// delete from $attrs (for extensions) or the target itself
|
|
13589
13466
|
if (property) {
|
|
@@ -13592,6 +13469,7 @@
|
|
|
13592
13469
|
delete target.$attrs[name];
|
|
13593
13470
|
}
|
|
13594
13471
|
} else {
|
|
13472
|
+
|
|
13595
13473
|
// set the property, defining well defined properties on the fly
|
|
13596
13474
|
// or simply updating them in target.$attrs (for extensions)
|
|
13597
13475
|
if (property) {
|
|
@@ -13674,7 +13552,7 @@
|
|
|
13674
13552
|
};
|
|
13675
13553
|
|
|
13676
13554
|
|
|
13677
|
-
function isUndefined
|
|
13555
|
+
function isUndefined(val) {
|
|
13678
13556
|
return typeof val === 'undefined';
|
|
13679
13557
|
}
|
|
13680
13558
|
|
|
@@ -13687,7 +13565,7 @@
|
|
|
13687
13565
|
});
|
|
13688
13566
|
}
|
|
13689
13567
|
|
|
13690
|
-
|
|
13568
|
+
// Moddle implementation /////////////////////////////////////////////////
|
|
13691
13569
|
|
|
13692
13570
|
/**
|
|
13693
13571
|
* @class Moddle
|
|
@@ -13763,7 +13641,7 @@
|
|
|
13763
13641
|
|
|
13764
13642
|
var cache = this.typeCache;
|
|
13765
13643
|
|
|
13766
|
-
var name = isString
|
|
13644
|
+
var name = isString(descriptor) ? descriptor : descriptor.ns.name;
|
|
13767
13645
|
|
|
13768
13646
|
var type = cache[name];
|
|
13769
13647
|
|
|
@@ -13896,180 +13774,6 @@
|
|
|
13896
13774
|
return this.registry.typeMap[type];
|
|
13897
13775
|
};
|
|
13898
13776
|
|
|
13899
|
-
/**
|
|
13900
|
-
* Flatten array, one level deep.
|
|
13901
|
-
*
|
|
13902
|
-
* @param {Array<?>} arr
|
|
13903
|
-
*
|
|
13904
|
-
* @return {Array<?>}
|
|
13905
|
-
*/
|
|
13906
|
-
|
|
13907
|
-
var nativeToString = Object.prototype.toString;
|
|
13908
|
-
var nativeHasOwnProperty = Object.prototype.hasOwnProperty;
|
|
13909
|
-
function isUndefined(obj) {
|
|
13910
|
-
return obj === undefined;
|
|
13911
|
-
}
|
|
13912
|
-
function isArray(obj) {
|
|
13913
|
-
return nativeToString.call(obj) === '[object Array]';
|
|
13914
|
-
}
|
|
13915
|
-
function isFunction(obj) {
|
|
13916
|
-
var tag = nativeToString.call(obj);
|
|
13917
|
-
return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object AsyncGeneratorFunction]' || tag === '[object Proxy]';
|
|
13918
|
-
}
|
|
13919
|
-
function isString(obj) {
|
|
13920
|
-
return nativeToString.call(obj) === '[object String]';
|
|
13921
|
-
}
|
|
13922
|
-
/**
|
|
13923
|
-
* Return true, if target owns a property with the given key.
|
|
13924
|
-
*
|
|
13925
|
-
* @param {Object} target
|
|
13926
|
-
* @param {String} key
|
|
13927
|
-
*
|
|
13928
|
-
* @return {Boolean}
|
|
13929
|
-
*/
|
|
13930
|
-
|
|
13931
|
-
function has(target, key) {
|
|
13932
|
-
return nativeHasOwnProperty.call(target, key);
|
|
13933
|
-
}
|
|
13934
|
-
|
|
13935
|
-
/**
|
|
13936
|
-
* Find element in collection.
|
|
13937
|
-
*
|
|
13938
|
-
* @param {Array|Object} collection
|
|
13939
|
-
* @param {Function|Object} matcher
|
|
13940
|
-
*
|
|
13941
|
-
* @return {Object}
|
|
13942
|
-
*/
|
|
13943
|
-
|
|
13944
|
-
function find(collection, matcher) {
|
|
13945
|
-
matcher = toMatcher(matcher);
|
|
13946
|
-
var match;
|
|
13947
|
-
forEach(collection, function (val, key) {
|
|
13948
|
-
if (matcher(val, key)) {
|
|
13949
|
-
match = val;
|
|
13950
|
-
return false;
|
|
13951
|
-
}
|
|
13952
|
-
});
|
|
13953
|
-
return match;
|
|
13954
|
-
}
|
|
13955
|
-
/**
|
|
13956
|
-
* Find element index in collection.
|
|
13957
|
-
*
|
|
13958
|
-
* @param {Array|Object} collection
|
|
13959
|
-
* @param {Function} matcher
|
|
13960
|
-
*
|
|
13961
|
-
* @return {Object}
|
|
13962
|
-
*/
|
|
13963
|
-
|
|
13964
|
-
function findIndex(collection, matcher) {
|
|
13965
|
-
matcher = toMatcher(matcher);
|
|
13966
|
-
var idx = isArray(collection) ? -1 : undefined;
|
|
13967
|
-
forEach(collection, function (val, key) {
|
|
13968
|
-
if (matcher(val, key)) {
|
|
13969
|
-
idx = key;
|
|
13970
|
-
return false;
|
|
13971
|
-
}
|
|
13972
|
-
});
|
|
13973
|
-
return idx;
|
|
13974
|
-
}
|
|
13975
|
-
/**
|
|
13976
|
-
* Find element in collection.
|
|
13977
|
-
*
|
|
13978
|
-
* @param {Array|Object} collection
|
|
13979
|
-
* @param {Function} matcher
|
|
13980
|
-
*
|
|
13981
|
-
* @return {Array} result
|
|
13982
|
-
*/
|
|
13983
|
-
|
|
13984
|
-
function filter(collection, matcher) {
|
|
13985
|
-
var result = [];
|
|
13986
|
-
forEach(collection, function (val, key) {
|
|
13987
|
-
if (matcher(val, key)) {
|
|
13988
|
-
result.push(val);
|
|
13989
|
-
}
|
|
13990
|
-
});
|
|
13991
|
-
return result;
|
|
13992
|
-
}
|
|
13993
|
-
/**
|
|
13994
|
-
* Iterate over collection; returning something
|
|
13995
|
-
* (non-undefined) will stop iteration.
|
|
13996
|
-
*
|
|
13997
|
-
* @param {Array|Object} collection
|
|
13998
|
-
* @param {Function} iterator
|
|
13999
|
-
*
|
|
14000
|
-
* @return {Object} return result that stopped the iteration
|
|
14001
|
-
*/
|
|
14002
|
-
|
|
14003
|
-
function forEach(collection, iterator) {
|
|
14004
|
-
var val, result;
|
|
14005
|
-
|
|
14006
|
-
if (isUndefined(collection)) {
|
|
14007
|
-
return;
|
|
14008
|
-
}
|
|
14009
|
-
|
|
14010
|
-
var convertKey = isArray(collection) ? toNum : identity;
|
|
14011
|
-
|
|
14012
|
-
for (var key in collection) {
|
|
14013
|
-
if (has(collection, key)) {
|
|
14014
|
-
val = collection[key];
|
|
14015
|
-
result = iterator(val, convertKey(key));
|
|
14016
|
-
|
|
14017
|
-
if (result === false) {
|
|
14018
|
-
return val;
|
|
14019
|
-
}
|
|
14020
|
-
}
|
|
14021
|
-
}
|
|
14022
|
-
}
|
|
14023
|
-
|
|
14024
|
-
function toMatcher(matcher) {
|
|
14025
|
-
return isFunction(matcher) ? matcher : function (e) {
|
|
14026
|
-
return e === matcher;
|
|
14027
|
-
};
|
|
14028
|
-
}
|
|
14029
|
-
|
|
14030
|
-
function identity(arg) {
|
|
14031
|
-
return arg;
|
|
14032
|
-
}
|
|
14033
|
-
|
|
14034
|
-
function toNum(arg) {
|
|
14035
|
-
return Number(arg);
|
|
14036
|
-
}
|
|
14037
|
-
|
|
14038
|
-
function _extends() {
|
|
14039
|
-
_extends = Object.assign || function (target) {
|
|
14040
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
14041
|
-
var source = arguments[i];
|
|
14042
|
-
|
|
14043
|
-
for (var key in source) {
|
|
14044
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
14045
|
-
target[key] = source[key];
|
|
14046
|
-
}
|
|
14047
|
-
}
|
|
14048
|
-
}
|
|
14049
|
-
|
|
14050
|
-
return target;
|
|
14051
|
-
};
|
|
14052
|
-
|
|
14053
|
-
return _extends.apply(this, arguments);
|
|
14054
|
-
}
|
|
14055
|
-
|
|
14056
|
-
/**
|
|
14057
|
-
* Convenience wrapper for `Object.assign`.
|
|
14058
|
-
*
|
|
14059
|
-
* @param {Object} target
|
|
14060
|
-
* @param {...Object} others
|
|
14061
|
-
*
|
|
14062
|
-
* @return {Object} the target
|
|
14063
|
-
*/
|
|
14064
|
-
|
|
14065
|
-
function assign(target) {
|
|
14066
|
-
for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
14067
|
-
others[_key - 1] = arguments[_key];
|
|
14068
|
-
}
|
|
14069
|
-
|
|
14070
|
-
return _extends.apply(void 0, [target].concat(others));
|
|
14071
|
-
}
|
|
14072
|
-
|
|
14073
13777
|
var fromCharCode = String.fromCharCode;
|
|
14074
13778
|
|
|
14075
13779
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
@@ -15244,7 +14948,7 @@
|
|
|
15244
14948
|
* @property {Boolean} lax
|
|
15245
14949
|
*/
|
|
15246
14950
|
|
|
15247
|
-
assign(this, options);
|
|
14951
|
+
assign$1(this, options);
|
|
15248
14952
|
|
|
15249
14953
|
this.elementsById = {};
|
|
15250
14954
|
this.references = [];
|
|
@@ -15465,7 +15169,7 @@
|
|
|
15465
15169
|
model = this.model,
|
|
15466
15170
|
propNameNs;
|
|
15467
15171
|
|
|
15468
|
-
forEach(attributes, function(value, name) {
|
|
15172
|
+
forEach$1(attributes, function(value, name) {
|
|
15469
15173
|
|
|
15470
15174
|
var prop = descriptor.propertiesByName[name],
|
|
15471
15175
|
values;
|
|
@@ -15483,7 +15187,7 @@
|
|
|
15483
15187
|
// IDREFS: parse references as whitespace-separated list
|
|
15484
15188
|
values = value.split(' ');
|
|
15485
15189
|
|
|
15486
|
-
forEach(values, function(v) {
|
|
15190
|
+
forEach$1(values, function(v) {
|
|
15487
15191
|
context.addReference({
|
|
15488
15192
|
element: instance,
|
|
15489
15193
|
property: prop.ns.name,
|
|
@@ -15550,7 +15254,7 @@
|
|
|
15550
15254
|
|
|
15551
15255
|
elementType = model.getType(elementTypeName);
|
|
15552
15256
|
|
|
15553
|
-
return assign({}, property, {
|
|
15257
|
+
return assign$1({}, property, {
|
|
15554
15258
|
effectiveType: getModdleDescriptor(elementType).name
|
|
15555
15259
|
});
|
|
15556
15260
|
}
|
|
@@ -15572,7 +15276,7 @@
|
|
|
15572
15276
|
});
|
|
15573
15277
|
|
|
15574
15278
|
if (property) {
|
|
15575
|
-
return assign({}, property, {
|
|
15279
|
+
return assign$1({}, property, {
|
|
15576
15280
|
effectiveType: getModdleDescriptor(elementType).name
|
|
15577
15281
|
});
|
|
15578
15282
|
}
|
|
@@ -15647,7 +15351,7 @@
|
|
|
15647
15351
|
}
|
|
15648
15352
|
|
|
15649
15353
|
if (propertyDesc.isReference) {
|
|
15650
|
-
assign(newElement, {
|
|
15354
|
+
assign$1(newElement, {
|
|
15651
15355
|
element: element
|
|
15652
15356
|
});
|
|
15653
15357
|
|
|
@@ -15756,7 +15460,7 @@
|
|
|
15756
15460
|
};
|
|
15757
15461
|
}
|
|
15758
15462
|
|
|
15759
|
-
assign(this, { lax: false }, options);
|
|
15463
|
+
assign$1(this, { lax: false }, options);
|
|
15760
15464
|
}
|
|
15761
15465
|
|
|
15762
15466
|
/**
|
|
@@ -15811,7 +15515,7 @@
|
|
|
15811
15515
|
var model = this.model,
|
|
15812
15516
|
lax = this.lax;
|
|
15813
15517
|
|
|
15814
|
-
var context = new Context(assign({}, options, { rootHandler: rootHandler })),
|
|
15518
|
+
var context = new Context(assign$1({}, options, { rootHandler: rootHandler })),
|
|
15815
15519
|
parser = new Parser({ proxy: true }),
|
|
15816
15520
|
stack = createStack();
|
|
15817
15521
|
|
|
@@ -16206,14 +15910,14 @@
|
|
|
16206
15910
|
|
|
16207
15911
|
function getElementNs(ns, descriptor) {
|
|
16208
15912
|
if (descriptor.isGeneric) {
|
|
16209
|
-
return assign({ localName: descriptor.ns.localName }, ns);
|
|
15913
|
+
return assign$1({ localName: descriptor.ns.localName }, ns);
|
|
16210
15914
|
} else {
|
|
16211
|
-
return assign({ localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg) }, ns);
|
|
15915
|
+
return assign$1({ localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg) }, ns);
|
|
16212
15916
|
}
|
|
16213
15917
|
}
|
|
16214
15918
|
|
|
16215
15919
|
function getPropertyNs(ns, descriptor) {
|
|
16216
|
-
return assign({ localName: descriptor.ns.localName }, ns);
|
|
15920
|
+
return assign$1({ localName: descriptor.ns.localName }, ns);
|
|
16217
15921
|
}
|
|
16218
15922
|
|
|
16219
15923
|
function getSerializableProperties(element) {
|
|
@@ -16227,7 +15931,7 @@
|
|
|
16227
15931
|
}
|
|
16228
15932
|
|
|
16229
15933
|
// do not serialize defaults
|
|
16230
|
-
if (!has(element, name)) {
|
|
15934
|
+
if (!has$1(element, name)) {
|
|
16231
15935
|
return false;
|
|
16232
15936
|
}
|
|
16233
15937
|
|
|
@@ -16445,7 +16149,7 @@
|
|
|
16445
16149
|
if (this.isLocalNs(effectiveNs)) {
|
|
16446
16150
|
return { localName: ns.localName };
|
|
16447
16151
|
} else {
|
|
16448
|
-
return assign({ localName: ns.localName }, effectiveNs);
|
|
16152
|
+
return assign$1({ localName: ns.localName }, effectiveNs);
|
|
16449
16153
|
}
|
|
16450
16154
|
};
|
|
16451
16155
|
|
|
@@ -16456,7 +16160,7 @@
|
|
|
16456
16160
|
|
|
16457
16161
|
var attributes = [];
|
|
16458
16162
|
|
|
16459
|
-
forEach(element, function(val, key) {
|
|
16163
|
+
forEach$1(element, function(val, key) {
|
|
16460
16164
|
|
|
16461
16165
|
var nonNsAttr;
|
|
16462
16166
|
|
|
@@ -16464,7 +16168,7 @@
|
|
|
16464
16168
|
body.push(new BodySerializer().build({ type: 'String' }, val));
|
|
16465
16169
|
} else
|
|
16466
16170
|
if (key === '$children') {
|
|
16467
|
-
forEach(val, function(child) {
|
|
16171
|
+
forEach$1(val, function(child) {
|
|
16468
16172
|
body.push(new ElementSerializer(self).build(child));
|
|
16469
16173
|
});
|
|
16470
16174
|
} else
|
|
@@ -16534,7 +16238,7 @@
|
|
|
16534
16238
|
// parse namespace attributes first
|
|
16535
16239
|
// and log them. push non namespace attributes to a list
|
|
16536
16240
|
// and process them later
|
|
16537
|
-
forEach(genericAttrs, function(value, name) {
|
|
16241
|
+
forEach$1(genericAttrs, function(value, name) {
|
|
16538
16242
|
|
|
16539
16243
|
var nonNsAttr = self.parseNsAttribute(element, name, value);
|
|
16540
16244
|
|
|
@@ -16550,7 +16254,7 @@
|
|
|
16550
16254
|
|
|
16551
16255
|
var self = this;
|
|
16552
16256
|
|
|
16553
|
-
forEach(attributes, function(attr) {
|
|
16257
|
+
forEach$1(attributes, function(attr) {
|
|
16554
16258
|
|
|
16555
16259
|
// do not serialize xsi:type attribute
|
|
16556
16260
|
// it is set manually based on the actual implementation type
|
|
@@ -16561,6 +16265,8 @@
|
|
|
16561
16265
|
try {
|
|
16562
16266
|
self.addAttribute(self.nsAttributeName(attr.name), attr.value);
|
|
16563
16267
|
} catch (e) {
|
|
16268
|
+
/* global console */
|
|
16269
|
+
|
|
16564
16270
|
console.warn(
|
|
16565
16271
|
'missing namespace information for ',
|
|
16566
16272
|
attr.name, '=', attr.value, 'on', element,
|
|
@@ -16575,7 +16281,7 @@
|
|
|
16575
16281
|
body = this.body,
|
|
16576
16282
|
element = this.element;
|
|
16577
16283
|
|
|
16578
|
-
forEach(properties, function(p) {
|
|
16284
|
+
forEach$1(properties, function(p) {
|
|
16579
16285
|
var value = element.get(p.name),
|
|
16580
16286
|
isReference = p.isReference,
|
|
16581
16287
|
isMany = p.isMany;
|
|
@@ -16588,12 +16294,12 @@
|
|
|
16588
16294
|
body.push(new BodySerializer().build(p, value[0]));
|
|
16589
16295
|
} else
|
|
16590
16296
|
if (isSimple(p.type)) {
|
|
16591
|
-
forEach(value, function(v) {
|
|
16297
|
+
forEach$1(value, function(v) {
|
|
16592
16298
|
body.push(new ValueSerializer(self.addTagName(self.nsPropertyTagName(p))).build(p, v));
|
|
16593
16299
|
});
|
|
16594
16300
|
} else
|
|
16595
16301
|
if (isReference) {
|
|
16596
|
-
forEach(value, function(v) {
|
|
16302
|
+
forEach$1(value, function(v) {
|
|
16597
16303
|
body.push(new ReferenceSerializer(self.addTagName(self.nsPropertyTagName(p))).build(v));
|
|
16598
16304
|
});
|
|
16599
16305
|
} else {
|
|
@@ -16603,7 +16309,7 @@
|
|
|
16603
16309
|
var asType = serializeAsType(p),
|
|
16604
16310
|
asProperty = serializeAsProperty(p);
|
|
16605
16311
|
|
|
16606
|
-
forEach(value, function(v) {
|
|
16312
|
+
forEach$1(value, function(v) {
|
|
16607
16313
|
var serializer;
|
|
16608
16314
|
|
|
16609
16315
|
if (asType) {
|
|
@@ -16711,7 +16417,7 @@
|
|
|
16711
16417
|
var self = this,
|
|
16712
16418
|
element = this.element;
|
|
16713
16419
|
|
|
16714
|
-
forEach(properties, function(p) {
|
|
16420
|
+
forEach$1(properties, function(p) {
|
|
16715
16421
|
|
|
16716
16422
|
var value = element.get(p.name);
|
|
16717
16423
|
|
|
@@ -16722,7 +16428,7 @@
|
|
|
16722
16428
|
}
|
|
16723
16429
|
else {
|
|
16724
16430
|
var values = [];
|
|
16725
|
-
forEach(value, function(v) {
|
|
16431
|
+
forEach$1(value, function(v) {
|
|
16726
16432
|
values.push(v.id);
|
|
16727
16433
|
});
|
|
16728
16434
|
|
|
@@ -16778,7 +16484,7 @@
|
|
|
16778
16484
|
attrs = getNsAttrs(namespaces).concat(attrs);
|
|
16779
16485
|
}
|
|
16780
16486
|
|
|
16781
|
-
forEach(attrs, function(a) {
|
|
16487
|
+
forEach$1(attrs, function(a) {
|
|
16782
16488
|
writer
|
|
16783
16489
|
.append(' ')
|
|
16784
16490
|
.append(nsName(a.name)).append('="').append(a.value).append('"');
|
|
@@ -16805,7 +16511,7 @@
|
|
|
16805
16511
|
.indent();
|
|
16806
16512
|
}
|
|
16807
16513
|
|
|
16808
|
-
forEach(this.body, function(b) {
|
|
16514
|
+
forEach$1(this.body, function(b) {
|
|
16809
16515
|
b.serializeTo(writer);
|
|
16810
16516
|
});
|
|
16811
16517
|
|
|
@@ -16873,7 +16579,7 @@
|
|
|
16873
16579
|
|
|
16874
16580
|
function FormatingWriter(out, format) {
|
|
16875
16581
|
|
|
16876
|
-
var indent = [''];
|
|
16582
|
+
var indent = [ '' ];
|
|
16877
16583
|
|
|
16878
16584
|
this.append = function(str) {
|
|
16879
16585
|
out.write(str);
|
|
@@ -16915,7 +16621,7 @@
|
|
|
16915
16621
|
*/
|
|
16916
16622
|
function Writer(options) {
|
|
16917
16623
|
|
|
16918
|
-
options = assign({ format: false, preamble: true }, options || {});
|
|
16624
|
+
options = assign$1({ format: false, preamble: true }, options || {});
|
|
16919
16625
|
|
|
16920
16626
|
function toXML(tree, writer) {
|
|
16921
16627
|
var internalWriter = writer || new SavingWriter();
|
|
@@ -16982,12 +16688,12 @@
|
|
|
16982
16688
|
*/
|
|
16983
16689
|
BpmnModdle.prototype.fromXML = function(xmlStr, typeName, options) {
|
|
16984
16690
|
|
|
16985
|
-
if (!isString
|
|
16691
|
+
if (!isString(typeName)) {
|
|
16986
16692
|
options = typeName;
|
|
16987
16693
|
typeName = 'bpmn:Definitions';
|
|
16988
16694
|
}
|
|
16989
16695
|
|
|
16990
|
-
var reader = new Reader(assign$
|
|
16696
|
+
var reader = new Reader(assign$1({ model: this, lax: true }, options));
|
|
16991
16697
|
var rootHandler = reader.handler(typeName);
|
|
16992
16698
|
|
|
16993
16699
|
return reader.fromXML(xmlStr, rootHandler);
|
|
@@ -20674,7 +20380,7 @@
|
|
|
20674
20380
|
};
|
|
20675
20381
|
|
|
20676
20382
|
function simple(additionalPackages, options) {
|
|
20677
|
-
var pks = assign$
|
|
20383
|
+
var pks = assign$1({}, packages, additionalPackages);
|
|
20678
20384
|
|
|
20679
20385
|
return new BpmnModdle(pks, options);
|
|
20680
20386
|
}
|
|
@@ -20698,7 +20404,7 @@
|
|
|
20698
20404
|
}
|
|
20699
20405
|
|
|
20700
20406
|
var argLen = arguments.length;
|
|
20701
|
-
if (argLen >= 1 && isFunction
|
|
20407
|
+
if (argLen >= 1 && isFunction(arguments[argLen - 1])) {
|
|
20702
20408
|
|
|
20703
20409
|
var callback = arguments[argLen - 1];
|
|
20704
20410
|
|
|
@@ -20739,7 +20445,7 @@
|
|
|
20739
20445
|
function ensureCompatDiRef(businessObject) {
|
|
20740
20446
|
|
|
20741
20447
|
// bpmnElement can have multiple independent DIs
|
|
20742
|
-
if (!has$
|
|
20448
|
+
if (!has$1(businessObject, 'di')) {
|
|
20743
20449
|
Object.defineProperty(businessObject, 'di', {
|
|
20744
20450
|
enumerable: false,
|
|
20745
20451
|
get: function() {
|
|
@@ -20767,7 +20473,7 @@
|
|
|
20767
20473
|
* correctly specify one.
|
|
20768
20474
|
*/
|
|
20769
20475
|
function findDisplayCandidate(definitions) {
|
|
20770
|
-
return find
|
|
20476
|
+
return find(definitions.rootElements, function(e) {
|
|
20771
20477
|
return is(e, 'bpmn:Process') || is(e, 'bpmn:Collaboration');
|
|
20772
20478
|
});
|
|
20773
20479
|
}
|
|
@@ -20874,7 +20580,7 @@
|
|
|
20874
20580
|
function handlePlane(plane) {
|
|
20875
20581
|
registerDi(plane);
|
|
20876
20582
|
|
|
20877
|
-
forEach$
|
|
20583
|
+
forEach$1(plane.planeElement, handlePlaneElement);
|
|
20878
20584
|
}
|
|
20879
20585
|
|
|
20880
20586
|
function handlePlaneElement(planeElement) {
|
|
@@ -20999,7 +20705,7 @@
|
|
|
20999
20705
|
// walk through all processes that have not yet been drawn and draw them
|
|
21000
20706
|
// if they contain lanes with DI information.
|
|
21001
20707
|
// we do this to pass the free-floating lane test cases in the MIWG test suite
|
|
21002
|
-
var processes = filter
|
|
20708
|
+
var processes = filter(rootElements, function(e) {
|
|
21003
20709
|
return !isHandled(e) && is(e, 'bpmn:Process') && e.laneSets;
|
|
21004
20710
|
});
|
|
21005
20711
|
|
|
@@ -21011,7 +20717,7 @@
|
|
|
21011
20717
|
}
|
|
21012
20718
|
|
|
21013
20719
|
function handleMessageFlows(messageFlows, context) {
|
|
21014
|
-
forEach$
|
|
20720
|
+
forEach$1(messageFlows, contextual(handleMessageFlow, context));
|
|
21015
20721
|
}
|
|
21016
20722
|
|
|
21017
20723
|
function handleDataAssociation(association, context) {
|
|
@@ -21037,7 +20743,7 @@
|
|
|
21037
20743
|
|
|
21038
20744
|
function handleArtifacts(artifacts, context) {
|
|
21039
20745
|
|
|
21040
|
-
forEach$
|
|
20746
|
+
forEach$1(artifacts, function(e) {
|
|
21041
20747
|
if (is(e, 'bpmn:Association')) {
|
|
21042
20748
|
deferred.push(function() {
|
|
21043
20749
|
handleArtifact(e, context);
|
|
@@ -21054,8 +20760,8 @@
|
|
|
21054
20760
|
return;
|
|
21055
20761
|
}
|
|
21056
20762
|
|
|
21057
|
-
forEach$
|
|
21058
|
-
forEach$
|
|
20763
|
+
forEach$1(ioSpecification.dataInputs, contextual(handleDataInput, context));
|
|
20764
|
+
forEach$1(ioSpecification.dataOutputs, contextual(handleDataOutput, context));
|
|
21059
20765
|
}
|
|
21060
20766
|
|
|
21061
20767
|
function handleSubProcess(subProcess, context) {
|
|
@@ -21082,8 +20788,8 @@
|
|
|
21082
20788
|
// * bpmn:CatchEvent
|
|
21083
20789
|
//
|
|
21084
20790
|
deferred.push(function() {
|
|
21085
|
-
forEach$
|
|
21086
|
-
forEach$
|
|
20791
|
+
forEach$1(flowNode.dataInputAssociations, contextual(handleDataAssociation, context));
|
|
20792
|
+
forEach$1(flowNode.dataOutputAssociations, contextual(handleDataAssociation, context));
|
|
21087
20793
|
});
|
|
21088
20794
|
}
|
|
21089
20795
|
|
|
@@ -21110,11 +20816,11 @@
|
|
|
21110
20816
|
}
|
|
21111
20817
|
|
|
21112
20818
|
function handleLaneSet(laneSet, context) {
|
|
21113
|
-
forEach$
|
|
20819
|
+
forEach$1(laneSet.lanes, contextual(handleLane, context));
|
|
21114
20820
|
}
|
|
21115
20821
|
|
|
21116
20822
|
function handleLaneSets(laneSets, context) {
|
|
21117
|
-
forEach$
|
|
20823
|
+
forEach$1(laneSets, contextual(handleLaneSet, context));
|
|
21118
20824
|
}
|
|
21119
20825
|
|
|
21120
20826
|
function handleFlowElementsContainer(container, context) {
|
|
@@ -21126,7 +20832,7 @@
|
|
|
21126
20832
|
}
|
|
21127
20833
|
|
|
21128
20834
|
function handleFlowElements(flowElements, context) {
|
|
21129
|
-
forEach$
|
|
20835
|
+
forEach$1(flowElements, function(e) {
|
|
21130
20836
|
if (is(e, 'bpmn:SequenceFlow')) {
|
|
21131
20837
|
deferred.push(function() {
|
|
21132
20838
|
handleSequenceFlow(e, context);
|
|
@@ -21164,7 +20870,7 @@
|
|
|
21164
20870
|
|
|
21165
20871
|
function handleCollaboration(collaboration, context) {
|
|
21166
20872
|
|
|
21167
|
-
forEach$
|
|
20873
|
+
forEach$1(collaboration.participants, contextual(handleParticipant, context));
|
|
21168
20874
|
|
|
21169
20875
|
handleArtifacts(collaboration.artifacts, context);
|
|
21170
20876
|
|
|
@@ -21178,7 +20884,7 @@
|
|
|
21178
20884
|
function wireFlowNodeRefs(lane) {
|
|
21179
20885
|
|
|
21180
20886
|
// wire the virtual flowNodeRefs <-> relationship
|
|
21181
|
-
forEach$
|
|
20887
|
+
forEach$1(lane.flowNodeRef, function(flowNode) {
|
|
21182
20888
|
var lanes = flowNode.get('lanes');
|
|
21183
20889
|
|
|
21184
20890
|
if (lanes) {
|
|
@@ -21272,7 +20978,7 @@
|
|
|
21272
20978
|
|
|
21273
20979
|
// traverse BPMN 2.0 document model,
|
|
21274
20980
|
// starting at definitions
|
|
21275
|
-
forEach$
|
|
20981
|
+
forEach$1(diagramsToImport, function(diagram) {
|
|
21276
20982
|
walker.handleDefinitions(definitions, diagram);
|
|
21277
20983
|
});
|
|
21278
20984
|
|
|
@@ -21339,12 +21045,12 @@
|
|
|
21339
21045
|
if (is$1(rootElement, 'bpmn:Collaboration')) {
|
|
21340
21046
|
collaboration = rootElement;
|
|
21341
21047
|
} else {
|
|
21342
|
-
collaboration = find
|
|
21048
|
+
collaboration = find(definitions.rootElements, function(element) {
|
|
21343
21049
|
if (!is$1(element, 'bpmn:Collaboration')) {
|
|
21344
21050
|
return;
|
|
21345
21051
|
}
|
|
21346
21052
|
|
|
21347
|
-
return find
|
|
21053
|
+
return find(element.participants, function(participant) {
|
|
21348
21054
|
return participant.processRef === rootElement;
|
|
21349
21055
|
});
|
|
21350
21056
|
});
|
|
@@ -21368,7 +21074,7 @@
|
|
|
21368
21074
|
var diagramsToImport = [ bpmnDiagram ];
|
|
21369
21075
|
var handledElements = [ bpmnElement ];
|
|
21370
21076
|
|
|
21371
|
-
forEach$
|
|
21077
|
+
forEach$1(definitions.diagrams, function(diagram) {
|
|
21372
21078
|
var businessObject = diagram.plane.bpmnElement;
|
|
21373
21079
|
|
|
21374
21080
|
if (
|
|
@@ -21387,7 +21093,7 @@
|
|
|
21387
21093
|
function selfAndAllFlowElements(elements) {
|
|
21388
21094
|
var result = [];
|
|
21389
21095
|
|
|
21390
|
-
forEach$
|
|
21096
|
+
forEach$1(elements, function(element) {
|
|
21391
21097
|
if (!element) {
|
|
21392
21098
|
return;
|
|
21393
21099
|
}
|
|
@@ -21482,11 +21188,11 @@
|
|
|
21482
21188
|
function createLightbox() {
|
|
21483
21189
|
lightbox = domify$1(LIGHTBOX_MARKUP);
|
|
21484
21190
|
|
|
21485
|
-
assign
|
|
21486
|
-
assign
|
|
21487
|
-
assign
|
|
21488
|
-
assign
|
|
21489
|
-
assign
|
|
21191
|
+
assign(lightbox, LIGHTBOX_STYLES);
|
|
21192
|
+
assign(query('svg', lightbox), LOGO_STYLES);
|
|
21193
|
+
assign(query('.backdrop', lightbox), BACKDROP_STYLES);
|
|
21194
|
+
assign(query('.notice', lightbox), NOTICE_STYLES);
|
|
21195
|
+
assign(query('.link', lightbox), LINK_STYLES, {
|
|
21490
21196
|
'margin': '15px 20px 15px 10px',
|
|
21491
21197
|
'alignSelf': 'center'
|
|
21492
21198
|
});
|
|
@@ -21528,7 +21234,7 @@
|
|
|
21528
21234
|
*/
|
|
21529
21235
|
function BaseViewer(options) {
|
|
21530
21236
|
|
|
21531
|
-
options = assign$
|
|
21237
|
+
options = assign$1({}, DEFAULT_OPTIONS, options);
|
|
21532
21238
|
|
|
21533
21239
|
this._moddle = this._createModdle(options);
|
|
21534
21240
|
|
|
@@ -22070,8 +21776,8 @@
|
|
|
22070
21776
|
|
|
22071
21777
|
const diagramModules = [].concat(staticModules, baseModules, additionalModules);
|
|
22072
21778
|
|
|
22073
|
-
const diagramOptions = assign$
|
|
22074
|
-
canvas: assign$
|
|
21779
|
+
const diagramOptions = assign$1(omit(options, [ 'additionalModules' ]), {
|
|
21780
|
+
canvas: assign$1({}, options.canvas, { container: container }),
|
|
22075
21781
|
modules: diagramModules
|
|
22076
21782
|
});
|
|
22077
21783
|
|
|
@@ -22099,7 +21805,7 @@
|
|
|
22099
21805
|
|
|
22100
21806
|
const container = domify$1('<div class="bjs-container"></div>');
|
|
22101
21807
|
|
|
22102
|
-
assign
|
|
21808
|
+
assign(container, {
|
|
22103
21809
|
width: ensureUnit(options.width),
|
|
22104
21810
|
height: ensureUnit(options.height),
|
|
22105
21811
|
position: options.position
|
|
@@ -22109,7 +21815,7 @@
|
|
|
22109
21815
|
};
|
|
22110
21816
|
|
|
22111
21817
|
BaseViewer.prototype._createModdle = function(options) {
|
|
22112
|
-
const moddleOptions = assign$
|
|
21818
|
+
const moddleOptions = assign$1({}, this._moddleExtensions, options.moddleExtensions);
|
|
22113
21819
|
|
|
22114
21820
|
return new simple(moddleOptions);
|
|
22115
21821
|
};
|
|
@@ -22168,7 +21874,7 @@
|
|
|
22168
21874
|
return null;
|
|
22169
21875
|
}
|
|
22170
21876
|
|
|
22171
|
-
return find
|
|
21877
|
+
return find(definitions.diagrams, function(element) {
|
|
22172
21878
|
return element.id === diagramId;
|
|
22173
21879
|
}) || null;
|
|
22174
21880
|
}
|
|
@@ -22195,8 +21901,8 @@
|
|
|
22195
21901
|
|
|
22196
21902
|
const linkElement = domify$1(linkMarkup);
|
|
22197
21903
|
|
|
22198
|
-
assign
|
|
22199
|
-
assign
|
|
21904
|
+
assign(query('svg', linkElement), LOGO_STYLES);
|
|
21905
|
+
assign(linkElement, LINK_STYLES, {
|
|
22200
21906
|
position: 'absolute',
|
|
22201
21907
|
bottom: '15px',
|
|
22202
21908
|
right: '15px',
|