bpmn-js 9.0.4 → 9.1.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/assets/diagram-js.css +9 -17
- package/dist/bpmn-modeler.development.js +1483 -764
- package/dist/bpmn-modeler.production.min.js +8 -9
- package/dist/bpmn-navigated-viewer.development.js +1120 -430
- package/dist/bpmn-navigated-viewer.production.min.js +6 -7
- package/dist/bpmn-viewer.development.js +1118 -428
- package/dist/bpmn-viewer.production.min.js +6 -7
- package/lib/BaseViewer.js +13 -3
- package/lib/features/interaction-events/BpmnInteractionEvents.js +12 -0
- package/lib/features/label-editing/LabelEditingProvider.js +2 -1
- package/lib/util/PoweredByUtil.js +59 -44
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* bpmn-js - bpmn-navigated-viewer v9.0
|
|
2
|
+
* bpmn-js - bpmn-navigated-viewer v9.1.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-05-
|
|
11
|
+
* Date: 2022-05-18
|
|
12
12
|
*/
|
|
13
13
|
(function (global, factory) {
|
|
14
14
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -58,29 +58,29 @@
|
|
|
58
58
|
* @return {Array<?>}
|
|
59
59
|
*/
|
|
60
60
|
|
|
61
|
-
var nativeToString = Object.prototype.toString;
|
|
62
|
-
var nativeHasOwnProperty = Object.prototype.hasOwnProperty;
|
|
63
|
-
function isUndefined$
|
|
61
|
+
var nativeToString$2 = Object.prototype.toString;
|
|
62
|
+
var nativeHasOwnProperty$2 = Object.prototype.hasOwnProperty;
|
|
63
|
+
function isUndefined$3(obj) {
|
|
64
64
|
return obj === undefined;
|
|
65
65
|
}
|
|
66
66
|
function isDefined(obj) {
|
|
67
67
|
return obj !== undefined;
|
|
68
68
|
}
|
|
69
|
-
function isArray$
|
|
70
|
-
return nativeToString.call(obj) === '[object Array]';
|
|
69
|
+
function isArray$3(obj) {
|
|
70
|
+
return nativeToString$2.call(obj) === '[object Array]';
|
|
71
71
|
}
|
|
72
72
|
function isObject(obj) {
|
|
73
|
-
return nativeToString.call(obj) === '[object Object]';
|
|
73
|
+
return nativeToString$2.call(obj) === '[object Object]';
|
|
74
74
|
}
|
|
75
75
|
function isNumber(obj) {
|
|
76
|
-
return nativeToString.call(obj) === '[object Number]';
|
|
76
|
+
return nativeToString$2.call(obj) === '[object Number]';
|
|
77
77
|
}
|
|
78
78
|
function isFunction(obj) {
|
|
79
|
-
var tag = nativeToString.call(obj);
|
|
79
|
+
var tag = nativeToString$2.call(obj);
|
|
80
80
|
return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object AsyncGeneratorFunction]' || tag === '[object Proxy]';
|
|
81
81
|
}
|
|
82
82
|
function isString(obj) {
|
|
83
|
-
return nativeToString.call(obj) === '[object String]';
|
|
83
|
+
return nativeToString$2.call(obj) === '[object String]';
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
86
86
|
* Return true, if target owns a property with the given key.
|
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
* @return {Boolean}
|
|
92
92
|
*/
|
|
93
93
|
|
|
94
|
-
function has(target, key) {
|
|
95
|
-
return nativeHasOwnProperty.call(target, key);
|
|
94
|
+
function has$2(target, key) {
|
|
95
|
+
return nativeHasOwnProperty$2.call(target, key);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
/**
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
function find(collection, matcher) {
|
|
108
108
|
matcher = toMatcher(matcher);
|
|
109
109
|
var match;
|
|
110
|
-
forEach(collection, function (val, key) {
|
|
110
|
+
forEach$2(collection, function (val, key) {
|
|
111
111
|
if (matcher(val, key)) {
|
|
112
112
|
match = val;
|
|
113
113
|
return false;
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
|
|
127
127
|
function filter(collection, matcher) {
|
|
128
128
|
var result = [];
|
|
129
|
-
forEach(collection, function (val, key) {
|
|
129
|
+
forEach$2(collection, function (val, key) {
|
|
130
130
|
if (matcher(val, key)) {
|
|
131
131
|
result.push(val);
|
|
132
132
|
}
|
|
@@ -143,17 +143,17 @@
|
|
|
143
143
|
* @return {Object} return result that stopped the iteration
|
|
144
144
|
*/
|
|
145
145
|
|
|
146
|
-
function forEach(collection, iterator) {
|
|
146
|
+
function forEach$2(collection, iterator) {
|
|
147
147
|
var val, result;
|
|
148
148
|
|
|
149
|
-
if (isUndefined$
|
|
149
|
+
if (isUndefined$3(collection)) {
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
var convertKey = isArray$
|
|
153
|
+
var convertKey = isArray$3(collection) ? toNum$2 : identity$2;
|
|
154
154
|
|
|
155
155
|
for (var key in collection) {
|
|
156
|
-
if (has(collection, key)) {
|
|
156
|
+
if (has$2(collection, key)) {
|
|
157
157
|
val = collection[key];
|
|
158
158
|
result = iterator(val, convertKey(key));
|
|
159
159
|
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
*/
|
|
175
175
|
|
|
176
176
|
function reduce(collection, iterator, result) {
|
|
177
|
-
forEach(collection, function (value, idx) {
|
|
177
|
+
forEach$2(collection, function (value, idx) {
|
|
178
178
|
result = iterator(result, value, idx);
|
|
179
179
|
});
|
|
180
180
|
return result;
|
|
@@ -217,9 +217,9 @@
|
|
|
217
217
|
* @return {Array} transformed collection
|
|
218
218
|
*/
|
|
219
219
|
|
|
220
|
-
function map
|
|
220
|
+
function map(collection, fn) {
|
|
221
221
|
var result = [];
|
|
222
|
-
forEach(collection, function (val, key) {
|
|
222
|
+
forEach$2(collection, function (val, key) {
|
|
223
223
|
result.push(fn(val, key));
|
|
224
224
|
});
|
|
225
225
|
return result;
|
|
@@ -252,11 +252,11 @@
|
|
|
252
252
|
};
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
-
function identity(arg) {
|
|
255
|
+
function identity$2(arg) {
|
|
256
256
|
return arg;
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
function toNum(arg) {
|
|
259
|
+
function toNum$2(arg) {
|
|
260
260
|
return Number(arg);
|
|
261
261
|
}
|
|
262
262
|
|
|
@@ -338,7 +338,7 @@
|
|
|
338
338
|
* @return {Function} bound function
|
|
339
339
|
*/
|
|
340
340
|
|
|
341
|
-
function bind
|
|
341
|
+
function bind(fn, target) {
|
|
342
342
|
return fn.bind(target);
|
|
343
343
|
}
|
|
344
344
|
|
|
@@ -388,7 +388,7 @@
|
|
|
388
388
|
function pick(target, properties) {
|
|
389
389
|
var result = {};
|
|
390
390
|
var obj = Object(target);
|
|
391
|
-
forEach(properties, function (prop) {
|
|
391
|
+
forEach$2(properties, function (prop) {
|
|
392
392
|
if (prop in obj) {
|
|
393
393
|
result[prop] = target[prop];
|
|
394
394
|
}
|
|
@@ -407,7 +407,7 @@
|
|
|
407
407
|
function omit(target, properties) {
|
|
408
408
|
var result = {};
|
|
409
409
|
var obj = Object(target);
|
|
410
|
-
forEach(obj, function (prop, key) {
|
|
410
|
+
forEach$2(obj, function (prop, key) {
|
|
411
411
|
if (properties.indexOf(key) === -1) {
|
|
412
412
|
result[key] = prop;
|
|
413
413
|
}
|
|
@@ -822,9 +822,9 @@
|
|
|
822
822
|
return -1;
|
|
823
823
|
}
|
|
824
824
|
|
|
825
|
-
var re$
|
|
825
|
+
var re$2 = /\s+/;
|
|
826
826
|
|
|
827
|
-
var toString$
|
|
827
|
+
var toString$2 = Object.prototype.toString;
|
|
828
828
|
|
|
829
829
|
function defined(o) {
|
|
830
830
|
return typeof o !== 'undefined';
|
|
@@ -838,11 +838,11 @@
|
|
|
838
838
|
* @api public
|
|
839
839
|
*/
|
|
840
840
|
|
|
841
|
-
function classes$
|
|
842
|
-
return new ClassList$
|
|
841
|
+
function classes$2(el) {
|
|
842
|
+
return new ClassList$2(el);
|
|
843
843
|
}
|
|
844
844
|
|
|
845
|
-
function ClassList$
|
|
845
|
+
function ClassList$2(el) {
|
|
846
846
|
if (!el || !el.nodeType) {
|
|
847
847
|
throw new Error('A DOM element reference is required');
|
|
848
848
|
}
|
|
@@ -858,7 +858,7 @@
|
|
|
858
858
|
* @api public
|
|
859
859
|
*/
|
|
860
860
|
|
|
861
|
-
ClassList$
|
|
861
|
+
ClassList$2.prototype.add = function(name) {
|
|
862
862
|
|
|
863
863
|
// classList
|
|
864
864
|
if (this.list) {
|
|
@@ -892,8 +892,8 @@
|
|
|
892
892
|
* @api public
|
|
893
893
|
*/
|
|
894
894
|
|
|
895
|
-
ClassList$
|
|
896
|
-
if ('[object RegExp]' === toString$
|
|
895
|
+
ClassList$2.prototype.remove = function(name) {
|
|
896
|
+
if ('[object RegExp]' === toString$2.call(name)) {
|
|
897
897
|
return this.removeMatching(name);
|
|
898
898
|
}
|
|
899
899
|
|
|
@@ -921,7 +921,7 @@
|
|
|
921
921
|
* @api private
|
|
922
922
|
*/
|
|
923
923
|
|
|
924
|
-
ClassList$
|
|
924
|
+
ClassList$2.prototype.removeMatching = function(re) {
|
|
925
925
|
var arr = this.array();
|
|
926
926
|
for (var i = 0; i < arr.length; i++) {
|
|
927
927
|
if (re.test(arr[i])) {
|
|
@@ -943,7 +943,7 @@
|
|
|
943
943
|
* @api public
|
|
944
944
|
*/
|
|
945
945
|
|
|
946
|
-
ClassList$
|
|
946
|
+
ClassList$2.prototype.toggle = function(name, force) {
|
|
947
947
|
// classList
|
|
948
948
|
if (this.list) {
|
|
949
949
|
if (defined(force)) {
|
|
@@ -981,10 +981,10 @@
|
|
|
981
981
|
* @api public
|
|
982
982
|
*/
|
|
983
983
|
|
|
984
|
-
ClassList$
|
|
984
|
+
ClassList$2.prototype.array = function() {
|
|
985
985
|
var className = this.el.getAttribute('class') || '';
|
|
986
986
|
var str = className.replace(/^\s+|\s+$/g, '');
|
|
987
|
-
var arr = str.split(re$
|
|
987
|
+
var arr = str.split(re$2);
|
|
988
988
|
if ('' === arr[0]) {
|
|
989
989
|
arr.shift();
|
|
990
990
|
}
|
|
@@ -999,8 +999,8 @@
|
|
|
999
999
|
* @api public
|
|
1000
1000
|
*/
|
|
1001
1001
|
|
|
1002
|
-
ClassList$
|
|
1003
|
-
ClassList$
|
|
1002
|
+
ClassList$2.prototype.has =
|
|
1003
|
+
ClassList$2.prototype.contains = function(name) {
|
|
1004
1004
|
return (
|
|
1005
1005
|
this.list ?
|
|
1006
1006
|
this.list.contains(name) :
|
|
@@ -1008,7 +1008,7 @@
|
|
|
1008
1008
|
);
|
|
1009
1009
|
};
|
|
1010
1010
|
|
|
1011
|
-
function remove$
|
|
1011
|
+
function remove$3(element) {
|
|
1012
1012
|
var parent = element.parentNode;
|
|
1013
1013
|
|
|
1014
1014
|
if (parent) {
|
|
@@ -1032,7 +1032,7 @@
|
|
|
1032
1032
|
var child;
|
|
1033
1033
|
|
|
1034
1034
|
while ((child = element.firstChild)) {
|
|
1035
|
-
remove$
|
|
1035
|
+
remove$3(child);
|
|
1036
1036
|
}
|
|
1037
1037
|
|
|
1038
1038
|
return element;
|
|
@@ -1048,7 +1048,7 @@
|
|
|
1048
1048
|
|
|
1049
1049
|
var SVG_START = '<svg xmlns="' + ns.svg + '"';
|
|
1050
1050
|
|
|
1051
|
-
function parse$
|
|
1051
|
+
function parse$2(svg) {
|
|
1052
1052
|
|
|
1053
1053
|
var unwrap = false;
|
|
1054
1054
|
|
|
@@ -1108,7 +1108,7 @@
|
|
|
1108
1108
|
var element;
|
|
1109
1109
|
|
|
1110
1110
|
if (name.charAt(0) === '<') {
|
|
1111
|
-
element = parse$
|
|
1111
|
+
element = parse$2(name).firstChild;
|
|
1112
1112
|
element = document.importNode(element, true);
|
|
1113
1113
|
} else {
|
|
1114
1114
|
element = document.createElementNS(ns.svg, name);
|
|
@@ -1260,7 +1260,7 @@
|
|
|
1260
1260
|
|
|
1261
1261
|
function set$1(element, svg) {
|
|
1262
1262
|
|
|
1263
|
-
var parsed = parse$
|
|
1263
|
+
var parsed = parse$2(svg);
|
|
1264
1264
|
|
|
1265
1265
|
// clear element contents
|
|
1266
1266
|
clear$1(element);
|
|
@@ -1539,34 +1539,104 @@
|
|
|
1539
1539
|
}
|
|
1540
1540
|
|
|
1541
1541
|
/**
|
|
1542
|
-
*
|
|
1542
|
+
* Flatten array, one level deep.
|
|
1543
1543
|
*
|
|
1544
|
-
* @param {
|
|
1545
|
-
*
|
|
1546
|
-
* @
|
|
1547
|
-
* @api public
|
|
1544
|
+
* @param {Array<?>} arr
|
|
1545
|
+
*
|
|
1546
|
+
* @return {Array<?>}
|
|
1548
1547
|
*/
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1548
|
+
|
|
1549
|
+
var nativeToString$1 = Object.prototype.toString;
|
|
1550
|
+
var nativeHasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
1551
|
+
function isUndefined$2(obj) {
|
|
1552
|
+
return obj === undefined;
|
|
1553
|
+
}
|
|
1554
|
+
function isArray$2(obj) {
|
|
1555
|
+
return nativeToString$1.call(obj) === '[object Array]';
|
|
1556
|
+
}
|
|
1557
|
+
/**
|
|
1558
|
+
* Return true, if target owns a property with the given key.
|
|
1559
|
+
*
|
|
1560
|
+
* @param {Object} target
|
|
1561
|
+
* @param {String} key
|
|
1562
|
+
*
|
|
1563
|
+
* @return {Boolean}
|
|
1564
|
+
*/
|
|
1565
|
+
|
|
1566
|
+
function has$1(target, key) {
|
|
1567
|
+
return nativeHasOwnProperty$1.call(target, key);
|
|
1568
|
+
}
|
|
1569
|
+
/**
|
|
1570
|
+
* Iterate over collection; returning something
|
|
1571
|
+
* (non-undefined) will stop iteration.
|
|
1572
|
+
*
|
|
1573
|
+
* @param {Array|Object} collection
|
|
1574
|
+
* @param {Function} iterator
|
|
1575
|
+
*
|
|
1576
|
+
* @return {Object} return result that stopped the iteration
|
|
1577
|
+
*/
|
|
1578
|
+
|
|
1579
|
+
function forEach$1(collection, iterator) {
|
|
1580
|
+
var val, result;
|
|
1581
|
+
|
|
1582
|
+
if (isUndefined$2(collection)) {
|
|
1583
|
+
return;
|
|
1553
1584
|
}
|
|
1554
1585
|
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1586
|
+
var convertKey = isArray$2(collection) ? toNum$1 : identity$1;
|
|
1587
|
+
|
|
1588
|
+
for (var key in collection) {
|
|
1589
|
+
if (has$1(collection, key)) {
|
|
1590
|
+
val = collection[key];
|
|
1591
|
+
result = iterator(val, convertKey(key));
|
|
1592
|
+
|
|
1593
|
+
if (result === false) {
|
|
1594
|
+
return val;
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1558
1597
|
}
|
|
1598
|
+
}
|
|
1559
1599
|
|
|
1560
|
-
|
|
1561
|
-
|
|
1600
|
+
function identity$1(arg) {
|
|
1601
|
+
return arg;
|
|
1602
|
+
}
|
|
1562
1603
|
|
|
1563
|
-
|
|
1604
|
+
function toNum$1(arg) {
|
|
1605
|
+
return Number(arg);
|
|
1564
1606
|
}
|
|
1565
1607
|
|
|
1566
|
-
|
|
1608
|
+
/**
|
|
1609
|
+
* Assigns style attributes in a style-src compliant way.
|
|
1610
|
+
*
|
|
1611
|
+
* @param {Element} element
|
|
1612
|
+
* @param {...Object} styleSources
|
|
1613
|
+
*
|
|
1614
|
+
* @return {Element} the element
|
|
1615
|
+
*/
|
|
1616
|
+
function assign$1$1(element) {
|
|
1617
|
+
var target = element.style;
|
|
1567
1618
|
|
|
1568
|
-
|
|
1569
|
-
|
|
1619
|
+
for (var _len = arguments.length, styleSources = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1620
|
+
styleSources[_key - 1] = arguments[_key];
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1623
|
+
forEach$1(styleSources, function (style) {
|
|
1624
|
+
if (!style) {
|
|
1625
|
+
return;
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
forEach$1(style, function (value, key) {
|
|
1629
|
+
target[key] = value;
|
|
1630
|
+
});
|
|
1631
|
+
});
|
|
1632
|
+
|
|
1633
|
+
return element;
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
var indexOf$1 = [].indexOf;
|
|
1637
|
+
|
|
1638
|
+
var indexof$1 = function(arr, obj){
|
|
1639
|
+
if (indexOf$1) return arr.indexOf(obj);
|
|
1570
1640
|
for (var i = 0; i < arr.length; ++i) {
|
|
1571
1641
|
if (arr[i] === obj) return i;
|
|
1572
1642
|
}
|
|
@@ -1583,13 +1653,13 @@
|
|
|
1583
1653
|
* Whitespace regexp.
|
|
1584
1654
|
*/
|
|
1585
1655
|
|
|
1586
|
-
var re = /\s+/;
|
|
1656
|
+
var re$1 = /\s+/;
|
|
1587
1657
|
|
|
1588
1658
|
/**
|
|
1589
1659
|
* toString reference.
|
|
1590
1660
|
*/
|
|
1591
1661
|
|
|
1592
|
-
var toString = Object.prototype.toString;
|
|
1662
|
+
var toString$1 = Object.prototype.toString;
|
|
1593
1663
|
|
|
1594
1664
|
/**
|
|
1595
1665
|
* Wrap `el` in a `ClassList`.
|
|
@@ -1599,8 +1669,8 @@
|
|
|
1599
1669
|
* @api public
|
|
1600
1670
|
*/
|
|
1601
1671
|
|
|
1602
|
-
function classes(el) {
|
|
1603
|
-
return new ClassList(el);
|
|
1672
|
+
function classes$1(el) {
|
|
1673
|
+
return new ClassList$1(el);
|
|
1604
1674
|
}
|
|
1605
1675
|
|
|
1606
1676
|
/**
|
|
@@ -1610,7 +1680,7 @@
|
|
|
1610
1680
|
* @api private
|
|
1611
1681
|
*/
|
|
1612
1682
|
|
|
1613
|
-
function ClassList(el) {
|
|
1683
|
+
function ClassList$1(el) {
|
|
1614
1684
|
if (!el || !el.nodeType) {
|
|
1615
1685
|
throw new Error('A DOM element reference is required');
|
|
1616
1686
|
}
|
|
@@ -1626,7 +1696,7 @@
|
|
|
1626
1696
|
* @api public
|
|
1627
1697
|
*/
|
|
1628
1698
|
|
|
1629
|
-
ClassList.prototype.add = function (name) {
|
|
1699
|
+
ClassList$1.prototype.add = function (name) {
|
|
1630
1700
|
// classList
|
|
1631
1701
|
if (this.list) {
|
|
1632
1702
|
this.list.add(name);
|
|
@@ -1635,7 +1705,7 @@
|
|
|
1635
1705
|
|
|
1636
1706
|
// fallback
|
|
1637
1707
|
var arr = this.array();
|
|
1638
|
-
var i = indexof(arr, name);
|
|
1708
|
+
var i = indexof$1(arr, name);
|
|
1639
1709
|
if (!~i) arr.push(name);
|
|
1640
1710
|
this.el.className = arr.join(' ');
|
|
1641
1711
|
return this;
|
|
@@ -1651,8 +1721,8 @@
|
|
|
1651
1721
|
* @api public
|
|
1652
1722
|
*/
|
|
1653
1723
|
|
|
1654
|
-
ClassList.prototype.remove = function (name) {
|
|
1655
|
-
if ('[object RegExp]' == toString.call(name)) {
|
|
1724
|
+
ClassList$1.prototype.remove = function (name) {
|
|
1725
|
+
if ('[object RegExp]' == toString$1.call(name)) {
|
|
1656
1726
|
return this.removeMatching(name);
|
|
1657
1727
|
}
|
|
1658
1728
|
|
|
@@ -1664,7 +1734,7 @@
|
|
|
1664
1734
|
|
|
1665
1735
|
// fallback
|
|
1666
1736
|
var arr = this.array();
|
|
1667
|
-
var i = indexof(arr, name);
|
|
1737
|
+
var i = indexof$1(arr, name);
|
|
1668
1738
|
if (~i) arr.splice(i, 1);
|
|
1669
1739
|
this.el.className = arr.join(' ');
|
|
1670
1740
|
return this;
|
|
@@ -1678,7 +1748,7 @@
|
|
|
1678
1748
|
* @api private
|
|
1679
1749
|
*/
|
|
1680
1750
|
|
|
1681
|
-
ClassList.prototype.removeMatching = function (re) {
|
|
1751
|
+
ClassList$1.prototype.removeMatching = function (re) {
|
|
1682
1752
|
var arr = this.array();
|
|
1683
1753
|
for (var i = 0; i < arr.length; i++) {
|
|
1684
1754
|
if (re.test(arr[i])) {
|
|
@@ -1700,7 +1770,7 @@
|
|
|
1700
1770
|
* @api public
|
|
1701
1771
|
*/
|
|
1702
1772
|
|
|
1703
|
-
ClassList.prototype.toggle = function (name, force) {
|
|
1773
|
+
ClassList$1.prototype.toggle = function (name, force) {
|
|
1704
1774
|
// classList
|
|
1705
1775
|
if (this.list) {
|
|
1706
1776
|
if ('undefined' !== typeof force) {
|
|
@@ -1738,10 +1808,10 @@
|
|
|
1738
1808
|
* @api public
|
|
1739
1809
|
*/
|
|
1740
1810
|
|
|
1741
|
-
ClassList.prototype.array = function () {
|
|
1811
|
+
ClassList$1.prototype.array = function () {
|
|
1742
1812
|
var className = this.el.getAttribute('class') || '';
|
|
1743
1813
|
var str = className.replace(/^\s+|\s+$/g, '');
|
|
1744
|
-
var arr = str.split(re);
|
|
1814
|
+
var arr = str.split(re$1);
|
|
1745
1815
|
if ('' === arr[0]) arr.shift();
|
|
1746
1816
|
return arr;
|
|
1747
1817
|
};
|
|
@@ -1754,34 +1824,19 @@
|
|
|
1754
1824
|
* @api public
|
|
1755
1825
|
*/
|
|
1756
1826
|
|
|
1757
|
-
ClassList.prototype.has = ClassList.prototype.contains = function (name) {
|
|
1758
|
-
return this.list ? this.list.contains(name) : !!~indexof(this.array(), name);
|
|
1827
|
+
ClassList$1.prototype.has = ClassList$1.prototype.contains = function (name) {
|
|
1828
|
+
return this.list ? this.list.contains(name) : !!~indexof$1(this.array(), name);
|
|
1759
1829
|
};
|
|
1760
1830
|
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
while (el.childNodes.length) {
|
|
1769
|
-
c = el.childNodes[0];
|
|
1770
|
-
el.removeChild(c);
|
|
1771
|
-
}
|
|
1772
|
-
|
|
1773
|
-
return el;
|
|
1774
|
-
}
|
|
1775
|
-
|
|
1776
|
-
var proto = typeof Element !== 'undefined' ? Element.prototype : {};
|
|
1777
|
-
var vendor = proto.matches
|
|
1778
|
-
|| proto.matchesSelector
|
|
1779
|
-
|| proto.webkitMatchesSelector
|
|
1780
|
-
|| proto.mozMatchesSelector
|
|
1781
|
-
|| proto.msMatchesSelector
|
|
1782
|
-
|| proto.oMatchesSelector;
|
|
1831
|
+
var proto$1 = typeof Element !== 'undefined' ? Element.prototype : {};
|
|
1832
|
+
var vendor$1 = proto$1.matches
|
|
1833
|
+
|| proto$1.matchesSelector
|
|
1834
|
+
|| proto$1.webkitMatchesSelector
|
|
1835
|
+
|| proto$1.mozMatchesSelector
|
|
1836
|
+
|| proto$1.msMatchesSelector
|
|
1837
|
+
|| proto$1.oMatchesSelector;
|
|
1783
1838
|
|
|
1784
|
-
var matchesSelector = match;
|
|
1839
|
+
var matchesSelector$1 = match$1;
|
|
1785
1840
|
|
|
1786
1841
|
/**
|
|
1787
1842
|
* Match `el` to `selector`.
|
|
@@ -1792,9 +1847,9 @@
|
|
|
1792
1847
|
* @api public
|
|
1793
1848
|
*/
|
|
1794
1849
|
|
|
1795
|
-
function match(el, selector) {
|
|
1850
|
+
function match$1(el, selector) {
|
|
1796
1851
|
if (!el || el.nodeType !== 1) return false;
|
|
1797
|
-
if (vendor) return vendor.call(el, selector);
|
|
1852
|
+
if (vendor$1) return vendor$1.call(el, selector);
|
|
1798
1853
|
var nodes = el.parentNode.querySelectorAll(selector);
|
|
1799
1854
|
for (var i = 0; i < nodes.length; i++) {
|
|
1800
1855
|
if (nodes[i] == el) return true;
|
|
@@ -1809,24 +1864,24 @@
|
|
|
1809
1864
|
* @param {String} selector
|
|
1810
1865
|
* @param {Boolean} checkYourSelf (optional)
|
|
1811
1866
|
*/
|
|
1812
|
-
function closest (element, selector, checkYourSelf) {
|
|
1867
|
+
function closest$1 (element, selector, checkYourSelf) {
|
|
1813
1868
|
var currentElem = checkYourSelf ? element : element.parentNode;
|
|
1814
1869
|
|
|
1815
1870
|
while (currentElem && currentElem.nodeType !== document.DOCUMENT_NODE && currentElem.nodeType !== document.DOCUMENT_FRAGMENT_NODE) {
|
|
1816
1871
|
|
|
1817
|
-
if (matchesSelector(currentElem, selector)) {
|
|
1872
|
+
if (matchesSelector$1(currentElem, selector)) {
|
|
1818
1873
|
return currentElem;
|
|
1819
1874
|
}
|
|
1820
1875
|
|
|
1821
1876
|
currentElem = currentElem.parentNode;
|
|
1822
1877
|
}
|
|
1823
1878
|
|
|
1824
|
-
return matchesSelector(currentElem, selector) ? currentElem : null;
|
|
1879
|
+
return matchesSelector$1(currentElem, selector) ? currentElem : null;
|
|
1825
1880
|
}
|
|
1826
1881
|
|
|
1827
|
-
var bind = window.addEventListener ? 'addEventListener' : 'attachEvent',
|
|
1828
|
-
unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent',
|
|
1829
|
-
prefix$
|
|
1882
|
+
var bind$1$1 = window.addEventListener ? 'addEventListener' : 'attachEvent',
|
|
1883
|
+
unbind$2 = window.removeEventListener ? 'removeEventListener' : 'detachEvent',
|
|
1884
|
+
prefix$7 = bind$1$1 !== 'addEventListener' ? 'on' : '';
|
|
1830
1885
|
|
|
1831
1886
|
/**
|
|
1832
1887
|
* Bind `el` event `type` to `fn`.
|
|
@@ -1839,8 +1894,8 @@
|
|
|
1839
1894
|
* @api public
|
|
1840
1895
|
*/
|
|
1841
1896
|
|
|
1842
|
-
var bind_1 = function(el, type, fn, capture){
|
|
1843
|
-
el[bind](prefix$
|
|
1897
|
+
var bind_1$1 = function(el, type, fn, capture){
|
|
1898
|
+
el[bind$1$1](prefix$7 + type, fn, capture || false);
|
|
1844
1899
|
return fn;
|
|
1845
1900
|
};
|
|
1846
1901
|
|
|
@@ -1855,14 +1910,14 @@
|
|
|
1855
1910
|
* @api public
|
|
1856
1911
|
*/
|
|
1857
1912
|
|
|
1858
|
-
var unbind_1 = function(el, type, fn, capture){
|
|
1859
|
-
el[unbind](prefix$
|
|
1913
|
+
var unbind_1$1 = function(el, type, fn, capture){
|
|
1914
|
+
el[unbind$2](prefix$7 + type, fn, capture || false);
|
|
1860
1915
|
return fn;
|
|
1861
1916
|
};
|
|
1862
1917
|
|
|
1863
|
-
var componentEvent = {
|
|
1864
|
-
bind: bind_1,
|
|
1865
|
-
unbind: unbind_1
|
|
1918
|
+
var componentEvent$1 = {
|
|
1919
|
+
bind: bind_1$1,
|
|
1920
|
+
unbind: unbind_1$1
|
|
1866
1921
|
};
|
|
1867
1922
|
|
|
1868
1923
|
/**
|
|
@@ -1885,16 +1940,16 @@
|
|
|
1885
1940
|
|
|
1886
1941
|
// Some events don't bubble, so we want to bind to the capture phase instead
|
|
1887
1942
|
// when delegating.
|
|
1888
|
-
var forceCaptureEvents = ['focus', 'blur'];
|
|
1943
|
+
var forceCaptureEvents$1 = ['focus', 'blur'];
|
|
1889
1944
|
|
|
1890
|
-
function bind$1(el, selector, type, fn, capture) {
|
|
1891
|
-
if (forceCaptureEvents.indexOf(type) !== -1) {
|
|
1945
|
+
function bind$2$1(el, selector, type, fn, capture) {
|
|
1946
|
+
if (forceCaptureEvents$1.indexOf(type) !== -1) {
|
|
1892
1947
|
capture = true;
|
|
1893
1948
|
}
|
|
1894
1949
|
|
|
1895
|
-
return componentEvent.bind(el, type, function (e) {
|
|
1950
|
+
return componentEvent$1.bind(el, type, function (e) {
|
|
1896
1951
|
var target = e.target || e.srcElement;
|
|
1897
|
-
e.delegateTarget = closest(target, selector, true);
|
|
1952
|
+
e.delegateTarget = closest$1(target, selector, true);
|
|
1898
1953
|
if (e.delegateTarget) {
|
|
1899
1954
|
fn.call(el, e);
|
|
1900
1955
|
}
|
|
@@ -1910,75 +1965,75 @@
|
|
|
1910
1965
|
* @param {Boolean} capture
|
|
1911
1966
|
* @api public
|
|
1912
1967
|
*/
|
|
1913
|
-
function unbind$1(el, type, fn, capture) {
|
|
1914
|
-
if (forceCaptureEvents.indexOf(type) !== -1) {
|
|
1968
|
+
function unbind$1$1(el, type, fn, capture) {
|
|
1969
|
+
if (forceCaptureEvents$1.indexOf(type) !== -1) {
|
|
1915
1970
|
capture = true;
|
|
1916
1971
|
}
|
|
1917
1972
|
|
|
1918
|
-
return componentEvent.unbind(el, type, fn, capture);
|
|
1973
|
+
return componentEvent$1.unbind(el, type, fn, capture);
|
|
1919
1974
|
}
|
|
1920
1975
|
|
|
1921
|
-
var delegate = {
|
|
1922
|
-
bind: bind$1,
|
|
1923
|
-
unbind: unbind$1
|
|
1976
|
+
var delegate$1 = {
|
|
1977
|
+
bind: bind$2$1,
|
|
1978
|
+
unbind: unbind$1$1
|
|
1924
1979
|
};
|
|
1925
1980
|
|
|
1926
1981
|
/**
|
|
1927
1982
|
* Expose `parse`.
|
|
1928
1983
|
*/
|
|
1929
1984
|
|
|
1930
|
-
var domify = parse;
|
|
1985
|
+
var domify$1 = parse$1;
|
|
1931
1986
|
|
|
1932
1987
|
/**
|
|
1933
1988
|
* Tests for browser support.
|
|
1934
1989
|
*/
|
|
1935
1990
|
|
|
1936
|
-
var innerHTMLBug = false;
|
|
1937
|
-
var bugTestDiv;
|
|
1991
|
+
var innerHTMLBug$1 = false;
|
|
1992
|
+
var bugTestDiv$1;
|
|
1938
1993
|
if (typeof document !== 'undefined') {
|
|
1939
|
-
bugTestDiv = document.createElement('div');
|
|
1994
|
+
bugTestDiv$1 = document.createElement('div');
|
|
1940
1995
|
// Setup
|
|
1941
|
-
bugTestDiv.innerHTML = ' <link/><table></table><a href="/a">a</a><input type="checkbox"/>';
|
|
1996
|
+
bugTestDiv$1.innerHTML = ' <link/><table></table><a href="/a">a</a><input type="checkbox"/>';
|
|
1942
1997
|
// Make sure that link elements get serialized correctly by innerHTML
|
|
1943
1998
|
// This requires a wrapper element in IE
|
|
1944
|
-
innerHTMLBug = !bugTestDiv.getElementsByTagName('link').length;
|
|
1945
|
-
bugTestDiv = undefined;
|
|
1999
|
+
innerHTMLBug$1 = !bugTestDiv$1.getElementsByTagName('link').length;
|
|
2000
|
+
bugTestDiv$1 = undefined;
|
|
1946
2001
|
}
|
|
1947
2002
|
|
|
1948
2003
|
/**
|
|
1949
2004
|
* Wrap map from jquery.
|
|
1950
2005
|
*/
|
|
1951
2006
|
|
|
1952
|
-
var map = {
|
|
2007
|
+
var map$1$1 = {
|
|
1953
2008
|
legend: [1, '<fieldset>', '</fieldset>'],
|
|
1954
2009
|
tr: [2, '<table><tbody>', '</tbody></table>'],
|
|
1955
2010
|
col: [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
|
|
1956
2011
|
// for script/link/style tags to work in IE6-8, you have to wrap
|
|
1957
2012
|
// in a div with a non-whitespace character in front, ha!
|
|
1958
|
-
_default: innerHTMLBug ? [1, 'X<div>', '</div>'] : [0, '', '']
|
|
2013
|
+
_default: innerHTMLBug$1 ? [1, 'X<div>', '</div>'] : [0, '', '']
|
|
1959
2014
|
};
|
|
1960
2015
|
|
|
1961
|
-
map.td =
|
|
1962
|
-
map.th = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
|
|
2016
|
+
map$1$1.td =
|
|
2017
|
+
map$1$1.th = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
|
|
1963
2018
|
|
|
1964
|
-
map.option =
|
|
1965
|
-
map.optgroup = [1, '<select multiple="multiple">', '</select>'];
|
|
2019
|
+
map$1$1.option =
|
|
2020
|
+
map$1$1.optgroup = [1, '<select multiple="multiple">', '</select>'];
|
|
1966
2021
|
|
|
1967
|
-
map.thead =
|
|
1968
|
-
map.tbody =
|
|
1969
|
-
map.colgroup =
|
|
1970
|
-
map.caption =
|
|
1971
|
-
map.tfoot = [1, '<table>', '</table>'];
|
|
2022
|
+
map$1$1.thead =
|
|
2023
|
+
map$1$1.tbody =
|
|
2024
|
+
map$1$1.colgroup =
|
|
2025
|
+
map$1$1.caption =
|
|
2026
|
+
map$1$1.tfoot = [1, '<table>', '</table>'];
|
|
1972
2027
|
|
|
1973
|
-
map.polyline =
|
|
1974
|
-
map.ellipse =
|
|
1975
|
-
map.polygon =
|
|
1976
|
-
map.circle =
|
|
1977
|
-
map.text =
|
|
1978
|
-
map.line =
|
|
1979
|
-
map.path =
|
|
1980
|
-
map.rect =
|
|
1981
|
-
map.g = [1, '<svg xmlns="http://www.w3.org/2000/svg" version="1.1">','</svg>'];
|
|
2028
|
+
map$1$1.polyline =
|
|
2029
|
+
map$1$1.ellipse =
|
|
2030
|
+
map$1$1.polygon =
|
|
2031
|
+
map$1$1.circle =
|
|
2032
|
+
map$1$1.text =
|
|
2033
|
+
map$1$1.line =
|
|
2034
|
+
map$1$1.path =
|
|
2035
|
+
map$1$1.rect =
|
|
2036
|
+
map$1$1.g = [1, '<svg xmlns="http://www.w3.org/2000/svg" version="1.1">','</svg>'];
|
|
1982
2037
|
|
|
1983
2038
|
/**
|
|
1984
2039
|
* Parse `html` and return a DOM Node instance, which could be a TextNode,
|
|
@@ -1991,7 +2046,7 @@
|
|
|
1991
2046
|
* @api private
|
|
1992
2047
|
*/
|
|
1993
2048
|
|
|
1994
|
-
function parse(html, doc) {
|
|
2049
|
+
function parse$1(html, doc) {
|
|
1995
2050
|
if ('string' != typeof html) throw new TypeError('String expected');
|
|
1996
2051
|
|
|
1997
2052
|
// default to the global `document` object
|
|
@@ -2013,7 +2068,7 @@
|
|
|
2013
2068
|
}
|
|
2014
2069
|
|
|
2015
2070
|
// wrap map
|
|
2016
|
-
var wrap = map[tag] || map._default;
|
|
2071
|
+
var wrap = map$1$1[tag] || map$1$1._default;
|
|
2017
2072
|
var depth = wrap[0];
|
|
2018
2073
|
var prefix = wrap[1];
|
|
2019
2074
|
var suffix = wrap[2];
|
|
@@ -2035,19 +2090,13 @@
|
|
|
2035
2090
|
return fragment;
|
|
2036
2091
|
}
|
|
2037
2092
|
|
|
2038
|
-
function query(selector, el) {
|
|
2093
|
+
function query$1(selector, el) {
|
|
2039
2094
|
el = el || document;
|
|
2040
2095
|
|
|
2041
2096
|
return el.querySelector(selector);
|
|
2042
2097
|
}
|
|
2043
2098
|
|
|
2044
|
-
function
|
|
2045
|
-
el = el || document;
|
|
2046
|
-
|
|
2047
|
-
return el.querySelectorAll(selector);
|
|
2048
|
-
}
|
|
2049
|
-
|
|
2050
|
-
function remove$1(el) {
|
|
2099
|
+
function remove$2(el) {
|
|
2051
2100
|
el.parentNode && el.parentNode.removeChild(el);
|
|
2052
2101
|
}
|
|
2053
2102
|
|
|
@@ -2319,7 +2368,7 @@
|
|
|
2319
2368
|
orient: 'auto'
|
|
2320
2369
|
});
|
|
2321
2370
|
|
|
2322
|
-
var defs = query('defs', canvas._svg);
|
|
2371
|
+
var defs = query$1('defs', canvas._svg);
|
|
2323
2372
|
|
|
2324
2373
|
if (!defs) {
|
|
2325
2374
|
defs = create$1('defs');
|
|
@@ -2661,7 +2710,7 @@
|
|
|
2661
2710
|
|
|
2662
2711
|
var text = textRenderer.createText(label || '', options);
|
|
2663
2712
|
|
|
2664
|
-
classes$
|
|
2713
|
+
classes$2(text).add('djs-label');
|
|
2665
2714
|
|
|
2666
2715
|
append(parentGfx, text);
|
|
2667
2716
|
|
|
@@ -4019,7 +4068,7 @@
|
|
|
4019
4068
|
};
|
|
4020
4069
|
}
|
|
4021
4070
|
|
|
4022
|
-
forEach(taskMarkers, function(marker) {
|
|
4071
|
+
forEach$2(taskMarkers, function(marker) {
|
|
4023
4072
|
renderer(marker)(parentGfx, element, position);
|
|
4024
4073
|
});
|
|
4025
4074
|
|
|
@@ -4312,7 +4361,8 @@
|
|
|
4312
4361
|
id: 'helper-svg',
|
|
4313
4362
|
width: 0,
|
|
4314
4363
|
height: 0,
|
|
4315
|
-
|
|
4364
|
+
visibility: 'hidden',
|
|
4365
|
+
position: 'fixed'
|
|
4316
4366
|
});
|
|
4317
4367
|
|
|
4318
4368
|
document.body.appendChild(helperSvg);
|
|
@@ -4439,7 +4489,7 @@
|
|
|
4439
4489
|
|
|
4440
4490
|
// layout each line taking into account that parent
|
|
4441
4491
|
// shape might resize to fit text size
|
|
4442
|
-
forEach(layouted, function(line) {
|
|
4492
|
+
forEach$2(layouted, function(line) {
|
|
4443
4493
|
|
|
4444
4494
|
var x;
|
|
4445
4495
|
|
|
@@ -4470,7 +4520,7 @@
|
|
|
4470
4520
|
append(textElement, tspan);
|
|
4471
4521
|
});
|
|
4472
4522
|
|
|
4473
|
-
remove$
|
|
4523
|
+
remove$3(helperText);
|
|
4474
4524
|
|
|
4475
4525
|
var dimensions = {
|
|
4476
4526
|
width: maxLineWidth,
|
|
@@ -5493,166 +5543,774 @@
|
|
|
5493
5543
|
}
|
|
5494
5544
|
|
|
5495
5545
|
|
|
5496
|
-
this._eventBus.fire('bpmnElement.added', { element: element });
|
|
5546
|
+
this._eventBus.fire('bpmnElement.added', { element: element });
|
|
5547
|
+
|
|
5548
|
+
return element;
|
|
5549
|
+
};
|
|
5550
|
+
|
|
5551
|
+
|
|
5552
|
+
/**
|
|
5553
|
+
* Attach the boundary element to the given host
|
|
5554
|
+
*
|
|
5555
|
+
* @param {ModdleElement} boundarySemantic
|
|
5556
|
+
* @param {djs.model.Base} boundaryElement
|
|
5557
|
+
*/
|
|
5558
|
+
BpmnImporter.prototype._attachBoundary = function(boundarySemantic, boundaryElement) {
|
|
5559
|
+
var translate = this._translate;
|
|
5560
|
+
var hostSemantic = boundarySemantic.attachedToRef;
|
|
5561
|
+
|
|
5562
|
+
if (!hostSemantic) {
|
|
5563
|
+
throw new Error(translate('missing {semantic}#attachedToRef', {
|
|
5564
|
+
semantic: elementToString(boundarySemantic)
|
|
5565
|
+
}));
|
|
5566
|
+
}
|
|
5567
|
+
|
|
5568
|
+
var host = this._elementRegistry.get(hostSemantic.id),
|
|
5569
|
+
attachers = host && host.attachers;
|
|
5570
|
+
|
|
5571
|
+
if (!host) {
|
|
5572
|
+
throw notYetDrawn(translate, boundarySemantic, hostSemantic, 'attachedToRef');
|
|
5573
|
+
}
|
|
5574
|
+
|
|
5575
|
+
// wire element.host <> host.attachers
|
|
5576
|
+
boundaryElement.host = host;
|
|
5577
|
+
|
|
5578
|
+
if (!attachers) {
|
|
5579
|
+
host.attachers = attachers = [];
|
|
5580
|
+
}
|
|
5581
|
+
|
|
5582
|
+
if (attachers.indexOf(boundaryElement) === -1) {
|
|
5583
|
+
attachers.push(boundaryElement);
|
|
5584
|
+
}
|
|
5585
|
+
};
|
|
5586
|
+
|
|
5587
|
+
|
|
5588
|
+
/**
|
|
5589
|
+
* add label for an element
|
|
5590
|
+
*/
|
|
5591
|
+
BpmnImporter.prototype.addLabel = function(semantic, di, element) {
|
|
5592
|
+
var bounds,
|
|
5593
|
+
text,
|
|
5594
|
+
label;
|
|
5595
|
+
|
|
5596
|
+
bounds = getExternalLabelBounds(di, element);
|
|
5597
|
+
|
|
5598
|
+
text = getLabel(element);
|
|
5599
|
+
|
|
5600
|
+
if (text) {
|
|
5601
|
+
|
|
5602
|
+
// get corrected bounds from actual layouted text
|
|
5603
|
+
bounds = this._textRenderer.getExternalLabelBounds(bounds, text);
|
|
5604
|
+
}
|
|
5605
|
+
|
|
5606
|
+
label = this._elementFactory.createLabel(elementData(semantic, di, {
|
|
5607
|
+
id: semantic.id + '_label',
|
|
5608
|
+
labelTarget: element,
|
|
5609
|
+
type: 'label',
|
|
5610
|
+
hidden: element.hidden || !getLabel(element),
|
|
5611
|
+
x: Math.round(bounds.x),
|
|
5612
|
+
y: Math.round(bounds.y),
|
|
5613
|
+
width: Math.round(bounds.width),
|
|
5614
|
+
height: Math.round(bounds.height)
|
|
5615
|
+
}));
|
|
5616
|
+
|
|
5617
|
+
return this._canvas.addShape(label, element.parent);
|
|
5618
|
+
};
|
|
5619
|
+
|
|
5620
|
+
/**
|
|
5621
|
+
* Return the drawn connection end based on the given side.
|
|
5622
|
+
*
|
|
5623
|
+
* @throws {Error} if the end is not yet drawn
|
|
5624
|
+
*/
|
|
5625
|
+
BpmnImporter.prototype._getEnd = function(semantic, side) {
|
|
5626
|
+
|
|
5627
|
+
var element,
|
|
5628
|
+
refSemantic,
|
|
5629
|
+
type = semantic.$type,
|
|
5630
|
+
translate = this._translate;
|
|
5631
|
+
|
|
5632
|
+
refSemantic = semantic[side + 'Ref'];
|
|
5633
|
+
|
|
5634
|
+
// handle mysterious isMany DataAssociation#sourceRef
|
|
5635
|
+
if (side === 'source' && type === 'bpmn:DataInputAssociation') {
|
|
5636
|
+
refSemantic = refSemantic && refSemantic[0];
|
|
5637
|
+
}
|
|
5638
|
+
|
|
5639
|
+
// fix source / target for DataInputAssociation / DataOutputAssociation
|
|
5640
|
+
if (side === 'source' && type === 'bpmn:DataOutputAssociation' ||
|
|
5641
|
+
side === 'target' && type === 'bpmn:DataInputAssociation') {
|
|
5642
|
+
|
|
5643
|
+
refSemantic = semantic.$parent;
|
|
5644
|
+
}
|
|
5645
|
+
|
|
5646
|
+
element = refSemantic && this._getElement(refSemantic);
|
|
5647
|
+
|
|
5648
|
+
if (element) {
|
|
5649
|
+
return element;
|
|
5650
|
+
}
|
|
5651
|
+
|
|
5652
|
+
if (refSemantic) {
|
|
5653
|
+
throw notYetDrawn(translate, semantic, refSemantic, side + 'Ref');
|
|
5654
|
+
} else {
|
|
5655
|
+
throw new Error(translate('{semantic}#{side} Ref not specified', {
|
|
5656
|
+
semantic: elementToString(semantic),
|
|
5657
|
+
side: side
|
|
5658
|
+
}));
|
|
5659
|
+
}
|
|
5660
|
+
};
|
|
5661
|
+
|
|
5662
|
+
BpmnImporter.prototype._getSource = function(semantic) {
|
|
5663
|
+
return this._getEnd(semantic, 'source');
|
|
5664
|
+
};
|
|
5665
|
+
|
|
5666
|
+
BpmnImporter.prototype._getTarget = function(semantic) {
|
|
5667
|
+
return this._getEnd(semantic, 'target');
|
|
5668
|
+
};
|
|
5669
|
+
|
|
5670
|
+
|
|
5671
|
+
BpmnImporter.prototype._getElement = function(semantic) {
|
|
5672
|
+
return this._elementRegistry.get(semantic.id);
|
|
5673
|
+
};
|
|
5674
|
+
|
|
5675
|
+
|
|
5676
|
+
// helpers ////////////////////
|
|
5677
|
+
|
|
5678
|
+
function isPointInsideBBox(bbox, point) {
|
|
5679
|
+
var x = point.x,
|
|
5680
|
+
y = point.y;
|
|
5681
|
+
|
|
5682
|
+
return x >= bbox.x &&
|
|
5683
|
+
x <= bbox.x + bbox.width &&
|
|
5684
|
+
y >= bbox.y &&
|
|
5685
|
+
y <= bbox.y + bbox.height;
|
|
5686
|
+
}
|
|
5687
|
+
|
|
5688
|
+
function isFrameElement$1(semantic) {
|
|
5689
|
+
return is$1(semantic, 'bpmn:Group');
|
|
5690
|
+
}
|
|
5691
|
+
|
|
5692
|
+
var ImportModule = {
|
|
5693
|
+
__depends__: [
|
|
5694
|
+
TranslateModule
|
|
5695
|
+
],
|
|
5696
|
+
bpmnImporter: [ 'type', BpmnImporter ]
|
|
5697
|
+
};
|
|
5698
|
+
|
|
5699
|
+
var CoreModule$1 = {
|
|
5700
|
+
__depends__: [
|
|
5701
|
+
DrawModule$1,
|
|
5702
|
+
ImportModule
|
|
5703
|
+
]
|
|
5704
|
+
};
|
|
5705
|
+
|
|
5706
|
+
/**
|
|
5707
|
+
* Flatten array, one level deep.
|
|
5708
|
+
*
|
|
5709
|
+
* @param {Array<?>} arr
|
|
5710
|
+
*
|
|
5711
|
+
* @return {Array<?>}
|
|
5712
|
+
*/
|
|
5713
|
+
|
|
5714
|
+
var nativeToString = Object.prototype.toString;
|
|
5715
|
+
var nativeHasOwnProperty = Object.prototype.hasOwnProperty;
|
|
5716
|
+
function isUndefined$1(obj) {
|
|
5717
|
+
return obj === undefined;
|
|
5718
|
+
}
|
|
5719
|
+
function isArray$1(obj) {
|
|
5720
|
+
return nativeToString.call(obj) === '[object Array]';
|
|
5721
|
+
}
|
|
5722
|
+
/**
|
|
5723
|
+
* Return true, if target owns a property with the given key.
|
|
5724
|
+
*
|
|
5725
|
+
* @param {Object} target
|
|
5726
|
+
* @param {String} key
|
|
5727
|
+
*
|
|
5728
|
+
* @return {Boolean}
|
|
5729
|
+
*/
|
|
5730
|
+
|
|
5731
|
+
function has(target, key) {
|
|
5732
|
+
return nativeHasOwnProperty.call(target, key);
|
|
5733
|
+
}
|
|
5734
|
+
/**
|
|
5735
|
+
* Iterate over collection; returning something
|
|
5736
|
+
* (non-undefined) will stop iteration.
|
|
5737
|
+
*
|
|
5738
|
+
* @param {Array|Object} collection
|
|
5739
|
+
* @param {Function} iterator
|
|
5740
|
+
*
|
|
5741
|
+
* @return {Object} return result that stopped the iteration
|
|
5742
|
+
*/
|
|
5743
|
+
|
|
5744
|
+
function forEach(collection, iterator) {
|
|
5745
|
+
var val, result;
|
|
5746
|
+
|
|
5747
|
+
if (isUndefined$1(collection)) {
|
|
5748
|
+
return;
|
|
5749
|
+
}
|
|
5750
|
+
|
|
5751
|
+
var convertKey = isArray$1(collection) ? toNum : identity;
|
|
5752
|
+
|
|
5753
|
+
for (var key in collection) {
|
|
5754
|
+
if (has(collection, key)) {
|
|
5755
|
+
val = collection[key];
|
|
5756
|
+
result = iterator(val, convertKey(key));
|
|
5757
|
+
|
|
5758
|
+
if (result === false) {
|
|
5759
|
+
return val;
|
|
5760
|
+
}
|
|
5761
|
+
}
|
|
5762
|
+
}
|
|
5763
|
+
}
|
|
5764
|
+
|
|
5765
|
+
function identity(arg) {
|
|
5766
|
+
return arg;
|
|
5767
|
+
}
|
|
5768
|
+
|
|
5769
|
+
function toNum(arg) {
|
|
5770
|
+
return Number(arg);
|
|
5771
|
+
}
|
|
5772
|
+
|
|
5773
|
+
/**
|
|
5774
|
+
* Assigns style attributes in a style-src compliant way.
|
|
5775
|
+
*
|
|
5776
|
+
* @param {Element} element
|
|
5777
|
+
* @param {...Object} styleSources
|
|
5778
|
+
*
|
|
5779
|
+
* @return {Element} the element
|
|
5780
|
+
*/
|
|
5781
|
+
function assign$1(element) {
|
|
5782
|
+
var target = element.style;
|
|
5783
|
+
|
|
5784
|
+
for (var _len = arguments.length, styleSources = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
5785
|
+
styleSources[_key - 1] = arguments[_key];
|
|
5786
|
+
}
|
|
5787
|
+
|
|
5788
|
+
forEach(styleSources, function (style) {
|
|
5789
|
+
if (!style) {
|
|
5790
|
+
return;
|
|
5791
|
+
}
|
|
5792
|
+
|
|
5793
|
+
forEach(style, function (value, key) {
|
|
5794
|
+
target[key] = value;
|
|
5795
|
+
});
|
|
5796
|
+
});
|
|
5797
|
+
|
|
5798
|
+
return element;
|
|
5799
|
+
}
|
|
5800
|
+
|
|
5801
|
+
/**
|
|
5802
|
+
* Set attribute `name` to `val`, or get attr `name`.
|
|
5803
|
+
*
|
|
5804
|
+
* @param {Element} el
|
|
5805
|
+
* @param {String} name
|
|
5806
|
+
* @param {String} [val]
|
|
5807
|
+
* @api public
|
|
5808
|
+
*/
|
|
5809
|
+
function attr(el, name, val) {
|
|
5810
|
+
// get
|
|
5811
|
+
if (arguments.length == 2) {
|
|
5812
|
+
return el.getAttribute(name);
|
|
5813
|
+
}
|
|
5814
|
+
|
|
5815
|
+
// remove
|
|
5816
|
+
if (val === null) {
|
|
5817
|
+
return el.removeAttribute(name);
|
|
5818
|
+
}
|
|
5819
|
+
|
|
5820
|
+
// set
|
|
5821
|
+
el.setAttribute(name, val);
|
|
5822
|
+
|
|
5823
|
+
return el;
|
|
5824
|
+
}
|
|
5825
|
+
|
|
5826
|
+
var indexOf = [].indexOf;
|
|
5827
|
+
|
|
5828
|
+
var indexof = function(arr, obj){
|
|
5829
|
+
if (indexOf) return arr.indexOf(obj);
|
|
5830
|
+
for (var i = 0; i < arr.length; ++i) {
|
|
5831
|
+
if (arr[i] === obj) return i;
|
|
5832
|
+
}
|
|
5833
|
+
return -1;
|
|
5834
|
+
};
|
|
5835
|
+
|
|
5836
|
+
/**
|
|
5837
|
+
* Taken from https://github.com/component/classes
|
|
5838
|
+
*
|
|
5839
|
+
* Without the component bits.
|
|
5840
|
+
*/
|
|
5841
|
+
|
|
5842
|
+
/**
|
|
5843
|
+
* Whitespace regexp.
|
|
5844
|
+
*/
|
|
5845
|
+
|
|
5846
|
+
var re = /\s+/;
|
|
5847
|
+
|
|
5848
|
+
/**
|
|
5849
|
+
* toString reference.
|
|
5850
|
+
*/
|
|
5851
|
+
|
|
5852
|
+
var toString = Object.prototype.toString;
|
|
5853
|
+
|
|
5854
|
+
/**
|
|
5855
|
+
* Wrap `el` in a `ClassList`.
|
|
5856
|
+
*
|
|
5857
|
+
* @param {Element} el
|
|
5858
|
+
* @return {ClassList}
|
|
5859
|
+
* @api public
|
|
5860
|
+
*/
|
|
5861
|
+
|
|
5862
|
+
function classes(el) {
|
|
5863
|
+
return new ClassList(el);
|
|
5864
|
+
}
|
|
5865
|
+
|
|
5866
|
+
/**
|
|
5867
|
+
* Initialize a new ClassList for `el`.
|
|
5868
|
+
*
|
|
5869
|
+
* @param {Element} el
|
|
5870
|
+
* @api private
|
|
5871
|
+
*/
|
|
5872
|
+
|
|
5873
|
+
function ClassList(el) {
|
|
5874
|
+
if (!el || !el.nodeType) {
|
|
5875
|
+
throw new Error('A DOM element reference is required');
|
|
5876
|
+
}
|
|
5877
|
+
this.el = el;
|
|
5878
|
+
this.list = el.classList;
|
|
5879
|
+
}
|
|
5880
|
+
|
|
5881
|
+
/**
|
|
5882
|
+
* Add class `name` if not already present.
|
|
5883
|
+
*
|
|
5884
|
+
* @param {String} name
|
|
5885
|
+
* @return {ClassList}
|
|
5886
|
+
* @api public
|
|
5887
|
+
*/
|
|
5888
|
+
|
|
5889
|
+
ClassList.prototype.add = function (name) {
|
|
5890
|
+
// classList
|
|
5891
|
+
if (this.list) {
|
|
5892
|
+
this.list.add(name);
|
|
5893
|
+
return this;
|
|
5894
|
+
}
|
|
5895
|
+
|
|
5896
|
+
// fallback
|
|
5897
|
+
var arr = this.array();
|
|
5898
|
+
var i = indexof(arr, name);
|
|
5899
|
+
if (!~i) arr.push(name);
|
|
5900
|
+
this.el.className = arr.join(' ');
|
|
5901
|
+
return this;
|
|
5902
|
+
};
|
|
5903
|
+
|
|
5904
|
+
/**
|
|
5905
|
+
* Remove class `name` when present, or
|
|
5906
|
+
* pass a regular expression to remove
|
|
5907
|
+
* any which match.
|
|
5908
|
+
*
|
|
5909
|
+
* @param {String|RegExp} name
|
|
5910
|
+
* @return {ClassList}
|
|
5911
|
+
* @api public
|
|
5912
|
+
*/
|
|
5913
|
+
|
|
5914
|
+
ClassList.prototype.remove = function (name) {
|
|
5915
|
+
if ('[object RegExp]' == toString.call(name)) {
|
|
5916
|
+
return this.removeMatching(name);
|
|
5917
|
+
}
|
|
5918
|
+
|
|
5919
|
+
// classList
|
|
5920
|
+
if (this.list) {
|
|
5921
|
+
this.list.remove(name);
|
|
5922
|
+
return this;
|
|
5923
|
+
}
|
|
5924
|
+
|
|
5925
|
+
// fallback
|
|
5926
|
+
var arr = this.array();
|
|
5927
|
+
var i = indexof(arr, name);
|
|
5928
|
+
if (~i) arr.splice(i, 1);
|
|
5929
|
+
this.el.className = arr.join(' ');
|
|
5930
|
+
return this;
|
|
5931
|
+
};
|
|
5932
|
+
|
|
5933
|
+
/**
|
|
5934
|
+
* Remove all classes matching `re`.
|
|
5935
|
+
*
|
|
5936
|
+
* @param {RegExp} re
|
|
5937
|
+
* @return {ClassList}
|
|
5938
|
+
* @api private
|
|
5939
|
+
*/
|
|
5940
|
+
|
|
5941
|
+
ClassList.prototype.removeMatching = function (re) {
|
|
5942
|
+
var arr = this.array();
|
|
5943
|
+
for (var i = 0; i < arr.length; i++) {
|
|
5944
|
+
if (re.test(arr[i])) {
|
|
5945
|
+
this.remove(arr[i]);
|
|
5946
|
+
}
|
|
5947
|
+
}
|
|
5948
|
+
return this;
|
|
5949
|
+
};
|
|
5950
|
+
|
|
5951
|
+
/**
|
|
5952
|
+
* Toggle class `name`, can force state via `force`.
|
|
5953
|
+
*
|
|
5954
|
+
* For browsers that support classList, but do not support `force` yet,
|
|
5955
|
+
* the mistake will be detected and corrected.
|
|
5956
|
+
*
|
|
5957
|
+
* @param {String} name
|
|
5958
|
+
* @param {Boolean} force
|
|
5959
|
+
* @return {ClassList}
|
|
5960
|
+
* @api public
|
|
5961
|
+
*/
|
|
5962
|
+
|
|
5963
|
+
ClassList.prototype.toggle = function (name, force) {
|
|
5964
|
+
// classList
|
|
5965
|
+
if (this.list) {
|
|
5966
|
+
if ('undefined' !== typeof force) {
|
|
5967
|
+
if (force !== this.list.toggle(name, force)) {
|
|
5968
|
+
this.list.toggle(name); // toggle again to correct
|
|
5969
|
+
}
|
|
5970
|
+
} else {
|
|
5971
|
+
this.list.toggle(name);
|
|
5972
|
+
}
|
|
5973
|
+
return this;
|
|
5974
|
+
}
|
|
5975
|
+
|
|
5976
|
+
// fallback
|
|
5977
|
+
if ('undefined' !== typeof force) {
|
|
5978
|
+
if (!force) {
|
|
5979
|
+
this.remove(name);
|
|
5980
|
+
} else {
|
|
5981
|
+
this.add(name);
|
|
5982
|
+
}
|
|
5983
|
+
} else {
|
|
5984
|
+
if (this.has(name)) {
|
|
5985
|
+
this.remove(name);
|
|
5986
|
+
} else {
|
|
5987
|
+
this.add(name);
|
|
5988
|
+
}
|
|
5989
|
+
}
|
|
5990
|
+
|
|
5991
|
+
return this;
|
|
5992
|
+
};
|
|
5993
|
+
|
|
5994
|
+
/**
|
|
5995
|
+
* Return an array of classes.
|
|
5996
|
+
*
|
|
5997
|
+
* @return {Array}
|
|
5998
|
+
* @api public
|
|
5999
|
+
*/
|
|
6000
|
+
|
|
6001
|
+
ClassList.prototype.array = function () {
|
|
6002
|
+
var className = this.el.getAttribute('class') || '';
|
|
6003
|
+
var str = className.replace(/^\s+|\s+$/g, '');
|
|
6004
|
+
var arr = str.split(re);
|
|
6005
|
+
if ('' === arr[0]) arr.shift();
|
|
6006
|
+
return arr;
|
|
6007
|
+
};
|
|
6008
|
+
|
|
6009
|
+
/**
|
|
6010
|
+
* Check if class `name` is present.
|
|
6011
|
+
*
|
|
6012
|
+
* @param {String} name
|
|
6013
|
+
* @return {ClassList}
|
|
6014
|
+
* @api public
|
|
6015
|
+
*/
|
|
6016
|
+
|
|
6017
|
+
ClassList.prototype.has = ClassList.prototype.contains = function (name) {
|
|
6018
|
+
return this.list ? this.list.contains(name) : !!~indexof(this.array(), name);
|
|
6019
|
+
};
|
|
6020
|
+
|
|
6021
|
+
/**
|
|
6022
|
+
* Remove all children from the given element.
|
|
6023
|
+
*/
|
|
6024
|
+
function clear(el) {
|
|
6025
|
+
|
|
6026
|
+
var c;
|
|
6027
|
+
|
|
6028
|
+
while (el.childNodes.length) {
|
|
6029
|
+
c = el.childNodes[0];
|
|
6030
|
+
el.removeChild(c);
|
|
6031
|
+
}
|
|
6032
|
+
|
|
6033
|
+
return el;
|
|
6034
|
+
}
|
|
6035
|
+
|
|
6036
|
+
var proto = typeof Element !== 'undefined' ? Element.prototype : {};
|
|
6037
|
+
var vendor = proto.matches
|
|
6038
|
+
|| proto.matchesSelector
|
|
6039
|
+
|| proto.webkitMatchesSelector
|
|
6040
|
+
|| proto.mozMatchesSelector
|
|
6041
|
+
|| proto.msMatchesSelector
|
|
6042
|
+
|| proto.oMatchesSelector;
|
|
6043
|
+
|
|
6044
|
+
var matchesSelector = match;
|
|
6045
|
+
|
|
6046
|
+
/**
|
|
6047
|
+
* Match `el` to `selector`.
|
|
6048
|
+
*
|
|
6049
|
+
* @param {Element} el
|
|
6050
|
+
* @param {String} selector
|
|
6051
|
+
* @return {Boolean}
|
|
6052
|
+
* @api public
|
|
6053
|
+
*/
|
|
6054
|
+
|
|
6055
|
+
function match(el, selector) {
|
|
6056
|
+
if (!el || el.nodeType !== 1) return false;
|
|
6057
|
+
if (vendor) return vendor.call(el, selector);
|
|
6058
|
+
var nodes = el.parentNode.querySelectorAll(selector);
|
|
6059
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
6060
|
+
if (nodes[i] == el) return true;
|
|
6061
|
+
}
|
|
6062
|
+
return false;
|
|
6063
|
+
}
|
|
6064
|
+
|
|
6065
|
+
/**
|
|
6066
|
+
* Closest
|
|
6067
|
+
*
|
|
6068
|
+
* @param {Element} el
|
|
6069
|
+
* @param {String} selector
|
|
6070
|
+
* @param {Boolean} checkYourSelf (optional)
|
|
6071
|
+
*/
|
|
6072
|
+
function closest (element, selector, checkYourSelf) {
|
|
6073
|
+
var currentElem = checkYourSelf ? element : element.parentNode;
|
|
6074
|
+
|
|
6075
|
+
while (currentElem && currentElem.nodeType !== document.DOCUMENT_NODE && currentElem.nodeType !== document.DOCUMENT_FRAGMENT_NODE) {
|
|
6076
|
+
|
|
6077
|
+
if (matchesSelector(currentElem, selector)) {
|
|
6078
|
+
return currentElem;
|
|
6079
|
+
}
|
|
6080
|
+
|
|
6081
|
+
currentElem = currentElem.parentNode;
|
|
6082
|
+
}
|
|
6083
|
+
|
|
6084
|
+
return matchesSelector(currentElem, selector) ? currentElem : null;
|
|
6085
|
+
}
|
|
6086
|
+
|
|
6087
|
+
var bind$1 = window.addEventListener ? 'addEventListener' : 'attachEvent',
|
|
6088
|
+
unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent',
|
|
6089
|
+
prefix$6 = bind$1 !== 'addEventListener' ? 'on' : '';
|
|
6090
|
+
|
|
6091
|
+
/**
|
|
6092
|
+
* Bind `el` event `type` to `fn`.
|
|
6093
|
+
*
|
|
6094
|
+
* @param {Element} el
|
|
6095
|
+
* @param {String} type
|
|
6096
|
+
* @param {Function} fn
|
|
6097
|
+
* @param {Boolean} capture
|
|
6098
|
+
* @return {Function}
|
|
6099
|
+
* @api public
|
|
6100
|
+
*/
|
|
6101
|
+
|
|
6102
|
+
var bind_1 = function(el, type, fn, capture){
|
|
6103
|
+
el[bind$1](prefix$6 + type, fn, capture || false);
|
|
6104
|
+
return fn;
|
|
6105
|
+
};
|
|
6106
|
+
|
|
6107
|
+
/**
|
|
6108
|
+
* Unbind `el` event `type`'s callback `fn`.
|
|
6109
|
+
*
|
|
6110
|
+
* @param {Element} el
|
|
6111
|
+
* @param {String} type
|
|
6112
|
+
* @param {Function} fn
|
|
6113
|
+
* @param {Boolean} capture
|
|
6114
|
+
* @return {Function}
|
|
6115
|
+
* @api public
|
|
6116
|
+
*/
|
|
6117
|
+
|
|
6118
|
+
var unbind_1 = function(el, type, fn, capture){
|
|
6119
|
+
el[unbind](prefix$6 + type, fn, capture || false);
|
|
6120
|
+
return fn;
|
|
6121
|
+
};
|
|
5497
6122
|
|
|
5498
|
-
|
|
6123
|
+
var componentEvent = {
|
|
6124
|
+
bind: bind_1,
|
|
6125
|
+
unbind: unbind_1
|
|
5499
6126
|
};
|
|
5500
6127
|
|
|
6128
|
+
/**
|
|
6129
|
+
* Module dependencies.
|
|
6130
|
+
*/
|
|
5501
6131
|
|
|
5502
6132
|
/**
|
|
5503
|
-
*
|
|
6133
|
+
* Delegate event `type` to `selector`
|
|
6134
|
+
* and invoke `fn(e)`. A callback function
|
|
6135
|
+
* is returned which may be passed to `.unbind()`.
|
|
5504
6136
|
*
|
|
5505
|
-
* @param {
|
|
5506
|
-
* @param {
|
|
6137
|
+
* @param {Element} el
|
|
6138
|
+
* @param {String} selector
|
|
6139
|
+
* @param {String} type
|
|
6140
|
+
* @param {Function} fn
|
|
6141
|
+
* @param {Boolean} capture
|
|
6142
|
+
* @return {Function}
|
|
6143
|
+
* @api public
|
|
5507
6144
|
*/
|
|
5508
|
-
BpmnImporter.prototype._attachBoundary = function(boundarySemantic, boundaryElement) {
|
|
5509
|
-
var translate = this._translate;
|
|
5510
|
-
var hostSemantic = boundarySemantic.attachedToRef;
|
|
5511
|
-
|
|
5512
|
-
if (!hostSemantic) {
|
|
5513
|
-
throw new Error(translate('missing {semantic}#attachedToRef', {
|
|
5514
|
-
semantic: elementToString(boundarySemantic)
|
|
5515
|
-
}));
|
|
5516
|
-
}
|
|
5517
6145
|
|
|
5518
|
-
|
|
5519
|
-
|
|
6146
|
+
// Some events don't bubble, so we want to bind to the capture phase instead
|
|
6147
|
+
// when delegating.
|
|
6148
|
+
var forceCaptureEvents = ['focus', 'blur'];
|
|
5520
6149
|
|
|
5521
|
-
|
|
5522
|
-
|
|
6150
|
+
function bind$2(el, selector, type, fn, capture) {
|
|
6151
|
+
if (forceCaptureEvents.indexOf(type) !== -1) {
|
|
6152
|
+
capture = true;
|
|
5523
6153
|
}
|
|
5524
6154
|
|
|
5525
|
-
|
|
5526
|
-
|
|
6155
|
+
return componentEvent.bind(el, type, function (e) {
|
|
6156
|
+
var target = e.target || e.srcElement;
|
|
6157
|
+
e.delegateTarget = closest(target, selector, true);
|
|
6158
|
+
if (e.delegateTarget) {
|
|
6159
|
+
fn.call(el, e);
|
|
6160
|
+
}
|
|
6161
|
+
}, capture);
|
|
6162
|
+
}
|
|
5527
6163
|
|
|
5528
|
-
|
|
5529
|
-
|
|
6164
|
+
/**
|
|
6165
|
+
* Unbind event `type`'s callback `fn`.
|
|
6166
|
+
*
|
|
6167
|
+
* @param {Element} el
|
|
6168
|
+
* @param {String} type
|
|
6169
|
+
* @param {Function} fn
|
|
6170
|
+
* @param {Boolean} capture
|
|
6171
|
+
* @api public
|
|
6172
|
+
*/
|
|
6173
|
+
function unbind$1(el, type, fn, capture) {
|
|
6174
|
+
if (forceCaptureEvents.indexOf(type) !== -1) {
|
|
6175
|
+
capture = true;
|
|
5530
6176
|
}
|
|
5531
6177
|
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
6178
|
+
return componentEvent.unbind(el, type, fn, capture);
|
|
6179
|
+
}
|
|
6180
|
+
|
|
6181
|
+
var delegate = {
|
|
6182
|
+
bind: bind$2,
|
|
6183
|
+
unbind: unbind$1
|
|
5535
6184
|
};
|
|
5536
6185
|
|
|
6186
|
+
/**
|
|
6187
|
+
* Expose `parse`.
|
|
6188
|
+
*/
|
|
6189
|
+
|
|
6190
|
+
var domify = parse;
|
|
5537
6191
|
|
|
5538
6192
|
/**
|
|
5539
|
-
*
|
|
6193
|
+
* Tests for browser support.
|
|
5540
6194
|
*/
|
|
5541
|
-
BpmnImporter.prototype.addLabel = function(semantic, di, element) {
|
|
5542
|
-
var bounds,
|
|
5543
|
-
text,
|
|
5544
|
-
label;
|
|
5545
6195
|
|
|
5546
|
-
|
|
6196
|
+
var innerHTMLBug = false;
|
|
6197
|
+
var bugTestDiv;
|
|
6198
|
+
if (typeof document !== 'undefined') {
|
|
6199
|
+
bugTestDiv = document.createElement('div');
|
|
6200
|
+
// Setup
|
|
6201
|
+
bugTestDiv.innerHTML = ' <link/><table></table><a href="/a">a</a><input type="checkbox"/>';
|
|
6202
|
+
// Make sure that link elements get serialized correctly by innerHTML
|
|
6203
|
+
// This requires a wrapper element in IE
|
|
6204
|
+
innerHTMLBug = !bugTestDiv.getElementsByTagName('link').length;
|
|
6205
|
+
bugTestDiv = undefined;
|
|
6206
|
+
}
|
|
5547
6207
|
|
|
5548
|
-
|
|
6208
|
+
/**
|
|
6209
|
+
* Wrap map from jquery.
|
|
6210
|
+
*/
|
|
5549
6211
|
|
|
5550
|
-
|
|
6212
|
+
var map$1 = {
|
|
6213
|
+
legend: [1, '<fieldset>', '</fieldset>'],
|
|
6214
|
+
tr: [2, '<table><tbody>', '</tbody></table>'],
|
|
6215
|
+
col: [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
|
|
6216
|
+
// for script/link/style tags to work in IE6-8, you have to wrap
|
|
6217
|
+
// in a div with a non-whitespace character in front, ha!
|
|
6218
|
+
_default: innerHTMLBug ? [1, 'X<div>', '</div>'] : [0, '', '']
|
|
6219
|
+
};
|
|
5551
6220
|
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
}
|
|
6221
|
+
map$1.td =
|
|
6222
|
+
map$1.th = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
|
|
5555
6223
|
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
labelTarget: element,
|
|
5559
|
-
type: 'label',
|
|
5560
|
-
hidden: element.hidden || !getLabel(element),
|
|
5561
|
-
x: Math.round(bounds.x),
|
|
5562
|
-
y: Math.round(bounds.y),
|
|
5563
|
-
width: Math.round(bounds.width),
|
|
5564
|
-
height: Math.round(bounds.height)
|
|
5565
|
-
}));
|
|
6224
|
+
map$1.option =
|
|
6225
|
+
map$1.optgroup = [1, '<select multiple="multiple">', '</select>'];
|
|
5566
6226
|
|
|
5567
|
-
|
|
5568
|
-
|
|
6227
|
+
map$1.thead =
|
|
6228
|
+
map$1.tbody =
|
|
6229
|
+
map$1.colgroup =
|
|
6230
|
+
map$1.caption =
|
|
6231
|
+
map$1.tfoot = [1, '<table>', '</table>'];
|
|
6232
|
+
|
|
6233
|
+
map$1.polyline =
|
|
6234
|
+
map$1.ellipse =
|
|
6235
|
+
map$1.polygon =
|
|
6236
|
+
map$1.circle =
|
|
6237
|
+
map$1.text =
|
|
6238
|
+
map$1.line =
|
|
6239
|
+
map$1.path =
|
|
6240
|
+
map$1.rect =
|
|
6241
|
+
map$1.g = [1, '<svg xmlns="http://www.w3.org/2000/svg" version="1.1">','</svg>'];
|
|
5569
6242
|
|
|
5570
6243
|
/**
|
|
5571
|
-
*
|
|
6244
|
+
* Parse `html` and return a DOM Node instance, which could be a TextNode,
|
|
6245
|
+
* HTML DOM Node of some kind (<div> for example), or a DocumentFragment
|
|
6246
|
+
* instance, depending on the contents of the `html` string.
|
|
5572
6247
|
*
|
|
5573
|
-
* @
|
|
6248
|
+
* @param {String} html - HTML string to "domify"
|
|
6249
|
+
* @param {Document} doc - The `document` instance to create the Node for
|
|
6250
|
+
* @return {DOMNode} the TextNode, DOM Node, or DocumentFragment instance
|
|
6251
|
+
* @api private
|
|
5574
6252
|
*/
|
|
5575
|
-
BpmnImporter.prototype._getEnd = function(semantic, side) {
|
|
5576
6253
|
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
type = semantic.$type,
|
|
5580
|
-
translate = this._translate;
|
|
6254
|
+
function parse(html, doc) {
|
|
6255
|
+
if ('string' != typeof html) throw new TypeError('String expected');
|
|
5581
6256
|
|
|
5582
|
-
|
|
6257
|
+
// default to the global `document` object
|
|
6258
|
+
if (!doc) doc = document;
|
|
5583
6259
|
|
|
5584
|
-
//
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
}
|
|
6260
|
+
// tag name
|
|
6261
|
+
var m = /<([\w:]+)/.exec(html);
|
|
6262
|
+
if (!m) return doc.createTextNode(html);
|
|
5588
6263
|
|
|
5589
|
-
|
|
5590
|
-
if (side === 'source' && type === 'bpmn:DataOutputAssociation' ||
|
|
5591
|
-
side === 'target' && type === 'bpmn:DataInputAssociation') {
|
|
6264
|
+
html = html.replace(/^\s+|\s+$/g, ''); // Remove leading/trailing whitespace
|
|
5592
6265
|
|
|
5593
|
-
|
|
6266
|
+
var tag = m[1];
|
|
6267
|
+
|
|
6268
|
+
// body support
|
|
6269
|
+
if (tag == 'body') {
|
|
6270
|
+
var el = doc.createElement('html');
|
|
6271
|
+
el.innerHTML = html;
|
|
6272
|
+
return el.removeChild(el.lastChild);
|
|
5594
6273
|
}
|
|
5595
6274
|
|
|
5596
|
-
|
|
6275
|
+
// wrap map
|
|
6276
|
+
var wrap = map$1[tag] || map$1._default;
|
|
6277
|
+
var depth = wrap[0];
|
|
6278
|
+
var prefix = wrap[1];
|
|
6279
|
+
var suffix = wrap[2];
|
|
6280
|
+
var el = doc.createElement('div');
|
|
6281
|
+
el.innerHTML = prefix + html + suffix;
|
|
6282
|
+
while (depth--) el = el.lastChild;
|
|
5597
6283
|
|
|
5598
|
-
|
|
5599
|
-
|
|
6284
|
+
// one element
|
|
6285
|
+
if (el.firstChild == el.lastChild) {
|
|
6286
|
+
return el.removeChild(el.firstChild);
|
|
5600
6287
|
}
|
|
5601
6288
|
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
semantic: elementToString(semantic),
|
|
5607
|
-
side: side
|
|
5608
|
-
}));
|
|
6289
|
+
// several elements
|
|
6290
|
+
var fragment = doc.createDocumentFragment();
|
|
6291
|
+
while (el.firstChild) {
|
|
6292
|
+
fragment.appendChild(el.removeChild(el.firstChild));
|
|
5609
6293
|
}
|
|
5610
|
-
};
|
|
5611
|
-
|
|
5612
|
-
BpmnImporter.prototype._getSource = function(semantic) {
|
|
5613
|
-
return this._getEnd(semantic, 'source');
|
|
5614
|
-
};
|
|
5615
|
-
|
|
5616
|
-
BpmnImporter.prototype._getTarget = function(semantic) {
|
|
5617
|
-
return this._getEnd(semantic, 'target');
|
|
5618
|
-
};
|
|
5619
|
-
|
|
5620
6294
|
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
};
|
|
6295
|
+
return fragment;
|
|
6296
|
+
}
|
|
5624
6297
|
|
|
6298
|
+
function query(selector, el) {
|
|
6299
|
+
el = el || document;
|
|
5625
6300
|
|
|
5626
|
-
|
|
6301
|
+
return el.querySelector(selector);
|
|
6302
|
+
}
|
|
5627
6303
|
|
|
5628
|
-
function
|
|
5629
|
-
|
|
5630
|
-
y = point.y;
|
|
6304
|
+
function all(selector, el) {
|
|
6305
|
+
el = el || document;
|
|
5631
6306
|
|
|
5632
|
-
return
|
|
5633
|
-
x <= bbox.x + bbox.width &&
|
|
5634
|
-
y >= bbox.y &&
|
|
5635
|
-
y <= bbox.y + bbox.height;
|
|
6307
|
+
return el.querySelectorAll(selector);
|
|
5636
6308
|
}
|
|
5637
6309
|
|
|
5638
|
-
function
|
|
5639
|
-
|
|
6310
|
+
function remove$1(el) {
|
|
6311
|
+
el.parentNode && el.parentNode.removeChild(el);
|
|
5640
6312
|
}
|
|
5641
6313
|
|
|
5642
|
-
var ImportModule = {
|
|
5643
|
-
__depends__: [
|
|
5644
|
-
TranslateModule
|
|
5645
|
-
],
|
|
5646
|
-
bpmnImporter: [ 'type', BpmnImporter ]
|
|
5647
|
-
};
|
|
5648
|
-
|
|
5649
|
-
var CoreModule$1 = {
|
|
5650
|
-
__depends__: [
|
|
5651
|
-
DrawModule$1,
|
|
5652
|
-
ImportModule
|
|
5653
|
-
]
|
|
5654
|
-
};
|
|
5655
|
-
|
|
5656
6314
|
function getOriginal(event) {
|
|
5657
6315
|
return event.originalEvent || event.srcEvent;
|
|
5658
6316
|
}
|
|
@@ -5882,13 +6540,13 @@
|
|
|
5882
6540
|
}
|
|
5883
6541
|
|
|
5884
6542
|
function registerEvents(svg) {
|
|
5885
|
-
forEach(bindings, function(val, key) {
|
|
6543
|
+
forEach$2(bindings, function(val, key) {
|
|
5886
6544
|
registerEvent(svg, key, val);
|
|
5887
6545
|
});
|
|
5888
6546
|
}
|
|
5889
6547
|
|
|
5890
6548
|
function unregisterEvents(svg) {
|
|
5891
|
-
forEach(bindings, function(val, key) {
|
|
6549
|
+
forEach$2(bindings, function(val, key) {
|
|
5892
6550
|
unregisterEvent(svg, key, val);
|
|
5893
6551
|
});
|
|
5894
6552
|
}
|
|
@@ -5948,10 +6606,13 @@
|
|
|
5948
6606
|
|
|
5949
6607
|
var ALL_HIT_STYLE = createHitStyle('djs-hit djs-hit-all');
|
|
5950
6608
|
|
|
6609
|
+
var NO_MOVE_HIT_STYLE = createHitStyle('djs-hit djs-hit-no-move');
|
|
6610
|
+
|
|
5951
6611
|
var HIT_TYPES = {
|
|
5952
6612
|
'all': ALL_HIT_STYLE,
|
|
5953
6613
|
'click-stroke': CLICK_STROKE_HIT_STYLE,
|
|
5954
|
-
'stroke': STROKE_HIT_STYLE
|
|
6614
|
+
'stroke': STROKE_HIT_STYLE,
|
|
6615
|
+
'no-move': NO_MOVE_HIT_STYLE
|
|
5955
6616
|
};
|
|
5956
6617
|
|
|
5957
6618
|
function createHitStyle(classNames, attrs) {
|
|
@@ -5995,7 +6656,7 @@
|
|
|
5995
6656
|
this.removeHits = function(gfx) {
|
|
5996
6657
|
var hits = all('.djs-hit', gfx);
|
|
5997
6658
|
|
|
5998
|
-
forEach(hits, remove$
|
|
6659
|
+
forEach$2(hits, remove$3);
|
|
5999
6660
|
};
|
|
6000
6661
|
|
|
6001
6662
|
/**
|
|
@@ -6209,7 +6870,7 @@
|
|
|
6209
6870
|
function getBBox(elements, stopRecursion) {
|
|
6210
6871
|
|
|
6211
6872
|
stopRecursion = !!stopRecursion;
|
|
6212
|
-
if (!isArray$
|
|
6873
|
+
if (!isArray$3(elements)) {
|
|
6213
6874
|
elements = [ elements ];
|
|
6214
6875
|
}
|
|
6215
6876
|
|
|
@@ -6218,7 +6879,7 @@
|
|
|
6218
6879
|
maxX,
|
|
6219
6880
|
maxY;
|
|
6220
6881
|
|
|
6221
|
-
forEach(elements, function(element) {
|
|
6882
|
+
forEach$2(elements, function(element) {
|
|
6222
6883
|
|
|
6223
6884
|
// If element is a connection the bbox must be computed first
|
|
6224
6885
|
var bbox = element;
|
|
@@ -6455,7 +7116,7 @@
|
|
|
6455
7116
|
var selectedElements = this._selectedElements,
|
|
6456
7117
|
oldSelection = selectedElements.slice();
|
|
6457
7118
|
|
|
6458
|
-
if (!isArray$
|
|
7119
|
+
if (!isArray$3(elements)) {
|
|
6459
7120
|
elements = elements ? [ elements ] : [];
|
|
6460
7121
|
}
|
|
6461
7122
|
|
|
@@ -6472,7 +7133,7 @@
|
|
|
6472
7133
|
// selection may be cleared by passing an empty array or null
|
|
6473
7134
|
// to the method
|
|
6474
7135
|
if (add) {
|
|
6475
|
-
forEach(elements, function(element) {
|
|
7136
|
+
forEach$2(elements, function(element) {
|
|
6476
7137
|
if (selectedElements.indexOf(element) !== -1) {
|
|
6477
7138
|
|
|
6478
7139
|
// already selected
|
|
@@ -6537,13 +7198,13 @@
|
|
|
6537
7198
|
var oldSelection = event.oldSelection,
|
|
6538
7199
|
newSelection = event.newSelection;
|
|
6539
7200
|
|
|
6540
|
-
forEach(oldSelection, function(e) {
|
|
7201
|
+
forEach$2(oldSelection, function(e) {
|
|
6541
7202
|
if (newSelection.indexOf(e) === -1) {
|
|
6542
7203
|
deselect(e);
|
|
6543
7204
|
}
|
|
6544
7205
|
});
|
|
6545
7206
|
|
|
6546
|
-
forEach(newSelection, function(e) {
|
|
7207
|
+
forEach$2(newSelection, function(e) {
|
|
6547
7208
|
if (oldSelection.indexOf(e) === -1) {
|
|
6548
7209
|
select(e);
|
|
6549
7210
|
}
|
|
@@ -6575,7 +7236,7 @@
|
|
|
6575
7236
|
return;
|
|
6576
7237
|
}
|
|
6577
7238
|
|
|
6578
|
-
if (isArray$
|
|
7239
|
+
if (isArray$3(autoSelect)) {
|
|
6579
7240
|
selection.select(autoSelect);
|
|
6580
7241
|
} else {
|
|
6581
7242
|
|
|
@@ -6943,13 +7604,13 @@
|
|
|
6943
7604
|
|
|
6944
7605
|
var overlays = this.get(filter) || [];
|
|
6945
7606
|
|
|
6946
|
-
if (!isArray$
|
|
7607
|
+
if (!isArray$3(overlays)) {
|
|
6947
7608
|
overlays = [ overlays ];
|
|
6948
7609
|
}
|
|
6949
7610
|
|
|
6950
7611
|
var self = this;
|
|
6951
7612
|
|
|
6952
|
-
forEach(overlays, function(overlay) {
|
|
7613
|
+
forEach$2(overlays, function(overlay) {
|
|
6953
7614
|
|
|
6954
7615
|
var container = self._getOverlayContainer(overlay.element, true);
|
|
6955
7616
|
|
|
@@ -7058,7 +7719,8 @@
|
|
|
7058
7719
|
|
|
7059
7720
|
|
|
7060
7721
|
Overlays.prototype._createOverlayContainer = function(element) {
|
|
7061
|
-
var html = domify('<div class="djs-overlays"
|
|
7722
|
+
var html = domify('<div class="djs-overlays" />');
|
|
7723
|
+
assign$1(html, { position: 'absolute' });
|
|
7062
7724
|
|
|
7063
7725
|
this._overlayRoot.appendChild(html);
|
|
7064
7726
|
|
|
@@ -7129,7 +7791,8 @@
|
|
|
7129
7791
|
|
|
7130
7792
|
overlayContainer = this._getOverlayContainer(element);
|
|
7131
7793
|
|
|
7132
|
-
htmlContainer = domify('<div class="djs-overlay" data-overlay-id="' + id + '"
|
|
7794
|
+
htmlContainer = domify('<div class="djs-overlay" data-overlay-id="' + id + '">');
|
|
7795
|
+
assign$1(htmlContainer, { position: 'absolute' });
|
|
7133
7796
|
|
|
7134
7797
|
htmlContainer.appendChild(html);
|
|
7135
7798
|
|
|
@@ -7219,7 +7882,7 @@
|
|
|
7219
7882
|
|
|
7220
7883
|
var self = this;
|
|
7221
7884
|
|
|
7222
|
-
forEach(this._overlays, function(overlay) {
|
|
7885
|
+
forEach$2(this._overlays, function(overlay) {
|
|
7223
7886
|
self._updateOverlayVisibilty(overlay, viewbox);
|
|
7224
7887
|
});
|
|
7225
7888
|
};
|
|
@@ -7256,7 +7919,7 @@
|
|
|
7256
7919
|
var element = e.element;
|
|
7257
7920
|
var overlays = self.get({ element: element });
|
|
7258
7921
|
|
|
7259
|
-
forEach(overlays, function(o) {
|
|
7922
|
+
forEach$2(overlays, function(o) {
|
|
7260
7923
|
self.remove(o.id);
|
|
7261
7924
|
});
|
|
7262
7925
|
|
|
@@ -7280,7 +7943,7 @@
|
|
|
7280
7943
|
var container = self._getOverlayContainer(element, true);
|
|
7281
7944
|
|
|
7282
7945
|
if (container) {
|
|
7283
|
-
forEach(container.overlays, function(overlay) {
|
|
7946
|
+
forEach$2(container.overlays, function(overlay) {
|
|
7284
7947
|
self._updateOverlay(overlay);
|
|
7285
7948
|
});
|
|
7286
7949
|
|
|
@@ -7314,16 +7977,22 @@
|
|
|
7314
7977
|
|
|
7315
7978
|
function createRoot(parentNode) {
|
|
7316
7979
|
var root = domify(
|
|
7317
|
-
'<div class="djs-overlay-container"
|
|
7980
|
+
'<div class="djs-overlay-container" />'
|
|
7318
7981
|
);
|
|
7319
7982
|
|
|
7983
|
+
assign$1(root, {
|
|
7984
|
+
position: 'absolute',
|
|
7985
|
+
width: 0,
|
|
7986
|
+
height: 0
|
|
7987
|
+
});
|
|
7988
|
+
|
|
7320
7989
|
parentNode.insertBefore(root, parentNode.firstChild);
|
|
7321
7990
|
|
|
7322
7991
|
return root;
|
|
7323
7992
|
}
|
|
7324
7993
|
|
|
7325
7994
|
function setPosition(el, x, y) {
|
|
7326
|
-
assign(el
|
|
7995
|
+
assign$1(el, { left: x + 'px', top: y + 'px' });
|
|
7327
7996
|
}
|
|
7328
7997
|
|
|
7329
7998
|
function setVisible(el, visible) {
|
|
@@ -7487,13 +8156,13 @@
|
|
|
7487
8156
|
throw new Error('handlerFn must be a function');
|
|
7488
8157
|
}
|
|
7489
8158
|
|
|
7490
|
-
if (!isArray$
|
|
8159
|
+
if (!isArray$3(events)) {
|
|
7491
8160
|
events = [ events ];
|
|
7492
8161
|
}
|
|
7493
8162
|
|
|
7494
8163
|
var eventBus = this._eventBus;
|
|
7495
8164
|
|
|
7496
|
-
forEach(events, function(event) {
|
|
8165
|
+
forEach$2(events, function(event) {
|
|
7497
8166
|
|
|
7498
8167
|
// concat commandStack(.event)?(.hook)?
|
|
7499
8168
|
var fullEvent = [ 'commandStack', event, hook ].filter(function(e) { return e; }).join('.');
|
|
@@ -7521,7 +8190,7 @@
|
|
|
7521
8190
|
* This will generate the CommandInterceptor#(preExecute|...|reverted) methods
|
|
7522
8191
|
* which will in term forward to CommandInterceptor#on.
|
|
7523
8192
|
*/
|
|
7524
|
-
forEach(hooks, function(hook) {
|
|
8193
|
+
forEach$2(hooks, function(hook) {
|
|
7525
8194
|
|
|
7526
8195
|
/**
|
|
7527
8196
|
* {canExecute|preExecute|preExecuted|execute|executed|postExecute|postExecuted|revert|reverted}
|
|
@@ -7745,9 +8414,9 @@
|
|
|
7745
8414
|
* @param {canvas} canvas
|
|
7746
8415
|
*/
|
|
7747
8416
|
function DrilldownBreadcrumbs(eventBus, elementRegistry, overlays, canvas) {
|
|
7748
|
-
var breadcrumbs = domify('<ul class="bjs-breadcrumbs"></ul>');
|
|
8417
|
+
var breadcrumbs = domify$1('<ul class="bjs-breadcrumbs"></ul>');
|
|
7749
8418
|
var container = canvas.getContainer();
|
|
7750
|
-
var containerClasses = classes(container);
|
|
8419
|
+
var containerClasses = classes$1(container);
|
|
7751
8420
|
container.appendChild(breadcrumbs);
|
|
7752
8421
|
|
|
7753
8422
|
var boParents = [];
|
|
@@ -7781,7 +8450,7 @@
|
|
|
7781
8450
|
|
|
7782
8451
|
var path = boParents.map(function(parent) {
|
|
7783
8452
|
var title = escapeHTML(parent.name || parent.id);
|
|
7784
|
-
var link = domify('<li><span class="bjs-crumb"><a title="' + title + '">' + title + '</a></span></li>');
|
|
8453
|
+
var link = domify$1('<li><span class="bjs-crumb"><a title="' + title + '">' + title + '</a></span></li>');
|
|
7785
8454
|
|
|
7786
8455
|
var parentPlane = canvas.findRoot(getPlaneIdFromShape(parent)) || canvas.findRoot(parent.id);
|
|
7787
8456
|
|
|
@@ -8303,7 +8972,7 @@
|
|
|
8303
8972
|
}
|
|
8304
8973
|
|
|
8305
8974
|
var hasContent = bo && bo.flowElements && bo.flowElements.length;
|
|
8306
|
-
classes(overlay.html).toggle(EMPTY_MARKER, !hasContent);
|
|
8975
|
+
classes$1(overlay.html).toggle(EMPTY_MARKER, !hasContent);
|
|
8307
8976
|
};
|
|
8308
8977
|
|
|
8309
8978
|
/**
|
|
@@ -8321,7 +8990,7 @@
|
|
|
8321
8990
|
this.removeOverlay(element);
|
|
8322
8991
|
}
|
|
8323
8992
|
|
|
8324
|
-
var button = domify('<button class="bjs-drilldown">' + ARROW_DOWN_SVG + '</button>');
|
|
8993
|
+
var button = domify$1('<button class="bjs-drilldown">' + ARROW_DOWN_SVG + '</button>');
|
|
8325
8994
|
|
|
8326
8995
|
button.addEventListener('click', function() {
|
|
8327
8996
|
canvas.setRootElement(canvas.findRoot(getPlaneIdFromShape(element)));
|
|
@@ -8837,7 +9506,7 @@
|
|
|
8837
9506
|
*/
|
|
8838
9507
|
this.style = function(traits, additionalAttrs) {
|
|
8839
9508
|
|
|
8840
|
-
if (!isArray$
|
|
9509
|
+
if (!isArray$3(traits) && !additionalAttrs) {
|
|
8841
9510
|
additionalAttrs = traits;
|
|
8842
9511
|
traits = [];
|
|
8843
9512
|
}
|
|
@@ -8850,7 +9519,7 @@
|
|
|
8850
9519
|
};
|
|
8851
9520
|
|
|
8852
9521
|
this.computeStyle = function(custom, traits, defaultStyles) {
|
|
8853
|
-
if (!isArray$
|
|
9522
|
+
if (!isArray$3(traits)) {
|
|
8854
9523
|
defaultStyles = traits;
|
|
8855
9524
|
traits = [];
|
|
8856
9525
|
}
|
|
@@ -8974,7 +9643,7 @@
|
|
|
8974
9643
|
var parent = document.createElement('div');
|
|
8975
9644
|
parent.setAttribute('class', 'djs-container');
|
|
8976
9645
|
|
|
8977
|
-
assign(parent
|
|
9646
|
+
assign$1(parent, {
|
|
8978
9647
|
position: 'relative',
|
|
8979
9648
|
overflow: 'hidden',
|
|
8980
9649
|
width: ensurePx(options.width),
|
|
@@ -8988,7 +9657,7 @@
|
|
|
8988
9657
|
|
|
8989
9658
|
function createGroup(parent, cls, childIndex) {
|
|
8990
9659
|
var group = create$1('g');
|
|
8991
|
-
classes$
|
|
9660
|
+
classes$2(group).add(cls);
|
|
8992
9661
|
|
|
8993
9662
|
var index = childIndex !== undefined ? childIndex : parent.childNodes.length - 1;
|
|
8994
9663
|
|
|
@@ -9076,7 +9745,7 @@
|
|
|
9076
9745
|
// debounce canvas.viewbox.changed events
|
|
9077
9746
|
// for smoother diagram interaction
|
|
9078
9747
|
if (config.deferUpdate !== false) {
|
|
9079
|
-
this._viewboxChanged = debounce(bind
|
|
9748
|
+
this._viewboxChanged = debounce(bind(this._viewboxChanged, this), 300);
|
|
9080
9749
|
}
|
|
9081
9750
|
|
|
9082
9751
|
eventBus.on('diagram.init', function() {
|
|
@@ -9309,7 +9978,7 @@
|
|
|
9309
9978
|
return group;
|
|
9310
9979
|
}
|
|
9311
9980
|
|
|
9312
|
-
remove$
|
|
9981
|
+
remove$3(group);
|
|
9313
9982
|
|
|
9314
9983
|
layer.visible = false;
|
|
9315
9984
|
|
|
@@ -9324,7 +9993,7 @@
|
|
|
9324
9993
|
if (layer) {
|
|
9325
9994
|
delete this._layers[name];
|
|
9326
9995
|
|
|
9327
|
-
remove$
|
|
9996
|
+
remove$3(layer.group);
|
|
9328
9997
|
}
|
|
9329
9998
|
};
|
|
9330
9999
|
|
|
@@ -9412,14 +10081,14 @@
|
|
|
9412
10081
|
return;
|
|
9413
10082
|
}
|
|
9414
10083
|
|
|
9415
|
-
forEach([ container.gfx, container.secondaryGfx ], function(gfx) {
|
|
10084
|
+
forEach$2([ container.gfx, container.secondaryGfx ], function(gfx) {
|
|
9416
10085
|
if (gfx) {
|
|
9417
10086
|
|
|
9418
10087
|
// invoke either addClass or removeClass based on mode
|
|
9419
10088
|
if (add) {
|
|
9420
|
-
classes$
|
|
10089
|
+
classes$2(gfx).add(marker);
|
|
9421
10090
|
} else {
|
|
9422
|
-
classes$
|
|
10091
|
+
classes$2(gfx).remove(marker);
|
|
9423
10092
|
}
|
|
9424
10093
|
}
|
|
9425
10094
|
});
|
|
@@ -9485,7 +10154,7 @@
|
|
|
9485
10154
|
|
|
9486
10155
|
var gfx = this.getGraphics(element);
|
|
9487
10156
|
|
|
9488
|
-
return classes$
|
|
10157
|
+
return classes$2(gfx).has(marker);
|
|
9489
10158
|
};
|
|
9490
10159
|
|
|
9491
10160
|
/**
|
|
@@ -11319,7 +11988,7 @@
|
|
|
11319
11988
|
*/
|
|
11320
11989
|
EventBus.prototype.on = function(events, priority, callback, that) {
|
|
11321
11990
|
|
|
11322
|
-
events = isArray$
|
|
11991
|
+
events = isArray$3(events) ? events : [ events ];
|
|
11323
11992
|
|
|
11324
11993
|
if (isFunction(priority)) {
|
|
11325
11994
|
that = callback;
|
|
@@ -11334,7 +12003,7 @@
|
|
|
11334
12003
|
var actualCallback = callback;
|
|
11335
12004
|
|
|
11336
12005
|
if (that) {
|
|
11337
|
-
actualCallback = bind
|
|
12006
|
+
actualCallback = bind(callback, that);
|
|
11338
12007
|
|
|
11339
12008
|
// make sure we remember and are able to remove
|
|
11340
12009
|
// bound callbacks via {@link #off} using the original
|
|
@@ -11404,7 +12073,7 @@
|
|
|
11404
12073
|
*/
|
|
11405
12074
|
EventBus.prototype.off = function(events, callback) {
|
|
11406
12075
|
|
|
11407
|
-
events = isArray$
|
|
12076
|
+
events = isArray$3(events) ? events : [ events ];
|
|
11408
12077
|
|
|
11409
12078
|
var self = this;
|
|
11410
12079
|
|
|
@@ -11770,7 +12439,7 @@
|
|
|
11770
12439
|
childrenGfx = getChildren(gfx);
|
|
11771
12440
|
if (!childrenGfx) {
|
|
11772
12441
|
childrenGfx = create$1('g');
|
|
11773
|
-
classes$
|
|
12442
|
+
classes$2(childrenGfx).add('djs-children');
|
|
11774
12443
|
|
|
11775
12444
|
append(gfx.parentNode, childrenGfx);
|
|
11776
12445
|
}
|
|
@@ -11822,7 +12491,7 @@
|
|
|
11822
12491
|
type, childrenGfx, parentIndex, isFrame
|
|
11823
12492
|
) {
|
|
11824
12493
|
var outerGfx = create$1('g');
|
|
11825
|
-
classes$
|
|
12494
|
+
classes$2(outerGfx).add('djs-group');
|
|
11826
12495
|
|
|
11827
12496
|
// insert node at position
|
|
11828
12497
|
if (typeof parentIndex !== 'undefined') {
|
|
@@ -11832,18 +12501,18 @@
|
|
|
11832
12501
|
}
|
|
11833
12502
|
|
|
11834
12503
|
var gfx = create$1('g');
|
|
11835
|
-
classes$
|
|
11836
|
-
classes$
|
|
12504
|
+
classes$2(gfx).add('djs-element');
|
|
12505
|
+
classes$2(gfx).add('djs-' + type);
|
|
11837
12506
|
|
|
11838
12507
|
if (isFrame) {
|
|
11839
|
-
classes$
|
|
12508
|
+
classes$2(gfx).add('djs-frame');
|
|
11840
12509
|
}
|
|
11841
12510
|
|
|
11842
12511
|
append(outerGfx, gfx);
|
|
11843
12512
|
|
|
11844
12513
|
// create visual
|
|
11845
12514
|
var visual = create$1('g');
|
|
11846
|
-
classes$
|
|
12515
|
+
classes$2(visual).add('djs-visual');
|
|
11847
12516
|
|
|
11848
12517
|
append(gfx, visual);
|
|
11849
12518
|
|
|
@@ -11872,7 +12541,7 @@
|
|
|
11872
12541
|
|
|
11873
12542
|
// update all parents of changed and reorganized their children
|
|
11874
12543
|
// in the correct order (as indicated in our model)
|
|
11875
|
-
forEach(parents, function(parent) {
|
|
12544
|
+
forEach$2(parents, function(parent) {
|
|
11876
12545
|
|
|
11877
12546
|
var children = parent.children;
|
|
11878
12547
|
|
|
@@ -11882,7 +12551,7 @@
|
|
|
11882
12551
|
|
|
11883
12552
|
var childrenGfx = self._getChildrenContainer(parent);
|
|
11884
12553
|
|
|
11885
|
-
forEach(children.slice().reverse(), function(child) {
|
|
12554
|
+
forEach$2(children.slice().reverse(), function(child) {
|
|
11886
12555
|
var childGfx = elementRegistry.getGraphics(child);
|
|
11887
12556
|
|
|
11888
12557
|
prependTo(childGfx.parentNode, childrenGfx);
|
|
@@ -11947,7 +12616,7 @@
|
|
|
11947
12616
|
var gfx = this._elementRegistry.getGraphics(element);
|
|
11948
12617
|
|
|
11949
12618
|
// remove
|
|
11950
|
-
remove$
|
|
12619
|
+
remove$3(gfx.parentNode);
|
|
11951
12620
|
};
|
|
11952
12621
|
|
|
11953
12622
|
|
|
@@ -12207,7 +12876,7 @@
|
|
|
12207
12876
|
prototype = Object.create(Base.prototype);
|
|
12208
12877
|
|
|
12209
12878
|
// initialize default values
|
|
12210
|
-
forEach(descriptor.properties, function(p) {
|
|
12879
|
+
forEach$2(descriptor.properties, function(p) {
|
|
12211
12880
|
if (!p.isMany && p.default !== undefined) {
|
|
12212
12881
|
prototype[p.name] = p.default;
|
|
12213
12882
|
}
|
|
@@ -12226,7 +12895,7 @@
|
|
|
12226
12895
|
props.define(this, '$attrs', { value: {} });
|
|
12227
12896
|
props.define(this, '$parent', { writable: true });
|
|
12228
12897
|
|
|
12229
|
-
forEach(attrs, bind
|
|
12898
|
+
forEach$2(attrs, bind(function(val, key) {
|
|
12230
12899
|
this.set(key, val);
|
|
12231
12900
|
}, this));
|
|
12232
12901
|
}
|
|
@@ -12515,7 +13184,7 @@
|
|
|
12515
13184
|
return;
|
|
12516
13185
|
}
|
|
12517
13186
|
|
|
12518
|
-
forEach(t.properties, bind
|
|
13187
|
+
forEach$2(t.properties, bind(function(p) {
|
|
12519
13188
|
|
|
12520
13189
|
// clone property to allow extensions
|
|
12521
13190
|
p = assign({}, p, {
|
|
@@ -12562,7 +13231,7 @@
|
|
|
12562
13231
|
|
|
12563
13232
|
this.properties = properties;
|
|
12564
13233
|
|
|
12565
|
-
forEach(packages, bind
|
|
13234
|
+
forEach$2(packages, bind(this.registerPackage, this));
|
|
12566
13235
|
}
|
|
12567
13236
|
|
|
12568
13237
|
|
|
@@ -12586,7 +13255,7 @@
|
|
|
12586
13255
|
ensureAvailable(pkgMap, pkg, 'uri');
|
|
12587
13256
|
|
|
12588
13257
|
// register types
|
|
12589
|
-
forEach(pkg.types, bind
|
|
13258
|
+
forEach$2(pkg.types, bind(function(descriptor) {
|
|
12590
13259
|
this.registerType(descriptor, pkg);
|
|
12591
13260
|
}, this));
|
|
12592
13261
|
|
|
@@ -12612,7 +13281,7 @@
|
|
|
12612
13281
|
propertiesByName = {};
|
|
12613
13282
|
|
|
12614
13283
|
// parse properties
|
|
12615
|
-
forEach(type.properties, bind
|
|
13284
|
+
forEach$2(type.properties, bind(function(p) {
|
|
12616
13285
|
|
|
12617
13286
|
// namespace property names
|
|
12618
13287
|
var propertyNs = parseName(p.name, ns.prefix),
|
|
@@ -12638,7 +13307,7 @@
|
|
|
12638
13307
|
propertiesByName: propertiesByName
|
|
12639
13308
|
});
|
|
12640
13309
|
|
|
12641
|
-
forEach(type.extends, bind
|
|
13310
|
+
forEach$2(type.extends, bind(function(extendsName) {
|
|
12642
13311
|
var extended = this.typeMap[extendsName];
|
|
12643
13312
|
|
|
12644
13313
|
extended.traits = extended.traits || [];
|
|
@@ -12692,12 +13361,12 @@
|
|
|
12692
13361
|
throw new Error('unknown type <' + nsName.name + '>');
|
|
12693
13362
|
}
|
|
12694
13363
|
|
|
12695
|
-
forEach(type.superClass, trait ? traverseTrait : traverseSuper);
|
|
13364
|
+
forEach$2(type.superClass, trait ? traverseTrait : traverseSuper);
|
|
12696
13365
|
|
|
12697
13366
|
// call iterator with (type, inherited=!trait)
|
|
12698
13367
|
iterator(type, !trait);
|
|
12699
13368
|
|
|
12700
|
-
forEach(type.traits, traverseTrait);
|
|
13369
|
+
forEach$2(type.traits, traverseTrait);
|
|
12701
13370
|
};
|
|
12702
13371
|
|
|
12703
13372
|
|
|
@@ -13000,7 +13669,7 @@
|
|
|
13000
13669
|
this.properties.define(element, '$parent', { enumerable: false, writable: true });
|
|
13001
13670
|
this.properties.define(element, '$instanceOf', { enumerable: false, writable: true });
|
|
13002
13671
|
|
|
13003
|
-
forEach(properties, function(a, key) {
|
|
13672
|
+
forEach$2(properties, function(a, key) {
|
|
13004
13673
|
if (isObject(a) && a.value !== undefined) {
|
|
13005
13674
|
element[a.name] = a.value;
|
|
13006
13675
|
} else {
|
|
@@ -14462,7 +15131,7 @@
|
|
|
14462
15131
|
model = this.model,
|
|
14463
15132
|
propNameNs;
|
|
14464
15133
|
|
|
14465
|
-
forEach(attributes, function(value, name) {
|
|
15134
|
+
forEach$2(attributes, function(value, name) {
|
|
14466
15135
|
|
|
14467
15136
|
var prop = descriptor.propertiesByName[name],
|
|
14468
15137
|
values;
|
|
@@ -14480,7 +15149,7 @@
|
|
|
14480
15149
|
// IDREFS: parse references as whitespace-separated list
|
|
14481
15150
|
values = value.split(' ');
|
|
14482
15151
|
|
|
14483
|
-
forEach(values, function(v) {
|
|
15152
|
+
forEach$2(values, function(v) {
|
|
14484
15153
|
context.addReference({
|
|
14485
15154
|
element: instance,
|
|
14486
15155
|
property: prop.ns.name,
|
|
@@ -15224,7 +15893,7 @@
|
|
|
15224
15893
|
}
|
|
15225
15894
|
|
|
15226
15895
|
// do not serialize defaults
|
|
15227
|
-
if (!has(element, name)) {
|
|
15896
|
+
if (!has$2(element, name)) {
|
|
15228
15897
|
return false;
|
|
15229
15898
|
}
|
|
15230
15899
|
|
|
@@ -15453,7 +16122,7 @@
|
|
|
15453
16122
|
|
|
15454
16123
|
var attributes = [];
|
|
15455
16124
|
|
|
15456
|
-
forEach(element, function(val, key) {
|
|
16125
|
+
forEach$2(element, function(val, key) {
|
|
15457
16126
|
|
|
15458
16127
|
var nonNsAttr;
|
|
15459
16128
|
|
|
@@ -15461,7 +16130,7 @@
|
|
|
15461
16130
|
body.push(new BodySerializer().build({ type: 'String' }, val));
|
|
15462
16131
|
} else
|
|
15463
16132
|
if (key === '$children') {
|
|
15464
|
-
forEach(val, function(child) {
|
|
16133
|
+
forEach$2(val, function(child) {
|
|
15465
16134
|
body.push(new ElementSerializer(self).build(child));
|
|
15466
16135
|
});
|
|
15467
16136
|
} else
|
|
@@ -15531,7 +16200,7 @@
|
|
|
15531
16200
|
// parse namespace attributes first
|
|
15532
16201
|
// and log them. push non namespace attributes to a list
|
|
15533
16202
|
// and process them later
|
|
15534
|
-
forEach(genericAttrs, function(value, name) {
|
|
16203
|
+
forEach$2(genericAttrs, function(value, name) {
|
|
15535
16204
|
|
|
15536
16205
|
var nonNsAttr = self.parseNsAttribute(element, name, value);
|
|
15537
16206
|
|
|
@@ -15547,7 +16216,7 @@
|
|
|
15547
16216
|
|
|
15548
16217
|
var self = this;
|
|
15549
16218
|
|
|
15550
|
-
forEach(attributes, function(attr) {
|
|
16219
|
+
forEach$2(attributes, function(attr) {
|
|
15551
16220
|
|
|
15552
16221
|
// do not serialize xsi:type attribute
|
|
15553
16222
|
// it is set manually based on the actual implementation type
|
|
@@ -15572,7 +16241,7 @@
|
|
|
15572
16241
|
body = this.body,
|
|
15573
16242
|
element = this.element;
|
|
15574
16243
|
|
|
15575
|
-
forEach(properties, function(p) {
|
|
16244
|
+
forEach$2(properties, function(p) {
|
|
15576
16245
|
var value = element.get(p.name),
|
|
15577
16246
|
isReference = p.isReference,
|
|
15578
16247
|
isMany = p.isMany;
|
|
@@ -15585,12 +16254,12 @@
|
|
|
15585
16254
|
body.push(new BodySerializer().build(p, value[0]));
|
|
15586
16255
|
} else
|
|
15587
16256
|
if (isSimple(p.type)) {
|
|
15588
|
-
forEach(value, function(v) {
|
|
16257
|
+
forEach$2(value, function(v) {
|
|
15589
16258
|
body.push(new ValueSerializer(self.addTagName(self.nsPropertyTagName(p))).build(p, v));
|
|
15590
16259
|
});
|
|
15591
16260
|
} else
|
|
15592
16261
|
if (isReference) {
|
|
15593
|
-
forEach(value, function(v) {
|
|
16262
|
+
forEach$2(value, function(v) {
|
|
15594
16263
|
body.push(new ReferenceSerializer(self.addTagName(self.nsPropertyTagName(p))).build(v));
|
|
15595
16264
|
});
|
|
15596
16265
|
} else {
|
|
@@ -15600,7 +16269,7 @@
|
|
|
15600
16269
|
var asType = serializeAsType(p),
|
|
15601
16270
|
asProperty = serializeAsProperty(p);
|
|
15602
16271
|
|
|
15603
|
-
forEach(value, function(v) {
|
|
16272
|
+
forEach$2(value, function(v) {
|
|
15604
16273
|
var serializer;
|
|
15605
16274
|
|
|
15606
16275
|
if (asType) {
|
|
@@ -15708,7 +16377,7 @@
|
|
|
15708
16377
|
var self = this,
|
|
15709
16378
|
element = this.element;
|
|
15710
16379
|
|
|
15711
|
-
forEach(properties, function(p) {
|
|
16380
|
+
forEach$2(properties, function(p) {
|
|
15712
16381
|
|
|
15713
16382
|
var value = element.get(p.name);
|
|
15714
16383
|
|
|
@@ -15719,7 +16388,7 @@
|
|
|
15719
16388
|
}
|
|
15720
16389
|
else {
|
|
15721
16390
|
var values = [];
|
|
15722
|
-
forEach(value, function(v) {
|
|
16391
|
+
forEach$2(value, function(v) {
|
|
15723
16392
|
values.push(v.id);
|
|
15724
16393
|
});
|
|
15725
16394
|
|
|
@@ -15759,7 +16428,7 @@
|
|
|
15759
16428
|
attrs = getNsAttrs(namespaces).concat(attrs);
|
|
15760
16429
|
}
|
|
15761
16430
|
|
|
15762
|
-
forEach(attrs, function(a) {
|
|
16431
|
+
forEach$2(attrs, function(a) {
|
|
15763
16432
|
writer
|
|
15764
16433
|
.append(' ')
|
|
15765
16434
|
.append(nsName(a.name)).append('="').append(a.value).append('"');
|
|
@@ -15786,7 +16455,7 @@
|
|
|
15786
16455
|
.indent();
|
|
15787
16456
|
}
|
|
15788
16457
|
|
|
15789
|
-
forEach(this.body, function(b) {
|
|
16458
|
+
forEach$2(this.body, function(b) {
|
|
15790
16459
|
b.serializeTo(writer);
|
|
15791
16460
|
});
|
|
15792
16461
|
|
|
@@ -19720,7 +20389,7 @@
|
|
|
19720
20389
|
function ensureCompatDiRef(businessObject) {
|
|
19721
20390
|
|
|
19722
20391
|
// bpmnElement can have multiple independent DIs
|
|
19723
|
-
if (!has(businessObject, 'di')) {
|
|
20392
|
+
if (!has$2(businessObject, 'di')) {
|
|
19724
20393
|
Object.defineProperty(businessObject, 'di', {
|
|
19725
20394
|
get: function() {
|
|
19726
20395
|
throw new Error(DI_ERROR_MESSAGE);
|
|
@@ -19854,7 +20523,7 @@
|
|
|
19854
20523
|
function handlePlane(plane) {
|
|
19855
20524
|
registerDi(plane);
|
|
19856
20525
|
|
|
19857
|
-
forEach(plane.planeElement, handlePlaneElement);
|
|
20526
|
+
forEach$2(plane.planeElement, handlePlaneElement);
|
|
19858
20527
|
}
|
|
19859
20528
|
|
|
19860
20529
|
function handlePlaneElement(planeElement) {
|
|
@@ -19991,7 +20660,7 @@
|
|
|
19991
20660
|
}
|
|
19992
20661
|
|
|
19993
20662
|
function handleMessageFlows(messageFlows, context) {
|
|
19994
|
-
forEach(messageFlows, contextual(handleMessageFlow, context));
|
|
20663
|
+
forEach$2(messageFlows, contextual(handleMessageFlow, context));
|
|
19995
20664
|
}
|
|
19996
20665
|
|
|
19997
20666
|
function handleDataAssociation(association, context) {
|
|
@@ -20017,7 +20686,7 @@
|
|
|
20017
20686
|
|
|
20018
20687
|
function handleArtifacts(artifacts, context) {
|
|
20019
20688
|
|
|
20020
|
-
forEach(artifacts, function(e) {
|
|
20689
|
+
forEach$2(artifacts, function(e) {
|
|
20021
20690
|
if (is(e, 'bpmn:Association')) {
|
|
20022
20691
|
deferred.push(function() {
|
|
20023
20692
|
handleArtifact(e, context);
|
|
@@ -20034,8 +20703,8 @@
|
|
|
20034
20703
|
return;
|
|
20035
20704
|
}
|
|
20036
20705
|
|
|
20037
|
-
forEach(ioSpecification.dataInputs, contextual(handleDataInput, context));
|
|
20038
|
-
forEach(ioSpecification.dataOutputs, contextual(handleDataOutput, context));
|
|
20706
|
+
forEach$2(ioSpecification.dataInputs, contextual(handleDataInput, context));
|
|
20707
|
+
forEach$2(ioSpecification.dataOutputs, contextual(handleDataOutput, context));
|
|
20039
20708
|
}
|
|
20040
20709
|
|
|
20041
20710
|
function handleSubProcess(subProcess, context) {
|
|
@@ -20062,8 +20731,8 @@
|
|
|
20062
20731
|
// * bpmn:CatchEvent
|
|
20063
20732
|
//
|
|
20064
20733
|
deferred.push(function() {
|
|
20065
|
-
forEach(flowNode.dataInputAssociations, contextual(handleDataAssociation, context));
|
|
20066
|
-
forEach(flowNode.dataOutputAssociations, contextual(handleDataAssociation, context));
|
|
20734
|
+
forEach$2(flowNode.dataInputAssociations, contextual(handleDataAssociation, context));
|
|
20735
|
+
forEach$2(flowNode.dataOutputAssociations, contextual(handleDataAssociation, context));
|
|
20067
20736
|
});
|
|
20068
20737
|
}
|
|
20069
20738
|
|
|
@@ -20090,11 +20759,11 @@
|
|
|
20090
20759
|
}
|
|
20091
20760
|
|
|
20092
20761
|
function handleLaneSet(laneSet, context) {
|
|
20093
|
-
forEach(laneSet.lanes, contextual(handleLane, context));
|
|
20762
|
+
forEach$2(laneSet.lanes, contextual(handleLane, context));
|
|
20094
20763
|
}
|
|
20095
20764
|
|
|
20096
20765
|
function handleLaneSets(laneSets, context) {
|
|
20097
|
-
forEach(laneSets, contextual(handleLaneSet, context));
|
|
20766
|
+
forEach$2(laneSets, contextual(handleLaneSet, context));
|
|
20098
20767
|
}
|
|
20099
20768
|
|
|
20100
20769
|
function handleFlowElementsContainer(container, context) {
|
|
@@ -20106,7 +20775,7 @@
|
|
|
20106
20775
|
}
|
|
20107
20776
|
|
|
20108
20777
|
function handleFlowElements(flowElements, context) {
|
|
20109
|
-
forEach(flowElements, function(e) {
|
|
20778
|
+
forEach$2(flowElements, function(e) {
|
|
20110
20779
|
if (is(e, 'bpmn:SequenceFlow')) {
|
|
20111
20780
|
deferred.push(function() {
|
|
20112
20781
|
handleSequenceFlow(e, context);
|
|
@@ -20144,7 +20813,7 @@
|
|
|
20144
20813
|
|
|
20145
20814
|
function handleCollaboration(collaboration, context) {
|
|
20146
20815
|
|
|
20147
|
-
forEach(collaboration.participants, contextual(handleParticipant, context));
|
|
20816
|
+
forEach$2(collaboration.participants, contextual(handleParticipant, context));
|
|
20148
20817
|
|
|
20149
20818
|
handleArtifacts(collaboration.artifacts, context);
|
|
20150
20819
|
|
|
@@ -20158,7 +20827,7 @@
|
|
|
20158
20827
|
function wireFlowNodeRefs(lane) {
|
|
20159
20828
|
|
|
20160
20829
|
// wire the virtual flowNodeRefs <-> relationship
|
|
20161
|
-
forEach(lane.flowNodeRef, function(flowNode) {
|
|
20830
|
+
forEach$2(lane.flowNodeRef, function(flowNode) {
|
|
20162
20831
|
var lanes = flowNode.get('lanes');
|
|
20163
20832
|
|
|
20164
20833
|
if (lanes) {
|
|
@@ -20252,7 +20921,7 @@
|
|
|
20252
20921
|
|
|
20253
20922
|
// traverse BPMN 2.0 document model,
|
|
20254
20923
|
// starting at definitions
|
|
20255
|
-
forEach(diagramsToImport, function(diagram) {
|
|
20924
|
+
forEach$2(diagramsToImport, function(diagram) {
|
|
20256
20925
|
walker.handleDefinitions(definitions, diagram);
|
|
20257
20926
|
});
|
|
20258
20927
|
|
|
@@ -20334,7 +21003,7 @@
|
|
|
20334
21003
|
|
|
20335
21004
|
// all collaboration processes can contain sub-diagrams
|
|
20336
21005
|
if (collaboration) {
|
|
20337
|
-
rootElements = map
|
|
21006
|
+
rootElements = map(collaboration.participants, function(participant) {
|
|
20338
21007
|
return participant.processRef;
|
|
20339
21008
|
});
|
|
20340
21009
|
|
|
@@ -20348,7 +21017,7 @@
|
|
|
20348
21017
|
var diagramsToImport = [ bpmnDiagram ];
|
|
20349
21018
|
var handledElements = [ bpmnElement ];
|
|
20350
21019
|
|
|
20351
|
-
forEach(definitions.diagrams, function(diagram) {
|
|
21020
|
+
forEach$2(definitions.diagrams, function(diagram) {
|
|
20352
21021
|
var businessObject = diagram.plane.bpmnElement;
|
|
20353
21022
|
|
|
20354
21023
|
if (
|
|
@@ -20367,7 +21036,7 @@
|
|
|
20367
21036
|
function selfAndAllFlowElements(elements) {
|
|
20368
21037
|
var result = [];
|
|
20369
21038
|
|
|
20370
|
-
forEach(elements, function(element) {
|
|
21039
|
+
forEach$2(elements, function(element) {
|
|
20371
21040
|
if (!element) {
|
|
20372
21041
|
return;
|
|
20373
21042
|
}
|
|
@@ -20400,53 +21069,53 @@
|
|
|
20400
21069
|
|
|
20401
21070
|
|
|
20402
21071
|
// inlined ../../resources/logo.svg
|
|
20403
|
-
var BPMNIO_LOGO_SVG = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21"
|
|
21072
|
+
var BPMNIO_LOGO_SVG = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="currentColor" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>';
|
|
20404
21073
|
|
|
20405
21074
|
var BPMNIO_IMG = BPMNIO_LOGO_SVG;
|
|
20406
21075
|
|
|
20407
|
-
|
|
20408
|
-
|
|
20409
|
-
}
|
|
20410
|
-
|
|
20411
|
-
var LINK_STYLES =
|
|
20412
|
-
'color: #404040'
|
|
20413
|
-
|
|
20414
|
-
|
|
20415
|
-
var LIGHTBOX_STYLES =
|
|
20416
|
-
'
|
|
20417
|
-
'position: fixed',
|
|
20418
|
-
'top: 0',
|
|
20419
|
-
'left: 0',
|
|
20420
|
-
'right: 0',
|
|
20421
|
-
'bottom: 0'
|
|
20422
|
-
|
|
20423
|
-
|
|
20424
|
-
var BACKDROP_STYLES =
|
|
20425
|
-
'width: 100%',
|
|
20426
|
-
'height: 100%',
|
|
20427
|
-
'background: rgba(40,40,40,0.2)'
|
|
20428
|
-
|
|
20429
|
-
|
|
20430
|
-
var NOTICE_STYLES =
|
|
20431
|
-
'position: absolute',
|
|
20432
|
-
'left: 50%',
|
|
20433
|
-
'top: 40%',
|
|
20434
|
-
'transform: translate(-50%)',
|
|
20435
|
-
'width: 260px',
|
|
20436
|
-
'padding: 10px',
|
|
20437
|
-
'background: white',
|
|
20438
|
-
'
|
|
20439
|
-
'
|
|
20440
|
-
'
|
|
20441
|
-
'display: flex',
|
|
20442
|
-
'
|
|
20443
|
-
|
|
21076
|
+
var LOGO_STYLES = {
|
|
21077
|
+
verticalAlign: 'middle'
|
|
21078
|
+
};
|
|
21079
|
+
|
|
21080
|
+
var LINK_STYLES = {
|
|
21081
|
+
'color': '#404040'
|
|
21082
|
+
};
|
|
21083
|
+
|
|
21084
|
+
var LIGHTBOX_STYLES = {
|
|
21085
|
+
'zIndex': '1001',
|
|
21086
|
+
'position': 'fixed',
|
|
21087
|
+
'top': '0',
|
|
21088
|
+
'left': '0',
|
|
21089
|
+
'right': '0',
|
|
21090
|
+
'bottom': '0'
|
|
21091
|
+
};
|
|
21092
|
+
|
|
21093
|
+
var BACKDROP_STYLES = {
|
|
21094
|
+
'width': '100%',
|
|
21095
|
+
'height': '100%',
|
|
21096
|
+
'background': 'rgba(40,40,40,0.2)'
|
|
21097
|
+
};
|
|
21098
|
+
|
|
21099
|
+
var NOTICE_STYLES = {
|
|
21100
|
+
'position': 'absolute',
|
|
21101
|
+
'left': '50%',
|
|
21102
|
+
'top': '40%',
|
|
21103
|
+
'transform': 'translate(-50%)',
|
|
21104
|
+
'width': '260px',
|
|
21105
|
+
'padding': '10px',
|
|
21106
|
+
'background': 'white',
|
|
21107
|
+
'boxShadow': '0 1px 4px rgba(0,0,0,0.3)',
|
|
21108
|
+
'fontFamily': 'Helvetica, Arial, sans-serif',
|
|
21109
|
+
'fontSize': '14px',
|
|
21110
|
+
'display': 'flex',
|
|
21111
|
+
'lineHeight': '1.3'
|
|
21112
|
+
};
|
|
20444
21113
|
|
|
20445
21114
|
var LIGHTBOX_MARKUP =
|
|
20446
|
-
'<div class="bjs-powered-by-lightbox"
|
|
20447
|
-
'<div class="backdrop"
|
|
20448
|
-
'<div class="notice"
|
|
20449
|
-
'<a href="https://bpmn.io" target="_blank" rel="noopener"
|
|
21115
|
+
'<div class="bjs-powered-by-lightbox">' +
|
|
21116
|
+
'<div class="backdrop"></div>' +
|
|
21117
|
+
'<div class="notice">' +
|
|
21118
|
+
'<a href="https://bpmn.io" target="_blank" rel="noopener" class="link">' +
|
|
20450
21119
|
BPMNIO_IMG +
|
|
20451
21120
|
'</a>' +
|
|
20452
21121
|
'<span>' +
|
|
@@ -20459,12 +21128,25 @@
|
|
|
20459
21128
|
|
|
20460
21129
|
var lightbox;
|
|
20461
21130
|
|
|
21131
|
+
function createLightbox() {
|
|
21132
|
+
lightbox = domify$1(LIGHTBOX_MARKUP);
|
|
21133
|
+
|
|
21134
|
+
assign$1$1(lightbox, LIGHTBOX_STYLES);
|
|
21135
|
+
assign$1$1(query$1('svg', lightbox), LOGO_STYLES);
|
|
21136
|
+
assign$1$1(query$1('.backdrop', lightbox), BACKDROP_STYLES);
|
|
21137
|
+
assign$1$1(query$1('.notice', lightbox), NOTICE_STYLES);
|
|
21138
|
+
assign$1$1(query$1('.link', lightbox), LINK_STYLES, {
|
|
21139
|
+
'margin': '15px 20px 15px 10px',
|
|
21140
|
+
'alignSelf': 'center'
|
|
21141
|
+
});
|
|
21142
|
+
}
|
|
21143
|
+
|
|
20462
21144
|
function open() {
|
|
20463
21145
|
|
|
20464
21146
|
if (!lightbox) {
|
|
20465
|
-
|
|
21147
|
+
createLightbox();
|
|
20466
21148
|
|
|
20467
|
-
delegate.bind(lightbox, '.backdrop', 'click', function(event) {
|
|
21149
|
+
delegate$1.bind(lightbox, '.backdrop', 'click', function(event) {
|
|
20468
21150
|
document.body.removeChild(lightbox);
|
|
20469
21151
|
});
|
|
20470
21152
|
}
|
|
@@ -20883,7 +21565,7 @@
|
|
|
20883
21565
|
var canvas = self.get('canvas');
|
|
20884
21566
|
|
|
20885
21567
|
var contentNode = canvas.getActiveLayer(),
|
|
20886
|
-
defsNode = query('defs', canvas._svg);
|
|
21568
|
+
defsNode = query$1('defs', canvas._svg);
|
|
20887
21569
|
|
|
20888
21570
|
var contents = innerSVG(contentNode),
|
|
20889
21571
|
defs = defsNode ? '<defs>' + innerSVG(defsNode) + '</defs>' : '';
|
|
@@ -20985,7 +21667,7 @@
|
|
|
20985
21667
|
Diagram.prototype.destroy.call(this);
|
|
20986
21668
|
|
|
20987
21669
|
// dom detach
|
|
20988
|
-
remove$
|
|
21670
|
+
remove$2(this._container);
|
|
20989
21671
|
};
|
|
20990
21672
|
|
|
20991
21673
|
/**
|
|
@@ -21028,7 +21710,7 @@
|
|
|
21028
21710
|
}
|
|
21029
21711
|
|
|
21030
21712
|
if (typeof parentNode === 'string') {
|
|
21031
|
-
parentNode = query(parentNode);
|
|
21713
|
+
parentNode = query$1(parentNode);
|
|
21032
21714
|
}
|
|
21033
21715
|
|
|
21034
21716
|
parentNode.appendChild(this._container);
|
|
@@ -21096,9 +21778,9 @@
|
|
|
21096
21778
|
|
|
21097
21779
|
BaseViewer.prototype._createContainer = function(options) {
|
|
21098
21780
|
|
|
21099
|
-
var container = domify('<div class="bjs-container"></div>');
|
|
21781
|
+
var container = domify$1('<div class="bjs-container"></div>');
|
|
21100
21782
|
|
|
21101
|
-
assign(container
|
|
21783
|
+
assign$1$1(container, {
|
|
21102
21784
|
width: ensureUnit(options.width),
|
|
21103
21785
|
height: ensureUnit(options.height),
|
|
21104
21786
|
position: options.position
|
|
@@ -21188,15 +21870,23 @@
|
|
|
21188
21870
|
'target="_blank" ' +
|
|
21189
21871
|
'class="bjs-powered-by" ' +
|
|
21190
21872
|
'title="Powered by bpmn.io" ' +
|
|
21191
|
-
|
|
21873
|
+
'>' +
|
|
21192
21874
|
img +
|
|
21193
21875
|
'</a>';
|
|
21194
21876
|
|
|
21195
|
-
var linkElement = domify(linkMarkup);
|
|
21877
|
+
var linkElement = domify$1(linkMarkup);
|
|
21878
|
+
|
|
21879
|
+
assign$1$1(query$1('svg', linkElement), LOGO_STYLES);
|
|
21880
|
+
assign$1$1(linkElement, LINK_STYLES, {
|
|
21881
|
+
position: 'absolute',
|
|
21882
|
+
bottom: '15px',
|
|
21883
|
+
right: '15px',
|
|
21884
|
+
zIndex: '100'
|
|
21885
|
+
});
|
|
21196
21886
|
|
|
21197
21887
|
container.appendChild(linkElement);
|
|
21198
21888
|
|
|
21199
|
-
componentEvent.bind(linkElement, 'click', function(event) {
|
|
21889
|
+
componentEvent$1.bind(linkElement, 'click', function(event) {
|
|
21200
21890
|
open();
|
|
21201
21891
|
|
|
21202
21892
|
event.preventDefault();
|
|
@@ -21299,7 +21989,7 @@
|
|
|
21299
21989
|
* @param {KeyboardEvent} event
|
|
21300
21990
|
*/
|
|
21301
21991
|
function isKey(keys, event) {
|
|
21302
|
-
keys = isArray$
|
|
21992
|
+
keys = isArray$3(keys) ? keys : [ keys ];
|
|
21303
21993
|
|
|
21304
21994
|
return keys.indexOf(event.key) !== -1 || keys.indexOf(event.keyCode) !== -1;
|
|
21305
21995
|
}
|
|
@@ -22028,7 +22718,7 @@
|
|
|
22028
22718
|
this._canvas = canvas;
|
|
22029
22719
|
this._container = canvas._container;
|
|
22030
22720
|
|
|
22031
|
-
this._handleWheel = bind
|
|
22721
|
+
this._handleWheel = bind(this._handleWheel, this);
|
|
22032
22722
|
|
|
22033
22723
|
this._totalDelta = 0;
|
|
22034
22724
|
this._scale = config.scale || DEFAULT_SCALE;
|