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-navigated-viewer v10.
|
|
2
|
+
* bpmn-js - bpmn-navigated-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,
|
|
@@ -5930,13 +5980,13 @@
|
|
|
5930
5980
|
}
|
|
5931
5981
|
|
|
5932
5982
|
function registerEvents(svg) {
|
|
5933
|
-
forEach$
|
|
5983
|
+
forEach$1(bindings, function(val, key) {
|
|
5934
5984
|
registerEvent(svg, key, val);
|
|
5935
5985
|
});
|
|
5936
5986
|
}
|
|
5937
5987
|
|
|
5938
5988
|
function unregisterEvents(svg) {
|
|
5939
|
-
forEach$
|
|
5989
|
+
forEach$1(bindings, function(val, key) {
|
|
5940
5990
|
unregisterEvent(svg, key, val);
|
|
5941
5991
|
});
|
|
5942
5992
|
}
|
|
@@ -6007,7 +6057,7 @@
|
|
|
6007
6057
|
|
|
6008
6058
|
function createHitStyle(classNames, attrs) {
|
|
6009
6059
|
|
|
6010
|
-
attrs = assign$
|
|
6060
|
+
attrs = assign$1({
|
|
6011
6061
|
stroke: 'white',
|
|
6012
6062
|
strokeWidth: 15
|
|
6013
6063
|
}, attrs || {});
|
|
@@ -6046,7 +6096,7 @@
|
|
|
6046
6096
|
this.removeHits = function(gfx) {
|
|
6047
6097
|
var hits = all('.djs-hit', gfx);
|
|
6048
6098
|
|
|
6049
|
-
forEach$
|
|
6099
|
+
forEach$1(hits, remove$2);
|
|
6050
6100
|
};
|
|
6051
6101
|
|
|
6052
6102
|
/**
|
|
@@ -6105,7 +6155,7 @@
|
|
|
6105
6155
|
*/
|
|
6106
6156
|
this.createBoxHit = function(gfx, type, attrs) {
|
|
6107
6157
|
|
|
6108
|
-
attrs = assign$
|
|
6158
|
+
attrs = assign$1({
|
|
6109
6159
|
x: 0,
|
|
6110
6160
|
y: 0
|
|
6111
6161
|
}, attrs);
|
|
@@ -6262,7 +6312,7 @@
|
|
|
6262
6312
|
function getBBox(elements, stopRecursion) {
|
|
6263
6313
|
|
|
6264
6314
|
stopRecursion = !!stopRecursion;
|
|
6265
|
-
if (!isArray$
|
|
6315
|
+
if (!isArray$2(elements)) {
|
|
6266
6316
|
elements = [ elements ];
|
|
6267
6317
|
}
|
|
6268
6318
|
|
|
@@ -6271,7 +6321,7 @@
|
|
|
6271
6321
|
maxX,
|
|
6272
6322
|
maxY;
|
|
6273
6323
|
|
|
6274
|
-
forEach$
|
|
6324
|
+
forEach$1(elements, function(element) {
|
|
6275
6325
|
|
|
6276
6326
|
// If element is a connection the bbox must be computed first
|
|
6277
6327
|
var bbox = element;
|
|
@@ -6350,7 +6400,7 @@
|
|
|
6350
6400
|
function createOutline(gfx, bounds) {
|
|
6351
6401
|
var outline = create$1('rect');
|
|
6352
6402
|
|
|
6353
|
-
attr$1(outline, assign$
|
|
6403
|
+
attr$1(outline, assign$1({
|
|
6354
6404
|
x: 10,
|
|
6355
6405
|
y: 10,
|
|
6356
6406
|
rx: 3,
|
|
@@ -6509,7 +6559,7 @@
|
|
|
6509
6559
|
var selectedElements = this._selectedElements,
|
|
6510
6560
|
oldSelection = selectedElements.slice();
|
|
6511
6561
|
|
|
6512
|
-
if (!isArray$
|
|
6562
|
+
if (!isArray$2(elements)) {
|
|
6513
6563
|
elements = elements ? [ elements ] : [];
|
|
6514
6564
|
}
|
|
6515
6565
|
|
|
@@ -6526,7 +6576,7 @@
|
|
|
6526
6576
|
// selection may be cleared by passing an empty array or null
|
|
6527
6577
|
// to the method
|
|
6528
6578
|
if (add) {
|
|
6529
|
-
forEach$
|
|
6579
|
+
forEach$1(elements, function(element) {
|
|
6530
6580
|
if (selectedElements.indexOf(element) !== -1) {
|
|
6531
6581
|
|
|
6532
6582
|
// already selected
|
|
@@ -6595,13 +6645,13 @@
|
|
|
6595
6645
|
var oldSelection = event.oldSelection,
|
|
6596
6646
|
newSelection = event.newSelection;
|
|
6597
6647
|
|
|
6598
|
-
forEach$
|
|
6648
|
+
forEach$1(oldSelection, function(e) {
|
|
6599
6649
|
if (newSelection.indexOf(e) === -1) {
|
|
6600
6650
|
deselect(e);
|
|
6601
6651
|
}
|
|
6602
6652
|
});
|
|
6603
6653
|
|
|
6604
|
-
forEach$
|
|
6654
|
+
forEach$1(newSelection, function(e) {
|
|
6605
6655
|
if (oldSelection.indexOf(e) === -1) {
|
|
6606
6656
|
select(e);
|
|
6607
6657
|
}
|
|
@@ -6643,7 +6693,7 @@
|
|
|
6643
6693
|
|
|
6644
6694
|
var rect = create$1('rect');
|
|
6645
6695
|
|
|
6646
|
-
attr$1(rect, assign$
|
|
6696
|
+
attr$1(rect, assign$1({
|
|
6647
6697
|
rx: 3
|
|
6648
6698
|
}, bBox));
|
|
6649
6699
|
|
|
@@ -6680,7 +6730,7 @@
|
|
|
6680
6730
|
return;
|
|
6681
6731
|
}
|
|
6682
6732
|
|
|
6683
|
-
if (isArray$
|
|
6733
|
+
if (isArray$2(autoSelect)) {
|
|
6684
6734
|
selection.select(autoSelect);
|
|
6685
6735
|
} else {
|
|
6686
6736
|
|
|
@@ -6707,7 +6757,7 @@
|
|
|
6707
6757
|
var shape = elementRegistry.get(event.context.shape.id);
|
|
6708
6758
|
|
|
6709
6759
|
// Always select main shape on move
|
|
6710
|
-
var isSelected = find
|
|
6760
|
+
var isSelected = find(previousSelection, function(selectedShape) {
|
|
6711
6761
|
return shape.id === selectedShape.id;
|
|
6712
6762
|
});
|
|
6713
6763
|
|
|
@@ -6886,7 +6936,7 @@
|
|
|
6886
6936
|
|
|
6887
6937
|
this._ids = ids;
|
|
6888
6938
|
|
|
6889
|
-
this._overlayDefaults = assign$
|
|
6939
|
+
this._overlayDefaults = assign$1({
|
|
6890
6940
|
|
|
6891
6941
|
// no show constraints
|
|
6892
6942
|
show: null,
|
|
@@ -6948,11 +6998,11 @@
|
|
|
6948
6998
|
*/
|
|
6949
6999
|
Overlays.prototype.get = function(search) {
|
|
6950
7000
|
|
|
6951
|
-
if (isString
|
|
7001
|
+
if (isString(search)) {
|
|
6952
7002
|
search = { id: search };
|
|
6953
7003
|
}
|
|
6954
7004
|
|
|
6955
|
-
if (isString
|
|
7005
|
+
if (isString(search.element)) {
|
|
6956
7006
|
search.element = this._elementRegistry.get(search.element);
|
|
6957
7007
|
}
|
|
6958
7008
|
|
|
@@ -6961,13 +7011,13 @@
|
|
|
6961
7011
|
|
|
6962
7012
|
// return a list of overlays when searching by element (+type)
|
|
6963
7013
|
if (container) {
|
|
6964
|
-
return search.type ? filter
|
|
7014
|
+
return search.type ? filter(container.overlays, matchPattern({ type: search.type })) : container.overlays.slice();
|
|
6965
7015
|
} else {
|
|
6966
7016
|
return [];
|
|
6967
7017
|
}
|
|
6968
7018
|
} else
|
|
6969
7019
|
if (search.type) {
|
|
6970
|
-
return filter
|
|
7020
|
+
return filter(this._overlays, matchPattern({ type: search.type }));
|
|
6971
7021
|
} else {
|
|
6972
7022
|
|
|
6973
7023
|
// return single element when searching by id
|
|
@@ -7000,7 +7050,7 @@
|
|
|
7000
7050
|
*/
|
|
7001
7051
|
Overlays.prototype.add = function(element, type, overlay) {
|
|
7002
7052
|
|
|
7003
|
-
if (isObject
|
|
7053
|
+
if (isObject(type)) {
|
|
7004
7054
|
overlay = type;
|
|
7005
7055
|
type = null;
|
|
7006
7056
|
}
|
|
@@ -7023,7 +7073,7 @@
|
|
|
7023
7073
|
|
|
7024
7074
|
var id = this._ids.next();
|
|
7025
7075
|
|
|
7026
|
-
overlay = assign$
|
|
7076
|
+
overlay = assign$1({}, this._overlayDefaults, overlay, {
|
|
7027
7077
|
id: id,
|
|
7028
7078
|
type: type,
|
|
7029
7079
|
element: element,
|
|
@@ -7047,13 +7097,13 @@
|
|
|
7047
7097
|
|
|
7048
7098
|
var overlays = this.get(filter) || [];
|
|
7049
7099
|
|
|
7050
|
-
if (!isArray$
|
|
7100
|
+
if (!isArray$2(overlays)) {
|
|
7051
7101
|
overlays = [ overlays ];
|
|
7052
7102
|
}
|
|
7053
7103
|
|
|
7054
7104
|
var self = this;
|
|
7055
7105
|
|
|
7056
|
-
forEach$
|
|
7106
|
+
forEach$1(overlays, function(overlay) {
|
|
7057
7107
|
|
|
7058
7108
|
var container = self._getOverlayContainer(overlay.element, true);
|
|
7059
7109
|
|
|
@@ -7163,7 +7213,7 @@
|
|
|
7163
7213
|
|
|
7164
7214
|
Overlays.prototype._createOverlayContainer = function(element) {
|
|
7165
7215
|
var html = domify$1('<div class="djs-overlays" />');
|
|
7166
|
-
assign
|
|
7216
|
+
assign(html, { position: 'absolute' });
|
|
7167
7217
|
|
|
7168
7218
|
this._overlayRoot.appendChild(html);
|
|
7169
7219
|
|
|
@@ -7200,7 +7250,7 @@
|
|
|
7200
7250
|
|
|
7201
7251
|
|
|
7202
7252
|
Overlays.prototype._getOverlayContainer = function(element, raw) {
|
|
7203
|
-
var container = find
|
|
7253
|
+
var container = find(this._overlayContainers, function(c) {
|
|
7204
7254
|
return c.element === element;
|
|
7205
7255
|
});
|
|
7206
7256
|
|
|
@@ -7228,14 +7278,14 @@
|
|
|
7228
7278
|
|
|
7229
7279
|
// create proper html elements from
|
|
7230
7280
|
// overlay HTML strings
|
|
7231
|
-
if (isString
|
|
7281
|
+
if (isString(html)) {
|
|
7232
7282
|
html = domify$1(html);
|
|
7233
7283
|
}
|
|
7234
7284
|
|
|
7235
7285
|
overlayContainer = this._getOverlayContainer(element);
|
|
7236
7286
|
|
|
7237
7287
|
htmlContainer = domify$1('<div class="djs-overlay" data-overlay-id="' + id + '">');
|
|
7238
|
-
assign
|
|
7288
|
+
assign(htmlContainer, { position: 'absolute' });
|
|
7239
7289
|
|
|
7240
7290
|
htmlContainer.appendChild(html);
|
|
7241
7291
|
|
|
@@ -7325,7 +7375,7 @@
|
|
|
7325
7375
|
|
|
7326
7376
|
var self = this;
|
|
7327
7377
|
|
|
7328
|
-
forEach$
|
|
7378
|
+
forEach$1(this._overlays, function(overlay) {
|
|
7329
7379
|
self._updateOverlayVisibilty(overlay, viewbox);
|
|
7330
7380
|
});
|
|
7331
7381
|
};
|
|
@@ -7362,7 +7412,7 @@
|
|
|
7362
7412
|
var element = e.element;
|
|
7363
7413
|
var overlays = self.get({ element: element });
|
|
7364
7414
|
|
|
7365
|
-
forEach$
|
|
7415
|
+
forEach$1(overlays, function(o) {
|
|
7366
7416
|
self.remove(o.id);
|
|
7367
7417
|
});
|
|
7368
7418
|
|
|
@@ -7386,7 +7436,7 @@
|
|
|
7386
7436
|
var container = self._getOverlayContainer(element, true);
|
|
7387
7437
|
|
|
7388
7438
|
if (container) {
|
|
7389
|
-
forEach$
|
|
7439
|
+
forEach$1(container.overlays, function(overlay) {
|
|
7390
7440
|
self._updateOverlay(overlay);
|
|
7391
7441
|
});
|
|
7392
7442
|
|
|
@@ -7423,7 +7473,7 @@
|
|
|
7423
7473
|
'<div class="djs-overlay-container" />'
|
|
7424
7474
|
);
|
|
7425
7475
|
|
|
7426
|
-
assign
|
|
7476
|
+
assign(root, {
|
|
7427
7477
|
position: 'absolute',
|
|
7428
7478
|
width: 0,
|
|
7429
7479
|
height: 0
|
|
@@ -7435,7 +7485,7 @@
|
|
|
7435
7485
|
}
|
|
7436
7486
|
|
|
7437
7487
|
function setPosition(el, x, y) {
|
|
7438
|
-
assign
|
|
7488
|
+
assign(el, { left: x + 'px', top: y + 'px' });
|
|
7439
7489
|
}
|
|
7440
7490
|
|
|
7441
7491
|
/**
|
|
@@ -7581,7 +7631,7 @@
|
|
|
7581
7631
|
*/
|
|
7582
7632
|
CommandInterceptor.prototype.on = function(events, hook, priority, handlerFn, unwrap, that) {
|
|
7583
7633
|
|
|
7584
|
-
if (isFunction
|
|
7634
|
+
if (isFunction(hook) || isNumber(hook)) {
|
|
7585
7635
|
that = unwrap;
|
|
7586
7636
|
unwrap = handlerFn;
|
|
7587
7637
|
handlerFn = priority;
|
|
@@ -7589,29 +7639,29 @@
|
|
|
7589
7639
|
hook = null;
|
|
7590
7640
|
}
|
|
7591
7641
|
|
|
7592
|
-
if (isFunction
|
|
7642
|
+
if (isFunction(priority)) {
|
|
7593
7643
|
that = unwrap;
|
|
7594
7644
|
unwrap = handlerFn;
|
|
7595
7645
|
handlerFn = priority;
|
|
7596
7646
|
priority = DEFAULT_PRIORITY$2;
|
|
7597
7647
|
}
|
|
7598
7648
|
|
|
7599
|
-
if (isObject
|
|
7649
|
+
if (isObject(unwrap)) {
|
|
7600
7650
|
that = unwrap;
|
|
7601
7651
|
unwrap = false;
|
|
7602
7652
|
}
|
|
7603
7653
|
|
|
7604
|
-
if (!isFunction
|
|
7654
|
+
if (!isFunction(handlerFn)) {
|
|
7605
7655
|
throw new Error('handlerFn must be a function');
|
|
7606
7656
|
}
|
|
7607
7657
|
|
|
7608
|
-
if (!isArray$
|
|
7658
|
+
if (!isArray$2(events)) {
|
|
7609
7659
|
events = [ events ];
|
|
7610
7660
|
}
|
|
7611
7661
|
|
|
7612
7662
|
var eventBus = this._eventBus;
|
|
7613
7663
|
|
|
7614
|
-
forEach$
|
|
7664
|
+
forEach$1(events, function(event) {
|
|
7615
7665
|
|
|
7616
7666
|
// concat commandStack(.event)?(.hook)?
|
|
7617
7667
|
var fullEvent = [ 'commandStack', event, hook ].filter(function(e) { return e; }).join('.');
|
|
@@ -7639,7 +7689,7 @@
|
|
|
7639
7689
|
* This will generate the CommandInterceptor#(preExecute|...|reverted) methods
|
|
7640
7690
|
* which will in term forward to CommandInterceptor#on.
|
|
7641
7691
|
*/
|
|
7642
|
-
forEach$
|
|
7692
|
+
forEach$1(hooks, function(hook) {
|
|
7643
7693
|
|
|
7644
7694
|
/**
|
|
7645
7695
|
* {canExecute|preExecute|preExecuted|execute|executed|postExecute|postExecuted|revert|reverted}
|
|
@@ -7655,7 +7705,7 @@
|
|
|
7655
7705
|
*/
|
|
7656
7706
|
CommandInterceptor.prototype[hook] = function(events, priority, handlerFn, unwrap, that) {
|
|
7657
7707
|
|
|
7658
|
-
if (isFunction
|
|
7708
|
+
if (isFunction(events) || isNumber(events)) {
|
|
7659
7709
|
that = unwrap;
|
|
7660
7710
|
unwrap = handlerFn;
|
|
7661
7711
|
handlerFn = priority;
|
|
@@ -7875,7 +7925,7 @@
|
|
|
7875
7925
|
var shape = e.element,
|
|
7876
7926
|
bo = getBusinessObject(shape);
|
|
7877
7927
|
|
|
7878
|
-
var isPresent = find
|
|
7928
|
+
var isPresent = find(boParents, function(el) {
|
|
7879
7929
|
return el === bo;
|
|
7880
7930
|
});
|
|
7881
7931
|
|
|
@@ -8498,7 +8548,7 @@
|
|
|
8498
8548
|
*
|
|
8499
8549
|
* @return {boolean}
|
|
8500
8550
|
*/
|
|
8501
|
-
function isArray
|
|
8551
|
+
function isArray(obj) {
|
|
8502
8552
|
return Array.isArray(obj);
|
|
8503
8553
|
}
|
|
8504
8554
|
|
|
@@ -8525,7 +8575,7 @@
|
|
|
8525
8575
|
*/
|
|
8526
8576
|
function annotate(...args) {
|
|
8527
8577
|
|
|
8528
|
-
if (args.length === 1 && isArray
|
|
8578
|
+
if (args.length === 1 && isArray(args[0])) {
|
|
8529
8579
|
args = args[0];
|
|
8530
8580
|
}
|
|
8531
8581
|
|
|
@@ -8666,7 +8716,7 @@
|
|
|
8666
8716
|
}
|
|
8667
8717
|
|
|
8668
8718
|
if (typeof fn !== 'function') {
|
|
8669
|
-
if (isArray
|
|
8719
|
+
if (isArray(fn)) {
|
|
8670
8720
|
fn = annotate(fn.slice());
|
|
8671
8721
|
} else {
|
|
8672
8722
|
throw error(`Cannot invoke "${ fn }". Expected a function!`);
|
|
@@ -8938,7 +8988,7 @@
|
|
|
8938
8988
|
// helpers ///////////////
|
|
8939
8989
|
|
|
8940
8990
|
function arrayUnwrap(type, value) {
|
|
8941
|
-
if (type !== 'value' && isArray
|
|
8991
|
+
if (type !== 'value' && isArray(value)) {
|
|
8942
8992
|
value = annotate(value.slice());
|
|
8943
8993
|
}
|
|
8944
8994
|
|
|
@@ -8983,9 +9033,9 @@
|
|
|
8983
9033
|
});
|
|
8984
9034
|
|
|
8985
9035
|
if (isFrameElement(element)) {
|
|
8986
|
-
attr$1(rect, assign$
|
|
9036
|
+
attr$1(rect, assign$1({}, this.FRAME_STYLE, attrs || {}));
|
|
8987
9037
|
} else {
|
|
8988
|
-
attr$1(rect, assign$
|
|
9038
|
+
attr$1(rect, assign$1({}, this.SHAPE_STYLE, attrs || {}));
|
|
8989
9039
|
}
|
|
8990
9040
|
|
|
8991
9041
|
append(visuals, rect);
|
|
@@ -8995,7 +9045,7 @@
|
|
|
8995
9045
|
|
|
8996
9046
|
DefaultRenderer.prototype.drawConnection = function drawConnection(visuals, connection, attrs) {
|
|
8997
9047
|
|
|
8998
|
-
var line = createLine(connection.waypoints, assign$
|
|
9048
|
+
var line = createLine(connection.waypoints, assign$1({}, this.CONNECTION_STYLE, attrs || {}));
|
|
8999
9049
|
append(visuals, line);
|
|
9000
9050
|
|
|
9001
9051
|
return line;
|
|
@@ -9071,7 +9121,7 @@
|
|
|
9071
9121
|
this.cls = function(className, traits, additionalAttrs) {
|
|
9072
9122
|
var attrs = this.style(traits, additionalAttrs);
|
|
9073
9123
|
|
|
9074
|
-
return assign$
|
|
9124
|
+
return assign$1(attrs, { 'class': className });
|
|
9075
9125
|
};
|
|
9076
9126
|
|
|
9077
9127
|
/**
|
|
@@ -9084,25 +9134,25 @@
|
|
|
9084
9134
|
*/
|
|
9085
9135
|
this.style = function(traits, additionalAttrs) {
|
|
9086
9136
|
|
|
9087
|
-
if (!isArray$
|
|
9137
|
+
if (!isArray$2(traits) && !additionalAttrs) {
|
|
9088
9138
|
additionalAttrs = traits;
|
|
9089
9139
|
traits = [];
|
|
9090
9140
|
}
|
|
9091
9141
|
|
|
9092
9142
|
var attrs = reduce(traits, function(attrs, t) {
|
|
9093
|
-
return assign$
|
|
9143
|
+
return assign$1(attrs, defaultTraits[t] || {});
|
|
9094
9144
|
}, {});
|
|
9095
9145
|
|
|
9096
|
-
return additionalAttrs ? assign$
|
|
9146
|
+
return additionalAttrs ? assign$1(attrs, additionalAttrs) : attrs;
|
|
9097
9147
|
};
|
|
9098
9148
|
|
|
9099
9149
|
this.computeStyle = function(custom, traits, defaultStyles) {
|
|
9100
|
-
if (!isArray$
|
|
9150
|
+
if (!isArray$2(traits)) {
|
|
9101
9151
|
defaultStyles = traits;
|
|
9102
9152
|
traits = [];
|
|
9103
9153
|
}
|
|
9104
9154
|
|
|
9105
|
-
return self.style(traits || [], assign$
|
|
9155
|
+
return self.style(traits || [], assign$1({}, defaultStyles, custom || {}));
|
|
9106
9156
|
};
|
|
9107
9157
|
}
|
|
9108
9158
|
|
|
@@ -9211,7 +9261,7 @@
|
|
|
9211
9261
|
*/
|
|
9212
9262
|
function createContainer(options) {
|
|
9213
9263
|
|
|
9214
|
-
options = assign$
|
|
9264
|
+
options = assign$1({}, { width: '100%', height: '100%' }, options);
|
|
9215
9265
|
|
|
9216
9266
|
const container = options.container || document.body;
|
|
9217
9267
|
|
|
@@ -9221,7 +9271,7 @@
|
|
|
9221
9271
|
const parent = document.createElement('div');
|
|
9222
9272
|
parent.setAttribute('class', 'djs-container');
|
|
9223
9273
|
|
|
9224
|
-
assign
|
|
9274
|
+
assign(parent, {
|
|
9225
9275
|
position: 'relative',
|
|
9226
9276
|
overflow: 'hidden',
|
|
9227
9277
|
width: ensurePx(options.width),
|
|
@@ -9323,7 +9373,7 @@
|
|
|
9323
9373
|
// debounce canvas.viewbox.changed events
|
|
9324
9374
|
// for smoother diagram interaction
|
|
9325
9375
|
if (config.deferUpdate !== false) {
|
|
9326
|
-
this._viewboxChanged = debounce(bind$
|
|
9376
|
+
this._viewboxChanged = debounce(bind$2(this._viewboxChanged, this), 300);
|
|
9327
9377
|
}
|
|
9328
9378
|
|
|
9329
9379
|
eventBus.on('diagram.init', function() {
|
|
@@ -9624,7 +9674,7 @@
|
|
|
9624
9674
|
};
|
|
9625
9675
|
|
|
9626
9676
|
Canvas.prototype._findPlaneForRoot = function(rootElement) {
|
|
9627
|
-
return find
|
|
9677
|
+
return find(this._planes, function(plane) {
|
|
9628
9678
|
return plane.rootElement === rootElement;
|
|
9629
9679
|
});
|
|
9630
9680
|
};
|
|
@@ -9657,7 +9707,7 @@
|
|
|
9657
9707
|
return;
|
|
9658
9708
|
}
|
|
9659
9709
|
|
|
9660
|
-
forEach$
|
|
9710
|
+
forEach$1([ container.gfx, container.secondaryGfx ], function(gfx) {
|
|
9661
9711
|
if (gfx) {
|
|
9662
9712
|
|
|
9663
9713
|
// invoke either addClass or removeClass based on mode
|
|
@@ -10314,7 +10364,7 @@
|
|
|
10314
10364
|
|
|
10315
10365
|
if (delta) {
|
|
10316
10366
|
this._changeViewbox(function() {
|
|
10317
|
-
delta = assign$
|
|
10367
|
+
delta = assign$1({ dx: 0, dy: 0 }, delta || {});
|
|
10318
10368
|
|
|
10319
10369
|
matrix = this._svg.createSVGMatrix().translate(delta.dx, delta.dy).multiply(matrix);
|
|
10320
10370
|
|
|
@@ -10509,7 +10559,7 @@
|
|
|
10509
10559
|
const currentScale = currentMatrix.a;
|
|
10510
10560
|
|
|
10511
10561
|
if (center) {
|
|
10512
|
-
centerPoint = assign$
|
|
10562
|
+
centerPoint = assign$1(point, center);
|
|
10513
10563
|
|
|
10514
10564
|
// revert applied viewport transformations
|
|
10515
10565
|
originalPoint = centerPoint.matrixTransform(currentMatrix.inverse());
|
|
@@ -11403,7 +11453,7 @@
|
|
|
11403
11453
|
if (!Type) {
|
|
11404
11454
|
throw new Error('unknown type: <' + type + '>');
|
|
11405
11455
|
}
|
|
11406
|
-
return assign$
|
|
11456
|
+
return assign$1(new Type(), attrs);
|
|
11407
11457
|
}
|
|
11408
11458
|
|
|
11409
11459
|
/**
|
|
@@ -11440,7 +11490,7 @@
|
|
|
11440
11490
|
*/
|
|
11441
11491
|
ElementFactory.prototype.create = function(type, attrs) {
|
|
11442
11492
|
|
|
11443
|
-
attrs = assign$
|
|
11493
|
+
attrs = assign$1({}, attrs || {});
|
|
11444
11494
|
|
|
11445
11495
|
if (!attrs.id) {
|
|
11446
11496
|
attrs.id = type + '_' + (this._uid++);
|
|
@@ -11566,9 +11616,9 @@
|
|
|
11566
11616
|
*/
|
|
11567
11617
|
EventBus.prototype.on = function(events, priority, callback, that) {
|
|
11568
11618
|
|
|
11569
|
-
events = isArray$
|
|
11619
|
+
events = isArray$2(events) ? events : [ events ];
|
|
11570
11620
|
|
|
11571
|
-
if (isFunction
|
|
11621
|
+
if (isFunction(priority)) {
|
|
11572
11622
|
that = callback;
|
|
11573
11623
|
callback = priority;
|
|
11574
11624
|
priority = DEFAULT_PRIORITY$1;
|
|
@@ -11581,7 +11631,7 @@
|
|
|
11581
11631
|
var actualCallback = callback;
|
|
11582
11632
|
|
|
11583
11633
|
if (that) {
|
|
11584
|
-
actualCallback = bind$
|
|
11634
|
+
actualCallback = bind$2(callback, that);
|
|
11585
11635
|
|
|
11586
11636
|
// make sure we remember and are able to remove
|
|
11587
11637
|
// bound callbacks via {@link #off} using the original
|
|
@@ -11612,7 +11662,7 @@
|
|
|
11612
11662
|
EventBus.prototype.once = function(event, priority, callback, that) {
|
|
11613
11663
|
var self = this;
|
|
11614
11664
|
|
|
11615
|
-
if (isFunction
|
|
11665
|
+
if (isFunction(priority)) {
|
|
11616
11666
|
that = callback;
|
|
11617
11667
|
callback = priority;
|
|
11618
11668
|
priority = DEFAULT_PRIORITY$1;
|
|
@@ -11651,7 +11701,7 @@
|
|
|
11651
11701
|
*/
|
|
11652
11702
|
EventBus.prototype.off = function(events, callback) {
|
|
11653
11703
|
|
|
11654
|
-
events = isArray$
|
|
11704
|
+
events = isArray$2(events) ? events : [ events ];
|
|
11655
11705
|
|
|
11656
11706
|
var self = this;
|
|
11657
11707
|
|
|
@@ -11946,7 +11996,7 @@
|
|
|
11946
11996
|
};
|
|
11947
11997
|
|
|
11948
11998
|
InternalEvent.prototype.init = function(data) {
|
|
11949
|
-
assign$
|
|
11999
|
+
assign$1(this, data || {});
|
|
11950
12000
|
};
|
|
11951
12001
|
|
|
11952
12002
|
|
|
@@ -12119,7 +12169,7 @@
|
|
|
12119
12169
|
|
|
12120
12170
|
// update all parents of changed and reorganized their children
|
|
12121
12171
|
// in the correct order (as indicated in our model)
|
|
12122
|
-
forEach$
|
|
12172
|
+
forEach$1(parents, function(parent) {
|
|
12123
12173
|
|
|
12124
12174
|
var children = parent.children;
|
|
12125
12175
|
|
|
@@ -12129,7 +12179,7 @@
|
|
|
12129
12179
|
|
|
12130
12180
|
var childrenGfx = self._getChildrenContainer(parent);
|
|
12131
12181
|
|
|
12132
|
-
forEach$
|
|
12182
|
+
forEach$1(children.slice().reverse(), function(child) {
|
|
12133
12183
|
var childGfx = elementRegistry.getGraphics(child);
|
|
12134
12184
|
|
|
12135
12185
|
prependTo(childGfx.parentNode, childrenGfx);
|
|
@@ -12379,193 +12429,6 @@
|
|
|
12379
12429
|
this.get('eventBus').fire('diagram.clear');
|
|
12380
12430
|
};
|
|
12381
12431
|
|
|
12382
|
-
/**
|
|
12383
|
-
* Flatten array, one level deep.
|
|
12384
|
-
*
|
|
12385
|
-
* @param {Array<?>} arr
|
|
12386
|
-
*
|
|
12387
|
-
* @return {Array<?>}
|
|
12388
|
-
*/
|
|
12389
|
-
|
|
12390
|
-
var nativeToString$2 = Object.prototype.toString;
|
|
12391
|
-
function isString$2(obj) {
|
|
12392
|
-
return nativeToString$2.call(obj) === '[object String]';
|
|
12393
|
-
}
|
|
12394
|
-
|
|
12395
|
-
function _extends$2() {
|
|
12396
|
-
_extends$2 = Object.assign || function (target) {
|
|
12397
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
12398
|
-
var source = arguments[i];
|
|
12399
|
-
|
|
12400
|
-
for (var key in source) {
|
|
12401
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12402
|
-
target[key] = source[key];
|
|
12403
|
-
}
|
|
12404
|
-
}
|
|
12405
|
-
}
|
|
12406
|
-
|
|
12407
|
-
return target;
|
|
12408
|
-
};
|
|
12409
|
-
|
|
12410
|
-
return _extends$2.apply(this, arguments);
|
|
12411
|
-
}
|
|
12412
|
-
|
|
12413
|
-
/**
|
|
12414
|
-
* Convenience wrapper for `Object.assign`.
|
|
12415
|
-
*
|
|
12416
|
-
* @param {Object} target
|
|
12417
|
-
* @param {...Object} others
|
|
12418
|
-
*
|
|
12419
|
-
* @return {Object} the target
|
|
12420
|
-
*/
|
|
12421
|
-
|
|
12422
|
-
function assign$2(target) {
|
|
12423
|
-
for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
12424
|
-
others[_key - 1] = arguments[_key];
|
|
12425
|
-
}
|
|
12426
|
-
|
|
12427
|
-
return _extends$2.apply(void 0, [target].concat(others));
|
|
12428
|
-
}
|
|
12429
|
-
|
|
12430
|
-
/**
|
|
12431
|
-
* Flatten array, one level deep.
|
|
12432
|
-
*
|
|
12433
|
-
* @param {Array<?>} arr
|
|
12434
|
-
*
|
|
12435
|
-
* @return {Array<?>}
|
|
12436
|
-
*/
|
|
12437
|
-
|
|
12438
|
-
var nativeToString$1 = Object.prototype.toString;
|
|
12439
|
-
var nativeHasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
12440
|
-
function isUndefined$2(obj) {
|
|
12441
|
-
return obj === undefined;
|
|
12442
|
-
}
|
|
12443
|
-
function isArray$1(obj) {
|
|
12444
|
-
return nativeToString$1.call(obj) === '[object Array]';
|
|
12445
|
-
}
|
|
12446
|
-
function isObject(obj) {
|
|
12447
|
-
return nativeToString$1.call(obj) === '[object Object]';
|
|
12448
|
-
}
|
|
12449
|
-
function isString$1(obj) {
|
|
12450
|
-
return nativeToString$1.call(obj) === '[object String]';
|
|
12451
|
-
}
|
|
12452
|
-
/**
|
|
12453
|
-
* Return true, if target owns a property with the given key.
|
|
12454
|
-
*
|
|
12455
|
-
* @param {Object} target
|
|
12456
|
-
* @param {String} key
|
|
12457
|
-
*
|
|
12458
|
-
* @return {Boolean}
|
|
12459
|
-
*/
|
|
12460
|
-
|
|
12461
|
-
function has$1(target, key) {
|
|
12462
|
-
return nativeHasOwnProperty$1.call(target, key);
|
|
12463
|
-
}
|
|
12464
|
-
/**
|
|
12465
|
-
* Iterate over collection; returning something
|
|
12466
|
-
* (non-undefined) will stop iteration.
|
|
12467
|
-
*
|
|
12468
|
-
* @param {Array|Object} collection
|
|
12469
|
-
* @param {Function} iterator
|
|
12470
|
-
*
|
|
12471
|
-
* @return {Object} return result that stopped the iteration
|
|
12472
|
-
*/
|
|
12473
|
-
|
|
12474
|
-
function forEach$1(collection, iterator) {
|
|
12475
|
-
var val, result;
|
|
12476
|
-
|
|
12477
|
-
if (isUndefined$2(collection)) {
|
|
12478
|
-
return;
|
|
12479
|
-
}
|
|
12480
|
-
|
|
12481
|
-
var convertKey = isArray$1(collection) ? toNum$1 : identity$1;
|
|
12482
|
-
|
|
12483
|
-
for (var key in collection) {
|
|
12484
|
-
if (has$1(collection, key)) {
|
|
12485
|
-
val = collection[key];
|
|
12486
|
-
result = iterator(val, convertKey(key));
|
|
12487
|
-
|
|
12488
|
-
if (result === false) {
|
|
12489
|
-
return val;
|
|
12490
|
-
}
|
|
12491
|
-
}
|
|
12492
|
-
}
|
|
12493
|
-
}
|
|
12494
|
-
|
|
12495
|
-
function identity$1(arg) {
|
|
12496
|
-
return arg;
|
|
12497
|
-
}
|
|
12498
|
-
|
|
12499
|
-
function toNum$1(arg) {
|
|
12500
|
-
return Number(arg);
|
|
12501
|
-
}
|
|
12502
|
-
/**
|
|
12503
|
-
* Bind function against target <this>.
|
|
12504
|
-
*
|
|
12505
|
-
* @param {Function} fn
|
|
12506
|
-
* @param {Object} target
|
|
12507
|
-
*
|
|
12508
|
-
* @return {Function} bound function
|
|
12509
|
-
*/
|
|
12510
|
-
|
|
12511
|
-
function bind(fn, target) {
|
|
12512
|
-
return fn.bind(target);
|
|
12513
|
-
}
|
|
12514
|
-
|
|
12515
|
-
function _extends$1() {
|
|
12516
|
-
_extends$1 = Object.assign || function (target) {
|
|
12517
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
12518
|
-
var source = arguments[i];
|
|
12519
|
-
|
|
12520
|
-
for (var key in source) {
|
|
12521
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12522
|
-
target[key] = source[key];
|
|
12523
|
-
}
|
|
12524
|
-
}
|
|
12525
|
-
}
|
|
12526
|
-
|
|
12527
|
-
return target;
|
|
12528
|
-
};
|
|
12529
|
-
|
|
12530
|
-
return _extends$1.apply(this, arguments);
|
|
12531
|
-
}
|
|
12532
|
-
|
|
12533
|
-
/**
|
|
12534
|
-
* Convenience wrapper for `Object.assign`.
|
|
12535
|
-
*
|
|
12536
|
-
* @param {Object} target
|
|
12537
|
-
* @param {...Object} others
|
|
12538
|
-
*
|
|
12539
|
-
* @return {Object} the target
|
|
12540
|
-
*/
|
|
12541
|
-
|
|
12542
|
-
function assign$1(target) {
|
|
12543
|
-
for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
12544
|
-
others[_key - 1] = arguments[_key];
|
|
12545
|
-
}
|
|
12546
|
-
|
|
12547
|
-
return _extends$1.apply(void 0, [target].concat(others));
|
|
12548
|
-
}
|
|
12549
|
-
/**
|
|
12550
|
-
* Pick given properties from the target object.
|
|
12551
|
-
*
|
|
12552
|
-
* @param {Object} target
|
|
12553
|
-
* @param {Array} properties
|
|
12554
|
-
*
|
|
12555
|
-
* @return {Object} target
|
|
12556
|
-
*/
|
|
12557
|
-
|
|
12558
|
-
function pick(target, properties) {
|
|
12559
|
-
var result = {};
|
|
12560
|
-
var obj = Object(target);
|
|
12561
|
-
forEach$1(properties, function (prop) {
|
|
12562
|
-
if (prop in obj) {
|
|
12563
|
-
result[prop] = target[prop];
|
|
12564
|
-
}
|
|
12565
|
-
});
|
|
12566
|
-
return result;
|
|
12567
|
-
}
|
|
12568
|
-
|
|
12569
12432
|
/**
|
|
12570
12433
|
* Moddle base element.
|
|
12571
12434
|
*/
|
|
@@ -12618,7 +12481,7 @@
|
|
|
12618
12481
|
props.define(this, '$attrs', { value: {} });
|
|
12619
12482
|
props.define(this, '$parent', { writable: true });
|
|
12620
12483
|
|
|
12621
|
-
forEach$1(attrs, bind(function(val, key) {
|
|
12484
|
+
forEach$1(attrs, bind$2(function(val, key) {
|
|
12622
12485
|
this.set(key, val);
|
|
12623
12486
|
}, this));
|
|
12624
12487
|
}
|
|
@@ -12701,6 +12564,7 @@
|
|
|
12701
12564
|
localName = name;
|
|
12702
12565
|
prefix = defaultPrefix;
|
|
12703
12566
|
} else
|
|
12567
|
+
|
|
12704
12568
|
// prefix + local name
|
|
12705
12569
|
if (parts.length === 2) {
|
|
12706
12570
|
localName = parts[1];
|
|
@@ -12907,7 +12771,7 @@
|
|
|
12907
12771
|
return;
|
|
12908
12772
|
}
|
|
12909
12773
|
|
|
12910
|
-
forEach$1(t.properties, bind(function(p) {
|
|
12774
|
+
forEach$1(t.properties, bind$2(function(p) {
|
|
12911
12775
|
|
|
12912
12776
|
// clone property to allow extensions
|
|
12913
12777
|
p = assign$1({}, p, {
|
|
@@ -12954,7 +12818,7 @@
|
|
|
12954
12818
|
|
|
12955
12819
|
this.properties = properties;
|
|
12956
12820
|
|
|
12957
|
-
forEach$1(packages, bind(this.registerPackage, this));
|
|
12821
|
+
forEach$1(packages, bind$2(this.registerPackage, this));
|
|
12958
12822
|
}
|
|
12959
12823
|
|
|
12960
12824
|
|
|
@@ -12978,7 +12842,7 @@
|
|
|
12978
12842
|
ensureAvailable(pkgMap, pkg, 'uri');
|
|
12979
12843
|
|
|
12980
12844
|
// register types
|
|
12981
|
-
forEach$1(pkg.types, bind(function(descriptor) {
|
|
12845
|
+
forEach$1(pkg.types, bind$2(function(descriptor) {
|
|
12982
12846
|
this.registerType(descriptor, pkg);
|
|
12983
12847
|
}, this));
|
|
12984
12848
|
|
|
@@ -13004,7 +12868,7 @@
|
|
|
13004
12868
|
propertiesByName = {};
|
|
13005
12869
|
|
|
13006
12870
|
// parse properties
|
|
13007
|
-
forEach$1(type.properties, bind(function(p) {
|
|
12871
|
+
forEach$1(type.properties, bind$2(function(p) {
|
|
13008
12872
|
|
|
13009
12873
|
// namespace property names
|
|
13010
12874
|
var propertyNs = parseName(p.name, ns.prefix),
|
|
@@ -13030,7 +12894,7 @@
|
|
|
13030
12894
|
propertiesByName: propertiesByName
|
|
13031
12895
|
});
|
|
13032
12896
|
|
|
13033
|
-
forEach$1(type.extends, bind(function(extendsName) {
|
|
12897
|
+
forEach$1(type.extends, bind$2(function(extendsName) {
|
|
13034
12898
|
var extended = this.typeMap[extendsName];
|
|
13035
12899
|
|
|
13036
12900
|
extended.traits = extended.traits || [];
|
|
@@ -13125,7 +12989,7 @@
|
|
|
13125
12989
|
|
|
13126
12990
|
|
|
13127
12991
|
|
|
13128
|
-
|
|
12992
|
+
// helpers ////////////////////////////
|
|
13129
12993
|
|
|
13130
12994
|
function ensureAvailable(packageMap, pkg, identifierKey) {
|
|
13131
12995
|
|
|
@@ -13156,11 +13020,16 @@
|
|
|
13156
13020
|
*/
|
|
13157
13021
|
Properties.prototype.set = function(target, name, value) {
|
|
13158
13022
|
|
|
13023
|
+
if (!isString(name) || !name.length) {
|
|
13024
|
+
throw new TypeError('property name must be a non-empty string');
|
|
13025
|
+
}
|
|
13026
|
+
|
|
13159
13027
|
var property = this.model.getPropertyDescriptor(target, name);
|
|
13160
13028
|
|
|
13161
13029
|
var propertyName = property && property.name;
|
|
13162
13030
|
|
|
13163
|
-
if (isUndefined
|
|
13031
|
+
if (isUndefined(value)) {
|
|
13032
|
+
|
|
13164
13033
|
// unset the property, if the specified value is undefined;
|
|
13165
13034
|
// delete from $attrs (for extensions) or the target itself
|
|
13166
13035
|
if (property) {
|
|
@@ -13169,6 +13038,7 @@
|
|
|
13169
13038
|
delete target.$attrs[name];
|
|
13170
13039
|
}
|
|
13171
13040
|
} else {
|
|
13041
|
+
|
|
13172
13042
|
// set the property, defining well defined properties on the fly
|
|
13173
13043
|
// or simply updating them in target.$attrs (for extensions)
|
|
13174
13044
|
if (property) {
|
|
@@ -13251,7 +13121,7 @@
|
|
|
13251
13121
|
};
|
|
13252
13122
|
|
|
13253
13123
|
|
|
13254
|
-
function isUndefined
|
|
13124
|
+
function isUndefined(val) {
|
|
13255
13125
|
return typeof val === 'undefined';
|
|
13256
13126
|
}
|
|
13257
13127
|
|
|
@@ -13264,7 +13134,7 @@
|
|
|
13264
13134
|
});
|
|
13265
13135
|
}
|
|
13266
13136
|
|
|
13267
|
-
|
|
13137
|
+
// Moddle implementation /////////////////////////////////////////////////
|
|
13268
13138
|
|
|
13269
13139
|
/**
|
|
13270
13140
|
* @class Moddle
|
|
@@ -13340,7 +13210,7 @@
|
|
|
13340
13210
|
|
|
13341
13211
|
var cache = this.typeCache;
|
|
13342
13212
|
|
|
13343
|
-
var name = isString
|
|
13213
|
+
var name = isString(descriptor) ? descriptor : descriptor.ns.name;
|
|
13344
13214
|
|
|
13345
13215
|
var type = cache[name];
|
|
13346
13216
|
|
|
@@ -13473,180 +13343,6 @@
|
|
|
13473
13343
|
return this.registry.typeMap[type];
|
|
13474
13344
|
};
|
|
13475
13345
|
|
|
13476
|
-
/**
|
|
13477
|
-
* Flatten array, one level deep.
|
|
13478
|
-
*
|
|
13479
|
-
* @param {Array<?>} arr
|
|
13480
|
-
*
|
|
13481
|
-
* @return {Array<?>}
|
|
13482
|
-
*/
|
|
13483
|
-
|
|
13484
|
-
var nativeToString = Object.prototype.toString;
|
|
13485
|
-
var nativeHasOwnProperty = Object.prototype.hasOwnProperty;
|
|
13486
|
-
function isUndefined(obj) {
|
|
13487
|
-
return obj === undefined;
|
|
13488
|
-
}
|
|
13489
|
-
function isArray(obj) {
|
|
13490
|
-
return nativeToString.call(obj) === '[object Array]';
|
|
13491
|
-
}
|
|
13492
|
-
function isFunction(obj) {
|
|
13493
|
-
var tag = nativeToString.call(obj);
|
|
13494
|
-
return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object AsyncGeneratorFunction]' || tag === '[object Proxy]';
|
|
13495
|
-
}
|
|
13496
|
-
function isString(obj) {
|
|
13497
|
-
return nativeToString.call(obj) === '[object String]';
|
|
13498
|
-
}
|
|
13499
|
-
/**
|
|
13500
|
-
* Return true, if target owns a property with the given key.
|
|
13501
|
-
*
|
|
13502
|
-
* @param {Object} target
|
|
13503
|
-
* @param {String} key
|
|
13504
|
-
*
|
|
13505
|
-
* @return {Boolean}
|
|
13506
|
-
*/
|
|
13507
|
-
|
|
13508
|
-
function has(target, key) {
|
|
13509
|
-
return nativeHasOwnProperty.call(target, key);
|
|
13510
|
-
}
|
|
13511
|
-
|
|
13512
|
-
/**
|
|
13513
|
-
* Find element in collection.
|
|
13514
|
-
*
|
|
13515
|
-
* @param {Array|Object} collection
|
|
13516
|
-
* @param {Function|Object} matcher
|
|
13517
|
-
*
|
|
13518
|
-
* @return {Object}
|
|
13519
|
-
*/
|
|
13520
|
-
|
|
13521
|
-
function find(collection, matcher) {
|
|
13522
|
-
matcher = toMatcher(matcher);
|
|
13523
|
-
var match;
|
|
13524
|
-
forEach(collection, function (val, key) {
|
|
13525
|
-
if (matcher(val, key)) {
|
|
13526
|
-
match = val;
|
|
13527
|
-
return false;
|
|
13528
|
-
}
|
|
13529
|
-
});
|
|
13530
|
-
return match;
|
|
13531
|
-
}
|
|
13532
|
-
/**
|
|
13533
|
-
* Find element index in collection.
|
|
13534
|
-
*
|
|
13535
|
-
* @param {Array|Object} collection
|
|
13536
|
-
* @param {Function} matcher
|
|
13537
|
-
*
|
|
13538
|
-
* @return {Object}
|
|
13539
|
-
*/
|
|
13540
|
-
|
|
13541
|
-
function findIndex(collection, matcher) {
|
|
13542
|
-
matcher = toMatcher(matcher);
|
|
13543
|
-
var idx = isArray(collection) ? -1 : undefined;
|
|
13544
|
-
forEach(collection, function (val, key) {
|
|
13545
|
-
if (matcher(val, key)) {
|
|
13546
|
-
idx = key;
|
|
13547
|
-
return false;
|
|
13548
|
-
}
|
|
13549
|
-
});
|
|
13550
|
-
return idx;
|
|
13551
|
-
}
|
|
13552
|
-
/**
|
|
13553
|
-
* Find element in collection.
|
|
13554
|
-
*
|
|
13555
|
-
* @param {Array|Object} collection
|
|
13556
|
-
* @param {Function} matcher
|
|
13557
|
-
*
|
|
13558
|
-
* @return {Array} result
|
|
13559
|
-
*/
|
|
13560
|
-
|
|
13561
|
-
function filter(collection, matcher) {
|
|
13562
|
-
var result = [];
|
|
13563
|
-
forEach(collection, function (val, key) {
|
|
13564
|
-
if (matcher(val, key)) {
|
|
13565
|
-
result.push(val);
|
|
13566
|
-
}
|
|
13567
|
-
});
|
|
13568
|
-
return result;
|
|
13569
|
-
}
|
|
13570
|
-
/**
|
|
13571
|
-
* Iterate over collection; returning something
|
|
13572
|
-
* (non-undefined) will stop iteration.
|
|
13573
|
-
*
|
|
13574
|
-
* @param {Array|Object} collection
|
|
13575
|
-
* @param {Function} iterator
|
|
13576
|
-
*
|
|
13577
|
-
* @return {Object} return result that stopped the iteration
|
|
13578
|
-
*/
|
|
13579
|
-
|
|
13580
|
-
function forEach(collection, iterator) {
|
|
13581
|
-
var val, result;
|
|
13582
|
-
|
|
13583
|
-
if (isUndefined(collection)) {
|
|
13584
|
-
return;
|
|
13585
|
-
}
|
|
13586
|
-
|
|
13587
|
-
var convertKey = isArray(collection) ? toNum : identity;
|
|
13588
|
-
|
|
13589
|
-
for (var key in collection) {
|
|
13590
|
-
if (has(collection, key)) {
|
|
13591
|
-
val = collection[key];
|
|
13592
|
-
result = iterator(val, convertKey(key));
|
|
13593
|
-
|
|
13594
|
-
if (result === false) {
|
|
13595
|
-
return val;
|
|
13596
|
-
}
|
|
13597
|
-
}
|
|
13598
|
-
}
|
|
13599
|
-
}
|
|
13600
|
-
|
|
13601
|
-
function toMatcher(matcher) {
|
|
13602
|
-
return isFunction(matcher) ? matcher : function (e) {
|
|
13603
|
-
return e === matcher;
|
|
13604
|
-
};
|
|
13605
|
-
}
|
|
13606
|
-
|
|
13607
|
-
function identity(arg) {
|
|
13608
|
-
return arg;
|
|
13609
|
-
}
|
|
13610
|
-
|
|
13611
|
-
function toNum(arg) {
|
|
13612
|
-
return Number(arg);
|
|
13613
|
-
}
|
|
13614
|
-
|
|
13615
|
-
function _extends() {
|
|
13616
|
-
_extends = Object.assign || function (target) {
|
|
13617
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
13618
|
-
var source = arguments[i];
|
|
13619
|
-
|
|
13620
|
-
for (var key in source) {
|
|
13621
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
13622
|
-
target[key] = source[key];
|
|
13623
|
-
}
|
|
13624
|
-
}
|
|
13625
|
-
}
|
|
13626
|
-
|
|
13627
|
-
return target;
|
|
13628
|
-
};
|
|
13629
|
-
|
|
13630
|
-
return _extends.apply(this, arguments);
|
|
13631
|
-
}
|
|
13632
|
-
|
|
13633
|
-
/**
|
|
13634
|
-
* Convenience wrapper for `Object.assign`.
|
|
13635
|
-
*
|
|
13636
|
-
* @param {Object} target
|
|
13637
|
-
* @param {...Object} others
|
|
13638
|
-
*
|
|
13639
|
-
* @return {Object} the target
|
|
13640
|
-
*/
|
|
13641
|
-
|
|
13642
|
-
function assign(target) {
|
|
13643
|
-
for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
13644
|
-
others[_key - 1] = arguments[_key];
|
|
13645
|
-
}
|
|
13646
|
-
|
|
13647
|
-
return _extends.apply(void 0, [target].concat(others));
|
|
13648
|
-
}
|
|
13649
|
-
|
|
13650
13346
|
var fromCharCode = String.fromCharCode;
|
|
13651
13347
|
|
|
13652
13348
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
@@ -14821,7 +14517,7 @@
|
|
|
14821
14517
|
* @property {Boolean} lax
|
|
14822
14518
|
*/
|
|
14823
14519
|
|
|
14824
|
-
assign(this, options);
|
|
14520
|
+
assign$1(this, options);
|
|
14825
14521
|
|
|
14826
14522
|
this.elementsById = {};
|
|
14827
14523
|
this.references = [];
|
|
@@ -15042,7 +14738,7 @@
|
|
|
15042
14738
|
model = this.model,
|
|
15043
14739
|
propNameNs;
|
|
15044
14740
|
|
|
15045
|
-
forEach(attributes, function(value, name) {
|
|
14741
|
+
forEach$1(attributes, function(value, name) {
|
|
15046
14742
|
|
|
15047
14743
|
var prop = descriptor.propertiesByName[name],
|
|
15048
14744
|
values;
|
|
@@ -15060,7 +14756,7 @@
|
|
|
15060
14756
|
// IDREFS: parse references as whitespace-separated list
|
|
15061
14757
|
values = value.split(' ');
|
|
15062
14758
|
|
|
15063
|
-
forEach(values, function(v) {
|
|
14759
|
+
forEach$1(values, function(v) {
|
|
15064
14760
|
context.addReference({
|
|
15065
14761
|
element: instance,
|
|
15066
14762
|
property: prop.ns.name,
|
|
@@ -15127,7 +14823,7 @@
|
|
|
15127
14823
|
|
|
15128
14824
|
elementType = model.getType(elementTypeName);
|
|
15129
14825
|
|
|
15130
|
-
return assign({}, property, {
|
|
14826
|
+
return assign$1({}, property, {
|
|
15131
14827
|
effectiveType: getModdleDescriptor(elementType).name
|
|
15132
14828
|
});
|
|
15133
14829
|
}
|
|
@@ -15149,7 +14845,7 @@
|
|
|
15149
14845
|
});
|
|
15150
14846
|
|
|
15151
14847
|
if (property) {
|
|
15152
|
-
return assign({}, property, {
|
|
14848
|
+
return assign$1({}, property, {
|
|
15153
14849
|
effectiveType: getModdleDescriptor(elementType).name
|
|
15154
14850
|
});
|
|
15155
14851
|
}
|
|
@@ -15224,7 +14920,7 @@
|
|
|
15224
14920
|
}
|
|
15225
14921
|
|
|
15226
14922
|
if (propertyDesc.isReference) {
|
|
15227
|
-
assign(newElement, {
|
|
14923
|
+
assign$1(newElement, {
|
|
15228
14924
|
element: element
|
|
15229
14925
|
});
|
|
15230
14926
|
|
|
@@ -15333,7 +15029,7 @@
|
|
|
15333
15029
|
};
|
|
15334
15030
|
}
|
|
15335
15031
|
|
|
15336
|
-
assign(this, { lax: false }, options);
|
|
15032
|
+
assign$1(this, { lax: false }, options);
|
|
15337
15033
|
}
|
|
15338
15034
|
|
|
15339
15035
|
/**
|
|
@@ -15388,7 +15084,7 @@
|
|
|
15388
15084
|
var model = this.model,
|
|
15389
15085
|
lax = this.lax;
|
|
15390
15086
|
|
|
15391
|
-
var context = new Context(assign({}, options, { rootHandler: rootHandler })),
|
|
15087
|
+
var context = new Context(assign$1({}, options, { rootHandler: rootHandler })),
|
|
15392
15088
|
parser = new Parser({ proxy: true }),
|
|
15393
15089
|
stack = createStack();
|
|
15394
15090
|
|
|
@@ -15783,14 +15479,14 @@
|
|
|
15783
15479
|
|
|
15784
15480
|
function getElementNs(ns, descriptor) {
|
|
15785
15481
|
if (descriptor.isGeneric) {
|
|
15786
|
-
return assign({ localName: descriptor.ns.localName }, ns);
|
|
15482
|
+
return assign$1({ localName: descriptor.ns.localName }, ns);
|
|
15787
15483
|
} else {
|
|
15788
|
-
return assign({ localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg) }, ns);
|
|
15484
|
+
return assign$1({ localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg) }, ns);
|
|
15789
15485
|
}
|
|
15790
15486
|
}
|
|
15791
15487
|
|
|
15792
15488
|
function getPropertyNs(ns, descriptor) {
|
|
15793
|
-
return assign({ localName: descriptor.ns.localName }, ns);
|
|
15489
|
+
return assign$1({ localName: descriptor.ns.localName }, ns);
|
|
15794
15490
|
}
|
|
15795
15491
|
|
|
15796
15492
|
function getSerializableProperties(element) {
|
|
@@ -15804,7 +15500,7 @@
|
|
|
15804
15500
|
}
|
|
15805
15501
|
|
|
15806
15502
|
// do not serialize defaults
|
|
15807
|
-
if (!has(element, name)) {
|
|
15503
|
+
if (!has$1(element, name)) {
|
|
15808
15504
|
return false;
|
|
15809
15505
|
}
|
|
15810
15506
|
|
|
@@ -16022,7 +15718,7 @@
|
|
|
16022
15718
|
if (this.isLocalNs(effectiveNs)) {
|
|
16023
15719
|
return { localName: ns.localName };
|
|
16024
15720
|
} else {
|
|
16025
|
-
return assign({ localName: ns.localName }, effectiveNs);
|
|
15721
|
+
return assign$1({ localName: ns.localName }, effectiveNs);
|
|
16026
15722
|
}
|
|
16027
15723
|
};
|
|
16028
15724
|
|
|
@@ -16033,7 +15729,7 @@
|
|
|
16033
15729
|
|
|
16034
15730
|
var attributes = [];
|
|
16035
15731
|
|
|
16036
|
-
forEach(element, function(val, key) {
|
|
15732
|
+
forEach$1(element, function(val, key) {
|
|
16037
15733
|
|
|
16038
15734
|
var nonNsAttr;
|
|
16039
15735
|
|
|
@@ -16041,7 +15737,7 @@
|
|
|
16041
15737
|
body.push(new BodySerializer().build({ type: 'String' }, val));
|
|
16042
15738
|
} else
|
|
16043
15739
|
if (key === '$children') {
|
|
16044
|
-
forEach(val, function(child) {
|
|
15740
|
+
forEach$1(val, function(child) {
|
|
16045
15741
|
body.push(new ElementSerializer(self).build(child));
|
|
16046
15742
|
});
|
|
16047
15743
|
} else
|
|
@@ -16111,7 +15807,7 @@
|
|
|
16111
15807
|
// parse namespace attributes first
|
|
16112
15808
|
// and log them. push non namespace attributes to a list
|
|
16113
15809
|
// and process them later
|
|
16114
|
-
forEach(genericAttrs, function(value, name) {
|
|
15810
|
+
forEach$1(genericAttrs, function(value, name) {
|
|
16115
15811
|
|
|
16116
15812
|
var nonNsAttr = self.parseNsAttribute(element, name, value);
|
|
16117
15813
|
|
|
@@ -16127,7 +15823,7 @@
|
|
|
16127
15823
|
|
|
16128
15824
|
var self = this;
|
|
16129
15825
|
|
|
16130
|
-
forEach(attributes, function(attr) {
|
|
15826
|
+
forEach$1(attributes, function(attr) {
|
|
16131
15827
|
|
|
16132
15828
|
// do not serialize xsi:type attribute
|
|
16133
15829
|
// it is set manually based on the actual implementation type
|
|
@@ -16138,6 +15834,8 @@
|
|
|
16138
15834
|
try {
|
|
16139
15835
|
self.addAttribute(self.nsAttributeName(attr.name), attr.value);
|
|
16140
15836
|
} catch (e) {
|
|
15837
|
+
/* global console */
|
|
15838
|
+
|
|
16141
15839
|
console.warn(
|
|
16142
15840
|
'missing namespace information for ',
|
|
16143
15841
|
attr.name, '=', attr.value, 'on', element,
|
|
@@ -16152,7 +15850,7 @@
|
|
|
16152
15850
|
body = this.body,
|
|
16153
15851
|
element = this.element;
|
|
16154
15852
|
|
|
16155
|
-
forEach(properties, function(p) {
|
|
15853
|
+
forEach$1(properties, function(p) {
|
|
16156
15854
|
var value = element.get(p.name),
|
|
16157
15855
|
isReference = p.isReference,
|
|
16158
15856
|
isMany = p.isMany;
|
|
@@ -16165,12 +15863,12 @@
|
|
|
16165
15863
|
body.push(new BodySerializer().build(p, value[0]));
|
|
16166
15864
|
} else
|
|
16167
15865
|
if (isSimple(p.type)) {
|
|
16168
|
-
forEach(value, function(v) {
|
|
15866
|
+
forEach$1(value, function(v) {
|
|
16169
15867
|
body.push(new ValueSerializer(self.addTagName(self.nsPropertyTagName(p))).build(p, v));
|
|
16170
15868
|
});
|
|
16171
15869
|
} else
|
|
16172
15870
|
if (isReference) {
|
|
16173
|
-
forEach(value, function(v) {
|
|
15871
|
+
forEach$1(value, function(v) {
|
|
16174
15872
|
body.push(new ReferenceSerializer(self.addTagName(self.nsPropertyTagName(p))).build(v));
|
|
16175
15873
|
});
|
|
16176
15874
|
} else {
|
|
@@ -16180,7 +15878,7 @@
|
|
|
16180
15878
|
var asType = serializeAsType(p),
|
|
16181
15879
|
asProperty = serializeAsProperty(p);
|
|
16182
15880
|
|
|
16183
|
-
forEach(value, function(v) {
|
|
15881
|
+
forEach$1(value, function(v) {
|
|
16184
15882
|
var serializer;
|
|
16185
15883
|
|
|
16186
15884
|
if (asType) {
|
|
@@ -16288,7 +15986,7 @@
|
|
|
16288
15986
|
var self = this,
|
|
16289
15987
|
element = this.element;
|
|
16290
15988
|
|
|
16291
|
-
forEach(properties, function(p) {
|
|
15989
|
+
forEach$1(properties, function(p) {
|
|
16292
15990
|
|
|
16293
15991
|
var value = element.get(p.name);
|
|
16294
15992
|
|
|
@@ -16299,7 +15997,7 @@
|
|
|
16299
15997
|
}
|
|
16300
15998
|
else {
|
|
16301
15999
|
var values = [];
|
|
16302
|
-
forEach(value, function(v) {
|
|
16000
|
+
forEach$1(value, function(v) {
|
|
16303
16001
|
values.push(v.id);
|
|
16304
16002
|
});
|
|
16305
16003
|
|
|
@@ -16355,7 +16053,7 @@
|
|
|
16355
16053
|
attrs = getNsAttrs(namespaces).concat(attrs);
|
|
16356
16054
|
}
|
|
16357
16055
|
|
|
16358
|
-
forEach(attrs, function(a) {
|
|
16056
|
+
forEach$1(attrs, function(a) {
|
|
16359
16057
|
writer
|
|
16360
16058
|
.append(' ')
|
|
16361
16059
|
.append(nsName(a.name)).append('="').append(a.value).append('"');
|
|
@@ -16382,7 +16080,7 @@
|
|
|
16382
16080
|
.indent();
|
|
16383
16081
|
}
|
|
16384
16082
|
|
|
16385
|
-
forEach(this.body, function(b) {
|
|
16083
|
+
forEach$1(this.body, function(b) {
|
|
16386
16084
|
b.serializeTo(writer);
|
|
16387
16085
|
});
|
|
16388
16086
|
|
|
@@ -16450,7 +16148,7 @@
|
|
|
16450
16148
|
|
|
16451
16149
|
function FormatingWriter(out, format) {
|
|
16452
16150
|
|
|
16453
|
-
var indent = [''];
|
|
16151
|
+
var indent = [ '' ];
|
|
16454
16152
|
|
|
16455
16153
|
this.append = function(str) {
|
|
16456
16154
|
out.write(str);
|
|
@@ -16492,7 +16190,7 @@
|
|
|
16492
16190
|
*/
|
|
16493
16191
|
function Writer(options) {
|
|
16494
16192
|
|
|
16495
|
-
options = assign({ format: false, preamble: true }, options || {});
|
|
16193
|
+
options = assign$1({ format: false, preamble: true }, options || {});
|
|
16496
16194
|
|
|
16497
16195
|
function toXML(tree, writer) {
|
|
16498
16196
|
var internalWriter = writer || new SavingWriter();
|
|
@@ -16559,12 +16257,12 @@
|
|
|
16559
16257
|
*/
|
|
16560
16258
|
BpmnModdle.prototype.fromXML = function(xmlStr, typeName, options) {
|
|
16561
16259
|
|
|
16562
|
-
if (!isString
|
|
16260
|
+
if (!isString(typeName)) {
|
|
16563
16261
|
options = typeName;
|
|
16564
16262
|
typeName = 'bpmn:Definitions';
|
|
16565
16263
|
}
|
|
16566
16264
|
|
|
16567
|
-
var reader = new Reader(assign$
|
|
16265
|
+
var reader = new Reader(assign$1({ model: this, lax: true }, options));
|
|
16568
16266
|
var rootHandler = reader.handler(typeName);
|
|
16569
16267
|
|
|
16570
16268
|
return reader.fromXML(xmlStr, rootHandler);
|
|
@@ -20251,7 +19949,7 @@
|
|
|
20251
19949
|
};
|
|
20252
19950
|
|
|
20253
19951
|
function simple(additionalPackages, options) {
|
|
20254
|
-
var pks = assign$
|
|
19952
|
+
var pks = assign$1({}, packages, additionalPackages);
|
|
20255
19953
|
|
|
20256
19954
|
return new BpmnModdle(pks, options);
|
|
20257
19955
|
}
|
|
@@ -20275,7 +19973,7 @@
|
|
|
20275
19973
|
}
|
|
20276
19974
|
|
|
20277
19975
|
var argLen = arguments.length;
|
|
20278
|
-
if (argLen >= 1 && isFunction
|
|
19976
|
+
if (argLen >= 1 && isFunction(arguments[argLen - 1])) {
|
|
20279
19977
|
|
|
20280
19978
|
var callback = arguments[argLen - 1];
|
|
20281
19979
|
|
|
@@ -20316,7 +20014,7 @@
|
|
|
20316
20014
|
function ensureCompatDiRef(businessObject) {
|
|
20317
20015
|
|
|
20318
20016
|
// bpmnElement can have multiple independent DIs
|
|
20319
|
-
if (!has$
|
|
20017
|
+
if (!has$1(businessObject, 'di')) {
|
|
20320
20018
|
Object.defineProperty(businessObject, 'di', {
|
|
20321
20019
|
enumerable: false,
|
|
20322
20020
|
get: function() {
|
|
@@ -20344,7 +20042,7 @@
|
|
|
20344
20042
|
* correctly specify one.
|
|
20345
20043
|
*/
|
|
20346
20044
|
function findDisplayCandidate(definitions) {
|
|
20347
|
-
return find
|
|
20045
|
+
return find(definitions.rootElements, function(e) {
|
|
20348
20046
|
return is(e, 'bpmn:Process') || is(e, 'bpmn:Collaboration');
|
|
20349
20047
|
});
|
|
20350
20048
|
}
|
|
@@ -20451,7 +20149,7 @@
|
|
|
20451
20149
|
function handlePlane(plane) {
|
|
20452
20150
|
registerDi(plane);
|
|
20453
20151
|
|
|
20454
|
-
forEach$
|
|
20152
|
+
forEach$1(plane.planeElement, handlePlaneElement);
|
|
20455
20153
|
}
|
|
20456
20154
|
|
|
20457
20155
|
function handlePlaneElement(planeElement) {
|
|
@@ -20576,7 +20274,7 @@
|
|
|
20576
20274
|
// walk through all processes that have not yet been drawn and draw them
|
|
20577
20275
|
// if they contain lanes with DI information.
|
|
20578
20276
|
// we do this to pass the free-floating lane test cases in the MIWG test suite
|
|
20579
|
-
var processes = filter
|
|
20277
|
+
var processes = filter(rootElements, function(e) {
|
|
20580
20278
|
return !isHandled(e) && is(e, 'bpmn:Process') && e.laneSets;
|
|
20581
20279
|
});
|
|
20582
20280
|
|
|
@@ -20588,7 +20286,7 @@
|
|
|
20588
20286
|
}
|
|
20589
20287
|
|
|
20590
20288
|
function handleMessageFlows(messageFlows, context) {
|
|
20591
|
-
forEach$
|
|
20289
|
+
forEach$1(messageFlows, contextual(handleMessageFlow, context));
|
|
20592
20290
|
}
|
|
20593
20291
|
|
|
20594
20292
|
function handleDataAssociation(association, context) {
|
|
@@ -20614,7 +20312,7 @@
|
|
|
20614
20312
|
|
|
20615
20313
|
function handleArtifacts(artifacts, context) {
|
|
20616
20314
|
|
|
20617
|
-
forEach$
|
|
20315
|
+
forEach$1(artifacts, function(e) {
|
|
20618
20316
|
if (is(e, 'bpmn:Association')) {
|
|
20619
20317
|
deferred.push(function() {
|
|
20620
20318
|
handleArtifact(e, context);
|
|
@@ -20631,8 +20329,8 @@
|
|
|
20631
20329
|
return;
|
|
20632
20330
|
}
|
|
20633
20331
|
|
|
20634
|
-
forEach$
|
|
20635
|
-
forEach$
|
|
20332
|
+
forEach$1(ioSpecification.dataInputs, contextual(handleDataInput, context));
|
|
20333
|
+
forEach$1(ioSpecification.dataOutputs, contextual(handleDataOutput, context));
|
|
20636
20334
|
}
|
|
20637
20335
|
|
|
20638
20336
|
function handleSubProcess(subProcess, context) {
|
|
@@ -20659,8 +20357,8 @@
|
|
|
20659
20357
|
// * bpmn:CatchEvent
|
|
20660
20358
|
//
|
|
20661
20359
|
deferred.push(function() {
|
|
20662
|
-
forEach$
|
|
20663
|
-
forEach$
|
|
20360
|
+
forEach$1(flowNode.dataInputAssociations, contextual(handleDataAssociation, context));
|
|
20361
|
+
forEach$1(flowNode.dataOutputAssociations, contextual(handleDataAssociation, context));
|
|
20664
20362
|
});
|
|
20665
20363
|
}
|
|
20666
20364
|
|
|
@@ -20687,11 +20385,11 @@
|
|
|
20687
20385
|
}
|
|
20688
20386
|
|
|
20689
20387
|
function handleLaneSet(laneSet, context) {
|
|
20690
|
-
forEach$
|
|
20388
|
+
forEach$1(laneSet.lanes, contextual(handleLane, context));
|
|
20691
20389
|
}
|
|
20692
20390
|
|
|
20693
20391
|
function handleLaneSets(laneSets, context) {
|
|
20694
|
-
forEach$
|
|
20392
|
+
forEach$1(laneSets, contextual(handleLaneSet, context));
|
|
20695
20393
|
}
|
|
20696
20394
|
|
|
20697
20395
|
function handleFlowElementsContainer(container, context) {
|
|
@@ -20703,7 +20401,7 @@
|
|
|
20703
20401
|
}
|
|
20704
20402
|
|
|
20705
20403
|
function handleFlowElements(flowElements, context) {
|
|
20706
|
-
forEach$
|
|
20404
|
+
forEach$1(flowElements, function(e) {
|
|
20707
20405
|
if (is(e, 'bpmn:SequenceFlow')) {
|
|
20708
20406
|
deferred.push(function() {
|
|
20709
20407
|
handleSequenceFlow(e, context);
|
|
@@ -20741,7 +20439,7 @@
|
|
|
20741
20439
|
|
|
20742
20440
|
function handleCollaboration(collaboration, context) {
|
|
20743
20441
|
|
|
20744
|
-
forEach$
|
|
20442
|
+
forEach$1(collaboration.participants, contextual(handleParticipant, context));
|
|
20745
20443
|
|
|
20746
20444
|
handleArtifacts(collaboration.artifacts, context);
|
|
20747
20445
|
|
|
@@ -20755,7 +20453,7 @@
|
|
|
20755
20453
|
function wireFlowNodeRefs(lane) {
|
|
20756
20454
|
|
|
20757
20455
|
// wire the virtual flowNodeRefs <-> relationship
|
|
20758
|
-
forEach$
|
|
20456
|
+
forEach$1(lane.flowNodeRef, function(flowNode) {
|
|
20759
20457
|
var lanes = flowNode.get('lanes');
|
|
20760
20458
|
|
|
20761
20459
|
if (lanes) {
|
|
@@ -20849,7 +20547,7 @@
|
|
|
20849
20547
|
|
|
20850
20548
|
// traverse BPMN 2.0 document model,
|
|
20851
20549
|
// starting at definitions
|
|
20852
|
-
forEach$
|
|
20550
|
+
forEach$1(diagramsToImport, function(diagram) {
|
|
20853
20551
|
walker.handleDefinitions(definitions, diagram);
|
|
20854
20552
|
});
|
|
20855
20553
|
|
|
@@ -20916,12 +20614,12 @@
|
|
|
20916
20614
|
if (is$1(rootElement, 'bpmn:Collaboration')) {
|
|
20917
20615
|
collaboration = rootElement;
|
|
20918
20616
|
} else {
|
|
20919
|
-
collaboration = find
|
|
20617
|
+
collaboration = find(definitions.rootElements, function(element) {
|
|
20920
20618
|
if (!is$1(element, 'bpmn:Collaboration')) {
|
|
20921
20619
|
return;
|
|
20922
20620
|
}
|
|
20923
20621
|
|
|
20924
|
-
return find
|
|
20622
|
+
return find(element.participants, function(participant) {
|
|
20925
20623
|
return participant.processRef === rootElement;
|
|
20926
20624
|
});
|
|
20927
20625
|
});
|
|
@@ -20945,7 +20643,7 @@
|
|
|
20945
20643
|
var diagramsToImport = [ bpmnDiagram ];
|
|
20946
20644
|
var handledElements = [ bpmnElement ];
|
|
20947
20645
|
|
|
20948
|
-
forEach$
|
|
20646
|
+
forEach$1(definitions.diagrams, function(diagram) {
|
|
20949
20647
|
var businessObject = diagram.plane.bpmnElement;
|
|
20950
20648
|
|
|
20951
20649
|
if (
|
|
@@ -20964,7 +20662,7 @@
|
|
|
20964
20662
|
function selfAndAllFlowElements(elements) {
|
|
20965
20663
|
var result = [];
|
|
20966
20664
|
|
|
20967
|
-
forEach$
|
|
20665
|
+
forEach$1(elements, function(element) {
|
|
20968
20666
|
if (!element) {
|
|
20969
20667
|
return;
|
|
20970
20668
|
}
|
|
@@ -21059,11 +20757,11 @@
|
|
|
21059
20757
|
function createLightbox() {
|
|
21060
20758
|
lightbox = domify$1(LIGHTBOX_MARKUP);
|
|
21061
20759
|
|
|
21062
|
-
assign
|
|
21063
|
-
assign
|
|
21064
|
-
assign
|
|
21065
|
-
assign
|
|
21066
|
-
assign
|
|
20760
|
+
assign(lightbox, LIGHTBOX_STYLES);
|
|
20761
|
+
assign(query('svg', lightbox), LOGO_STYLES);
|
|
20762
|
+
assign(query('.backdrop', lightbox), BACKDROP_STYLES);
|
|
20763
|
+
assign(query('.notice', lightbox), NOTICE_STYLES);
|
|
20764
|
+
assign(query('.link', lightbox), LINK_STYLES, {
|
|
21067
20765
|
'margin': '15px 20px 15px 10px',
|
|
21068
20766
|
'alignSelf': 'center'
|
|
21069
20767
|
});
|
|
@@ -21105,7 +20803,7 @@
|
|
|
21105
20803
|
*/
|
|
21106
20804
|
function BaseViewer(options) {
|
|
21107
20805
|
|
|
21108
|
-
options = assign$
|
|
20806
|
+
options = assign$1({}, DEFAULT_OPTIONS, options);
|
|
21109
20807
|
|
|
21110
20808
|
this._moddle = this._createModdle(options);
|
|
21111
20809
|
|
|
@@ -21647,8 +21345,8 @@
|
|
|
21647
21345
|
|
|
21648
21346
|
const diagramModules = [].concat(staticModules, baseModules, additionalModules);
|
|
21649
21347
|
|
|
21650
|
-
const diagramOptions = assign$
|
|
21651
|
-
canvas: assign$
|
|
21348
|
+
const diagramOptions = assign$1(omit(options, [ 'additionalModules' ]), {
|
|
21349
|
+
canvas: assign$1({}, options.canvas, { container: container }),
|
|
21652
21350
|
modules: diagramModules
|
|
21653
21351
|
});
|
|
21654
21352
|
|
|
@@ -21676,7 +21374,7 @@
|
|
|
21676
21374
|
|
|
21677
21375
|
const container = domify$1('<div class="bjs-container"></div>');
|
|
21678
21376
|
|
|
21679
|
-
assign
|
|
21377
|
+
assign(container, {
|
|
21680
21378
|
width: ensureUnit(options.width),
|
|
21681
21379
|
height: ensureUnit(options.height),
|
|
21682
21380
|
position: options.position
|
|
@@ -21686,7 +21384,7 @@
|
|
|
21686
21384
|
};
|
|
21687
21385
|
|
|
21688
21386
|
BaseViewer.prototype._createModdle = function(options) {
|
|
21689
|
-
const moddleOptions = assign$
|
|
21387
|
+
const moddleOptions = assign$1({}, this._moddleExtensions, options.moddleExtensions);
|
|
21690
21388
|
|
|
21691
21389
|
return new simple(moddleOptions);
|
|
21692
21390
|
};
|
|
@@ -21745,7 +21443,7 @@
|
|
|
21745
21443
|
return null;
|
|
21746
21444
|
}
|
|
21747
21445
|
|
|
21748
|
-
return find
|
|
21446
|
+
return find(definitions.diagrams, function(element) {
|
|
21749
21447
|
return element.id === diagramId;
|
|
21750
21448
|
}) || null;
|
|
21751
21449
|
}
|
|
@@ -21772,8 +21470,8 @@
|
|
|
21772
21470
|
|
|
21773
21471
|
const linkElement = domify$1(linkMarkup);
|
|
21774
21472
|
|
|
21775
|
-
assign
|
|
21776
|
-
assign
|
|
21473
|
+
assign(query('svg', linkElement), LOGO_STYLES);
|
|
21474
|
+
assign(linkElement, LINK_STYLES, {
|
|
21777
21475
|
position: 'absolute',
|
|
21778
21476
|
bottom: '15px',
|
|
21779
21477
|
right: '15px',
|
|
@@ -21895,7 +21593,7 @@
|
|
|
21895
21593
|
* @param {KeyboardEvent} event
|
|
21896
21594
|
*/
|
|
21897
21595
|
function isKey(keys, event) {
|
|
21898
|
-
keys = isArray$
|
|
21596
|
+
keys = isArray$2(keys) ? keys : [ keys ];
|
|
21899
21597
|
|
|
21900
21598
|
return keys.indexOf(event.key) !== -1 || keys.indexOf(event.keyCode) !== -1;
|
|
21901
21599
|
}
|
|
@@ -22089,7 +21787,7 @@
|
|
|
22089
21787
|
* @param {string} type
|
|
22090
21788
|
*/
|
|
22091
21789
|
Keyboard.prototype.addListener = function(priority, listener, type) {
|
|
22092
|
-
if (isFunction
|
|
21790
|
+
if (isFunction(priority)) {
|
|
22093
21791
|
type = listener;
|
|
22094
21792
|
listener = priority;
|
|
22095
21793
|
priority = DEFAULT_PRIORITY;
|
|
@@ -22305,7 +22003,7 @@
|
|
|
22305
22003
|
|
|
22306
22004
|
var self = this;
|
|
22307
22005
|
|
|
22308
|
-
this._config = assign$
|
|
22006
|
+
this._config = assign$1({}, DEFAULT_CONFIG, config || {});
|
|
22309
22007
|
|
|
22310
22008
|
keyboard.addListener(arrowsListener);
|
|
22311
22009
|
|
|
@@ -22634,7 +22332,7 @@
|
|
|
22634
22332
|
this._canvas = canvas;
|
|
22635
22333
|
this._container = canvas._container;
|
|
22636
22334
|
|
|
22637
|
-
this._handleWheel = bind$
|
|
22335
|
+
this._handleWheel = bind$2(this._handleWheel, this);
|
|
22638
22336
|
|
|
22639
22337
|
this._totalDelta = 0;
|
|
22640
22338
|
this._scale = config.scale || DEFAULT_SCALE;
|