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-modeler v10.
|
|
2
|
+
* bpmn-js - bpmn-modeler 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() :
|
|
@@ -192,46 +192,64 @@
|
|
|
192
192
|
return Array.prototype.concat.apply([], arr);
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
-
|
|
196
|
-
|
|
195
|
+
const nativeToString$1 = Object.prototype.toString;
|
|
196
|
+
const nativeHasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
197
|
+
|
|
197
198
|
function isUndefined$2(obj) {
|
|
198
199
|
return obj === undefined;
|
|
199
200
|
}
|
|
201
|
+
|
|
200
202
|
function isDefined(obj) {
|
|
201
203
|
return obj !== undefined;
|
|
202
204
|
}
|
|
205
|
+
|
|
203
206
|
function isNil(obj) {
|
|
204
207
|
return obj == null;
|
|
205
208
|
}
|
|
209
|
+
|
|
206
210
|
function isArray$3(obj) {
|
|
207
211
|
return nativeToString$1.call(obj) === '[object Array]';
|
|
208
212
|
}
|
|
213
|
+
|
|
209
214
|
function isObject(obj) {
|
|
210
215
|
return nativeToString$1.call(obj) === '[object Object]';
|
|
211
216
|
}
|
|
217
|
+
|
|
212
218
|
function isNumber(obj) {
|
|
213
219
|
return nativeToString$1.call(obj) === '[object Number]';
|
|
214
220
|
}
|
|
221
|
+
|
|
215
222
|
function isFunction(obj) {
|
|
216
|
-
|
|
217
|
-
|
|
223
|
+
const tag = nativeToString$1.call(obj);
|
|
224
|
+
|
|
225
|
+
return (
|
|
226
|
+
tag === '[object Function]' ||
|
|
227
|
+
tag === '[object AsyncFunction]' ||
|
|
228
|
+
tag === '[object GeneratorFunction]' ||
|
|
229
|
+
tag === '[object AsyncGeneratorFunction]' ||
|
|
230
|
+
tag === '[object Proxy]'
|
|
231
|
+
);
|
|
218
232
|
}
|
|
233
|
+
|
|
219
234
|
function isString(obj) {
|
|
220
235
|
return nativeToString$1.call(obj) === '[object String]';
|
|
221
236
|
}
|
|
237
|
+
|
|
238
|
+
|
|
222
239
|
/**
|
|
223
240
|
* Ensure collection is an array.
|
|
224
241
|
*
|
|
225
242
|
* @param {Object} obj
|
|
226
243
|
*/
|
|
227
|
-
|
|
228
244
|
function ensureArray(obj) {
|
|
245
|
+
|
|
229
246
|
if (isArray$3(obj)) {
|
|
230
247
|
return;
|
|
231
248
|
}
|
|
232
249
|
|
|
233
250
|
throw new Error('must supply array');
|
|
234
251
|
}
|
|
252
|
+
|
|
235
253
|
/**
|
|
236
254
|
* Return true, if target owns a property with the given key.
|
|
237
255
|
*
|
|
@@ -240,7 +258,6 @@
|
|
|
240
258
|
*
|
|
241
259
|
* @return {Boolean}
|
|
242
260
|
*/
|
|
243
|
-
|
|
244
261
|
function has$1(target, key) {
|
|
245
262
|
return nativeHasOwnProperty$1.call(target, key);
|
|
246
263
|
}
|
|
@@ -253,18 +270,25 @@
|
|
|
253
270
|
*
|
|
254
271
|
* @return {Object}
|
|
255
272
|
*/
|
|
256
|
-
|
|
257
273
|
function find(collection, matcher) {
|
|
274
|
+
|
|
258
275
|
matcher = toMatcher(matcher);
|
|
259
|
-
|
|
260
|
-
|
|
276
|
+
|
|
277
|
+
let match;
|
|
278
|
+
|
|
279
|
+
forEach$1(collection, function(val, key) {
|
|
261
280
|
if (matcher(val, key)) {
|
|
262
281
|
match = val;
|
|
282
|
+
|
|
263
283
|
return false;
|
|
264
284
|
}
|
|
265
285
|
});
|
|
286
|
+
|
|
266
287
|
return match;
|
|
288
|
+
|
|
267
289
|
}
|
|
290
|
+
|
|
291
|
+
|
|
268
292
|
/**
|
|
269
293
|
* Find element index in collection.
|
|
270
294
|
*
|
|
@@ -273,18 +297,24 @@
|
|
|
273
297
|
*
|
|
274
298
|
* @return {Object}
|
|
275
299
|
*/
|
|
276
|
-
|
|
277
300
|
function findIndex(collection, matcher) {
|
|
301
|
+
|
|
278
302
|
matcher = toMatcher(matcher);
|
|
279
|
-
|
|
280
|
-
|
|
303
|
+
|
|
304
|
+
let idx = isArray$3(collection) ? -1 : undefined;
|
|
305
|
+
|
|
306
|
+
forEach$1(collection, function(val, key) {
|
|
281
307
|
if (matcher(val, key)) {
|
|
282
308
|
idx = key;
|
|
309
|
+
|
|
283
310
|
return false;
|
|
284
311
|
}
|
|
285
312
|
});
|
|
313
|
+
|
|
286
314
|
return idx;
|
|
287
315
|
}
|
|
316
|
+
|
|
317
|
+
|
|
288
318
|
/**
|
|
289
319
|
* Find element in collection.
|
|
290
320
|
*
|
|
@@ -293,16 +323,20 @@
|
|
|
293
323
|
*
|
|
294
324
|
* @return {Array} result
|
|
295
325
|
*/
|
|
296
|
-
|
|
297
326
|
function filter(collection, matcher) {
|
|
298
|
-
|
|
299
|
-
|
|
327
|
+
|
|
328
|
+
let result = [];
|
|
329
|
+
|
|
330
|
+
forEach$1(collection, function(val, key) {
|
|
300
331
|
if (matcher(val, key)) {
|
|
301
332
|
result.push(val);
|
|
302
333
|
}
|
|
303
334
|
});
|
|
335
|
+
|
|
304
336
|
return result;
|
|
305
337
|
}
|
|
338
|
+
|
|
339
|
+
|
|
306
340
|
/**
|
|
307
341
|
* Iterate over collection; returning something
|
|
308
342
|
* (non-undefined) will stop iteration.
|
|
@@ -312,19 +346,22 @@
|
|
|
312
346
|
*
|
|
313
347
|
* @return {Object} return result that stopped the iteration
|
|
314
348
|
*/
|
|
315
|
-
|
|
316
349
|
function forEach$1(collection, iterator) {
|
|
317
|
-
|
|
350
|
+
|
|
351
|
+
let val,
|
|
352
|
+
result;
|
|
318
353
|
|
|
319
354
|
if (isUndefined$2(collection)) {
|
|
320
355
|
return;
|
|
321
356
|
}
|
|
322
357
|
|
|
323
|
-
|
|
358
|
+
const convertKey = isArray$3(collection) ? toNum$1 : identity$1;
|
|
359
|
+
|
|
360
|
+
for (let key in collection) {
|
|
324
361
|
|
|
325
|
-
for (var key in collection) {
|
|
326
362
|
if (has$1(collection, key)) {
|
|
327
363
|
val = collection[key];
|
|
364
|
+
|
|
328
365
|
result = iterator(val, convertKey(key));
|
|
329
366
|
|
|
330
367
|
if (result === false) {
|
|
@@ -333,6 +370,7 @@
|
|
|
333
370
|
}
|
|
334
371
|
}
|
|
335
372
|
}
|
|
373
|
+
|
|
336
374
|
/**
|
|
337
375
|
* Return collection without element.
|
|
338
376
|
*
|
|
@@ -341,18 +379,23 @@
|
|
|
341
379
|
*
|
|
342
380
|
* @return {Array}
|
|
343
381
|
*/
|
|
344
|
-
|
|
345
382
|
function without(arr, matcher) {
|
|
383
|
+
|
|
346
384
|
if (isUndefined$2(arr)) {
|
|
347
385
|
return [];
|
|
348
386
|
}
|
|
349
387
|
|
|
350
388
|
ensureArray(arr);
|
|
389
|
+
|
|
351
390
|
matcher = toMatcher(matcher);
|
|
352
|
-
|
|
391
|
+
|
|
392
|
+
return arr.filter(function(el, idx) {
|
|
353
393
|
return !matcher(el, idx);
|
|
354
394
|
});
|
|
395
|
+
|
|
355
396
|
}
|
|
397
|
+
|
|
398
|
+
|
|
356
399
|
/**
|
|
357
400
|
* Reduce collection, returning a single result.
|
|
358
401
|
*
|
|
@@ -362,13 +405,16 @@
|
|
|
362
405
|
*
|
|
363
406
|
* @return {Any} result returned from last iterator
|
|
364
407
|
*/
|
|
365
|
-
|
|
366
408
|
function reduce(collection, iterator, result) {
|
|
367
|
-
|
|
409
|
+
|
|
410
|
+
forEach$1(collection, function(value, idx) {
|
|
368
411
|
result = iterator(result, value, idx);
|
|
369
412
|
});
|
|
413
|
+
|
|
370
414
|
return result;
|
|
371
415
|
}
|
|
416
|
+
|
|
417
|
+
|
|
372
418
|
/**
|
|
373
419
|
* Return true if every element in the collection
|
|
374
420
|
* matches the criteria.
|
|
@@ -378,12 +424,14 @@
|
|
|
378
424
|
*
|
|
379
425
|
* @return {Boolean}
|
|
380
426
|
*/
|
|
381
|
-
|
|
382
427
|
function every(collection, matcher) {
|
|
383
|
-
|
|
428
|
+
|
|
429
|
+
return !!reduce(collection, function(matches, val, key) {
|
|
384
430
|
return matches && matcher(val, key);
|
|
385
431
|
}, true);
|
|
386
432
|
}
|
|
433
|
+
|
|
434
|
+
|
|
387
435
|
/**
|
|
388
436
|
* Return true if some elements in the collection
|
|
389
437
|
* match the criteria.
|
|
@@ -393,10 +441,12 @@
|
|
|
393
441
|
*
|
|
394
442
|
* @return {Boolean}
|
|
395
443
|
*/
|
|
396
|
-
|
|
397
444
|
function some(collection, matcher) {
|
|
445
|
+
|
|
398
446
|
return !!find(collection, matcher);
|
|
399
447
|
}
|
|
448
|
+
|
|
449
|
+
|
|
400
450
|
/**
|
|
401
451
|
* Transform a collection into another collection
|
|
402
452
|
* by piping each member through the given fn.
|
|
@@ -406,14 +456,18 @@
|
|
|
406
456
|
*
|
|
407
457
|
* @return {Array} transformed collection
|
|
408
458
|
*/
|
|
459
|
+
function map$1(collection, fn) {
|
|
409
460
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
forEach$1(collection, function
|
|
461
|
+
let result = [];
|
|
462
|
+
|
|
463
|
+
forEach$1(collection, function(val, key) {
|
|
413
464
|
result.push(fn(val, key));
|
|
414
465
|
});
|
|
466
|
+
|
|
415
467
|
return result;
|
|
416
468
|
}
|
|
469
|
+
|
|
470
|
+
|
|
417
471
|
/**
|
|
418
472
|
* Get the collections keys.
|
|
419
473
|
*
|
|
@@ -421,10 +475,11 @@
|
|
|
421
475
|
*
|
|
422
476
|
* @return {Array}
|
|
423
477
|
*/
|
|
424
|
-
|
|
425
478
|
function keys(collection) {
|
|
426
479
|
return collection && Object.keys(collection) || [];
|
|
427
480
|
}
|
|
481
|
+
|
|
482
|
+
|
|
428
483
|
/**
|
|
429
484
|
* Shorthand for `keys(o).length`.
|
|
430
485
|
*
|
|
@@ -432,10 +487,11 @@
|
|
|
432
487
|
*
|
|
433
488
|
* @return {Number}
|
|
434
489
|
*/
|
|
435
|
-
|
|
436
490
|
function size(collection) {
|
|
437
491
|
return keys(collection).length;
|
|
438
492
|
}
|
|
493
|
+
|
|
494
|
+
|
|
439
495
|
/**
|
|
440
496
|
* Get the values in the collection.
|
|
441
497
|
*
|
|
@@ -443,12 +499,11 @@
|
|
|
443
499
|
*
|
|
444
500
|
* @return {Array}
|
|
445
501
|
*/
|
|
446
|
-
|
|
447
502
|
function values(collection) {
|
|
448
|
-
return map(collection,
|
|
449
|
-
return val;
|
|
450
|
-
});
|
|
503
|
+
return map$1(collection, (val) => val);
|
|
451
504
|
}
|
|
505
|
+
|
|
506
|
+
|
|
452
507
|
/**
|
|
453
508
|
* Group collection members by attribute.
|
|
454
509
|
*
|
|
@@ -457,13 +512,14 @@
|
|
|
457
512
|
*
|
|
458
513
|
* @return {Object} map with { attrValue => [ a, b, c ] }
|
|
459
514
|
*/
|
|
515
|
+
function groupBy(collection, extractor, grouped = {}) {
|
|
460
516
|
|
|
461
|
-
function groupBy(collection, extractor) {
|
|
462
|
-
var grouped = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
463
517
|
extractor = toExtractor(extractor);
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
518
|
+
|
|
519
|
+
forEach$1(collection, function(val) {
|
|
520
|
+
let discriminator = extractor(val) || '_';
|
|
521
|
+
|
|
522
|
+
let group = grouped[discriminator];
|
|
467
523
|
|
|
468
524
|
if (!group) {
|
|
469
525
|
group = grouped[discriminator] = [];
|
|
@@ -471,25 +527,31 @@
|
|
|
471
527
|
|
|
472
528
|
group.push(val);
|
|
473
529
|
});
|
|
530
|
+
|
|
474
531
|
return grouped;
|
|
475
532
|
}
|
|
476
|
-
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
function uniqueBy(extractor, ...collections) {
|
|
536
|
+
|
|
477
537
|
extractor = toExtractor(extractor);
|
|
478
|
-
var grouped = {};
|
|
479
538
|
|
|
480
|
-
|
|
481
|
-
collections[_key - 1] = arguments[_key];
|
|
482
|
-
}
|
|
539
|
+
let grouped = {};
|
|
483
540
|
|
|
484
|
-
forEach$1(collections,
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
var result = map(grouped, function (val, key) {
|
|
541
|
+
forEach$1(collections, (c) => groupBy(c, extractor, grouped));
|
|
542
|
+
|
|
543
|
+
let result = map$1(grouped, function(val, key) {
|
|
488
544
|
return val[0];
|
|
489
545
|
});
|
|
546
|
+
|
|
490
547
|
return result;
|
|
491
548
|
}
|
|
492
|
-
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
const unionBy = uniqueBy;
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
|
|
493
555
|
/**
|
|
494
556
|
* Sort collection by criteria.
|
|
495
557
|
*
|
|
@@ -498,33 +560,37 @@
|
|
|
498
560
|
*
|
|
499
561
|
* @return {Array}
|
|
500
562
|
*/
|
|
501
|
-
|
|
502
563
|
function sortBy(collection, extractor) {
|
|
564
|
+
|
|
503
565
|
extractor = toExtractor(extractor);
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
566
|
+
|
|
567
|
+
let sorted = [];
|
|
568
|
+
|
|
569
|
+
forEach$1(collection, function(value, key) {
|
|
570
|
+
let disc = extractor(value, key);
|
|
571
|
+
|
|
572
|
+
let entry = {
|
|
508
573
|
d: disc,
|
|
509
574
|
v: value
|
|
510
575
|
};
|
|
511
576
|
|
|
512
577
|
for (var idx = 0; idx < sorted.length; idx++) {
|
|
513
|
-
|
|
578
|
+
let { d } = sorted[idx];
|
|
514
579
|
|
|
515
580
|
if (disc < d) {
|
|
516
581
|
sorted.splice(idx, 0, entry);
|
|
517
582
|
return;
|
|
518
583
|
}
|
|
519
|
-
}
|
|
520
|
-
|
|
584
|
+
}
|
|
521
585
|
|
|
586
|
+
// not inserted, append (!)
|
|
522
587
|
sorted.push(entry);
|
|
523
588
|
});
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
});
|
|
589
|
+
|
|
590
|
+
return map$1(sorted, (e) => e.v);
|
|
527
591
|
}
|
|
592
|
+
|
|
593
|
+
|
|
528
594
|
/**
|
|
529
595
|
* Create an object pattern matcher.
|
|
530
596
|
*
|
|
@@ -538,27 +604,32 @@
|
|
|
538
604
|
*
|
|
539
605
|
* @return {Function} matcherFn
|
|
540
606
|
*/
|
|
541
|
-
|
|
542
607
|
function matchPattern(pattern) {
|
|
543
|
-
|
|
544
|
-
|
|
608
|
+
|
|
609
|
+
return function(el) {
|
|
610
|
+
|
|
611
|
+
return every(pattern, function(val, key) {
|
|
545
612
|
return el[key] === val;
|
|
546
613
|
});
|
|
614
|
+
|
|
547
615
|
};
|
|
548
616
|
}
|
|
549
617
|
|
|
618
|
+
|
|
550
619
|
function toExtractor(extractor) {
|
|
551
|
-
return isFunction(extractor) ? extractor :
|
|
620
|
+
return isFunction(extractor) ? extractor : (e) => {
|
|
552
621
|
return e[extractor];
|
|
553
622
|
};
|
|
554
623
|
}
|
|
555
624
|
|
|
625
|
+
|
|
556
626
|
function toMatcher(matcher) {
|
|
557
|
-
return isFunction(matcher) ? matcher :
|
|
627
|
+
return isFunction(matcher) ? matcher : (e) => {
|
|
558
628
|
return e === matcher;
|
|
559
629
|
};
|
|
560
630
|
}
|
|
561
631
|
|
|
632
|
+
|
|
562
633
|
function identity$1(arg) {
|
|
563
634
|
return arg;
|
|
564
635
|
}
|
|
@@ -580,20 +651,26 @@
|
|
|
580
651
|
* @return {Function} debounced function
|
|
581
652
|
*/
|
|
582
653
|
function debounce(fn, timeout) {
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
654
|
+
|
|
655
|
+
let timer;
|
|
656
|
+
|
|
657
|
+
let lastArgs;
|
|
658
|
+
let lastThis;
|
|
659
|
+
|
|
660
|
+
let lastNow;
|
|
587
661
|
|
|
588
662
|
function fire(force) {
|
|
589
|
-
|
|
590
|
-
|
|
663
|
+
|
|
664
|
+
let now = Date.now();
|
|
665
|
+
|
|
666
|
+
let scheduledDiff = force ? 0 : (lastNow + timeout) - now;
|
|
591
667
|
|
|
592
668
|
if (scheduledDiff > 0) {
|
|
593
669
|
return schedule(scheduledDiff);
|
|
594
670
|
}
|
|
595
671
|
|
|
596
672
|
fn.apply(lastThis, lastArgs);
|
|
673
|
+
|
|
597
674
|
clear();
|
|
598
675
|
}
|
|
599
676
|
|
|
@@ -617,16 +694,13 @@
|
|
|
617
694
|
clear();
|
|
618
695
|
}
|
|
619
696
|
|
|
620
|
-
function callback() {
|
|
697
|
+
function callback(...args) {
|
|
621
698
|
lastNow = Date.now();
|
|
622
699
|
|
|
623
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
624
|
-
args[_key] = arguments[_key];
|
|
625
|
-
}
|
|
626
|
-
|
|
627
700
|
lastArgs = args;
|
|
628
|
-
lastThis = this;
|
|
701
|
+
lastThis = this;
|
|
629
702
|
|
|
703
|
+
// ensure an execution is scheduled
|
|
630
704
|
if (!timer) {
|
|
631
705
|
schedule(timeout);
|
|
632
706
|
}
|
|
@@ -634,8 +708,10 @@
|
|
|
634
708
|
|
|
635
709
|
callback.flush = flush;
|
|
636
710
|
callback.cancel = clear;
|
|
711
|
+
|
|
637
712
|
return callback;
|
|
638
713
|
}
|
|
714
|
+
|
|
639
715
|
/**
|
|
640
716
|
* Bind function against target <this>.
|
|
641
717
|
*
|
|
@@ -644,29 +720,10 @@
|
|
|
644
720
|
*
|
|
645
721
|
* @return {Function} bound function
|
|
646
722
|
*/
|
|
647
|
-
|
|
648
|
-
function bind(fn, target) {
|
|
723
|
+
function bind$2(fn, target) {
|
|
649
724
|
return fn.bind(target);
|
|
650
725
|
}
|
|
651
726
|
|
|
652
|
-
function _extends() {
|
|
653
|
-
_extends = Object.assign || function (target) {
|
|
654
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
655
|
-
var source = arguments[i];
|
|
656
|
-
|
|
657
|
-
for (var key in source) {
|
|
658
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
659
|
-
target[key] = source[key];
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
return target;
|
|
665
|
-
};
|
|
666
|
-
|
|
667
|
-
return _extends.apply(this, arguments);
|
|
668
|
-
}
|
|
669
|
-
|
|
670
727
|
/**
|
|
671
728
|
* Convenience wrapper for `Object.assign`.
|
|
672
729
|
*
|
|
@@ -675,14 +732,10 @@
|
|
|
675
732
|
*
|
|
676
733
|
* @return {Object} the target
|
|
677
734
|
*/
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
681
|
-
others[_key - 1] = arguments[_key];
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
return _extends.apply(void 0, [target].concat(others));
|
|
735
|
+
function assign$1(target, ...others) {
|
|
736
|
+
return Object.assign(target, ...others);
|
|
685
737
|
}
|
|
738
|
+
|
|
686
739
|
/**
|
|
687
740
|
* Pick given properties from the target object.
|
|
688
741
|
*
|
|
@@ -691,17 +744,22 @@
|
|
|
691
744
|
*
|
|
692
745
|
* @return {Object} target
|
|
693
746
|
*/
|
|
694
|
-
|
|
695
747
|
function pick(target, properties) {
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
748
|
+
|
|
749
|
+
let result = {};
|
|
750
|
+
|
|
751
|
+
let obj = Object(target);
|
|
752
|
+
|
|
753
|
+
forEach$1(properties, function(prop) {
|
|
754
|
+
|
|
699
755
|
if (prop in obj) {
|
|
700
756
|
result[prop] = target[prop];
|
|
701
757
|
}
|
|
702
758
|
});
|
|
759
|
+
|
|
703
760
|
return result;
|
|
704
761
|
}
|
|
762
|
+
|
|
705
763
|
/**
|
|
706
764
|
* Pick all target properties, excluding the given ones.
|
|
707
765
|
*
|
|
@@ -710,18 +768,37 @@
|
|
|
710
768
|
*
|
|
711
769
|
* @return {Object} target
|
|
712
770
|
*/
|
|
713
|
-
|
|
714
771
|
function omit(target, properties) {
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
772
|
+
|
|
773
|
+
let result = {};
|
|
774
|
+
|
|
775
|
+
let obj = Object(target);
|
|
776
|
+
|
|
777
|
+
forEach$1(obj, function(prop, key) {
|
|
778
|
+
|
|
718
779
|
if (properties.indexOf(key) === -1) {
|
|
719
780
|
result[key] = prop;
|
|
720
781
|
}
|
|
721
782
|
});
|
|
783
|
+
|
|
722
784
|
return result;
|
|
723
785
|
}
|
|
724
786
|
|
|
787
|
+
function _mergeNamespaces$1(n, m) {
|
|
788
|
+
m.forEach(function (e) {
|
|
789
|
+
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
790
|
+
if (k !== 'default' && !(k in n)) {
|
|
791
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
792
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
793
|
+
enumerable: true,
|
|
794
|
+
get: function () { return e[k]; }
|
|
795
|
+
});
|
|
796
|
+
}
|
|
797
|
+
});
|
|
798
|
+
});
|
|
799
|
+
return Object.freeze(n);
|
|
800
|
+
}
|
|
801
|
+
|
|
725
802
|
/**
|
|
726
803
|
* Flatten array, one level deep.
|
|
727
804
|
*
|
|
@@ -797,19 +874,15 @@
|
|
|
797
874
|
*
|
|
798
875
|
* @return {Element} the element
|
|
799
876
|
*/
|
|
800
|
-
function assign
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
for (var _len = arguments.length, styleSources = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
804
|
-
styleSources[_key - 1] = arguments[_key];
|
|
805
|
-
}
|
|
877
|
+
function assign(element, ...styleSources) {
|
|
878
|
+
const target = element.style;
|
|
806
879
|
|
|
807
|
-
forEach(styleSources, function
|
|
880
|
+
forEach(styleSources, function(style) {
|
|
808
881
|
if (!style) {
|
|
809
882
|
return;
|
|
810
883
|
}
|
|
811
884
|
|
|
812
|
-
forEach(style, function
|
|
885
|
+
forEach(style, function(value, key) {
|
|
813
886
|
target[key] = value;
|
|
814
887
|
});
|
|
815
888
|
});
|
|
@@ -826,6 +899,7 @@
|
|
|
826
899
|
* @api public
|
|
827
900
|
*/
|
|
828
901
|
function attr$1(el, name, val) {
|
|
902
|
+
|
|
829
903
|
// get
|
|
830
904
|
if (arguments.length == 2) {
|
|
831
905
|
return el.getAttribute(name);
|
|
@@ -842,33 +916,17 @@
|
|
|
842
916
|
return el;
|
|
843
917
|
}
|
|
844
918
|
|
|
845
|
-
var indexOf$1 = [].indexOf;
|
|
846
|
-
|
|
847
|
-
var indexof = function(arr, obj){
|
|
848
|
-
if (indexOf$1) return arr.indexOf(obj);
|
|
849
|
-
for (var i = 0; i < arr.length; ++i) {
|
|
850
|
-
if (arr[i] === obj) return i;
|
|
851
|
-
}
|
|
852
|
-
return -1;
|
|
853
|
-
};
|
|
854
|
-
|
|
855
919
|
/**
|
|
856
920
|
* Taken from https://github.com/component/classes
|
|
857
921
|
*
|
|
858
922
|
* Without the component bits.
|
|
859
923
|
*/
|
|
860
924
|
|
|
861
|
-
/**
|
|
862
|
-
* Whitespace regexp.
|
|
863
|
-
*/
|
|
864
|
-
|
|
865
|
-
var re$1 = /\s+/;
|
|
866
|
-
|
|
867
925
|
/**
|
|
868
926
|
* toString reference.
|
|
869
927
|
*/
|
|
870
928
|
|
|
871
|
-
|
|
929
|
+
const toString$1 = Object.prototype.toString;
|
|
872
930
|
|
|
873
931
|
/**
|
|
874
932
|
* Wrap `el` in a `ClassList`.
|
|
@@ -905,18 +963,8 @@
|
|
|
905
963
|
* @api public
|
|
906
964
|
*/
|
|
907
965
|
|
|
908
|
-
ClassList$1.prototype.add = function
|
|
909
|
-
|
|
910
|
-
if (this.list) {
|
|
911
|
-
this.list.add(name);
|
|
912
|
-
return this;
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
// fallback
|
|
916
|
-
var arr = this.array();
|
|
917
|
-
var i = indexof(arr, name);
|
|
918
|
-
if (!~i) arr.push(name);
|
|
919
|
-
this.el.className = arr.join(' ');
|
|
966
|
+
ClassList$1.prototype.add = function(name) {
|
|
967
|
+
this.list.add(name);
|
|
920
968
|
return this;
|
|
921
969
|
};
|
|
922
970
|
|
|
@@ -930,22 +978,12 @@
|
|
|
930
978
|
* @api public
|
|
931
979
|
*/
|
|
932
980
|
|
|
933
|
-
ClassList$1.prototype.remove = function
|
|
981
|
+
ClassList$1.prototype.remove = function(name) {
|
|
934
982
|
if ('[object RegExp]' == toString$1.call(name)) {
|
|
935
983
|
return this.removeMatching(name);
|
|
936
984
|
}
|
|
937
985
|
|
|
938
|
-
|
|
939
|
-
if (this.list) {
|
|
940
|
-
this.list.remove(name);
|
|
941
|
-
return this;
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
// fallback
|
|
945
|
-
var arr = this.array();
|
|
946
|
-
var i = indexof(arr, name);
|
|
947
|
-
if (~i) arr.splice(i, 1);
|
|
948
|
-
this.el.className = arr.join(' ');
|
|
986
|
+
this.list.remove(name);
|
|
949
987
|
return this;
|
|
950
988
|
};
|
|
951
989
|
|
|
@@ -957,9 +995,9 @@
|
|
|
957
995
|
* @api private
|
|
958
996
|
*/
|
|
959
997
|
|
|
960
|
-
ClassList$1.prototype.removeMatching = function
|
|
961
|
-
|
|
962
|
-
for (
|
|
998
|
+
ClassList$1.prototype.removeMatching = function(re) {
|
|
999
|
+
const arr = this.array();
|
|
1000
|
+
for (let i = 0; i < arr.length; i++) {
|
|
963
1001
|
if (re.test(arr[i])) {
|
|
964
1002
|
this.remove(arr[i]);
|
|
965
1003
|
}
|
|
@@ -979,34 +1017,14 @@
|
|
|
979
1017
|
* @api public
|
|
980
1018
|
*/
|
|
981
1019
|
|
|
982
|
-
ClassList$1.prototype.toggle = function
|
|
983
|
-
// classList
|
|
984
|
-
if (this.list) {
|
|
985
|
-
if ('undefined' !== typeof force) {
|
|
986
|
-
if (force !== this.list.toggle(name, force)) {
|
|
987
|
-
this.list.toggle(name); // toggle again to correct
|
|
988
|
-
}
|
|
989
|
-
} else {
|
|
990
|
-
this.list.toggle(name);
|
|
991
|
-
}
|
|
992
|
-
return this;
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
// fallback
|
|
1020
|
+
ClassList$1.prototype.toggle = function(name, force) {
|
|
996
1021
|
if ('undefined' !== typeof force) {
|
|
997
|
-
if (
|
|
998
|
-
this.
|
|
999
|
-
} else {
|
|
1000
|
-
this.add(name);
|
|
1022
|
+
if (force !== this.list.toggle(name, force)) {
|
|
1023
|
+
this.list.toggle(name); // toggle again to correct
|
|
1001
1024
|
}
|
|
1002
1025
|
} else {
|
|
1003
|
-
|
|
1004
|
-
this.remove(name);
|
|
1005
|
-
} else {
|
|
1006
|
-
this.add(name);
|
|
1007
|
-
}
|
|
1026
|
+
this.list.toggle(name);
|
|
1008
1027
|
}
|
|
1009
|
-
|
|
1010
1028
|
return this;
|
|
1011
1029
|
};
|
|
1012
1030
|
|
|
@@ -1017,12 +1035,8 @@
|
|
|
1017
1035
|
* @api public
|
|
1018
1036
|
*/
|
|
1019
1037
|
|
|
1020
|
-
ClassList$1.prototype.array = function
|
|
1021
|
-
|
|
1022
|
-
var str = className.replace(/^\s+|\s+$/g, '');
|
|
1023
|
-
var arr = str.split(re$1);
|
|
1024
|
-
if ('' === arr[0]) arr.shift();
|
|
1025
|
-
return arr;
|
|
1038
|
+
ClassList$1.prototype.array = function() {
|
|
1039
|
+
return Array.from(this.list);
|
|
1026
1040
|
};
|
|
1027
1041
|
|
|
1028
1042
|
/**
|
|
@@ -1033,8 +1047,9 @@
|
|
|
1033
1047
|
* @api public
|
|
1034
1048
|
*/
|
|
1035
1049
|
|
|
1036
|
-
ClassList$1.prototype.has =
|
|
1037
|
-
|
|
1050
|
+
ClassList$1.prototype.has =
|
|
1051
|
+
ClassList$1.prototype.contains = function(name) {
|
|
1052
|
+
return this.list.contains(name);
|
|
1038
1053
|
};
|
|
1039
1054
|
|
|
1040
1055
|
/**
|
|
@@ -1052,33 +1067,14 @@
|
|
|
1052
1067
|
return el;
|
|
1053
1068
|
}
|
|
1054
1069
|
|
|
1055
|
-
var proto = typeof Element !== 'undefined' ? Element.prototype : {};
|
|
1056
|
-
var vendor = proto.matches
|
|
1057
|
-
|| proto.matchesSelector
|
|
1058
|
-
|| proto.webkitMatchesSelector
|
|
1059
|
-
|| proto.mozMatchesSelector
|
|
1060
|
-
|| proto.msMatchesSelector
|
|
1061
|
-
|| proto.oMatchesSelector;
|
|
1062
|
-
|
|
1063
|
-
var matchesSelector = match;
|
|
1064
|
-
|
|
1065
1070
|
/**
|
|
1066
|
-
*
|
|
1071
|
+
* @param { HTMLElement } element
|
|
1072
|
+
* @param { String } selector
|
|
1067
1073
|
*
|
|
1068
|
-
* @
|
|
1069
|
-
* @param {String} selector
|
|
1070
|
-
* @return {Boolean}
|
|
1071
|
-
* @api public
|
|
1074
|
+
* @return { boolean }
|
|
1072
1075
|
*/
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
if (!el || el.nodeType !== 1) return false;
|
|
1076
|
-
if (vendor) return vendor.call(el, selector);
|
|
1077
|
-
var nodes = el.parentNode.querySelectorAll(selector);
|
|
1078
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
1079
|
-
if (nodes[i] == el) return true;
|
|
1080
|
-
}
|
|
1081
|
-
return false;
|
|
1076
|
+
function matches(element, selector) {
|
|
1077
|
+
return element && typeof element.matches === 'function' && element.matches(selector);
|
|
1082
1078
|
}
|
|
1083
1079
|
|
|
1084
1080
|
/**
|
|
@@ -1088,23 +1084,26 @@
|
|
|
1088
1084
|
* @param {String} selector
|
|
1089
1085
|
* @param {Boolean} checkYourSelf (optional)
|
|
1090
1086
|
*/
|
|
1091
|
-
function closest
|
|
1087
|
+
function closest(element, selector, checkYourSelf) {
|
|
1092
1088
|
var currentElem = checkYourSelf ? element : element.parentNode;
|
|
1093
1089
|
|
|
1094
|
-
while (currentElem && currentElem.nodeType !== document.DOCUMENT_NODE &&
|
|
1090
|
+
while (currentElem && currentElem.nodeType !== document.DOCUMENT_NODE &&
|
|
1091
|
+
currentElem.nodeType !== document.DOCUMENT_FRAGMENT_NODE) {
|
|
1095
1092
|
|
|
1096
|
-
if (
|
|
1093
|
+
if (matches(currentElem, selector)) {
|
|
1097
1094
|
return currentElem;
|
|
1098
1095
|
}
|
|
1099
1096
|
|
|
1100
1097
|
currentElem = currentElem.parentNode;
|
|
1101
1098
|
}
|
|
1102
1099
|
|
|
1103
|
-
return
|
|
1100
|
+
return matches(currentElem, selector) ? currentElem : null;
|
|
1104
1101
|
}
|
|
1105
1102
|
|
|
1103
|
+
var componentEvent = {};
|
|
1104
|
+
|
|
1106
1105
|
var bind$1 = window.addEventListener ? 'addEventListener' : 'attachEvent',
|
|
1107
|
-
unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent',
|
|
1106
|
+
unbind$1 = window.removeEventListener ? 'removeEventListener' : 'detachEvent',
|
|
1108
1107
|
prefix$6 = bind$1 !== 'addEventListener' ? 'on' : '';
|
|
1109
1108
|
|
|
1110
1109
|
/**
|
|
@@ -1118,7 +1117,7 @@
|
|
|
1118
1117
|
* @api public
|
|
1119
1118
|
*/
|
|
1120
1119
|
|
|
1121
|
-
var bind_1 = function(el, type, fn, capture){
|
|
1120
|
+
var bind_1 = componentEvent.bind = function(el, type, fn, capture){
|
|
1122
1121
|
el[bind$1](prefix$6 + type, fn, capture || false);
|
|
1123
1122
|
return fn;
|
|
1124
1123
|
};
|
|
@@ -1134,15 +1133,17 @@
|
|
|
1134
1133
|
* @api public
|
|
1135
1134
|
*/
|
|
1136
1135
|
|
|
1137
|
-
var unbind_1 = function(el, type, fn, capture){
|
|
1138
|
-
el[unbind](prefix$6 + type, fn, capture || false);
|
|
1136
|
+
var unbind_1 = componentEvent.unbind = function(el, type, fn, capture){
|
|
1137
|
+
el[unbind$1](prefix$6 + type, fn, capture || false);
|
|
1139
1138
|
return fn;
|
|
1140
1139
|
};
|
|
1141
1140
|
|
|
1142
|
-
var
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1141
|
+
var event = /*#__PURE__*/_mergeNamespaces$1({
|
|
1142
|
+
__proto__: null,
|
|
1143
|
+
bind: bind_1,
|
|
1144
|
+
unbind: unbind_1,
|
|
1145
|
+
'default': componentEvent
|
|
1146
|
+
}, [componentEvent]);
|
|
1146
1147
|
|
|
1147
1148
|
/**
|
|
1148
1149
|
* Module dependencies.
|
|
@@ -1164,14 +1165,14 @@
|
|
|
1164
1165
|
|
|
1165
1166
|
// Some events don't bubble, so we want to bind to the capture phase instead
|
|
1166
1167
|
// when delegating.
|
|
1167
|
-
var forceCaptureEvents = ['focus', 'blur'];
|
|
1168
|
+
var forceCaptureEvents = [ 'focus', 'blur' ];
|
|
1168
1169
|
|
|
1169
|
-
function bind
|
|
1170
|
+
function bind(el, selector, type, fn, capture) {
|
|
1170
1171
|
if (forceCaptureEvents.indexOf(type) !== -1) {
|
|
1171
1172
|
capture = true;
|
|
1172
1173
|
}
|
|
1173
1174
|
|
|
1174
|
-
return
|
|
1175
|
+
return event.bind(el, type, function(e) {
|
|
1175
1176
|
var target = e.target || e.srcElement;
|
|
1176
1177
|
e.delegateTarget = closest(target, selector, true);
|
|
1177
1178
|
if (e.delegateTarget) {
|
|
@@ -1189,17 +1190,17 @@
|
|
|
1189
1190
|
* @param {Boolean} capture
|
|
1190
1191
|
* @api public
|
|
1191
1192
|
*/
|
|
1192
|
-
function unbind
|
|
1193
|
+
function unbind(el, type, fn, capture) {
|
|
1193
1194
|
if (forceCaptureEvents.indexOf(type) !== -1) {
|
|
1194
1195
|
capture = true;
|
|
1195
1196
|
}
|
|
1196
1197
|
|
|
1197
|
-
return
|
|
1198
|
+
return event.unbind(el, type, fn, capture);
|
|
1198
1199
|
}
|
|
1199
1200
|
|
|
1200
1201
|
var delegate = {
|
|
1201
|
-
bind
|
|
1202
|
-
unbind
|
|
1202
|
+
bind,
|
|
1203
|
+
unbind
|
|
1203
1204
|
};
|
|
1204
1205
|
|
|
1205
1206
|
/**
|
|
@@ -1228,7 +1229,7 @@
|
|
|
1228
1229
|
* Wrap map from jquery.
|
|
1229
1230
|
*/
|
|
1230
1231
|
|
|
1231
|
-
var map
|
|
1232
|
+
var map = {
|
|
1232
1233
|
legend: [1, '<fieldset>', '</fieldset>'],
|
|
1233
1234
|
tr: [2, '<table><tbody>', '</tbody></table>'],
|
|
1234
1235
|
col: [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
|
|
@@ -1237,27 +1238,27 @@
|
|
|
1237
1238
|
_default: innerHTMLBug ? [1, 'X<div>', '</div>'] : [0, '', '']
|
|
1238
1239
|
};
|
|
1239
1240
|
|
|
1240
|
-
map
|
|
1241
|
-
map
|
|
1241
|
+
map.td =
|
|
1242
|
+
map.th = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
|
|
1242
1243
|
|
|
1243
|
-
map
|
|
1244
|
-
map
|
|
1244
|
+
map.option =
|
|
1245
|
+
map.optgroup = [1, '<select multiple="multiple">', '</select>'];
|
|
1245
1246
|
|
|
1246
|
-
map
|
|
1247
|
-
map
|
|
1248
|
-
map
|
|
1249
|
-
map
|
|
1250
|
-
map
|
|
1247
|
+
map.thead =
|
|
1248
|
+
map.tbody =
|
|
1249
|
+
map.colgroup =
|
|
1250
|
+
map.caption =
|
|
1251
|
+
map.tfoot = [1, '<table>', '</table>'];
|
|
1251
1252
|
|
|
1252
|
-
map
|
|
1253
|
-
map
|
|
1254
|
-
map
|
|
1255
|
-
map
|
|
1256
|
-
map
|
|
1257
|
-
map
|
|
1258
|
-
map
|
|
1259
|
-
map
|
|
1260
|
-
map
|
|
1253
|
+
map.polyline =
|
|
1254
|
+
map.ellipse =
|
|
1255
|
+
map.polygon =
|
|
1256
|
+
map.circle =
|
|
1257
|
+
map.text =
|
|
1258
|
+
map.line =
|
|
1259
|
+
map.path =
|
|
1260
|
+
map.rect =
|
|
1261
|
+
map.g = [1, '<svg xmlns="http://www.w3.org/2000/svg" version="1.1">','</svg>'];
|
|
1261
1262
|
|
|
1262
1263
|
/**
|
|
1263
1264
|
* Parse `html` and return a DOM Node instance, which could be a TextNode,
|
|
@@ -1292,7 +1293,7 @@
|
|
|
1292
1293
|
}
|
|
1293
1294
|
|
|
1294
1295
|
// wrap map
|
|
1295
|
-
var wrap = map
|
|
1296
|
+
var wrap = Object.prototype.hasOwnProperty.call(map, tag) ? map[tag] : map._default;
|
|
1296
1297
|
var depth = wrap[0];
|
|
1297
1298
|
var prefix = wrap[1];
|
|
1298
1299
|
var suffix = wrap[2];
|
|
@@ -1314,6 +1315,8 @@
|
|
|
1314
1315
|
return fragment;
|
|
1315
1316
|
}
|
|
1316
1317
|
|
|
1318
|
+
var domify$1 = domify;
|
|
1319
|
+
|
|
1317
1320
|
function query(selector, el) {
|
|
1318
1321
|
el = el || document;
|
|
1319
1322
|
|
|
@@ -1334,9 +1337,11 @@
|
|
|
1334
1337
|
|
|
1335
1338
|
if (element.ownerDocument !== target.ownerDocument) {
|
|
1336
1339
|
try {
|
|
1340
|
+
|
|
1337
1341
|
// may fail on webkit
|
|
1338
1342
|
return target.ownerDocument.importNode(element, true);
|
|
1339
1343
|
} catch (e) {
|
|
1344
|
+
|
|
1340
1345
|
// ignore
|
|
1341
1346
|
}
|
|
1342
1347
|
}
|
|
@@ -1462,6 +1467,7 @@
|
|
|
1462
1467
|
var type = CSS_PROPERTIES[hyphenated];
|
|
1463
1468
|
|
|
1464
1469
|
if (type) {
|
|
1470
|
+
|
|
1465
1471
|
// append pixel unit, unless present
|
|
1466
1472
|
if (type === LENGTH_ATTR && typeof value === 'number') {
|
|
1467
1473
|
value = String(value) + 'px';
|
|
@@ -1507,38 +1513,24 @@
|
|
|
1507
1513
|
}
|
|
1508
1514
|
|
|
1509
1515
|
/**
|
|
1510
|
-
*
|
|
1516
|
+
* Taken from https://github.com/component/classes
|
|
1517
|
+
*
|
|
1518
|
+
* Without the component bits.
|
|
1511
1519
|
*/
|
|
1512
|
-
function index(arr, obj) {
|
|
1513
|
-
if (arr.indexOf) {
|
|
1514
|
-
return arr.indexOf(obj);
|
|
1515
|
-
}
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
for (var i = 0; i < arr.length; ++i) {
|
|
1519
|
-
if (arr[i] === obj) {
|
|
1520
|
-
return i;
|
|
1521
|
-
}
|
|
1522
|
-
}
|
|
1523
|
-
|
|
1524
|
-
return -1;
|
|
1525
|
-
}
|
|
1526
|
-
|
|
1527
|
-
var re = /\s+/;
|
|
1528
1520
|
|
|
1529
|
-
|
|
1521
|
+
/**
|
|
1522
|
+
* toString reference.
|
|
1523
|
+
*/
|
|
1530
1524
|
|
|
1531
|
-
|
|
1532
|
-
return typeof o !== 'undefined';
|
|
1533
|
-
}
|
|
1525
|
+
const toString = Object.prototype.toString;
|
|
1534
1526
|
|
|
1535
1527
|
/**
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1528
|
+
* Wrap `el` in a `ClassList`.
|
|
1529
|
+
*
|
|
1530
|
+
* @param {Element} el
|
|
1531
|
+
* @return {ClassList}
|
|
1532
|
+
* @api public
|
|
1533
|
+
*/
|
|
1542
1534
|
|
|
1543
1535
|
function classes(el) {
|
|
1544
1536
|
return new ClassList(el);
|
|
@@ -1553,79 +1545,48 @@
|
|
|
1553
1545
|
}
|
|
1554
1546
|
|
|
1555
1547
|
/**
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1548
|
+
* Add class `name` if not already present.
|
|
1549
|
+
*
|
|
1550
|
+
* @param {String} name
|
|
1551
|
+
* @return {ClassList}
|
|
1552
|
+
* @api public
|
|
1553
|
+
*/
|
|
1562
1554
|
|
|
1563
1555
|
ClassList.prototype.add = function(name) {
|
|
1564
|
-
|
|
1565
|
-
// classList
|
|
1566
|
-
if (this.list) {
|
|
1567
|
-
this.list.add(name);
|
|
1568
|
-
return this;
|
|
1569
|
-
}
|
|
1570
|
-
|
|
1571
|
-
// fallback
|
|
1572
|
-
var arr = this.array();
|
|
1573
|
-
var i = index(arr, name);
|
|
1574
|
-
if (!~i) {
|
|
1575
|
-
arr.push(name);
|
|
1576
|
-
}
|
|
1577
|
-
|
|
1578
|
-
if (defined(this.el.className.baseVal)) {
|
|
1579
|
-
this.el.className.baseVal = arr.join(' ');
|
|
1580
|
-
} else {
|
|
1581
|
-
this.el.className = arr.join(' ');
|
|
1582
|
-
}
|
|
1583
|
-
|
|
1556
|
+
this.list.add(name);
|
|
1584
1557
|
return this;
|
|
1585
1558
|
};
|
|
1586
1559
|
|
|
1587
1560
|
/**
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1561
|
+
* Remove class `name` when present, or
|
|
1562
|
+
* pass a regular expression to remove
|
|
1563
|
+
* any which match.
|
|
1564
|
+
*
|
|
1565
|
+
* @param {String|RegExp} name
|
|
1566
|
+
* @return {ClassList}
|
|
1567
|
+
* @api public
|
|
1568
|
+
*/
|
|
1596
1569
|
|
|
1597
1570
|
ClassList.prototype.remove = function(name) {
|
|
1598
|
-
if ('[object RegExp]'
|
|
1571
|
+
if ('[object RegExp]' == toString.call(name)) {
|
|
1599
1572
|
return this.removeMatching(name);
|
|
1600
1573
|
}
|
|
1601
1574
|
|
|
1602
|
-
|
|
1603
|
-
if (this.list) {
|
|
1604
|
-
this.list.remove(name);
|
|
1605
|
-
return this;
|
|
1606
|
-
}
|
|
1607
|
-
|
|
1608
|
-
// fallback
|
|
1609
|
-
var arr = this.array();
|
|
1610
|
-
var i = index(arr, name);
|
|
1611
|
-
if (~i) {
|
|
1612
|
-
arr.splice(i, 1);
|
|
1613
|
-
}
|
|
1614
|
-
this.el.className.baseVal = arr.join(' ');
|
|
1575
|
+
this.list.remove(name);
|
|
1615
1576
|
return this;
|
|
1616
1577
|
};
|
|
1617
1578
|
|
|
1618
1579
|
/**
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1580
|
+
* Remove all classes matching `re`.
|
|
1581
|
+
*
|
|
1582
|
+
* @param {RegExp} re
|
|
1583
|
+
* @return {ClassList}
|
|
1584
|
+
* @api private
|
|
1585
|
+
*/
|
|
1625
1586
|
|
|
1626
1587
|
ClassList.prototype.removeMatching = function(re) {
|
|
1627
|
-
|
|
1628
|
-
for (
|
|
1588
|
+
const arr = this.array();
|
|
1589
|
+
for (let i = 0; i < arr.length; i++) {
|
|
1629
1590
|
if (re.test(arr[i])) {
|
|
1630
1591
|
this.remove(arr[i]);
|
|
1631
1592
|
}
|
|
@@ -1634,81 +1595,51 @@
|
|
|
1634
1595
|
};
|
|
1635
1596
|
|
|
1636
1597
|
/**
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1598
|
+
* Toggle class `name`, can force state via `force`.
|
|
1599
|
+
*
|
|
1600
|
+
* For browsers that support classList, but do not support `force` yet,
|
|
1601
|
+
* the mistake will be detected and corrected.
|
|
1602
|
+
*
|
|
1603
|
+
* @param {String} name
|
|
1604
|
+
* @param {Boolean} force
|
|
1605
|
+
* @return {ClassList}
|
|
1606
|
+
* @api public
|
|
1607
|
+
*/
|
|
1647
1608
|
|
|
1648
1609
|
ClassList.prototype.toggle = function(name, force) {
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
if (force !== this.list.toggle(name, force)) {
|
|
1653
|
-
this.list.toggle(name); // toggle again to correct
|
|
1654
|
-
}
|
|
1655
|
-
} else {
|
|
1656
|
-
this.list.toggle(name);
|
|
1657
|
-
}
|
|
1658
|
-
return this;
|
|
1659
|
-
}
|
|
1660
|
-
|
|
1661
|
-
// fallback
|
|
1662
|
-
if (defined(force)) {
|
|
1663
|
-
if (!force) {
|
|
1664
|
-
this.remove(name);
|
|
1665
|
-
} else {
|
|
1666
|
-
this.add(name);
|
|
1610
|
+
if ('undefined' !== typeof force) {
|
|
1611
|
+
if (force !== this.list.toggle(name, force)) {
|
|
1612
|
+
this.list.toggle(name); // toggle again to correct
|
|
1667
1613
|
}
|
|
1668
1614
|
} else {
|
|
1669
|
-
|
|
1670
|
-
this.remove(name);
|
|
1671
|
-
} else {
|
|
1672
|
-
this.add(name);
|
|
1673
|
-
}
|
|
1615
|
+
this.list.toggle(name);
|
|
1674
1616
|
}
|
|
1675
|
-
|
|
1676
1617
|
return this;
|
|
1677
1618
|
};
|
|
1678
1619
|
|
|
1679
1620
|
/**
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1621
|
+
* Return an array of classes.
|
|
1622
|
+
*
|
|
1623
|
+
* @return {Array}
|
|
1624
|
+
* @api public
|
|
1625
|
+
*/
|
|
1685
1626
|
|
|
1686
1627
|
ClassList.prototype.array = function() {
|
|
1687
|
-
|
|
1688
|
-
var str = className.replace(/^\s+|\s+$/g, '');
|
|
1689
|
-
var arr = str.split(re);
|
|
1690
|
-
if ('' === arr[0]) {
|
|
1691
|
-
arr.shift();
|
|
1692
|
-
}
|
|
1693
|
-
return arr;
|
|
1628
|
+
return Array.from(this.list);
|
|
1694
1629
|
};
|
|
1695
1630
|
|
|
1696
1631
|
/**
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1632
|
+
* Check if class `name` is present.
|
|
1633
|
+
*
|
|
1634
|
+
* @param {String} name
|
|
1635
|
+
* @return {ClassList}
|
|
1636
|
+
* @api public
|
|
1637
|
+
*/
|
|
1703
1638
|
|
|
1704
1639
|
ClassList.prototype.has =
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
this.list.contains(name) :
|
|
1709
|
-
!! ~index(this.array(), name)
|
|
1710
|
-
);
|
|
1711
|
-
};
|
|
1640
|
+
ClassList.prototype.contains = function(name) {
|
|
1641
|
+
return this.list.contains(name);
|
|
1642
|
+
};
|
|
1712
1643
|
|
|
1713
1644
|
function remove$1(element) {
|
|
1714
1645
|
var parent = element.parentNode;
|
|
@@ -1764,6 +1695,7 @@
|
|
|
1764
1695
|
svg = SVG_START + svg.substring(4);
|
|
1765
1696
|
}
|
|
1766
1697
|
} else {
|
|
1698
|
+
|
|
1767
1699
|
// namespace svg
|
|
1768
1700
|
svg = SVG_START + '>' + svg + '</svg>';
|
|
1769
1701
|
unwrap = true;
|
|
@@ -1919,8 +1851,10 @@
|
|
|
1919
1851
|
var i, len, attrMap, attrNode, childNodes;
|
|
1920
1852
|
|
|
1921
1853
|
switch (node.nodeType) {
|
|
1854
|
+
|
|
1922
1855
|
// TEXT
|
|
1923
1856
|
case 3:
|
|
1857
|
+
|
|
1924
1858
|
// replace special XML characters
|
|
1925
1859
|
output.push(escape$1(node.textContent, TEXT_ENTITIES));
|
|
1926
1860
|
break;
|
|
@@ -1984,6 +1918,7 @@
|
|
|
1984
1918
|
}
|
|
1985
1919
|
|
|
1986
1920
|
if (!isFragment(parsed)) {
|
|
1921
|
+
|
|
1987
1922
|
// extract <svg> from parsed document
|
|
1988
1923
|
parsed = parsed.documentElement;
|
|
1989
1924
|
}
|
|
@@ -2080,7 +2015,7 @@
|
|
|
2080
2015
|
return transformList.consolidate();
|
|
2081
2016
|
}
|
|
2082
2017
|
|
|
2083
|
-
|
|
2018
|
+
const CLASS_PATTERN = /^class[ {]/;
|
|
2084
2019
|
|
|
2085
2020
|
|
|
2086
2021
|
/**
|
|
@@ -2098,7 +2033,7 @@
|
|
|
2098
2033
|
* @return {boolean}
|
|
2099
2034
|
*/
|
|
2100
2035
|
function isArray$1(obj) {
|
|
2101
|
-
return
|
|
2036
|
+
return Array.isArray(obj);
|
|
2102
2037
|
}
|
|
2103
2038
|
|
|
2104
2039
|
/**
|
|
@@ -2122,14 +2057,15 @@
|
|
|
2122
2057
|
*
|
|
2123
2058
|
* @return {T & InjectAnnotated}
|
|
2124
2059
|
*/
|
|
2125
|
-
function annotate() {
|
|
2126
|
-
var args = Array.prototype.slice.call(arguments);
|
|
2060
|
+
function annotate(...args) {
|
|
2127
2061
|
|
|
2128
2062
|
if (args.length === 1 && isArray$1(args[0])) {
|
|
2129
2063
|
args = args[0];
|
|
2130
2064
|
}
|
|
2131
2065
|
|
|
2132
|
-
|
|
2066
|
+
args = [ ...args ];
|
|
2067
|
+
|
|
2068
|
+
const fn = args.pop();
|
|
2133
2069
|
|
|
2134
2070
|
fn.$inject = args;
|
|
2135
2071
|
|
|
@@ -2150,9 +2086,9 @@
|
|
|
2150
2086
|
// first constructor(...) pattern found which may be the one
|
|
2151
2087
|
// of a nested class, too.
|
|
2152
2088
|
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2089
|
+
const CONSTRUCTOR_ARGS = /constructor\s*[^(]*\(\s*([^)]*)\)/m;
|
|
2090
|
+
const FN_ARGS = /^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m;
|
|
2091
|
+
const FN_ARG = /\/\*([^*]*)\*\//m;
|
|
2156
2092
|
|
|
2157
2093
|
/**
|
|
2158
2094
|
* @param {unknown} fn
|
|
@@ -2162,20 +2098,20 @@
|
|
|
2162
2098
|
function parseAnnotations(fn) {
|
|
2163
2099
|
|
|
2164
2100
|
if (typeof fn !== 'function') {
|
|
2165
|
-
throw new Error(
|
|
2101
|
+
throw new Error(`Cannot annotate "${fn}". Expected a function!`);
|
|
2166
2102
|
}
|
|
2167
2103
|
|
|
2168
|
-
|
|
2104
|
+
const match = fn.toString().match(isClass(fn) ? CONSTRUCTOR_ARGS : FN_ARGS);
|
|
2169
2105
|
|
|
2170
2106
|
// may parse class without constructor
|
|
2171
2107
|
if (!match) {
|
|
2172
2108
|
return [];
|
|
2173
2109
|
}
|
|
2174
2110
|
|
|
2175
|
-
|
|
2111
|
+
const args = match[1] || match[2];
|
|
2176
2112
|
|
|
2177
|
-
return args && args.split(',').map(
|
|
2178
|
-
|
|
2113
|
+
return args && args.split(',').map(arg => {
|
|
2114
|
+
const argMatch = arg.match(FN_ARG);
|
|
2179
2115
|
return (argMatch && argMatch[1] || arg).trim();
|
|
2180
2116
|
}) || [];
|
|
2181
2117
|
}
|
|
@@ -2200,21 +2136,21 @@
|
|
|
2200
2136
|
if (strict === false) {
|
|
2201
2137
|
return null;
|
|
2202
2138
|
} else {
|
|
2203
|
-
throw error(
|
|
2139
|
+
throw error(`No provider for "${ name }"!`);
|
|
2204
2140
|
}
|
|
2205
2141
|
}
|
|
2206
2142
|
};
|
|
2207
2143
|
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2144
|
+
const currentlyResolving = [];
|
|
2145
|
+
const providers = this._providers = Object.create(parent._providers || null);
|
|
2146
|
+
const instances = this._instances = Object.create(null);
|
|
2211
2147
|
|
|
2212
|
-
|
|
2148
|
+
const self = instances.injector = this;
|
|
2213
2149
|
|
|
2214
|
-
|
|
2215
|
-
|
|
2150
|
+
const error = function(msg) {
|
|
2151
|
+
const stack = currentlyResolving.join(' -> ');
|
|
2216
2152
|
currentlyResolving.length = 0;
|
|
2217
|
-
return new Error(stack ? msg
|
|
2153
|
+
return new Error(stack ? `${ msg } (Resolving: ${ stack })` : msg);
|
|
2218
2154
|
};
|
|
2219
2155
|
|
|
2220
2156
|
/**
|
|
@@ -2227,8 +2163,8 @@
|
|
|
2227
2163
|
*/
|
|
2228
2164
|
function get(name, strict) {
|
|
2229
2165
|
if (!providers[name] && name.indexOf('.') !== -1) {
|
|
2230
|
-
|
|
2231
|
-
|
|
2166
|
+
const parts = name.split('.');
|
|
2167
|
+
let pivot = get(parts.shift());
|
|
2232
2168
|
|
|
2233
2169
|
while (parts.length) {
|
|
2234
2170
|
pivot = pivot[parts.shift()];
|
|
@@ -2267,12 +2203,12 @@
|
|
|
2267
2203
|
if (isArray$1(fn)) {
|
|
2268
2204
|
fn = annotate(fn.slice());
|
|
2269
2205
|
} else {
|
|
2270
|
-
throw
|
|
2206
|
+
throw error(`Cannot invoke "${ fn }". Expected a function!`);
|
|
2271
2207
|
}
|
|
2272
2208
|
}
|
|
2273
2209
|
|
|
2274
|
-
|
|
2275
|
-
|
|
2210
|
+
const inject = fn.$inject || parseAnnotations(fn);
|
|
2211
|
+
const dependencies = inject.map(dep => {
|
|
2276
2212
|
if (hasOwnProp(locals, dep)) {
|
|
2277
2213
|
return locals[dep];
|
|
2278
2214
|
} else {
|
|
@@ -2287,22 +2223,22 @@
|
|
|
2287
2223
|
}
|
|
2288
2224
|
|
|
2289
2225
|
function instantiate(Type) {
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2226
|
+
const {
|
|
2227
|
+
fn,
|
|
2228
|
+
dependencies
|
|
2229
|
+
} = fnDef(Type);
|
|
2294
2230
|
|
|
2295
2231
|
// instantiate var args constructor
|
|
2296
|
-
|
|
2232
|
+
const Constructor = Function.prototype.bind.apply(fn, [ null ].concat(dependencies));
|
|
2297
2233
|
|
|
2298
2234
|
return new Constructor();
|
|
2299
2235
|
}
|
|
2300
2236
|
|
|
2301
2237
|
function invoke(func, context, locals) {
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2238
|
+
const {
|
|
2239
|
+
fn,
|
|
2240
|
+
dependencies
|
|
2241
|
+
} = fnDef(func, locals);
|
|
2306
2242
|
|
|
2307
2243
|
return fn.apply(context, dependencies);
|
|
2308
2244
|
}
|
|
@@ -2313,9 +2249,7 @@
|
|
|
2313
2249
|
* @return {Function}
|
|
2314
2250
|
*/
|
|
2315
2251
|
function createPrivateInjectorFactory(childInjector) {
|
|
2316
|
-
return annotate(
|
|
2317
|
-
return childInjector.get(key);
|
|
2318
|
-
});
|
|
2252
|
+
return annotate(key => childInjector.get(key));
|
|
2319
2253
|
}
|
|
2320
2254
|
|
|
2321
2255
|
/**
|
|
@@ -2326,18 +2260,19 @@
|
|
|
2326
2260
|
*/
|
|
2327
2261
|
function createChild(modules, forceNewInstances) {
|
|
2328
2262
|
if (forceNewInstances && forceNewInstances.length) {
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2263
|
+
const fromParentModule = Object.create(null);
|
|
2264
|
+
const matchedScopes = Object.create(null);
|
|
2265
|
+
|
|
2266
|
+
const privateInjectorsCache = [];
|
|
2267
|
+
const privateChildInjectors = [];
|
|
2268
|
+
const privateChildFactories = [];
|
|
2269
|
+
|
|
2270
|
+
let provider;
|
|
2271
|
+
let cacheIdx;
|
|
2272
|
+
let privateChildInjector;
|
|
2273
|
+
let privateChildInjectorFactory;
|
|
2274
|
+
|
|
2275
|
+
for (let name in providers) {
|
|
2341
2276
|
provider = providers[name];
|
|
2342
2277
|
|
|
2343
2278
|
if (forceNewInstances.indexOf(name) !== -1) {
|
|
@@ -2361,7 +2296,7 @@
|
|
|
2361
2296
|
|
|
2362
2297
|
if ((provider[2] === 'factory' || provider[2] === 'type') && provider[1].$scope) {
|
|
2363
2298
|
/* jshint -W083 */
|
|
2364
|
-
forceNewInstances.forEach(
|
|
2299
|
+
forceNewInstances.forEach(scope => {
|
|
2365
2300
|
if (provider[1].$scope.indexOf(scope) !== -1) {
|
|
2366
2301
|
fromParentModule[name] = [ provider[2], provider[1] ];
|
|
2367
2302
|
matchedScopes[scope] = true;
|
|
@@ -2370,7 +2305,7 @@
|
|
|
2370
2305
|
}
|
|
2371
2306
|
}
|
|
2372
2307
|
|
|
2373
|
-
forceNewInstances.forEach(
|
|
2308
|
+
forceNewInstances.forEach(scope => {
|
|
2374
2309
|
if (!matchedScopes[scope]) {
|
|
2375
2310
|
throw new Error('No provider for "' + scope + '". Cannot use provider from the parent!');
|
|
2376
2311
|
}
|
|
@@ -2382,7 +2317,7 @@
|
|
|
2382
2317
|
return new Injector(modules, self);
|
|
2383
2318
|
}
|
|
2384
2319
|
|
|
2385
|
-
|
|
2320
|
+
const factoryMap = {
|
|
2386
2321
|
factory: invoke,
|
|
2387
2322
|
type: instantiate,
|
|
2388
2323
|
value: function(value) {
|
|
@@ -2396,10 +2331,10 @@
|
|
|
2396
2331
|
*/
|
|
2397
2332
|
function createInitializer(moduleDefinition, injector) {
|
|
2398
2333
|
|
|
2399
|
-
|
|
2334
|
+
const initializers = moduleDefinition.__init__ || [];
|
|
2400
2335
|
|
|
2401
2336
|
return function() {
|
|
2402
|
-
initializers.forEach(
|
|
2337
|
+
initializers.forEach(initializer => {
|
|
2403
2338
|
|
|
2404
2339
|
// eagerly resolve component (fn or string)
|
|
2405
2340
|
if (typeof initializer === 'string') {
|
|
@@ -2416,13 +2351,13 @@
|
|
|
2416
2351
|
*/
|
|
2417
2352
|
function loadModule(moduleDefinition) {
|
|
2418
2353
|
|
|
2419
|
-
|
|
2354
|
+
const moduleExports = moduleDefinition.__exports__;
|
|
2420
2355
|
|
|
2421
2356
|
// private module
|
|
2422
2357
|
if (moduleExports) {
|
|
2423
|
-
|
|
2358
|
+
const nestedModules = moduleDefinition.__modules__;
|
|
2424
2359
|
|
|
2425
|
-
|
|
2360
|
+
const clonedModule = Object.keys(moduleDefinition).reduce((clonedModule, key) => {
|
|
2426
2361
|
|
|
2427
2362
|
if (key !== '__exports__' && key !== '__modules__' && key !== '__init__' && key !== '__depends__') {
|
|
2428
2363
|
clonedModule[key] = moduleDefinition[key];
|
|
@@ -2431,10 +2366,10 @@
|
|
|
2431
2366
|
return clonedModule;
|
|
2432
2367
|
}, Object.create(null));
|
|
2433
2368
|
|
|
2434
|
-
|
|
2369
|
+
const childModules = (nestedModules || []).concat(clonedModule);
|
|
2435
2370
|
|
|
2436
|
-
|
|
2437
|
-
|
|
2371
|
+
const privateInjector = createChild(childModules);
|
|
2372
|
+
const getFromPrivateInjector = annotate(function(key) {
|
|
2438
2373
|
return privateInjector.get(key);
|
|
2439
2374
|
});
|
|
2440
2375
|
|
|
@@ -2443,7 +2378,7 @@
|
|
|
2443
2378
|
});
|
|
2444
2379
|
|
|
2445
2380
|
// ensure child injector initializes
|
|
2446
|
-
|
|
2381
|
+
const initializers = (moduleDefinition.__init__ || []).slice();
|
|
2447
2382
|
|
|
2448
2383
|
initializers.unshift(function() {
|
|
2449
2384
|
privateInjector.init();
|
|
@@ -2468,8 +2403,8 @@
|
|
|
2468
2403
|
return;
|
|
2469
2404
|
}
|
|
2470
2405
|
|
|
2471
|
-
|
|
2472
|
-
|
|
2406
|
+
const type = moduleDefinition[key][0];
|
|
2407
|
+
const value = moduleDefinition[key][1];
|
|
2473
2408
|
|
|
2474
2409
|
providers[key] = [ factoryMap[type], arrayUnwrap(type, value), type ];
|
|
2475
2410
|
});
|
|
@@ -2505,11 +2440,11 @@
|
|
|
2505
2440
|
*/
|
|
2506
2441
|
function bootstrap(moduleDefinitions) {
|
|
2507
2442
|
|
|
2508
|
-
|
|
2443
|
+
const initializers = moduleDefinitions
|
|
2509
2444
|
.reduce(resolveDependencies, [])
|
|
2510
2445
|
.map(loadModule);
|
|
2511
2446
|
|
|
2512
|
-
|
|
2447
|
+
let initialized = false;
|
|
2513
2448
|
|
|
2514
2449
|
return function() {
|
|
2515
2450
|
|
|
@@ -2519,9 +2454,7 @@
|
|
|
2519
2454
|
|
|
2520
2455
|
initialized = true;
|
|
2521
2456
|
|
|
2522
|
-
initializers.forEach(
|
|
2523
|
-
return initializer();
|
|
2524
|
-
});
|
|
2457
|
+
initializers.forEach(initializer => initializer());
|
|
2525
2458
|
};
|
|
2526
2459
|
}
|
|
2527
2460
|
|
|
@@ -3005,7 +2938,7 @@
|
|
|
3005
2938
|
// helpers ///////////////////////////////
|
|
3006
2939
|
|
|
3007
2940
|
function copyObject(src1, src2) {
|
|
3008
|
-
return assign({}, src1 || {}, src2 || {});
|
|
2941
|
+
return assign$1({}, src1 || {}, src2 || {});
|
|
3009
2942
|
}
|
|
3010
2943
|
|
|
3011
2944
|
// apply default renderer with lowest possible priority
|
|
@@ -3046,9 +2979,9 @@
|
|
|
3046
2979
|
});
|
|
3047
2980
|
|
|
3048
2981
|
if (isFrameElement$1(element)) {
|
|
3049
|
-
attr(rect, assign({}, this.FRAME_STYLE, attrs || {}));
|
|
2982
|
+
attr(rect, assign$1({}, this.FRAME_STYLE, attrs || {}));
|
|
3050
2983
|
} else {
|
|
3051
|
-
attr(rect, assign({}, this.SHAPE_STYLE, attrs || {}));
|
|
2984
|
+
attr(rect, assign$1({}, this.SHAPE_STYLE, attrs || {}));
|
|
3052
2985
|
}
|
|
3053
2986
|
|
|
3054
2987
|
append(visuals, rect);
|
|
@@ -3058,7 +2991,7 @@
|
|
|
3058
2991
|
|
|
3059
2992
|
DefaultRenderer.prototype.drawConnection = function drawConnection(visuals, connection, attrs) {
|
|
3060
2993
|
|
|
3061
|
-
var line = createLine(connection.waypoints, assign({}, this.CONNECTION_STYLE, attrs || {}));
|
|
2994
|
+
var line = createLine(connection.waypoints, assign$1({}, this.CONNECTION_STYLE, attrs || {}));
|
|
3062
2995
|
append(visuals, line);
|
|
3063
2996
|
|
|
3064
2997
|
return line;
|
|
@@ -3134,7 +3067,7 @@
|
|
|
3134
3067
|
this.cls = function(className, traits, additionalAttrs) {
|
|
3135
3068
|
var attrs = this.style(traits, additionalAttrs);
|
|
3136
3069
|
|
|
3137
|
-
return assign(attrs, { 'class': className });
|
|
3070
|
+
return assign$1(attrs, { 'class': className });
|
|
3138
3071
|
};
|
|
3139
3072
|
|
|
3140
3073
|
/**
|
|
@@ -3153,10 +3086,10 @@
|
|
|
3153
3086
|
}
|
|
3154
3087
|
|
|
3155
3088
|
var attrs = reduce(traits, function(attrs, t) {
|
|
3156
|
-
return assign(attrs, defaultTraits[t] || {});
|
|
3089
|
+
return assign$1(attrs, defaultTraits[t] || {});
|
|
3157
3090
|
}, {});
|
|
3158
3091
|
|
|
3159
|
-
return additionalAttrs ? assign(attrs, additionalAttrs) : attrs;
|
|
3092
|
+
return additionalAttrs ? assign$1(attrs, additionalAttrs) : attrs;
|
|
3160
3093
|
};
|
|
3161
3094
|
|
|
3162
3095
|
this.computeStyle = function(custom, traits, defaultStyles) {
|
|
@@ -3165,7 +3098,7 @@
|
|
|
3165
3098
|
traits = [];
|
|
3166
3099
|
}
|
|
3167
3100
|
|
|
3168
|
-
return self.style(traits || [], assign({}, defaultStyles, custom || {}));
|
|
3101
|
+
return self.style(traits || [], assign$1({}, defaultStyles, custom || {}));
|
|
3169
3102
|
};
|
|
3170
3103
|
}
|
|
3171
3104
|
|
|
@@ -4649,17 +4582,17 @@
|
|
|
4649
4582
|
*/
|
|
4650
4583
|
function createContainer(options) {
|
|
4651
4584
|
|
|
4652
|
-
options = assign({}, { width: '100%', height: '100%' }, options);
|
|
4585
|
+
options = assign$1({}, { width: '100%', height: '100%' }, options);
|
|
4653
4586
|
|
|
4654
|
-
|
|
4587
|
+
const container = options.container || document.body;
|
|
4655
4588
|
|
|
4656
4589
|
// create a <div> around the svg element with the respective size
|
|
4657
4590
|
// this way we can always get the correct container size
|
|
4658
4591
|
// (this is impossible for <svg> elements at the moment)
|
|
4659
|
-
|
|
4592
|
+
const parent = document.createElement('div');
|
|
4660
4593
|
parent.setAttribute('class', 'djs-container');
|
|
4661
4594
|
|
|
4662
|
-
assign
|
|
4595
|
+
assign(parent, {
|
|
4663
4596
|
position: 'relative',
|
|
4664
4597
|
overflow: 'hidden',
|
|
4665
4598
|
width: ensurePx(options.width),
|
|
@@ -4672,10 +4605,10 @@
|
|
|
4672
4605
|
}
|
|
4673
4606
|
|
|
4674
4607
|
function createGroup(parent, cls, childIndex) {
|
|
4675
|
-
|
|
4608
|
+
const group = create$1('g');
|
|
4676
4609
|
classes(group).add(cls);
|
|
4677
4610
|
|
|
4678
|
-
|
|
4611
|
+
const index = childIndex !== undefined ? childIndex : parent.childNodes.length - 1;
|
|
4679
4612
|
|
|
4680
4613
|
// must ensure second argument is node or _null_
|
|
4681
4614
|
// cf. https://developer.mozilla.org/en-US/docs/Web/API/Node/insertBefore
|
|
@@ -4684,14 +4617,14 @@
|
|
|
4684
4617
|
return group;
|
|
4685
4618
|
}
|
|
4686
4619
|
|
|
4687
|
-
|
|
4620
|
+
const BASE_LAYER = 'base';
|
|
4688
4621
|
|
|
4689
4622
|
// render plane contents behind utility layers
|
|
4690
|
-
|
|
4691
|
-
|
|
4623
|
+
const PLANE_LAYER_INDEX = 0;
|
|
4624
|
+
const UTILITY_LAYER_INDEX = 1;
|
|
4692
4625
|
|
|
4693
4626
|
|
|
4694
|
-
|
|
4627
|
+
const REQUIRED_MODEL_ATTRS = {
|
|
4695
4628
|
shape: [ 'x', 'y', 'width', 'height' ],
|
|
4696
4629
|
connection: [ 'waypoints' ]
|
|
4697
4630
|
};
|
|
@@ -4746,22 +4679,22 @@
|
|
|
4746
4679
|
*/
|
|
4747
4680
|
Canvas.prototype._init = function(config) {
|
|
4748
4681
|
|
|
4749
|
-
|
|
4682
|
+
const eventBus = this._eventBus;
|
|
4750
4683
|
|
|
4751
4684
|
// html container
|
|
4752
|
-
|
|
4685
|
+
const container = this._container = createContainer(config);
|
|
4753
4686
|
|
|
4754
|
-
|
|
4687
|
+
const svg = this._svg = create$1('svg');
|
|
4755
4688
|
attr(svg, { width: '100%', height: '100%' });
|
|
4756
4689
|
|
|
4757
4690
|
append(container, svg);
|
|
4758
4691
|
|
|
4759
|
-
|
|
4692
|
+
const viewport = this._viewport = createGroup(svg, 'viewport');
|
|
4760
4693
|
|
|
4761
4694
|
// debounce canvas.viewbox.changed events
|
|
4762
4695
|
// for smoother diagram interaction
|
|
4763
4696
|
if (config.deferUpdate !== false) {
|
|
4764
|
-
this._viewboxChanged = debounce(bind(this._viewboxChanged, this), 300);
|
|
4697
|
+
this._viewboxChanged = debounce(bind$2(this._viewboxChanged, this), 300);
|
|
4765
4698
|
}
|
|
4766
4699
|
|
|
4767
4700
|
eventBus.on('diagram.init', function() {
|
|
@@ -4807,7 +4740,7 @@
|
|
|
4807
4740
|
viewport: this._viewport
|
|
4808
4741
|
});
|
|
4809
4742
|
|
|
4810
|
-
|
|
4743
|
+
const parent = this._container.parentNode;
|
|
4811
4744
|
|
|
4812
4745
|
if (parent) {
|
|
4813
4746
|
parent.removeChild(this._container);
|
|
@@ -4823,18 +4756,16 @@
|
|
|
4823
4756
|
|
|
4824
4757
|
Canvas.prototype._clear = function() {
|
|
4825
4758
|
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
var allElements = this._elementRegistry.getAll();
|
|
4759
|
+
const allElements = this._elementRegistry.getAll();
|
|
4829
4760
|
|
|
4830
4761
|
// remove all elements
|
|
4831
|
-
allElements.forEach(
|
|
4832
|
-
|
|
4762
|
+
allElements.forEach(element => {
|
|
4763
|
+
const type = getType(element);
|
|
4833
4764
|
|
|
4834
4765
|
if (type === 'root') {
|
|
4835
|
-
|
|
4766
|
+
this.removeRootElement(element);
|
|
4836
4767
|
} else {
|
|
4837
|
-
|
|
4768
|
+
this._removeElement(element, type);
|
|
4838
4769
|
}
|
|
4839
4770
|
});
|
|
4840
4771
|
|
|
@@ -4877,7 +4808,7 @@
|
|
|
4877
4808
|
throw new Error('must specify a name');
|
|
4878
4809
|
}
|
|
4879
4810
|
|
|
4880
|
-
|
|
4811
|
+
let layer = this._layers[name];
|
|
4881
4812
|
|
|
4882
4813
|
if (!layer) {
|
|
4883
4814
|
layer = this._layers[name] = this._createLayer(name, index);
|
|
@@ -4925,7 +4856,7 @@
|
|
|
4925
4856
|
index = UTILITY_LAYER_INDEX;
|
|
4926
4857
|
}
|
|
4927
4858
|
|
|
4928
|
-
|
|
4859
|
+
const childIndex = this._getChildIndex(index);
|
|
4929
4860
|
|
|
4930
4861
|
return {
|
|
4931
4862
|
group: createGroup(this._viewport, 'layer-' + name, childIndex),
|
|
@@ -4947,21 +4878,21 @@
|
|
|
4947
4878
|
throw new Error('must specify a name');
|
|
4948
4879
|
}
|
|
4949
4880
|
|
|
4950
|
-
|
|
4881
|
+
const layer = this._layers[name];
|
|
4951
4882
|
|
|
4952
4883
|
if (!layer) {
|
|
4953
4884
|
throw new Error('layer <' + name + '> does not exist');
|
|
4954
4885
|
}
|
|
4955
4886
|
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4887
|
+
const viewport = this._viewport;
|
|
4888
|
+
const group = layer.group;
|
|
4889
|
+
const index = layer.index;
|
|
4959
4890
|
|
|
4960
4891
|
if (layer.visible) {
|
|
4961
4892
|
return group;
|
|
4962
4893
|
}
|
|
4963
4894
|
|
|
4964
|
-
|
|
4895
|
+
const childIndex = this._getChildIndex(index);
|
|
4965
4896
|
|
|
4966
4897
|
viewport.insertBefore(group, viewport.childNodes[childIndex] || null);
|
|
4967
4898
|
|
|
@@ -4982,13 +4913,13 @@
|
|
|
4982
4913
|
throw new Error('must specify a name');
|
|
4983
4914
|
}
|
|
4984
4915
|
|
|
4985
|
-
|
|
4916
|
+
const layer = this._layers[name];
|
|
4986
4917
|
|
|
4987
4918
|
if (!layer) {
|
|
4988
4919
|
throw new Error('layer <' + name + '> does not exist');
|
|
4989
4920
|
}
|
|
4990
4921
|
|
|
4991
|
-
|
|
4922
|
+
const group = layer.group;
|
|
4992
4923
|
|
|
4993
4924
|
if (!layer.visible) {
|
|
4994
4925
|
return group;
|
|
@@ -5004,7 +4935,7 @@
|
|
|
5004
4935
|
|
|
5005
4936
|
Canvas.prototype._removeLayer = function(name) {
|
|
5006
4937
|
|
|
5007
|
-
|
|
4938
|
+
const layer = this._layers[name];
|
|
5008
4939
|
|
|
5009
4940
|
if (layer) {
|
|
5010
4941
|
delete this._layers[name];
|
|
@@ -5019,7 +4950,7 @@
|
|
|
5019
4950
|
* @returns {SVGElement|null}
|
|
5020
4951
|
*/
|
|
5021
4952
|
Canvas.prototype.getActiveLayer = function() {
|
|
5022
|
-
|
|
4953
|
+
const plane = this._findPlaneForRoot(this.getRootElement());
|
|
5023
4954
|
|
|
5024
4955
|
if (!plane) {
|
|
5025
4956
|
return null;
|
|
@@ -5045,7 +4976,7 @@
|
|
|
5045
4976
|
return;
|
|
5046
4977
|
}
|
|
5047
4978
|
|
|
5048
|
-
|
|
4979
|
+
const plane = this._findPlaneForRoot(
|
|
5049
4980
|
findRoot(element)
|
|
5050
4981
|
) || {};
|
|
5051
4982
|
|
|
@@ -5084,7 +5015,7 @@
|
|
|
5084
5015
|
// markers //////////////////////
|
|
5085
5016
|
|
|
5086
5017
|
Canvas.prototype._updateMarker = function(element, marker, add) {
|
|
5087
|
-
|
|
5018
|
+
let container;
|
|
5088
5019
|
|
|
5089
5020
|
if (!element.id) {
|
|
5090
5021
|
element = this._elementRegistry.get(element);
|
|
@@ -5132,7 +5063,7 @@
|
|
|
5132
5063
|
* @example
|
|
5133
5064
|
* canvas.addMarker('foo', 'some-marker');
|
|
5134
5065
|
*
|
|
5135
|
-
*
|
|
5066
|
+
* const fooGfx = canvas.getGraphics('foo');
|
|
5136
5067
|
*
|
|
5137
5068
|
* fooGfx; // <g class="... some-marker"> ... </g>
|
|
5138
5069
|
*
|
|
@@ -5168,7 +5099,7 @@
|
|
|
5168
5099
|
element = this._elementRegistry.get(element);
|
|
5169
5100
|
}
|
|
5170
5101
|
|
|
5171
|
-
|
|
5102
|
+
const gfx = this.getGraphics(element);
|
|
5172
5103
|
|
|
5173
5104
|
return classes(gfx).has(marker);
|
|
5174
5105
|
};
|
|
@@ -5206,7 +5137,7 @@
|
|
|
5206
5137
|
* @returns {Object|djs.model.Root|null} rootElement.
|
|
5207
5138
|
*/
|
|
5208
5139
|
Canvas.prototype.getRootElement = function() {
|
|
5209
|
-
|
|
5140
|
+
const rootElement = this._rootElement;
|
|
5210
5141
|
|
|
5211
5142
|
// can return null if root elements are present but none was set yet
|
|
5212
5143
|
if (rootElement || this._planes.length) {
|
|
@@ -5225,7 +5156,7 @@
|
|
|
5225
5156
|
*/
|
|
5226
5157
|
|
|
5227
5158
|
Canvas.prototype.addRootElement = function(rootElement) {
|
|
5228
|
-
|
|
5159
|
+
const idx = this._rootsIdx++;
|
|
5229
5160
|
|
|
5230
5161
|
if (!rootElement) {
|
|
5231
5162
|
rootElement = {
|
|
@@ -5235,11 +5166,11 @@
|
|
|
5235
5166
|
};
|
|
5236
5167
|
}
|
|
5237
5168
|
|
|
5238
|
-
|
|
5169
|
+
const layerName = rootElement.layer = 'root-' + idx;
|
|
5239
5170
|
|
|
5240
5171
|
this._ensureValid('root', rootElement);
|
|
5241
5172
|
|
|
5242
|
-
|
|
5173
|
+
const layer = this.getLayer(layerName, PLANE_LAYER_INDEX);
|
|
5243
5174
|
|
|
5244
5175
|
this.hideLayer(layerName);
|
|
5245
5176
|
|
|
@@ -5266,7 +5197,7 @@
|
|
|
5266
5197
|
rootElement = this._elementRegistry.get(rootElement);
|
|
5267
5198
|
}
|
|
5268
5199
|
|
|
5269
|
-
|
|
5200
|
+
const plane = this._findPlaneForRoot(rootElement);
|
|
5270
5201
|
|
|
5271
5202
|
if (!plane) {
|
|
5272
5203
|
return;
|
|
@@ -5312,7 +5243,7 @@
|
|
|
5312
5243
|
return;
|
|
5313
5244
|
}
|
|
5314
5245
|
|
|
5315
|
-
|
|
5246
|
+
let plane;
|
|
5316
5247
|
|
|
5317
5248
|
if (!rootElement) {
|
|
5318
5249
|
throw new Error('rootElement required');
|
|
@@ -5332,8 +5263,8 @@
|
|
|
5332
5263
|
|
|
5333
5264
|
|
|
5334
5265
|
Canvas.prototype._removeRoot = function(element) {
|
|
5335
|
-
|
|
5336
|
-
|
|
5266
|
+
const elementRegistry = this._elementRegistry,
|
|
5267
|
+
eventBus = this._eventBus;
|
|
5337
5268
|
|
|
5338
5269
|
// simulate element remove event sequence
|
|
5339
5270
|
eventBus.fire('root.remove', { element: element });
|
|
@@ -5344,8 +5275,8 @@
|
|
|
5344
5275
|
|
|
5345
5276
|
|
|
5346
5277
|
Canvas.prototype._addRoot = function(element, gfx) {
|
|
5347
|
-
|
|
5348
|
-
|
|
5278
|
+
const elementRegistry = this._elementRegistry,
|
|
5279
|
+
eventBus = this._eventBus;
|
|
5349
5280
|
|
|
5350
5281
|
// resemble element add event sequence
|
|
5351
5282
|
eventBus.fire('root.add', { element: element });
|
|
@@ -5358,7 +5289,7 @@
|
|
|
5358
5289
|
|
|
5359
5290
|
Canvas.prototype._setRoot = function(rootElement, layer) {
|
|
5360
5291
|
|
|
5361
|
-
|
|
5292
|
+
const currentRoot = this._rootElement;
|
|
5362
5293
|
|
|
5363
5294
|
if (currentRoot) {
|
|
5364
5295
|
|
|
@@ -5398,9 +5329,9 @@
|
|
|
5398
5329
|
throw new Error('element <' + element.id + '> already exists');
|
|
5399
5330
|
}
|
|
5400
5331
|
|
|
5401
|
-
|
|
5332
|
+
const requiredAttrs = REQUIRED_MODEL_ATTRS[type];
|
|
5402
5333
|
|
|
5403
|
-
|
|
5334
|
+
const valid = every(requiredAttrs, function(attr) {
|
|
5404
5335
|
return typeof element[attr] !== 'undefined';
|
|
5405
5336
|
});
|
|
5406
5337
|
|
|
@@ -5439,8 +5370,8 @@
|
|
|
5439
5370
|
|
|
5440
5371
|
parent = parent || this.getRootElement();
|
|
5441
5372
|
|
|
5442
|
-
|
|
5443
|
-
|
|
5373
|
+
const eventBus = this._eventBus,
|
|
5374
|
+
graphicsFactory = this._graphicsFactory;
|
|
5444
5375
|
|
|
5445
5376
|
this._ensureValid(type, element);
|
|
5446
5377
|
|
|
@@ -5449,7 +5380,7 @@
|
|
|
5449
5380
|
this._setParent(element, parent, parentIndex);
|
|
5450
5381
|
|
|
5451
5382
|
// create graphics
|
|
5452
|
-
|
|
5383
|
+
const gfx = graphicsFactory.create(type, element, parentIndex);
|
|
5453
5384
|
|
|
5454
5385
|
this._elementRegistry.add(element, gfx);
|
|
5455
5386
|
|
|
@@ -5493,9 +5424,9 @@
|
|
|
5493
5424
|
*/
|
|
5494
5425
|
Canvas.prototype._removeElement = function(element, type) {
|
|
5495
5426
|
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5427
|
+
const elementRegistry = this._elementRegistry,
|
|
5428
|
+
graphicsFactory = this._graphicsFactory,
|
|
5429
|
+
eventBus = this._eventBus;
|
|
5499
5430
|
|
|
5500
5431
|
element = elementRegistry.get(element.id || element);
|
|
5501
5432
|
|
|
@@ -5644,7 +5575,7 @@
|
|
|
5644
5575
|
* // sets the visible area of the diagram to (100|100) -> (600|100)
|
|
5645
5576
|
* // and and scales it according to the diagram width
|
|
5646
5577
|
*
|
|
5647
|
-
*
|
|
5578
|
+
* const viewbox = canvas.viewbox(); // pass `false` to force recomputing the box.
|
|
5648
5579
|
*
|
|
5649
5580
|
* console.log(viewbox);
|
|
5650
5581
|
* // {
|
|
@@ -5658,7 +5589,7 @@
|
|
|
5658
5589
|
* // if the current diagram is zoomed and scrolled, you may reset it to the
|
|
5659
5590
|
* // default zoom via this method, too:
|
|
5660
5591
|
*
|
|
5661
|
-
*
|
|
5592
|
+
* const zoomedAndScrolledViewbox = canvas.viewbox();
|
|
5662
5593
|
*
|
|
5663
5594
|
* canvas.viewbox({
|
|
5664
5595
|
* x: 0,
|
|
@@ -5681,9 +5612,9 @@
|
|
|
5681
5612
|
return this._cachedViewbox;
|
|
5682
5613
|
}
|
|
5683
5614
|
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5615
|
+
const viewport = this._viewport,
|
|
5616
|
+
outerBox = this.getSize();
|
|
5617
|
+
let innerBox,
|
|
5687
5618
|
matrix,
|
|
5688
5619
|
activeLayer,
|
|
5689
5620
|
transform,
|
|
@@ -5727,7 +5658,7 @@
|
|
|
5727
5658
|
this._changeViewbox(function() {
|
|
5728
5659
|
scale = Math.min(outerBox.width / box.width, outerBox.height / box.height);
|
|
5729
5660
|
|
|
5730
|
-
|
|
5661
|
+
const matrix = this._svg.createSVGMatrix()
|
|
5731
5662
|
.scale(scale)
|
|
5732
5663
|
.translate(-box.x, -box.y);
|
|
5733
5664
|
|
|
@@ -5749,12 +5680,12 @@
|
|
|
5749
5680
|
*/
|
|
5750
5681
|
Canvas.prototype.scroll = function(delta) {
|
|
5751
5682
|
|
|
5752
|
-
|
|
5753
|
-
|
|
5683
|
+
const node = this._viewport;
|
|
5684
|
+
let matrix = node.getCTM();
|
|
5754
5685
|
|
|
5755
5686
|
if (delta) {
|
|
5756
5687
|
this._changeViewbox(function() {
|
|
5757
|
-
delta = assign({ dx: 0, dy: 0 }, delta || {});
|
|
5688
|
+
delta = assign$1({ dx: 0, dy: 0 }, delta || {});
|
|
5758
5689
|
|
|
5759
5690
|
matrix = this._svg.createSVGMatrix().translate(delta.dx, delta.dy).multiply(matrix);
|
|
5760
5691
|
|
|
@@ -5774,14 +5705,14 @@
|
|
|
5774
5705
|
*
|
|
5775
5706
|
*/
|
|
5776
5707
|
Canvas.prototype.scrollToElement = function(element, padding) {
|
|
5777
|
-
|
|
5708
|
+
let defaultPadding = 100;
|
|
5778
5709
|
|
|
5779
5710
|
if (typeof element === 'string') {
|
|
5780
5711
|
element = this._elementRegistry.get(element);
|
|
5781
5712
|
}
|
|
5782
5713
|
|
|
5783
5714
|
// set to correct rootElement
|
|
5784
|
-
|
|
5715
|
+
const rootElement = this.findRoot(element);
|
|
5785
5716
|
|
|
5786
5717
|
if (rootElement !== this.getRootElement()) {
|
|
5787
5718
|
this.setRootElement(rootElement);
|
|
@@ -5801,11 +5732,11 @@
|
|
|
5801
5732
|
left: padding.left || defaultPadding
|
|
5802
5733
|
};
|
|
5803
5734
|
|
|
5804
|
-
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
|
|
5735
|
+
const elementBounds = getBBox(element),
|
|
5736
|
+
elementTrbl = asTRBL(elementBounds),
|
|
5737
|
+
viewboxBounds = this.viewbox(),
|
|
5738
|
+
zoom = this.zoom();
|
|
5739
|
+
let dx, dy;
|
|
5809
5740
|
|
|
5810
5741
|
// shrink viewboxBounds with padding
|
|
5811
5742
|
viewboxBounds.y += padding.top / zoom;
|
|
@@ -5813,9 +5744,9 @@
|
|
|
5813
5744
|
viewboxBounds.width -= (padding.right + padding.left) / zoom;
|
|
5814
5745
|
viewboxBounds.height -= (padding.bottom + padding.top) / zoom;
|
|
5815
5746
|
|
|
5816
|
-
|
|
5747
|
+
const viewboxTrbl = asTRBL(viewboxBounds);
|
|
5817
5748
|
|
|
5818
|
-
|
|
5749
|
+
const canFit = elementBounds.width < viewboxBounds.width && elementBounds.height < viewboxBounds.height;
|
|
5819
5750
|
|
|
5820
5751
|
if (!canFit) {
|
|
5821
5752
|
|
|
@@ -5825,10 +5756,10 @@
|
|
|
5825
5756
|
|
|
5826
5757
|
} else {
|
|
5827
5758
|
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5759
|
+
const dRight = Math.max(0, elementTrbl.right - viewboxTrbl.right),
|
|
5760
|
+
dLeft = Math.min(0, elementTrbl.left - viewboxTrbl.left),
|
|
5761
|
+
dBottom = Math.max(0, elementTrbl.bottom - viewboxTrbl.bottom),
|
|
5762
|
+
dTop = Math.min(0, elementTrbl.top - viewboxTrbl.top);
|
|
5832
5763
|
|
|
5833
5764
|
dx = dRight || dLeft;
|
|
5834
5765
|
dy = dBottom || dTop;
|
|
@@ -5861,7 +5792,7 @@
|
|
|
5861
5792
|
return this._fitViewport(center);
|
|
5862
5793
|
}
|
|
5863
5794
|
|
|
5864
|
-
|
|
5795
|
+
let outer,
|
|
5865
5796
|
matrix;
|
|
5866
5797
|
|
|
5867
5798
|
this._changeViewbox(function() {
|
|
@@ -5882,16 +5813,16 @@
|
|
|
5882
5813
|
};
|
|
5883
5814
|
|
|
5884
5815
|
function setCTM(node, m) {
|
|
5885
|
-
|
|
5816
|
+
const mstr = 'matrix(' + m.a + ',' + m.b + ',' + m.c + ',' + m.d + ',' + m.e + ',' + m.f + ')';
|
|
5886
5817
|
node.setAttribute('transform', mstr);
|
|
5887
5818
|
}
|
|
5888
5819
|
|
|
5889
5820
|
Canvas.prototype._fitViewport = function(center) {
|
|
5890
5821
|
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5822
|
+
const vbox = this.viewbox(),
|
|
5823
|
+
outer = vbox.outer,
|
|
5824
|
+
inner = vbox.inner;
|
|
5825
|
+
let newScale,
|
|
5895
5826
|
newViewbox;
|
|
5896
5827
|
|
|
5897
5828
|
// display the complete diagram without zooming in.
|
|
@@ -5932,13 +5863,13 @@
|
|
|
5932
5863
|
|
|
5933
5864
|
Canvas.prototype._setZoom = function(scale, center) {
|
|
5934
5865
|
|
|
5935
|
-
|
|
5936
|
-
|
|
5866
|
+
const svg = this._svg,
|
|
5867
|
+
viewport = this._viewport;
|
|
5937
5868
|
|
|
5938
|
-
|
|
5939
|
-
|
|
5869
|
+
const matrix = svg.createSVGMatrix();
|
|
5870
|
+
const point = svg.createSVGPoint();
|
|
5940
5871
|
|
|
5941
|
-
|
|
5872
|
+
let centerPoint,
|
|
5942
5873
|
originalPoint,
|
|
5943
5874
|
currentMatrix,
|
|
5944
5875
|
scaleMatrix,
|
|
@@ -5946,10 +5877,10 @@
|
|
|
5946
5877
|
|
|
5947
5878
|
currentMatrix = viewport.getCTM();
|
|
5948
5879
|
|
|
5949
|
-
|
|
5880
|
+
const currentScale = currentMatrix.a;
|
|
5950
5881
|
|
|
5951
5882
|
if (center) {
|
|
5952
|
-
centerPoint = assign(point, center);
|
|
5883
|
+
centerPoint = assign$1(point, center);
|
|
5953
5884
|
|
|
5954
5885
|
// revert applied viewport transformations
|
|
5955
5886
|
originalPoint = centerPoint.matrixTransform(currentMatrix.inverse());
|
|
@@ -5995,13 +5926,13 @@
|
|
|
5995
5926
|
* @return {Bounds} the absolute bounding box
|
|
5996
5927
|
*/
|
|
5997
5928
|
Canvas.prototype.getAbsoluteBBox = function(element) {
|
|
5998
|
-
|
|
5999
|
-
|
|
5929
|
+
const vbox = this.viewbox();
|
|
5930
|
+
let bbox;
|
|
6000
5931
|
|
|
6001
5932
|
// connection
|
|
6002
5933
|
// use svg bbox
|
|
6003
5934
|
if (element.waypoints) {
|
|
6004
|
-
|
|
5935
|
+
const gfx = this.getGraphics(element);
|
|
6005
5936
|
|
|
6006
5937
|
bbox = gfx.getBBox();
|
|
6007
5938
|
}
|
|
@@ -6012,11 +5943,11 @@
|
|
|
6012
5943
|
bbox = element;
|
|
6013
5944
|
}
|
|
6014
5945
|
|
|
6015
|
-
|
|
6016
|
-
|
|
5946
|
+
const x = bbox.x * vbox.scale - vbox.x * vbox.scale;
|
|
5947
|
+
const y = bbox.y * vbox.scale - vbox.y * vbox.scale;
|
|
6017
5948
|
|
|
6018
|
-
|
|
6019
|
-
|
|
5949
|
+
const width = bbox.width * vbox.scale;
|
|
5950
|
+
const height = bbox.height * vbox.scale;
|
|
6020
5951
|
|
|
6021
5952
|
return {
|
|
6022
5953
|
x: x,
|
|
@@ -6843,7 +6774,7 @@
|
|
|
6843
6774
|
if (!Type) {
|
|
6844
6775
|
throw new Error('unknown type: <' + type + '>');
|
|
6845
6776
|
}
|
|
6846
|
-
return assign(new Type(), attrs);
|
|
6777
|
+
return assign$1(new Type(), attrs);
|
|
6847
6778
|
}
|
|
6848
6779
|
|
|
6849
6780
|
/**
|
|
@@ -6880,7 +6811,7 @@
|
|
|
6880
6811
|
*/
|
|
6881
6812
|
ElementFactory$1.prototype.create = function(type, attrs) {
|
|
6882
6813
|
|
|
6883
|
-
attrs = assign({}, attrs || {});
|
|
6814
|
+
attrs = assign$1({}, attrs || {});
|
|
6884
6815
|
|
|
6885
6816
|
if (!attrs.id) {
|
|
6886
6817
|
attrs.id = type + '_' + (this._uid++);
|
|
@@ -7021,7 +6952,7 @@
|
|
|
7021
6952
|
var actualCallback = callback;
|
|
7022
6953
|
|
|
7023
6954
|
if (that) {
|
|
7024
|
-
actualCallback = bind(callback, that);
|
|
6955
|
+
actualCallback = bind$2(callback, that);
|
|
7025
6956
|
|
|
7026
6957
|
// make sure we remember and are able to remove
|
|
7027
6958
|
// bound callbacks via {@link #off} using the original
|
|
@@ -7386,7 +7317,7 @@
|
|
|
7386
7317
|
};
|
|
7387
7318
|
|
|
7388
7319
|
InternalEvent.prototype.init = function(data) {
|
|
7389
|
-
assign(this, data || {});
|
|
7320
|
+
assign$1(this, data || {});
|
|
7390
7321
|
};
|
|
7391
7322
|
|
|
7392
7323
|
|
|
@@ -7916,7 +7847,7 @@
|
|
|
7916
7847
|
props.define(this, '$attrs', { value: {} });
|
|
7917
7848
|
props.define(this, '$parent', { writable: true });
|
|
7918
7849
|
|
|
7919
|
-
forEach$1(attrs, bind(function(val, key) {
|
|
7850
|
+
forEach$1(attrs, bind$2(function(val, key) {
|
|
7920
7851
|
this.set(key, val);
|
|
7921
7852
|
}, this));
|
|
7922
7853
|
}
|
|
@@ -7999,6 +7930,7 @@
|
|
|
7999
7930
|
localName = name;
|
|
8000
7931
|
prefix = defaultPrefix;
|
|
8001
7932
|
} else
|
|
7933
|
+
|
|
8002
7934
|
// prefix + local name
|
|
8003
7935
|
if (parts.length === 2) {
|
|
8004
7936
|
localName = parts[1];
|
|
@@ -8205,10 +8137,10 @@
|
|
|
8205
8137
|
return;
|
|
8206
8138
|
}
|
|
8207
8139
|
|
|
8208
|
-
forEach$1(t.properties, bind(function(p) {
|
|
8140
|
+
forEach$1(t.properties, bind$2(function(p) {
|
|
8209
8141
|
|
|
8210
8142
|
// clone property to allow extensions
|
|
8211
|
-
p = assign({}, p, {
|
|
8143
|
+
p = assign$1({}, p, {
|
|
8212
8144
|
name: p.ns.localName,
|
|
8213
8145
|
inherited: inherited
|
|
8214
8146
|
});
|
|
@@ -8252,7 +8184,7 @@
|
|
|
8252
8184
|
|
|
8253
8185
|
this.properties = properties;
|
|
8254
8186
|
|
|
8255
|
-
forEach$1(packages, bind(this.registerPackage, this));
|
|
8187
|
+
forEach$1(packages, bind$2(this.registerPackage, this));
|
|
8256
8188
|
}
|
|
8257
8189
|
|
|
8258
8190
|
|
|
@@ -8268,7 +8200,7 @@
|
|
|
8268
8200
|
Registry.prototype.registerPackage = function(pkg) {
|
|
8269
8201
|
|
|
8270
8202
|
// copy package
|
|
8271
|
-
pkg = assign({}, pkg);
|
|
8203
|
+
pkg = assign$1({}, pkg);
|
|
8272
8204
|
|
|
8273
8205
|
var pkgMap = this.packageMap;
|
|
8274
8206
|
|
|
@@ -8276,7 +8208,7 @@
|
|
|
8276
8208
|
ensureAvailable(pkgMap, pkg, 'uri');
|
|
8277
8209
|
|
|
8278
8210
|
// register types
|
|
8279
|
-
forEach$1(pkg.types, bind(function(descriptor) {
|
|
8211
|
+
forEach$1(pkg.types, bind$2(function(descriptor) {
|
|
8280
8212
|
this.registerType(descriptor, pkg);
|
|
8281
8213
|
}, this));
|
|
8282
8214
|
|
|
@@ -8290,11 +8222,11 @@
|
|
|
8290
8222
|
*/
|
|
8291
8223
|
Registry.prototype.registerType = function(type, pkg) {
|
|
8292
8224
|
|
|
8293
|
-
type = assign({}, type, {
|
|
8225
|
+
type = assign$1({}, type, {
|
|
8294
8226
|
superClass: (type.superClass || []).slice(),
|
|
8295
8227
|
extends: (type.extends || []).slice(),
|
|
8296
8228
|
properties: (type.properties || []).slice(),
|
|
8297
|
-
meta: assign((type.meta || {}))
|
|
8229
|
+
meta: assign$1((type.meta || {}))
|
|
8298
8230
|
});
|
|
8299
8231
|
|
|
8300
8232
|
var ns = parseName(type.name, pkg.prefix),
|
|
@@ -8302,7 +8234,7 @@
|
|
|
8302
8234
|
propertiesByName = {};
|
|
8303
8235
|
|
|
8304
8236
|
// parse properties
|
|
8305
|
-
forEach$1(type.properties, bind(function(p) {
|
|
8237
|
+
forEach$1(type.properties, bind$2(function(p) {
|
|
8306
8238
|
|
|
8307
8239
|
// namespace property names
|
|
8308
8240
|
var propertyNs = parseName(p.name, ns.prefix),
|
|
@@ -8313,7 +8245,7 @@
|
|
|
8313
8245
|
p.type = parseName(p.type, propertyNs.prefix).name;
|
|
8314
8246
|
}
|
|
8315
8247
|
|
|
8316
|
-
assign(p, {
|
|
8248
|
+
assign$1(p, {
|
|
8317
8249
|
ns: propertyNs,
|
|
8318
8250
|
name: propertyName
|
|
8319
8251
|
});
|
|
@@ -8322,13 +8254,13 @@
|
|
|
8322
8254
|
}, this));
|
|
8323
8255
|
|
|
8324
8256
|
// update ns + name
|
|
8325
|
-
assign(type, {
|
|
8257
|
+
assign$1(type, {
|
|
8326
8258
|
ns: ns,
|
|
8327
8259
|
name: name,
|
|
8328
8260
|
propertiesByName: propertiesByName
|
|
8329
8261
|
});
|
|
8330
8262
|
|
|
8331
|
-
forEach$1(type.extends, bind(function(extendsName) {
|
|
8263
|
+
forEach$1(type.extends, bind$2(function(extendsName) {
|
|
8332
8264
|
var extended = this.typeMap[extendsName];
|
|
8333
8265
|
|
|
8334
8266
|
extended.traits = extended.traits || [];
|
|
@@ -8423,7 +8355,7 @@
|
|
|
8423
8355
|
|
|
8424
8356
|
|
|
8425
8357
|
|
|
8426
|
-
|
|
8358
|
+
// helpers ////////////////////////////
|
|
8427
8359
|
|
|
8428
8360
|
function ensureAvailable(packageMap, pkg, identifierKey) {
|
|
8429
8361
|
|
|
@@ -8454,11 +8386,16 @@
|
|
|
8454
8386
|
*/
|
|
8455
8387
|
Properties.prototype.set = function(target, name, value) {
|
|
8456
8388
|
|
|
8389
|
+
if (!isString(name) || !name.length) {
|
|
8390
|
+
throw new TypeError('property name must be a non-empty string');
|
|
8391
|
+
}
|
|
8392
|
+
|
|
8457
8393
|
var property = this.model.getPropertyDescriptor(target, name);
|
|
8458
8394
|
|
|
8459
8395
|
var propertyName = property && property.name;
|
|
8460
8396
|
|
|
8461
8397
|
if (isUndefined(value)) {
|
|
8398
|
+
|
|
8462
8399
|
// unset the property, if the specified value is undefined;
|
|
8463
8400
|
// delete from $attrs (for extensions) or the target itself
|
|
8464
8401
|
if (property) {
|
|
@@ -8467,6 +8404,7 @@
|
|
|
8467
8404
|
delete target.$attrs[name];
|
|
8468
8405
|
}
|
|
8469
8406
|
} else {
|
|
8407
|
+
|
|
8470
8408
|
// set the property, defining well defined properties on the fly
|
|
8471
8409
|
// or simply updating them in target.$attrs (for extensions)
|
|
8472
8410
|
if (property) {
|
|
@@ -8523,7 +8461,7 @@
|
|
|
8523
8461
|
|
|
8524
8462
|
// use getters for read-only variables to support ES6 proxies
|
|
8525
8463
|
// cf. https://github.com/bpmn-io/internal-docs/issues/386
|
|
8526
|
-
options = assign({}, options, {
|
|
8464
|
+
options = assign$1({}, options, {
|
|
8527
8465
|
get: function() { return value; }
|
|
8528
8466
|
});
|
|
8529
8467
|
|
|
@@ -8562,7 +8500,7 @@
|
|
|
8562
8500
|
});
|
|
8563
8501
|
}
|
|
8564
8502
|
|
|
8565
|
-
|
|
8503
|
+
// Moddle implementation /////////////////////////////////////////////////
|
|
8566
8504
|
|
|
8567
8505
|
/**
|
|
8568
8506
|
* @class Moddle
|
|
@@ -9945,7 +9883,7 @@
|
|
|
9945
9883
|
* @property {Boolean} lax
|
|
9946
9884
|
*/
|
|
9947
9885
|
|
|
9948
|
-
assign(this, options);
|
|
9886
|
+
assign$1(this, options);
|
|
9949
9887
|
|
|
9950
9888
|
this.elementsById = {};
|
|
9951
9889
|
this.references = [];
|
|
@@ -10251,7 +10189,7 @@
|
|
|
10251
10189
|
|
|
10252
10190
|
elementType = model.getType(elementTypeName);
|
|
10253
10191
|
|
|
10254
|
-
return assign({}, property, {
|
|
10192
|
+
return assign$1({}, property, {
|
|
10255
10193
|
effectiveType: getModdleDescriptor(elementType).name
|
|
10256
10194
|
});
|
|
10257
10195
|
}
|
|
@@ -10273,7 +10211,7 @@
|
|
|
10273
10211
|
});
|
|
10274
10212
|
|
|
10275
10213
|
if (property) {
|
|
10276
|
-
return assign({}, property, {
|
|
10214
|
+
return assign$1({}, property, {
|
|
10277
10215
|
effectiveType: getModdleDescriptor(elementType).name
|
|
10278
10216
|
});
|
|
10279
10217
|
}
|
|
@@ -10348,7 +10286,7 @@
|
|
|
10348
10286
|
}
|
|
10349
10287
|
|
|
10350
10288
|
if (propertyDesc.isReference) {
|
|
10351
|
-
assign(newElement, {
|
|
10289
|
+
assign$1(newElement, {
|
|
10352
10290
|
element: element
|
|
10353
10291
|
});
|
|
10354
10292
|
|
|
@@ -10457,7 +10395,7 @@
|
|
|
10457
10395
|
};
|
|
10458
10396
|
}
|
|
10459
10397
|
|
|
10460
|
-
assign(this, { lax: false }, options);
|
|
10398
|
+
assign$1(this, { lax: false }, options);
|
|
10461
10399
|
}
|
|
10462
10400
|
|
|
10463
10401
|
/**
|
|
@@ -10512,7 +10450,7 @@
|
|
|
10512
10450
|
var model = this.model,
|
|
10513
10451
|
lax = this.lax;
|
|
10514
10452
|
|
|
10515
|
-
var context = new Context(assign({}, options, { rootHandler: rootHandler })),
|
|
10453
|
+
var context = new Context(assign$1({}, options, { rootHandler: rootHandler })),
|
|
10516
10454
|
parser = new Parser({ proxy: true }),
|
|
10517
10455
|
stack = createStack();
|
|
10518
10456
|
|
|
@@ -10907,14 +10845,14 @@
|
|
|
10907
10845
|
|
|
10908
10846
|
function getElementNs(ns, descriptor) {
|
|
10909
10847
|
if (descriptor.isGeneric) {
|
|
10910
|
-
return assign({ localName: descriptor.ns.localName }, ns);
|
|
10848
|
+
return assign$1({ localName: descriptor.ns.localName }, ns);
|
|
10911
10849
|
} else {
|
|
10912
|
-
return assign({ localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg) }, ns);
|
|
10850
|
+
return assign$1({ localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg) }, ns);
|
|
10913
10851
|
}
|
|
10914
10852
|
}
|
|
10915
10853
|
|
|
10916
10854
|
function getPropertyNs(ns, descriptor) {
|
|
10917
|
-
return assign({ localName: descriptor.ns.localName }, ns);
|
|
10855
|
+
return assign$1({ localName: descriptor.ns.localName }, ns);
|
|
10918
10856
|
}
|
|
10919
10857
|
|
|
10920
10858
|
function getSerializableProperties(element) {
|
|
@@ -11146,7 +11084,7 @@
|
|
|
11146
11084
|
if (this.isLocalNs(effectiveNs)) {
|
|
11147
11085
|
return { localName: ns.localName };
|
|
11148
11086
|
} else {
|
|
11149
|
-
return assign({ localName: ns.localName }, effectiveNs);
|
|
11087
|
+
return assign$1({ localName: ns.localName }, effectiveNs);
|
|
11150
11088
|
}
|
|
11151
11089
|
};
|
|
11152
11090
|
|
|
@@ -11262,6 +11200,8 @@
|
|
|
11262
11200
|
try {
|
|
11263
11201
|
self.addAttribute(self.nsAttributeName(attr.name), attr.value);
|
|
11264
11202
|
} catch (e) {
|
|
11203
|
+
/* global console */
|
|
11204
|
+
|
|
11265
11205
|
console.warn(
|
|
11266
11206
|
'missing namespace information for ',
|
|
11267
11207
|
attr.name, '=', attr.value, 'on', element,
|
|
@@ -11574,7 +11514,7 @@
|
|
|
11574
11514
|
|
|
11575
11515
|
function FormatingWriter(out, format) {
|
|
11576
11516
|
|
|
11577
|
-
var indent = [''];
|
|
11517
|
+
var indent = [ '' ];
|
|
11578
11518
|
|
|
11579
11519
|
this.append = function(str) {
|
|
11580
11520
|
out.write(str);
|
|
@@ -11616,7 +11556,7 @@
|
|
|
11616
11556
|
*/
|
|
11617
11557
|
function Writer(options) {
|
|
11618
11558
|
|
|
11619
|
-
options = assign({ format: false, preamble: true }, options || {});
|
|
11559
|
+
options = assign$1({ format: false, preamble: true }, options || {});
|
|
11620
11560
|
|
|
11621
11561
|
function toXML(tree, writer) {
|
|
11622
11562
|
var internalWriter = writer || new SavingWriter();
|
|
@@ -11688,7 +11628,7 @@
|
|
|
11688
11628
|
typeName = 'bpmn:Definitions';
|
|
11689
11629
|
}
|
|
11690
11630
|
|
|
11691
|
-
var reader = new Reader(assign({ model: this, lax: true }, options));
|
|
11631
|
+
var reader = new Reader(assign$1({ model: this, lax: true }, options));
|
|
11692
11632
|
var rootHandler = reader.handler(typeName);
|
|
11693
11633
|
|
|
11694
11634
|
return reader.fromXML(xmlStr, rootHandler);
|
|
@@ -15375,7 +15315,7 @@
|
|
|
15375
15315
|
};
|
|
15376
15316
|
|
|
15377
15317
|
function simple(additionalPackages, options) {
|
|
15378
|
-
var pks = assign({}, packages, additionalPackages);
|
|
15318
|
+
var pks = assign$1({}, packages, additionalPackages);
|
|
15379
15319
|
|
|
15380
15320
|
return new BpmnModdle(pks, options);
|
|
15381
15321
|
}
|
|
@@ -16114,7 +16054,7 @@
|
|
|
16114
16054
|
|
|
16115
16055
|
// all collaboration processes can contain sub-diagrams
|
|
16116
16056
|
if (collaboration) {
|
|
16117
|
-
rootElements = map(collaboration.participants, function(participant) {
|
|
16057
|
+
rootElements = map$1(collaboration.participants, function(participant) {
|
|
16118
16058
|
return participant.processRef;
|
|
16119
16059
|
});
|
|
16120
16060
|
|
|
@@ -16240,13 +16180,13 @@
|
|
|
16240
16180
|
var lightbox;
|
|
16241
16181
|
|
|
16242
16182
|
function createLightbox() {
|
|
16243
|
-
lightbox = domify(LIGHTBOX_MARKUP);
|
|
16183
|
+
lightbox = domify$1(LIGHTBOX_MARKUP);
|
|
16244
16184
|
|
|
16245
|
-
assign
|
|
16246
|
-
assign
|
|
16247
|
-
assign
|
|
16248
|
-
assign
|
|
16249
|
-
assign
|
|
16185
|
+
assign(lightbox, LIGHTBOX_STYLES);
|
|
16186
|
+
assign(query('svg', lightbox), LOGO_STYLES);
|
|
16187
|
+
assign(query('.backdrop', lightbox), BACKDROP_STYLES);
|
|
16188
|
+
assign(query('.notice', lightbox), NOTICE_STYLES);
|
|
16189
|
+
assign(query('.link', lightbox), LINK_STYLES, {
|
|
16250
16190
|
'margin': '15px 20px 15px 10px',
|
|
16251
16191
|
'alignSelf': 'center'
|
|
16252
16192
|
});
|
|
@@ -16288,7 +16228,7 @@
|
|
|
16288
16228
|
*/
|
|
16289
16229
|
function BaseViewer(options) {
|
|
16290
16230
|
|
|
16291
|
-
options = assign({}, DEFAULT_OPTIONS, options);
|
|
16231
|
+
options = assign$1({}, DEFAULT_OPTIONS, options);
|
|
16292
16232
|
|
|
16293
16233
|
this._moddle = this._createModdle(options);
|
|
16294
16234
|
|
|
@@ -16830,8 +16770,8 @@
|
|
|
16830
16770
|
|
|
16831
16771
|
const diagramModules = [].concat(staticModules, baseModules, additionalModules);
|
|
16832
16772
|
|
|
16833
|
-
const diagramOptions = assign(omit(options, [ 'additionalModules' ]), {
|
|
16834
|
-
canvas: assign({}, options.canvas, { container: container }),
|
|
16773
|
+
const diagramOptions = assign$1(omit(options, [ 'additionalModules' ]), {
|
|
16774
|
+
canvas: assign$1({}, options.canvas, { container: container }),
|
|
16835
16775
|
modules: diagramModules
|
|
16836
16776
|
});
|
|
16837
16777
|
|
|
@@ -16857,9 +16797,9 @@
|
|
|
16857
16797
|
|
|
16858
16798
|
BaseViewer.prototype._createContainer = function(options) {
|
|
16859
16799
|
|
|
16860
|
-
const container = domify('<div class="bjs-container"></div>');
|
|
16800
|
+
const container = domify$1('<div class="bjs-container"></div>');
|
|
16861
16801
|
|
|
16862
|
-
assign
|
|
16802
|
+
assign(container, {
|
|
16863
16803
|
width: ensureUnit(options.width),
|
|
16864
16804
|
height: ensureUnit(options.height),
|
|
16865
16805
|
position: options.position
|
|
@@ -16869,7 +16809,7 @@
|
|
|
16869
16809
|
};
|
|
16870
16810
|
|
|
16871
16811
|
BaseViewer.prototype._createModdle = function(options) {
|
|
16872
|
-
const moddleOptions = assign({}, this._moddleExtensions, options.moddleExtensions);
|
|
16812
|
+
const moddleOptions = assign$1({}, this._moddleExtensions, options.moddleExtensions);
|
|
16873
16813
|
|
|
16874
16814
|
return new simple(moddleOptions);
|
|
16875
16815
|
};
|
|
@@ -16953,10 +16893,10 @@
|
|
|
16953
16893
|
img +
|
|
16954
16894
|
'</a>';
|
|
16955
16895
|
|
|
16956
|
-
const linkElement = domify(linkMarkup);
|
|
16896
|
+
const linkElement = domify$1(linkMarkup);
|
|
16957
16897
|
|
|
16958
|
-
assign
|
|
16959
|
-
assign
|
|
16898
|
+
assign(query('svg', linkElement), LOGO_STYLES);
|
|
16899
|
+
assign(linkElement, LINK_STYLES, {
|
|
16960
16900
|
position: 'absolute',
|
|
16961
16901
|
bottom: '15px',
|
|
16962
16902
|
right: '15px',
|
|
@@ -16965,7 +16905,7 @@
|
|
|
16965
16905
|
|
|
16966
16906
|
container.appendChild(linkElement);
|
|
16967
16907
|
|
|
16968
|
-
|
|
16908
|
+
event.bind(linkElement, 'click', function(event) {
|
|
16969
16909
|
open();
|
|
16970
16910
|
|
|
16971
16911
|
event.preventDefault();
|
|
@@ -17335,7 +17275,7 @@
|
|
|
17335
17275
|
var computeStyle = styles.computeStyle;
|
|
17336
17276
|
|
|
17337
17277
|
function addMarker(id, options) {
|
|
17338
|
-
var attrs = assign({
|
|
17278
|
+
var attrs = assign$1({
|
|
17339
17279
|
fill: black,
|
|
17340
17280
|
strokeWidth: 1,
|
|
17341
17281
|
strokeLinecap: 'round',
|
|
@@ -17630,7 +17570,7 @@
|
|
|
17630
17570
|
}
|
|
17631
17571
|
|
|
17632
17572
|
function drawMarker(type, parentGfx, path, attrs) {
|
|
17633
|
-
return drawPath(parentGfx, path, assign({ 'data-marker': type }, attrs));
|
|
17573
|
+
return drawPath(parentGfx, path, assign$1({ 'data-marker': type }, attrs));
|
|
17634
17574
|
}
|
|
17635
17575
|
|
|
17636
17576
|
function renderer(type) {
|
|
@@ -17702,7 +17642,7 @@
|
|
|
17702
17642
|
|
|
17703
17643
|
function renderLabel(parentGfx, label, options) {
|
|
17704
17644
|
|
|
17705
|
-
options = assign({
|
|
17645
|
+
options = assign$1({
|
|
17706
17646
|
size: {
|
|
17707
17647
|
width: 100
|
|
17708
17648
|
}
|
|
@@ -17742,7 +17682,7 @@
|
|
|
17742
17682
|
return renderLabel(parentGfx, getLabel(element), {
|
|
17743
17683
|
box: box,
|
|
17744
17684
|
fitBox: true,
|
|
17745
|
-
style: assign(
|
|
17685
|
+
style: assign$1(
|
|
17746
17686
|
{},
|
|
17747
17687
|
textRenderer.getExternalStyle(),
|
|
17748
17688
|
{
|
|
@@ -18344,7 +18284,7 @@
|
|
|
18344
18284
|
return task;
|
|
18345
18285
|
},
|
|
18346
18286
|
'bpmn:SubProcess': function(parentGfx, element, attrs) {
|
|
18347
|
-
attrs = assign({
|
|
18287
|
+
attrs = assign$1({
|
|
18348
18288
|
fill: getFillColor(element, defaultFillColor),
|
|
18349
18289
|
stroke: getStrokeColor$1(element, defaultStrokeColor)
|
|
18350
18290
|
}, attrs);
|
|
@@ -18430,7 +18370,7 @@
|
|
|
18430
18370
|
return lane;
|
|
18431
18371
|
},
|
|
18432
18372
|
'bpmn:Lane': function(parentGfx, element, attrs) {
|
|
18433
|
-
var rect = drawRect(parentGfx, element.width, element.height, 0, assign({
|
|
18373
|
+
var rect = drawRect(parentGfx, element.width, element.height, 0, assign$1({
|
|
18434
18374
|
fill: getFillColor(element, defaultFillColor),
|
|
18435
18375
|
fillOpacity: HIGH_FILL_OPACITY,
|
|
18436
18376
|
stroke: getStrokeColor$1(element, defaultStrokeColor)
|
|
@@ -18652,7 +18592,7 @@
|
|
|
18652
18592
|
var fill = getFillColor(element, defaultFillColor),
|
|
18653
18593
|
stroke = getStrokeColor$1(element, defaultStrokeColor);
|
|
18654
18594
|
|
|
18655
|
-
attrs = assign({
|
|
18595
|
+
attrs = assign$1({
|
|
18656
18596
|
strokeDasharray: '0.5, 5',
|
|
18657
18597
|
strokeLinecap: 'round',
|
|
18658
18598
|
strokeLinejoin: 'round',
|
|
@@ -18840,12 +18780,12 @@
|
|
|
18840
18780
|
}
|
|
18841
18781
|
|
|
18842
18782
|
// apply fillOpacity
|
|
18843
|
-
var outerAttrs = assign({}, attrs, {
|
|
18783
|
+
var outerAttrs = assign$1({}, attrs, {
|
|
18844
18784
|
fillOpacity: 1
|
|
18845
18785
|
});
|
|
18846
18786
|
|
|
18847
18787
|
// apply no-fill
|
|
18848
|
-
var innerAttrs = assign({}, attrs, {
|
|
18788
|
+
var innerAttrs = assign$1({}, attrs, {
|
|
18849
18789
|
fill: 'none'
|
|
18850
18790
|
});
|
|
18851
18791
|
|
|
@@ -19197,7 +19137,7 @@
|
|
|
19197
19137
|
function parsePadding(padding) {
|
|
19198
19138
|
|
|
19199
19139
|
if (isObject(padding)) {
|
|
19200
|
-
return assign({ top: 0, left: 0, right: 0, bottom: 0 }, padding);
|
|
19140
|
+
return assign$1({ top: 0, left: 0, right: 0, bottom: 0 }, padding);
|
|
19201
19141
|
} else {
|
|
19202
19142
|
return {
|
|
19203
19143
|
top: padding,
|
|
@@ -19361,7 +19301,7 @@
|
|
|
19361
19301
|
id: 'helper-svg'
|
|
19362
19302
|
});
|
|
19363
19303
|
|
|
19364
|
-
assign
|
|
19304
|
+
assign(helperSvg, {
|
|
19365
19305
|
visibility: 'hidden',
|
|
19366
19306
|
position: 'fixed',
|
|
19367
19307
|
width: 0,
|
|
@@ -19386,7 +19326,7 @@
|
|
|
19386
19326
|
*/
|
|
19387
19327
|
function Text(config) {
|
|
19388
19328
|
|
|
19389
|
-
this._config = assign({}, {
|
|
19329
|
+
this._config = assign$1({}, {
|
|
19390
19330
|
size: DEFAULT_LABEL_SIZE$1,
|
|
19391
19331
|
padding: DEFAULT_BOX_PADDING,
|
|
19392
19332
|
style: {},
|
|
@@ -19435,8 +19375,8 @@
|
|
|
19435
19375
|
* @return {Object} { element, dimensions }
|
|
19436
19376
|
*/
|
|
19437
19377
|
Text.prototype.layoutText = function(text, options) {
|
|
19438
|
-
var box = assign({}, this._config.size, options.box),
|
|
19439
|
-
style = assign({}, this._config.style, options.style),
|
|
19378
|
+
var box = assign$1({}, this._config.size, options.box),
|
|
19379
|
+
style = assign$1({}, this._config.style, options.style),
|
|
19440
19380
|
align = parseAlign(options.align || this._config.align),
|
|
19441
19381
|
padding = parsePadding(options.padding !== undefined ? options.padding : this._config.padding),
|
|
19442
19382
|
fitBox = options.fitBox || false;
|
|
@@ -19551,7 +19491,7 @@
|
|
|
19551
19491
|
|
|
19552
19492
|
function TextRenderer(config) {
|
|
19553
19493
|
|
|
19554
|
-
var defaultStyle = assign({
|
|
19494
|
+
var defaultStyle = assign$1({
|
|
19555
19495
|
fontFamily: 'Arial, sans-serif',
|
|
19556
19496
|
fontSize: DEFAULT_FONT_SIZE,
|
|
19557
19497
|
fontWeight: 'normal',
|
|
@@ -19560,7 +19500,7 @@
|
|
|
19560
19500
|
|
|
19561
19501
|
var fontSize = parseInt(defaultStyle.fontSize, 10) - 1;
|
|
19562
19502
|
|
|
19563
|
-
var externalStyle = assign({}, defaultStyle, {
|
|
19503
|
+
var externalStyle = assign$1({}, defaultStyle, {
|
|
19564
19504
|
fontSize: fontSize
|
|
19565
19505
|
}, config && config.externalStyle || {});
|
|
19566
19506
|
|
|
@@ -20306,7 +20246,7 @@
|
|
|
20306
20246
|
size = DEFAULT_LABEL_SIZE;
|
|
20307
20247
|
}
|
|
20308
20248
|
|
|
20309
|
-
return assign({
|
|
20249
|
+
return assign$1({
|
|
20310
20250
|
x: mid.x - size.width / 2,
|
|
20311
20251
|
y: mid.y - size.height / 2
|
|
20312
20252
|
}, size);
|
|
@@ -20324,7 +20264,7 @@
|
|
|
20324
20264
|
* @return {Object}
|
|
20325
20265
|
*/
|
|
20326
20266
|
function elementData(semantic, di, attrs) {
|
|
20327
|
-
return assign({
|
|
20267
|
+
return assign$1({
|
|
20328
20268
|
id: semantic.id,
|
|
20329
20269
|
type: semantic.$type,
|
|
20330
20270
|
businessObject: semantic,
|
|
@@ -20971,7 +20911,7 @@
|
|
|
20971
20911
|
|
|
20972
20912
|
function createHitStyle(classNames, attrs) {
|
|
20973
20913
|
|
|
20974
|
-
attrs = assign({
|
|
20914
|
+
attrs = assign$1({
|
|
20975
20915
|
stroke: 'white',
|
|
20976
20916
|
strokeWidth: 15
|
|
20977
20917
|
}, attrs || {});
|
|
@@ -21069,7 +21009,7 @@
|
|
|
21069
21009
|
*/
|
|
21070
21010
|
this.createBoxHit = function(gfx, type, attrs) {
|
|
21071
21011
|
|
|
21072
|
-
attrs = assign({
|
|
21012
|
+
attrs = assign$1({
|
|
21073
21013
|
x: 0,
|
|
21074
21014
|
y: 0
|
|
21075
21015
|
}, attrs);
|
|
@@ -21238,7 +21178,7 @@
|
|
|
21238
21178
|
function createOutline(gfx, bounds) {
|
|
21239
21179
|
var outline = create$1('rect');
|
|
21240
21180
|
|
|
21241
|
-
attr(outline, assign({
|
|
21181
|
+
attr(outline, assign$1({
|
|
21242
21182
|
x: 10,
|
|
21243
21183
|
y: 10,
|
|
21244
21184
|
rx: 3,
|
|
@@ -21531,7 +21471,7 @@
|
|
|
21531
21471
|
|
|
21532
21472
|
var rect = create$1('rect');
|
|
21533
21473
|
|
|
21534
|
-
attr(rect, assign({
|
|
21474
|
+
attr(rect, assign$1({
|
|
21535
21475
|
rx: 3
|
|
21536
21476
|
}, bBox));
|
|
21537
21477
|
|
|
@@ -21774,7 +21714,7 @@
|
|
|
21774
21714
|
|
|
21775
21715
|
this._ids = ids$1;
|
|
21776
21716
|
|
|
21777
|
-
this._overlayDefaults = assign({
|
|
21717
|
+
this._overlayDefaults = assign$1({
|
|
21778
21718
|
|
|
21779
21719
|
// no show constraints
|
|
21780
21720
|
show: null,
|
|
@@ -21911,7 +21851,7 @@
|
|
|
21911
21851
|
|
|
21912
21852
|
var id = this._ids.next();
|
|
21913
21853
|
|
|
21914
|
-
overlay = assign({}, this._overlayDefaults, overlay, {
|
|
21854
|
+
overlay = assign$1({}, this._overlayDefaults, overlay, {
|
|
21915
21855
|
id: id,
|
|
21916
21856
|
type: type,
|
|
21917
21857
|
element: element,
|
|
@@ -22050,8 +21990,8 @@
|
|
|
22050
21990
|
|
|
22051
21991
|
|
|
22052
21992
|
Overlays.prototype._createOverlayContainer = function(element) {
|
|
22053
|
-
var html = domify('<div class="djs-overlays" />');
|
|
22054
|
-
assign
|
|
21993
|
+
var html = domify$1('<div class="djs-overlays" />');
|
|
21994
|
+
assign(html, { position: 'absolute' });
|
|
22055
21995
|
|
|
22056
21996
|
this._overlayRoot.appendChild(html);
|
|
22057
21997
|
|
|
@@ -22117,13 +22057,13 @@
|
|
|
22117
22057
|
// create proper html elements from
|
|
22118
22058
|
// overlay HTML strings
|
|
22119
22059
|
if (isString(html)) {
|
|
22120
|
-
html = domify(html);
|
|
22060
|
+
html = domify$1(html);
|
|
22121
22061
|
}
|
|
22122
22062
|
|
|
22123
22063
|
overlayContainer = this._getOverlayContainer(element);
|
|
22124
22064
|
|
|
22125
|
-
htmlContainer = domify('<div class="djs-overlay" data-overlay-id="' + id + '">');
|
|
22126
|
-
assign
|
|
22065
|
+
htmlContainer = domify$1('<div class="djs-overlay" data-overlay-id="' + id + '">');
|
|
22066
|
+
assign(htmlContainer, { position: 'absolute' });
|
|
22127
22067
|
|
|
22128
22068
|
htmlContainer.appendChild(html);
|
|
22129
22069
|
|
|
@@ -22307,11 +22247,11 @@
|
|
|
22307
22247
|
// helpers /////////////////////////////
|
|
22308
22248
|
|
|
22309
22249
|
function createRoot$1(parentNode) {
|
|
22310
|
-
var root = domify(
|
|
22250
|
+
var root = domify$1(
|
|
22311
22251
|
'<div class="djs-overlay-container" />'
|
|
22312
22252
|
);
|
|
22313
22253
|
|
|
22314
|
-
assign
|
|
22254
|
+
assign(root, {
|
|
22315
22255
|
position: 'absolute',
|
|
22316
22256
|
width: 0,
|
|
22317
22257
|
height: 0
|
|
@@ -22323,7 +22263,7 @@
|
|
|
22323
22263
|
}
|
|
22324
22264
|
|
|
22325
22265
|
function setPosition$1(el, x, y) {
|
|
22326
|
-
assign
|
|
22266
|
+
assign(el, { left: x + 'px', top: y + 'px' });
|
|
22327
22267
|
}
|
|
22328
22268
|
|
|
22329
22269
|
/**
|
|
@@ -22794,7 +22734,7 @@
|
|
|
22794
22734
|
* @param {canvas} canvas
|
|
22795
22735
|
*/
|
|
22796
22736
|
function DrilldownBreadcrumbs(eventBus, elementRegistry, overlays, canvas) {
|
|
22797
|
-
var breadcrumbs = domify('<ul class="bjs-breadcrumbs"></ul>');
|
|
22737
|
+
var breadcrumbs = domify$1('<ul class="bjs-breadcrumbs"></ul>');
|
|
22798
22738
|
var container = canvas.getContainer();
|
|
22799
22739
|
var containerClasses = classes$1(container);
|
|
22800
22740
|
container.appendChild(breadcrumbs);
|
|
@@ -22830,7 +22770,7 @@
|
|
|
22830
22770
|
|
|
22831
22771
|
var path = boParents.map(function(parent) {
|
|
22832
22772
|
var title = escapeHTML(parent.name || parent.id);
|
|
22833
|
-
var link = domify('<li><span class="bjs-crumb"><a title="' + title + '">' + title + '</a></span></li>');
|
|
22773
|
+
var link = domify$1('<li><span class="bjs-crumb"><a title="' + title + '">' + title + '</a></span></li>');
|
|
22834
22774
|
|
|
22835
22775
|
var parentPlane = canvas.findRoot(getPlaneIdFromShape(parent)) || canvas.findRoot(parent.id);
|
|
22836
22776
|
|
|
@@ -23370,7 +23310,7 @@
|
|
|
23370
23310
|
this.removeOverlay(element);
|
|
23371
23311
|
}
|
|
23372
23312
|
|
|
23373
|
-
var button = domify('<button class="bjs-drilldown">' + ARROW_DOWN_SVG + '</button>');
|
|
23313
|
+
var button = domify$1('<button class="bjs-drilldown">' + ARROW_DOWN_SVG + '</button>');
|
|
23374
23314
|
|
|
23375
23315
|
button.addEventListener('click', function() {
|
|
23376
23316
|
canvas.setRootElement(canvas.findRoot(getPlaneIdFromShape(element)));
|
|
@@ -23672,8 +23612,8 @@
|
|
|
23672
23612
|
this._node = node;
|
|
23673
23613
|
|
|
23674
23614
|
// bind key events
|
|
23675
|
-
|
|
23676
|
-
|
|
23615
|
+
event.bind(node, 'keydown', this._keydownHandler, true);
|
|
23616
|
+
event.bind(node, 'keyup', this._keyupHandler, true);
|
|
23677
23617
|
|
|
23678
23618
|
this._fire('bind');
|
|
23679
23619
|
};
|
|
@@ -23689,8 +23629,8 @@
|
|
|
23689
23629
|
this._fire('unbind');
|
|
23690
23630
|
|
|
23691
23631
|
// unbind key events
|
|
23692
|
-
|
|
23693
|
-
|
|
23632
|
+
event.unbind(node, 'keydown', this._keydownHandler, true);
|
|
23633
|
+
event.unbind(node, 'keyup', this._keyupHandler, true);
|
|
23694
23634
|
}
|
|
23695
23635
|
|
|
23696
23636
|
this._node = null;
|
|
@@ -23733,7 +23673,7 @@
|
|
|
23733
23673
|
// helpers ///////
|
|
23734
23674
|
|
|
23735
23675
|
function isInput(target) {
|
|
23736
|
-
return target && (
|
|
23676
|
+
return target && (matches(target, 'input, textarea') || target.contentEditable === 'true');
|
|
23737
23677
|
}
|
|
23738
23678
|
|
|
23739
23679
|
var LOW_PRIORITY$m = 500;
|
|
@@ -23926,7 +23866,7 @@
|
|
|
23926
23866
|
|
|
23927
23867
|
var self = this;
|
|
23928
23868
|
|
|
23929
|
-
this._config = assign({}, DEFAULT_CONFIG$1, config || {});
|
|
23869
|
+
this._config = assign$1({}, DEFAULT_CONFIG$1, config || {});
|
|
23930
23870
|
|
|
23931
23871
|
keyboard.addListener(arrowsListener);
|
|
23932
23872
|
|
|
@@ -24141,36 +24081,36 @@
|
|
|
24141
24081
|
}
|
|
24142
24082
|
|
|
24143
24083
|
|
|
24144
|
-
function handleEnd(event) {
|
|
24145
|
-
|
|
24146
|
-
|
|
24084
|
+
function handleEnd(event$1) {
|
|
24085
|
+
event.unbind(document, 'mousemove', handleMove);
|
|
24086
|
+
event.unbind(document, 'mouseup', handleEnd);
|
|
24147
24087
|
|
|
24148
24088
|
context = null;
|
|
24149
24089
|
|
|
24150
24090
|
unset();
|
|
24151
24091
|
}
|
|
24152
24092
|
|
|
24153
|
-
function handleStart(event) {
|
|
24093
|
+
function handleStart(event$1) {
|
|
24154
24094
|
|
|
24155
24095
|
// event is already handled by '.djs-draggable'
|
|
24156
|
-
if (closest(event.target, '.djs-draggable')) {
|
|
24096
|
+
if (closest(event$1.target, '.djs-draggable')) {
|
|
24157
24097
|
return;
|
|
24158
24098
|
}
|
|
24159
24099
|
|
|
24160
|
-
var button = event.button;
|
|
24100
|
+
var button = event$1.button;
|
|
24161
24101
|
|
|
24162
24102
|
// reject right mouse button or modifier key
|
|
24163
|
-
if (button >= 2 || event.ctrlKey || event.shiftKey || event.altKey) {
|
|
24103
|
+
if (button >= 2 || event$1.ctrlKey || event$1.shiftKey || event$1.altKey) {
|
|
24164
24104
|
return;
|
|
24165
24105
|
}
|
|
24166
24106
|
|
|
24167
24107
|
context = {
|
|
24168
24108
|
button: button,
|
|
24169
|
-
start: toPoint(event)
|
|
24109
|
+
start: toPoint(event$1)
|
|
24170
24110
|
};
|
|
24171
24111
|
|
|
24172
|
-
|
|
24173
|
-
|
|
24112
|
+
event.bind(document, 'mousemove', handleMove);
|
|
24113
|
+
event.bind(document, 'mouseup', handleEnd);
|
|
24174
24114
|
|
|
24175
24115
|
// we've handled the event
|
|
24176
24116
|
return true;
|
|
@@ -24263,7 +24203,7 @@
|
|
|
24263
24203
|
this._canvas = canvas;
|
|
24264
24204
|
this._container = canvas._container;
|
|
24265
24205
|
|
|
24266
|
-
this._handleWheel = bind(this._handleWheel, this);
|
|
24206
|
+
this._handleWheel = bind$2(this._handleWheel, this);
|
|
24267
24207
|
|
|
24268
24208
|
this._totalDelta = 0;
|
|
24269
24209
|
this._scale = config.scale || DEFAULT_SCALE;
|
|
@@ -24438,7 +24378,7 @@
|
|
|
24438
24378
|
|
|
24439
24379
|
// add or remove wheel listener based on
|
|
24440
24380
|
// changed enabled state
|
|
24441
|
-
|
|
24381
|
+
event[newEnabled ? 'bind' : 'unbind'](element, 'wheel', handleWheel, false);
|
|
24442
24382
|
}
|
|
24443
24383
|
|
|
24444
24384
|
this._enabled = newEnabled;
|
|
@@ -27165,24 +27105,24 @@
|
|
|
27165
27105
|
|
|
27166
27106
|
function createTouchRecognizer(node) {
|
|
27167
27107
|
|
|
27168
|
-
function stopMouse(event) {
|
|
27108
|
+
function stopMouse(event$1) {
|
|
27169
27109
|
|
|
27170
27110
|
forEach$1(mouseEvents, function(e) {
|
|
27171
|
-
|
|
27111
|
+
event.bind(node, e, stopEvent, true);
|
|
27172
27112
|
});
|
|
27173
27113
|
}
|
|
27174
27114
|
|
|
27175
|
-
function allowMouse(event) {
|
|
27115
|
+
function allowMouse(event$1) {
|
|
27176
27116
|
setTimeout(function() {
|
|
27177
27117
|
forEach$1(mouseEvents, function(e) {
|
|
27178
|
-
|
|
27118
|
+
event.unbind(node, e, stopEvent, true);
|
|
27179
27119
|
});
|
|
27180
27120
|
}, 500);
|
|
27181
27121
|
}
|
|
27182
27122
|
|
|
27183
|
-
|
|
27184
|
-
|
|
27185
|
-
|
|
27123
|
+
event.bind(node, 'touchstart', stopMouse, true);
|
|
27124
|
+
event.bind(node, 'touchend', allowMouse, true);
|
|
27125
|
+
event.bind(node, 'touchcancel', allowMouse, true);
|
|
27186
27126
|
|
|
27187
27127
|
// A touch event recognizer that handles
|
|
27188
27128
|
// touch events only (we know, we can already handle
|
|
@@ -27952,14 +27892,14 @@
|
|
|
27952
27892
|
|
|
27953
27893
|
forEach$1(entries, function(entry, id) {
|
|
27954
27894
|
var grouping = entry.group || 'default',
|
|
27955
|
-
control = domify(entry.html || '<div class="entry" draggable="true"></div>'),
|
|
27895
|
+
control = domify$1(entry.html || '<div class="entry" draggable="true"></div>'),
|
|
27956
27896
|
container;
|
|
27957
27897
|
|
|
27958
27898
|
attr$1(control, 'data-action', id);
|
|
27959
27899
|
|
|
27960
27900
|
container = query('[data-group=' + cssEscape(grouping) + ']', html);
|
|
27961
27901
|
if (!container) {
|
|
27962
|
-
container = domify('<div class="group"></div>');
|
|
27902
|
+
container = domify$1('<div class="group"></div>');
|
|
27963
27903
|
attr$1(container, 'data-group', grouping);
|
|
27964
27904
|
|
|
27965
27905
|
html.appendChild(container);
|
|
@@ -27976,7 +27916,7 @@
|
|
|
27976
27916
|
}
|
|
27977
27917
|
|
|
27978
27918
|
if (entry.imageUrl) {
|
|
27979
|
-
image = domify('<img>');
|
|
27919
|
+
image = domify$1('<img>');
|
|
27980
27920
|
attr$1(image, 'src', entry.imageUrl);
|
|
27981
27921
|
image.style.width = '100%';
|
|
27982
27922
|
image.style.height = '100%';
|
|
@@ -28010,11 +27950,11 @@
|
|
|
28010
27950
|
|
|
28011
27951
|
var overlays = this._overlays;
|
|
28012
27952
|
|
|
28013
|
-
var html = domify('<div class="djs-context-pad"></div>');
|
|
27953
|
+
var html = domify$1('<div class="djs-context-pad"></div>');
|
|
28014
27954
|
|
|
28015
27955
|
var position = this._getPosition(target);
|
|
28016
27956
|
|
|
28017
|
-
var overlaysConfig = assign({
|
|
27957
|
+
var overlaysConfig = assign$1({
|
|
28018
27958
|
html: html
|
|
28019
27959
|
}, this._overlaysConfig, position);
|
|
28020
27960
|
|
|
@@ -28027,7 +27967,7 @@
|
|
|
28027
27967
|
});
|
|
28028
27968
|
|
|
28029
27969
|
// stop propagation of mouse events
|
|
28030
|
-
|
|
27970
|
+
event.bind(html, 'mousedown', function(event) {
|
|
28031
27971
|
event.stopPropagation();
|
|
28032
27972
|
});
|
|
28033
27973
|
|
|
@@ -28303,7 +28243,7 @@
|
|
|
28303
28243
|
var entries = this._getEntries(element, providers),
|
|
28304
28244
|
headerEntries = this._getHeaderEntries(element, providers);
|
|
28305
28245
|
|
|
28306
|
-
current.entries = assign({}, entries, headerEntries);
|
|
28246
|
+
current.entries = assign$1({}, entries, headerEntries);
|
|
28307
28247
|
|
|
28308
28248
|
current.container = this._createContainer(id);
|
|
28309
28249
|
|
|
@@ -28492,11 +28432,11 @@
|
|
|
28492
28432
|
* @return {Object} a DOM container
|
|
28493
28433
|
*/
|
|
28494
28434
|
PopupMenu.prototype._createContainer = function(id) {
|
|
28495
|
-
var container = domify('<div class="djs-popup">'),
|
|
28435
|
+
var container = domify$1('<div class="djs-popup">'),
|
|
28496
28436
|
position = this._current.position,
|
|
28497
28437
|
className = this._current.className;
|
|
28498
28438
|
|
|
28499
|
-
assign
|
|
28439
|
+
assign(container, {
|
|
28500
28440
|
position: 'absolute',
|
|
28501
28441
|
left: position.x + 'px',
|
|
28502
28442
|
top: position.y + 'px',
|
|
@@ -28535,7 +28475,7 @@
|
|
|
28535
28475
|
}
|
|
28536
28476
|
|
|
28537
28477
|
// display after position adjustment to avoid flickering
|
|
28538
|
-
assign
|
|
28478
|
+
assign(container, { visibility: 'visible' });
|
|
28539
28479
|
};
|
|
28540
28480
|
|
|
28541
28481
|
|
|
@@ -28624,7 +28564,7 @@
|
|
|
28624
28564
|
top = cursorPosition.y - containerHeight + 'px';
|
|
28625
28565
|
}
|
|
28626
28566
|
|
|
28627
|
-
assign
|
|
28567
|
+
assign(container, { left: left, top: top }, { 'zIndex': 1000 });
|
|
28628
28568
|
};
|
|
28629
28569
|
|
|
28630
28570
|
|
|
@@ -28638,7 +28578,7 @@
|
|
|
28638
28578
|
*/
|
|
28639
28579
|
PopupMenu.prototype._createEntries = function(entries, className) {
|
|
28640
28580
|
|
|
28641
|
-
var entriesContainer = domify('<div>'),
|
|
28581
|
+
var entriesContainer = domify$1('<div>'),
|
|
28642
28582
|
self = this;
|
|
28643
28583
|
|
|
28644
28584
|
classes$1(entriesContainer).add(className);
|
|
@@ -28649,7 +28589,7 @@
|
|
|
28649
28589
|
groupContainer = query('[data-group=' + cssEscape(grouping) + ']', entriesContainer);
|
|
28650
28590
|
|
|
28651
28591
|
if (!groupContainer) {
|
|
28652
|
-
groupContainer = domify('<div class="group"></div>');
|
|
28592
|
+
groupContainer = domify$1('<div class="group"></div>');
|
|
28653
28593
|
attr$1(groupContainer, 'data-group', grouping);
|
|
28654
28594
|
|
|
28655
28595
|
entriesContainer.appendChild(groupContainer);
|
|
@@ -28671,7 +28611,7 @@
|
|
|
28671
28611
|
*/
|
|
28672
28612
|
PopupMenu.prototype._createEntry = function(entry, id) {
|
|
28673
28613
|
|
|
28674
|
-
var entryContainer = domify('<div>'),
|
|
28614
|
+
var entryContainer = domify$1('<div>'),
|
|
28675
28615
|
entryClasses = classes$1(entryContainer);
|
|
28676
28616
|
|
|
28677
28617
|
entryClasses.add('entry');
|
|
@@ -28685,13 +28625,13 @@
|
|
|
28685
28625
|
attr$1(entryContainer, DATA_REF, id);
|
|
28686
28626
|
|
|
28687
28627
|
if (entry.label) {
|
|
28688
|
-
var label = domify('<span>');
|
|
28628
|
+
var label = domify$1('<span>');
|
|
28689
28629
|
label.textContent = entry.label;
|
|
28690
28630
|
entryContainer.appendChild(label);
|
|
28691
28631
|
}
|
|
28692
28632
|
|
|
28693
28633
|
if (entry.imageUrl) {
|
|
28694
|
-
var image = domify('<img>');
|
|
28634
|
+
var image = domify$1('<img>');
|
|
28695
28635
|
attr$1(image, 'src', entry.imageUrl);
|
|
28696
28636
|
|
|
28697
28637
|
entryContainer.appendChild(image);
|
|
@@ -28785,7 +28725,7 @@
|
|
|
28785
28725
|
var actions = {};
|
|
28786
28726
|
|
|
28787
28727
|
if (this._isAllowed(elements)) {
|
|
28788
|
-
assign(actions, this._getEntries(elements));
|
|
28728
|
+
assign$1(actions, this._getEntries(elements));
|
|
28789
28729
|
}
|
|
28790
28730
|
|
|
28791
28731
|
return actions;
|
|
@@ -28807,7 +28747,7 @@
|
|
|
28807
28747
|
click: function(event, elements) {
|
|
28808
28748
|
var position = self._getMenuPosition(elements);
|
|
28809
28749
|
|
|
28810
|
-
assign(position, {
|
|
28750
|
+
assign$1(position, {
|
|
28811
28751
|
cursor: {
|
|
28812
28752
|
x: event.x,
|
|
28813
28753
|
y: event.y
|
|
@@ -28874,7 +28814,7 @@
|
|
|
28874
28814
|
var entries = {};
|
|
28875
28815
|
|
|
28876
28816
|
if (this._isAllowed(elements)) {
|
|
28877
|
-
assign(entries, this._getEntries(elements));
|
|
28817
|
+
assign$1(entries, this._getEntries(elements));
|
|
28878
28818
|
}
|
|
28879
28819
|
|
|
28880
28820
|
return entries;
|
|
@@ -29759,7 +29699,7 @@
|
|
|
29759
29699
|
newTrbl.bottom = elementsTrbl.bottom + offset.bottom;
|
|
29760
29700
|
}
|
|
29761
29701
|
|
|
29762
|
-
return asBounds(assign({}, targetTrbl, newTrbl));
|
|
29702
|
+
return asBounds(assign$1({}, targetTrbl, newTrbl));
|
|
29763
29703
|
};
|
|
29764
29704
|
|
|
29765
29705
|
|
|
@@ -30297,7 +30237,7 @@
|
|
|
30297
30237
|
dragContext = dragContext || context;
|
|
30298
30238
|
|
|
30299
30239
|
var event = eventBus.createEvent(
|
|
30300
|
-
assign(
|
|
30240
|
+
assign$1(
|
|
30301
30241
|
{},
|
|
30302
30242
|
dragContext.payload,
|
|
30303
30243
|
dragContext.data,
|
|
@@ -30342,7 +30282,7 @@
|
|
|
30342
30282
|
// fire start event with original
|
|
30343
30283
|
// starting coordinates
|
|
30344
30284
|
|
|
30345
|
-
assign(payload, {
|
|
30285
|
+
assign$1(payload, {
|
|
30346
30286
|
x: round$a(localStart.x + displacement.x),
|
|
30347
30287
|
y: round$a(localStart.y + displacement.y),
|
|
30348
30288
|
dx: 0,
|
|
@@ -30377,7 +30317,7 @@
|
|
|
30377
30317
|
if (context.active) {
|
|
30378
30318
|
|
|
30379
30319
|
// update payload with actual coordinates
|
|
30380
|
-
assign(payload, {
|
|
30320
|
+
assign$1(payload, {
|
|
30381
30321
|
x: round$a(localCurrent.x + displacement.x),
|
|
30382
30322
|
y: round$a(localCurrent.y + displacement.y),
|
|
30383
30323
|
dx: round$a(localDelta.x),
|
|
@@ -30526,20 +30466,20 @@
|
|
|
30526
30466
|
}
|
|
30527
30467
|
|
|
30528
30468
|
// reset dom listeners
|
|
30529
|
-
|
|
30469
|
+
event.unbind(document, 'mousemove', move);
|
|
30530
30470
|
|
|
30531
|
-
|
|
30532
|
-
|
|
30471
|
+
event.unbind(document, 'dragstart', preventDefault$1);
|
|
30472
|
+
event.unbind(document, 'selectstart', preventDefault$1);
|
|
30533
30473
|
|
|
30534
|
-
|
|
30535
|
-
|
|
30474
|
+
event.unbind(document, 'mousedown', endDrag, true);
|
|
30475
|
+
event.unbind(document, 'mouseup', endDrag, true);
|
|
30536
30476
|
|
|
30537
|
-
|
|
30477
|
+
event.unbind(document, 'keyup', checkCancel);
|
|
30538
30478
|
|
|
30539
|
-
|
|
30540
|
-
|
|
30541
|
-
|
|
30542
|
-
|
|
30479
|
+
event.unbind(document, 'touchstart', trapTouch, true);
|
|
30480
|
+
event.unbind(document, 'touchcancel', cancel, true);
|
|
30481
|
+
event.unbind(document, 'touchmove', move, true);
|
|
30482
|
+
event.unbind(document, 'touchend', end, true);
|
|
30543
30483
|
|
|
30544
30484
|
eventBus.off('element.hover', hover);
|
|
30545
30485
|
eventBus.off('element.out', out);
|
|
@@ -30572,7 +30512,7 @@
|
|
|
30572
30512
|
* @param {string} prefix
|
|
30573
30513
|
* @param {Object} [options]
|
|
30574
30514
|
*/
|
|
30575
|
-
function init(event, relativeTo, prefix, options) {
|
|
30515
|
+
function init(event$1, relativeTo, prefix, options) {
|
|
30576
30516
|
|
|
30577
30517
|
// only one drag operation may be active, at a time
|
|
30578
30518
|
if (context) {
|
|
@@ -30585,7 +30525,7 @@
|
|
|
30585
30525
|
relativeTo = null;
|
|
30586
30526
|
}
|
|
30587
30527
|
|
|
30588
|
-
options = assign({}, defaultOptions, options || {});
|
|
30528
|
+
options = assign$1({}, defaultOptions, options || {});
|
|
30589
30529
|
|
|
30590
30530
|
var data = options.data || {},
|
|
30591
30531
|
originalEvent,
|
|
@@ -30600,11 +30540,11 @@
|
|
|
30600
30540
|
endDrag = end;
|
|
30601
30541
|
}
|
|
30602
30542
|
|
|
30603
|
-
if (event) {
|
|
30604
|
-
originalEvent = getOriginal$1(event) || event;
|
|
30605
|
-
globalStart = toPoint(event);
|
|
30543
|
+
if (event$1) {
|
|
30544
|
+
originalEvent = getOriginal$1(event$1) || event$1;
|
|
30545
|
+
globalStart = toPoint(event$1);
|
|
30606
30546
|
|
|
30607
|
-
stopPropagation$1(event);
|
|
30547
|
+
stopPropagation$1(event$1);
|
|
30608
30548
|
|
|
30609
30549
|
// prevent default browser dragging behavior
|
|
30610
30550
|
if (originalEvent.type === 'dragstart') {
|
|
@@ -30623,7 +30563,7 @@
|
|
|
30623
30563
|
|
|
30624
30564
|
isTouch = isTouchEvent(originalEvent);
|
|
30625
30565
|
|
|
30626
|
-
context = assign({
|
|
30566
|
+
context = assign$1({
|
|
30627
30567
|
prefix: prefix,
|
|
30628
30568
|
data: data,
|
|
30629
30569
|
payload: {},
|
|
@@ -30640,24 +30580,24 @@
|
|
|
30640
30580
|
// add dom listeners
|
|
30641
30581
|
|
|
30642
30582
|
if (isTouch) {
|
|
30643
|
-
|
|
30644
|
-
|
|
30645
|
-
|
|
30646
|
-
|
|
30583
|
+
event.bind(document, 'touchstart', trapTouch, true);
|
|
30584
|
+
event.bind(document, 'touchcancel', cancel, true);
|
|
30585
|
+
event.bind(document, 'touchmove', move, true);
|
|
30586
|
+
event.bind(document, 'touchend', end, true);
|
|
30647
30587
|
} else {
|
|
30648
30588
|
|
|
30649
30589
|
// assume we use the mouse to interact per default
|
|
30650
|
-
|
|
30590
|
+
event.bind(document, 'mousemove', move);
|
|
30651
30591
|
|
|
30652
30592
|
// prevent default browser drag and text selection behavior
|
|
30653
|
-
|
|
30654
|
-
|
|
30593
|
+
event.bind(document, 'dragstart', preventDefault$1);
|
|
30594
|
+
event.bind(document, 'selectstart', preventDefault$1);
|
|
30655
30595
|
|
|
30656
|
-
|
|
30657
|
-
|
|
30596
|
+
event.bind(document, 'mousedown', endDrag, true);
|
|
30597
|
+
event.bind(document, 'mouseup', endDrag, true);
|
|
30658
30598
|
}
|
|
30659
30599
|
|
|
30660
|
-
|
|
30600
|
+
event.bind(document, 'keyup', checkCancel);
|
|
30661
30601
|
|
|
30662
30602
|
eventBus.on('element.hover', hover);
|
|
30663
30603
|
eventBus.on('element.out', out);
|
|
@@ -30666,7 +30606,7 @@
|
|
|
30666
30606
|
fire('init');
|
|
30667
30607
|
|
|
30668
30608
|
if (options.autoActivate) {
|
|
30669
|
-
move(event, true);
|
|
30609
|
+
move(event$1, true);
|
|
30670
30610
|
}
|
|
30671
30611
|
}
|
|
30672
30612
|
|
|
@@ -30691,7 +30631,7 @@
|
|
|
30691
30631
|
};
|
|
30692
30632
|
|
|
30693
30633
|
this.setOptions = function(options) {
|
|
30694
|
-
assign(defaultOptions, options);
|
|
30634
|
+
assign$1(defaultOptions, options);
|
|
30695
30635
|
};
|
|
30696
30636
|
}
|
|
30697
30637
|
|
|
@@ -30728,7 +30668,7 @@
|
|
|
30728
30668
|
|
|
30729
30669
|
this._canvas = canvas;
|
|
30730
30670
|
|
|
30731
|
-
this._opts = assign({
|
|
30671
|
+
this._opts = assign$1({
|
|
30732
30672
|
scrollThresholdIn: [ 20, 20, 20, 20 ],
|
|
30733
30673
|
scrollThresholdOut: [ 0, 0, 0, 0 ],
|
|
30734
30674
|
scrollRepeatTimeout: 15,
|
|
@@ -30827,7 +30767,7 @@
|
|
|
30827
30767
|
* @param {Object} options
|
|
30828
30768
|
*/
|
|
30829
30769
|
AutoScroll.prototype.setOptions = function(options) {
|
|
30830
|
-
this._opts = assign({}, this._opts, options);
|
|
30770
|
+
this._opts = assign$1({}, this._opts, options);
|
|
30831
30771
|
};
|
|
30832
30772
|
|
|
30833
30773
|
|
|
@@ -31404,7 +31344,7 @@
|
|
|
31404
31344
|
|
|
31405
31345
|
function bindInteractionEvents(node, eventName, element) {
|
|
31406
31346
|
|
|
31407
|
-
|
|
31347
|
+
event.bind(node, eventName, function(event) {
|
|
31408
31348
|
interactionEvents.triggerMouseEvent(eventName, event, element);
|
|
31409
31349
|
event.stopPropagation();
|
|
31410
31350
|
});
|
|
@@ -32774,7 +32714,7 @@
|
|
|
32774
32714
|
cy = (y - sy);
|
|
32775
32715
|
|
|
32776
32716
|
// update delta
|
|
32777
|
-
assign(event, {
|
|
32717
|
+
assign$1(event, {
|
|
32778
32718
|
dx: event.dx - cx,
|
|
32779
32719
|
dy: event.dy - cy,
|
|
32780
32720
|
x: sx,
|
|
@@ -32865,7 +32805,7 @@
|
|
|
32865
32805
|
cy = (y - sy);
|
|
32866
32806
|
|
|
32867
32807
|
// update delta
|
|
32868
|
-
assign(event, {
|
|
32808
|
+
assign$1(event, {
|
|
32869
32809
|
dx: event.dx - cx,
|
|
32870
32810
|
dy: event.dy - cy,
|
|
32871
32811
|
x: event.x - cx,
|
|
@@ -33459,7 +33399,7 @@
|
|
|
33459
33399
|
function TextBox(options) {
|
|
33460
33400
|
this.container = options.container;
|
|
33461
33401
|
|
|
33462
|
-
this.parent = domify(
|
|
33402
|
+
this.parent = domify$1(
|
|
33463
33403
|
'<div class="djs-direct-editing-parent">' +
|
|
33464
33404
|
'<div class="djs-direct-editing-content" contenteditable="true"></div>' +
|
|
33465
33405
|
'</div>'
|
|
@@ -33470,8 +33410,8 @@
|
|
|
33470
33410
|
this.keyHandler = options.keyHandler || function() {};
|
|
33471
33411
|
this.resizeHandler = options.resizeHandler || function() {};
|
|
33472
33412
|
|
|
33473
|
-
this.autoResize = bind(this.autoResize, this);
|
|
33474
|
-
this.handlePaste = bind(this.handlePaste, this);
|
|
33413
|
+
this.autoResize = bind$2(this.autoResize, this);
|
|
33414
|
+
this.handlePaste = bind$2(this.handlePaste, this);
|
|
33475
33415
|
}
|
|
33476
33416
|
|
|
33477
33417
|
|
|
@@ -33522,7 +33462,7 @@
|
|
|
33522
33462
|
'transform'
|
|
33523
33463
|
]);
|
|
33524
33464
|
|
|
33525
|
-
assign(parent.style, {
|
|
33465
|
+
assign$1(parent.style, {
|
|
33526
33466
|
width: bounds.width + 'px',
|
|
33527
33467
|
height: bounds.height + 'px',
|
|
33528
33468
|
maxWidth: bounds.maxWidth + 'px',
|
|
@@ -33553,7 +33493,7 @@
|
|
|
33553
33493
|
'paddingLeft'
|
|
33554
33494
|
]);
|
|
33555
33495
|
|
|
33556
|
-
assign(content.style, {
|
|
33496
|
+
assign$1(content.style, {
|
|
33557
33497
|
boxSizing: 'border-box',
|
|
33558
33498
|
width: '100%',
|
|
33559
33499
|
outline: 'none',
|
|
@@ -33561,7 +33501,7 @@
|
|
|
33561
33501
|
}, contentStyle);
|
|
33562
33502
|
|
|
33563
33503
|
if (options.centerVertically) {
|
|
33564
|
-
assign(content.style, {
|
|
33504
|
+
assign$1(content.style, {
|
|
33565
33505
|
position: 'absolute',
|
|
33566
33506
|
top: '50%',
|
|
33567
33507
|
transform: 'translate(0, -50%)'
|
|
@@ -33570,12 +33510,12 @@
|
|
|
33570
33510
|
|
|
33571
33511
|
content.innerText = value;
|
|
33572
33512
|
|
|
33573
|
-
|
|
33574
|
-
|
|
33575
|
-
|
|
33513
|
+
event.bind(content, 'keydown', this.keyHandler);
|
|
33514
|
+
event.bind(content, 'mousedown', stopPropagation);
|
|
33515
|
+
event.bind(content, 'paste', self.handlePaste);
|
|
33576
33516
|
|
|
33577
33517
|
if (options.autoResize) {
|
|
33578
|
-
|
|
33518
|
+
event.bind(content, 'input', this.autoResize);
|
|
33579
33519
|
}
|
|
33580
33520
|
|
|
33581
33521
|
if (options.resizable) {
|
|
@@ -33737,7 +33677,7 @@
|
|
|
33737
33677
|
maxHeight = parseInt(this.style.maxHeight) || Infinity;
|
|
33738
33678
|
|
|
33739
33679
|
if (!resizeHandle) {
|
|
33740
|
-
resizeHandle = this.resizeHandle = domify(
|
|
33680
|
+
resizeHandle = this.resizeHandle = domify$1(
|
|
33741
33681
|
'<div class="djs-direct-editing-resize-handle"></div>'
|
|
33742
33682
|
);
|
|
33743
33683
|
|
|
@@ -33755,8 +33695,8 @@
|
|
|
33755
33695
|
startWidth = bounds.width;
|
|
33756
33696
|
startHeight = bounds.height;
|
|
33757
33697
|
|
|
33758
|
-
|
|
33759
|
-
|
|
33698
|
+
event.bind(document, 'mousemove', onMouseMove);
|
|
33699
|
+
event.bind(document, 'mouseup', onMouseUp);
|
|
33760
33700
|
};
|
|
33761
33701
|
|
|
33762
33702
|
var onMouseMove = function(e) {
|
|
@@ -33781,14 +33721,14 @@
|
|
|
33781
33721
|
preventDefault(e);
|
|
33782
33722
|
stopPropagation(e);
|
|
33783
33723
|
|
|
33784
|
-
|
|
33785
|
-
|
|
33724
|
+
event.unbind(document,'mousemove', onMouseMove, false);
|
|
33725
|
+
event.unbind(document, 'mouseup', onMouseUp, false);
|
|
33786
33726
|
};
|
|
33787
33727
|
|
|
33788
|
-
|
|
33728
|
+
event.bind(resizeHandle, 'mousedown', onMouseDown);
|
|
33789
33729
|
}
|
|
33790
33730
|
|
|
33791
|
-
assign(resizeHandle.style, {
|
|
33731
|
+
assign$1(resizeHandle.style, {
|
|
33792
33732
|
position: 'absolute',
|
|
33793
33733
|
bottom: '0px',
|
|
33794
33734
|
right: '0px',
|
|
@@ -33821,10 +33761,10 @@
|
|
|
33821
33761
|
parent.removeAttribute('style');
|
|
33822
33762
|
content.removeAttribute('style');
|
|
33823
33763
|
|
|
33824
|
-
|
|
33825
|
-
|
|
33826
|
-
|
|
33827
|
-
|
|
33764
|
+
event.unbind(content, 'keydown', this.keyHandler);
|
|
33765
|
+
event.unbind(content, 'mousedown', stopPropagation);
|
|
33766
|
+
event.unbind(content, 'input', this.autoResize);
|
|
33767
|
+
event.unbind(content, 'paste', this.handlePaste);
|
|
33828
33768
|
|
|
33829
33769
|
if (resizeHandle) {
|
|
33830
33770
|
resizeHandle.removeAttribute('style');
|
|
@@ -33884,8 +33824,8 @@
|
|
|
33884
33824
|
this._providers = [];
|
|
33885
33825
|
this._textbox = new TextBox({
|
|
33886
33826
|
container: canvas.getContainer(),
|
|
33887
|
-
keyHandler: bind(this._handleKey, this),
|
|
33888
|
-
resizeHandler: bind(this._handleResize, this)
|
|
33827
|
+
keyHandler: bind$2(this._handleKey, this),
|
|
33828
|
+
resizeHandler: bind$2(this._handleResize, this)
|
|
33889
33829
|
});
|
|
33890
33830
|
}
|
|
33891
33831
|
|
|
@@ -34027,7 +33967,7 @@
|
|
|
34027
33967
|
var context;
|
|
34028
33968
|
|
|
34029
33969
|
var provider = find(this._providers, function(p) {
|
|
34030
|
-
return (context = p.activate(element)) ? p : null;
|
|
33970
|
+
return ((context = p.activate(element))) ? p : null;
|
|
34031
33971
|
});
|
|
34032
33972
|
|
|
34033
33973
|
// check if activation took place
|
|
@@ -34499,7 +34439,7 @@
|
|
|
34499
34439
|
connectionTarget: hints.connectionTarget
|
|
34500
34440
|
});
|
|
34501
34441
|
} else {
|
|
34502
|
-
elements = modeling.createElements(elements, position, target, assign({}, hints, {
|
|
34442
|
+
elements = modeling.createElements(elements, position, target, assign$1({}, hints, {
|
|
34503
34443
|
attach: attach
|
|
34504
34444
|
}));
|
|
34505
34445
|
|
|
@@ -34510,12 +34450,12 @@
|
|
|
34510
34450
|
}
|
|
34511
34451
|
|
|
34512
34452
|
// update elements and shape
|
|
34513
|
-
assign(context, {
|
|
34453
|
+
assign$1(context, {
|
|
34514
34454
|
elements: elements,
|
|
34515
34455
|
shape: shape
|
|
34516
34456
|
});
|
|
34517
34457
|
|
|
34518
|
-
assign(event, {
|
|
34458
|
+
assign$1(event, {
|
|
34519
34459
|
elements: elements,
|
|
34520
34460
|
shape: shape
|
|
34521
34461
|
});
|
|
@@ -34555,7 +34495,7 @@
|
|
|
34555
34495
|
return;
|
|
34556
34496
|
}
|
|
34557
34497
|
|
|
34558
|
-
context = assign({
|
|
34498
|
+
context = assign$1({
|
|
34559
34499
|
elements: elements,
|
|
34560
34500
|
hints: {},
|
|
34561
34501
|
shape: shape
|
|
@@ -34581,7 +34521,7 @@
|
|
|
34581
34521
|
// center elements around cursor
|
|
34582
34522
|
forEach$1(elements, function(element) {
|
|
34583
34523
|
if (isConnection$c(element)) {
|
|
34584
|
-
element.waypoints = map(element.waypoints, function(waypoint) {
|
|
34524
|
+
element.waypoints = map$1(element.waypoints, function(waypoint) {
|
|
34585
34525
|
return {
|
|
34586
34526
|
x: waypoint.x - bbox.x - bbox.width / 2,
|
|
34587
34527
|
y: waypoint.y - bbox.y - bbox.height / 2
|
|
@@ -34589,7 +34529,7 @@
|
|
|
34589
34529
|
});
|
|
34590
34530
|
}
|
|
34591
34531
|
|
|
34592
|
-
assign(element, {
|
|
34532
|
+
assign$1(element, {
|
|
34593
34533
|
x: element.x - bbox.x - bbox.width / 2,
|
|
34594
34534
|
y: element.y - bbox.y - bbox.height / 2
|
|
34595
34535
|
});
|
|
@@ -34994,7 +34934,7 @@
|
|
|
34994
34934
|
eventBus.on('copyPaste.pasteElements', function(context) {
|
|
34995
34935
|
var hints = context.hints;
|
|
34996
34936
|
|
|
34997
|
-
assign(hints, {
|
|
34937
|
+
assign$1(hints, {
|
|
34998
34938
|
createElementsBehavior: false
|
|
34999
34939
|
});
|
|
35000
34940
|
});
|
|
@@ -35108,7 +35048,7 @@
|
|
|
35108
35048
|
// center elements around cursor
|
|
35109
35049
|
forEach$1(elements, function(element) {
|
|
35110
35050
|
if (isConnection$b(element)) {
|
|
35111
|
-
element.waypoints = map(element.waypoints, function(waypoint) {
|
|
35051
|
+
element.waypoints = map$1(element.waypoints, function(waypoint) {
|
|
35112
35052
|
return {
|
|
35113
35053
|
x: waypoint.x - bbox.x - bbox.width / 2,
|
|
35114
35054
|
y: waypoint.y - bbox.y - bbox.height / 2
|
|
@@ -35116,13 +35056,13 @@
|
|
|
35116
35056
|
});
|
|
35117
35057
|
}
|
|
35118
35058
|
|
|
35119
|
-
assign(element, {
|
|
35059
|
+
assign$1(element, {
|
|
35120
35060
|
x: element.x - bbox.x - bbox.width / 2,
|
|
35121
35061
|
y: element.y - bbox.y - bbox.height / 2
|
|
35122
35062
|
});
|
|
35123
35063
|
});
|
|
35124
35064
|
|
|
35125
|
-
return this._modeling.createElements(elements, position, target, assign({}, hints));
|
|
35065
|
+
return this._modeling.createElements(elements, position, target, assign$1({}, hints));
|
|
35126
35066
|
};
|
|
35127
35067
|
|
|
35128
35068
|
/**
|
|
@@ -35145,7 +35085,7 @@
|
|
|
35145
35085
|
forEach$1(branch, function(descriptor) {
|
|
35146
35086
|
|
|
35147
35087
|
// remove priority
|
|
35148
|
-
var attrs = assign({}, omit(descriptor, [ 'priority' ]));
|
|
35088
|
+
var attrs = assign$1({}, omit(descriptor, [ 'priority' ]));
|
|
35149
35089
|
|
|
35150
35090
|
if (cache[ descriptor.parent ]) {
|
|
35151
35091
|
attrs.parent = cache[ descriptor.parent ];
|
|
@@ -35365,12 +35305,12 @@
|
|
|
35365
35305
|
return children;
|
|
35366
35306
|
});
|
|
35367
35307
|
|
|
35368
|
-
elements = map(elementsData, function(elementData) {
|
|
35308
|
+
elements = map$1(elementsData, function(elementData) {
|
|
35369
35309
|
return elementData.element;
|
|
35370
35310
|
});
|
|
35371
35311
|
|
|
35372
35312
|
// (2) copy elements
|
|
35373
|
-
elementsData = map(elementsData, function(elementData) {
|
|
35313
|
+
elementsData = map$1(elementsData, function(elementData) {
|
|
35374
35314
|
elementData.descriptor = {};
|
|
35375
35315
|
|
|
35376
35316
|
self._eventBus.fire('copyPaste.copyElement', {
|
|
@@ -35387,7 +35327,7 @@
|
|
|
35387
35327
|
return elementData.descriptor.priority;
|
|
35388
35328
|
});
|
|
35389
35329
|
|
|
35390
|
-
elements = map(elementsData, function(elementData) {
|
|
35330
|
+
elements = map$1(elementsData, function(elementData) {
|
|
35391
35331
|
return elementData.element;
|
|
35392
35332
|
});
|
|
35393
35333
|
|
|
@@ -35432,7 +35372,7 @@
|
|
|
35432
35372
|
}
|
|
35433
35373
|
|
|
35434
35374
|
function copyWaypoints$1(element) {
|
|
35435
|
-
return map(element.waypoints, function(waypoint) {
|
|
35375
|
+
return map$1(element.waypoints, function(waypoint) {
|
|
35436
35376
|
|
|
35437
35377
|
waypoint = copyWaypoint$1(waypoint);
|
|
35438
35378
|
|
|
@@ -35445,7 +35385,7 @@
|
|
|
35445
35385
|
}
|
|
35446
35386
|
|
|
35447
35387
|
function copyWaypoint$1(waypoint) {
|
|
35448
|
-
return assign({}, waypoint);
|
|
35388
|
+
return assign$1({}, waypoint);
|
|
35449
35389
|
}
|
|
35450
35390
|
|
|
35451
35391
|
function removeElement(element, elements) {
|
|
@@ -35986,7 +35926,7 @@
|
|
|
35986
35926
|
|
|
35987
35927
|
return modeling.replaceShape(
|
|
35988
35928
|
oldElement,
|
|
35989
|
-
assign(
|
|
35929
|
+
assign$1(
|
|
35990
35930
|
{},
|
|
35991
35931
|
newElementData,
|
|
35992
35932
|
{
|
|
@@ -36120,7 +36060,7 @@
|
|
|
36120
36060
|
copyProps = intersection(elementProps, newElementProps);
|
|
36121
36061
|
|
|
36122
36062
|
// initialize special properties defined in target definition
|
|
36123
|
-
assign(newBusinessObject, pick(target, CUSTOM_PROPERTIES));
|
|
36063
|
+
assign$1(newBusinessObject, pick(target, CUSTOM_PROPERTIES));
|
|
36124
36064
|
|
|
36125
36065
|
var properties = filter(copyProps, function(propertyName) {
|
|
36126
36066
|
|
|
@@ -38226,7 +38166,7 @@
|
|
|
38226
38166
|
var actions = {};
|
|
38227
38167
|
|
|
38228
38168
|
if (this._isDeleteAllowed(elements)) {
|
|
38229
|
-
assign(actions, {
|
|
38169
|
+
assign$1(actions, {
|
|
38230
38170
|
'delete': {
|
|
38231
38171
|
group: 'edit',
|
|
38232
38172
|
className: 'bpmn-icon-trash',
|
|
@@ -38332,7 +38272,7 @@
|
|
|
38332
38272
|
|
|
38333
38273
|
function appendStart(event, element) {
|
|
38334
38274
|
|
|
38335
|
-
var shape = elementFactory.createShape(assign({ type: type }, options));
|
|
38275
|
+
var shape = elementFactory.createShape(assign$1({ type: type }, options));
|
|
38336
38276
|
create.start(event, shape, {
|
|
38337
38277
|
source: element
|
|
38338
38278
|
});
|
|
@@ -38340,7 +38280,7 @@
|
|
|
38340
38280
|
|
|
38341
38281
|
|
|
38342
38282
|
var append = autoPlace ? function(event, element) {
|
|
38343
|
-
var shape = elementFactory.createShape(assign({ type: type }, options));
|
|
38283
|
+
var shape = elementFactory.createShape(assign$1({ type: type }, options));
|
|
38344
38284
|
|
|
38345
38285
|
autoPlace.append(element, shape);
|
|
38346
38286
|
} : appendStart;
|
|
@@ -38375,7 +38315,7 @@
|
|
|
38375
38315
|
|
|
38376
38316
|
var childLanes = getChildLanes(element);
|
|
38377
38317
|
|
|
38378
|
-
assign(actions, {
|
|
38318
|
+
assign$1(actions, {
|
|
38379
38319
|
'lane-insert-above': {
|
|
38380
38320
|
group: 'lane-insert-above',
|
|
38381
38321
|
className: 'bpmn-icon-lane-insert-above',
|
|
@@ -38391,7 +38331,7 @@
|
|
|
38391
38331
|
if (childLanes.length < 2) {
|
|
38392
38332
|
|
|
38393
38333
|
if (element.height >= 120) {
|
|
38394
|
-
assign(actions, {
|
|
38334
|
+
assign$1(actions, {
|
|
38395
38335
|
'lane-divide-two': {
|
|
38396
38336
|
group: 'lane-divide',
|
|
38397
38337
|
className: 'bpmn-icon-lane-divide-two',
|
|
@@ -38404,7 +38344,7 @@
|
|
|
38404
38344
|
}
|
|
38405
38345
|
|
|
38406
38346
|
if (element.height >= 180) {
|
|
38407
|
-
assign(actions, {
|
|
38347
|
+
assign$1(actions, {
|
|
38408
38348
|
'lane-divide-three': {
|
|
38409
38349
|
group: 'lane-divide',
|
|
38410
38350
|
className: 'bpmn-icon-lane-divide-three',
|
|
@@ -38417,7 +38357,7 @@
|
|
|
38417
38357
|
}
|
|
38418
38358
|
}
|
|
38419
38359
|
|
|
38420
|
-
assign(actions, {
|
|
38360
|
+
assign$1(actions, {
|
|
38421
38361
|
'lane-insert-below': {
|
|
38422
38362
|
group: 'lane-insert-below',
|
|
38423
38363
|
className: 'bpmn-icon-lane-insert-below',
|
|
@@ -38436,7 +38376,7 @@
|
|
|
38436
38376
|
|
|
38437
38377
|
if (is$1(businessObject, 'bpmn:EventBasedGateway')) {
|
|
38438
38378
|
|
|
38439
|
-
assign(actions, {
|
|
38379
|
+
assign$1(actions, {
|
|
38440
38380
|
'append.receive-task': appendAction(
|
|
38441
38381
|
'bpmn:ReceiveTask',
|
|
38442
38382
|
'bpmn-icon-receive-task',
|
|
@@ -38471,7 +38411,7 @@
|
|
|
38471
38411
|
|
|
38472
38412
|
if (isEventType(businessObject, 'bpmn:BoundaryEvent', 'bpmn:CompensateEventDefinition')) {
|
|
38473
38413
|
|
|
38474
|
-
assign(actions, {
|
|
38414
|
+
assign$1(actions, {
|
|
38475
38415
|
'append.compensation-activity':
|
|
38476
38416
|
appendAction(
|
|
38477
38417
|
'bpmn:Task',
|
|
@@ -38489,7 +38429,7 @@
|
|
|
38489
38429
|
!isEventType(businessObject, 'bpmn:IntermediateThrowEvent', 'bpmn:LinkEventDefinition') &&
|
|
38490
38430
|
!isEventSubProcess(businessObject)) {
|
|
38491
38431
|
|
|
38492
|
-
assign(actions, {
|
|
38432
|
+
assign$1(actions, {
|
|
38493
38433
|
'append.end-event': appendAction(
|
|
38494
38434
|
'bpmn:EndEvent',
|
|
38495
38435
|
'bpmn-icon-end-event-none',
|
|
@@ -38517,7 +38457,7 @@
|
|
|
38517
38457
|
if (!popupMenu.isEmpty(element, 'bpmn-replace')) {
|
|
38518
38458
|
|
|
38519
38459
|
// Replace menu entry
|
|
38520
|
-
assign(actions, {
|
|
38460
|
+
assign$1(actions, {
|
|
38521
38461
|
'replace': {
|
|
38522
38462
|
group: 'edit',
|
|
38523
38463
|
className: 'bpmn-icon-screw-wrench',
|
|
@@ -38525,7 +38465,7 @@
|
|
|
38525
38465
|
action: {
|
|
38526
38466
|
click: function(event, element) {
|
|
38527
38467
|
|
|
38528
|
-
var position = assign(getReplaceMenuPosition(element), {
|
|
38468
|
+
var position = assign$1(getReplaceMenuPosition(element), {
|
|
38529
38469
|
cursor: { x: event.x, y: event.y }
|
|
38530
38470
|
});
|
|
38531
38471
|
|
|
@@ -38537,7 +38477,7 @@
|
|
|
38537
38477
|
}
|
|
38538
38478
|
|
|
38539
38479
|
if (is$1(businessObject, 'bpmn:SequenceFlow')) {
|
|
38540
|
-
assign(actions, {
|
|
38480
|
+
assign$1(actions, {
|
|
38541
38481
|
'append.text-annotation': appendAction(
|
|
38542
38482
|
'bpmn:TextAnnotation',
|
|
38543
38483
|
'bpmn-icon-text-annotation'
|
|
@@ -38553,7 +38493,7 @@
|
|
|
38553
38493
|
'bpmn:DataStoreReference',
|
|
38554
38494
|
])
|
|
38555
38495
|
) {
|
|
38556
|
-
assign(actions, {
|
|
38496
|
+
assign$1(actions, {
|
|
38557
38497
|
'append.text-annotation': appendAction(
|
|
38558
38498
|
'bpmn:TextAnnotation',
|
|
38559
38499
|
'bpmn-icon-text-annotation'
|
|
@@ -38578,7 +38518,7 @@
|
|
|
38578
38518
|
}
|
|
38579
38519
|
|
|
38580
38520
|
if (is$1(businessObject, 'bpmn:TextAnnotation')) {
|
|
38581
|
-
assign(actions, {
|
|
38521
|
+
assign$1(actions, {
|
|
38582
38522
|
'connect': {
|
|
38583
38523
|
group: 'connect',
|
|
38584
38524
|
className: 'bpmn-icon-connection-multi',
|
|
@@ -38592,7 +38532,7 @@
|
|
|
38592
38532
|
}
|
|
38593
38533
|
|
|
38594
38534
|
if (isAny(businessObject, [ 'bpmn:DataObjectReference', 'bpmn:DataStoreReference' ])) {
|
|
38595
|
-
assign(actions, {
|
|
38535
|
+
assign$1(actions, {
|
|
38596
38536
|
'connect': {
|
|
38597
38537
|
group: 'connect',
|
|
38598
38538
|
className: 'bpmn-icon-connection-multi',
|
|
@@ -38606,7 +38546,7 @@
|
|
|
38606
38546
|
}
|
|
38607
38547
|
|
|
38608
38548
|
if (is$1(businessObject, 'bpmn:Group')) {
|
|
38609
|
-
assign(actions, {
|
|
38549
|
+
assign$1(actions, {
|
|
38610
38550
|
'append.text-annotation': appendAction('bpmn:TextAnnotation', 'bpmn-icon-text-annotation')
|
|
38611
38551
|
});
|
|
38612
38552
|
}
|
|
@@ -38621,7 +38561,7 @@
|
|
|
38621
38561
|
}
|
|
38622
38562
|
|
|
38623
38563
|
if (deleteAllowed) {
|
|
38624
|
-
assign(actions, {
|
|
38564
|
+
assign$1(actions, {
|
|
38625
38565
|
'delete': {
|
|
38626
38566
|
group: 'edit',
|
|
38627
38567
|
className: 'bpmn-icon-trash',
|
|
@@ -38951,7 +38891,7 @@
|
|
|
38951
38891
|
var entries = {};
|
|
38952
38892
|
|
|
38953
38893
|
if (this._isAllowed(elements)) {
|
|
38954
|
-
assign(entries, this._getEntries(elements));
|
|
38894
|
+
assign$1(entries, this._getEntries(elements));
|
|
38955
38895
|
}
|
|
38956
38896
|
|
|
38957
38897
|
return entries;
|
|
@@ -39531,7 +39471,7 @@
|
|
|
39531
39471
|
var snapConstraints = getSnapConstraints(event, axis);
|
|
39532
39472
|
|
|
39533
39473
|
if (snapConstraints) {
|
|
39534
|
-
assign(options, snapConstraints);
|
|
39474
|
+
assign$1(options, snapConstraints);
|
|
39535
39475
|
}
|
|
39536
39476
|
|
|
39537
39477
|
if (!isSnapped(event, axis)) {
|
|
@@ -39922,7 +39862,7 @@
|
|
|
39922
39862
|
}
|
|
39923
39863
|
|
|
39924
39864
|
// assign snapped x and width
|
|
39925
|
-
assign(newBounds, snappedNewBounds);
|
|
39865
|
+
assign$1(newBounds, snappedNewBounds);
|
|
39926
39866
|
|
|
39927
39867
|
return newBounds;
|
|
39928
39868
|
};
|
|
@@ -39966,7 +39906,7 @@
|
|
|
39966
39906
|
}
|
|
39967
39907
|
|
|
39968
39908
|
// assign snapped y and height
|
|
39969
|
-
assign(newBounds, snappedNewBounds);
|
|
39909
|
+
assign$1(newBounds, snappedNewBounds);
|
|
39970
39910
|
|
|
39971
39911
|
return newBounds;
|
|
39972
39912
|
};
|
|
@@ -40247,8 +40187,8 @@
|
|
|
40247
40187
|
}
|
|
40248
40188
|
|
|
40249
40189
|
if ('x' in snapped || 'y' in snapped) {
|
|
40250
|
-
segmentStart = assign({}, segmentStart, snapped);
|
|
40251
|
-
segmentEnd = assign({}, segmentEnd, snapped);
|
|
40190
|
+
segmentStart = assign$1({}, segmentStart, snapped);
|
|
40191
|
+
segmentEnd = assign$1({}, segmentEnd, snapped);
|
|
40252
40192
|
}
|
|
40253
40193
|
|
|
40254
40194
|
return [ segmentStart, segmentEnd ];
|
|
@@ -40629,7 +40569,7 @@
|
|
|
40629
40569
|
|
|
40630
40570
|
var self = this;
|
|
40631
40571
|
|
|
40632
|
-
this._config = assign({}, DEFAULT_CONFIG, config || {});
|
|
40572
|
+
this._config = assign$1({}, DEFAULT_CONFIG, config || {});
|
|
40633
40573
|
|
|
40634
40574
|
keyboard.addListener(HIGHER_PRIORITY$3, function(event) {
|
|
40635
40575
|
|
|
@@ -40880,7 +40820,7 @@
|
|
|
40880
40820
|
};
|
|
40881
40821
|
}
|
|
40882
40822
|
|
|
40883
|
-
context = assign({ shape: shape }, contextOrDirection);
|
|
40823
|
+
context = assign$1({ shape: shape }, contextOrDirection);
|
|
40884
40824
|
|
|
40885
40825
|
direction = context.direction;
|
|
40886
40826
|
|
|
@@ -41085,7 +41025,7 @@
|
|
|
41085
41025
|
|
|
41086
41026
|
// add new selection markers ONLY if single selection
|
|
41087
41027
|
if (newSelection.length === 1) {
|
|
41088
|
-
forEach$1(newSelection, bind(self.addResizer, self));
|
|
41028
|
+
forEach$1(newSelection, bind$2(self.addResizer, self));
|
|
41089
41029
|
}
|
|
41090
41030
|
});
|
|
41091
41031
|
|
|
@@ -41112,8 +41052,8 @@
|
|
|
41112
41052
|
}
|
|
41113
41053
|
}
|
|
41114
41054
|
|
|
41115
|
-
|
|
41116
|
-
|
|
41055
|
+
event.bind(gfx, 'mousedown', startResize);
|
|
41056
|
+
event.bind(gfx, 'touchstart', startResize);
|
|
41117
41057
|
};
|
|
41118
41058
|
|
|
41119
41059
|
|
|
@@ -41388,7 +41328,7 @@
|
|
|
41388
41328
|
// bounds
|
|
41389
41329
|
var bounds = this.getEditingBBox(element);
|
|
41390
41330
|
|
|
41391
|
-
assign(context, bounds);
|
|
41331
|
+
assign$1(context, bounds);
|
|
41392
41332
|
|
|
41393
41333
|
var options = {};
|
|
41394
41334
|
|
|
@@ -41402,27 +41342,27 @@
|
|
|
41402
41342
|
]) ||
|
|
41403
41343
|
isCollapsedSubProcess(element)
|
|
41404
41344
|
) {
|
|
41405
|
-
assign(options, {
|
|
41345
|
+
assign$1(options, {
|
|
41406
41346
|
centerVertically: true
|
|
41407
41347
|
});
|
|
41408
41348
|
}
|
|
41409
41349
|
|
|
41410
41350
|
// external labels
|
|
41411
41351
|
if (isLabelExternal(element)) {
|
|
41412
|
-
assign(options, {
|
|
41352
|
+
assign$1(options, {
|
|
41413
41353
|
autoResize: true
|
|
41414
41354
|
});
|
|
41415
41355
|
}
|
|
41416
41356
|
|
|
41417
41357
|
// text annotations
|
|
41418
41358
|
if (is$1(element, 'bpmn:TextAnnotation')) {
|
|
41419
|
-
assign(options, {
|
|
41359
|
+
assign$1(options, {
|
|
41420
41360
|
resizable: true,
|
|
41421
41361
|
autoResize: true
|
|
41422
41362
|
});
|
|
41423
41363
|
}
|
|
41424
41364
|
|
|
41425
|
-
assign(context, {
|
|
41365
|
+
assign$1(context, {
|
|
41426
41366
|
options: options
|
|
41427
41367
|
});
|
|
41428
41368
|
|
|
@@ -41472,14 +41412,14 @@
|
|
|
41472
41412
|
// adjust for expanded pools AND lanes
|
|
41473
41413
|
if (is$1(element, 'bpmn:Lane') || isExpandedPool(element)) {
|
|
41474
41414
|
|
|
41475
|
-
assign(bounds, {
|
|
41415
|
+
assign$1(bounds, {
|
|
41476
41416
|
width: bbox.height,
|
|
41477
41417
|
height: 30 * zoom,
|
|
41478
41418
|
x: bbox.x - bbox.height / 2 + (15 * zoom),
|
|
41479
41419
|
y: mid.y - (30 * zoom) / 2
|
|
41480
41420
|
});
|
|
41481
41421
|
|
|
41482
|
-
assign(style, {
|
|
41422
|
+
assign$1(style, {
|
|
41483
41423
|
fontSize: defaultFontSize + 'px',
|
|
41484
41424
|
lineHeight: defaultLineHeight,
|
|
41485
41425
|
paddingTop: (7 * zoom) + 'px',
|
|
@@ -41497,12 +41437,12 @@
|
|
|
41497
41437
|
isCollapsedPool(element) ||
|
|
41498
41438
|
isCollapsedSubProcess(element)) {
|
|
41499
41439
|
|
|
41500
|
-
assign(bounds, {
|
|
41440
|
+
assign$1(bounds, {
|
|
41501
41441
|
width: bbox.width,
|
|
41502
41442
|
height: bbox.height
|
|
41503
41443
|
});
|
|
41504
41444
|
|
|
41505
|
-
assign(style, {
|
|
41445
|
+
assign$1(style, {
|
|
41506
41446
|
fontSize: defaultFontSize + 'px',
|
|
41507
41447
|
lineHeight: defaultLineHeight,
|
|
41508
41448
|
paddingTop: (7 * zoom) + 'px',
|
|
@@ -41515,12 +41455,12 @@
|
|
|
41515
41455
|
|
|
41516
41456
|
// internal labels for expanded sub processes
|
|
41517
41457
|
if (isExpandedSubProcess$1(element)) {
|
|
41518
|
-
assign(bounds, {
|
|
41458
|
+
assign$1(bounds, {
|
|
41519
41459
|
width: bbox.width,
|
|
41520
41460
|
x: bbox.x
|
|
41521
41461
|
});
|
|
41522
41462
|
|
|
41523
|
-
assign(style, {
|
|
41463
|
+
assign$1(style, {
|
|
41524
41464
|
fontSize: defaultFontSize + 'px',
|
|
41525
41465
|
lineHeight: defaultLineHeight,
|
|
41526
41466
|
paddingTop: (7 * zoom) + 'px',
|
|
@@ -41536,14 +41476,14 @@
|
|
|
41536
41476
|
|
|
41537
41477
|
// external labels for events, data elements, gateways, groups and connections
|
|
41538
41478
|
if (target.labelTarget) {
|
|
41539
|
-
assign(bounds, {
|
|
41479
|
+
assign$1(bounds, {
|
|
41540
41480
|
width: width,
|
|
41541
41481
|
height: bbox.height + paddingTop + paddingBottom,
|
|
41542
41482
|
x: mid.x - width / 2,
|
|
41543
41483
|
y: bbox.y - paddingTop
|
|
41544
41484
|
});
|
|
41545
41485
|
|
|
41546
|
-
assign(style, {
|
|
41486
|
+
assign$1(style, {
|
|
41547
41487
|
fontSize: externalFontSize + 'px',
|
|
41548
41488
|
lineHeight: externalLineHeight,
|
|
41549
41489
|
paddingTop: paddingTop + 'px',
|
|
@@ -41567,14 +41507,14 @@
|
|
|
41567
41507
|
|
|
41568
41508
|
var height = externalFontSize + paddingTop + paddingBottom;
|
|
41569
41509
|
|
|
41570
|
-
assign(bounds, {
|
|
41510
|
+
assign$1(bounds, {
|
|
41571
41511
|
width: width,
|
|
41572
41512
|
height: height,
|
|
41573
41513
|
x: absoluteBBox.x - width / 2,
|
|
41574
41514
|
y: absoluteBBox.y - height / 2
|
|
41575
41515
|
});
|
|
41576
41516
|
|
|
41577
|
-
assign(style, {
|
|
41517
|
+
assign$1(style, {
|
|
41578
41518
|
fontSize: externalFontSize + 'px',
|
|
41579
41519
|
lineHeight: externalLineHeight,
|
|
41580
41520
|
paddingTop: paddingTop + 'px',
|
|
@@ -41584,14 +41524,14 @@
|
|
|
41584
41524
|
|
|
41585
41525
|
// text annotations
|
|
41586
41526
|
if (is$1(element, 'bpmn:TextAnnotation')) {
|
|
41587
|
-
assign(bounds, {
|
|
41527
|
+
assign$1(bounds, {
|
|
41588
41528
|
width: bbox.width,
|
|
41589
41529
|
height: bbox.height,
|
|
41590
41530
|
minWidth: 30 * zoom,
|
|
41591
41531
|
minHeight: 10 * zoom
|
|
41592
41532
|
});
|
|
41593
41533
|
|
|
41594
|
-
assign(style, {
|
|
41534
|
+
assign$1(style, {
|
|
41595
41535
|
textAlign: 'left',
|
|
41596
41536
|
paddingTop: (5 * zoom) + 'px',
|
|
41597
41537
|
paddingBottom: (7 * zoom) + 'px',
|
|
@@ -42354,7 +42294,7 @@
|
|
|
42354
42294
|
var participantBounds = getParticipantBounds(shape, childrenBBox);
|
|
42355
42295
|
|
|
42356
42296
|
// assign width and height
|
|
42357
|
-
assign(shape, participantBounds);
|
|
42297
|
+
assign$1(shape, participantBounds);
|
|
42358
42298
|
|
|
42359
42299
|
// assign create constraints
|
|
42360
42300
|
context.createConstraints = getParticipantCreateConstraints(shape, childrenBBox);
|
|
@@ -43270,7 +43210,7 @@
|
|
|
43270
43210
|
}
|
|
43271
43211
|
|
|
43272
43212
|
function copy(obj) {
|
|
43273
|
-
return assign({}, obj);
|
|
43213
|
+
return assign$1({}, obj);
|
|
43274
43214
|
}
|
|
43275
43215
|
|
|
43276
43216
|
function EventBasedGatewayBehavior(eventBus, modeling) {
|
|
@@ -44714,7 +44654,7 @@
|
|
|
44714
44654
|
element.di = di;
|
|
44715
44655
|
}
|
|
44716
44656
|
|
|
44717
|
-
assign(di.label.bounds, {
|
|
44657
|
+
assign$1(di.label.bounds, {
|
|
44718
44658
|
x: element.x,
|
|
44719
44659
|
y: element.y,
|
|
44720
44660
|
width: element.width,
|
|
@@ -44727,7 +44667,7 @@
|
|
|
44727
44667
|
var context = event.context,
|
|
44728
44668
|
connection = context.connection,
|
|
44729
44669
|
label = connection.label,
|
|
44730
|
-
hints = assign({}, context.hints),
|
|
44670
|
+
hints = assign$1({}, context.hints),
|
|
44731
44671
|
newWaypoints = context.newWaypoints || connection.waypoints,
|
|
44732
44672
|
oldWaypoints = context.oldWaypoints;
|
|
44733
44673
|
|
|
@@ -44969,7 +44909,7 @@
|
|
|
44969
44909
|
|
|
44970
44910
|
var context = event.context,
|
|
44971
44911
|
connection = context.connection,
|
|
44972
|
-
hints = assign({}, context.hints),
|
|
44912
|
+
hints = assign$1({}, context.hints),
|
|
44973
44913
|
newWaypoints = context.newWaypoints || connection.waypoints,
|
|
44974
44914
|
oldWaypoints = context.oldWaypoints;
|
|
44975
44915
|
|
|
@@ -45142,7 +45082,7 @@
|
|
|
45142
45082
|
}
|
|
45143
45083
|
|
|
45144
45084
|
function getWaypointsInsideBounds(waypoints, bounds) {
|
|
45145
|
-
var originalWaypoints = map(waypoints, getOriginal);
|
|
45085
|
+
var originalWaypoints = map$1(waypoints, getOriginal);
|
|
45146
45086
|
|
|
45147
45087
|
return filter(originalWaypoints, function(waypoint) {
|
|
45148
45088
|
return isInsideBounds(waypoint, bounds);
|
|
@@ -48275,7 +48215,7 @@
|
|
|
48275
48215
|
return element !== root && !element.labelTarget;
|
|
48276
48216
|
});
|
|
48277
48217
|
|
|
48278
|
-
diElements = map(elements, getDi);
|
|
48218
|
+
diElements = map$1(elements, getDi);
|
|
48279
48219
|
|
|
48280
48220
|
rootDi.set('planeElement', diElements);
|
|
48281
48221
|
});
|
|
@@ -48701,7 +48641,7 @@
|
|
|
48701
48641
|
|
|
48702
48642
|
this._currentExecution.trigger = 'execute';
|
|
48703
48643
|
|
|
48704
|
-
|
|
48644
|
+
const action = { command: command, context: context };
|
|
48705
48645
|
|
|
48706
48646
|
this._pushAction(action);
|
|
48707
48647
|
this._internalExecute(action);
|
|
@@ -48731,11 +48671,11 @@
|
|
|
48731
48671
|
*/
|
|
48732
48672
|
CommandStack.prototype.canExecute = function(command, context) {
|
|
48733
48673
|
|
|
48734
|
-
|
|
48674
|
+
const action = { command: command, context: context };
|
|
48735
48675
|
|
|
48736
|
-
|
|
48676
|
+
const handler = this._getHandler(command);
|
|
48737
48677
|
|
|
48738
|
-
|
|
48678
|
+
let result = this._fire(command, 'canExecute', action);
|
|
48739
48679
|
|
|
48740
48680
|
// handler#canExecute will only be called if no listener
|
|
48741
48681
|
// decided on a result already
|
|
@@ -48770,7 +48710,7 @@
|
|
|
48770
48710
|
* Undo last command(s)
|
|
48771
48711
|
*/
|
|
48772
48712
|
CommandStack.prototype.undo = function() {
|
|
48773
|
-
|
|
48713
|
+
let action = this._getUndoAction(),
|
|
48774
48714
|
next;
|
|
48775
48715
|
|
|
48776
48716
|
if (action) {
|
|
@@ -48798,7 +48738,7 @@
|
|
|
48798
48738
|
* Redo last command(s)
|
|
48799
48739
|
*/
|
|
48800
48740
|
CommandStack.prototype.redo = function() {
|
|
48801
|
-
|
|
48741
|
+
let action = this._getRedoAction(),
|
|
48802
48742
|
next;
|
|
48803
48743
|
|
|
48804
48744
|
if (action) {
|
|
@@ -48846,7 +48786,7 @@
|
|
|
48846
48786
|
throw new Error('command and handlerCls must be defined');
|
|
48847
48787
|
}
|
|
48848
48788
|
|
|
48849
|
-
|
|
48789
|
+
const handler = this._injector.instantiate(handlerCls);
|
|
48850
48790
|
this.register(command, handler);
|
|
48851
48791
|
};
|
|
48852
48792
|
|
|
@@ -48873,24 +48813,22 @@
|
|
|
48873
48813
|
// internal functionality //////////////////////
|
|
48874
48814
|
|
|
48875
48815
|
CommandStack.prototype._internalUndo = function(action) {
|
|
48876
|
-
|
|
48877
|
-
|
|
48878
|
-
var command = action.command,
|
|
48879
|
-
context = action.context;
|
|
48816
|
+
const command = action.command,
|
|
48817
|
+
context = action.context;
|
|
48880
48818
|
|
|
48881
|
-
|
|
48819
|
+
const handler = this._getHandler(command);
|
|
48882
48820
|
|
|
48883
48821
|
// guard against illegal nested command stack invocations
|
|
48884
|
-
this._atomicDo(
|
|
48885
|
-
|
|
48822
|
+
this._atomicDo(() => {
|
|
48823
|
+
this._fire(command, 'revert', action);
|
|
48886
48824
|
|
|
48887
48825
|
if (handler.revert) {
|
|
48888
|
-
|
|
48826
|
+
this._markDirty(handler.revert(context));
|
|
48889
48827
|
}
|
|
48890
48828
|
|
|
48891
|
-
|
|
48829
|
+
this._revertedAction(action);
|
|
48892
48830
|
|
|
48893
|
-
|
|
48831
|
+
this._fire(command, 'reverted', action);
|
|
48894
48832
|
});
|
|
48895
48833
|
};
|
|
48896
48834
|
|
|
@@ -48901,12 +48839,12 @@
|
|
|
48901
48839
|
qualifier = null;
|
|
48902
48840
|
}
|
|
48903
48841
|
|
|
48904
|
-
|
|
48905
|
-
|
|
48842
|
+
const names = qualifier ? [ command + '.' + qualifier, qualifier ] : [ command ];
|
|
48843
|
+
let result;
|
|
48906
48844
|
|
|
48907
48845
|
event = this._eventBus.createEvent(event);
|
|
48908
48846
|
|
|
48909
|
-
for (
|
|
48847
|
+
for (const name of names) {
|
|
48910
48848
|
result = this._eventBus.fire('commandStack.' + name, event);
|
|
48911
48849
|
|
|
48912
48850
|
if (event.cancelBubble) {
|
|
@@ -48923,7 +48861,7 @@
|
|
|
48923
48861
|
|
|
48924
48862
|
CommandStack.prototype._atomicDo = function(fn) {
|
|
48925
48863
|
|
|
48926
|
-
|
|
48864
|
+
const execution = this._currentExecution;
|
|
48927
48865
|
|
|
48928
48866
|
execution.atomic = true;
|
|
48929
48867
|
|
|
@@ -48935,12 +48873,10 @@
|
|
|
48935
48873
|
};
|
|
48936
48874
|
|
|
48937
48875
|
CommandStack.prototype._internalExecute = function(action, redo) {
|
|
48938
|
-
|
|
48939
|
-
|
|
48940
|
-
var command = action.command,
|
|
48941
|
-
context = action.context;
|
|
48876
|
+
const command = action.command,
|
|
48877
|
+
context = action.context;
|
|
48942
48878
|
|
|
48943
|
-
|
|
48879
|
+
const handler = this._getHandler(command);
|
|
48944
48880
|
|
|
48945
48881
|
if (!handler) {
|
|
48946
48882
|
throw new Error('no command handler registered for <' + command + '>');
|
|
@@ -48959,20 +48895,20 @@
|
|
|
48959
48895
|
}
|
|
48960
48896
|
|
|
48961
48897
|
// guard against illegal nested command stack invocations
|
|
48962
|
-
this._atomicDo(
|
|
48898
|
+
this._atomicDo(() => {
|
|
48963
48899
|
|
|
48964
|
-
|
|
48900
|
+
this._fire(command, 'execute', action);
|
|
48965
48901
|
|
|
48966
48902
|
if (handler.execute) {
|
|
48967
48903
|
|
|
48968
48904
|
// actual execute + mark return results as dirty
|
|
48969
|
-
|
|
48905
|
+
this._markDirty(handler.execute(context));
|
|
48970
48906
|
}
|
|
48971
48907
|
|
|
48972
48908
|
// log to stack
|
|
48973
|
-
|
|
48909
|
+
this._executedAction(action, redo);
|
|
48974
48910
|
|
|
48975
|
-
|
|
48911
|
+
this._fire(command, 'executed', action);
|
|
48976
48912
|
});
|
|
48977
48913
|
|
|
48978
48914
|
if (!redo) {
|
|
@@ -48991,10 +48927,10 @@
|
|
|
48991
48927
|
|
|
48992
48928
|
CommandStack.prototype._pushAction = function(action) {
|
|
48993
48929
|
|
|
48994
|
-
|
|
48995
|
-
|
|
48930
|
+
const execution = this._currentExecution,
|
|
48931
|
+
actions = execution.actions;
|
|
48996
48932
|
|
|
48997
|
-
|
|
48933
|
+
const baseAction = actions[0];
|
|
48998
48934
|
|
|
48999
48935
|
if (execution.atomic) {
|
|
49000
48936
|
throw new Error('illegal invocation in <execute> or <revert> phase (action: ' + action.command + ')');
|
|
@@ -49009,10 +48945,10 @@
|
|
|
49009
48945
|
|
|
49010
48946
|
|
|
49011
48947
|
CommandStack.prototype._popAction = function() {
|
|
49012
|
-
|
|
49013
|
-
|
|
49014
|
-
|
|
49015
|
-
|
|
48948
|
+
const execution = this._currentExecution,
|
|
48949
|
+
trigger = execution.trigger,
|
|
48950
|
+
actions = execution.actions,
|
|
48951
|
+
dirty = execution.dirty;
|
|
49016
48952
|
|
|
49017
48953
|
actions.pop();
|
|
49018
48954
|
|
|
@@ -49029,7 +48965,7 @@
|
|
|
49029
48965
|
|
|
49030
48966
|
|
|
49031
48967
|
CommandStack.prototype._markDirty = function(elements) {
|
|
49032
|
-
|
|
48968
|
+
const execution = this._currentExecution;
|
|
49033
48969
|
|
|
49034
48970
|
if (!elements) {
|
|
49035
48971
|
return;
|
|
@@ -49042,7 +48978,7 @@
|
|
|
49042
48978
|
|
|
49043
48979
|
|
|
49044
48980
|
CommandStack.prototype._executedAction = function(action, redo) {
|
|
49045
|
-
|
|
48981
|
+
const stackIdx = ++this._stackIdx;
|
|
49046
48982
|
|
|
49047
48983
|
if (!redo) {
|
|
49048
48984
|
this._stack.splice(stackIdx, this._stack.length, action);
|
|
@@ -49080,11 +49016,11 @@
|
|
|
49080
49016
|
|
|
49081
49017
|
|
|
49082
49018
|
function createRoot(parentNode) {
|
|
49083
|
-
var root = domify(
|
|
49019
|
+
var root = domify$1(
|
|
49084
49020
|
'<div class="djs-tooltip-container" />'
|
|
49085
49021
|
);
|
|
49086
49022
|
|
|
49087
|
-
assign
|
|
49023
|
+
assign(root, {
|
|
49088
49024
|
position: 'absolute',
|
|
49089
49025
|
width: '0',
|
|
49090
49026
|
height: '0'
|
|
@@ -49097,7 +49033,7 @@
|
|
|
49097
49033
|
|
|
49098
49034
|
|
|
49099
49035
|
function setPosition(el, x, y) {
|
|
49100
|
-
assign
|
|
49036
|
+
assign(el, { left: x + 'px', top: y + 'px' });
|
|
49101
49037
|
}
|
|
49102
49038
|
|
|
49103
49039
|
function setVisible(el, visible) {
|
|
@@ -49219,7 +49155,7 @@
|
|
|
49219
49155
|
|
|
49220
49156
|
var id = this._ids.next();
|
|
49221
49157
|
|
|
49222
|
-
tooltip = assign({}, this._tooltipDefaults, tooltip, {
|
|
49158
|
+
tooltip = assign$1({}, this._tooltipDefaults, tooltip, {
|
|
49223
49159
|
id: id
|
|
49224
49160
|
});
|
|
49225
49161
|
|
|
@@ -49358,11 +49294,11 @@
|
|
|
49358
49294
|
// create proper html elements from
|
|
49359
49295
|
// tooltip HTML strings
|
|
49360
49296
|
if (isString(html)) {
|
|
49361
|
-
html = domify(html);
|
|
49297
|
+
html = domify$1(html);
|
|
49362
49298
|
}
|
|
49363
49299
|
|
|
49364
|
-
htmlContainer = domify('<div data-tooltip-id="' + id + '" class="' + tooltipClass + '">');
|
|
49365
|
-
assign
|
|
49300
|
+
htmlContainer = domify$1('<div data-tooltip-id="' + id + '" class="' + tooltipClass + '">');
|
|
49301
|
+
assign(htmlContainer, { position: 'absolute' });
|
|
49366
49302
|
|
|
49367
49303
|
htmlContainer.appendChild(html);
|
|
49368
49304
|
|
|
@@ -49897,7 +49833,7 @@
|
|
|
49897
49833
|
* @return {Array<djs.model.Base>}
|
|
49898
49834
|
*/
|
|
49899
49835
|
function getAttachers(shapes) {
|
|
49900
|
-
return flatten(map(shapes, function(s) {
|
|
49836
|
+
return flatten(map$1(shapes, function(s) {
|
|
49901
49837
|
return s.attachers || [];
|
|
49902
49838
|
}));
|
|
49903
49839
|
}
|
|
@@ -50419,7 +50355,7 @@
|
|
|
50419
50355
|
|
|
50420
50356
|
var spaceToolConstraints = getSpaceToolConstraints(elements, axis, direction, start, minDimensions);
|
|
50421
50357
|
|
|
50422
|
-
assign(
|
|
50358
|
+
assign$1(
|
|
50423
50359
|
context,
|
|
50424
50360
|
elements,
|
|
50425
50361
|
{
|
|
@@ -51040,7 +50976,7 @@
|
|
|
51040
50976
|
|
|
51041
50977
|
|
|
51042
50978
|
BpmnFactory.prototype.createDiShape = function(semantic, attrs) {
|
|
51043
|
-
return this.create('bpmndi:BPMNShape', assign({
|
|
50979
|
+
return this.create('bpmndi:BPMNShape', assign$1({
|
|
51044
50980
|
bpmnElement: semantic,
|
|
51045
50981
|
bounds: this.createDiBounds()
|
|
51046
50982
|
}, attrs));
|
|
@@ -51055,7 +50991,7 @@
|
|
|
51055
50991
|
BpmnFactory.prototype.createDiWaypoints = function(waypoints) {
|
|
51056
50992
|
var self = this;
|
|
51057
50993
|
|
|
51058
|
-
return map(waypoints, function(pos) {
|
|
50994
|
+
return map$1(waypoints, function(pos) {
|
|
51059
50995
|
return self.createDiWaypoint(pos);
|
|
51060
50996
|
});
|
|
51061
50997
|
};
|
|
@@ -51066,14 +51002,14 @@
|
|
|
51066
51002
|
|
|
51067
51003
|
|
|
51068
51004
|
BpmnFactory.prototype.createDiEdge = function(semantic, attrs) {
|
|
51069
|
-
return this.create('bpmndi:BPMNEdge', assign({
|
|
51005
|
+
return this.create('bpmndi:BPMNEdge', assign$1({
|
|
51070
51006
|
bpmnElement: semantic,
|
|
51071
51007
|
waypoint: this.createDiWaypoints([])
|
|
51072
51008
|
}, attrs));
|
|
51073
51009
|
};
|
|
51074
51010
|
|
|
51075
51011
|
BpmnFactory.prototype.createDiPlane = function(semantic, attrs) {
|
|
51076
|
-
return this.create('bpmndi:BPMNPlane', assign({
|
|
51012
|
+
return this.create('bpmndi:BPMNPlane', assign$1({
|
|
51077
51013
|
bpmnElement: semantic
|
|
51078
51014
|
}, attrs));
|
|
51079
51015
|
};
|
|
@@ -51403,7 +51339,7 @@
|
|
|
51403
51339
|
if (embeddedLabelBounds) {
|
|
51404
51340
|
var embeddedLabelBoundsDelta = delta(embeddedLabelBounds, di.get('bounds'));
|
|
51405
51341
|
|
|
51406
|
-
assign(embeddedLabelBounds, {
|
|
51342
|
+
assign$1(embeddedLabelBounds, {
|
|
51407
51343
|
x: shape.x + embeddedLabelBoundsDelta.x,
|
|
51408
51344
|
y: shape.y + embeddedLabelBoundsDelta.y
|
|
51409
51345
|
});
|
|
@@ -51418,7 +51354,7 @@
|
|
|
51418
51354
|
target.set('bounds', bounds);
|
|
51419
51355
|
}
|
|
51420
51356
|
|
|
51421
|
-
assign(bounds, {
|
|
51357
|
+
assign$1(bounds, {
|
|
51422
51358
|
x: shape.x,
|
|
51423
51359
|
y: shape.y,
|
|
51424
51360
|
width: shape.width,
|
|
@@ -51837,7 +51773,7 @@
|
|
|
51837
51773
|
// and wired via attrs
|
|
51838
51774
|
if (elementType === 'label') {
|
|
51839
51775
|
var di = attrs.di || this._bpmnFactory.createDiLabel();
|
|
51840
|
-
return this.baseCreate(elementType, assign({ type: 'label', di: di }, DEFAULT_LABEL_SIZE, attrs));
|
|
51776
|
+
return this.baseCreate(elementType, assign$1({ type: 'label', di: di }, DEFAULT_LABEL_SIZE, attrs));
|
|
51841
51777
|
}
|
|
51842
51778
|
|
|
51843
51779
|
return this.createBpmnElement(elementType, attrs);
|
|
@@ -51847,7 +51783,7 @@
|
|
|
51847
51783
|
var size,
|
|
51848
51784
|
translate = this._translate;
|
|
51849
51785
|
|
|
51850
|
-
attrs = assign({}, attrs || {});
|
|
51786
|
+
attrs = assign$1({}, attrs || {});
|
|
51851
51787
|
|
|
51852
51788
|
var businessObject = attrs.businessObject,
|
|
51853
51789
|
di = attrs.di;
|
|
@@ -51863,7 +51799,7 @@
|
|
|
51863
51799
|
}
|
|
51864
51800
|
|
|
51865
51801
|
if (!isModdleDi(di)) {
|
|
51866
|
-
var diAttrs = assign(
|
|
51802
|
+
var diAttrs = assign$1(
|
|
51867
51803
|
{},
|
|
51868
51804
|
di || {},
|
|
51869
51805
|
{ id: businessObject.id + '_di' }
|
|
@@ -51880,7 +51816,7 @@
|
|
|
51880
51816
|
}
|
|
51881
51817
|
|
|
51882
51818
|
if (is$1(businessObject, 'bpmn:Group')) {
|
|
51883
|
-
attrs = assign({
|
|
51819
|
+
attrs = assign$1({
|
|
51884
51820
|
isFrame: true
|
|
51885
51821
|
}, attrs);
|
|
51886
51822
|
}
|
|
@@ -51925,7 +51861,7 @@
|
|
|
51925
51861
|
|
|
51926
51862
|
size = this.getDefaultSize(businessObject, di);
|
|
51927
51863
|
|
|
51928
|
-
attrs = assign({
|
|
51864
|
+
attrs = assign$1({
|
|
51929
51865
|
id: businessObject.id
|
|
51930
51866
|
}, size, attrs, {
|
|
51931
51867
|
businessObject: businessObject,
|
|
@@ -52006,7 +51942,7 @@
|
|
|
52006
51942
|
attrs = { isExpanded: attrs };
|
|
52007
51943
|
}
|
|
52008
51944
|
|
|
52009
|
-
attrs = assign({ type: 'bpmn:Participant' }, attrs || {});
|
|
51945
|
+
attrs = assign$1({ type: 'bpmn:Participant' }, attrs || {});
|
|
52010
51946
|
|
|
52011
51947
|
// participants are expanded by default
|
|
52012
51948
|
if (attrs.isExpanded !== false) {
|
|
@@ -52288,7 +52224,7 @@
|
|
|
52288
52224
|
// center elements around position
|
|
52289
52225
|
forEach$1(elements, function(element) {
|
|
52290
52226
|
if (isConnection$5(element)) {
|
|
52291
|
-
element.waypoints = map(element.waypoints, function(waypoint) {
|
|
52227
|
+
element.waypoints = map$1(element.waypoints, function(waypoint) {
|
|
52292
52228
|
return {
|
|
52293
52229
|
x: round$3(waypoint.x - bbox.x - bbox.width / 2 + position.x),
|
|
52294
52230
|
y: round$3(waypoint.y - bbox.y - bbox.height / 2 + position.y)
|
|
@@ -52296,7 +52232,7 @@
|
|
|
52296
52232
|
});
|
|
52297
52233
|
}
|
|
52298
52234
|
|
|
52299
|
-
assign(element, {
|
|
52235
|
+
assign$1(element, {
|
|
52300
52236
|
x: round$3(element.x - bbox.x - bbox.width / 2 + position.x),
|
|
52301
52237
|
y: round$3(element.y - bbox.y - bbox.height / 2 + position.y)
|
|
52302
52238
|
});
|
|
@@ -52328,7 +52264,7 @@
|
|
|
52328
52264
|
return;
|
|
52329
52265
|
}
|
|
52330
52266
|
|
|
52331
|
-
var createShapeHints = assign({}, hints);
|
|
52267
|
+
var createShapeHints = assign$1({}, hints);
|
|
52332
52268
|
|
|
52333
52269
|
if (parents.indexOf(element) === -1) {
|
|
52334
52270
|
createShapeHints.autoResize = false;
|
|
@@ -52401,9 +52337,9 @@
|
|
|
52401
52337
|
|
|
52402
52338
|
// (1) add at event center position _or_ at given bounds
|
|
52403
52339
|
if (positionOrBounds.width !== undefined) {
|
|
52404
|
-
assign(shape, positionOrBounds);
|
|
52340
|
+
assign$1(shape, positionOrBounds);
|
|
52405
52341
|
} else {
|
|
52406
|
-
assign(shape, {
|
|
52342
|
+
assign$1(shape, {
|
|
52407
52343
|
x: positionOrBounds.x - round$2(shape.width / 2),
|
|
52408
52344
|
y: positionOrBounds.y - round$2(shape.height / 2)
|
|
52409
52345
|
});
|
|
@@ -52858,7 +52794,7 @@
|
|
|
52858
52794
|
|
|
52859
52795
|
var oldWaypoints = connection.waypoints;
|
|
52860
52796
|
|
|
52861
|
-
assign(context, {
|
|
52797
|
+
assign$1(context, {
|
|
52862
52798
|
oldWaypoints: oldWaypoints
|
|
52863
52799
|
});
|
|
52864
52800
|
|
|
@@ -52970,7 +52906,7 @@
|
|
|
52970
52906
|
|
|
52971
52907
|
var newClosure = getClosure(elements, !!isTopLevel, this);
|
|
52972
52908
|
|
|
52973
|
-
assign(this, newClosure);
|
|
52909
|
+
assign$1(this, newClosure);
|
|
52974
52910
|
|
|
52975
52911
|
return this;
|
|
52976
52912
|
};
|
|
@@ -53125,7 +53061,7 @@
|
|
|
53125
53061
|
add(newParent.children, shape, newParentIndex);
|
|
53126
53062
|
|
|
53127
53063
|
// update shape parent + position
|
|
53128
|
-
assign(shape, {
|
|
53064
|
+
assign$1(shape, {
|
|
53129
53065
|
parent: newParent,
|
|
53130
53066
|
x: shape.x + delta.x,
|
|
53131
53067
|
y: shape.y + delta.y
|
|
@@ -53173,7 +53109,7 @@
|
|
|
53173
53109
|
add(oldParent.children, shape, oldParentIndex);
|
|
53174
53110
|
|
|
53175
53111
|
// revert to old position and parent
|
|
53176
|
-
assign(shape, {
|
|
53112
|
+
assign$1(shape, {
|
|
53177
53113
|
parent: oldParent,
|
|
53178
53114
|
x: shape.x - delta.x,
|
|
53179
53115
|
y: shape.y - delta.y
|
|
@@ -53488,7 +53424,7 @@
|
|
|
53488
53424
|
};
|
|
53489
53425
|
|
|
53490
53426
|
// update shape
|
|
53491
|
-
assign(shape, {
|
|
53427
|
+
assign$1(shape, {
|
|
53492
53428
|
width: newBounds.width,
|
|
53493
53429
|
height: newBounds.height,
|
|
53494
53430
|
x: newBounds.x,
|
|
@@ -53529,7 +53465,7 @@
|
|
|
53529
53465
|
oldBounds = context.oldBounds;
|
|
53530
53466
|
|
|
53531
53467
|
// restore previous bbox
|
|
53532
|
-
assign(shape, {
|
|
53468
|
+
assign$1(shape, {
|
|
53533
53469
|
width: oldBounds.width,
|
|
53534
53470
|
height: oldBounds.height,
|
|
53535
53471
|
x: oldBounds.x,
|
|
@@ -53637,7 +53573,7 @@
|
|
|
53637
53573
|
if (includes$1(affectedShapes, source) && includes$1(affectedShapes, target)) {
|
|
53638
53574
|
|
|
53639
53575
|
// move waypoints
|
|
53640
|
-
waypoints = map(waypoints, function(waypoint) {
|
|
53576
|
+
waypoints = map$1(waypoints, function(waypoint) {
|
|
53641
53577
|
if (shouldMoveWaypoint(waypoint, start, direction)) {
|
|
53642
53578
|
|
|
53643
53579
|
// move waypoint
|
|
@@ -53682,11 +53618,11 @@
|
|
|
53682
53618
|
// helpers //////////
|
|
53683
53619
|
|
|
53684
53620
|
function copyWaypoint(waypoint) {
|
|
53685
|
-
return assign({}, waypoint);
|
|
53621
|
+
return assign$1({}, waypoint);
|
|
53686
53622
|
}
|
|
53687
53623
|
|
|
53688
53624
|
function copyWaypoints(connection) {
|
|
53689
|
-
return map(connection.waypoints, function(waypoint) {
|
|
53625
|
+
return map$1(connection.waypoints, function(waypoint) {
|
|
53690
53626
|
|
|
53691
53627
|
waypoint = copyWaypoint(waypoint);
|
|
53692
53628
|
|
|
@@ -53799,7 +53735,7 @@
|
|
|
53799
53735
|
result[element.id] = element.hidden;
|
|
53800
53736
|
|
|
53801
53737
|
if (element.children) {
|
|
53802
|
-
result = assign({}, result, getElementsVisibilityRecursive(element.children));
|
|
53738
|
+
result = assign$1({}, result, getElementsVisibilityRecursive(element.children));
|
|
53803
53739
|
}
|
|
53804
53740
|
});
|
|
53805
53741
|
|
|
@@ -54382,7 +54318,7 @@
|
|
|
54382
54318
|
hints = {};
|
|
54383
54319
|
}
|
|
54384
54320
|
|
|
54385
|
-
this.reconnect(connection, newSource, connection.target, dockingOrPoints, assign(hints, {
|
|
54321
|
+
this.reconnect(connection, newSource, connection.target, dockingOrPoints, assign$1(hints, {
|
|
54386
54322
|
docking: 'source'
|
|
54387
54323
|
}));
|
|
54388
54324
|
};
|
|
@@ -54392,7 +54328,7 @@
|
|
|
54392
54328
|
hints = {};
|
|
54393
54329
|
}
|
|
54394
54330
|
|
|
54395
|
-
this.reconnect(connection, connection.source, newTarget, dockingOrPoints, assign(hints, {
|
|
54331
|
+
this.reconnect(connection, connection.source, newTarget, dockingOrPoints, assign$1(hints, {
|
|
54396
54332
|
docking: 'target'
|
|
54397
54333
|
}));
|
|
54398
54334
|
};
|
|
@@ -54721,7 +54657,7 @@
|
|
|
54721
54657
|
*/
|
|
54722
54658
|
function unwrapBusinessObjects(properties) {
|
|
54723
54659
|
|
|
54724
|
-
var unwrappedProps = assign({}, properties);
|
|
54660
|
+
var unwrappedProps = assign$1({}, properties);
|
|
54725
54661
|
|
|
54726
54662
|
referencePropertyNames.forEach(function(name) {
|
|
54727
54663
|
if (name in properties) {
|
|
@@ -55346,12 +55282,12 @@
|
|
|
55346
55282
|
var di = {};
|
|
55347
55283
|
|
|
55348
55284
|
if ('fill' in colors) {
|
|
55349
|
-
assign(di, {
|
|
55285
|
+
assign$1(di, {
|
|
55350
55286
|
'background-color': this._normalizeColor(colors.fill) });
|
|
55351
55287
|
}
|
|
55352
55288
|
|
|
55353
55289
|
if ('stroke' in colors) {
|
|
55354
|
-
assign(di, {
|
|
55290
|
+
assign$1(di, {
|
|
55355
55291
|
'border-color': this._normalizeColor(colors.stroke) });
|
|
55356
55292
|
}
|
|
55357
55293
|
|
|
@@ -56131,7 +56067,7 @@
|
|
|
56131
56067
|
end = getMid(target);
|
|
56132
56068
|
}
|
|
56133
56069
|
|
|
56134
|
-
hints = assign({ preferredLayouts: [] }, hints);
|
|
56070
|
+
hints = assign$1({ preferredLayouts: [] }, hints);
|
|
56135
56071
|
waypoints = waypoints || [];
|
|
56136
56072
|
|
|
56137
56073
|
var preferredLayouts = hints.preferredLayouts,
|
|
@@ -56631,7 +56567,7 @@
|
|
|
56631
56567
|
}
|
|
56632
56568
|
|
|
56633
56569
|
if (manhattanOptions) {
|
|
56634
|
-
manhattanOptions = assign(manhattanOptions, hints);
|
|
56570
|
+
manhattanOptions = assign$1(manhattanOptions, hints);
|
|
56635
56571
|
|
|
56636
56572
|
updatedWaypoints = withoutRedundantPoints(repairConnection(
|
|
56637
56573
|
source,
|
|
@@ -56917,7 +56853,7 @@
|
|
|
56917
56853
|
|
|
56918
56854
|
// use the dockings actual point and
|
|
56919
56855
|
// retain the original docking
|
|
56920
|
-
return assign({ original: docking.point.original || docking.point }, docking.actual);
|
|
56856
|
+
return assign$1({ original: docking.point.original || docking.point }, docking.actual);
|
|
56921
56857
|
}
|
|
56922
56858
|
|
|
56923
56859
|
|
|
@@ -57097,7 +57033,7 @@
|
|
|
57097
57033
|
shapes = removeNested(shapes);
|
|
57098
57034
|
|
|
57099
57035
|
// attach shapes to drag context
|
|
57100
|
-
assign(context, {
|
|
57036
|
+
assign$1(context, {
|
|
57101
57037
|
shapes: shapes,
|
|
57102
57038
|
validatedShapes: shapes,
|
|
57103
57039
|
shape: shape
|
|
@@ -57309,7 +57245,7 @@
|
|
|
57309
57245
|
function getAllDraggedElements(shapes) {
|
|
57310
57246
|
var allShapes = selfAndAllChildren(shapes, true);
|
|
57311
57247
|
|
|
57312
|
-
var allConnections = map(allShapes, function(shape) {
|
|
57248
|
+
var allConnections = map$1(allShapes, function(shape) {
|
|
57313
57249
|
return (shape.incoming || []).concat(shape.outgoing || []);
|
|
57314
57250
|
});
|
|
57315
57251
|
|
|
@@ -57645,7 +57581,7 @@
|
|
|
57645
57581
|
|
|
57646
57582
|
var parentContainer = this._getParentContainer();
|
|
57647
57583
|
|
|
57648
|
-
var container = this._container = domify(Palette.HTML_MARKUP);
|
|
57584
|
+
var container = this._container = domify$1(Palette.HTML_MARKUP);
|
|
57649
57585
|
|
|
57650
57586
|
parentContainer.appendChild(container);
|
|
57651
57587
|
classes$1(parentContainer).add(PALETTE_PREFIX + PALETTE_SHOWN_CLS);
|
|
@@ -57654,7 +57590,7 @@
|
|
|
57654
57590
|
|
|
57655
57591
|
var target = event.delegateTarget;
|
|
57656
57592
|
|
|
57657
|
-
if (
|
|
57593
|
+
if (matches(target, TOGGLE_SELECTOR)) {
|
|
57658
57594
|
return self.toggle();
|
|
57659
57595
|
}
|
|
57660
57596
|
|
|
@@ -57662,7 +57598,7 @@
|
|
|
57662
57598
|
});
|
|
57663
57599
|
|
|
57664
57600
|
// prevent drag propagation
|
|
57665
|
-
|
|
57601
|
+
event.bind(container, 'mousedown', function(event) {
|
|
57666
57602
|
event.stopPropagation();
|
|
57667
57603
|
});
|
|
57668
57604
|
|
|
@@ -57743,7 +57679,7 @@
|
|
|
57743
57679
|
|
|
57744
57680
|
var container = query('[data-group=' + cssEscape(grouping) + ']', entriesContainer);
|
|
57745
57681
|
if (!container) {
|
|
57746
|
-
container = domify('<div class="group"></div>');
|
|
57682
|
+
container = domify$1('<div class="group"></div>');
|
|
57747
57683
|
attr$1(container, 'data-group', grouping);
|
|
57748
57684
|
|
|
57749
57685
|
entriesContainer.appendChild(container);
|
|
@@ -57755,7 +57691,7 @@
|
|
|
57755
57691
|
'<div class="entry" draggable="true"></div>');
|
|
57756
57692
|
|
|
57757
57693
|
|
|
57758
|
-
var control = domify(html);
|
|
57694
|
+
var control = domify$1(html);
|
|
57759
57695
|
container.appendChild(control);
|
|
57760
57696
|
|
|
57761
57697
|
if (!entry.separator) {
|
|
@@ -57770,7 +57706,7 @@
|
|
|
57770
57706
|
}
|
|
57771
57707
|
|
|
57772
57708
|
if (entry.imageUrl) {
|
|
57773
|
-
var image = domify('<img>');
|
|
57709
|
+
var image = domify$1('<img>');
|
|
57774
57710
|
attr$1(image, 'src', entry.imageUrl);
|
|
57775
57711
|
|
|
57776
57712
|
control.appendChild(image);
|
|
@@ -58594,7 +58530,7 @@
|
|
|
58594
58530
|
function createAction(type, group, className, title, options) {
|
|
58595
58531
|
|
|
58596
58532
|
function createListener(event) {
|
|
58597
|
-
var shape = elementFactory.createShape(assign({ type: type }, options));
|
|
58533
|
+
var shape = elementFactory.createShape(assign$1({ type: type }, options));
|
|
58598
58534
|
|
|
58599
58535
|
if (options) {
|
|
58600
58536
|
var di = getDi(shape);
|
|
@@ -58643,7 +58579,7 @@
|
|
|
58643
58579
|
create.start(event, elementFactory.createParticipantShape());
|
|
58644
58580
|
}
|
|
58645
58581
|
|
|
58646
|
-
assign(actions, {
|
|
58582
|
+
assign$1(actions, {
|
|
58647
58583
|
'hand-tool': {
|
|
58648
58584
|
group: 'tools',
|
|
58649
58585
|
className: 'bpmn-icon-hand-tool',
|
|
@@ -58790,7 +58726,7 @@
|
|
|
58790
58726
|
|
|
58791
58727
|
var element = elementRegistry.get(id);
|
|
58792
58728
|
|
|
58793
|
-
assign(newElement, { x: element.x, y: element.y });
|
|
58729
|
+
assign$1(newElement, { x: element.x, y: element.y });
|
|
58794
58730
|
|
|
58795
58731
|
// create a temporary shape
|
|
58796
58732
|
var tempShape = elementFactory.createShape(newElement);
|
|
@@ -59814,7 +59750,7 @@
|
|
|
59814
59750
|
this._canvas = canvas;
|
|
59815
59751
|
|
|
59816
59752
|
// delay hide by 1000 seconds since last snap
|
|
59817
|
-
this._asyncHide = debounce(bind(this.hide, this), SNAP_LINE_HIDE_DELAY);
|
|
59753
|
+
this._asyncHide = debounce(bind$2(this.hide, this), SNAP_LINE_HIDE_DELAY);
|
|
59818
59754
|
}
|
|
59819
59755
|
|
|
59820
59756
|
Snapping.$inject = [ 'canvas' ];
|
|
@@ -59979,7 +59915,7 @@
|
|
|
59979
59915
|
this._selection = selection;
|
|
59980
59916
|
|
|
59981
59917
|
// setup elements
|
|
59982
|
-
this._container = domify(SearchPad.BOX_HTML);
|
|
59918
|
+
this._container = domify$1(SearchPad.BOX_HTML);
|
|
59983
59919
|
this._searchInput = query(SearchPad.INPUT_SELECTOR, this._container);
|
|
59984
59920
|
this._resultsContainer = query(SearchPad.RESULTS_CONTAINER_SELECTOR, this._container);
|
|
59985
59921
|
|
|
@@ -60216,7 +60152,7 @@
|
|
|
60216
60152
|
* @return {Element}
|
|
60217
60153
|
*/
|
|
60218
60154
|
SearchPad.prototype._createResultNode = function(result, id) {
|
|
60219
|
-
var node = domify(SearchPad.RESULT_HTML);
|
|
60155
|
+
var node = domify$1(SearchPad.RESULT_HTML);
|
|
60220
60156
|
|
|
60221
60157
|
// create only if available
|
|
60222
60158
|
if (result.primaryTokens.length > 0) {
|
|
@@ -60402,9 +60338,9 @@
|
|
|
60402
60338
|
height: h + 'px'
|
|
60403
60339
|
};
|
|
60404
60340
|
|
|
60405
|
-
var html = domify('<div class="' + SearchPad.OVERLAY_CLASS + '"></div>');
|
|
60341
|
+
var html = domify$1('<div class="' + SearchPad.OVERLAY_CLASS + '"></div>');
|
|
60406
60342
|
|
|
60407
|
-
assign
|
|
60343
|
+
assign(html, styles);
|
|
60408
60344
|
|
|
60409
60345
|
return {
|
|
60410
60346
|
position: {
|
|
@@ -60426,7 +60362,7 @@
|
|
|
60426
60362
|
*/
|
|
60427
60363
|
function createInnerTextNode(parentNode, tokens, template) {
|
|
60428
60364
|
var text = createHtmlText(tokens);
|
|
60429
|
-
var childNode = domify(template);
|
|
60365
|
+
var childNode = domify$1(template);
|
|
60430
60366
|
childNode.innerHTML = text;
|
|
60431
60367
|
parentNode.appendChild(childNode);
|
|
60432
60368
|
}
|
|
@@ -60542,7 +60478,7 @@
|
|
|
60542
60478
|
return element !== rootElement;
|
|
60543
60479
|
});
|
|
60544
60480
|
|
|
60545
|
-
elements = map(elements, function(element) {
|
|
60481
|
+
elements = map$1(elements, function(element) {
|
|
60546
60482
|
return {
|
|
60547
60483
|
primaryTokens: matchAndSplit(getLabel(element), pattern),
|
|
60548
60484
|
secondaryTokens: matchAndSplit(element.id, pattern),
|