bpmn-js 10.0.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 +880 -944
- package/dist/bpmn-modeler.production.min.js +8 -8
- package/dist/bpmn-navigated-viewer.development.js +566 -646
- package/dist/bpmn-navigated-viewer.production.min.js +6 -6
- package/dist/bpmn-viewer.development.js +548 -628
- package/dist/bpmn-viewer.production.min.js +6 -6
- package/package.json +13 -14
|
@@ -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,30 +26,45 @@
|
|
|
26
26
|
* @return {Array<?>}
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
const nativeToString$1 = Object.prototype.toString;
|
|
30
|
+
const nativeHasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
31
|
+
|
|
31
32
|
function isUndefined$2(obj) {
|
|
32
33
|
return obj === undefined;
|
|
33
34
|
}
|
|
35
|
+
|
|
34
36
|
function isDefined(obj) {
|
|
35
37
|
return obj !== undefined;
|
|
36
38
|
}
|
|
39
|
+
|
|
37
40
|
function isArray$2(obj) {
|
|
38
41
|
return nativeToString$1.call(obj) === '[object Array]';
|
|
39
42
|
}
|
|
43
|
+
|
|
40
44
|
function isObject(obj) {
|
|
41
45
|
return nativeToString$1.call(obj) === '[object Object]';
|
|
42
46
|
}
|
|
47
|
+
|
|
43
48
|
function isNumber(obj) {
|
|
44
49
|
return nativeToString$1.call(obj) === '[object Number]';
|
|
45
50
|
}
|
|
51
|
+
|
|
46
52
|
function isFunction(obj) {
|
|
47
|
-
|
|
48
|
-
|
|
53
|
+
const tag = nativeToString$1.call(obj);
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
tag === '[object Function]' ||
|
|
57
|
+
tag === '[object AsyncFunction]' ||
|
|
58
|
+
tag === '[object GeneratorFunction]' ||
|
|
59
|
+
tag === '[object AsyncGeneratorFunction]' ||
|
|
60
|
+
tag === '[object Proxy]'
|
|
61
|
+
);
|
|
49
62
|
}
|
|
63
|
+
|
|
50
64
|
function isString(obj) {
|
|
51
65
|
return nativeToString$1.call(obj) === '[object String]';
|
|
52
66
|
}
|
|
67
|
+
|
|
53
68
|
/**
|
|
54
69
|
* Return true, if target owns a property with the given key.
|
|
55
70
|
*
|
|
@@ -58,7 +73,6 @@
|
|
|
58
73
|
*
|
|
59
74
|
* @return {Boolean}
|
|
60
75
|
*/
|
|
61
|
-
|
|
62
76
|
function has$1(target, key) {
|
|
63
77
|
return nativeHasOwnProperty$1.call(target, key);
|
|
64
78
|
}
|
|
@@ -71,18 +85,25 @@
|
|
|
71
85
|
*
|
|
72
86
|
* @return {Object}
|
|
73
87
|
*/
|
|
74
|
-
|
|
75
88
|
function find(collection, matcher) {
|
|
89
|
+
|
|
76
90
|
matcher = toMatcher(matcher);
|
|
77
|
-
|
|
78
|
-
|
|
91
|
+
|
|
92
|
+
let match;
|
|
93
|
+
|
|
94
|
+
forEach$1(collection, function(val, key) {
|
|
79
95
|
if (matcher(val, key)) {
|
|
80
96
|
match = val;
|
|
97
|
+
|
|
81
98
|
return false;
|
|
82
99
|
}
|
|
83
100
|
});
|
|
101
|
+
|
|
84
102
|
return match;
|
|
103
|
+
|
|
85
104
|
}
|
|
105
|
+
|
|
106
|
+
|
|
86
107
|
/**
|
|
87
108
|
* Find element index in collection.
|
|
88
109
|
*
|
|
@@ -91,18 +112,24 @@
|
|
|
91
112
|
*
|
|
92
113
|
* @return {Object}
|
|
93
114
|
*/
|
|
94
|
-
|
|
95
115
|
function findIndex(collection, matcher) {
|
|
116
|
+
|
|
96
117
|
matcher = toMatcher(matcher);
|
|
97
|
-
|
|
98
|
-
|
|
118
|
+
|
|
119
|
+
let idx = isArray$2(collection) ? -1 : undefined;
|
|
120
|
+
|
|
121
|
+
forEach$1(collection, function(val, key) {
|
|
99
122
|
if (matcher(val, key)) {
|
|
100
123
|
idx = key;
|
|
124
|
+
|
|
101
125
|
return false;
|
|
102
126
|
}
|
|
103
127
|
});
|
|
128
|
+
|
|
104
129
|
return idx;
|
|
105
130
|
}
|
|
131
|
+
|
|
132
|
+
|
|
106
133
|
/**
|
|
107
134
|
* Find element in collection.
|
|
108
135
|
*
|
|
@@ -111,16 +138,20 @@
|
|
|
111
138
|
*
|
|
112
139
|
* @return {Array} result
|
|
113
140
|
*/
|
|
114
|
-
|
|
115
141
|
function filter(collection, matcher) {
|
|
116
|
-
|
|
117
|
-
|
|
142
|
+
|
|
143
|
+
let result = [];
|
|
144
|
+
|
|
145
|
+
forEach$1(collection, function(val, key) {
|
|
118
146
|
if (matcher(val, key)) {
|
|
119
147
|
result.push(val);
|
|
120
148
|
}
|
|
121
149
|
});
|
|
150
|
+
|
|
122
151
|
return result;
|
|
123
152
|
}
|
|
153
|
+
|
|
154
|
+
|
|
124
155
|
/**
|
|
125
156
|
* Iterate over collection; returning something
|
|
126
157
|
* (non-undefined) will stop iteration.
|
|
@@ -130,19 +161,22 @@
|
|
|
130
161
|
*
|
|
131
162
|
* @return {Object} return result that stopped the iteration
|
|
132
163
|
*/
|
|
133
|
-
|
|
134
164
|
function forEach$1(collection, iterator) {
|
|
135
|
-
|
|
165
|
+
|
|
166
|
+
let val,
|
|
167
|
+
result;
|
|
136
168
|
|
|
137
169
|
if (isUndefined$2(collection)) {
|
|
138
170
|
return;
|
|
139
171
|
}
|
|
140
172
|
|
|
141
|
-
|
|
173
|
+
const convertKey = isArray$2(collection) ? toNum$1 : identity$1;
|
|
174
|
+
|
|
175
|
+
for (let key in collection) {
|
|
142
176
|
|
|
143
|
-
for (var key in collection) {
|
|
144
177
|
if (has$1(collection, key)) {
|
|
145
178
|
val = collection[key];
|
|
179
|
+
|
|
146
180
|
result = iterator(val, convertKey(key));
|
|
147
181
|
|
|
148
182
|
if (result === false) {
|
|
@@ -151,6 +185,8 @@
|
|
|
151
185
|
}
|
|
152
186
|
}
|
|
153
187
|
}
|
|
188
|
+
|
|
189
|
+
|
|
154
190
|
/**
|
|
155
191
|
* Reduce collection, returning a single result.
|
|
156
192
|
*
|
|
@@ -160,13 +196,16 @@
|
|
|
160
196
|
*
|
|
161
197
|
* @return {Any} result returned from last iterator
|
|
162
198
|
*/
|
|
163
|
-
|
|
164
199
|
function reduce(collection, iterator, result) {
|
|
165
|
-
|
|
200
|
+
|
|
201
|
+
forEach$1(collection, function(value, idx) {
|
|
166
202
|
result = iterator(result, value, idx);
|
|
167
203
|
});
|
|
204
|
+
|
|
168
205
|
return result;
|
|
169
206
|
}
|
|
207
|
+
|
|
208
|
+
|
|
170
209
|
/**
|
|
171
210
|
* Return true if every element in the collection
|
|
172
211
|
* matches the criteria.
|
|
@@ -176,12 +215,14 @@
|
|
|
176
215
|
*
|
|
177
216
|
* @return {Boolean}
|
|
178
217
|
*/
|
|
179
|
-
|
|
180
218
|
function every(collection, matcher) {
|
|
181
|
-
|
|
219
|
+
|
|
220
|
+
return !!reduce(collection, function(matches, val, key) {
|
|
182
221
|
return matches && matcher(val, key);
|
|
183
222
|
}, true);
|
|
184
223
|
}
|
|
224
|
+
|
|
225
|
+
|
|
185
226
|
/**
|
|
186
227
|
* Return true if some elements in the collection
|
|
187
228
|
* match the criteria.
|
|
@@ -191,10 +232,12 @@
|
|
|
191
232
|
*
|
|
192
233
|
* @return {Boolean}
|
|
193
234
|
*/
|
|
194
|
-
|
|
195
235
|
function some(collection, matcher) {
|
|
236
|
+
|
|
196
237
|
return !!find(collection, matcher);
|
|
197
238
|
}
|
|
239
|
+
|
|
240
|
+
|
|
198
241
|
/**
|
|
199
242
|
* Transform a collection into another collection
|
|
200
243
|
* by piping each member through the given fn.
|
|
@@ -204,14 +247,18 @@
|
|
|
204
247
|
*
|
|
205
248
|
* @return {Array} transformed collection
|
|
206
249
|
*/
|
|
250
|
+
function map$1(collection, fn) {
|
|
207
251
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
forEach$1(collection, function
|
|
252
|
+
let result = [];
|
|
253
|
+
|
|
254
|
+
forEach$1(collection, function(val, key) {
|
|
211
255
|
result.push(fn(val, key));
|
|
212
256
|
});
|
|
257
|
+
|
|
213
258
|
return result;
|
|
214
259
|
}
|
|
260
|
+
|
|
261
|
+
|
|
215
262
|
/**
|
|
216
263
|
* Create an object pattern matcher.
|
|
217
264
|
*
|
|
@@ -225,21 +272,25 @@
|
|
|
225
272
|
*
|
|
226
273
|
* @return {Function} matcherFn
|
|
227
274
|
*/
|
|
228
|
-
|
|
229
275
|
function matchPattern(pattern) {
|
|
230
|
-
|
|
231
|
-
|
|
276
|
+
|
|
277
|
+
return function(el) {
|
|
278
|
+
|
|
279
|
+
return every(pattern, function(val, key) {
|
|
232
280
|
return el[key] === val;
|
|
233
281
|
});
|
|
282
|
+
|
|
234
283
|
};
|
|
235
284
|
}
|
|
236
285
|
|
|
286
|
+
|
|
237
287
|
function toMatcher(matcher) {
|
|
238
|
-
return isFunction(matcher) ? matcher :
|
|
288
|
+
return isFunction(matcher) ? matcher : (e) => {
|
|
239
289
|
return e === matcher;
|
|
240
290
|
};
|
|
241
291
|
}
|
|
242
292
|
|
|
293
|
+
|
|
243
294
|
function identity$1(arg) {
|
|
244
295
|
return arg;
|
|
245
296
|
}
|
|
@@ -261,20 +312,26 @@
|
|
|
261
312
|
* @return {Function} debounced function
|
|
262
313
|
*/
|
|
263
314
|
function debounce(fn, timeout) {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
315
|
+
|
|
316
|
+
let timer;
|
|
317
|
+
|
|
318
|
+
let lastArgs;
|
|
319
|
+
let lastThis;
|
|
320
|
+
|
|
321
|
+
let lastNow;
|
|
268
322
|
|
|
269
323
|
function fire(force) {
|
|
270
|
-
|
|
271
|
-
|
|
324
|
+
|
|
325
|
+
let now = Date.now();
|
|
326
|
+
|
|
327
|
+
let scheduledDiff = force ? 0 : (lastNow + timeout) - now;
|
|
272
328
|
|
|
273
329
|
if (scheduledDiff > 0) {
|
|
274
330
|
return schedule(scheduledDiff);
|
|
275
331
|
}
|
|
276
332
|
|
|
277
333
|
fn.apply(lastThis, lastArgs);
|
|
334
|
+
|
|
278
335
|
clear();
|
|
279
336
|
}
|
|
280
337
|
|
|
@@ -298,16 +355,13 @@
|
|
|
298
355
|
clear();
|
|
299
356
|
}
|
|
300
357
|
|
|
301
|
-
function callback() {
|
|
358
|
+
function callback(...args) {
|
|
302
359
|
lastNow = Date.now();
|
|
303
360
|
|
|
304
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
305
|
-
args[_key] = arguments[_key];
|
|
306
|
-
}
|
|
307
|
-
|
|
308
361
|
lastArgs = args;
|
|
309
|
-
lastThis = this;
|
|
362
|
+
lastThis = this;
|
|
310
363
|
|
|
364
|
+
// ensure an execution is scheduled
|
|
311
365
|
if (!timer) {
|
|
312
366
|
schedule(timeout);
|
|
313
367
|
}
|
|
@@ -315,8 +369,10 @@
|
|
|
315
369
|
|
|
316
370
|
callback.flush = flush;
|
|
317
371
|
callback.cancel = clear;
|
|
372
|
+
|
|
318
373
|
return callback;
|
|
319
374
|
}
|
|
375
|
+
|
|
320
376
|
/**
|
|
321
377
|
* Bind function against target <this>.
|
|
322
378
|
*
|
|
@@ -325,29 +381,10 @@
|
|
|
325
381
|
*
|
|
326
382
|
* @return {Function} bound function
|
|
327
383
|
*/
|
|
328
|
-
|
|
329
|
-
function bind(fn, target) {
|
|
384
|
+
function bind$2(fn, target) {
|
|
330
385
|
return fn.bind(target);
|
|
331
386
|
}
|
|
332
387
|
|
|
333
|
-
function _extends() {
|
|
334
|
-
_extends = Object.assign || function (target) {
|
|
335
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
336
|
-
var source = arguments[i];
|
|
337
|
-
|
|
338
|
-
for (var key in source) {
|
|
339
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
340
|
-
target[key] = source[key];
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
return target;
|
|
346
|
-
};
|
|
347
|
-
|
|
348
|
-
return _extends.apply(this, arguments);
|
|
349
|
-
}
|
|
350
|
-
|
|
351
388
|
/**
|
|
352
389
|
* Convenience wrapper for `Object.assign`.
|
|
353
390
|
*
|
|
@@ -356,14 +393,10 @@
|
|
|
356
393
|
*
|
|
357
394
|
* @return {Object} the target
|
|
358
395
|
*/
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
362
|
-
others[_key - 1] = arguments[_key];
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
return _extends.apply(void 0, [target].concat(others));
|
|
396
|
+
function assign$1(target, ...others) {
|
|
397
|
+
return Object.assign(target, ...others);
|
|
366
398
|
}
|
|
399
|
+
|
|
367
400
|
/**
|
|
368
401
|
* Pick given properties from the target object.
|
|
369
402
|
*
|
|
@@ -372,17 +405,22 @@
|
|
|
372
405
|
*
|
|
373
406
|
* @return {Object} target
|
|
374
407
|
*/
|
|
375
|
-
|
|
376
408
|
function pick(target, properties) {
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
409
|
+
|
|
410
|
+
let result = {};
|
|
411
|
+
|
|
412
|
+
let obj = Object(target);
|
|
413
|
+
|
|
414
|
+
forEach$1(properties, function(prop) {
|
|
415
|
+
|
|
380
416
|
if (prop in obj) {
|
|
381
417
|
result[prop] = target[prop];
|
|
382
418
|
}
|
|
383
419
|
});
|
|
420
|
+
|
|
384
421
|
return result;
|
|
385
422
|
}
|
|
423
|
+
|
|
386
424
|
/**
|
|
387
425
|
* Pick all target properties, excluding the given ones.
|
|
388
426
|
*
|
|
@@ -391,15 +429,19 @@
|
|
|
391
429
|
*
|
|
392
430
|
* @return {Object} target
|
|
393
431
|
*/
|
|
394
|
-
|
|
395
432
|
function omit(target, properties) {
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
433
|
+
|
|
434
|
+
let result = {};
|
|
435
|
+
|
|
436
|
+
let obj = Object(target);
|
|
437
|
+
|
|
438
|
+
forEach$1(obj, function(prop, key) {
|
|
439
|
+
|
|
399
440
|
if (properties.indexOf(key) === -1) {
|
|
400
441
|
result[key] = prop;
|
|
401
442
|
}
|
|
402
443
|
});
|
|
444
|
+
|
|
403
445
|
return result;
|
|
404
446
|
}
|
|
405
447
|
|
|
@@ -620,9 +662,11 @@
|
|
|
620
662
|
|
|
621
663
|
if (element.ownerDocument !== target.ownerDocument) {
|
|
622
664
|
try {
|
|
665
|
+
|
|
623
666
|
// may fail on webkit
|
|
624
667
|
return target.ownerDocument.importNode(element, true);
|
|
625
668
|
} catch (e) {
|
|
669
|
+
|
|
626
670
|
// ignore
|
|
627
671
|
}
|
|
628
672
|
}
|
|
@@ -748,6 +792,7 @@
|
|
|
748
792
|
var type = CSS_PROPERTIES[hyphenated];
|
|
749
793
|
|
|
750
794
|
if (type) {
|
|
795
|
+
|
|
751
796
|
// append pixel unit, unless present
|
|
752
797
|
if (type === LENGTH_ATTR && typeof value === 'number') {
|
|
753
798
|
value = String(value) + 'px';
|
|
@@ -793,38 +838,24 @@
|
|
|
793
838
|
}
|
|
794
839
|
|
|
795
840
|
/**
|
|
796
|
-
*
|
|
841
|
+
* Taken from https://github.com/component/classes
|
|
842
|
+
*
|
|
843
|
+
* Without the component bits.
|
|
797
844
|
*/
|
|
798
|
-
function index(arr, obj) {
|
|
799
|
-
if (arr.indexOf) {
|
|
800
|
-
return arr.indexOf(obj);
|
|
801
|
-
}
|
|
802
|
-
|
|
803
845
|
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
return -1;
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
var re$1 = /\s+/;
|
|
814
|
-
|
|
815
|
-
var toString$1 = Object.prototype.toString;
|
|
846
|
+
/**
|
|
847
|
+
* toString reference.
|
|
848
|
+
*/
|
|
816
849
|
|
|
817
|
-
|
|
818
|
-
return typeof o !== 'undefined';
|
|
819
|
-
}
|
|
850
|
+
const toString$1 = Object.prototype.toString;
|
|
820
851
|
|
|
821
852
|
/**
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
853
|
+
* Wrap `el` in a `ClassList`.
|
|
854
|
+
*
|
|
855
|
+
* @param {Element} el
|
|
856
|
+
* @return {ClassList}
|
|
857
|
+
* @api public
|
|
858
|
+
*/
|
|
828
859
|
|
|
829
860
|
function classes$1(el) {
|
|
830
861
|
return new ClassList$1(el);
|
|
@@ -839,79 +870,48 @@
|
|
|
839
870
|
}
|
|
840
871
|
|
|
841
872
|
/**
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
873
|
+
* Add class `name` if not already present.
|
|
874
|
+
*
|
|
875
|
+
* @param {String} name
|
|
876
|
+
* @return {ClassList}
|
|
877
|
+
* @api public
|
|
878
|
+
*/
|
|
848
879
|
|
|
849
880
|
ClassList$1.prototype.add = function(name) {
|
|
850
|
-
|
|
851
|
-
// classList
|
|
852
|
-
if (this.list) {
|
|
853
|
-
this.list.add(name);
|
|
854
|
-
return this;
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
// fallback
|
|
858
|
-
var arr = this.array();
|
|
859
|
-
var i = index(arr, name);
|
|
860
|
-
if (!~i) {
|
|
861
|
-
arr.push(name);
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
if (defined(this.el.className.baseVal)) {
|
|
865
|
-
this.el.className.baseVal = arr.join(' ');
|
|
866
|
-
} else {
|
|
867
|
-
this.el.className = arr.join(' ');
|
|
868
|
-
}
|
|
869
|
-
|
|
881
|
+
this.list.add(name);
|
|
870
882
|
return this;
|
|
871
883
|
};
|
|
872
884
|
|
|
873
885
|
/**
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
886
|
+
* Remove class `name` when present, or
|
|
887
|
+
* pass a regular expression to remove
|
|
888
|
+
* any which match.
|
|
889
|
+
*
|
|
890
|
+
* @param {String|RegExp} name
|
|
891
|
+
* @return {ClassList}
|
|
892
|
+
* @api public
|
|
893
|
+
*/
|
|
882
894
|
|
|
883
895
|
ClassList$1.prototype.remove = function(name) {
|
|
884
|
-
if ('[object RegExp]'
|
|
896
|
+
if ('[object RegExp]' == toString$1.call(name)) {
|
|
885
897
|
return this.removeMatching(name);
|
|
886
898
|
}
|
|
887
899
|
|
|
888
|
-
|
|
889
|
-
if (this.list) {
|
|
890
|
-
this.list.remove(name);
|
|
891
|
-
return this;
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
// fallback
|
|
895
|
-
var arr = this.array();
|
|
896
|
-
var i = index(arr, name);
|
|
897
|
-
if (~i) {
|
|
898
|
-
arr.splice(i, 1);
|
|
899
|
-
}
|
|
900
|
-
this.el.className.baseVal = arr.join(' ');
|
|
900
|
+
this.list.remove(name);
|
|
901
901
|
return this;
|
|
902
902
|
};
|
|
903
903
|
|
|
904
904
|
/**
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
905
|
+
* Remove all classes matching `re`.
|
|
906
|
+
*
|
|
907
|
+
* @param {RegExp} re
|
|
908
|
+
* @return {ClassList}
|
|
909
|
+
* @api private
|
|
910
|
+
*/
|
|
911
911
|
|
|
912
912
|
ClassList$1.prototype.removeMatching = function(re) {
|
|
913
|
-
|
|
914
|
-
for (
|
|
913
|
+
const arr = this.array();
|
|
914
|
+
for (let i = 0; i < arr.length; i++) {
|
|
915
915
|
if (re.test(arr[i])) {
|
|
916
916
|
this.remove(arr[i]);
|
|
917
917
|
}
|
|
@@ -920,81 +920,51 @@
|
|
|
920
920
|
};
|
|
921
921
|
|
|
922
922
|
/**
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
923
|
+
* Toggle class `name`, can force state via `force`.
|
|
924
|
+
*
|
|
925
|
+
* For browsers that support classList, but do not support `force` yet,
|
|
926
|
+
* the mistake will be detected and corrected.
|
|
927
|
+
*
|
|
928
|
+
* @param {String} name
|
|
929
|
+
* @param {Boolean} force
|
|
930
|
+
* @return {ClassList}
|
|
931
|
+
* @api public
|
|
932
|
+
*/
|
|
933
933
|
|
|
934
934
|
ClassList$1.prototype.toggle = function(name, force) {
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
if (force !== this.list.toggle(name, force)) {
|
|
939
|
-
this.list.toggle(name); // toggle again to correct
|
|
940
|
-
}
|
|
941
|
-
} else {
|
|
942
|
-
this.list.toggle(name);
|
|
943
|
-
}
|
|
944
|
-
return this;
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
// fallback
|
|
948
|
-
if (defined(force)) {
|
|
949
|
-
if (!force) {
|
|
950
|
-
this.remove(name);
|
|
951
|
-
} else {
|
|
952
|
-
this.add(name);
|
|
935
|
+
if ('undefined' !== typeof force) {
|
|
936
|
+
if (force !== this.list.toggle(name, force)) {
|
|
937
|
+
this.list.toggle(name); // toggle again to correct
|
|
953
938
|
}
|
|
954
939
|
} else {
|
|
955
|
-
|
|
956
|
-
this.remove(name);
|
|
957
|
-
} else {
|
|
958
|
-
this.add(name);
|
|
959
|
-
}
|
|
940
|
+
this.list.toggle(name);
|
|
960
941
|
}
|
|
961
|
-
|
|
962
942
|
return this;
|
|
963
943
|
};
|
|
964
944
|
|
|
965
945
|
/**
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
946
|
+
* Return an array of classes.
|
|
947
|
+
*
|
|
948
|
+
* @return {Array}
|
|
949
|
+
* @api public
|
|
950
|
+
*/
|
|
971
951
|
|
|
972
952
|
ClassList$1.prototype.array = function() {
|
|
973
|
-
|
|
974
|
-
var str = className.replace(/^\s+|\s+$/g, '');
|
|
975
|
-
var arr = str.split(re$1);
|
|
976
|
-
if ('' === arr[0]) {
|
|
977
|
-
arr.shift();
|
|
978
|
-
}
|
|
979
|
-
return arr;
|
|
953
|
+
return Array.from(this.list);
|
|
980
954
|
};
|
|
981
955
|
|
|
982
956
|
/**
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
957
|
+
* Check if class `name` is present.
|
|
958
|
+
*
|
|
959
|
+
* @param {String} name
|
|
960
|
+
* @return {ClassList}
|
|
961
|
+
* @api public
|
|
962
|
+
*/
|
|
989
963
|
|
|
990
964
|
ClassList$1.prototype.has =
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
this.list.contains(name) :
|
|
995
|
-
!! ~index(this.array(), name)
|
|
996
|
-
);
|
|
997
|
-
};
|
|
965
|
+
ClassList$1.prototype.contains = function(name) {
|
|
966
|
+
return this.list.contains(name);
|
|
967
|
+
};
|
|
998
968
|
|
|
999
969
|
function remove$2(element) {
|
|
1000
970
|
var parent = element.parentNode;
|
|
@@ -1046,6 +1016,7 @@
|
|
|
1046
1016
|
svg = SVG_START + svg.substring(4);
|
|
1047
1017
|
}
|
|
1048
1018
|
} else {
|
|
1019
|
+
|
|
1049
1020
|
// namespace svg
|
|
1050
1021
|
svg = SVG_START + '>' + svg + '</svg>';
|
|
1051
1022
|
unwrap = true;
|
|
@@ -1201,8 +1172,10 @@
|
|
|
1201
1172
|
var i, len, attrMap, attrNode, childNodes;
|
|
1202
1173
|
|
|
1203
1174
|
switch (node.nodeType) {
|
|
1175
|
+
|
|
1204
1176
|
// TEXT
|
|
1205
1177
|
case 3:
|
|
1178
|
+
|
|
1206
1179
|
// replace special XML characters
|
|
1207
1180
|
output.push(escape$1(node.textContent, TEXT_ENTITIES));
|
|
1208
1181
|
break;
|
|
@@ -1266,6 +1239,7 @@
|
|
|
1266
1239
|
}
|
|
1267
1240
|
|
|
1268
1241
|
if (!isFragment(parsed)) {
|
|
1242
|
+
|
|
1269
1243
|
// extract <svg> from parsed document
|
|
1270
1244
|
parsed = parsed.documentElement;
|
|
1271
1245
|
}
|
|
@@ -1536,6 +1510,21 @@
|
|
|
1536
1510
|
return componentsToPath(rectPath);
|
|
1537
1511
|
}
|
|
1538
1512
|
|
|
1513
|
+
function _mergeNamespaces$1(n, m) {
|
|
1514
|
+
m.forEach(function (e) {
|
|
1515
|
+
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
1516
|
+
if (k !== 'default' && !(k in n)) {
|
|
1517
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
1518
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
1519
|
+
enumerable: true,
|
|
1520
|
+
get: function () { return e[k]; }
|
|
1521
|
+
});
|
|
1522
|
+
}
|
|
1523
|
+
});
|
|
1524
|
+
});
|
|
1525
|
+
return Object.freeze(n);
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1539
1528
|
/**
|
|
1540
1529
|
* Flatten array, one level deep.
|
|
1541
1530
|
*
|
|
@@ -1611,19 +1600,15 @@
|
|
|
1611
1600
|
*
|
|
1612
1601
|
* @return {Element} the element
|
|
1613
1602
|
*/
|
|
1614
|
-
function assign
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
for (var _len = arguments.length, styleSources = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1618
|
-
styleSources[_key - 1] = arguments[_key];
|
|
1619
|
-
}
|
|
1603
|
+
function assign(element, ...styleSources) {
|
|
1604
|
+
const target = element.style;
|
|
1620
1605
|
|
|
1621
|
-
forEach(styleSources, function
|
|
1606
|
+
forEach(styleSources, function(style) {
|
|
1622
1607
|
if (!style) {
|
|
1623
1608
|
return;
|
|
1624
1609
|
}
|
|
1625
1610
|
|
|
1626
|
-
forEach(style, function
|
|
1611
|
+
forEach(style, function(value, key) {
|
|
1627
1612
|
target[key] = value;
|
|
1628
1613
|
});
|
|
1629
1614
|
});
|
|
@@ -1640,6 +1625,7 @@
|
|
|
1640
1625
|
* @api public
|
|
1641
1626
|
*/
|
|
1642
1627
|
function attr(el, name, val) {
|
|
1628
|
+
|
|
1643
1629
|
// get
|
|
1644
1630
|
if (arguments.length == 2) {
|
|
1645
1631
|
return el.getAttribute(name);
|
|
@@ -1656,33 +1642,17 @@
|
|
|
1656
1642
|
return el;
|
|
1657
1643
|
}
|
|
1658
1644
|
|
|
1659
|
-
var indexOf = [].indexOf;
|
|
1660
|
-
|
|
1661
|
-
var indexof = function(arr, obj){
|
|
1662
|
-
if (indexOf) return arr.indexOf(obj);
|
|
1663
|
-
for (var i = 0; i < arr.length; ++i) {
|
|
1664
|
-
if (arr[i] === obj) return i;
|
|
1665
|
-
}
|
|
1666
|
-
return -1;
|
|
1667
|
-
};
|
|
1668
|
-
|
|
1669
1645
|
/**
|
|
1670
1646
|
* Taken from https://github.com/component/classes
|
|
1671
1647
|
*
|
|
1672
1648
|
* Without the component bits.
|
|
1673
1649
|
*/
|
|
1674
1650
|
|
|
1675
|
-
/**
|
|
1676
|
-
* Whitespace regexp.
|
|
1677
|
-
*/
|
|
1678
|
-
|
|
1679
|
-
var re = /\s+/;
|
|
1680
|
-
|
|
1681
1651
|
/**
|
|
1682
1652
|
* toString reference.
|
|
1683
1653
|
*/
|
|
1684
1654
|
|
|
1685
|
-
|
|
1655
|
+
const toString = Object.prototype.toString;
|
|
1686
1656
|
|
|
1687
1657
|
/**
|
|
1688
1658
|
* Wrap `el` in a `ClassList`.
|
|
@@ -1719,18 +1689,8 @@
|
|
|
1719
1689
|
* @api public
|
|
1720
1690
|
*/
|
|
1721
1691
|
|
|
1722
|
-
ClassList.prototype.add = function
|
|
1723
|
-
|
|
1724
|
-
if (this.list) {
|
|
1725
|
-
this.list.add(name);
|
|
1726
|
-
return this;
|
|
1727
|
-
}
|
|
1728
|
-
|
|
1729
|
-
// fallback
|
|
1730
|
-
var arr = this.array();
|
|
1731
|
-
var i = indexof(arr, name);
|
|
1732
|
-
if (!~i) arr.push(name);
|
|
1733
|
-
this.el.className = arr.join(' ');
|
|
1692
|
+
ClassList.prototype.add = function(name) {
|
|
1693
|
+
this.list.add(name);
|
|
1734
1694
|
return this;
|
|
1735
1695
|
};
|
|
1736
1696
|
|
|
@@ -1744,22 +1704,12 @@
|
|
|
1744
1704
|
* @api public
|
|
1745
1705
|
*/
|
|
1746
1706
|
|
|
1747
|
-
ClassList.prototype.remove = function
|
|
1707
|
+
ClassList.prototype.remove = function(name) {
|
|
1748
1708
|
if ('[object RegExp]' == toString.call(name)) {
|
|
1749
1709
|
return this.removeMatching(name);
|
|
1750
1710
|
}
|
|
1751
1711
|
|
|
1752
|
-
|
|
1753
|
-
if (this.list) {
|
|
1754
|
-
this.list.remove(name);
|
|
1755
|
-
return this;
|
|
1756
|
-
}
|
|
1757
|
-
|
|
1758
|
-
// fallback
|
|
1759
|
-
var arr = this.array();
|
|
1760
|
-
var i = indexof(arr, name);
|
|
1761
|
-
if (~i) arr.splice(i, 1);
|
|
1762
|
-
this.el.className = arr.join(' ');
|
|
1712
|
+
this.list.remove(name);
|
|
1763
1713
|
return this;
|
|
1764
1714
|
};
|
|
1765
1715
|
|
|
@@ -1771,9 +1721,9 @@
|
|
|
1771
1721
|
* @api private
|
|
1772
1722
|
*/
|
|
1773
1723
|
|
|
1774
|
-
ClassList.prototype.removeMatching = function
|
|
1775
|
-
|
|
1776
|
-
for (
|
|
1724
|
+
ClassList.prototype.removeMatching = function(re) {
|
|
1725
|
+
const arr = this.array();
|
|
1726
|
+
for (let i = 0; i < arr.length; i++) {
|
|
1777
1727
|
if (re.test(arr[i])) {
|
|
1778
1728
|
this.remove(arr[i]);
|
|
1779
1729
|
}
|
|
@@ -1793,34 +1743,14 @@
|
|
|
1793
1743
|
* @api public
|
|
1794
1744
|
*/
|
|
1795
1745
|
|
|
1796
|
-
ClassList.prototype.toggle = function
|
|
1797
|
-
// classList
|
|
1798
|
-
if (this.list) {
|
|
1799
|
-
if ('undefined' !== typeof force) {
|
|
1800
|
-
if (force !== this.list.toggle(name, force)) {
|
|
1801
|
-
this.list.toggle(name); // toggle again to correct
|
|
1802
|
-
}
|
|
1803
|
-
} else {
|
|
1804
|
-
this.list.toggle(name);
|
|
1805
|
-
}
|
|
1806
|
-
return this;
|
|
1807
|
-
}
|
|
1808
|
-
|
|
1809
|
-
// fallback
|
|
1746
|
+
ClassList.prototype.toggle = function(name, force) {
|
|
1810
1747
|
if ('undefined' !== typeof force) {
|
|
1811
|
-
if (
|
|
1812
|
-
this.
|
|
1813
|
-
} else {
|
|
1814
|
-
this.add(name);
|
|
1748
|
+
if (force !== this.list.toggle(name, force)) {
|
|
1749
|
+
this.list.toggle(name); // toggle again to correct
|
|
1815
1750
|
}
|
|
1816
1751
|
} else {
|
|
1817
|
-
|
|
1818
|
-
this.remove(name);
|
|
1819
|
-
} else {
|
|
1820
|
-
this.add(name);
|
|
1821
|
-
}
|
|
1752
|
+
this.list.toggle(name);
|
|
1822
1753
|
}
|
|
1823
|
-
|
|
1824
1754
|
return this;
|
|
1825
1755
|
};
|
|
1826
1756
|
|
|
@@ -1831,12 +1761,8 @@
|
|
|
1831
1761
|
* @api public
|
|
1832
1762
|
*/
|
|
1833
1763
|
|
|
1834
|
-
ClassList.prototype.array = function
|
|
1835
|
-
|
|
1836
|
-
var str = className.replace(/^\s+|\s+$/g, '');
|
|
1837
|
-
var arr = str.split(re);
|
|
1838
|
-
if ('' === arr[0]) arr.shift();
|
|
1839
|
-
return arr;
|
|
1764
|
+
ClassList.prototype.array = function() {
|
|
1765
|
+
return Array.from(this.list);
|
|
1840
1766
|
};
|
|
1841
1767
|
|
|
1842
1768
|
/**
|
|
@@ -1847,8 +1773,9 @@
|
|
|
1847
1773
|
* @api public
|
|
1848
1774
|
*/
|
|
1849
1775
|
|
|
1850
|
-
ClassList.prototype.has =
|
|
1851
|
-
|
|
1776
|
+
ClassList.prototype.has =
|
|
1777
|
+
ClassList.prototype.contains = function(name) {
|
|
1778
|
+
return this.list.contains(name);
|
|
1852
1779
|
};
|
|
1853
1780
|
|
|
1854
1781
|
/**
|
|
@@ -1866,33 +1793,14 @@
|
|
|
1866
1793
|
return el;
|
|
1867
1794
|
}
|
|
1868
1795
|
|
|
1869
|
-
var proto = typeof Element !== 'undefined' ? Element.prototype : {};
|
|
1870
|
-
var vendor = proto.matches
|
|
1871
|
-
|| proto.matchesSelector
|
|
1872
|
-
|| proto.webkitMatchesSelector
|
|
1873
|
-
|| proto.mozMatchesSelector
|
|
1874
|
-
|| proto.msMatchesSelector
|
|
1875
|
-
|| proto.oMatchesSelector;
|
|
1876
|
-
|
|
1877
|
-
var matchesSelector = match;
|
|
1878
|
-
|
|
1879
1796
|
/**
|
|
1880
|
-
*
|
|
1797
|
+
* @param { HTMLElement } element
|
|
1798
|
+
* @param { String } selector
|
|
1881
1799
|
*
|
|
1882
|
-
* @
|
|
1883
|
-
* @param {String} selector
|
|
1884
|
-
* @return {Boolean}
|
|
1885
|
-
* @api public
|
|
1800
|
+
* @return { boolean }
|
|
1886
1801
|
*/
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
if (!el || el.nodeType !== 1) return false;
|
|
1890
|
-
if (vendor) return vendor.call(el, selector);
|
|
1891
|
-
var nodes = el.parentNode.querySelectorAll(selector);
|
|
1892
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
1893
|
-
if (nodes[i] == el) return true;
|
|
1894
|
-
}
|
|
1895
|
-
return false;
|
|
1802
|
+
function matches(element, selector) {
|
|
1803
|
+
return element && typeof element.matches === 'function' && element.matches(selector);
|
|
1896
1804
|
}
|
|
1897
1805
|
|
|
1898
1806
|
/**
|
|
@@ -1902,23 +1810,26 @@
|
|
|
1902
1810
|
* @param {String} selector
|
|
1903
1811
|
* @param {Boolean} checkYourSelf (optional)
|
|
1904
1812
|
*/
|
|
1905
|
-
function closest
|
|
1813
|
+
function closest(element, selector, checkYourSelf) {
|
|
1906
1814
|
var currentElem = checkYourSelf ? element : element.parentNode;
|
|
1907
1815
|
|
|
1908
|
-
while (currentElem && currentElem.nodeType !== document.DOCUMENT_NODE &&
|
|
1816
|
+
while (currentElem && currentElem.nodeType !== document.DOCUMENT_NODE &&
|
|
1817
|
+
currentElem.nodeType !== document.DOCUMENT_FRAGMENT_NODE) {
|
|
1909
1818
|
|
|
1910
|
-
if (
|
|
1819
|
+
if (matches(currentElem, selector)) {
|
|
1911
1820
|
return currentElem;
|
|
1912
1821
|
}
|
|
1913
1822
|
|
|
1914
1823
|
currentElem = currentElem.parentNode;
|
|
1915
1824
|
}
|
|
1916
1825
|
|
|
1917
|
-
return
|
|
1826
|
+
return matches(currentElem, selector) ? currentElem : null;
|
|
1918
1827
|
}
|
|
1919
1828
|
|
|
1829
|
+
var componentEvent = {};
|
|
1830
|
+
|
|
1920
1831
|
var bind$1 = window.addEventListener ? 'addEventListener' : 'attachEvent',
|
|
1921
|
-
unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent',
|
|
1832
|
+
unbind$1 = window.removeEventListener ? 'removeEventListener' : 'detachEvent',
|
|
1922
1833
|
prefix$6 = bind$1 !== 'addEventListener' ? 'on' : '';
|
|
1923
1834
|
|
|
1924
1835
|
/**
|
|
@@ -1932,7 +1843,7 @@
|
|
|
1932
1843
|
* @api public
|
|
1933
1844
|
*/
|
|
1934
1845
|
|
|
1935
|
-
var bind_1 = function(el, type, fn, capture){
|
|
1846
|
+
var bind_1 = componentEvent.bind = function(el, type, fn, capture){
|
|
1936
1847
|
el[bind$1](prefix$6 + type, fn, capture || false);
|
|
1937
1848
|
return fn;
|
|
1938
1849
|
};
|
|
@@ -1948,15 +1859,17 @@
|
|
|
1948
1859
|
* @api public
|
|
1949
1860
|
*/
|
|
1950
1861
|
|
|
1951
|
-
var unbind_1 = function(el, type, fn, capture){
|
|
1952
|
-
el[unbind](prefix$6 + type, fn, capture || false);
|
|
1862
|
+
var unbind_1 = componentEvent.unbind = function(el, type, fn, capture){
|
|
1863
|
+
el[unbind$1](prefix$6 + type, fn, capture || false);
|
|
1953
1864
|
return fn;
|
|
1954
1865
|
};
|
|
1955
1866
|
|
|
1956
|
-
var
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1867
|
+
var event = /*#__PURE__*/_mergeNamespaces$1({
|
|
1868
|
+
__proto__: null,
|
|
1869
|
+
bind: bind_1,
|
|
1870
|
+
unbind: unbind_1,
|
|
1871
|
+
'default': componentEvent
|
|
1872
|
+
}, [componentEvent]);
|
|
1960
1873
|
|
|
1961
1874
|
/**
|
|
1962
1875
|
* Module dependencies.
|
|
@@ -1978,14 +1891,14 @@
|
|
|
1978
1891
|
|
|
1979
1892
|
// Some events don't bubble, so we want to bind to the capture phase instead
|
|
1980
1893
|
// when delegating.
|
|
1981
|
-
var forceCaptureEvents = ['focus', 'blur'];
|
|
1894
|
+
var forceCaptureEvents = [ 'focus', 'blur' ];
|
|
1982
1895
|
|
|
1983
|
-
function bind
|
|
1896
|
+
function bind(el, selector, type, fn, capture) {
|
|
1984
1897
|
if (forceCaptureEvents.indexOf(type) !== -1) {
|
|
1985
1898
|
capture = true;
|
|
1986
1899
|
}
|
|
1987
1900
|
|
|
1988
|
-
return
|
|
1901
|
+
return event.bind(el, type, function(e) {
|
|
1989
1902
|
var target = e.target || e.srcElement;
|
|
1990
1903
|
e.delegateTarget = closest(target, selector, true);
|
|
1991
1904
|
if (e.delegateTarget) {
|
|
@@ -2003,17 +1916,17 @@
|
|
|
2003
1916
|
* @param {Boolean} capture
|
|
2004
1917
|
* @api public
|
|
2005
1918
|
*/
|
|
2006
|
-
function unbind
|
|
1919
|
+
function unbind(el, type, fn, capture) {
|
|
2007
1920
|
if (forceCaptureEvents.indexOf(type) !== -1) {
|
|
2008
1921
|
capture = true;
|
|
2009
1922
|
}
|
|
2010
1923
|
|
|
2011
|
-
return
|
|
1924
|
+
return event.unbind(el, type, fn, capture);
|
|
2012
1925
|
}
|
|
2013
1926
|
|
|
2014
1927
|
var delegate = {
|
|
2015
|
-
bind
|
|
2016
|
-
unbind
|
|
1928
|
+
bind,
|
|
1929
|
+
unbind
|
|
2017
1930
|
};
|
|
2018
1931
|
|
|
2019
1932
|
/**
|
|
@@ -2042,7 +1955,7 @@
|
|
|
2042
1955
|
* Wrap map from jquery.
|
|
2043
1956
|
*/
|
|
2044
1957
|
|
|
2045
|
-
var map
|
|
1958
|
+
var map = {
|
|
2046
1959
|
legend: [1, '<fieldset>', '</fieldset>'],
|
|
2047
1960
|
tr: [2, '<table><tbody>', '</tbody></table>'],
|
|
2048
1961
|
col: [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
|
|
@@ -2051,27 +1964,27 @@
|
|
|
2051
1964
|
_default: innerHTMLBug ? [1, 'X<div>', '</div>'] : [0, '', '']
|
|
2052
1965
|
};
|
|
2053
1966
|
|
|
2054
|
-
map
|
|
2055
|
-
map
|
|
1967
|
+
map.td =
|
|
1968
|
+
map.th = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
|
|
2056
1969
|
|
|
2057
|
-
map
|
|
2058
|
-
map
|
|
1970
|
+
map.option =
|
|
1971
|
+
map.optgroup = [1, '<select multiple="multiple">', '</select>'];
|
|
2059
1972
|
|
|
2060
|
-
map
|
|
2061
|
-
map
|
|
2062
|
-
map
|
|
2063
|
-
map
|
|
2064
|
-
map
|
|
1973
|
+
map.thead =
|
|
1974
|
+
map.tbody =
|
|
1975
|
+
map.colgroup =
|
|
1976
|
+
map.caption =
|
|
1977
|
+
map.tfoot = [1, '<table>', '</table>'];
|
|
2065
1978
|
|
|
2066
|
-
map
|
|
2067
|
-
map
|
|
2068
|
-
map
|
|
2069
|
-
map
|
|
2070
|
-
map
|
|
2071
|
-
map
|
|
2072
|
-
map
|
|
2073
|
-
map
|
|
2074
|
-
map
|
|
1979
|
+
map.polyline =
|
|
1980
|
+
map.ellipse =
|
|
1981
|
+
map.polygon =
|
|
1982
|
+
map.circle =
|
|
1983
|
+
map.text =
|
|
1984
|
+
map.line =
|
|
1985
|
+
map.path =
|
|
1986
|
+
map.rect =
|
|
1987
|
+
map.g = [1, '<svg xmlns="http://www.w3.org/2000/svg" version="1.1">','</svg>'];
|
|
2075
1988
|
|
|
2076
1989
|
/**
|
|
2077
1990
|
* Parse `html` and return a DOM Node instance, which could be a TextNode,
|
|
@@ -2106,7 +2019,7 @@
|
|
|
2106
2019
|
}
|
|
2107
2020
|
|
|
2108
2021
|
// wrap map
|
|
2109
|
-
var wrap = map
|
|
2022
|
+
var wrap = Object.prototype.hasOwnProperty.call(map, tag) ? map[tag] : map._default;
|
|
2110
2023
|
var depth = wrap[0];
|
|
2111
2024
|
var prefix = wrap[1];
|
|
2112
2025
|
var suffix = wrap[2];
|
|
@@ -2128,6 +2041,8 @@
|
|
|
2128
2041
|
return fragment;
|
|
2129
2042
|
}
|
|
2130
2043
|
|
|
2044
|
+
var domify$1 = domify;
|
|
2045
|
+
|
|
2131
2046
|
function query(selector, el) {
|
|
2132
2047
|
el = el || document;
|
|
2133
2048
|
|
|
@@ -2379,7 +2294,7 @@
|
|
|
2379
2294
|
var computeStyle = styles.computeStyle;
|
|
2380
2295
|
|
|
2381
2296
|
function addMarker(id, options) {
|
|
2382
|
-
var attrs = assign({
|
|
2297
|
+
var attrs = assign$1({
|
|
2383
2298
|
fill: black,
|
|
2384
2299
|
strokeWidth: 1,
|
|
2385
2300
|
strokeLinecap: 'round',
|
|
@@ -2674,7 +2589,7 @@
|
|
|
2674
2589
|
}
|
|
2675
2590
|
|
|
2676
2591
|
function drawMarker(type, parentGfx, path, attrs) {
|
|
2677
|
-
return drawPath(parentGfx, path, assign({ 'data-marker': type }, attrs));
|
|
2592
|
+
return drawPath(parentGfx, path, assign$1({ 'data-marker': type }, attrs));
|
|
2678
2593
|
}
|
|
2679
2594
|
|
|
2680
2595
|
function renderer(type) {
|
|
@@ -2746,7 +2661,7 @@
|
|
|
2746
2661
|
|
|
2747
2662
|
function renderLabel(parentGfx, label, options) {
|
|
2748
2663
|
|
|
2749
|
-
options = assign({
|
|
2664
|
+
options = assign$1({
|
|
2750
2665
|
size: {
|
|
2751
2666
|
width: 100
|
|
2752
2667
|
}
|
|
@@ -2786,7 +2701,7 @@
|
|
|
2786
2701
|
return renderLabel(parentGfx, getLabel(element), {
|
|
2787
2702
|
box: box,
|
|
2788
2703
|
fitBox: true,
|
|
2789
|
-
style: assign(
|
|
2704
|
+
style: assign$1(
|
|
2790
2705
|
{},
|
|
2791
2706
|
textRenderer.getExternalStyle(),
|
|
2792
2707
|
{
|
|
@@ -3388,7 +3303,7 @@
|
|
|
3388
3303
|
return task;
|
|
3389
3304
|
},
|
|
3390
3305
|
'bpmn:SubProcess': function(parentGfx, element, attrs) {
|
|
3391
|
-
attrs = assign({
|
|
3306
|
+
attrs = assign$1({
|
|
3392
3307
|
fill: getFillColor(element, defaultFillColor),
|
|
3393
3308
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
3394
3309
|
}, attrs);
|
|
@@ -3474,7 +3389,7 @@
|
|
|
3474
3389
|
return lane;
|
|
3475
3390
|
},
|
|
3476
3391
|
'bpmn:Lane': function(parentGfx, element, attrs) {
|
|
3477
|
-
var rect = drawRect(parentGfx, element.width, element.height, 0, assign({
|
|
3392
|
+
var rect = drawRect(parentGfx, element.width, element.height, 0, assign$1({
|
|
3478
3393
|
fill: getFillColor(element, defaultFillColor),
|
|
3479
3394
|
fillOpacity: HIGH_FILL_OPACITY,
|
|
3480
3395
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
@@ -3696,7 +3611,7 @@
|
|
|
3696
3611
|
var fill = getFillColor(element, defaultFillColor),
|
|
3697
3612
|
stroke = getStrokeColor(element, defaultStrokeColor);
|
|
3698
3613
|
|
|
3699
|
-
attrs = assign({
|
|
3614
|
+
attrs = assign$1({
|
|
3700
3615
|
strokeDasharray: '0.5, 5',
|
|
3701
3616
|
strokeLinecap: 'round',
|
|
3702
3617
|
strokeLinejoin: 'round',
|
|
@@ -3884,12 +3799,12 @@
|
|
|
3884
3799
|
}
|
|
3885
3800
|
|
|
3886
3801
|
// apply fillOpacity
|
|
3887
|
-
var outerAttrs = assign({}, attrs, {
|
|
3802
|
+
var outerAttrs = assign$1({}, attrs, {
|
|
3888
3803
|
fillOpacity: 1
|
|
3889
3804
|
});
|
|
3890
3805
|
|
|
3891
3806
|
// apply no-fill
|
|
3892
|
-
var innerAttrs = assign({}, attrs, {
|
|
3807
|
+
var innerAttrs = assign$1({}, attrs, {
|
|
3893
3808
|
fill: 'none'
|
|
3894
3809
|
});
|
|
3895
3810
|
|
|
@@ -4241,7 +4156,7 @@
|
|
|
4241
4156
|
function parsePadding(padding) {
|
|
4242
4157
|
|
|
4243
4158
|
if (isObject(padding)) {
|
|
4244
|
-
return assign({ top: 0, left: 0, right: 0, bottom: 0 }, padding);
|
|
4159
|
+
return assign$1({ top: 0, left: 0, right: 0, bottom: 0 }, padding);
|
|
4245
4160
|
} else {
|
|
4246
4161
|
return {
|
|
4247
4162
|
top: padding,
|
|
@@ -4405,7 +4320,7 @@
|
|
|
4405
4320
|
id: 'helper-svg'
|
|
4406
4321
|
});
|
|
4407
4322
|
|
|
4408
|
-
assign
|
|
4323
|
+
assign(helperSvg, {
|
|
4409
4324
|
visibility: 'hidden',
|
|
4410
4325
|
position: 'fixed',
|
|
4411
4326
|
width: 0,
|
|
@@ -4430,7 +4345,7 @@
|
|
|
4430
4345
|
*/
|
|
4431
4346
|
function Text(config) {
|
|
4432
4347
|
|
|
4433
|
-
this._config = assign({}, {
|
|
4348
|
+
this._config = assign$1({}, {
|
|
4434
4349
|
size: DEFAULT_LABEL_SIZE$1,
|
|
4435
4350
|
padding: DEFAULT_BOX_PADDING,
|
|
4436
4351
|
style: {},
|
|
@@ -4479,8 +4394,8 @@
|
|
|
4479
4394
|
* @return {Object} { element, dimensions }
|
|
4480
4395
|
*/
|
|
4481
4396
|
Text.prototype.layoutText = function(text, options) {
|
|
4482
|
-
var box = assign({}, this._config.size, options.box),
|
|
4483
|
-
style = assign({}, this._config.style, options.style),
|
|
4397
|
+
var box = assign$1({}, this._config.size, options.box),
|
|
4398
|
+
style = assign$1({}, this._config.style, options.style),
|
|
4484
4399
|
align = parseAlign(options.align || this._config.align),
|
|
4485
4400
|
padding = parsePadding(options.padding !== undefined ? options.padding : this._config.padding),
|
|
4486
4401
|
fitBox = options.fitBox || false;
|
|
@@ -4595,7 +4510,7 @@
|
|
|
4595
4510
|
|
|
4596
4511
|
function TextRenderer(config) {
|
|
4597
4512
|
|
|
4598
|
-
var defaultStyle = assign({
|
|
4513
|
+
var defaultStyle = assign$1({
|
|
4599
4514
|
fontFamily: 'Arial, sans-serif',
|
|
4600
4515
|
fontSize: DEFAULT_FONT_SIZE,
|
|
4601
4516
|
fontWeight: 'normal',
|
|
@@ -4604,7 +4519,7 @@
|
|
|
4604
4519
|
|
|
4605
4520
|
var fontSize = parseInt(defaultStyle.fontSize, 10) - 1;
|
|
4606
4521
|
|
|
4607
|
-
var externalStyle = assign({}, defaultStyle, {
|
|
4522
|
+
var externalStyle = assign$1({}, defaultStyle, {
|
|
4608
4523
|
fontSize: fontSize
|
|
4609
4524
|
}, config && config.externalStyle || {});
|
|
4610
4525
|
|
|
@@ -5340,7 +5255,7 @@
|
|
|
5340
5255
|
size = DEFAULT_LABEL_SIZE;
|
|
5341
5256
|
}
|
|
5342
5257
|
|
|
5343
|
-
return assign({
|
|
5258
|
+
return assign$1({
|
|
5344
5259
|
x: mid.x - size.width / 2,
|
|
5345
5260
|
y: mid.y - size.height / 2
|
|
5346
5261
|
}, size);
|
|
@@ -5510,7 +5425,7 @@
|
|
|
5510
5425
|
* @return {Object}
|
|
5511
5426
|
*/
|
|
5512
5427
|
function elementData(semantic, di, attrs) {
|
|
5513
|
-
return assign({
|
|
5428
|
+
return assign$1({
|
|
5514
5429
|
id: semantic.id,
|
|
5515
5430
|
type: semantic.$type,
|
|
5516
5431
|
businessObject: semantic,
|
|
@@ -6125,7 +6040,7 @@
|
|
|
6125
6040
|
|
|
6126
6041
|
function createHitStyle(classNames, attrs) {
|
|
6127
6042
|
|
|
6128
|
-
attrs = assign({
|
|
6043
|
+
attrs = assign$1({
|
|
6129
6044
|
stroke: 'white',
|
|
6130
6045
|
strokeWidth: 15
|
|
6131
6046
|
}, attrs || {});
|
|
@@ -6223,7 +6138,7 @@
|
|
|
6223
6138
|
*/
|
|
6224
6139
|
this.createBoxHit = function(gfx, type, attrs) {
|
|
6225
6140
|
|
|
6226
|
-
attrs = assign({
|
|
6141
|
+
attrs = assign$1({
|
|
6227
6142
|
x: 0,
|
|
6228
6143
|
y: 0
|
|
6229
6144
|
}, attrs);
|
|
@@ -6468,7 +6383,7 @@
|
|
|
6468
6383
|
function createOutline(gfx, bounds) {
|
|
6469
6384
|
var outline = create$1('rect');
|
|
6470
6385
|
|
|
6471
|
-
attr$1(outline, assign({
|
|
6386
|
+
attr$1(outline, assign$1({
|
|
6472
6387
|
x: 10,
|
|
6473
6388
|
y: 10,
|
|
6474
6389
|
rx: 3,
|
|
@@ -6761,7 +6676,7 @@
|
|
|
6761
6676
|
|
|
6762
6677
|
var rect = create$1('rect');
|
|
6763
6678
|
|
|
6764
|
-
attr$1(rect, assign({
|
|
6679
|
+
attr$1(rect, assign$1({
|
|
6765
6680
|
rx: 3
|
|
6766
6681
|
}, bBox));
|
|
6767
6682
|
|
|
@@ -7004,7 +6919,7 @@
|
|
|
7004
6919
|
|
|
7005
6920
|
this._ids = ids;
|
|
7006
6921
|
|
|
7007
|
-
this._overlayDefaults = assign({
|
|
6922
|
+
this._overlayDefaults = assign$1({
|
|
7008
6923
|
|
|
7009
6924
|
// no show constraints
|
|
7010
6925
|
show: null,
|
|
@@ -7141,7 +7056,7 @@
|
|
|
7141
7056
|
|
|
7142
7057
|
var id = this._ids.next();
|
|
7143
7058
|
|
|
7144
|
-
overlay = assign({}, this._overlayDefaults, overlay, {
|
|
7059
|
+
overlay = assign$1({}, this._overlayDefaults, overlay, {
|
|
7145
7060
|
id: id,
|
|
7146
7061
|
type: type,
|
|
7147
7062
|
element: element,
|
|
@@ -7280,8 +7195,8 @@
|
|
|
7280
7195
|
|
|
7281
7196
|
|
|
7282
7197
|
Overlays.prototype._createOverlayContainer = function(element) {
|
|
7283
|
-
var html = domify('<div class="djs-overlays" />');
|
|
7284
|
-
assign
|
|
7198
|
+
var html = domify$1('<div class="djs-overlays" />');
|
|
7199
|
+
assign(html, { position: 'absolute' });
|
|
7285
7200
|
|
|
7286
7201
|
this._overlayRoot.appendChild(html);
|
|
7287
7202
|
|
|
@@ -7347,13 +7262,13 @@
|
|
|
7347
7262
|
// create proper html elements from
|
|
7348
7263
|
// overlay HTML strings
|
|
7349
7264
|
if (isString(html)) {
|
|
7350
|
-
html = domify(html);
|
|
7265
|
+
html = domify$1(html);
|
|
7351
7266
|
}
|
|
7352
7267
|
|
|
7353
7268
|
overlayContainer = this._getOverlayContainer(element);
|
|
7354
7269
|
|
|
7355
|
-
htmlContainer = domify('<div class="djs-overlay" data-overlay-id="' + id + '">');
|
|
7356
|
-
assign
|
|
7270
|
+
htmlContainer = domify$1('<div class="djs-overlay" data-overlay-id="' + id + '">');
|
|
7271
|
+
assign(htmlContainer, { position: 'absolute' });
|
|
7357
7272
|
|
|
7358
7273
|
htmlContainer.appendChild(html);
|
|
7359
7274
|
|
|
@@ -7537,11 +7452,11 @@
|
|
|
7537
7452
|
// helpers /////////////////////////////
|
|
7538
7453
|
|
|
7539
7454
|
function createRoot(parentNode) {
|
|
7540
|
-
var root = domify(
|
|
7455
|
+
var root = domify$1(
|
|
7541
7456
|
'<div class="djs-overlay-container" />'
|
|
7542
7457
|
);
|
|
7543
7458
|
|
|
7544
|
-
assign
|
|
7459
|
+
assign(root, {
|
|
7545
7460
|
position: 'absolute',
|
|
7546
7461
|
width: 0,
|
|
7547
7462
|
height: 0
|
|
@@ -7553,7 +7468,7 @@
|
|
|
7553
7468
|
}
|
|
7554
7469
|
|
|
7555
7470
|
function setPosition(el, x, y) {
|
|
7556
|
-
assign
|
|
7471
|
+
assign(el, { left: x + 'px', top: y + 'px' });
|
|
7557
7472
|
}
|
|
7558
7473
|
|
|
7559
7474
|
/**
|
|
@@ -7981,7 +7896,7 @@
|
|
|
7981
7896
|
* @param {canvas} canvas
|
|
7982
7897
|
*/
|
|
7983
7898
|
function DrilldownBreadcrumbs(eventBus, elementRegistry, overlays, canvas) {
|
|
7984
|
-
var breadcrumbs = domify('<ul class="bjs-breadcrumbs"></ul>');
|
|
7899
|
+
var breadcrumbs = domify$1('<ul class="bjs-breadcrumbs"></ul>');
|
|
7985
7900
|
var container = canvas.getContainer();
|
|
7986
7901
|
var containerClasses = classes(container);
|
|
7987
7902
|
container.appendChild(breadcrumbs);
|
|
@@ -8017,7 +7932,7 @@
|
|
|
8017
7932
|
|
|
8018
7933
|
var path = boParents.map(function(parent) {
|
|
8019
7934
|
var title = escapeHTML(parent.name || parent.id);
|
|
8020
|
-
var link = domify('<li><span class="bjs-crumb"><a title="' + title + '">' + title + '</a></span></li>');
|
|
7935
|
+
var link = domify$1('<li><span class="bjs-crumb"><a title="' + title + '">' + title + '</a></span></li>');
|
|
8021
7936
|
|
|
8022
7937
|
var parentPlane = canvas.findRoot(getPlaneIdFromShape(parent)) || canvas.findRoot(parent.id);
|
|
8023
7938
|
|
|
@@ -8557,7 +8472,7 @@
|
|
|
8557
8472
|
this.removeOverlay(element);
|
|
8558
8473
|
}
|
|
8559
8474
|
|
|
8560
|
-
var button = domify('<button class="bjs-drilldown">' + ARROW_DOWN_SVG + '</button>');
|
|
8475
|
+
var button = domify$1('<button class="bjs-drilldown">' + ARROW_DOWN_SVG + '</button>');
|
|
8561
8476
|
|
|
8562
8477
|
button.addEventListener('click', function() {
|
|
8563
8478
|
canvas.setRootElement(canvas.findRoot(getPlaneIdFromShape(element)));
|
|
@@ -8599,7 +8514,7 @@
|
|
|
8599
8514
|
subprocessCompatibility: [ 'type', SubprocessCompatibility ]
|
|
8600
8515
|
};
|
|
8601
8516
|
|
|
8602
|
-
|
|
8517
|
+
const CLASS_PATTERN = /^class[ {]/;
|
|
8603
8518
|
|
|
8604
8519
|
|
|
8605
8520
|
/**
|
|
@@ -8617,7 +8532,7 @@
|
|
|
8617
8532
|
* @return {boolean}
|
|
8618
8533
|
*/
|
|
8619
8534
|
function isArray(obj) {
|
|
8620
|
-
return
|
|
8535
|
+
return Array.isArray(obj);
|
|
8621
8536
|
}
|
|
8622
8537
|
|
|
8623
8538
|
/**
|
|
@@ -8641,14 +8556,15 @@
|
|
|
8641
8556
|
*
|
|
8642
8557
|
* @return {T & InjectAnnotated}
|
|
8643
8558
|
*/
|
|
8644
|
-
function annotate() {
|
|
8645
|
-
var args = Array.prototype.slice.call(arguments);
|
|
8559
|
+
function annotate(...args) {
|
|
8646
8560
|
|
|
8647
8561
|
if (args.length === 1 && isArray(args[0])) {
|
|
8648
8562
|
args = args[0];
|
|
8649
8563
|
}
|
|
8650
8564
|
|
|
8651
|
-
|
|
8565
|
+
args = [ ...args ];
|
|
8566
|
+
|
|
8567
|
+
const fn = args.pop();
|
|
8652
8568
|
|
|
8653
8569
|
fn.$inject = args;
|
|
8654
8570
|
|
|
@@ -8669,9 +8585,9 @@
|
|
|
8669
8585
|
// first constructor(...) pattern found which may be the one
|
|
8670
8586
|
// of a nested class, too.
|
|
8671
8587
|
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8588
|
+
const CONSTRUCTOR_ARGS = /constructor\s*[^(]*\(\s*([^)]*)\)/m;
|
|
8589
|
+
const FN_ARGS = /^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m;
|
|
8590
|
+
const FN_ARG = /\/\*([^*]*)\*\//m;
|
|
8675
8591
|
|
|
8676
8592
|
/**
|
|
8677
8593
|
* @param {unknown} fn
|
|
@@ -8681,20 +8597,20 @@
|
|
|
8681
8597
|
function parseAnnotations(fn) {
|
|
8682
8598
|
|
|
8683
8599
|
if (typeof fn !== 'function') {
|
|
8684
|
-
throw new Error(
|
|
8600
|
+
throw new Error(`Cannot annotate "${fn}". Expected a function!`);
|
|
8685
8601
|
}
|
|
8686
8602
|
|
|
8687
|
-
|
|
8603
|
+
const match = fn.toString().match(isClass(fn) ? CONSTRUCTOR_ARGS : FN_ARGS);
|
|
8688
8604
|
|
|
8689
8605
|
// may parse class without constructor
|
|
8690
8606
|
if (!match) {
|
|
8691
8607
|
return [];
|
|
8692
8608
|
}
|
|
8693
8609
|
|
|
8694
|
-
|
|
8610
|
+
const args = match[1] || match[2];
|
|
8695
8611
|
|
|
8696
|
-
return args && args.split(',').map(
|
|
8697
|
-
|
|
8612
|
+
return args && args.split(',').map(arg => {
|
|
8613
|
+
const argMatch = arg.match(FN_ARG);
|
|
8698
8614
|
return (argMatch && argMatch[1] || arg).trim();
|
|
8699
8615
|
}) || [];
|
|
8700
8616
|
}
|
|
@@ -8719,21 +8635,21 @@
|
|
|
8719
8635
|
if (strict === false) {
|
|
8720
8636
|
return null;
|
|
8721
8637
|
} else {
|
|
8722
|
-
throw error(
|
|
8638
|
+
throw error(`No provider for "${ name }"!`);
|
|
8723
8639
|
}
|
|
8724
8640
|
}
|
|
8725
8641
|
};
|
|
8726
8642
|
|
|
8727
|
-
|
|
8728
|
-
|
|
8729
|
-
|
|
8643
|
+
const currentlyResolving = [];
|
|
8644
|
+
const providers = this._providers = Object.create(parent._providers || null);
|
|
8645
|
+
const instances = this._instances = Object.create(null);
|
|
8730
8646
|
|
|
8731
|
-
|
|
8647
|
+
const self = instances.injector = this;
|
|
8732
8648
|
|
|
8733
|
-
|
|
8734
|
-
|
|
8649
|
+
const error = function(msg) {
|
|
8650
|
+
const stack = currentlyResolving.join(' -> ');
|
|
8735
8651
|
currentlyResolving.length = 0;
|
|
8736
|
-
return new Error(stack ? msg
|
|
8652
|
+
return new Error(stack ? `${ msg } (Resolving: ${ stack })` : msg);
|
|
8737
8653
|
};
|
|
8738
8654
|
|
|
8739
8655
|
/**
|
|
@@ -8746,8 +8662,8 @@
|
|
|
8746
8662
|
*/
|
|
8747
8663
|
function get(name, strict) {
|
|
8748
8664
|
if (!providers[name] && name.indexOf('.') !== -1) {
|
|
8749
|
-
|
|
8750
|
-
|
|
8665
|
+
const parts = name.split('.');
|
|
8666
|
+
let pivot = get(parts.shift());
|
|
8751
8667
|
|
|
8752
8668
|
while (parts.length) {
|
|
8753
8669
|
pivot = pivot[parts.shift()];
|
|
@@ -8786,12 +8702,12 @@
|
|
|
8786
8702
|
if (isArray(fn)) {
|
|
8787
8703
|
fn = annotate(fn.slice());
|
|
8788
8704
|
} else {
|
|
8789
|
-
throw
|
|
8705
|
+
throw error(`Cannot invoke "${ fn }". Expected a function!`);
|
|
8790
8706
|
}
|
|
8791
8707
|
}
|
|
8792
8708
|
|
|
8793
|
-
|
|
8794
|
-
|
|
8709
|
+
const inject = fn.$inject || parseAnnotations(fn);
|
|
8710
|
+
const dependencies = inject.map(dep => {
|
|
8795
8711
|
if (hasOwnProp(locals, dep)) {
|
|
8796
8712
|
return locals[dep];
|
|
8797
8713
|
} else {
|
|
@@ -8806,22 +8722,22 @@
|
|
|
8806
8722
|
}
|
|
8807
8723
|
|
|
8808
8724
|
function instantiate(Type) {
|
|
8809
|
-
|
|
8810
|
-
|
|
8811
|
-
|
|
8812
|
-
|
|
8725
|
+
const {
|
|
8726
|
+
fn,
|
|
8727
|
+
dependencies
|
|
8728
|
+
} = fnDef(Type);
|
|
8813
8729
|
|
|
8814
8730
|
// instantiate var args constructor
|
|
8815
|
-
|
|
8731
|
+
const Constructor = Function.prototype.bind.apply(fn, [ null ].concat(dependencies));
|
|
8816
8732
|
|
|
8817
8733
|
return new Constructor();
|
|
8818
8734
|
}
|
|
8819
8735
|
|
|
8820
8736
|
function invoke(func, context, locals) {
|
|
8821
|
-
|
|
8822
|
-
|
|
8823
|
-
|
|
8824
|
-
|
|
8737
|
+
const {
|
|
8738
|
+
fn,
|
|
8739
|
+
dependencies
|
|
8740
|
+
} = fnDef(func, locals);
|
|
8825
8741
|
|
|
8826
8742
|
return fn.apply(context, dependencies);
|
|
8827
8743
|
}
|
|
@@ -8832,9 +8748,7 @@
|
|
|
8832
8748
|
* @return {Function}
|
|
8833
8749
|
*/
|
|
8834
8750
|
function createPrivateInjectorFactory(childInjector) {
|
|
8835
|
-
return annotate(
|
|
8836
|
-
return childInjector.get(key);
|
|
8837
|
-
});
|
|
8751
|
+
return annotate(key => childInjector.get(key));
|
|
8838
8752
|
}
|
|
8839
8753
|
|
|
8840
8754
|
/**
|
|
@@ -8845,18 +8759,19 @@
|
|
|
8845
8759
|
*/
|
|
8846
8760
|
function createChild(modules, forceNewInstances) {
|
|
8847
8761
|
if (forceNewInstances && forceNewInstances.length) {
|
|
8848
|
-
|
|
8849
|
-
|
|
8850
|
-
|
|
8851
|
-
|
|
8852
|
-
|
|
8853
|
-
|
|
8854
|
-
|
|
8855
|
-
|
|
8856
|
-
|
|
8857
|
-
|
|
8858
|
-
|
|
8859
|
-
|
|
8762
|
+
const fromParentModule = Object.create(null);
|
|
8763
|
+
const matchedScopes = Object.create(null);
|
|
8764
|
+
|
|
8765
|
+
const privateInjectorsCache = [];
|
|
8766
|
+
const privateChildInjectors = [];
|
|
8767
|
+
const privateChildFactories = [];
|
|
8768
|
+
|
|
8769
|
+
let provider;
|
|
8770
|
+
let cacheIdx;
|
|
8771
|
+
let privateChildInjector;
|
|
8772
|
+
let privateChildInjectorFactory;
|
|
8773
|
+
|
|
8774
|
+
for (let name in providers) {
|
|
8860
8775
|
provider = providers[name];
|
|
8861
8776
|
|
|
8862
8777
|
if (forceNewInstances.indexOf(name) !== -1) {
|
|
@@ -8880,7 +8795,7 @@
|
|
|
8880
8795
|
|
|
8881
8796
|
if ((provider[2] === 'factory' || provider[2] === 'type') && provider[1].$scope) {
|
|
8882
8797
|
/* jshint -W083 */
|
|
8883
|
-
forceNewInstances.forEach(
|
|
8798
|
+
forceNewInstances.forEach(scope => {
|
|
8884
8799
|
if (provider[1].$scope.indexOf(scope) !== -1) {
|
|
8885
8800
|
fromParentModule[name] = [ provider[2], provider[1] ];
|
|
8886
8801
|
matchedScopes[scope] = true;
|
|
@@ -8889,7 +8804,7 @@
|
|
|
8889
8804
|
}
|
|
8890
8805
|
}
|
|
8891
8806
|
|
|
8892
|
-
forceNewInstances.forEach(
|
|
8807
|
+
forceNewInstances.forEach(scope => {
|
|
8893
8808
|
if (!matchedScopes[scope]) {
|
|
8894
8809
|
throw new Error('No provider for "' + scope + '". Cannot use provider from the parent!');
|
|
8895
8810
|
}
|
|
@@ -8901,7 +8816,7 @@
|
|
|
8901
8816
|
return new Injector(modules, self);
|
|
8902
8817
|
}
|
|
8903
8818
|
|
|
8904
|
-
|
|
8819
|
+
const factoryMap = {
|
|
8905
8820
|
factory: invoke,
|
|
8906
8821
|
type: instantiate,
|
|
8907
8822
|
value: function(value) {
|
|
@@ -8915,10 +8830,10 @@
|
|
|
8915
8830
|
*/
|
|
8916
8831
|
function createInitializer(moduleDefinition, injector) {
|
|
8917
8832
|
|
|
8918
|
-
|
|
8833
|
+
const initializers = moduleDefinition.__init__ || [];
|
|
8919
8834
|
|
|
8920
8835
|
return function() {
|
|
8921
|
-
initializers.forEach(
|
|
8836
|
+
initializers.forEach(initializer => {
|
|
8922
8837
|
|
|
8923
8838
|
// eagerly resolve component (fn or string)
|
|
8924
8839
|
if (typeof initializer === 'string') {
|
|
@@ -8935,13 +8850,13 @@
|
|
|
8935
8850
|
*/
|
|
8936
8851
|
function loadModule(moduleDefinition) {
|
|
8937
8852
|
|
|
8938
|
-
|
|
8853
|
+
const moduleExports = moduleDefinition.__exports__;
|
|
8939
8854
|
|
|
8940
8855
|
// private module
|
|
8941
8856
|
if (moduleExports) {
|
|
8942
|
-
|
|
8857
|
+
const nestedModules = moduleDefinition.__modules__;
|
|
8943
8858
|
|
|
8944
|
-
|
|
8859
|
+
const clonedModule = Object.keys(moduleDefinition).reduce((clonedModule, key) => {
|
|
8945
8860
|
|
|
8946
8861
|
if (key !== '__exports__' && key !== '__modules__' && key !== '__init__' && key !== '__depends__') {
|
|
8947
8862
|
clonedModule[key] = moduleDefinition[key];
|
|
@@ -8950,10 +8865,10 @@
|
|
|
8950
8865
|
return clonedModule;
|
|
8951
8866
|
}, Object.create(null));
|
|
8952
8867
|
|
|
8953
|
-
|
|
8868
|
+
const childModules = (nestedModules || []).concat(clonedModule);
|
|
8954
8869
|
|
|
8955
|
-
|
|
8956
|
-
|
|
8870
|
+
const privateInjector = createChild(childModules);
|
|
8871
|
+
const getFromPrivateInjector = annotate(function(key) {
|
|
8957
8872
|
return privateInjector.get(key);
|
|
8958
8873
|
});
|
|
8959
8874
|
|
|
@@ -8962,7 +8877,7 @@
|
|
|
8962
8877
|
});
|
|
8963
8878
|
|
|
8964
8879
|
// ensure child injector initializes
|
|
8965
|
-
|
|
8880
|
+
const initializers = (moduleDefinition.__init__ || []).slice();
|
|
8966
8881
|
|
|
8967
8882
|
initializers.unshift(function() {
|
|
8968
8883
|
privateInjector.init();
|
|
@@ -8987,8 +8902,8 @@
|
|
|
8987
8902
|
return;
|
|
8988
8903
|
}
|
|
8989
8904
|
|
|
8990
|
-
|
|
8991
|
-
|
|
8905
|
+
const type = moduleDefinition[key][0];
|
|
8906
|
+
const value = moduleDefinition[key][1];
|
|
8992
8907
|
|
|
8993
8908
|
providers[key] = [ factoryMap[type], arrayUnwrap(type, value), type ];
|
|
8994
8909
|
});
|
|
@@ -9024,11 +8939,11 @@
|
|
|
9024
8939
|
*/
|
|
9025
8940
|
function bootstrap(moduleDefinitions) {
|
|
9026
8941
|
|
|
9027
|
-
|
|
8942
|
+
const initializers = moduleDefinitions
|
|
9028
8943
|
.reduce(resolveDependencies, [])
|
|
9029
8944
|
.map(loadModule);
|
|
9030
8945
|
|
|
9031
|
-
|
|
8946
|
+
let initialized = false;
|
|
9032
8947
|
|
|
9033
8948
|
return function() {
|
|
9034
8949
|
|
|
@@ -9038,9 +8953,7 @@
|
|
|
9038
8953
|
|
|
9039
8954
|
initialized = true;
|
|
9040
8955
|
|
|
9041
|
-
initializers.forEach(
|
|
9042
|
-
return initializer();
|
|
9043
|
-
});
|
|
8956
|
+
initializers.forEach(initializer => initializer());
|
|
9044
8957
|
};
|
|
9045
8958
|
}
|
|
9046
8959
|
|
|
@@ -9103,9 +9016,9 @@
|
|
|
9103
9016
|
});
|
|
9104
9017
|
|
|
9105
9018
|
if (isFrameElement(element)) {
|
|
9106
|
-
attr$1(rect, assign({}, this.FRAME_STYLE, attrs || {}));
|
|
9019
|
+
attr$1(rect, assign$1({}, this.FRAME_STYLE, attrs || {}));
|
|
9107
9020
|
} else {
|
|
9108
|
-
attr$1(rect, assign({}, this.SHAPE_STYLE, attrs || {}));
|
|
9021
|
+
attr$1(rect, assign$1({}, this.SHAPE_STYLE, attrs || {}));
|
|
9109
9022
|
}
|
|
9110
9023
|
|
|
9111
9024
|
append(visuals, rect);
|
|
@@ -9115,7 +9028,7 @@
|
|
|
9115
9028
|
|
|
9116
9029
|
DefaultRenderer.prototype.drawConnection = function drawConnection(visuals, connection, attrs) {
|
|
9117
9030
|
|
|
9118
|
-
var line = createLine(connection.waypoints, assign({}, this.CONNECTION_STYLE, attrs || {}));
|
|
9031
|
+
var line = createLine(connection.waypoints, assign$1({}, this.CONNECTION_STYLE, attrs || {}));
|
|
9119
9032
|
append(visuals, line);
|
|
9120
9033
|
|
|
9121
9034
|
return line;
|
|
@@ -9191,7 +9104,7 @@
|
|
|
9191
9104
|
this.cls = function(className, traits, additionalAttrs) {
|
|
9192
9105
|
var attrs = this.style(traits, additionalAttrs);
|
|
9193
9106
|
|
|
9194
|
-
return assign(attrs, { 'class': className });
|
|
9107
|
+
return assign$1(attrs, { 'class': className });
|
|
9195
9108
|
};
|
|
9196
9109
|
|
|
9197
9110
|
/**
|
|
@@ -9210,10 +9123,10 @@
|
|
|
9210
9123
|
}
|
|
9211
9124
|
|
|
9212
9125
|
var attrs = reduce(traits, function(attrs, t) {
|
|
9213
|
-
return assign(attrs, defaultTraits[t] || {});
|
|
9126
|
+
return assign$1(attrs, defaultTraits[t] || {});
|
|
9214
9127
|
}, {});
|
|
9215
9128
|
|
|
9216
|
-
return additionalAttrs ? assign(attrs, additionalAttrs) : attrs;
|
|
9129
|
+
return additionalAttrs ? assign$1(attrs, additionalAttrs) : attrs;
|
|
9217
9130
|
};
|
|
9218
9131
|
|
|
9219
9132
|
this.computeStyle = function(custom, traits, defaultStyles) {
|
|
@@ -9222,7 +9135,7 @@
|
|
|
9222
9135
|
traits = [];
|
|
9223
9136
|
}
|
|
9224
9137
|
|
|
9225
|
-
return self.style(traits || [], assign({}, defaultStyles, custom || {}));
|
|
9138
|
+
return self.style(traits || [], assign$1({}, defaultStyles, custom || {}));
|
|
9226
9139
|
};
|
|
9227
9140
|
}
|
|
9228
9141
|
|
|
@@ -9331,17 +9244,17 @@
|
|
|
9331
9244
|
*/
|
|
9332
9245
|
function createContainer(options) {
|
|
9333
9246
|
|
|
9334
|
-
options = assign({}, { width: '100%', height: '100%' }, options);
|
|
9247
|
+
options = assign$1({}, { width: '100%', height: '100%' }, options);
|
|
9335
9248
|
|
|
9336
|
-
|
|
9249
|
+
const container = options.container || document.body;
|
|
9337
9250
|
|
|
9338
9251
|
// create a <div> around the svg element with the respective size
|
|
9339
9252
|
// this way we can always get the correct container size
|
|
9340
9253
|
// (this is impossible for <svg> elements at the moment)
|
|
9341
|
-
|
|
9254
|
+
const parent = document.createElement('div');
|
|
9342
9255
|
parent.setAttribute('class', 'djs-container');
|
|
9343
9256
|
|
|
9344
|
-
assign
|
|
9257
|
+
assign(parent, {
|
|
9345
9258
|
position: 'relative',
|
|
9346
9259
|
overflow: 'hidden',
|
|
9347
9260
|
width: ensurePx(options.width),
|
|
@@ -9354,10 +9267,10 @@
|
|
|
9354
9267
|
}
|
|
9355
9268
|
|
|
9356
9269
|
function createGroup(parent, cls, childIndex) {
|
|
9357
|
-
|
|
9270
|
+
const group = create$1('g');
|
|
9358
9271
|
classes$1(group).add(cls);
|
|
9359
9272
|
|
|
9360
|
-
|
|
9273
|
+
const index = childIndex !== undefined ? childIndex : parent.childNodes.length - 1;
|
|
9361
9274
|
|
|
9362
9275
|
// must ensure second argument is node or _null_
|
|
9363
9276
|
// cf. https://developer.mozilla.org/en-US/docs/Web/API/Node/insertBefore
|
|
@@ -9366,14 +9279,14 @@
|
|
|
9366
9279
|
return group;
|
|
9367
9280
|
}
|
|
9368
9281
|
|
|
9369
|
-
|
|
9282
|
+
const BASE_LAYER = 'base';
|
|
9370
9283
|
|
|
9371
9284
|
// render plane contents behind utility layers
|
|
9372
|
-
|
|
9373
|
-
|
|
9285
|
+
const PLANE_LAYER_INDEX = 0;
|
|
9286
|
+
const UTILITY_LAYER_INDEX = 1;
|
|
9374
9287
|
|
|
9375
9288
|
|
|
9376
|
-
|
|
9289
|
+
const REQUIRED_MODEL_ATTRS = {
|
|
9377
9290
|
shape: [ 'x', 'y', 'width', 'height' ],
|
|
9378
9291
|
connection: [ 'waypoints' ]
|
|
9379
9292
|
};
|
|
@@ -9428,22 +9341,22 @@
|
|
|
9428
9341
|
*/
|
|
9429
9342
|
Canvas.prototype._init = function(config) {
|
|
9430
9343
|
|
|
9431
|
-
|
|
9344
|
+
const eventBus = this._eventBus;
|
|
9432
9345
|
|
|
9433
9346
|
// html container
|
|
9434
|
-
|
|
9347
|
+
const container = this._container = createContainer(config);
|
|
9435
9348
|
|
|
9436
|
-
|
|
9349
|
+
const svg = this._svg = create$1('svg');
|
|
9437
9350
|
attr$1(svg, { width: '100%', height: '100%' });
|
|
9438
9351
|
|
|
9439
9352
|
append(container, svg);
|
|
9440
9353
|
|
|
9441
|
-
|
|
9354
|
+
const viewport = this._viewport = createGroup(svg, 'viewport');
|
|
9442
9355
|
|
|
9443
9356
|
// debounce canvas.viewbox.changed events
|
|
9444
9357
|
// for smoother diagram interaction
|
|
9445
9358
|
if (config.deferUpdate !== false) {
|
|
9446
|
-
this._viewboxChanged = debounce(bind(this._viewboxChanged, this), 300);
|
|
9359
|
+
this._viewboxChanged = debounce(bind$2(this._viewboxChanged, this), 300);
|
|
9447
9360
|
}
|
|
9448
9361
|
|
|
9449
9362
|
eventBus.on('diagram.init', function() {
|
|
@@ -9489,7 +9402,7 @@
|
|
|
9489
9402
|
viewport: this._viewport
|
|
9490
9403
|
});
|
|
9491
9404
|
|
|
9492
|
-
|
|
9405
|
+
const parent = this._container.parentNode;
|
|
9493
9406
|
|
|
9494
9407
|
if (parent) {
|
|
9495
9408
|
parent.removeChild(this._container);
|
|
@@ -9505,18 +9418,16 @@
|
|
|
9505
9418
|
|
|
9506
9419
|
Canvas.prototype._clear = function() {
|
|
9507
9420
|
|
|
9508
|
-
|
|
9509
|
-
|
|
9510
|
-
var allElements = this._elementRegistry.getAll();
|
|
9421
|
+
const allElements = this._elementRegistry.getAll();
|
|
9511
9422
|
|
|
9512
9423
|
// remove all elements
|
|
9513
|
-
allElements.forEach(
|
|
9514
|
-
|
|
9424
|
+
allElements.forEach(element => {
|
|
9425
|
+
const type = getType(element);
|
|
9515
9426
|
|
|
9516
9427
|
if (type === 'root') {
|
|
9517
|
-
|
|
9428
|
+
this.removeRootElement(element);
|
|
9518
9429
|
} else {
|
|
9519
|
-
|
|
9430
|
+
this._removeElement(element, type);
|
|
9520
9431
|
}
|
|
9521
9432
|
});
|
|
9522
9433
|
|
|
@@ -9559,7 +9470,7 @@
|
|
|
9559
9470
|
throw new Error('must specify a name');
|
|
9560
9471
|
}
|
|
9561
9472
|
|
|
9562
|
-
|
|
9473
|
+
let layer = this._layers[name];
|
|
9563
9474
|
|
|
9564
9475
|
if (!layer) {
|
|
9565
9476
|
layer = this._layers[name] = this._createLayer(name, index);
|
|
@@ -9607,7 +9518,7 @@
|
|
|
9607
9518
|
index = UTILITY_LAYER_INDEX;
|
|
9608
9519
|
}
|
|
9609
9520
|
|
|
9610
|
-
|
|
9521
|
+
const childIndex = this._getChildIndex(index);
|
|
9611
9522
|
|
|
9612
9523
|
return {
|
|
9613
9524
|
group: createGroup(this._viewport, 'layer-' + name, childIndex),
|
|
@@ -9629,21 +9540,21 @@
|
|
|
9629
9540
|
throw new Error('must specify a name');
|
|
9630
9541
|
}
|
|
9631
9542
|
|
|
9632
|
-
|
|
9543
|
+
const layer = this._layers[name];
|
|
9633
9544
|
|
|
9634
9545
|
if (!layer) {
|
|
9635
9546
|
throw new Error('layer <' + name + '> does not exist');
|
|
9636
9547
|
}
|
|
9637
9548
|
|
|
9638
|
-
|
|
9639
|
-
|
|
9640
|
-
|
|
9549
|
+
const viewport = this._viewport;
|
|
9550
|
+
const group = layer.group;
|
|
9551
|
+
const index = layer.index;
|
|
9641
9552
|
|
|
9642
9553
|
if (layer.visible) {
|
|
9643
9554
|
return group;
|
|
9644
9555
|
}
|
|
9645
9556
|
|
|
9646
|
-
|
|
9557
|
+
const childIndex = this._getChildIndex(index);
|
|
9647
9558
|
|
|
9648
9559
|
viewport.insertBefore(group, viewport.childNodes[childIndex] || null);
|
|
9649
9560
|
|
|
@@ -9664,13 +9575,13 @@
|
|
|
9664
9575
|
throw new Error('must specify a name');
|
|
9665
9576
|
}
|
|
9666
9577
|
|
|
9667
|
-
|
|
9578
|
+
const layer = this._layers[name];
|
|
9668
9579
|
|
|
9669
9580
|
if (!layer) {
|
|
9670
9581
|
throw new Error('layer <' + name + '> does not exist');
|
|
9671
9582
|
}
|
|
9672
9583
|
|
|
9673
|
-
|
|
9584
|
+
const group = layer.group;
|
|
9674
9585
|
|
|
9675
9586
|
if (!layer.visible) {
|
|
9676
9587
|
return group;
|
|
@@ -9686,7 +9597,7 @@
|
|
|
9686
9597
|
|
|
9687
9598
|
Canvas.prototype._removeLayer = function(name) {
|
|
9688
9599
|
|
|
9689
|
-
|
|
9600
|
+
const layer = this._layers[name];
|
|
9690
9601
|
|
|
9691
9602
|
if (layer) {
|
|
9692
9603
|
delete this._layers[name];
|
|
@@ -9701,7 +9612,7 @@
|
|
|
9701
9612
|
* @returns {SVGElement|null}
|
|
9702
9613
|
*/
|
|
9703
9614
|
Canvas.prototype.getActiveLayer = function() {
|
|
9704
|
-
|
|
9615
|
+
const plane = this._findPlaneForRoot(this.getRootElement());
|
|
9705
9616
|
|
|
9706
9617
|
if (!plane) {
|
|
9707
9618
|
return null;
|
|
@@ -9727,7 +9638,7 @@
|
|
|
9727
9638
|
return;
|
|
9728
9639
|
}
|
|
9729
9640
|
|
|
9730
|
-
|
|
9641
|
+
const plane = this._findPlaneForRoot(
|
|
9731
9642
|
findRoot(element)
|
|
9732
9643
|
) || {};
|
|
9733
9644
|
|
|
@@ -9766,7 +9677,7 @@
|
|
|
9766
9677
|
// markers //////////////////////
|
|
9767
9678
|
|
|
9768
9679
|
Canvas.prototype._updateMarker = function(element, marker, add) {
|
|
9769
|
-
|
|
9680
|
+
let container;
|
|
9770
9681
|
|
|
9771
9682
|
if (!element.id) {
|
|
9772
9683
|
element = this._elementRegistry.get(element);
|
|
@@ -9814,7 +9725,7 @@
|
|
|
9814
9725
|
* @example
|
|
9815
9726
|
* canvas.addMarker('foo', 'some-marker');
|
|
9816
9727
|
*
|
|
9817
|
-
*
|
|
9728
|
+
* const fooGfx = canvas.getGraphics('foo');
|
|
9818
9729
|
*
|
|
9819
9730
|
* fooGfx; // <g class="... some-marker"> ... </g>
|
|
9820
9731
|
*
|
|
@@ -9850,7 +9761,7 @@
|
|
|
9850
9761
|
element = this._elementRegistry.get(element);
|
|
9851
9762
|
}
|
|
9852
9763
|
|
|
9853
|
-
|
|
9764
|
+
const gfx = this.getGraphics(element);
|
|
9854
9765
|
|
|
9855
9766
|
return classes$1(gfx).has(marker);
|
|
9856
9767
|
};
|
|
@@ -9888,7 +9799,7 @@
|
|
|
9888
9799
|
* @returns {Object|djs.model.Root|null} rootElement.
|
|
9889
9800
|
*/
|
|
9890
9801
|
Canvas.prototype.getRootElement = function() {
|
|
9891
|
-
|
|
9802
|
+
const rootElement = this._rootElement;
|
|
9892
9803
|
|
|
9893
9804
|
// can return null if root elements are present but none was set yet
|
|
9894
9805
|
if (rootElement || this._planes.length) {
|
|
@@ -9907,7 +9818,7 @@
|
|
|
9907
9818
|
*/
|
|
9908
9819
|
|
|
9909
9820
|
Canvas.prototype.addRootElement = function(rootElement) {
|
|
9910
|
-
|
|
9821
|
+
const idx = this._rootsIdx++;
|
|
9911
9822
|
|
|
9912
9823
|
if (!rootElement) {
|
|
9913
9824
|
rootElement = {
|
|
@@ -9917,11 +9828,11 @@
|
|
|
9917
9828
|
};
|
|
9918
9829
|
}
|
|
9919
9830
|
|
|
9920
|
-
|
|
9831
|
+
const layerName = rootElement.layer = 'root-' + idx;
|
|
9921
9832
|
|
|
9922
9833
|
this._ensureValid('root', rootElement);
|
|
9923
9834
|
|
|
9924
|
-
|
|
9835
|
+
const layer = this.getLayer(layerName, PLANE_LAYER_INDEX);
|
|
9925
9836
|
|
|
9926
9837
|
this.hideLayer(layerName);
|
|
9927
9838
|
|
|
@@ -9948,7 +9859,7 @@
|
|
|
9948
9859
|
rootElement = this._elementRegistry.get(rootElement);
|
|
9949
9860
|
}
|
|
9950
9861
|
|
|
9951
|
-
|
|
9862
|
+
const plane = this._findPlaneForRoot(rootElement);
|
|
9952
9863
|
|
|
9953
9864
|
if (!plane) {
|
|
9954
9865
|
return;
|
|
@@ -9994,7 +9905,7 @@
|
|
|
9994
9905
|
return;
|
|
9995
9906
|
}
|
|
9996
9907
|
|
|
9997
|
-
|
|
9908
|
+
let plane;
|
|
9998
9909
|
|
|
9999
9910
|
if (!rootElement) {
|
|
10000
9911
|
throw new Error('rootElement required');
|
|
@@ -10014,8 +9925,8 @@
|
|
|
10014
9925
|
|
|
10015
9926
|
|
|
10016
9927
|
Canvas.prototype._removeRoot = function(element) {
|
|
10017
|
-
|
|
10018
|
-
|
|
9928
|
+
const elementRegistry = this._elementRegistry,
|
|
9929
|
+
eventBus = this._eventBus;
|
|
10019
9930
|
|
|
10020
9931
|
// simulate element remove event sequence
|
|
10021
9932
|
eventBus.fire('root.remove', { element: element });
|
|
@@ -10026,8 +9937,8 @@
|
|
|
10026
9937
|
|
|
10027
9938
|
|
|
10028
9939
|
Canvas.prototype._addRoot = function(element, gfx) {
|
|
10029
|
-
|
|
10030
|
-
|
|
9940
|
+
const elementRegistry = this._elementRegistry,
|
|
9941
|
+
eventBus = this._eventBus;
|
|
10031
9942
|
|
|
10032
9943
|
// resemble element add event sequence
|
|
10033
9944
|
eventBus.fire('root.add', { element: element });
|
|
@@ -10040,7 +9951,7 @@
|
|
|
10040
9951
|
|
|
10041
9952
|
Canvas.prototype._setRoot = function(rootElement, layer) {
|
|
10042
9953
|
|
|
10043
|
-
|
|
9954
|
+
const currentRoot = this._rootElement;
|
|
10044
9955
|
|
|
10045
9956
|
if (currentRoot) {
|
|
10046
9957
|
|
|
@@ -10080,9 +9991,9 @@
|
|
|
10080
9991
|
throw new Error('element <' + element.id + '> already exists');
|
|
10081
9992
|
}
|
|
10082
9993
|
|
|
10083
|
-
|
|
9994
|
+
const requiredAttrs = REQUIRED_MODEL_ATTRS[type];
|
|
10084
9995
|
|
|
10085
|
-
|
|
9996
|
+
const valid = every(requiredAttrs, function(attr) {
|
|
10086
9997
|
return typeof element[attr] !== 'undefined';
|
|
10087
9998
|
});
|
|
10088
9999
|
|
|
@@ -10121,8 +10032,8 @@
|
|
|
10121
10032
|
|
|
10122
10033
|
parent = parent || this.getRootElement();
|
|
10123
10034
|
|
|
10124
|
-
|
|
10125
|
-
|
|
10035
|
+
const eventBus = this._eventBus,
|
|
10036
|
+
graphicsFactory = this._graphicsFactory;
|
|
10126
10037
|
|
|
10127
10038
|
this._ensureValid(type, element);
|
|
10128
10039
|
|
|
@@ -10131,7 +10042,7 @@
|
|
|
10131
10042
|
this._setParent(element, parent, parentIndex);
|
|
10132
10043
|
|
|
10133
10044
|
// create graphics
|
|
10134
|
-
|
|
10045
|
+
const gfx = graphicsFactory.create(type, element, parentIndex);
|
|
10135
10046
|
|
|
10136
10047
|
this._elementRegistry.add(element, gfx);
|
|
10137
10048
|
|
|
@@ -10175,9 +10086,9 @@
|
|
|
10175
10086
|
*/
|
|
10176
10087
|
Canvas.prototype._removeElement = function(element, type) {
|
|
10177
10088
|
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
|
|
10089
|
+
const elementRegistry = this._elementRegistry,
|
|
10090
|
+
graphicsFactory = this._graphicsFactory,
|
|
10091
|
+
eventBus = this._eventBus;
|
|
10181
10092
|
|
|
10182
10093
|
element = elementRegistry.get(element.id || element);
|
|
10183
10094
|
|
|
@@ -10326,7 +10237,7 @@
|
|
|
10326
10237
|
* // sets the visible area of the diagram to (100|100) -> (600|100)
|
|
10327
10238
|
* // and and scales it according to the diagram width
|
|
10328
10239
|
*
|
|
10329
|
-
*
|
|
10240
|
+
* const viewbox = canvas.viewbox(); // pass `false` to force recomputing the box.
|
|
10330
10241
|
*
|
|
10331
10242
|
* console.log(viewbox);
|
|
10332
10243
|
* // {
|
|
@@ -10340,7 +10251,7 @@
|
|
|
10340
10251
|
* // if the current diagram is zoomed and scrolled, you may reset it to the
|
|
10341
10252
|
* // default zoom via this method, too:
|
|
10342
10253
|
*
|
|
10343
|
-
*
|
|
10254
|
+
* const zoomedAndScrolledViewbox = canvas.viewbox();
|
|
10344
10255
|
*
|
|
10345
10256
|
* canvas.viewbox({
|
|
10346
10257
|
* x: 0,
|
|
@@ -10363,9 +10274,9 @@
|
|
|
10363
10274
|
return this._cachedViewbox;
|
|
10364
10275
|
}
|
|
10365
10276
|
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10277
|
+
const viewport = this._viewport,
|
|
10278
|
+
outerBox = this.getSize();
|
|
10279
|
+
let innerBox,
|
|
10369
10280
|
matrix,
|
|
10370
10281
|
activeLayer,
|
|
10371
10282
|
transform,
|
|
@@ -10409,7 +10320,7 @@
|
|
|
10409
10320
|
this._changeViewbox(function() {
|
|
10410
10321
|
scale = Math.min(outerBox.width / box.width, outerBox.height / box.height);
|
|
10411
10322
|
|
|
10412
|
-
|
|
10323
|
+
const matrix = this._svg.createSVGMatrix()
|
|
10413
10324
|
.scale(scale)
|
|
10414
10325
|
.translate(-box.x, -box.y);
|
|
10415
10326
|
|
|
@@ -10431,12 +10342,12 @@
|
|
|
10431
10342
|
*/
|
|
10432
10343
|
Canvas.prototype.scroll = function(delta) {
|
|
10433
10344
|
|
|
10434
|
-
|
|
10435
|
-
|
|
10345
|
+
const node = this._viewport;
|
|
10346
|
+
let matrix = node.getCTM();
|
|
10436
10347
|
|
|
10437
10348
|
if (delta) {
|
|
10438
10349
|
this._changeViewbox(function() {
|
|
10439
|
-
delta = assign({ dx: 0, dy: 0 }, delta || {});
|
|
10350
|
+
delta = assign$1({ dx: 0, dy: 0 }, delta || {});
|
|
10440
10351
|
|
|
10441
10352
|
matrix = this._svg.createSVGMatrix().translate(delta.dx, delta.dy).multiply(matrix);
|
|
10442
10353
|
|
|
@@ -10456,14 +10367,14 @@
|
|
|
10456
10367
|
*
|
|
10457
10368
|
*/
|
|
10458
10369
|
Canvas.prototype.scrollToElement = function(element, padding) {
|
|
10459
|
-
|
|
10370
|
+
let defaultPadding = 100;
|
|
10460
10371
|
|
|
10461
10372
|
if (typeof element === 'string') {
|
|
10462
10373
|
element = this._elementRegistry.get(element);
|
|
10463
10374
|
}
|
|
10464
10375
|
|
|
10465
10376
|
// set to correct rootElement
|
|
10466
|
-
|
|
10377
|
+
const rootElement = this.findRoot(element);
|
|
10467
10378
|
|
|
10468
10379
|
if (rootElement !== this.getRootElement()) {
|
|
10469
10380
|
this.setRootElement(rootElement);
|
|
@@ -10483,11 +10394,11 @@
|
|
|
10483
10394
|
left: padding.left || defaultPadding
|
|
10484
10395
|
};
|
|
10485
10396
|
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10397
|
+
const elementBounds = getBBox(element),
|
|
10398
|
+
elementTrbl = asTRBL(elementBounds),
|
|
10399
|
+
viewboxBounds = this.viewbox(),
|
|
10400
|
+
zoom = this.zoom();
|
|
10401
|
+
let dx, dy;
|
|
10491
10402
|
|
|
10492
10403
|
// shrink viewboxBounds with padding
|
|
10493
10404
|
viewboxBounds.y += padding.top / zoom;
|
|
@@ -10495,9 +10406,9 @@
|
|
|
10495
10406
|
viewboxBounds.width -= (padding.right + padding.left) / zoom;
|
|
10496
10407
|
viewboxBounds.height -= (padding.bottom + padding.top) / zoom;
|
|
10497
10408
|
|
|
10498
|
-
|
|
10409
|
+
const viewboxTrbl = asTRBL(viewboxBounds);
|
|
10499
10410
|
|
|
10500
|
-
|
|
10411
|
+
const canFit = elementBounds.width < viewboxBounds.width && elementBounds.height < viewboxBounds.height;
|
|
10501
10412
|
|
|
10502
10413
|
if (!canFit) {
|
|
10503
10414
|
|
|
@@ -10507,10 +10418,10 @@
|
|
|
10507
10418
|
|
|
10508
10419
|
} else {
|
|
10509
10420
|
|
|
10510
|
-
|
|
10511
|
-
|
|
10512
|
-
|
|
10513
|
-
|
|
10421
|
+
const dRight = Math.max(0, elementTrbl.right - viewboxTrbl.right),
|
|
10422
|
+
dLeft = Math.min(0, elementTrbl.left - viewboxTrbl.left),
|
|
10423
|
+
dBottom = Math.max(0, elementTrbl.bottom - viewboxTrbl.bottom),
|
|
10424
|
+
dTop = Math.min(0, elementTrbl.top - viewboxTrbl.top);
|
|
10514
10425
|
|
|
10515
10426
|
dx = dRight || dLeft;
|
|
10516
10427
|
dy = dBottom || dTop;
|
|
@@ -10543,7 +10454,7 @@
|
|
|
10543
10454
|
return this._fitViewport(center);
|
|
10544
10455
|
}
|
|
10545
10456
|
|
|
10546
|
-
|
|
10457
|
+
let outer,
|
|
10547
10458
|
matrix;
|
|
10548
10459
|
|
|
10549
10460
|
this._changeViewbox(function() {
|
|
@@ -10564,16 +10475,16 @@
|
|
|
10564
10475
|
};
|
|
10565
10476
|
|
|
10566
10477
|
function setCTM(node, m) {
|
|
10567
|
-
|
|
10478
|
+
const mstr = 'matrix(' + m.a + ',' + m.b + ',' + m.c + ',' + m.d + ',' + m.e + ',' + m.f + ')';
|
|
10568
10479
|
node.setAttribute('transform', mstr);
|
|
10569
10480
|
}
|
|
10570
10481
|
|
|
10571
10482
|
Canvas.prototype._fitViewport = function(center) {
|
|
10572
10483
|
|
|
10573
|
-
|
|
10574
|
-
|
|
10575
|
-
|
|
10576
|
-
|
|
10484
|
+
const vbox = this.viewbox(),
|
|
10485
|
+
outer = vbox.outer,
|
|
10486
|
+
inner = vbox.inner;
|
|
10487
|
+
let newScale,
|
|
10577
10488
|
newViewbox;
|
|
10578
10489
|
|
|
10579
10490
|
// display the complete diagram without zooming in.
|
|
@@ -10614,13 +10525,13 @@
|
|
|
10614
10525
|
|
|
10615
10526
|
Canvas.prototype._setZoom = function(scale, center) {
|
|
10616
10527
|
|
|
10617
|
-
|
|
10618
|
-
|
|
10528
|
+
const svg = this._svg,
|
|
10529
|
+
viewport = this._viewport;
|
|
10619
10530
|
|
|
10620
|
-
|
|
10621
|
-
|
|
10531
|
+
const matrix = svg.createSVGMatrix();
|
|
10532
|
+
const point = svg.createSVGPoint();
|
|
10622
10533
|
|
|
10623
|
-
|
|
10534
|
+
let centerPoint,
|
|
10624
10535
|
originalPoint,
|
|
10625
10536
|
currentMatrix,
|
|
10626
10537
|
scaleMatrix,
|
|
@@ -10628,10 +10539,10 @@
|
|
|
10628
10539
|
|
|
10629
10540
|
currentMatrix = viewport.getCTM();
|
|
10630
10541
|
|
|
10631
|
-
|
|
10542
|
+
const currentScale = currentMatrix.a;
|
|
10632
10543
|
|
|
10633
10544
|
if (center) {
|
|
10634
|
-
centerPoint = assign(point, center);
|
|
10545
|
+
centerPoint = assign$1(point, center);
|
|
10635
10546
|
|
|
10636
10547
|
// revert applied viewport transformations
|
|
10637
10548
|
originalPoint = centerPoint.matrixTransform(currentMatrix.inverse());
|
|
@@ -10677,13 +10588,13 @@
|
|
|
10677
10588
|
* @return {Bounds} the absolute bounding box
|
|
10678
10589
|
*/
|
|
10679
10590
|
Canvas.prototype.getAbsoluteBBox = function(element) {
|
|
10680
|
-
|
|
10681
|
-
|
|
10591
|
+
const vbox = this.viewbox();
|
|
10592
|
+
let bbox;
|
|
10682
10593
|
|
|
10683
10594
|
// connection
|
|
10684
10595
|
// use svg bbox
|
|
10685
10596
|
if (element.waypoints) {
|
|
10686
|
-
|
|
10597
|
+
const gfx = this.getGraphics(element);
|
|
10687
10598
|
|
|
10688
10599
|
bbox = gfx.getBBox();
|
|
10689
10600
|
}
|
|
@@ -10694,11 +10605,11 @@
|
|
|
10694
10605
|
bbox = element;
|
|
10695
10606
|
}
|
|
10696
10607
|
|
|
10697
|
-
|
|
10698
|
-
|
|
10608
|
+
const x = bbox.x * vbox.scale - vbox.x * vbox.scale;
|
|
10609
|
+
const y = bbox.y * vbox.scale - vbox.y * vbox.scale;
|
|
10699
10610
|
|
|
10700
|
-
|
|
10701
|
-
|
|
10611
|
+
const width = bbox.width * vbox.scale;
|
|
10612
|
+
const height = bbox.height * vbox.scale;
|
|
10702
10613
|
|
|
10703
10614
|
return {
|
|
10704
10615
|
x: x,
|
|
@@ -11525,7 +11436,7 @@
|
|
|
11525
11436
|
if (!Type) {
|
|
11526
11437
|
throw new Error('unknown type: <' + type + '>');
|
|
11527
11438
|
}
|
|
11528
|
-
return assign(new Type(), attrs);
|
|
11439
|
+
return assign$1(new Type(), attrs);
|
|
11529
11440
|
}
|
|
11530
11441
|
|
|
11531
11442
|
/**
|
|
@@ -11562,7 +11473,7 @@
|
|
|
11562
11473
|
*/
|
|
11563
11474
|
ElementFactory.prototype.create = function(type, attrs) {
|
|
11564
11475
|
|
|
11565
|
-
attrs = assign({}, attrs || {});
|
|
11476
|
+
attrs = assign$1({}, attrs || {});
|
|
11566
11477
|
|
|
11567
11478
|
if (!attrs.id) {
|
|
11568
11479
|
attrs.id = type + '_' + (this._uid++);
|
|
@@ -11703,7 +11614,7 @@
|
|
|
11703
11614
|
var actualCallback = callback;
|
|
11704
11615
|
|
|
11705
11616
|
if (that) {
|
|
11706
|
-
actualCallback = bind(callback, that);
|
|
11617
|
+
actualCallback = bind$2(callback, that);
|
|
11707
11618
|
|
|
11708
11619
|
// make sure we remember and are able to remove
|
|
11709
11620
|
// bound callbacks via {@link #off} using the original
|
|
@@ -12068,7 +11979,7 @@
|
|
|
12068
11979
|
};
|
|
12069
11980
|
|
|
12070
11981
|
InternalEvent.prototype.init = function(data) {
|
|
12071
|
-
assign(this, data || {});
|
|
11982
|
+
assign$1(this, data || {});
|
|
12072
11983
|
};
|
|
12073
11984
|
|
|
12074
11985
|
|
|
@@ -12553,7 +12464,7 @@
|
|
|
12553
12464
|
props.define(this, '$attrs', { value: {} });
|
|
12554
12465
|
props.define(this, '$parent', { writable: true });
|
|
12555
12466
|
|
|
12556
|
-
forEach$1(attrs, bind(function(val, key) {
|
|
12467
|
+
forEach$1(attrs, bind$2(function(val, key) {
|
|
12557
12468
|
this.set(key, val);
|
|
12558
12469
|
}, this));
|
|
12559
12470
|
}
|
|
@@ -12636,6 +12547,7 @@
|
|
|
12636
12547
|
localName = name;
|
|
12637
12548
|
prefix = defaultPrefix;
|
|
12638
12549
|
} else
|
|
12550
|
+
|
|
12639
12551
|
// prefix + local name
|
|
12640
12552
|
if (parts.length === 2) {
|
|
12641
12553
|
localName = parts[1];
|
|
@@ -12842,10 +12754,10 @@
|
|
|
12842
12754
|
return;
|
|
12843
12755
|
}
|
|
12844
12756
|
|
|
12845
|
-
forEach$1(t.properties, bind(function(p) {
|
|
12757
|
+
forEach$1(t.properties, bind$2(function(p) {
|
|
12846
12758
|
|
|
12847
12759
|
// clone property to allow extensions
|
|
12848
|
-
p = assign({}, p, {
|
|
12760
|
+
p = assign$1({}, p, {
|
|
12849
12761
|
name: p.ns.localName,
|
|
12850
12762
|
inherited: inherited
|
|
12851
12763
|
});
|
|
@@ -12889,7 +12801,7 @@
|
|
|
12889
12801
|
|
|
12890
12802
|
this.properties = properties;
|
|
12891
12803
|
|
|
12892
|
-
forEach$1(packages, bind(this.registerPackage, this));
|
|
12804
|
+
forEach$1(packages, bind$2(this.registerPackage, this));
|
|
12893
12805
|
}
|
|
12894
12806
|
|
|
12895
12807
|
|
|
@@ -12905,7 +12817,7 @@
|
|
|
12905
12817
|
Registry.prototype.registerPackage = function(pkg) {
|
|
12906
12818
|
|
|
12907
12819
|
// copy package
|
|
12908
|
-
pkg = assign({}, pkg);
|
|
12820
|
+
pkg = assign$1({}, pkg);
|
|
12909
12821
|
|
|
12910
12822
|
var pkgMap = this.packageMap;
|
|
12911
12823
|
|
|
@@ -12913,7 +12825,7 @@
|
|
|
12913
12825
|
ensureAvailable(pkgMap, pkg, 'uri');
|
|
12914
12826
|
|
|
12915
12827
|
// register types
|
|
12916
|
-
forEach$1(pkg.types, bind(function(descriptor) {
|
|
12828
|
+
forEach$1(pkg.types, bind$2(function(descriptor) {
|
|
12917
12829
|
this.registerType(descriptor, pkg);
|
|
12918
12830
|
}, this));
|
|
12919
12831
|
|
|
@@ -12927,11 +12839,11 @@
|
|
|
12927
12839
|
*/
|
|
12928
12840
|
Registry.prototype.registerType = function(type, pkg) {
|
|
12929
12841
|
|
|
12930
|
-
type = assign({}, type, {
|
|
12842
|
+
type = assign$1({}, type, {
|
|
12931
12843
|
superClass: (type.superClass || []).slice(),
|
|
12932
12844
|
extends: (type.extends || []).slice(),
|
|
12933
12845
|
properties: (type.properties || []).slice(),
|
|
12934
|
-
meta: assign((type.meta || {}))
|
|
12846
|
+
meta: assign$1((type.meta || {}))
|
|
12935
12847
|
});
|
|
12936
12848
|
|
|
12937
12849
|
var ns = parseName(type.name, pkg.prefix),
|
|
@@ -12939,7 +12851,7 @@
|
|
|
12939
12851
|
propertiesByName = {};
|
|
12940
12852
|
|
|
12941
12853
|
// parse properties
|
|
12942
|
-
forEach$1(type.properties, bind(function(p) {
|
|
12854
|
+
forEach$1(type.properties, bind$2(function(p) {
|
|
12943
12855
|
|
|
12944
12856
|
// namespace property names
|
|
12945
12857
|
var propertyNs = parseName(p.name, ns.prefix),
|
|
@@ -12950,7 +12862,7 @@
|
|
|
12950
12862
|
p.type = parseName(p.type, propertyNs.prefix).name;
|
|
12951
12863
|
}
|
|
12952
12864
|
|
|
12953
|
-
assign(p, {
|
|
12865
|
+
assign$1(p, {
|
|
12954
12866
|
ns: propertyNs,
|
|
12955
12867
|
name: propertyName
|
|
12956
12868
|
});
|
|
@@ -12959,13 +12871,13 @@
|
|
|
12959
12871
|
}, this));
|
|
12960
12872
|
|
|
12961
12873
|
// update ns + name
|
|
12962
|
-
assign(type, {
|
|
12874
|
+
assign$1(type, {
|
|
12963
12875
|
ns: ns,
|
|
12964
12876
|
name: name,
|
|
12965
12877
|
propertiesByName: propertiesByName
|
|
12966
12878
|
});
|
|
12967
12879
|
|
|
12968
|
-
forEach$1(type.extends, bind(function(extendsName) {
|
|
12880
|
+
forEach$1(type.extends, bind$2(function(extendsName) {
|
|
12969
12881
|
var extended = this.typeMap[extendsName];
|
|
12970
12882
|
|
|
12971
12883
|
extended.traits = extended.traits || [];
|
|
@@ -13060,7 +12972,7 @@
|
|
|
13060
12972
|
|
|
13061
12973
|
|
|
13062
12974
|
|
|
13063
|
-
|
|
12975
|
+
// helpers ////////////////////////////
|
|
13064
12976
|
|
|
13065
12977
|
function ensureAvailable(packageMap, pkg, identifierKey) {
|
|
13066
12978
|
|
|
@@ -13091,11 +13003,16 @@
|
|
|
13091
13003
|
*/
|
|
13092
13004
|
Properties.prototype.set = function(target, name, value) {
|
|
13093
13005
|
|
|
13006
|
+
if (!isString(name) || !name.length) {
|
|
13007
|
+
throw new TypeError('property name must be a non-empty string');
|
|
13008
|
+
}
|
|
13009
|
+
|
|
13094
13010
|
var property = this.model.getPropertyDescriptor(target, name);
|
|
13095
13011
|
|
|
13096
13012
|
var propertyName = property && property.name;
|
|
13097
13013
|
|
|
13098
13014
|
if (isUndefined(value)) {
|
|
13015
|
+
|
|
13099
13016
|
// unset the property, if the specified value is undefined;
|
|
13100
13017
|
// delete from $attrs (for extensions) or the target itself
|
|
13101
13018
|
if (property) {
|
|
@@ -13104,6 +13021,7 @@
|
|
|
13104
13021
|
delete target.$attrs[name];
|
|
13105
13022
|
}
|
|
13106
13023
|
} else {
|
|
13024
|
+
|
|
13107
13025
|
// set the property, defining well defined properties on the fly
|
|
13108
13026
|
// or simply updating them in target.$attrs (for extensions)
|
|
13109
13027
|
if (property) {
|
|
@@ -13160,7 +13078,7 @@
|
|
|
13160
13078
|
|
|
13161
13079
|
// use getters for read-only variables to support ES6 proxies
|
|
13162
13080
|
// cf. https://github.com/bpmn-io/internal-docs/issues/386
|
|
13163
|
-
options = assign({}, options, {
|
|
13081
|
+
options = assign$1({}, options, {
|
|
13164
13082
|
get: function() { return value; }
|
|
13165
13083
|
});
|
|
13166
13084
|
|
|
@@ -13199,7 +13117,7 @@
|
|
|
13199
13117
|
});
|
|
13200
13118
|
}
|
|
13201
13119
|
|
|
13202
|
-
|
|
13120
|
+
// Moddle implementation /////////////////////////////////////////////////
|
|
13203
13121
|
|
|
13204
13122
|
/**
|
|
13205
13123
|
* @class Moddle
|
|
@@ -14582,7 +14500,7 @@
|
|
|
14582
14500
|
* @property {Boolean} lax
|
|
14583
14501
|
*/
|
|
14584
14502
|
|
|
14585
|
-
assign(this, options);
|
|
14503
|
+
assign$1(this, options);
|
|
14586
14504
|
|
|
14587
14505
|
this.elementsById = {};
|
|
14588
14506
|
this.references = [];
|
|
@@ -14888,7 +14806,7 @@
|
|
|
14888
14806
|
|
|
14889
14807
|
elementType = model.getType(elementTypeName);
|
|
14890
14808
|
|
|
14891
|
-
return assign({}, property, {
|
|
14809
|
+
return assign$1({}, property, {
|
|
14892
14810
|
effectiveType: getModdleDescriptor(elementType).name
|
|
14893
14811
|
});
|
|
14894
14812
|
}
|
|
@@ -14910,7 +14828,7 @@
|
|
|
14910
14828
|
});
|
|
14911
14829
|
|
|
14912
14830
|
if (property) {
|
|
14913
|
-
return assign({}, property, {
|
|
14831
|
+
return assign$1({}, property, {
|
|
14914
14832
|
effectiveType: getModdleDescriptor(elementType).name
|
|
14915
14833
|
});
|
|
14916
14834
|
}
|
|
@@ -14985,7 +14903,7 @@
|
|
|
14985
14903
|
}
|
|
14986
14904
|
|
|
14987
14905
|
if (propertyDesc.isReference) {
|
|
14988
|
-
assign(newElement, {
|
|
14906
|
+
assign$1(newElement, {
|
|
14989
14907
|
element: element
|
|
14990
14908
|
});
|
|
14991
14909
|
|
|
@@ -15094,7 +15012,7 @@
|
|
|
15094
15012
|
};
|
|
15095
15013
|
}
|
|
15096
15014
|
|
|
15097
|
-
assign(this, { lax: false }, options);
|
|
15015
|
+
assign$1(this, { lax: false }, options);
|
|
15098
15016
|
}
|
|
15099
15017
|
|
|
15100
15018
|
/**
|
|
@@ -15149,7 +15067,7 @@
|
|
|
15149
15067
|
var model = this.model,
|
|
15150
15068
|
lax = this.lax;
|
|
15151
15069
|
|
|
15152
|
-
var context = new Context(assign({}, options, { rootHandler: rootHandler })),
|
|
15070
|
+
var context = new Context(assign$1({}, options, { rootHandler: rootHandler })),
|
|
15153
15071
|
parser = new Parser({ proxy: true }),
|
|
15154
15072
|
stack = createStack();
|
|
15155
15073
|
|
|
@@ -15544,14 +15462,14 @@
|
|
|
15544
15462
|
|
|
15545
15463
|
function getElementNs(ns, descriptor) {
|
|
15546
15464
|
if (descriptor.isGeneric) {
|
|
15547
|
-
return assign({ localName: descriptor.ns.localName }, ns);
|
|
15465
|
+
return assign$1({ localName: descriptor.ns.localName }, ns);
|
|
15548
15466
|
} else {
|
|
15549
|
-
return assign({ localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg) }, ns);
|
|
15467
|
+
return assign$1({ localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg) }, ns);
|
|
15550
15468
|
}
|
|
15551
15469
|
}
|
|
15552
15470
|
|
|
15553
15471
|
function getPropertyNs(ns, descriptor) {
|
|
15554
|
-
return assign({ localName: descriptor.ns.localName }, ns);
|
|
15472
|
+
return assign$1({ localName: descriptor.ns.localName }, ns);
|
|
15555
15473
|
}
|
|
15556
15474
|
|
|
15557
15475
|
function getSerializableProperties(element) {
|
|
@@ -15783,7 +15701,7 @@
|
|
|
15783
15701
|
if (this.isLocalNs(effectiveNs)) {
|
|
15784
15702
|
return { localName: ns.localName };
|
|
15785
15703
|
} else {
|
|
15786
|
-
return assign({ localName: ns.localName }, effectiveNs);
|
|
15704
|
+
return assign$1({ localName: ns.localName }, effectiveNs);
|
|
15787
15705
|
}
|
|
15788
15706
|
};
|
|
15789
15707
|
|
|
@@ -15899,6 +15817,8 @@
|
|
|
15899
15817
|
try {
|
|
15900
15818
|
self.addAttribute(self.nsAttributeName(attr.name), attr.value);
|
|
15901
15819
|
} catch (e) {
|
|
15820
|
+
/* global console */
|
|
15821
|
+
|
|
15902
15822
|
console.warn(
|
|
15903
15823
|
'missing namespace information for ',
|
|
15904
15824
|
attr.name, '=', attr.value, 'on', element,
|
|
@@ -16211,7 +16131,7 @@
|
|
|
16211
16131
|
|
|
16212
16132
|
function FormatingWriter(out, format) {
|
|
16213
16133
|
|
|
16214
|
-
var indent = [''];
|
|
16134
|
+
var indent = [ '' ];
|
|
16215
16135
|
|
|
16216
16136
|
this.append = function(str) {
|
|
16217
16137
|
out.write(str);
|
|
@@ -16253,7 +16173,7 @@
|
|
|
16253
16173
|
*/
|
|
16254
16174
|
function Writer(options) {
|
|
16255
16175
|
|
|
16256
|
-
options = assign({ format: false, preamble: true }, options || {});
|
|
16176
|
+
options = assign$1({ format: false, preamble: true }, options || {});
|
|
16257
16177
|
|
|
16258
16178
|
function toXML(tree, writer) {
|
|
16259
16179
|
var internalWriter = writer || new SavingWriter();
|
|
@@ -16325,7 +16245,7 @@
|
|
|
16325
16245
|
typeName = 'bpmn:Definitions';
|
|
16326
16246
|
}
|
|
16327
16247
|
|
|
16328
|
-
var reader = new Reader(assign({ model: this, lax: true }, options));
|
|
16248
|
+
var reader = new Reader(assign$1({ model: this, lax: true }, options));
|
|
16329
16249
|
var rootHandler = reader.handler(typeName);
|
|
16330
16250
|
|
|
16331
16251
|
return reader.fromXML(xmlStr, rootHandler);
|
|
@@ -20012,7 +19932,7 @@
|
|
|
20012
19932
|
};
|
|
20013
19933
|
|
|
20014
19934
|
function simple(additionalPackages, options) {
|
|
20015
|
-
var pks = assign({}, packages, additionalPackages);
|
|
19935
|
+
var pks = assign$1({}, packages, additionalPackages);
|
|
20016
19936
|
|
|
20017
19937
|
return new BpmnModdle(pks, options);
|
|
20018
19938
|
}
|
|
@@ -20692,7 +20612,7 @@
|
|
|
20692
20612
|
|
|
20693
20613
|
// all collaboration processes can contain sub-diagrams
|
|
20694
20614
|
if (collaboration) {
|
|
20695
|
-
rootElements = map(collaboration.participants, function(participant) {
|
|
20615
|
+
rootElements = map$1(collaboration.participants, function(participant) {
|
|
20696
20616
|
return participant.processRef;
|
|
20697
20617
|
});
|
|
20698
20618
|
|
|
@@ -20818,13 +20738,13 @@
|
|
|
20818
20738
|
var lightbox;
|
|
20819
20739
|
|
|
20820
20740
|
function createLightbox() {
|
|
20821
|
-
lightbox = domify(LIGHTBOX_MARKUP);
|
|
20741
|
+
lightbox = domify$1(LIGHTBOX_MARKUP);
|
|
20822
20742
|
|
|
20823
|
-
assign
|
|
20824
|
-
assign
|
|
20825
|
-
assign
|
|
20826
|
-
assign
|
|
20827
|
-
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, {
|
|
20828
20748
|
'margin': '15px 20px 15px 10px',
|
|
20829
20749
|
'alignSelf': 'center'
|
|
20830
20750
|
});
|
|
@@ -20866,7 +20786,7 @@
|
|
|
20866
20786
|
*/
|
|
20867
20787
|
function BaseViewer(options) {
|
|
20868
20788
|
|
|
20869
|
-
options = assign({}, DEFAULT_OPTIONS, options);
|
|
20789
|
+
options = assign$1({}, DEFAULT_OPTIONS, options);
|
|
20870
20790
|
|
|
20871
20791
|
this._moddle = this._createModdle(options);
|
|
20872
20792
|
|
|
@@ -21408,8 +21328,8 @@
|
|
|
21408
21328
|
|
|
21409
21329
|
const diagramModules = [].concat(staticModules, baseModules, additionalModules);
|
|
21410
21330
|
|
|
21411
|
-
const diagramOptions = assign(omit(options, [ 'additionalModules' ]), {
|
|
21412
|
-
canvas: assign({}, options.canvas, { container: container }),
|
|
21331
|
+
const diagramOptions = assign$1(omit(options, [ 'additionalModules' ]), {
|
|
21332
|
+
canvas: assign$1({}, options.canvas, { container: container }),
|
|
21413
21333
|
modules: diagramModules
|
|
21414
21334
|
});
|
|
21415
21335
|
|
|
@@ -21435,9 +21355,9 @@
|
|
|
21435
21355
|
|
|
21436
21356
|
BaseViewer.prototype._createContainer = function(options) {
|
|
21437
21357
|
|
|
21438
|
-
const container = domify('<div class="bjs-container"></div>');
|
|
21358
|
+
const container = domify$1('<div class="bjs-container"></div>');
|
|
21439
21359
|
|
|
21440
|
-
assign
|
|
21360
|
+
assign(container, {
|
|
21441
21361
|
width: ensureUnit(options.width),
|
|
21442
21362
|
height: ensureUnit(options.height),
|
|
21443
21363
|
position: options.position
|
|
@@ -21447,7 +21367,7 @@
|
|
|
21447
21367
|
};
|
|
21448
21368
|
|
|
21449
21369
|
BaseViewer.prototype._createModdle = function(options) {
|
|
21450
|
-
const moddleOptions = assign({}, this._moddleExtensions, options.moddleExtensions);
|
|
21370
|
+
const moddleOptions = assign$1({}, this._moddleExtensions, options.moddleExtensions);
|
|
21451
21371
|
|
|
21452
21372
|
return new simple(moddleOptions);
|
|
21453
21373
|
};
|
|
@@ -21531,10 +21451,10 @@
|
|
|
21531
21451
|
img +
|
|
21532
21452
|
'</a>';
|
|
21533
21453
|
|
|
21534
|
-
const linkElement = domify(linkMarkup);
|
|
21454
|
+
const linkElement = domify$1(linkMarkup);
|
|
21535
21455
|
|
|
21536
|
-
assign
|
|
21537
|
-
assign
|
|
21456
|
+
assign(query('svg', linkElement), LOGO_STYLES);
|
|
21457
|
+
assign(linkElement, LINK_STYLES, {
|
|
21538
21458
|
position: 'absolute',
|
|
21539
21459
|
bottom: '15px',
|
|
21540
21460
|
right: '15px',
|
|
@@ -21543,7 +21463,7 @@
|
|
|
21543
21463
|
|
|
21544
21464
|
container.appendChild(linkElement);
|
|
21545
21465
|
|
|
21546
|
-
|
|
21466
|
+
event.bind(linkElement, 'click', function(event) {
|
|
21547
21467
|
open();
|
|
21548
21468
|
|
|
21549
21469
|
event.preventDefault();
|