bpmn-js 10.1.0 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bpmn-modeler.development.js +674 -1026
- package/dist/bpmn-modeler.production.min.js +8 -8
- package/dist/bpmn-navigated-viewer.development.js +286 -588
- package/dist/bpmn-navigated-viewer.production.min.js +6 -6
- package/dist/bpmn-viewer.development.js +282 -584
- package/dist/bpmn-viewer.production.min.js +6 -6
- package/package.json +5 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* bpmn-js - bpmn-viewer v10.
|
|
2
|
+
* bpmn-js - bpmn-viewer v10.2.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2014-present, camunda Services GmbH
|
|
5
5
|
*
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* Source Code: https://github.com/bpmn-io/bpmn-js
|
|
10
10
|
*
|
|
11
|
-
* Date: 2022-
|
|
11
|
+
* Date: 2022-10-02
|
|
12
12
|
*/
|
|
13
13
|
(function (global, factory) {
|
|
14
14
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
* @return {Array<?>}
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
|
-
const nativeToString$
|
|
30
|
-
const nativeHasOwnProperty$
|
|
29
|
+
const nativeToString$1 = Object.prototype.toString;
|
|
30
|
+
const nativeHasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
31
31
|
|
|
32
|
-
function isUndefined$
|
|
32
|
+
function isUndefined$2(obj) {
|
|
33
33
|
return obj === undefined;
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -37,20 +37,20 @@
|
|
|
37
37
|
return obj !== undefined;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
function isArray$
|
|
41
|
-
return nativeToString$
|
|
40
|
+
function isArray$2(obj) {
|
|
41
|
+
return nativeToString$1.call(obj) === '[object Array]';
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
function isObject
|
|
45
|
-
return nativeToString$
|
|
44
|
+
function isObject(obj) {
|
|
45
|
+
return nativeToString$1.call(obj) === '[object Object]';
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
function isNumber(obj) {
|
|
49
|
-
return nativeToString$
|
|
49
|
+
return nativeToString$1.call(obj) === '[object Number]';
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
function isFunction
|
|
53
|
-
const tag = nativeToString$
|
|
52
|
+
function isFunction(obj) {
|
|
53
|
+
const tag = nativeToString$1.call(obj);
|
|
54
54
|
|
|
55
55
|
return (
|
|
56
56
|
tag === '[object Function]' ||
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
function isString
|
|
65
|
-
return nativeToString$
|
|
64
|
+
function isString(obj) {
|
|
65
|
+
return nativeToString$1.call(obj) === '[object String]';
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
/**
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
*
|
|
74
74
|
* @return {Boolean}
|
|
75
75
|
*/
|
|
76
|
-
function has$
|
|
77
|
-
return nativeHasOwnProperty$
|
|
76
|
+
function has$1(target, key) {
|
|
77
|
+
return nativeHasOwnProperty$1.call(target, key);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
/**
|
|
@@ -85,13 +85,13 @@
|
|
|
85
85
|
*
|
|
86
86
|
* @return {Object}
|
|
87
87
|
*/
|
|
88
|
-
function find
|
|
88
|
+
function find(collection, matcher) {
|
|
89
89
|
|
|
90
|
-
matcher = toMatcher
|
|
90
|
+
matcher = toMatcher(matcher);
|
|
91
91
|
|
|
92
92
|
let match;
|
|
93
93
|
|
|
94
|
-
forEach$
|
|
94
|
+
forEach$1(collection, function(val, key) {
|
|
95
95
|
if (matcher(val, key)) {
|
|
96
96
|
match = val;
|
|
97
97
|
|
|
@@ -104,6 +104,32 @@
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
|
|
107
|
+
/**
|
|
108
|
+
* Find element index in collection.
|
|
109
|
+
*
|
|
110
|
+
* @param {Array|Object} collection
|
|
111
|
+
* @param {Function} matcher
|
|
112
|
+
*
|
|
113
|
+
* @return {Object}
|
|
114
|
+
*/
|
|
115
|
+
function findIndex(collection, matcher) {
|
|
116
|
+
|
|
117
|
+
matcher = toMatcher(matcher);
|
|
118
|
+
|
|
119
|
+
let idx = isArray$2(collection) ? -1 : undefined;
|
|
120
|
+
|
|
121
|
+
forEach$1(collection, function(val, key) {
|
|
122
|
+
if (matcher(val, key)) {
|
|
123
|
+
idx = key;
|
|
124
|
+
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
return idx;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
|
|
107
133
|
/**
|
|
108
134
|
* Find element in collection.
|
|
109
135
|
*
|
|
@@ -112,11 +138,11 @@
|
|
|
112
138
|
*
|
|
113
139
|
* @return {Array} result
|
|
114
140
|
*/
|
|
115
|
-
function filter
|
|
141
|
+
function filter(collection, matcher) {
|
|
116
142
|
|
|
117
143
|
let result = [];
|
|
118
144
|
|
|
119
|
-
forEach$
|
|
145
|
+
forEach$1(collection, function(val, key) {
|
|
120
146
|
if (matcher(val, key)) {
|
|
121
147
|
result.push(val);
|
|
122
148
|
}
|
|
@@ -135,20 +161,20 @@
|
|
|
135
161
|
*
|
|
136
162
|
* @return {Object} return result that stopped the iteration
|
|
137
163
|
*/
|
|
138
|
-
function forEach$
|
|
164
|
+
function forEach$1(collection, iterator) {
|
|
139
165
|
|
|
140
166
|
let val,
|
|
141
167
|
result;
|
|
142
168
|
|
|
143
|
-
if (isUndefined$
|
|
169
|
+
if (isUndefined$2(collection)) {
|
|
144
170
|
return;
|
|
145
171
|
}
|
|
146
172
|
|
|
147
|
-
const convertKey = isArray$
|
|
173
|
+
const convertKey = isArray$2(collection) ? toNum$1 : identity$1;
|
|
148
174
|
|
|
149
175
|
for (let key in collection) {
|
|
150
176
|
|
|
151
|
-
if (has$
|
|
177
|
+
if (has$1(collection, key)) {
|
|
152
178
|
val = collection[key];
|
|
153
179
|
|
|
154
180
|
result = iterator(val, convertKey(key));
|
|
@@ -172,7 +198,7 @@
|
|
|
172
198
|
*/
|
|
173
199
|
function reduce(collection, iterator, result) {
|
|
174
200
|
|
|
175
|
-
forEach$
|
|
201
|
+
forEach$1(collection, function(value, idx) {
|
|
176
202
|
result = iterator(result, value, idx);
|
|
177
203
|
});
|
|
178
204
|
|
|
@@ -208,7 +234,7 @@
|
|
|
208
234
|
*/
|
|
209
235
|
function some(collection, matcher) {
|
|
210
236
|
|
|
211
|
-
return !!find
|
|
237
|
+
return !!find(collection, matcher);
|
|
212
238
|
}
|
|
213
239
|
|
|
214
240
|
|
|
@@ -225,7 +251,7 @@
|
|
|
225
251
|
|
|
226
252
|
let result = [];
|
|
227
253
|
|
|
228
|
-
forEach$
|
|
254
|
+
forEach$1(collection, function(val, key) {
|
|
229
255
|
result.push(fn(val, key));
|
|
230
256
|
});
|
|
231
257
|
|
|
@@ -258,18 +284,18 @@
|
|
|
258
284
|
}
|
|
259
285
|
|
|
260
286
|
|
|
261
|
-
function toMatcher
|
|
262
|
-
return isFunction
|
|
287
|
+
function toMatcher(matcher) {
|
|
288
|
+
return isFunction(matcher) ? matcher : (e) => {
|
|
263
289
|
return e === matcher;
|
|
264
290
|
};
|
|
265
291
|
}
|
|
266
292
|
|
|
267
293
|
|
|
268
|
-
function identity$
|
|
294
|
+
function identity$1(arg) {
|
|
269
295
|
return arg;
|
|
270
296
|
}
|
|
271
297
|
|
|
272
|
-
function toNum$
|
|
298
|
+
function toNum$1(arg) {
|
|
273
299
|
return Number(arg);
|
|
274
300
|
}
|
|
275
301
|
|
|
@@ -355,7 +381,7 @@
|
|
|
355
381
|
*
|
|
356
382
|
* @return {Function} bound function
|
|
357
383
|
*/
|
|
358
|
-
function bind$
|
|
384
|
+
function bind$2(fn, target) {
|
|
359
385
|
return fn.bind(target);
|
|
360
386
|
}
|
|
361
387
|
|
|
@@ -367,10 +393,34 @@
|
|
|
367
393
|
*
|
|
368
394
|
* @return {Object} the target
|
|
369
395
|
*/
|
|
370
|
-
function assign$
|
|
396
|
+
function assign$1(target, ...others) {
|
|
371
397
|
return Object.assign(target, ...others);
|
|
372
398
|
}
|
|
373
399
|
|
|
400
|
+
/**
|
|
401
|
+
* Pick given properties from the target object.
|
|
402
|
+
*
|
|
403
|
+
* @param {Object} target
|
|
404
|
+
* @param {Array} properties
|
|
405
|
+
*
|
|
406
|
+
* @return {Object} target
|
|
407
|
+
*/
|
|
408
|
+
function pick(target, properties) {
|
|
409
|
+
|
|
410
|
+
let result = {};
|
|
411
|
+
|
|
412
|
+
let obj = Object(target);
|
|
413
|
+
|
|
414
|
+
forEach$1(properties, function(prop) {
|
|
415
|
+
|
|
416
|
+
if (prop in obj) {
|
|
417
|
+
result[prop] = target[prop];
|
|
418
|
+
}
|
|
419
|
+
});
|
|
420
|
+
|
|
421
|
+
return result;
|
|
422
|
+
}
|
|
423
|
+
|
|
374
424
|
/**
|
|
375
425
|
* Pick all target properties, excluding the given ones.
|
|
376
426
|
*
|
|
@@ -385,7 +435,7 @@
|
|
|
385
435
|
|
|
386
436
|
let obj = Object(target);
|
|
387
437
|
|
|
388
|
-
forEach$
|
|
438
|
+
forEach$1(obj, function(prop, key) {
|
|
389
439
|
|
|
390
440
|
if (properties.indexOf(key) === -1) {
|
|
391
441
|
result[key] = prop;
|
|
@@ -1483,13 +1533,13 @@
|
|
|
1483
1533
|
* @return {Array<?>}
|
|
1484
1534
|
*/
|
|
1485
1535
|
|
|
1486
|
-
var nativeToString
|
|
1487
|
-
var nativeHasOwnProperty
|
|
1488
|
-
function isUndefined$
|
|
1536
|
+
var nativeToString = Object.prototype.toString;
|
|
1537
|
+
var nativeHasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1538
|
+
function isUndefined$1(obj) {
|
|
1489
1539
|
return obj === undefined;
|
|
1490
1540
|
}
|
|
1491
|
-
function isArray$
|
|
1492
|
-
return nativeToString
|
|
1541
|
+
function isArray$1(obj) {
|
|
1542
|
+
return nativeToString.call(obj) === '[object Array]';
|
|
1493
1543
|
}
|
|
1494
1544
|
/**
|
|
1495
1545
|
* Return true, if target owns a property with the given key.
|
|
@@ -1500,8 +1550,8 @@
|
|
|
1500
1550
|
* @return {Boolean}
|
|
1501
1551
|
*/
|
|
1502
1552
|
|
|
1503
|
-
function has
|
|
1504
|
-
return nativeHasOwnProperty
|
|
1553
|
+
function has(target, key) {
|
|
1554
|
+
return nativeHasOwnProperty.call(target, key);
|
|
1505
1555
|
}
|
|
1506
1556
|
/**
|
|
1507
1557
|
* Iterate over collection; returning something
|
|
@@ -1513,17 +1563,17 @@
|
|
|
1513
1563
|
* @return {Object} return result that stopped the iteration
|
|
1514
1564
|
*/
|
|
1515
1565
|
|
|
1516
|
-
function forEach
|
|
1566
|
+
function forEach(collection, iterator) {
|
|
1517
1567
|
var val, result;
|
|
1518
1568
|
|
|
1519
|
-
if (isUndefined$
|
|
1569
|
+
if (isUndefined$1(collection)) {
|
|
1520
1570
|
return;
|
|
1521
1571
|
}
|
|
1522
1572
|
|
|
1523
|
-
var convertKey = isArray$
|
|
1573
|
+
var convertKey = isArray$1(collection) ? toNum : identity;
|
|
1524
1574
|
|
|
1525
1575
|
for (var key in collection) {
|
|
1526
|
-
if (has
|
|
1576
|
+
if (has(collection, key)) {
|
|
1527
1577
|
val = collection[key];
|
|
1528
1578
|
result = iterator(val, convertKey(key));
|
|
1529
1579
|
|
|
@@ -1534,11 +1584,11 @@
|
|
|
1534
1584
|
}
|
|
1535
1585
|
}
|
|
1536
1586
|
|
|
1537
|
-
function identity
|
|
1587
|
+
function identity(arg) {
|
|
1538
1588
|
return arg;
|
|
1539
1589
|
}
|
|
1540
1590
|
|
|
1541
|
-
function toNum
|
|
1591
|
+
function toNum(arg) {
|
|
1542
1592
|
return Number(arg);
|
|
1543
1593
|
}
|
|
1544
1594
|
|
|
@@ -1550,15 +1600,15 @@
|
|
|
1550
1600
|
*
|
|
1551
1601
|
* @return {Element} the element
|
|
1552
1602
|
*/
|
|
1553
|
-
function assign
|
|
1603
|
+
function assign(element, ...styleSources) {
|
|
1554
1604
|
const target = element.style;
|
|
1555
1605
|
|
|
1556
|
-
forEach
|
|
1606
|
+
forEach(styleSources, function(style) {
|
|
1557
1607
|
if (!style) {
|
|
1558
1608
|
return;
|
|
1559
1609
|
}
|
|
1560
1610
|
|
|
1561
|
-
forEach
|
|
1611
|
+
forEach(style, function(value, key) {
|
|
1562
1612
|
target[key] = value;
|
|
1563
1613
|
});
|
|
1564
1614
|
});
|
|
@@ -1843,7 +1893,7 @@
|
|
|
1843
1893
|
// when delegating.
|
|
1844
1894
|
var forceCaptureEvents = [ 'focus', 'blur' ];
|
|
1845
1895
|
|
|
1846
|
-
function bind
|
|
1896
|
+
function bind(el, selector, type, fn, capture) {
|
|
1847
1897
|
if (forceCaptureEvents.indexOf(type) !== -1) {
|
|
1848
1898
|
capture = true;
|
|
1849
1899
|
}
|
|
@@ -1875,7 +1925,7 @@
|
|
|
1875
1925
|
}
|
|
1876
1926
|
|
|
1877
1927
|
var delegate = {
|
|
1878
|
-
bind
|
|
1928
|
+
bind,
|
|
1879
1929
|
unbind
|
|
1880
1930
|
};
|
|
1881
1931
|
|
|
@@ -2244,7 +2294,7 @@
|
|
|
2244
2294
|
var computeStyle = styles.computeStyle;
|
|
2245
2295
|
|
|
2246
2296
|
function addMarker(id, options) {
|
|
2247
|
-
var attrs = assign$
|
|
2297
|
+
var attrs = assign$1({
|
|
2248
2298
|
fill: black,
|
|
2249
2299
|
strokeWidth: 1,
|
|
2250
2300
|
strokeLinecap: 'round',
|
|
@@ -2416,7 +2466,7 @@
|
|
|
2416
2466
|
|
|
2417
2467
|
function drawCircle(parentGfx, width, height, offset, attrs) {
|
|
2418
2468
|
|
|
2419
|
-
if (isObject
|
|
2469
|
+
if (isObject(offset)) {
|
|
2420
2470
|
attrs = offset;
|
|
2421
2471
|
offset = 0;
|
|
2422
2472
|
}
|
|
@@ -2451,7 +2501,7 @@
|
|
|
2451
2501
|
|
|
2452
2502
|
function drawRect(parentGfx, width, height, r, offset, attrs) {
|
|
2453
2503
|
|
|
2454
|
-
if (isObject
|
|
2504
|
+
if (isObject(offset)) {
|
|
2455
2505
|
attrs = offset;
|
|
2456
2506
|
offset = 0;
|
|
2457
2507
|
}
|
|
@@ -2539,7 +2589,7 @@
|
|
|
2539
2589
|
}
|
|
2540
2590
|
|
|
2541
2591
|
function drawMarker(type, parentGfx, path, attrs) {
|
|
2542
|
-
return drawPath(parentGfx, path, assign$
|
|
2592
|
+
return drawPath(parentGfx, path, assign$1({ 'data-marker': type }, attrs));
|
|
2543
2593
|
}
|
|
2544
2594
|
|
|
2545
2595
|
function renderer(type) {
|
|
@@ -2611,7 +2661,7 @@
|
|
|
2611
2661
|
|
|
2612
2662
|
function renderLabel(parentGfx, label, options) {
|
|
2613
2663
|
|
|
2614
|
-
options = assign$
|
|
2664
|
+
options = assign$1({
|
|
2615
2665
|
size: {
|
|
2616
2666
|
width: 100
|
|
2617
2667
|
}
|
|
@@ -2651,7 +2701,7 @@
|
|
|
2651
2701
|
return renderLabel(parentGfx, getLabel(element), {
|
|
2652
2702
|
box: box,
|
|
2653
2703
|
fitBox: true,
|
|
2654
|
-
style: assign$
|
|
2704
|
+
style: assign$1(
|
|
2655
2705
|
{},
|
|
2656
2706
|
textRenderer.getExternalStyle(),
|
|
2657
2707
|
{
|
|
@@ -3253,7 +3303,7 @@
|
|
|
3253
3303
|
return task;
|
|
3254
3304
|
},
|
|
3255
3305
|
'bpmn:SubProcess': function(parentGfx, element, attrs) {
|
|
3256
|
-
attrs = assign$
|
|
3306
|
+
attrs = assign$1({
|
|
3257
3307
|
fill: getFillColor(element, defaultFillColor),
|
|
3258
3308
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
3259
3309
|
}, attrs);
|
|
@@ -3339,7 +3389,7 @@
|
|
|
3339
3389
|
return lane;
|
|
3340
3390
|
},
|
|
3341
3391
|
'bpmn:Lane': function(parentGfx, element, attrs) {
|
|
3342
|
-
var rect = drawRect(parentGfx, element.width, element.height, 0, assign$
|
|
3392
|
+
var rect = drawRect(parentGfx, element.width, element.height, 0, assign$1({
|
|
3343
3393
|
fill: getFillColor(element, defaultFillColor),
|
|
3344
3394
|
fillOpacity: HIGH_FILL_OPACITY,
|
|
3345
3395
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
@@ -3561,7 +3611,7 @@
|
|
|
3561
3611
|
var fill = getFillColor(element, defaultFillColor),
|
|
3562
3612
|
stroke = getStrokeColor(element, defaultStrokeColor);
|
|
3563
3613
|
|
|
3564
|
-
attrs = assign$
|
|
3614
|
+
attrs = assign$1({
|
|
3565
3615
|
strokeDasharray: '0.5, 5',
|
|
3566
3616
|
strokeLinecap: 'round',
|
|
3567
3617
|
strokeLinejoin: 'round',
|
|
@@ -3749,12 +3799,12 @@
|
|
|
3749
3799
|
}
|
|
3750
3800
|
|
|
3751
3801
|
// apply fillOpacity
|
|
3752
|
-
var outerAttrs = assign$
|
|
3802
|
+
var outerAttrs = assign$1({}, attrs, {
|
|
3753
3803
|
fillOpacity: 1
|
|
3754
3804
|
});
|
|
3755
3805
|
|
|
3756
3806
|
// apply no-fill
|
|
3757
|
-
var innerAttrs = assign$
|
|
3807
|
+
var innerAttrs = assign$1({}, attrs, {
|
|
3758
3808
|
fill: 'none'
|
|
3759
3809
|
});
|
|
3760
3810
|
|
|
@@ -3977,7 +4027,7 @@
|
|
|
3977
4027
|
};
|
|
3978
4028
|
}
|
|
3979
4029
|
|
|
3980
|
-
forEach$
|
|
4030
|
+
forEach$1(taskMarkers, function(marker) {
|
|
3981
4031
|
renderer(marker)(parentGfx, element, position);
|
|
3982
4032
|
});
|
|
3983
4033
|
|
|
@@ -4105,8 +4155,8 @@
|
|
|
4105
4155
|
|
|
4106
4156
|
function parsePadding(padding) {
|
|
4107
4157
|
|
|
4108
|
-
if (isObject
|
|
4109
|
-
return assign$
|
|
4158
|
+
if (isObject(padding)) {
|
|
4159
|
+
return assign$1({ top: 0, left: 0, right: 0, bottom: 0 }, padding);
|
|
4110
4160
|
} else {
|
|
4111
4161
|
return {
|
|
4112
4162
|
top: padding,
|
|
@@ -4270,7 +4320,7 @@
|
|
|
4270
4320
|
id: 'helper-svg'
|
|
4271
4321
|
});
|
|
4272
4322
|
|
|
4273
|
-
assign
|
|
4323
|
+
assign(helperSvg, {
|
|
4274
4324
|
visibility: 'hidden',
|
|
4275
4325
|
position: 'fixed',
|
|
4276
4326
|
width: 0,
|
|
@@ -4295,7 +4345,7 @@
|
|
|
4295
4345
|
*/
|
|
4296
4346
|
function Text(config) {
|
|
4297
4347
|
|
|
4298
|
-
this._config = assign$
|
|
4348
|
+
this._config = assign$1({}, {
|
|
4299
4349
|
size: DEFAULT_LABEL_SIZE$1,
|
|
4300
4350
|
padding: DEFAULT_BOX_PADDING,
|
|
4301
4351
|
style: {},
|
|
@@ -4344,8 +4394,8 @@
|
|
|
4344
4394
|
* @return {Object} { element, dimensions }
|
|
4345
4395
|
*/
|
|
4346
4396
|
Text.prototype.layoutText = function(text, options) {
|
|
4347
|
-
var box = assign$
|
|
4348
|
-
style = assign$
|
|
4397
|
+
var box = assign$1({}, this._config.size, options.box),
|
|
4398
|
+
style = assign$1({}, this._config.style, options.style),
|
|
4349
4399
|
align = parseAlign(options.align || this._config.align),
|
|
4350
4400
|
padding = parsePadding(options.padding !== undefined ? options.padding : this._config.padding),
|
|
4351
4401
|
fitBox = options.fitBox || false;
|
|
@@ -4401,7 +4451,7 @@
|
|
|
4401
4451
|
|
|
4402
4452
|
// layout each line taking into account that parent
|
|
4403
4453
|
// shape might resize to fit text size
|
|
4404
|
-
forEach$
|
|
4454
|
+
forEach$1(layouted, function(line) {
|
|
4405
4455
|
|
|
4406
4456
|
var x;
|
|
4407
4457
|
|
|
@@ -4460,7 +4510,7 @@
|
|
|
4460
4510
|
|
|
4461
4511
|
function TextRenderer(config) {
|
|
4462
4512
|
|
|
4463
|
-
var defaultStyle = assign$
|
|
4513
|
+
var defaultStyle = assign$1({
|
|
4464
4514
|
fontFamily: 'Arial, sans-serif',
|
|
4465
4515
|
fontSize: DEFAULT_FONT_SIZE,
|
|
4466
4516
|
fontWeight: 'normal',
|
|
@@ -4469,7 +4519,7 @@
|
|
|
4469
4519
|
|
|
4470
4520
|
var fontSize = parseInt(defaultStyle.fontSize, 10) - 1;
|
|
4471
4521
|
|
|
4472
|
-
var externalStyle = assign$
|
|
4522
|
+
var externalStyle = assign$1({}, defaultStyle, {
|
|
4473
4523
|
fontSize: fontSize
|
|
4474
4524
|
}, config && config.externalStyle || {});
|
|
4475
4525
|
|
|
@@ -5205,7 +5255,7 @@
|
|
|
5205
5255
|
size = DEFAULT_LABEL_SIZE;
|
|
5206
5256
|
}
|
|
5207
5257
|
|
|
5208
|
-
return assign$
|
|
5258
|
+
return assign$1({
|
|
5209
5259
|
x: mid.x - size.width / 2,
|
|
5210
5260
|
y: mid.y - size.height / 2
|
|
5211
5261
|
}, size);
|
|
@@ -5375,7 +5425,7 @@
|
|
|
5375
5425
|
* @return {Object}
|
|
5376
5426
|
*/
|
|
5377
5427
|
function elementData(semantic, di, attrs) {
|
|
5378
|
-
return assign$
|
|
5428
|
+
return assign$1({
|
|
5379
5429
|
id: semantic.id,
|
|
5380
5430
|
type: semantic.$type,
|
|
5381
5431
|
businessObject: semantic,
|
|
@@ -5913,13 +5963,13 @@
|
|
|
5913
5963
|
}
|
|
5914
5964
|
|
|
5915
5965
|
function registerEvents(svg) {
|
|
5916
|
-
forEach$
|
|
5966
|
+
forEach$1(bindings, function(val, key) {
|
|
5917
5967
|
registerEvent(svg, key, val);
|
|
5918
5968
|
});
|
|
5919
5969
|
}
|
|
5920
5970
|
|
|
5921
5971
|
function unregisterEvents(svg) {
|
|
5922
|
-
forEach$
|
|
5972
|
+
forEach$1(bindings, function(val, key) {
|
|
5923
5973
|
unregisterEvent(svg, key, val);
|
|
5924
5974
|
});
|
|
5925
5975
|
}
|
|
@@ -5990,7 +6040,7 @@
|
|
|
5990
6040
|
|
|
5991
6041
|
function createHitStyle(classNames, attrs) {
|
|
5992
6042
|
|
|
5993
|
-
attrs = assign$
|
|
6043
|
+
attrs = assign$1({
|
|
5994
6044
|
stroke: 'white',
|
|
5995
6045
|
strokeWidth: 15
|
|
5996
6046
|
}, attrs || {});
|
|
@@ -6029,7 +6079,7 @@
|
|
|
6029
6079
|
this.removeHits = function(gfx) {
|
|
6030
6080
|
var hits = all('.djs-hit', gfx);
|
|
6031
6081
|
|
|
6032
|
-
forEach$
|
|
6082
|
+
forEach$1(hits, remove$2);
|
|
6033
6083
|
};
|
|
6034
6084
|
|
|
6035
6085
|
/**
|
|
@@ -6088,7 +6138,7 @@
|
|
|
6088
6138
|
*/
|
|
6089
6139
|
this.createBoxHit = function(gfx, type, attrs) {
|
|
6090
6140
|
|
|
6091
|
-
attrs = assign$
|
|
6141
|
+
attrs = assign$1({
|
|
6092
6142
|
x: 0,
|
|
6093
6143
|
y: 0
|
|
6094
6144
|
}, attrs);
|
|
@@ -6245,7 +6295,7 @@
|
|
|
6245
6295
|
function getBBox(elements, stopRecursion) {
|
|
6246
6296
|
|
|
6247
6297
|
stopRecursion = !!stopRecursion;
|
|
6248
|
-
if (!isArray$
|
|
6298
|
+
if (!isArray$2(elements)) {
|
|
6249
6299
|
elements = [ elements ];
|
|
6250
6300
|
}
|
|
6251
6301
|
|
|
@@ -6254,7 +6304,7 @@
|
|
|
6254
6304
|
maxX,
|
|
6255
6305
|
maxY;
|
|
6256
6306
|
|
|
6257
|
-
forEach$
|
|
6307
|
+
forEach$1(elements, function(element) {
|
|
6258
6308
|
|
|
6259
6309
|
// If element is a connection the bbox must be computed first
|
|
6260
6310
|
var bbox = element;
|
|
@@ -6333,7 +6383,7 @@
|
|
|
6333
6383
|
function createOutline(gfx, bounds) {
|
|
6334
6384
|
var outline = create$1('rect');
|
|
6335
6385
|
|
|
6336
|
-
attr$1(outline, assign$
|
|
6386
|
+
attr$1(outline, assign$1({
|
|
6337
6387
|
x: 10,
|
|
6338
6388
|
y: 10,
|
|
6339
6389
|
rx: 3,
|
|
@@ -6492,7 +6542,7 @@
|
|
|
6492
6542
|
var selectedElements = this._selectedElements,
|
|
6493
6543
|
oldSelection = selectedElements.slice();
|
|
6494
6544
|
|
|
6495
|
-
if (!isArray$
|
|
6545
|
+
if (!isArray$2(elements)) {
|
|
6496
6546
|
elements = elements ? [ elements ] : [];
|
|
6497
6547
|
}
|
|
6498
6548
|
|
|
@@ -6509,7 +6559,7 @@
|
|
|
6509
6559
|
// selection may be cleared by passing an empty array or null
|
|
6510
6560
|
// to the method
|
|
6511
6561
|
if (add) {
|
|
6512
|
-
forEach$
|
|
6562
|
+
forEach$1(elements, function(element) {
|
|
6513
6563
|
if (selectedElements.indexOf(element) !== -1) {
|
|
6514
6564
|
|
|
6515
6565
|
// already selected
|
|
@@ -6578,13 +6628,13 @@
|
|
|
6578
6628
|
var oldSelection = event.oldSelection,
|
|
6579
6629
|
newSelection = event.newSelection;
|
|
6580
6630
|
|
|
6581
|
-
forEach$
|
|
6631
|
+
forEach$1(oldSelection, function(e) {
|
|
6582
6632
|
if (newSelection.indexOf(e) === -1) {
|
|
6583
6633
|
deselect(e);
|
|
6584
6634
|
}
|
|
6585
6635
|
});
|
|
6586
6636
|
|
|
6587
|
-
forEach$
|
|
6637
|
+
forEach$1(newSelection, function(e) {
|
|
6588
6638
|
if (oldSelection.indexOf(e) === -1) {
|
|
6589
6639
|
select(e);
|
|
6590
6640
|
}
|
|
@@ -6626,7 +6676,7 @@
|
|
|
6626
6676
|
|
|
6627
6677
|
var rect = create$1('rect');
|
|
6628
6678
|
|
|
6629
|
-
attr$1(rect, assign$
|
|
6679
|
+
attr$1(rect, assign$1({
|
|
6630
6680
|
rx: 3
|
|
6631
6681
|
}, bBox));
|
|
6632
6682
|
|
|
@@ -6663,7 +6713,7 @@
|
|
|
6663
6713
|
return;
|
|
6664
6714
|
}
|
|
6665
6715
|
|
|
6666
|
-
if (isArray$
|
|
6716
|
+
if (isArray$2(autoSelect)) {
|
|
6667
6717
|
selection.select(autoSelect);
|
|
6668
6718
|
} else {
|
|
6669
6719
|
|
|
@@ -6690,7 +6740,7 @@
|
|
|
6690
6740
|
var shape = elementRegistry.get(event.context.shape.id);
|
|
6691
6741
|
|
|
6692
6742
|
// Always select main shape on move
|
|
6693
|
-
var isSelected = find
|
|
6743
|
+
var isSelected = find(previousSelection, function(selectedShape) {
|
|
6694
6744
|
return shape.id === selectedShape.id;
|
|
6695
6745
|
});
|
|
6696
6746
|
|
|
@@ -6869,7 +6919,7 @@
|
|
|
6869
6919
|
|
|
6870
6920
|
this._ids = ids;
|
|
6871
6921
|
|
|
6872
|
-
this._overlayDefaults = assign$
|
|
6922
|
+
this._overlayDefaults = assign$1({
|
|
6873
6923
|
|
|
6874
6924
|
// no show constraints
|
|
6875
6925
|
show: null,
|
|
@@ -6931,11 +6981,11 @@
|
|
|
6931
6981
|
*/
|
|
6932
6982
|
Overlays.prototype.get = function(search) {
|
|
6933
6983
|
|
|
6934
|
-
if (isString
|
|
6984
|
+
if (isString(search)) {
|
|
6935
6985
|
search = { id: search };
|
|
6936
6986
|
}
|
|
6937
6987
|
|
|
6938
|
-
if (isString
|
|
6988
|
+
if (isString(search.element)) {
|
|
6939
6989
|
search.element = this._elementRegistry.get(search.element);
|
|
6940
6990
|
}
|
|
6941
6991
|
|
|
@@ -6944,13 +6994,13 @@
|
|
|
6944
6994
|
|
|
6945
6995
|
// return a list of overlays when searching by element (+type)
|
|
6946
6996
|
if (container) {
|
|
6947
|
-
return search.type ? filter
|
|
6997
|
+
return search.type ? filter(container.overlays, matchPattern({ type: search.type })) : container.overlays.slice();
|
|
6948
6998
|
} else {
|
|
6949
6999
|
return [];
|
|
6950
7000
|
}
|
|
6951
7001
|
} else
|
|
6952
7002
|
if (search.type) {
|
|
6953
|
-
return filter
|
|
7003
|
+
return filter(this._overlays, matchPattern({ type: search.type }));
|
|
6954
7004
|
} else {
|
|
6955
7005
|
|
|
6956
7006
|
// return single element when searching by id
|
|
@@ -6983,7 +7033,7 @@
|
|
|
6983
7033
|
*/
|
|
6984
7034
|
Overlays.prototype.add = function(element, type, overlay) {
|
|
6985
7035
|
|
|
6986
|
-
if (isObject
|
|
7036
|
+
if (isObject(type)) {
|
|
6987
7037
|
overlay = type;
|
|
6988
7038
|
type = null;
|
|
6989
7039
|
}
|
|
@@ -7006,7 +7056,7 @@
|
|
|
7006
7056
|
|
|
7007
7057
|
var id = this._ids.next();
|
|
7008
7058
|
|
|
7009
|
-
overlay = assign$
|
|
7059
|
+
overlay = assign$1({}, this._overlayDefaults, overlay, {
|
|
7010
7060
|
id: id,
|
|
7011
7061
|
type: type,
|
|
7012
7062
|
element: element,
|
|
@@ -7030,13 +7080,13 @@
|
|
|
7030
7080
|
|
|
7031
7081
|
var overlays = this.get(filter) || [];
|
|
7032
7082
|
|
|
7033
|
-
if (!isArray$
|
|
7083
|
+
if (!isArray$2(overlays)) {
|
|
7034
7084
|
overlays = [ overlays ];
|
|
7035
7085
|
}
|
|
7036
7086
|
|
|
7037
7087
|
var self = this;
|
|
7038
7088
|
|
|
7039
|
-
forEach$
|
|
7089
|
+
forEach$1(overlays, function(overlay) {
|
|
7040
7090
|
|
|
7041
7091
|
var container = self._getOverlayContainer(overlay.element, true);
|
|
7042
7092
|
|
|
@@ -7146,7 +7196,7 @@
|
|
|
7146
7196
|
|
|
7147
7197
|
Overlays.prototype._createOverlayContainer = function(element) {
|
|
7148
7198
|
var html = domify$1('<div class="djs-overlays" />');
|
|
7149
|
-
assign
|
|
7199
|
+
assign(html, { position: 'absolute' });
|
|
7150
7200
|
|
|
7151
7201
|
this._overlayRoot.appendChild(html);
|
|
7152
7202
|
|
|
@@ -7183,7 +7233,7 @@
|
|
|
7183
7233
|
|
|
7184
7234
|
|
|
7185
7235
|
Overlays.prototype._getOverlayContainer = function(element, raw) {
|
|
7186
|
-
var container = find
|
|
7236
|
+
var container = find(this._overlayContainers, function(c) {
|
|
7187
7237
|
return c.element === element;
|
|
7188
7238
|
});
|
|
7189
7239
|
|
|
@@ -7211,14 +7261,14 @@
|
|
|
7211
7261
|
|
|
7212
7262
|
// create proper html elements from
|
|
7213
7263
|
// overlay HTML strings
|
|
7214
|
-
if (isString
|
|
7264
|
+
if (isString(html)) {
|
|
7215
7265
|
html = domify$1(html);
|
|
7216
7266
|
}
|
|
7217
7267
|
|
|
7218
7268
|
overlayContainer = this._getOverlayContainer(element);
|
|
7219
7269
|
|
|
7220
7270
|
htmlContainer = domify$1('<div class="djs-overlay" data-overlay-id="' + id + '">');
|
|
7221
|
-
assign
|
|
7271
|
+
assign(htmlContainer, { position: 'absolute' });
|
|
7222
7272
|
|
|
7223
7273
|
htmlContainer.appendChild(html);
|
|
7224
7274
|
|
|
@@ -7308,7 +7358,7 @@
|
|
|
7308
7358
|
|
|
7309
7359
|
var self = this;
|
|
7310
7360
|
|
|
7311
|
-
forEach$
|
|
7361
|
+
forEach$1(this._overlays, function(overlay) {
|
|
7312
7362
|
self._updateOverlayVisibilty(overlay, viewbox);
|
|
7313
7363
|
});
|
|
7314
7364
|
};
|
|
@@ -7345,7 +7395,7 @@
|
|
|
7345
7395
|
var element = e.element;
|
|
7346
7396
|
var overlays = self.get({ element: element });
|
|
7347
7397
|
|
|
7348
|
-
forEach$
|
|
7398
|
+
forEach$1(overlays, function(o) {
|
|
7349
7399
|
self.remove(o.id);
|
|
7350
7400
|
});
|
|
7351
7401
|
|
|
@@ -7369,7 +7419,7 @@
|
|
|
7369
7419
|
var container = self._getOverlayContainer(element, true);
|
|
7370
7420
|
|
|
7371
7421
|
if (container) {
|
|
7372
|
-
forEach$
|
|
7422
|
+
forEach$1(container.overlays, function(overlay) {
|
|
7373
7423
|
self._updateOverlay(overlay);
|
|
7374
7424
|
});
|
|
7375
7425
|
|
|
@@ -7406,7 +7456,7 @@
|
|
|
7406
7456
|
'<div class="djs-overlay-container" />'
|
|
7407
7457
|
);
|
|
7408
7458
|
|
|
7409
|
-
assign
|
|
7459
|
+
assign(root, {
|
|
7410
7460
|
position: 'absolute',
|
|
7411
7461
|
width: 0,
|
|
7412
7462
|
height: 0
|
|
@@ -7418,7 +7468,7 @@
|
|
|
7418
7468
|
}
|
|
7419
7469
|
|
|
7420
7470
|
function setPosition(el, x, y) {
|
|
7421
|
-
assign
|
|
7471
|
+
assign(el, { left: x + 'px', top: y + 'px' });
|
|
7422
7472
|
}
|
|
7423
7473
|
|
|
7424
7474
|
/**
|
|
@@ -7564,7 +7614,7 @@
|
|
|
7564
7614
|
*/
|
|
7565
7615
|
CommandInterceptor.prototype.on = function(events, hook, priority, handlerFn, unwrap, that) {
|
|
7566
7616
|
|
|
7567
|
-
if (isFunction
|
|
7617
|
+
if (isFunction(hook) || isNumber(hook)) {
|
|
7568
7618
|
that = unwrap;
|
|
7569
7619
|
unwrap = handlerFn;
|
|
7570
7620
|
handlerFn = priority;
|
|
@@ -7572,29 +7622,29 @@
|
|
|
7572
7622
|
hook = null;
|
|
7573
7623
|
}
|
|
7574
7624
|
|
|
7575
|
-
if (isFunction
|
|
7625
|
+
if (isFunction(priority)) {
|
|
7576
7626
|
that = unwrap;
|
|
7577
7627
|
unwrap = handlerFn;
|
|
7578
7628
|
handlerFn = priority;
|
|
7579
7629
|
priority = DEFAULT_PRIORITY$1;
|
|
7580
7630
|
}
|
|
7581
7631
|
|
|
7582
|
-
if (isObject
|
|
7632
|
+
if (isObject(unwrap)) {
|
|
7583
7633
|
that = unwrap;
|
|
7584
7634
|
unwrap = false;
|
|
7585
7635
|
}
|
|
7586
7636
|
|
|
7587
|
-
if (!isFunction
|
|
7637
|
+
if (!isFunction(handlerFn)) {
|
|
7588
7638
|
throw new Error('handlerFn must be a function');
|
|
7589
7639
|
}
|
|
7590
7640
|
|
|
7591
|
-
if (!isArray$
|
|
7641
|
+
if (!isArray$2(events)) {
|
|
7592
7642
|
events = [ events ];
|
|
7593
7643
|
}
|
|
7594
7644
|
|
|
7595
7645
|
var eventBus = this._eventBus;
|
|
7596
7646
|
|
|
7597
|
-
forEach$
|
|
7647
|
+
forEach$1(events, function(event) {
|
|
7598
7648
|
|
|
7599
7649
|
// concat commandStack(.event)?(.hook)?
|
|
7600
7650
|
var fullEvent = [ 'commandStack', event, hook ].filter(function(e) { return e; }).join('.');
|
|
@@ -7622,7 +7672,7 @@
|
|
|
7622
7672
|
* This will generate the CommandInterceptor#(preExecute|...|reverted) methods
|
|
7623
7673
|
* which will in term forward to CommandInterceptor#on.
|
|
7624
7674
|
*/
|
|
7625
|
-
forEach$
|
|
7675
|
+
forEach$1(hooks, function(hook) {
|
|
7626
7676
|
|
|
7627
7677
|
/**
|
|
7628
7678
|
* {canExecute|preExecute|preExecuted|execute|executed|postExecute|postExecuted|revert|reverted}
|
|
@@ -7638,7 +7688,7 @@
|
|
|
7638
7688
|
*/
|
|
7639
7689
|
CommandInterceptor.prototype[hook] = function(events, priority, handlerFn, unwrap, that) {
|
|
7640
7690
|
|
|
7641
|
-
if (isFunction
|
|
7691
|
+
if (isFunction(events) || isNumber(events)) {
|
|
7642
7692
|
that = unwrap;
|
|
7643
7693
|
unwrap = handlerFn;
|
|
7644
7694
|
handlerFn = priority;
|
|
@@ -7858,7 +7908,7 @@
|
|
|
7858
7908
|
var shape = e.element,
|
|
7859
7909
|
bo = getBusinessObject(shape);
|
|
7860
7910
|
|
|
7861
|
-
var isPresent = find
|
|
7911
|
+
var isPresent = find(boParents, function(el) {
|
|
7862
7912
|
return el === bo;
|
|
7863
7913
|
});
|
|
7864
7914
|
|
|
@@ -8481,7 +8531,7 @@
|
|
|
8481
8531
|
*
|
|
8482
8532
|
* @return {boolean}
|
|
8483
8533
|
*/
|
|
8484
|
-
function isArray
|
|
8534
|
+
function isArray(obj) {
|
|
8485
8535
|
return Array.isArray(obj);
|
|
8486
8536
|
}
|
|
8487
8537
|
|
|
@@ -8508,7 +8558,7 @@
|
|
|
8508
8558
|
*/
|
|
8509
8559
|
function annotate(...args) {
|
|
8510
8560
|
|
|
8511
|
-
if (args.length === 1 && isArray
|
|
8561
|
+
if (args.length === 1 && isArray(args[0])) {
|
|
8512
8562
|
args = args[0];
|
|
8513
8563
|
}
|
|
8514
8564
|
|
|
@@ -8649,7 +8699,7 @@
|
|
|
8649
8699
|
}
|
|
8650
8700
|
|
|
8651
8701
|
if (typeof fn !== 'function') {
|
|
8652
|
-
if (isArray
|
|
8702
|
+
if (isArray(fn)) {
|
|
8653
8703
|
fn = annotate(fn.slice());
|
|
8654
8704
|
} else {
|
|
8655
8705
|
throw error(`Cannot invoke "${ fn }". Expected a function!`);
|
|
@@ -8921,7 +8971,7 @@
|
|
|
8921
8971
|
// helpers ///////////////
|
|
8922
8972
|
|
|
8923
8973
|
function arrayUnwrap(type, value) {
|
|
8924
|
-
if (type !== 'value' && isArray
|
|
8974
|
+
if (type !== 'value' && isArray(value)) {
|
|
8925
8975
|
value = annotate(value.slice());
|
|
8926
8976
|
}
|
|
8927
8977
|
|
|
@@ -8966,9 +9016,9 @@
|
|
|
8966
9016
|
});
|
|
8967
9017
|
|
|
8968
9018
|
if (isFrameElement(element)) {
|
|
8969
|
-
attr$1(rect, assign$
|
|
9019
|
+
attr$1(rect, assign$1({}, this.FRAME_STYLE, attrs || {}));
|
|
8970
9020
|
} else {
|
|
8971
|
-
attr$1(rect, assign$
|
|
9021
|
+
attr$1(rect, assign$1({}, this.SHAPE_STYLE, attrs || {}));
|
|
8972
9022
|
}
|
|
8973
9023
|
|
|
8974
9024
|
append(visuals, rect);
|
|
@@ -8978,7 +9028,7 @@
|
|
|
8978
9028
|
|
|
8979
9029
|
DefaultRenderer.prototype.drawConnection = function drawConnection(visuals, connection, attrs) {
|
|
8980
9030
|
|
|
8981
|
-
var line = createLine(connection.waypoints, assign$
|
|
9031
|
+
var line = createLine(connection.waypoints, assign$1({}, this.CONNECTION_STYLE, attrs || {}));
|
|
8982
9032
|
append(visuals, line);
|
|
8983
9033
|
|
|
8984
9034
|
return line;
|
|
@@ -9054,7 +9104,7 @@
|
|
|
9054
9104
|
this.cls = function(className, traits, additionalAttrs) {
|
|
9055
9105
|
var attrs = this.style(traits, additionalAttrs);
|
|
9056
9106
|
|
|
9057
|
-
return assign$
|
|
9107
|
+
return assign$1(attrs, { 'class': className });
|
|
9058
9108
|
};
|
|
9059
9109
|
|
|
9060
9110
|
/**
|
|
@@ -9067,25 +9117,25 @@
|
|
|
9067
9117
|
*/
|
|
9068
9118
|
this.style = function(traits, additionalAttrs) {
|
|
9069
9119
|
|
|
9070
|
-
if (!isArray$
|
|
9120
|
+
if (!isArray$2(traits) && !additionalAttrs) {
|
|
9071
9121
|
additionalAttrs = traits;
|
|
9072
9122
|
traits = [];
|
|
9073
9123
|
}
|
|
9074
9124
|
|
|
9075
9125
|
var attrs = reduce(traits, function(attrs, t) {
|
|
9076
|
-
return assign$
|
|
9126
|
+
return assign$1(attrs, defaultTraits[t] || {});
|
|
9077
9127
|
}, {});
|
|
9078
9128
|
|
|
9079
|
-
return additionalAttrs ? assign$
|
|
9129
|
+
return additionalAttrs ? assign$1(attrs, additionalAttrs) : attrs;
|
|
9080
9130
|
};
|
|
9081
9131
|
|
|
9082
9132
|
this.computeStyle = function(custom, traits, defaultStyles) {
|
|
9083
|
-
if (!isArray$
|
|
9133
|
+
if (!isArray$2(traits)) {
|
|
9084
9134
|
defaultStyles = traits;
|
|
9085
9135
|
traits = [];
|
|
9086
9136
|
}
|
|
9087
9137
|
|
|
9088
|
-
return self.style(traits || [], assign$
|
|
9138
|
+
return self.style(traits || [], assign$1({}, defaultStyles, custom || {}));
|
|
9089
9139
|
};
|
|
9090
9140
|
}
|
|
9091
9141
|
|
|
@@ -9194,7 +9244,7 @@
|
|
|
9194
9244
|
*/
|
|
9195
9245
|
function createContainer(options) {
|
|
9196
9246
|
|
|
9197
|
-
options = assign$
|
|
9247
|
+
options = assign$1({}, { width: '100%', height: '100%' }, options);
|
|
9198
9248
|
|
|
9199
9249
|
const container = options.container || document.body;
|
|
9200
9250
|
|
|
@@ -9204,7 +9254,7 @@
|
|
|
9204
9254
|
const parent = document.createElement('div');
|
|
9205
9255
|
parent.setAttribute('class', 'djs-container');
|
|
9206
9256
|
|
|
9207
|
-
assign
|
|
9257
|
+
assign(parent, {
|
|
9208
9258
|
position: 'relative',
|
|
9209
9259
|
overflow: 'hidden',
|
|
9210
9260
|
width: ensurePx(options.width),
|
|
@@ -9306,7 +9356,7 @@
|
|
|
9306
9356
|
// debounce canvas.viewbox.changed events
|
|
9307
9357
|
// for smoother diagram interaction
|
|
9308
9358
|
if (config.deferUpdate !== false) {
|
|
9309
|
-
this._viewboxChanged = debounce(bind$
|
|
9359
|
+
this._viewboxChanged = debounce(bind$2(this._viewboxChanged, this), 300);
|
|
9310
9360
|
}
|
|
9311
9361
|
|
|
9312
9362
|
eventBus.on('diagram.init', function() {
|
|
@@ -9607,7 +9657,7 @@
|
|
|
9607
9657
|
};
|
|
9608
9658
|
|
|
9609
9659
|
Canvas.prototype._findPlaneForRoot = function(rootElement) {
|
|
9610
|
-
return find
|
|
9660
|
+
return find(this._planes, function(plane) {
|
|
9611
9661
|
return plane.rootElement === rootElement;
|
|
9612
9662
|
});
|
|
9613
9663
|
};
|
|
@@ -9640,7 +9690,7 @@
|
|
|
9640
9690
|
return;
|
|
9641
9691
|
}
|
|
9642
9692
|
|
|
9643
|
-
forEach$
|
|
9693
|
+
forEach$1([ container.gfx, container.secondaryGfx ], function(gfx) {
|
|
9644
9694
|
if (gfx) {
|
|
9645
9695
|
|
|
9646
9696
|
// invoke either addClass or removeClass based on mode
|
|
@@ -10297,7 +10347,7 @@
|
|
|
10297
10347
|
|
|
10298
10348
|
if (delta) {
|
|
10299
10349
|
this._changeViewbox(function() {
|
|
10300
|
-
delta = assign$
|
|
10350
|
+
delta = assign$1({ dx: 0, dy: 0 }, delta || {});
|
|
10301
10351
|
|
|
10302
10352
|
matrix = this._svg.createSVGMatrix().translate(delta.dx, delta.dy).multiply(matrix);
|
|
10303
10353
|
|
|
@@ -10492,7 +10542,7 @@
|
|
|
10492
10542
|
const currentScale = currentMatrix.a;
|
|
10493
10543
|
|
|
10494
10544
|
if (center) {
|
|
10495
|
-
centerPoint = assign$
|
|
10545
|
+
centerPoint = assign$1(point, center);
|
|
10496
10546
|
|
|
10497
10547
|
// revert applied viewport transformations
|
|
10498
10548
|
originalPoint = centerPoint.matrixTransform(currentMatrix.inverse());
|
|
@@ -11386,7 +11436,7 @@
|
|
|
11386
11436
|
if (!Type) {
|
|
11387
11437
|
throw new Error('unknown type: <' + type + '>');
|
|
11388
11438
|
}
|
|
11389
|
-
return assign$
|
|
11439
|
+
return assign$1(new Type(), attrs);
|
|
11390
11440
|
}
|
|
11391
11441
|
|
|
11392
11442
|
/**
|
|
@@ -11423,7 +11473,7 @@
|
|
|
11423
11473
|
*/
|
|
11424
11474
|
ElementFactory.prototype.create = function(type, attrs) {
|
|
11425
11475
|
|
|
11426
|
-
attrs = assign$
|
|
11476
|
+
attrs = assign$1({}, attrs || {});
|
|
11427
11477
|
|
|
11428
11478
|
if (!attrs.id) {
|
|
11429
11479
|
attrs.id = type + '_' + (this._uid++);
|
|
@@ -11549,9 +11599,9 @@
|
|
|
11549
11599
|
*/
|
|
11550
11600
|
EventBus.prototype.on = function(events, priority, callback, that) {
|
|
11551
11601
|
|
|
11552
|
-
events = isArray$
|
|
11602
|
+
events = isArray$2(events) ? events : [ events ];
|
|
11553
11603
|
|
|
11554
|
-
if (isFunction
|
|
11604
|
+
if (isFunction(priority)) {
|
|
11555
11605
|
that = callback;
|
|
11556
11606
|
callback = priority;
|
|
11557
11607
|
priority = DEFAULT_PRIORITY;
|
|
@@ -11564,7 +11614,7 @@
|
|
|
11564
11614
|
var actualCallback = callback;
|
|
11565
11615
|
|
|
11566
11616
|
if (that) {
|
|
11567
|
-
actualCallback = bind$
|
|
11617
|
+
actualCallback = bind$2(callback, that);
|
|
11568
11618
|
|
|
11569
11619
|
// make sure we remember and are able to remove
|
|
11570
11620
|
// bound callbacks via {@link #off} using the original
|
|
@@ -11595,7 +11645,7 @@
|
|
|
11595
11645
|
EventBus.prototype.once = function(event, priority, callback, that) {
|
|
11596
11646
|
var self = this;
|
|
11597
11647
|
|
|
11598
|
-
if (isFunction
|
|
11648
|
+
if (isFunction(priority)) {
|
|
11599
11649
|
that = callback;
|
|
11600
11650
|
callback = priority;
|
|
11601
11651
|
priority = DEFAULT_PRIORITY;
|
|
@@ -11634,7 +11684,7 @@
|
|
|
11634
11684
|
*/
|
|
11635
11685
|
EventBus.prototype.off = function(events, callback) {
|
|
11636
11686
|
|
|
11637
|
-
events = isArray$
|
|
11687
|
+
events = isArray$2(events) ? events : [ events ];
|
|
11638
11688
|
|
|
11639
11689
|
var self = this;
|
|
11640
11690
|
|
|
@@ -11929,7 +11979,7 @@
|
|
|
11929
11979
|
};
|
|
11930
11980
|
|
|
11931
11981
|
InternalEvent.prototype.init = function(data) {
|
|
11932
|
-
assign$
|
|
11982
|
+
assign$1(this, data || {});
|
|
11933
11983
|
};
|
|
11934
11984
|
|
|
11935
11985
|
|
|
@@ -12102,7 +12152,7 @@
|
|
|
12102
12152
|
|
|
12103
12153
|
// update all parents of changed and reorganized their children
|
|
12104
12154
|
// in the correct order (as indicated in our model)
|
|
12105
|
-
forEach$
|
|
12155
|
+
forEach$1(parents, function(parent) {
|
|
12106
12156
|
|
|
12107
12157
|
var children = parent.children;
|
|
12108
12158
|
|
|
@@ -12112,7 +12162,7 @@
|
|
|
12112
12162
|
|
|
12113
12163
|
var childrenGfx = self._getChildrenContainer(parent);
|
|
12114
12164
|
|
|
12115
|
-
forEach$
|
|
12165
|
+
forEach$1(children.slice().reverse(), function(child) {
|
|
12116
12166
|
var childGfx = elementRegistry.getGraphics(child);
|
|
12117
12167
|
|
|
12118
12168
|
prependTo(childGfx.parentNode, childrenGfx);
|
|
@@ -12362,193 +12412,6 @@
|
|
|
12362
12412
|
this.get('eventBus').fire('diagram.clear');
|
|
12363
12413
|
};
|
|
12364
12414
|
|
|
12365
|
-
/**
|
|
12366
|
-
* Flatten array, one level deep.
|
|
12367
|
-
*
|
|
12368
|
-
* @param {Array<?>} arr
|
|
12369
|
-
*
|
|
12370
|
-
* @return {Array<?>}
|
|
12371
|
-
*/
|
|
12372
|
-
|
|
12373
|
-
var nativeToString$2 = Object.prototype.toString;
|
|
12374
|
-
function isString$2(obj) {
|
|
12375
|
-
return nativeToString$2.call(obj) === '[object String]';
|
|
12376
|
-
}
|
|
12377
|
-
|
|
12378
|
-
function _extends$2() {
|
|
12379
|
-
_extends$2 = Object.assign || function (target) {
|
|
12380
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
12381
|
-
var source = arguments[i];
|
|
12382
|
-
|
|
12383
|
-
for (var key in source) {
|
|
12384
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12385
|
-
target[key] = source[key];
|
|
12386
|
-
}
|
|
12387
|
-
}
|
|
12388
|
-
}
|
|
12389
|
-
|
|
12390
|
-
return target;
|
|
12391
|
-
};
|
|
12392
|
-
|
|
12393
|
-
return _extends$2.apply(this, arguments);
|
|
12394
|
-
}
|
|
12395
|
-
|
|
12396
|
-
/**
|
|
12397
|
-
* Convenience wrapper for `Object.assign`.
|
|
12398
|
-
*
|
|
12399
|
-
* @param {Object} target
|
|
12400
|
-
* @param {...Object} others
|
|
12401
|
-
*
|
|
12402
|
-
* @return {Object} the target
|
|
12403
|
-
*/
|
|
12404
|
-
|
|
12405
|
-
function assign$2(target) {
|
|
12406
|
-
for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
12407
|
-
others[_key - 1] = arguments[_key];
|
|
12408
|
-
}
|
|
12409
|
-
|
|
12410
|
-
return _extends$2.apply(void 0, [target].concat(others));
|
|
12411
|
-
}
|
|
12412
|
-
|
|
12413
|
-
/**
|
|
12414
|
-
* Flatten array, one level deep.
|
|
12415
|
-
*
|
|
12416
|
-
* @param {Array<?>} arr
|
|
12417
|
-
*
|
|
12418
|
-
* @return {Array<?>}
|
|
12419
|
-
*/
|
|
12420
|
-
|
|
12421
|
-
var nativeToString$1 = Object.prototype.toString;
|
|
12422
|
-
var nativeHasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
12423
|
-
function isUndefined$2(obj) {
|
|
12424
|
-
return obj === undefined;
|
|
12425
|
-
}
|
|
12426
|
-
function isArray$1(obj) {
|
|
12427
|
-
return nativeToString$1.call(obj) === '[object Array]';
|
|
12428
|
-
}
|
|
12429
|
-
function isObject(obj) {
|
|
12430
|
-
return nativeToString$1.call(obj) === '[object Object]';
|
|
12431
|
-
}
|
|
12432
|
-
function isString$1(obj) {
|
|
12433
|
-
return nativeToString$1.call(obj) === '[object String]';
|
|
12434
|
-
}
|
|
12435
|
-
/**
|
|
12436
|
-
* Return true, if target owns a property with the given key.
|
|
12437
|
-
*
|
|
12438
|
-
* @param {Object} target
|
|
12439
|
-
* @param {String} key
|
|
12440
|
-
*
|
|
12441
|
-
* @return {Boolean}
|
|
12442
|
-
*/
|
|
12443
|
-
|
|
12444
|
-
function has$1(target, key) {
|
|
12445
|
-
return nativeHasOwnProperty$1.call(target, key);
|
|
12446
|
-
}
|
|
12447
|
-
/**
|
|
12448
|
-
* Iterate over collection; returning something
|
|
12449
|
-
* (non-undefined) will stop iteration.
|
|
12450
|
-
*
|
|
12451
|
-
* @param {Array|Object} collection
|
|
12452
|
-
* @param {Function} iterator
|
|
12453
|
-
*
|
|
12454
|
-
* @return {Object} return result that stopped the iteration
|
|
12455
|
-
*/
|
|
12456
|
-
|
|
12457
|
-
function forEach$1(collection, iterator) {
|
|
12458
|
-
var val, result;
|
|
12459
|
-
|
|
12460
|
-
if (isUndefined$2(collection)) {
|
|
12461
|
-
return;
|
|
12462
|
-
}
|
|
12463
|
-
|
|
12464
|
-
var convertKey = isArray$1(collection) ? toNum$1 : identity$1;
|
|
12465
|
-
|
|
12466
|
-
for (var key in collection) {
|
|
12467
|
-
if (has$1(collection, key)) {
|
|
12468
|
-
val = collection[key];
|
|
12469
|
-
result = iterator(val, convertKey(key));
|
|
12470
|
-
|
|
12471
|
-
if (result === false) {
|
|
12472
|
-
return val;
|
|
12473
|
-
}
|
|
12474
|
-
}
|
|
12475
|
-
}
|
|
12476
|
-
}
|
|
12477
|
-
|
|
12478
|
-
function identity$1(arg) {
|
|
12479
|
-
return arg;
|
|
12480
|
-
}
|
|
12481
|
-
|
|
12482
|
-
function toNum$1(arg) {
|
|
12483
|
-
return Number(arg);
|
|
12484
|
-
}
|
|
12485
|
-
/**
|
|
12486
|
-
* Bind function against target <this>.
|
|
12487
|
-
*
|
|
12488
|
-
* @param {Function} fn
|
|
12489
|
-
* @param {Object} target
|
|
12490
|
-
*
|
|
12491
|
-
* @return {Function} bound function
|
|
12492
|
-
*/
|
|
12493
|
-
|
|
12494
|
-
function bind(fn, target) {
|
|
12495
|
-
return fn.bind(target);
|
|
12496
|
-
}
|
|
12497
|
-
|
|
12498
|
-
function _extends$1() {
|
|
12499
|
-
_extends$1 = Object.assign || function (target) {
|
|
12500
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
12501
|
-
var source = arguments[i];
|
|
12502
|
-
|
|
12503
|
-
for (var key in source) {
|
|
12504
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12505
|
-
target[key] = source[key];
|
|
12506
|
-
}
|
|
12507
|
-
}
|
|
12508
|
-
}
|
|
12509
|
-
|
|
12510
|
-
return target;
|
|
12511
|
-
};
|
|
12512
|
-
|
|
12513
|
-
return _extends$1.apply(this, arguments);
|
|
12514
|
-
}
|
|
12515
|
-
|
|
12516
|
-
/**
|
|
12517
|
-
* Convenience wrapper for `Object.assign`.
|
|
12518
|
-
*
|
|
12519
|
-
* @param {Object} target
|
|
12520
|
-
* @param {...Object} others
|
|
12521
|
-
*
|
|
12522
|
-
* @return {Object} the target
|
|
12523
|
-
*/
|
|
12524
|
-
|
|
12525
|
-
function assign$1(target) {
|
|
12526
|
-
for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
12527
|
-
others[_key - 1] = arguments[_key];
|
|
12528
|
-
}
|
|
12529
|
-
|
|
12530
|
-
return _extends$1.apply(void 0, [target].concat(others));
|
|
12531
|
-
}
|
|
12532
|
-
/**
|
|
12533
|
-
* Pick given properties from the target object.
|
|
12534
|
-
*
|
|
12535
|
-
* @param {Object} target
|
|
12536
|
-
* @param {Array} properties
|
|
12537
|
-
*
|
|
12538
|
-
* @return {Object} target
|
|
12539
|
-
*/
|
|
12540
|
-
|
|
12541
|
-
function pick(target, properties) {
|
|
12542
|
-
var result = {};
|
|
12543
|
-
var obj = Object(target);
|
|
12544
|
-
forEach$1(properties, function (prop) {
|
|
12545
|
-
if (prop in obj) {
|
|
12546
|
-
result[prop] = target[prop];
|
|
12547
|
-
}
|
|
12548
|
-
});
|
|
12549
|
-
return result;
|
|
12550
|
-
}
|
|
12551
|
-
|
|
12552
12415
|
/**
|
|
12553
12416
|
* Moddle base element.
|
|
12554
12417
|
*/
|
|
@@ -12601,7 +12464,7 @@
|
|
|
12601
12464
|
props.define(this, '$attrs', { value: {} });
|
|
12602
12465
|
props.define(this, '$parent', { writable: true });
|
|
12603
12466
|
|
|
12604
|
-
forEach$1(attrs, bind(function(val, key) {
|
|
12467
|
+
forEach$1(attrs, bind$2(function(val, key) {
|
|
12605
12468
|
this.set(key, val);
|
|
12606
12469
|
}, this));
|
|
12607
12470
|
}
|
|
@@ -12684,6 +12547,7 @@
|
|
|
12684
12547
|
localName = name;
|
|
12685
12548
|
prefix = defaultPrefix;
|
|
12686
12549
|
} else
|
|
12550
|
+
|
|
12687
12551
|
// prefix + local name
|
|
12688
12552
|
if (parts.length === 2) {
|
|
12689
12553
|
localName = parts[1];
|
|
@@ -12890,7 +12754,7 @@
|
|
|
12890
12754
|
return;
|
|
12891
12755
|
}
|
|
12892
12756
|
|
|
12893
|
-
forEach$1(t.properties, bind(function(p) {
|
|
12757
|
+
forEach$1(t.properties, bind$2(function(p) {
|
|
12894
12758
|
|
|
12895
12759
|
// clone property to allow extensions
|
|
12896
12760
|
p = assign$1({}, p, {
|
|
@@ -12937,7 +12801,7 @@
|
|
|
12937
12801
|
|
|
12938
12802
|
this.properties = properties;
|
|
12939
12803
|
|
|
12940
|
-
forEach$1(packages, bind(this.registerPackage, this));
|
|
12804
|
+
forEach$1(packages, bind$2(this.registerPackage, this));
|
|
12941
12805
|
}
|
|
12942
12806
|
|
|
12943
12807
|
|
|
@@ -12961,7 +12825,7 @@
|
|
|
12961
12825
|
ensureAvailable(pkgMap, pkg, 'uri');
|
|
12962
12826
|
|
|
12963
12827
|
// register types
|
|
12964
|
-
forEach$1(pkg.types, bind(function(descriptor) {
|
|
12828
|
+
forEach$1(pkg.types, bind$2(function(descriptor) {
|
|
12965
12829
|
this.registerType(descriptor, pkg);
|
|
12966
12830
|
}, this));
|
|
12967
12831
|
|
|
@@ -12987,7 +12851,7 @@
|
|
|
12987
12851
|
propertiesByName = {};
|
|
12988
12852
|
|
|
12989
12853
|
// parse properties
|
|
12990
|
-
forEach$1(type.properties, bind(function(p) {
|
|
12854
|
+
forEach$1(type.properties, bind$2(function(p) {
|
|
12991
12855
|
|
|
12992
12856
|
// namespace property names
|
|
12993
12857
|
var propertyNs = parseName(p.name, ns.prefix),
|
|
@@ -13013,7 +12877,7 @@
|
|
|
13013
12877
|
propertiesByName: propertiesByName
|
|
13014
12878
|
});
|
|
13015
12879
|
|
|
13016
|
-
forEach$1(type.extends, bind(function(extendsName) {
|
|
12880
|
+
forEach$1(type.extends, bind$2(function(extendsName) {
|
|
13017
12881
|
var extended = this.typeMap[extendsName];
|
|
13018
12882
|
|
|
13019
12883
|
extended.traits = extended.traits || [];
|
|
@@ -13108,7 +12972,7 @@
|
|
|
13108
12972
|
|
|
13109
12973
|
|
|
13110
12974
|
|
|
13111
|
-
|
|
12975
|
+
// helpers ////////////////////////////
|
|
13112
12976
|
|
|
13113
12977
|
function ensureAvailable(packageMap, pkg, identifierKey) {
|
|
13114
12978
|
|
|
@@ -13139,11 +13003,16 @@
|
|
|
13139
13003
|
*/
|
|
13140
13004
|
Properties.prototype.set = function(target, name, value) {
|
|
13141
13005
|
|
|
13006
|
+
if (!isString(name) || !name.length) {
|
|
13007
|
+
throw new TypeError('property name must be a non-empty string');
|
|
13008
|
+
}
|
|
13009
|
+
|
|
13142
13010
|
var property = this.model.getPropertyDescriptor(target, name);
|
|
13143
13011
|
|
|
13144
13012
|
var propertyName = property && property.name;
|
|
13145
13013
|
|
|
13146
|
-
if (isUndefined
|
|
13014
|
+
if (isUndefined(value)) {
|
|
13015
|
+
|
|
13147
13016
|
// unset the property, if the specified value is undefined;
|
|
13148
13017
|
// delete from $attrs (for extensions) or the target itself
|
|
13149
13018
|
if (property) {
|
|
@@ -13152,6 +13021,7 @@
|
|
|
13152
13021
|
delete target.$attrs[name];
|
|
13153
13022
|
}
|
|
13154
13023
|
} else {
|
|
13024
|
+
|
|
13155
13025
|
// set the property, defining well defined properties on the fly
|
|
13156
13026
|
// or simply updating them in target.$attrs (for extensions)
|
|
13157
13027
|
if (property) {
|
|
@@ -13234,7 +13104,7 @@
|
|
|
13234
13104
|
};
|
|
13235
13105
|
|
|
13236
13106
|
|
|
13237
|
-
function isUndefined
|
|
13107
|
+
function isUndefined(val) {
|
|
13238
13108
|
return typeof val === 'undefined';
|
|
13239
13109
|
}
|
|
13240
13110
|
|
|
@@ -13247,7 +13117,7 @@
|
|
|
13247
13117
|
});
|
|
13248
13118
|
}
|
|
13249
13119
|
|
|
13250
|
-
|
|
13120
|
+
// Moddle implementation /////////////////////////////////////////////////
|
|
13251
13121
|
|
|
13252
13122
|
/**
|
|
13253
13123
|
* @class Moddle
|
|
@@ -13323,7 +13193,7 @@
|
|
|
13323
13193
|
|
|
13324
13194
|
var cache = this.typeCache;
|
|
13325
13195
|
|
|
13326
|
-
var name = isString
|
|
13196
|
+
var name = isString(descriptor) ? descriptor : descriptor.ns.name;
|
|
13327
13197
|
|
|
13328
13198
|
var type = cache[name];
|
|
13329
13199
|
|
|
@@ -13456,180 +13326,6 @@
|
|
|
13456
13326
|
return this.registry.typeMap[type];
|
|
13457
13327
|
};
|
|
13458
13328
|
|
|
13459
|
-
/**
|
|
13460
|
-
* Flatten array, one level deep.
|
|
13461
|
-
*
|
|
13462
|
-
* @param {Array<?>} arr
|
|
13463
|
-
*
|
|
13464
|
-
* @return {Array<?>}
|
|
13465
|
-
*/
|
|
13466
|
-
|
|
13467
|
-
var nativeToString = Object.prototype.toString;
|
|
13468
|
-
var nativeHasOwnProperty = Object.prototype.hasOwnProperty;
|
|
13469
|
-
function isUndefined(obj) {
|
|
13470
|
-
return obj === undefined;
|
|
13471
|
-
}
|
|
13472
|
-
function isArray(obj) {
|
|
13473
|
-
return nativeToString.call(obj) === '[object Array]';
|
|
13474
|
-
}
|
|
13475
|
-
function isFunction(obj) {
|
|
13476
|
-
var tag = nativeToString.call(obj);
|
|
13477
|
-
return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object AsyncGeneratorFunction]' || tag === '[object Proxy]';
|
|
13478
|
-
}
|
|
13479
|
-
function isString(obj) {
|
|
13480
|
-
return nativeToString.call(obj) === '[object String]';
|
|
13481
|
-
}
|
|
13482
|
-
/**
|
|
13483
|
-
* Return true, if target owns a property with the given key.
|
|
13484
|
-
*
|
|
13485
|
-
* @param {Object} target
|
|
13486
|
-
* @param {String} key
|
|
13487
|
-
*
|
|
13488
|
-
* @return {Boolean}
|
|
13489
|
-
*/
|
|
13490
|
-
|
|
13491
|
-
function has(target, key) {
|
|
13492
|
-
return nativeHasOwnProperty.call(target, key);
|
|
13493
|
-
}
|
|
13494
|
-
|
|
13495
|
-
/**
|
|
13496
|
-
* Find element in collection.
|
|
13497
|
-
*
|
|
13498
|
-
* @param {Array|Object} collection
|
|
13499
|
-
* @param {Function|Object} matcher
|
|
13500
|
-
*
|
|
13501
|
-
* @return {Object}
|
|
13502
|
-
*/
|
|
13503
|
-
|
|
13504
|
-
function find(collection, matcher) {
|
|
13505
|
-
matcher = toMatcher(matcher);
|
|
13506
|
-
var match;
|
|
13507
|
-
forEach(collection, function (val, key) {
|
|
13508
|
-
if (matcher(val, key)) {
|
|
13509
|
-
match = val;
|
|
13510
|
-
return false;
|
|
13511
|
-
}
|
|
13512
|
-
});
|
|
13513
|
-
return match;
|
|
13514
|
-
}
|
|
13515
|
-
/**
|
|
13516
|
-
* Find element index in collection.
|
|
13517
|
-
*
|
|
13518
|
-
* @param {Array|Object} collection
|
|
13519
|
-
* @param {Function} matcher
|
|
13520
|
-
*
|
|
13521
|
-
* @return {Object}
|
|
13522
|
-
*/
|
|
13523
|
-
|
|
13524
|
-
function findIndex(collection, matcher) {
|
|
13525
|
-
matcher = toMatcher(matcher);
|
|
13526
|
-
var idx = isArray(collection) ? -1 : undefined;
|
|
13527
|
-
forEach(collection, function (val, key) {
|
|
13528
|
-
if (matcher(val, key)) {
|
|
13529
|
-
idx = key;
|
|
13530
|
-
return false;
|
|
13531
|
-
}
|
|
13532
|
-
});
|
|
13533
|
-
return idx;
|
|
13534
|
-
}
|
|
13535
|
-
/**
|
|
13536
|
-
* Find element in collection.
|
|
13537
|
-
*
|
|
13538
|
-
* @param {Array|Object} collection
|
|
13539
|
-
* @param {Function} matcher
|
|
13540
|
-
*
|
|
13541
|
-
* @return {Array} result
|
|
13542
|
-
*/
|
|
13543
|
-
|
|
13544
|
-
function filter(collection, matcher) {
|
|
13545
|
-
var result = [];
|
|
13546
|
-
forEach(collection, function (val, key) {
|
|
13547
|
-
if (matcher(val, key)) {
|
|
13548
|
-
result.push(val);
|
|
13549
|
-
}
|
|
13550
|
-
});
|
|
13551
|
-
return result;
|
|
13552
|
-
}
|
|
13553
|
-
/**
|
|
13554
|
-
* Iterate over collection; returning something
|
|
13555
|
-
* (non-undefined) will stop iteration.
|
|
13556
|
-
*
|
|
13557
|
-
* @param {Array|Object} collection
|
|
13558
|
-
* @param {Function} iterator
|
|
13559
|
-
*
|
|
13560
|
-
* @return {Object} return result that stopped the iteration
|
|
13561
|
-
*/
|
|
13562
|
-
|
|
13563
|
-
function forEach(collection, iterator) {
|
|
13564
|
-
var val, result;
|
|
13565
|
-
|
|
13566
|
-
if (isUndefined(collection)) {
|
|
13567
|
-
return;
|
|
13568
|
-
}
|
|
13569
|
-
|
|
13570
|
-
var convertKey = isArray(collection) ? toNum : identity;
|
|
13571
|
-
|
|
13572
|
-
for (var key in collection) {
|
|
13573
|
-
if (has(collection, key)) {
|
|
13574
|
-
val = collection[key];
|
|
13575
|
-
result = iterator(val, convertKey(key));
|
|
13576
|
-
|
|
13577
|
-
if (result === false) {
|
|
13578
|
-
return val;
|
|
13579
|
-
}
|
|
13580
|
-
}
|
|
13581
|
-
}
|
|
13582
|
-
}
|
|
13583
|
-
|
|
13584
|
-
function toMatcher(matcher) {
|
|
13585
|
-
return isFunction(matcher) ? matcher : function (e) {
|
|
13586
|
-
return e === matcher;
|
|
13587
|
-
};
|
|
13588
|
-
}
|
|
13589
|
-
|
|
13590
|
-
function identity(arg) {
|
|
13591
|
-
return arg;
|
|
13592
|
-
}
|
|
13593
|
-
|
|
13594
|
-
function toNum(arg) {
|
|
13595
|
-
return Number(arg);
|
|
13596
|
-
}
|
|
13597
|
-
|
|
13598
|
-
function _extends() {
|
|
13599
|
-
_extends = Object.assign || function (target) {
|
|
13600
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
13601
|
-
var source = arguments[i];
|
|
13602
|
-
|
|
13603
|
-
for (var key in source) {
|
|
13604
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
13605
|
-
target[key] = source[key];
|
|
13606
|
-
}
|
|
13607
|
-
}
|
|
13608
|
-
}
|
|
13609
|
-
|
|
13610
|
-
return target;
|
|
13611
|
-
};
|
|
13612
|
-
|
|
13613
|
-
return _extends.apply(this, arguments);
|
|
13614
|
-
}
|
|
13615
|
-
|
|
13616
|
-
/**
|
|
13617
|
-
* Convenience wrapper for `Object.assign`.
|
|
13618
|
-
*
|
|
13619
|
-
* @param {Object} target
|
|
13620
|
-
* @param {...Object} others
|
|
13621
|
-
*
|
|
13622
|
-
* @return {Object} the target
|
|
13623
|
-
*/
|
|
13624
|
-
|
|
13625
|
-
function assign(target) {
|
|
13626
|
-
for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
13627
|
-
others[_key - 1] = arguments[_key];
|
|
13628
|
-
}
|
|
13629
|
-
|
|
13630
|
-
return _extends.apply(void 0, [target].concat(others));
|
|
13631
|
-
}
|
|
13632
|
-
|
|
13633
13329
|
var fromCharCode = String.fromCharCode;
|
|
13634
13330
|
|
|
13635
13331
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
@@ -14804,7 +14500,7 @@
|
|
|
14804
14500
|
* @property {Boolean} lax
|
|
14805
14501
|
*/
|
|
14806
14502
|
|
|
14807
|
-
assign(this, options);
|
|
14503
|
+
assign$1(this, options);
|
|
14808
14504
|
|
|
14809
14505
|
this.elementsById = {};
|
|
14810
14506
|
this.references = [];
|
|
@@ -15025,7 +14721,7 @@
|
|
|
15025
14721
|
model = this.model,
|
|
15026
14722
|
propNameNs;
|
|
15027
14723
|
|
|
15028
|
-
forEach(attributes, function(value, name) {
|
|
14724
|
+
forEach$1(attributes, function(value, name) {
|
|
15029
14725
|
|
|
15030
14726
|
var prop = descriptor.propertiesByName[name],
|
|
15031
14727
|
values;
|
|
@@ -15043,7 +14739,7 @@
|
|
|
15043
14739
|
// IDREFS: parse references as whitespace-separated list
|
|
15044
14740
|
values = value.split(' ');
|
|
15045
14741
|
|
|
15046
|
-
forEach(values, function(v) {
|
|
14742
|
+
forEach$1(values, function(v) {
|
|
15047
14743
|
context.addReference({
|
|
15048
14744
|
element: instance,
|
|
15049
14745
|
property: prop.ns.name,
|
|
@@ -15110,7 +14806,7 @@
|
|
|
15110
14806
|
|
|
15111
14807
|
elementType = model.getType(elementTypeName);
|
|
15112
14808
|
|
|
15113
|
-
return assign({}, property, {
|
|
14809
|
+
return assign$1({}, property, {
|
|
15114
14810
|
effectiveType: getModdleDescriptor(elementType).name
|
|
15115
14811
|
});
|
|
15116
14812
|
}
|
|
@@ -15132,7 +14828,7 @@
|
|
|
15132
14828
|
});
|
|
15133
14829
|
|
|
15134
14830
|
if (property) {
|
|
15135
|
-
return assign({}, property, {
|
|
14831
|
+
return assign$1({}, property, {
|
|
15136
14832
|
effectiveType: getModdleDescriptor(elementType).name
|
|
15137
14833
|
});
|
|
15138
14834
|
}
|
|
@@ -15207,7 +14903,7 @@
|
|
|
15207
14903
|
}
|
|
15208
14904
|
|
|
15209
14905
|
if (propertyDesc.isReference) {
|
|
15210
|
-
assign(newElement, {
|
|
14906
|
+
assign$1(newElement, {
|
|
15211
14907
|
element: element
|
|
15212
14908
|
});
|
|
15213
14909
|
|
|
@@ -15316,7 +15012,7 @@
|
|
|
15316
15012
|
};
|
|
15317
15013
|
}
|
|
15318
15014
|
|
|
15319
|
-
assign(this, { lax: false }, options);
|
|
15015
|
+
assign$1(this, { lax: false }, options);
|
|
15320
15016
|
}
|
|
15321
15017
|
|
|
15322
15018
|
/**
|
|
@@ -15371,7 +15067,7 @@
|
|
|
15371
15067
|
var model = this.model,
|
|
15372
15068
|
lax = this.lax;
|
|
15373
15069
|
|
|
15374
|
-
var context = new Context(assign({}, options, { rootHandler: rootHandler })),
|
|
15070
|
+
var context = new Context(assign$1({}, options, { rootHandler: rootHandler })),
|
|
15375
15071
|
parser = new Parser({ proxy: true }),
|
|
15376
15072
|
stack = createStack();
|
|
15377
15073
|
|
|
@@ -15766,14 +15462,14 @@
|
|
|
15766
15462
|
|
|
15767
15463
|
function getElementNs(ns, descriptor) {
|
|
15768
15464
|
if (descriptor.isGeneric) {
|
|
15769
|
-
return assign({ localName: descriptor.ns.localName }, ns);
|
|
15465
|
+
return assign$1({ localName: descriptor.ns.localName }, ns);
|
|
15770
15466
|
} else {
|
|
15771
|
-
return assign({ localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg) }, ns);
|
|
15467
|
+
return assign$1({ localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg) }, ns);
|
|
15772
15468
|
}
|
|
15773
15469
|
}
|
|
15774
15470
|
|
|
15775
15471
|
function getPropertyNs(ns, descriptor) {
|
|
15776
|
-
return assign({ localName: descriptor.ns.localName }, ns);
|
|
15472
|
+
return assign$1({ localName: descriptor.ns.localName }, ns);
|
|
15777
15473
|
}
|
|
15778
15474
|
|
|
15779
15475
|
function getSerializableProperties(element) {
|
|
@@ -15787,7 +15483,7 @@
|
|
|
15787
15483
|
}
|
|
15788
15484
|
|
|
15789
15485
|
// do not serialize defaults
|
|
15790
|
-
if (!has(element, name)) {
|
|
15486
|
+
if (!has$1(element, name)) {
|
|
15791
15487
|
return false;
|
|
15792
15488
|
}
|
|
15793
15489
|
|
|
@@ -16005,7 +15701,7 @@
|
|
|
16005
15701
|
if (this.isLocalNs(effectiveNs)) {
|
|
16006
15702
|
return { localName: ns.localName };
|
|
16007
15703
|
} else {
|
|
16008
|
-
return assign({ localName: ns.localName }, effectiveNs);
|
|
15704
|
+
return assign$1({ localName: ns.localName }, effectiveNs);
|
|
16009
15705
|
}
|
|
16010
15706
|
};
|
|
16011
15707
|
|
|
@@ -16016,7 +15712,7 @@
|
|
|
16016
15712
|
|
|
16017
15713
|
var attributes = [];
|
|
16018
15714
|
|
|
16019
|
-
forEach(element, function(val, key) {
|
|
15715
|
+
forEach$1(element, function(val, key) {
|
|
16020
15716
|
|
|
16021
15717
|
var nonNsAttr;
|
|
16022
15718
|
|
|
@@ -16024,7 +15720,7 @@
|
|
|
16024
15720
|
body.push(new BodySerializer().build({ type: 'String' }, val));
|
|
16025
15721
|
} else
|
|
16026
15722
|
if (key === '$children') {
|
|
16027
|
-
forEach(val, function(child) {
|
|
15723
|
+
forEach$1(val, function(child) {
|
|
16028
15724
|
body.push(new ElementSerializer(self).build(child));
|
|
16029
15725
|
});
|
|
16030
15726
|
} else
|
|
@@ -16094,7 +15790,7 @@
|
|
|
16094
15790
|
// parse namespace attributes first
|
|
16095
15791
|
// and log them. push non namespace attributes to a list
|
|
16096
15792
|
// and process them later
|
|
16097
|
-
forEach(genericAttrs, function(value, name) {
|
|
15793
|
+
forEach$1(genericAttrs, function(value, name) {
|
|
16098
15794
|
|
|
16099
15795
|
var nonNsAttr = self.parseNsAttribute(element, name, value);
|
|
16100
15796
|
|
|
@@ -16110,7 +15806,7 @@
|
|
|
16110
15806
|
|
|
16111
15807
|
var self = this;
|
|
16112
15808
|
|
|
16113
|
-
forEach(attributes, function(attr) {
|
|
15809
|
+
forEach$1(attributes, function(attr) {
|
|
16114
15810
|
|
|
16115
15811
|
// do not serialize xsi:type attribute
|
|
16116
15812
|
// it is set manually based on the actual implementation type
|
|
@@ -16121,6 +15817,8 @@
|
|
|
16121
15817
|
try {
|
|
16122
15818
|
self.addAttribute(self.nsAttributeName(attr.name), attr.value);
|
|
16123
15819
|
} catch (e) {
|
|
15820
|
+
/* global console */
|
|
15821
|
+
|
|
16124
15822
|
console.warn(
|
|
16125
15823
|
'missing namespace information for ',
|
|
16126
15824
|
attr.name, '=', attr.value, 'on', element,
|
|
@@ -16135,7 +15833,7 @@
|
|
|
16135
15833
|
body = this.body,
|
|
16136
15834
|
element = this.element;
|
|
16137
15835
|
|
|
16138
|
-
forEach(properties, function(p) {
|
|
15836
|
+
forEach$1(properties, function(p) {
|
|
16139
15837
|
var value = element.get(p.name),
|
|
16140
15838
|
isReference = p.isReference,
|
|
16141
15839
|
isMany = p.isMany;
|
|
@@ -16148,12 +15846,12 @@
|
|
|
16148
15846
|
body.push(new BodySerializer().build(p, value[0]));
|
|
16149
15847
|
} else
|
|
16150
15848
|
if (isSimple(p.type)) {
|
|
16151
|
-
forEach(value, function(v) {
|
|
15849
|
+
forEach$1(value, function(v) {
|
|
16152
15850
|
body.push(new ValueSerializer(self.addTagName(self.nsPropertyTagName(p))).build(p, v));
|
|
16153
15851
|
});
|
|
16154
15852
|
} else
|
|
16155
15853
|
if (isReference) {
|
|
16156
|
-
forEach(value, function(v) {
|
|
15854
|
+
forEach$1(value, function(v) {
|
|
16157
15855
|
body.push(new ReferenceSerializer(self.addTagName(self.nsPropertyTagName(p))).build(v));
|
|
16158
15856
|
});
|
|
16159
15857
|
} else {
|
|
@@ -16163,7 +15861,7 @@
|
|
|
16163
15861
|
var asType = serializeAsType(p),
|
|
16164
15862
|
asProperty = serializeAsProperty(p);
|
|
16165
15863
|
|
|
16166
|
-
forEach(value, function(v) {
|
|
15864
|
+
forEach$1(value, function(v) {
|
|
16167
15865
|
var serializer;
|
|
16168
15866
|
|
|
16169
15867
|
if (asType) {
|
|
@@ -16271,7 +15969,7 @@
|
|
|
16271
15969
|
var self = this,
|
|
16272
15970
|
element = this.element;
|
|
16273
15971
|
|
|
16274
|
-
forEach(properties, function(p) {
|
|
15972
|
+
forEach$1(properties, function(p) {
|
|
16275
15973
|
|
|
16276
15974
|
var value = element.get(p.name);
|
|
16277
15975
|
|
|
@@ -16282,7 +15980,7 @@
|
|
|
16282
15980
|
}
|
|
16283
15981
|
else {
|
|
16284
15982
|
var values = [];
|
|
16285
|
-
forEach(value, function(v) {
|
|
15983
|
+
forEach$1(value, function(v) {
|
|
16286
15984
|
values.push(v.id);
|
|
16287
15985
|
});
|
|
16288
15986
|
|
|
@@ -16338,7 +16036,7 @@
|
|
|
16338
16036
|
attrs = getNsAttrs(namespaces).concat(attrs);
|
|
16339
16037
|
}
|
|
16340
16038
|
|
|
16341
|
-
forEach(attrs, function(a) {
|
|
16039
|
+
forEach$1(attrs, function(a) {
|
|
16342
16040
|
writer
|
|
16343
16041
|
.append(' ')
|
|
16344
16042
|
.append(nsName(a.name)).append('="').append(a.value).append('"');
|
|
@@ -16365,7 +16063,7 @@
|
|
|
16365
16063
|
.indent();
|
|
16366
16064
|
}
|
|
16367
16065
|
|
|
16368
|
-
forEach(this.body, function(b) {
|
|
16066
|
+
forEach$1(this.body, function(b) {
|
|
16369
16067
|
b.serializeTo(writer);
|
|
16370
16068
|
});
|
|
16371
16069
|
|
|
@@ -16433,7 +16131,7 @@
|
|
|
16433
16131
|
|
|
16434
16132
|
function FormatingWriter(out, format) {
|
|
16435
16133
|
|
|
16436
|
-
var indent = [''];
|
|
16134
|
+
var indent = [ '' ];
|
|
16437
16135
|
|
|
16438
16136
|
this.append = function(str) {
|
|
16439
16137
|
out.write(str);
|
|
@@ -16475,7 +16173,7 @@
|
|
|
16475
16173
|
*/
|
|
16476
16174
|
function Writer(options) {
|
|
16477
16175
|
|
|
16478
|
-
options = assign({ format: false, preamble: true }, options || {});
|
|
16176
|
+
options = assign$1({ format: false, preamble: true }, options || {});
|
|
16479
16177
|
|
|
16480
16178
|
function toXML(tree, writer) {
|
|
16481
16179
|
var internalWriter = writer || new SavingWriter();
|
|
@@ -16542,12 +16240,12 @@
|
|
|
16542
16240
|
*/
|
|
16543
16241
|
BpmnModdle.prototype.fromXML = function(xmlStr, typeName, options) {
|
|
16544
16242
|
|
|
16545
|
-
if (!isString
|
|
16243
|
+
if (!isString(typeName)) {
|
|
16546
16244
|
options = typeName;
|
|
16547
16245
|
typeName = 'bpmn:Definitions';
|
|
16548
16246
|
}
|
|
16549
16247
|
|
|
16550
|
-
var reader = new Reader(assign$
|
|
16248
|
+
var reader = new Reader(assign$1({ model: this, lax: true }, options));
|
|
16551
16249
|
var rootHandler = reader.handler(typeName);
|
|
16552
16250
|
|
|
16553
16251
|
return reader.fromXML(xmlStr, rootHandler);
|
|
@@ -20234,7 +19932,7 @@
|
|
|
20234
19932
|
};
|
|
20235
19933
|
|
|
20236
19934
|
function simple(additionalPackages, options) {
|
|
20237
|
-
var pks = assign$
|
|
19935
|
+
var pks = assign$1({}, packages, additionalPackages);
|
|
20238
19936
|
|
|
20239
19937
|
return new BpmnModdle(pks, options);
|
|
20240
19938
|
}
|
|
@@ -20258,7 +19956,7 @@
|
|
|
20258
19956
|
}
|
|
20259
19957
|
|
|
20260
19958
|
var argLen = arguments.length;
|
|
20261
|
-
if (argLen >= 1 && isFunction
|
|
19959
|
+
if (argLen >= 1 && isFunction(arguments[argLen - 1])) {
|
|
20262
19960
|
|
|
20263
19961
|
var callback = arguments[argLen - 1];
|
|
20264
19962
|
|
|
@@ -20299,7 +19997,7 @@
|
|
|
20299
19997
|
function ensureCompatDiRef(businessObject) {
|
|
20300
19998
|
|
|
20301
19999
|
// bpmnElement can have multiple independent DIs
|
|
20302
|
-
if (!has$
|
|
20000
|
+
if (!has$1(businessObject, 'di')) {
|
|
20303
20001
|
Object.defineProperty(businessObject, 'di', {
|
|
20304
20002
|
enumerable: false,
|
|
20305
20003
|
get: function() {
|
|
@@ -20327,7 +20025,7 @@
|
|
|
20327
20025
|
* correctly specify one.
|
|
20328
20026
|
*/
|
|
20329
20027
|
function findDisplayCandidate(definitions) {
|
|
20330
|
-
return find
|
|
20028
|
+
return find(definitions.rootElements, function(e) {
|
|
20331
20029
|
return is(e, 'bpmn:Process') || is(e, 'bpmn:Collaboration');
|
|
20332
20030
|
});
|
|
20333
20031
|
}
|
|
@@ -20434,7 +20132,7 @@
|
|
|
20434
20132
|
function handlePlane(plane) {
|
|
20435
20133
|
registerDi(plane);
|
|
20436
20134
|
|
|
20437
|
-
forEach$
|
|
20135
|
+
forEach$1(plane.planeElement, handlePlaneElement);
|
|
20438
20136
|
}
|
|
20439
20137
|
|
|
20440
20138
|
function handlePlaneElement(planeElement) {
|
|
@@ -20559,7 +20257,7 @@
|
|
|
20559
20257
|
// walk through all processes that have not yet been drawn and draw them
|
|
20560
20258
|
// if they contain lanes with DI information.
|
|
20561
20259
|
// we do this to pass the free-floating lane test cases in the MIWG test suite
|
|
20562
|
-
var processes = filter
|
|
20260
|
+
var processes = filter(rootElements, function(e) {
|
|
20563
20261
|
return !isHandled(e) && is(e, 'bpmn:Process') && e.laneSets;
|
|
20564
20262
|
});
|
|
20565
20263
|
|
|
@@ -20571,7 +20269,7 @@
|
|
|
20571
20269
|
}
|
|
20572
20270
|
|
|
20573
20271
|
function handleMessageFlows(messageFlows, context) {
|
|
20574
|
-
forEach$
|
|
20272
|
+
forEach$1(messageFlows, contextual(handleMessageFlow, context));
|
|
20575
20273
|
}
|
|
20576
20274
|
|
|
20577
20275
|
function handleDataAssociation(association, context) {
|
|
@@ -20597,7 +20295,7 @@
|
|
|
20597
20295
|
|
|
20598
20296
|
function handleArtifacts(artifacts, context) {
|
|
20599
20297
|
|
|
20600
|
-
forEach$
|
|
20298
|
+
forEach$1(artifacts, function(e) {
|
|
20601
20299
|
if (is(e, 'bpmn:Association')) {
|
|
20602
20300
|
deferred.push(function() {
|
|
20603
20301
|
handleArtifact(e, context);
|
|
@@ -20614,8 +20312,8 @@
|
|
|
20614
20312
|
return;
|
|
20615
20313
|
}
|
|
20616
20314
|
|
|
20617
|
-
forEach$
|
|
20618
|
-
forEach$
|
|
20315
|
+
forEach$1(ioSpecification.dataInputs, contextual(handleDataInput, context));
|
|
20316
|
+
forEach$1(ioSpecification.dataOutputs, contextual(handleDataOutput, context));
|
|
20619
20317
|
}
|
|
20620
20318
|
|
|
20621
20319
|
function handleSubProcess(subProcess, context) {
|
|
@@ -20642,8 +20340,8 @@
|
|
|
20642
20340
|
// * bpmn:CatchEvent
|
|
20643
20341
|
//
|
|
20644
20342
|
deferred.push(function() {
|
|
20645
|
-
forEach$
|
|
20646
|
-
forEach$
|
|
20343
|
+
forEach$1(flowNode.dataInputAssociations, contextual(handleDataAssociation, context));
|
|
20344
|
+
forEach$1(flowNode.dataOutputAssociations, contextual(handleDataAssociation, context));
|
|
20647
20345
|
});
|
|
20648
20346
|
}
|
|
20649
20347
|
|
|
@@ -20670,11 +20368,11 @@
|
|
|
20670
20368
|
}
|
|
20671
20369
|
|
|
20672
20370
|
function handleLaneSet(laneSet, context) {
|
|
20673
|
-
forEach$
|
|
20371
|
+
forEach$1(laneSet.lanes, contextual(handleLane, context));
|
|
20674
20372
|
}
|
|
20675
20373
|
|
|
20676
20374
|
function handleLaneSets(laneSets, context) {
|
|
20677
|
-
forEach$
|
|
20375
|
+
forEach$1(laneSets, contextual(handleLaneSet, context));
|
|
20678
20376
|
}
|
|
20679
20377
|
|
|
20680
20378
|
function handleFlowElementsContainer(container, context) {
|
|
@@ -20686,7 +20384,7 @@
|
|
|
20686
20384
|
}
|
|
20687
20385
|
|
|
20688
20386
|
function handleFlowElements(flowElements, context) {
|
|
20689
|
-
forEach$
|
|
20387
|
+
forEach$1(flowElements, function(e) {
|
|
20690
20388
|
if (is(e, 'bpmn:SequenceFlow')) {
|
|
20691
20389
|
deferred.push(function() {
|
|
20692
20390
|
handleSequenceFlow(e, context);
|
|
@@ -20724,7 +20422,7 @@
|
|
|
20724
20422
|
|
|
20725
20423
|
function handleCollaboration(collaboration, context) {
|
|
20726
20424
|
|
|
20727
|
-
forEach$
|
|
20425
|
+
forEach$1(collaboration.participants, contextual(handleParticipant, context));
|
|
20728
20426
|
|
|
20729
20427
|
handleArtifacts(collaboration.artifacts, context);
|
|
20730
20428
|
|
|
@@ -20738,7 +20436,7 @@
|
|
|
20738
20436
|
function wireFlowNodeRefs(lane) {
|
|
20739
20437
|
|
|
20740
20438
|
// wire the virtual flowNodeRefs <-> relationship
|
|
20741
|
-
forEach$
|
|
20439
|
+
forEach$1(lane.flowNodeRef, function(flowNode) {
|
|
20742
20440
|
var lanes = flowNode.get('lanes');
|
|
20743
20441
|
|
|
20744
20442
|
if (lanes) {
|
|
@@ -20832,7 +20530,7 @@
|
|
|
20832
20530
|
|
|
20833
20531
|
// traverse BPMN 2.0 document model,
|
|
20834
20532
|
// starting at definitions
|
|
20835
|
-
forEach$
|
|
20533
|
+
forEach$1(diagramsToImport, function(diagram) {
|
|
20836
20534
|
walker.handleDefinitions(definitions, diagram);
|
|
20837
20535
|
});
|
|
20838
20536
|
|
|
@@ -20899,12 +20597,12 @@
|
|
|
20899
20597
|
if (is$1(rootElement, 'bpmn:Collaboration')) {
|
|
20900
20598
|
collaboration = rootElement;
|
|
20901
20599
|
} else {
|
|
20902
|
-
collaboration = find
|
|
20600
|
+
collaboration = find(definitions.rootElements, function(element) {
|
|
20903
20601
|
if (!is$1(element, 'bpmn:Collaboration')) {
|
|
20904
20602
|
return;
|
|
20905
20603
|
}
|
|
20906
20604
|
|
|
20907
|
-
return find
|
|
20605
|
+
return find(element.participants, function(participant) {
|
|
20908
20606
|
return participant.processRef === rootElement;
|
|
20909
20607
|
});
|
|
20910
20608
|
});
|
|
@@ -20928,7 +20626,7 @@
|
|
|
20928
20626
|
var diagramsToImport = [ bpmnDiagram ];
|
|
20929
20627
|
var handledElements = [ bpmnElement ];
|
|
20930
20628
|
|
|
20931
|
-
forEach$
|
|
20629
|
+
forEach$1(definitions.diagrams, function(diagram) {
|
|
20932
20630
|
var businessObject = diagram.plane.bpmnElement;
|
|
20933
20631
|
|
|
20934
20632
|
if (
|
|
@@ -20947,7 +20645,7 @@
|
|
|
20947
20645
|
function selfAndAllFlowElements(elements) {
|
|
20948
20646
|
var result = [];
|
|
20949
20647
|
|
|
20950
|
-
forEach$
|
|
20648
|
+
forEach$1(elements, function(element) {
|
|
20951
20649
|
if (!element) {
|
|
20952
20650
|
return;
|
|
20953
20651
|
}
|
|
@@ -21042,11 +20740,11 @@
|
|
|
21042
20740
|
function createLightbox() {
|
|
21043
20741
|
lightbox = domify$1(LIGHTBOX_MARKUP);
|
|
21044
20742
|
|
|
21045
|
-
assign
|
|
21046
|
-
assign
|
|
21047
|
-
assign
|
|
21048
|
-
assign
|
|
21049
|
-
assign
|
|
20743
|
+
assign(lightbox, LIGHTBOX_STYLES);
|
|
20744
|
+
assign(query('svg', lightbox), LOGO_STYLES);
|
|
20745
|
+
assign(query('.backdrop', lightbox), BACKDROP_STYLES);
|
|
20746
|
+
assign(query('.notice', lightbox), NOTICE_STYLES);
|
|
20747
|
+
assign(query('.link', lightbox), LINK_STYLES, {
|
|
21050
20748
|
'margin': '15px 20px 15px 10px',
|
|
21051
20749
|
'alignSelf': 'center'
|
|
21052
20750
|
});
|
|
@@ -21088,7 +20786,7 @@
|
|
|
21088
20786
|
*/
|
|
21089
20787
|
function BaseViewer(options) {
|
|
21090
20788
|
|
|
21091
|
-
options = assign$
|
|
20789
|
+
options = assign$1({}, DEFAULT_OPTIONS, options);
|
|
21092
20790
|
|
|
21093
20791
|
this._moddle = this._createModdle(options);
|
|
21094
20792
|
|
|
@@ -21630,8 +21328,8 @@
|
|
|
21630
21328
|
|
|
21631
21329
|
const diagramModules = [].concat(staticModules, baseModules, additionalModules);
|
|
21632
21330
|
|
|
21633
|
-
const diagramOptions = assign$
|
|
21634
|
-
canvas: assign$
|
|
21331
|
+
const diagramOptions = assign$1(omit(options, [ 'additionalModules' ]), {
|
|
21332
|
+
canvas: assign$1({}, options.canvas, { container: container }),
|
|
21635
21333
|
modules: diagramModules
|
|
21636
21334
|
});
|
|
21637
21335
|
|
|
@@ -21659,7 +21357,7 @@
|
|
|
21659
21357
|
|
|
21660
21358
|
const container = domify$1('<div class="bjs-container"></div>');
|
|
21661
21359
|
|
|
21662
|
-
assign
|
|
21360
|
+
assign(container, {
|
|
21663
21361
|
width: ensureUnit(options.width),
|
|
21664
21362
|
height: ensureUnit(options.height),
|
|
21665
21363
|
position: options.position
|
|
@@ -21669,7 +21367,7 @@
|
|
|
21669
21367
|
};
|
|
21670
21368
|
|
|
21671
21369
|
BaseViewer.prototype._createModdle = function(options) {
|
|
21672
|
-
const moddleOptions = assign$
|
|
21370
|
+
const moddleOptions = assign$1({}, this._moddleExtensions, options.moddleExtensions);
|
|
21673
21371
|
|
|
21674
21372
|
return new simple(moddleOptions);
|
|
21675
21373
|
};
|
|
@@ -21728,7 +21426,7 @@
|
|
|
21728
21426
|
return null;
|
|
21729
21427
|
}
|
|
21730
21428
|
|
|
21731
|
-
return find
|
|
21429
|
+
return find(definitions.diagrams, function(element) {
|
|
21732
21430
|
return element.id === diagramId;
|
|
21733
21431
|
}) || null;
|
|
21734
21432
|
}
|
|
@@ -21755,8 +21453,8 @@
|
|
|
21755
21453
|
|
|
21756
21454
|
const linkElement = domify$1(linkMarkup);
|
|
21757
21455
|
|
|
21758
|
-
assign
|
|
21759
|
-
assign
|
|
21456
|
+
assign(query('svg', linkElement), LOGO_STYLES);
|
|
21457
|
+
assign(linkElement, LINK_STYLES, {
|
|
21760
21458
|
position: 'absolute',
|
|
21761
21459
|
bottom: '15px',
|
|
21762
21460
|
right: '15px',
|