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-viewer v9.0
|
|
2
|
+
* bpmn-js - bpmn-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(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
|
}
|
|
@@ -5865,13 +6523,13 @@
|
|
|
5865
6523
|
}
|
|
5866
6524
|
|
|
5867
6525
|
function registerEvents(svg) {
|
|
5868
|
-
forEach(bindings, function(val, key) {
|
|
6526
|
+
forEach$2(bindings, function(val, key) {
|
|
5869
6527
|
registerEvent(svg, key, val);
|
|
5870
6528
|
});
|
|
5871
6529
|
}
|
|
5872
6530
|
|
|
5873
6531
|
function unregisterEvents(svg) {
|
|
5874
|
-
forEach(bindings, function(val, key) {
|
|
6532
|
+
forEach$2(bindings, function(val, key) {
|
|
5875
6533
|
unregisterEvent(svg, key, val);
|
|
5876
6534
|
});
|
|
5877
6535
|
}
|
|
@@ -5931,10 +6589,13 @@
|
|
|
5931
6589
|
|
|
5932
6590
|
var ALL_HIT_STYLE = createHitStyle('djs-hit djs-hit-all');
|
|
5933
6591
|
|
|
6592
|
+
var NO_MOVE_HIT_STYLE = createHitStyle('djs-hit djs-hit-no-move');
|
|
6593
|
+
|
|
5934
6594
|
var HIT_TYPES = {
|
|
5935
6595
|
'all': ALL_HIT_STYLE,
|
|
5936
6596
|
'click-stroke': CLICK_STROKE_HIT_STYLE,
|
|
5937
|
-
'stroke': STROKE_HIT_STYLE
|
|
6597
|
+
'stroke': STROKE_HIT_STYLE,
|
|
6598
|
+
'no-move': NO_MOVE_HIT_STYLE
|
|
5938
6599
|
};
|
|
5939
6600
|
|
|
5940
6601
|
function createHitStyle(classNames, attrs) {
|
|
@@ -5978,7 +6639,7 @@
|
|
|
5978
6639
|
this.removeHits = function(gfx) {
|
|
5979
6640
|
var hits = all('.djs-hit', gfx);
|
|
5980
6641
|
|
|
5981
|
-
forEach(hits, remove$
|
|
6642
|
+
forEach$2(hits, remove$3);
|
|
5982
6643
|
};
|
|
5983
6644
|
|
|
5984
6645
|
/**
|
|
@@ -6192,7 +6853,7 @@
|
|
|
6192
6853
|
function getBBox(elements, stopRecursion) {
|
|
6193
6854
|
|
|
6194
6855
|
stopRecursion = !!stopRecursion;
|
|
6195
|
-
if (!isArray$
|
|
6856
|
+
if (!isArray$3(elements)) {
|
|
6196
6857
|
elements = [ elements ];
|
|
6197
6858
|
}
|
|
6198
6859
|
|
|
@@ -6201,7 +6862,7 @@
|
|
|
6201
6862
|
maxX,
|
|
6202
6863
|
maxY;
|
|
6203
6864
|
|
|
6204
|
-
forEach(elements, function(element) {
|
|
6865
|
+
forEach$2(elements, function(element) {
|
|
6205
6866
|
|
|
6206
6867
|
// If element is a connection the bbox must be computed first
|
|
6207
6868
|
var bbox = element;
|
|
@@ -6438,7 +7099,7 @@
|
|
|
6438
7099
|
var selectedElements = this._selectedElements,
|
|
6439
7100
|
oldSelection = selectedElements.slice();
|
|
6440
7101
|
|
|
6441
|
-
if (!isArray$
|
|
7102
|
+
if (!isArray$3(elements)) {
|
|
6442
7103
|
elements = elements ? [ elements ] : [];
|
|
6443
7104
|
}
|
|
6444
7105
|
|
|
@@ -6455,7 +7116,7 @@
|
|
|
6455
7116
|
// selection may be cleared by passing an empty array or null
|
|
6456
7117
|
// to the method
|
|
6457
7118
|
if (add) {
|
|
6458
|
-
forEach(elements, function(element) {
|
|
7119
|
+
forEach$2(elements, function(element) {
|
|
6459
7120
|
if (selectedElements.indexOf(element) !== -1) {
|
|
6460
7121
|
|
|
6461
7122
|
// already selected
|
|
@@ -6520,13 +7181,13 @@
|
|
|
6520
7181
|
var oldSelection = event.oldSelection,
|
|
6521
7182
|
newSelection = event.newSelection;
|
|
6522
7183
|
|
|
6523
|
-
forEach(oldSelection, function(e) {
|
|
7184
|
+
forEach$2(oldSelection, function(e) {
|
|
6524
7185
|
if (newSelection.indexOf(e) === -1) {
|
|
6525
7186
|
deselect(e);
|
|
6526
7187
|
}
|
|
6527
7188
|
});
|
|
6528
7189
|
|
|
6529
|
-
forEach(newSelection, function(e) {
|
|
7190
|
+
forEach$2(newSelection, function(e) {
|
|
6530
7191
|
if (oldSelection.indexOf(e) === -1) {
|
|
6531
7192
|
select(e);
|
|
6532
7193
|
}
|
|
@@ -6558,7 +7219,7 @@
|
|
|
6558
7219
|
return;
|
|
6559
7220
|
}
|
|
6560
7221
|
|
|
6561
|
-
if (isArray$
|
|
7222
|
+
if (isArray$3(autoSelect)) {
|
|
6562
7223
|
selection.select(autoSelect);
|
|
6563
7224
|
} else {
|
|
6564
7225
|
|
|
@@ -6926,13 +7587,13 @@
|
|
|
6926
7587
|
|
|
6927
7588
|
var overlays = this.get(filter) || [];
|
|
6928
7589
|
|
|
6929
|
-
if (!isArray$
|
|
7590
|
+
if (!isArray$3(overlays)) {
|
|
6930
7591
|
overlays = [ overlays ];
|
|
6931
7592
|
}
|
|
6932
7593
|
|
|
6933
7594
|
var self = this;
|
|
6934
7595
|
|
|
6935
|
-
forEach(overlays, function(overlay) {
|
|
7596
|
+
forEach$2(overlays, function(overlay) {
|
|
6936
7597
|
|
|
6937
7598
|
var container = self._getOverlayContainer(overlay.element, true);
|
|
6938
7599
|
|
|
@@ -7041,7 +7702,8 @@
|
|
|
7041
7702
|
|
|
7042
7703
|
|
|
7043
7704
|
Overlays.prototype._createOverlayContainer = function(element) {
|
|
7044
|
-
var html = domify('<div class="djs-overlays"
|
|
7705
|
+
var html = domify('<div class="djs-overlays" />');
|
|
7706
|
+
assign$1(html, { position: 'absolute' });
|
|
7045
7707
|
|
|
7046
7708
|
this._overlayRoot.appendChild(html);
|
|
7047
7709
|
|
|
@@ -7112,7 +7774,8 @@
|
|
|
7112
7774
|
|
|
7113
7775
|
overlayContainer = this._getOverlayContainer(element);
|
|
7114
7776
|
|
|
7115
|
-
htmlContainer = domify('<div class="djs-overlay" data-overlay-id="' + id + '"
|
|
7777
|
+
htmlContainer = domify('<div class="djs-overlay" data-overlay-id="' + id + '">');
|
|
7778
|
+
assign$1(htmlContainer, { position: 'absolute' });
|
|
7116
7779
|
|
|
7117
7780
|
htmlContainer.appendChild(html);
|
|
7118
7781
|
|
|
@@ -7202,7 +7865,7 @@
|
|
|
7202
7865
|
|
|
7203
7866
|
var self = this;
|
|
7204
7867
|
|
|
7205
|
-
forEach(this._overlays, function(overlay) {
|
|
7868
|
+
forEach$2(this._overlays, function(overlay) {
|
|
7206
7869
|
self._updateOverlayVisibilty(overlay, viewbox);
|
|
7207
7870
|
});
|
|
7208
7871
|
};
|
|
@@ -7239,7 +7902,7 @@
|
|
|
7239
7902
|
var element = e.element;
|
|
7240
7903
|
var overlays = self.get({ element: element });
|
|
7241
7904
|
|
|
7242
|
-
forEach(overlays, function(o) {
|
|
7905
|
+
forEach$2(overlays, function(o) {
|
|
7243
7906
|
self.remove(o.id);
|
|
7244
7907
|
});
|
|
7245
7908
|
|
|
@@ -7263,7 +7926,7 @@
|
|
|
7263
7926
|
var container = self._getOverlayContainer(element, true);
|
|
7264
7927
|
|
|
7265
7928
|
if (container) {
|
|
7266
|
-
forEach(container.overlays, function(overlay) {
|
|
7929
|
+
forEach$2(container.overlays, function(overlay) {
|
|
7267
7930
|
self._updateOverlay(overlay);
|
|
7268
7931
|
});
|
|
7269
7932
|
|
|
@@ -7297,16 +7960,22 @@
|
|
|
7297
7960
|
|
|
7298
7961
|
function createRoot(parentNode) {
|
|
7299
7962
|
var root = domify(
|
|
7300
|
-
'<div class="djs-overlay-container"
|
|
7963
|
+
'<div class="djs-overlay-container" />'
|
|
7301
7964
|
);
|
|
7302
7965
|
|
|
7966
|
+
assign$1(root, {
|
|
7967
|
+
position: 'absolute',
|
|
7968
|
+
width: 0,
|
|
7969
|
+
height: 0
|
|
7970
|
+
});
|
|
7971
|
+
|
|
7303
7972
|
parentNode.insertBefore(root, parentNode.firstChild);
|
|
7304
7973
|
|
|
7305
7974
|
return root;
|
|
7306
7975
|
}
|
|
7307
7976
|
|
|
7308
7977
|
function setPosition(el, x, y) {
|
|
7309
|
-
assign(el
|
|
7978
|
+
assign$1(el, { left: x + 'px', top: y + 'px' });
|
|
7310
7979
|
}
|
|
7311
7980
|
|
|
7312
7981
|
function setVisible(el, visible) {
|
|
@@ -7470,13 +8139,13 @@
|
|
|
7470
8139
|
throw new Error('handlerFn must be a function');
|
|
7471
8140
|
}
|
|
7472
8141
|
|
|
7473
|
-
if (!isArray$
|
|
8142
|
+
if (!isArray$3(events)) {
|
|
7474
8143
|
events = [ events ];
|
|
7475
8144
|
}
|
|
7476
8145
|
|
|
7477
8146
|
var eventBus = this._eventBus;
|
|
7478
8147
|
|
|
7479
|
-
forEach(events, function(event) {
|
|
8148
|
+
forEach$2(events, function(event) {
|
|
7480
8149
|
|
|
7481
8150
|
// concat commandStack(.event)?(.hook)?
|
|
7482
8151
|
var fullEvent = [ 'commandStack', event, hook ].filter(function(e) { return e; }).join('.');
|
|
@@ -7504,7 +8173,7 @@
|
|
|
7504
8173
|
* This will generate the CommandInterceptor#(preExecute|...|reverted) methods
|
|
7505
8174
|
* which will in term forward to CommandInterceptor#on.
|
|
7506
8175
|
*/
|
|
7507
|
-
forEach(hooks, function(hook) {
|
|
8176
|
+
forEach$2(hooks, function(hook) {
|
|
7508
8177
|
|
|
7509
8178
|
/**
|
|
7510
8179
|
* {canExecute|preExecute|preExecuted|execute|executed|postExecute|postExecuted|revert|reverted}
|
|
@@ -7728,9 +8397,9 @@
|
|
|
7728
8397
|
* @param {canvas} canvas
|
|
7729
8398
|
*/
|
|
7730
8399
|
function DrilldownBreadcrumbs(eventBus, elementRegistry, overlays, canvas) {
|
|
7731
|
-
var breadcrumbs = domify('<ul class="bjs-breadcrumbs"></ul>');
|
|
8400
|
+
var breadcrumbs = domify$1('<ul class="bjs-breadcrumbs"></ul>');
|
|
7732
8401
|
var container = canvas.getContainer();
|
|
7733
|
-
var containerClasses = classes(container);
|
|
8402
|
+
var containerClasses = classes$1(container);
|
|
7734
8403
|
container.appendChild(breadcrumbs);
|
|
7735
8404
|
|
|
7736
8405
|
var boParents = [];
|
|
@@ -7764,7 +8433,7 @@
|
|
|
7764
8433
|
|
|
7765
8434
|
var path = boParents.map(function(parent) {
|
|
7766
8435
|
var title = escapeHTML(parent.name || parent.id);
|
|
7767
|
-
var link = domify('<li><span class="bjs-crumb"><a title="' + title + '">' + title + '</a></span></li>');
|
|
8436
|
+
var link = domify$1('<li><span class="bjs-crumb"><a title="' + title + '">' + title + '</a></span></li>');
|
|
7768
8437
|
|
|
7769
8438
|
var parentPlane = canvas.findRoot(getPlaneIdFromShape(parent)) || canvas.findRoot(parent.id);
|
|
7770
8439
|
|
|
@@ -8286,7 +8955,7 @@
|
|
|
8286
8955
|
}
|
|
8287
8956
|
|
|
8288
8957
|
var hasContent = bo && bo.flowElements && bo.flowElements.length;
|
|
8289
|
-
classes(overlay.html).toggle(EMPTY_MARKER, !hasContent);
|
|
8958
|
+
classes$1(overlay.html).toggle(EMPTY_MARKER, !hasContent);
|
|
8290
8959
|
};
|
|
8291
8960
|
|
|
8292
8961
|
/**
|
|
@@ -8304,7 +8973,7 @@
|
|
|
8304
8973
|
this.removeOverlay(element);
|
|
8305
8974
|
}
|
|
8306
8975
|
|
|
8307
|
-
var button = domify('<button class="bjs-drilldown">' + ARROW_DOWN_SVG + '</button>');
|
|
8976
|
+
var button = domify$1('<button class="bjs-drilldown">' + ARROW_DOWN_SVG + '</button>');
|
|
8308
8977
|
|
|
8309
8978
|
button.addEventListener('click', function() {
|
|
8310
8979
|
canvas.setRootElement(canvas.findRoot(getPlaneIdFromShape(element)));
|
|
@@ -8820,7 +9489,7 @@
|
|
|
8820
9489
|
*/
|
|
8821
9490
|
this.style = function(traits, additionalAttrs) {
|
|
8822
9491
|
|
|
8823
|
-
if (!isArray$
|
|
9492
|
+
if (!isArray$3(traits) && !additionalAttrs) {
|
|
8824
9493
|
additionalAttrs = traits;
|
|
8825
9494
|
traits = [];
|
|
8826
9495
|
}
|
|
@@ -8833,7 +9502,7 @@
|
|
|
8833
9502
|
};
|
|
8834
9503
|
|
|
8835
9504
|
this.computeStyle = function(custom, traits, defaultStyles) {
|
|
8836
|
-
if (!isArray$
|
|
9505
|
+
if (!isArray$3(traits)) {
|
|
8837
9506
|
defaultStyles = traits;
|
|
8838
9507
|
traits = [];
|
|
8839
9508
|
}
|
|
@@ -8957,7 +9626,7 @@
|
|
|
8957
9626
|
var parent = document.createElement('div');
|
|
8958
9627
|
parent.setAttribute('class', 'djs-container');
|
|
8959
9628
|
|
|
8960
|
-
assign(parent
|
|
9629
|
+
assign$1(parent, {
|
|
8961
9630
|
position: 'relative',
|
|
8962
9631
|
overflow: 'hidden',
|
|
8963
9632
|
width: ensurePx(options.width),
|
|
@@ -8971,7 +9640,7 @@
|
|
|
8971
9640
|
|
|
8972
9641
|
function createGroup(parent, cls, childIndex) {
|
|
8973
9642
|
var group = create$1('g');
|
|
8974
|
-
classes$
|
|
9643
|
+
classes$2(group).add(cls);
|
|
8975
9644
|
|
|
8976
9645
|
var index = childIndex !== undefined ? childIndex : parent.childNodes.length - 1;
|
|
8977
9646
|
|
|
@@ -9059,7 +9728,7 @@
|
|
|
9059
9728
|
// debounce canvas.viewbox.changed events
|
|
9060
9729
|
// for smoother diagram interaction
|
|
9061
9730
|
if (config.deferUpdate !== false) {
|
|
9062
|
-
this._viewboxChanged = debounce(bind
|
|
9731
|
+
this._viewboxChanged = debounce(bind(this._viewboxChanged, this), 300);
|
|
9063
9732
|
}
|
|
9064
9733
|
|
|
9065
9734
|
eventBus.on('diagram.init', function() {
|
|
@@ -9292,7 +9961,7 @@
|
|
|
9292
9961
|
return group;
|
|
9293
9962
|
}
|
|
9294
9963
|
|
|
9295
|
-
remove$
|
|
9964
|
+
remove$3(group);
|
|
9296
9965
|
|
|
9297
9966
|
layer.visible = false;
|
|
9298
9967
|
|
|
@@ -9307,7 +9976,7 @@
|
|
|
9307
9976
|
if (layer) {
|
|
9308
9977
|
delete this._layers[name];
|
|
9309
9978
|
|
|
9310
|
-
remove$
|
|
9979
|
+
remove$3(layer.group);
|
|
9311
9980
|
}
|
|
9312
9981
|
};
|
|
9313
9982
|
|
|
@@ -9395,14 +10064,14 @@
|
|
|
9395
10064
|
return;
|
|
9396
10065
|
}
|
|
9397
10066
|
|
|
9398
|
-
forEach([ container.gfx, container.secondaryGfx ], function(gfx) {
|
|
10067
|
+
forEach$2([ container.gfx, container.secondaryGfx ], function(gfx) {
|
|
9399
10068
|
if (gfx) {
|
|
9400
10069
|
|
|
9401
10070
|
// invoke either addClass or removeClass based on mode
|
|
9402
10071
|
if (add) {
|
|
9403
|
-
classes$
|
|
10072
|
+
classes$2(gfx).add(marker);
|
|
9404
10073
|
} else {
|
|
9405
|
-
classes$
|
|
10074
|
+
classes$2(gfx).remove(marker);
|
|
9406
10075
|
}
|
|
9407
10076
|
}
|
|
9408
10077
|
});
|
|
@@ -9468,7 +10137,7 @@
|
|
|
9468
10137
|
|
|
9469
10138
|
var gfx = this.getGraphics(element);
|
|
9470
10139
|
|
|
9471
|
-
return classes$
|
|
10140
|
+
return classes$2(gfx).has(marker);
|
|
9472
10141
|
};
|
|
9473
10142
|
|
|
9474
10143
|
/**
|
|
@@ -11302,7 +11971,7 @@
|
|
|
11302
11971
|
*/
|
|
11303
11972
|
EventBus.prototype.on = function(events, priority, callback, that) {
|
|
11304
11973
|
|
|
11305
|
-
events = isArray$
|
|
11974
|
+
events = isArray$3(events) ? events : [ events ];
|
|
11306
11975
|
|
|
11307
11976
|
if (isFunction(priority)) {
|
|
11308
11977
|
that = callback;
|
|
@@ -11317,7 +11986,7 @@
|
|
|
11317
11986
|
var actualCallback = callback;
|
|
11318
11987
|
|
|
11319
11988
|
if (that) {
|
|
11320
|
-
actualCallback = bind
|
|
11989
|
+
actualCallback = bind(callback, that);
|
|
11321
11990
|
|
|
11322
11991
|
// make sure we remember and are able to remove
|
|
11323
11992
|
// bound callbacks via {@link #off} using the original
|
|
@@ -11387,7 +12056,7 @@
|
|
|
11387
12056
|
*/
|
|
11388
12057
|
EventBus.prototype.off = function(events, callback) {
|
|
11389
12058
|
|
|
11390
|
-
events = isArray$
|
|
12059
|
+
events = isArray$3(events) ? events : [ events ];
|
|
11391
12060
|
|
|
11392
12061
|
var self = this;
|
|
11393
12062
|
|
|
@@ -11753,7 +12422,7 @@
|
|
|
11753
12422
|
childrenGfx = getChildren(gfx);
|
|
11754
12423
|
if (!childrenGfx) {
|
|
11755
12424
|
childrenGfx = create$1('g');
|
|
11756
|
-
classes$
|
|
12425
|
+
classes$2(childrenGfx).add('djs-children');
|
|
11757
12426
|
|
|
11758
12427
|
append(gfx.parentNode, childrenGfx);
|
|
11759
12428
|
}
|
|
@@ -11805,7 +12474,7 @@
|
|
|
11805
12474
|
type, childrenGfx, parentIndex, isFrame
|
|
11806
12475
|
) {
|
|
11807
12476
|
var outerGfx = create$1('g');
|
|
11808
|
-
classes$
|
|
12477
|
+
classes$2(outerGfx).add('djs-group');
|
|
11809
12478
|
|
|
11810
12479
|
// insert node at position
|
|
11811
12480
|
if (typeof parentIndex !== 'undefined') {
|
|
@@ -11815,18 +12484,18 @@
|
|
|
11815
12484
|
}
|
|
11816
12485
|
|
|
11817
12486
|
var gfx = create$1('g');
|
|
11818
|
-
classes$
|
|
11819
|
-
classes$
|
|
12487
|
+
classes$2(gfx).add('djs-element');
|
|
12488
|
+
classes$2(gfx).add('djs-' + type);
|
|
11820
12489
|
|
|
11821
12490
|
if (isFrame) {
|
|
11822
|
-
classes$
|
|
12491
|
+
classes$2(gfx).add('djs-frame');
|
|
11823
12492
|
}
|
|
11824
12493
|
|
|
11825
12494
|
append(outerGfx, gfx);
|
|
11826
12495
|
|
|
11827
12496
|
// create visual
|
|
11828
12497
|
var visual = create$1('g');
|
|
11829
|
-
classes$
|
|
12498
|
+
classes$2(visual).add('djs-visual');
|
|
11830
12499
|
|
|
11831
12500
|
append(gfx, visual);
|
|
11832
12501
|
|
|
@@ -11855,7 +12524,7 @@
|
|
|
11855
12524
|
|
|
11856
12525
|
// update all parents of changed and reorganized their children
|
|
11857
12526
|
// in the correct order (as indicated in our model)
|
|
11858
|
-
forEach(parents, function(parent) {
|
|
12527
|
+
forEach$2(parents, function(parent) {
|
|
11859
12528
|
|
|
11860
12529
|
var children = parent.children;
|
|
11861
12530
|
|
|
@@ -11865,7 +12534,7 @@
|
|
|
11865
12534
|
|
|
11866
12535
|
var childrenGfx = self._getChildrenContainer(parent);
|
|
11867
12536
|
|
|
11868
|
-
forEach(children.slice().reverse(), function(child) {
|
|
12537
|
+
forEach$2(children.slice().reverse(), function(child) {
|
|
11869
12538
|
var childGfx = elementRegistry.getGraphics(child);
|
|
11870
12539
|
|
|
11871
12540
|
prependTo(childGfx.parentNode, childrenGfx);
|
|
@@ -11930,7 +12599,7 @@
|
|
|
11930
12599
|
var gfx = this._elementRegistry.getGraphics(element);
|
|
11931
12600
|
|
|
11932
12601
|
// remove
|
|
11933
|
-
remove$
|
|
12602
|
+
remove$3(gfx.parentNode);
|
|
11934
12603
|
};
|
|
11935
12604
|
|
|
11936
12605
|
|
|
@@ -12190,7 +12859,7 @@
|
|
|
12190
12859
|
prototype = Object.create(Base.prototype);
|
|
12191
12860
|
|
|
12192
12861
|
// initialize default values
|
|
12193
|
-
forEach(descriptor.properties, function(p) {
|
|
12862
|
+
forEach$2(descriptor.properties, function(p) {
|
|
12194
12863
|
if (!p.isMany && p.default !== undefined) {
|
|
12195
12864
|
prototype[p.name] = p.default;
|
|
12196
12865
|
}
|
|
@@ -12209,7 +12878,7 @@
|
|
|
12209
12878
|
props.define(this, '$attrs', { value: {} });
|
|
12210
12879
|
props.define(this, '$parent', { writable: true });
|
|
12211
12880
|
|
|
12212
|
-
forEach(attrs, bind
|
|
12881
|
+
forEach$2(attrs, bind(function(val, key) {
|
|
12213
12882
|
this.set(key, val);
|
|
12214
12883
|
}, this));
|
|
12215
12884
|
}
|
|
@@ -12498,7 +13167,7 @@
|
|
|
12498
13167
|
return;
|
|
12499
13168
|
}
|
|
12500
13169
|
|
|
12501
|
-
forEach(t.properties, bind
|
|
13170
|
+
forEach$2(t.properties, bind(function(p) {
|
|
12502
13171
|
|
|
12503
13172
|
// clone property to allow extensions
|
|
12504
13173
|
p = assign({}, p, {
|
|
@@ -12545,7 +13214,7 @@
|
|
|
12545
13214
|
|
|
12546
13215
|
this.properties = properties;
|
|
12547
13216
|
|
|
12548
|
-
forEach(packages, bind
|
|
13217
|
+
forEach$2(packages, bind(this.registerPackage, this));
|
|
12549
13218
|
}
|
|
12550
13219
|
|
|
12551
13220
|
|
|
@@ -12569,7 +13238,7 @@
|
|
|
12569
13238
|
ensureAvailable(pkgMap, pkg, 'uri');
|
|
12570
13239
|
|
|
12571
13240
|
// register types
|
|
12572
|
-
forEach(pkg.types, bind
|
|
13241
|
+
forEach$2(pkg.types, bind(function(descriptor) {
|
|
12573
13242
|
this.registerType(descriptor, pkg);
|
|
12574
13243
|
}, this));
|
|
12575
13244
|
|
|
@@ -12595,7 +13264,7 @@
|
|
|
12595
13264
|
propertiesByName = {};
|
|
12596
13265
|
|
|
12597
13266
|
// parse properties
|
|
12598
|
-
forEach(type.properties, bind
|
|
13267
|
+
forEach$2(type.properties, bind(function(p) {
|
|
12599
13268
|
|
|
12600
13269
|
// namespace property names
|
|
12601
13270
|
var propertyNs = parseName(p.name, ns.prefix),
|
|
@@ -12621,7 +13290,7 @@
|
|
|
12621
13290
|
propertiesByName: propertiesByName
|
|
12622
13291
|
});
|
|
12623
13292
|
|
|
12624
|
-
forEach(type.extends, bind
|
|
13293
|
+
forEach$2(type.extends, bind(function(extendsName) {
|
|
12625
13294
|
var extended = this.typeMap[extendsName];
|
|
12626
13295
|
|
|
12627
13296
|
extended.traits = extended.traits || [];
|
|
@@ -12675,12 +13344,12 @@
|
|
|
12675
13344
|
throw new Error('unknown type <' + nsName.name + '>');
|
|
12676
13345
|
}
|
|
12677
13346
|
|
|
12678
|
-
forEach(type.superClass, trait ? traverseTrait : traverseSuper);
|
|
13347
|
+
forEach$2(type.superClass, trait ? traverseTrait : traverseSuper);
|
|
12679
13348
|
|
|
12680
13349
|
// call iterator with (type, inherited=!trait)
|
|
12681
13350
|
iterator(type, !trait);
|
|
12682
13351
|
|
|
12683
|
-
forEach(type.traits, traverseTrait);
|
|
13352
|
+
forEach$2(type.traits, traverseTrait);
|
|
12684
13353
|
};
|
|
12685
13354
|
|
|
12686
13355
|
|
|
@@ -12983,7 +13652,7 @@
|
|
|
12983
13652
|
this.properties.define(element, '$parent', { enumerable: false, writable: true });
|
|
12984
13653
|
this.properties.define(element, '$instanceOf', { enumerable: false, writable: true });
|
|
12985
13654
|
|
|
12986
|
-
forEach(properties, function(a, key) {
|
|
13655
|
+
forEach$2(properties, function(a, key) {
|
|
12987
13656
|
if (isObject(a) && a.value !== undefined) {
|
|
12988
13657
|
element[a.name] = a.value;
|
|
12989
13658
|
} else {
|
|
@@ -14445,7 +15114,7 @@
|
|
|
14445
15114
|
model = this.model,
|
|
14446
15115
|
propNameNs;
|
|
14447
15116
|
|
|
14448
|
-
forEach(attributes, function(value, name) {
|
|
15117
|
+
forEach$2(attributes, function(value, name) {
|
|
14449
15118
|
|
|
14450
15119
|
var prop = descriptor.propertiesByName[name],
|
|
14451
15120
|
values;
|
|
@@ -14463,7 +15132,7 @@
|
|
|
14463
15132
|
// IDREFS: parse references as whitespace-separated list
|
|
14464
15133
|
values = value.split(' ');
|
|
14465
15134
|
|
|
14466
|
-
forEach(values, function(v) {
|
|
15135
|
+
forEach$2(values, function(v) {
|
|
14467
15136
|
context.addReference({
|
|
14468
15137
|
element: instance,
|
|
14469
15138
|
property: prop.ns.name,
|
|
@@ -15207,7 +15876,7 @@
|
|
|
15207
15876
|
}
|
|
15208
15877
|
|
|
15209
15878
|
// do not serialize defaults
|
|
15210
|
-
if (!has(element, name)) {
|
|
15879
|
+
if (!has$2(element, name)) {
|
|
15211
15880
|
return false;
|
|
15212
15881
|
}
|
|
15213
15882
|
|
|
@@ -15436,7 +16105,7 @@
|
|
|
15436
16105
|
|
|
15437
16106
|
var attributes = [];
|
|
15438
16107
|
|
|
15439
|
-
forEach(element, function(val, key) {
|
|
16108
|
+
forEach$2(element, function(val, key) {
|
|
15440
16109
|
|
|
15441
16110
|
var nonNsAttr;
|
|
15442
16111
|
|
|
@@ -15444,7 +16113,7 @@
|
|
|
15444
16113
|
body.push(new BodySerializer().build({ type: 'String' }, val));
|
|
15445
16114
|
} else
|
|
15446
16115
|
if (key === '$children') {
|
|
15447
|
-
forEach(val, function(child) {
|
|
16116
|
+
forEach$2(val, function(child) {
|
|
15448
16117
|
body.push(new ElementSerializer(self).build(child));
|
|
15449
16118
|
});
|
|
15450
16119
|
} else
|
|
@@ -15514,7 +16183,7 @@
|
|
|
15514
16183
|
// parse namespace attributes first
|
|
15515
16184
|
// and log them. push non namespace attributes to a list
|
|
15516
16185
|
// and process them later
|
|
15517
|
-
forEach(genericAttrs, function(value, name) {
|
|
16186
|
+
forEach$2(genericAttrs, function(value, name) {
|
|
15518
16187
|
|
|
15519
16188
|
var nonNsAttr = self.parseNsAttribute(element, name, value);
|
|
15520
16189
|
|
|
@@ -15530,7 +16199,7 @@
|
|
|
15530
16199
|
|
|
15531
16200
|
var self = this;
|
|
15532
16201
|
|
|
15533
|
-
forEach(attributes, function(attr) {
|
|
16202
|
+
forEach$2(attributes, function(attr) {
|
|
15534
16203
|
|
|
15535
16204
|
// do not serialize xsi:type attribute
|
|
15536
16205
|
// it is set manually based on the actual implementation type
|
|
@@ -15555,7 +16224,7 @@
|
|
|
15555
16224
|
body = this.body,
|
|
15556
16225
|
element = this.element;
|
|
15557
16226
|
|
|
15558
|
-
forEach(properties, function(p) {
|
|
16227
|
+
forEach$2(properties, function(p) {
|
|
15559
16228
|
var value = element.get(p.name),
|
|
15560
16229
|
isReference = p.isReference,
|
|
15561
16230
|
isMany = p.isMany;
|
|
@@ -15568,12 +16237,12 @@
|
|
|
15568
16237
|
body.push(new BodySerializer().build(p, value[0]));
|
|
15569
16238
|
} else
|
|
15570
16239
|
if (isSimple(p.type)) {
|
|
15571
|
-
forEach(value, function(v) {
|
|
16240
|
+
forEach$2(value, function(v) {
|
|
15572
16241
|
body.push(new ValueSerializer(self.addTagName(self.nsPropertyTagName(p))).build(p, v));
|
|
15573
16242
|
});
|
|
15574
16243
|
} else
|
|
15575
16244
|
if (isReference) {
|
|
15576
|
-
forEach(value, function(v) {
|
|
16245
|
+
forEach$2(value, function(v) {
|
|
15577
16246
|
body.push(new ReferenceSerializer(self.addTagName(self.nsPropertyTagName(p))).build(v));
|
|
15578
16247
|
});
|
|
15579
16248
|
} else {
|
|
@@ -15583,7 +16252,7 @@
|
|
|
15583
16252
|
var asType = serializeAsType(p),
|
|
15584
16253
|
asProperty = serializeAsProperty(p);
|
|
15585
16254
|
|
|
15586
|
-
forEach(value, function(v) {
|
|
16255
|
+
forEach$2(value, function(v) {
|
|
15587
16256
|
var serializer;
|
|
15588
16257
|
|
|
15589
16258
|
if (asType) {
|
|
@@ -15691,7 +16360,7 @@
|
|
|
15691
16360
|
var self = this,
|
|
15692
16361
|
element = this.element;
|
|
15693
16362
|
|
|
15694
|
-
forEach(properties, function(p) {
|
|
16363
|
+
forEach$2(properties, function(p) {
|
|
15695
16364
|
|
|
15696
16365
|
var value = element.get(p.name);
|
|
15697
16366
|
|
|
@@ -15702,7 +16371,7 @@
|
|
|
15702
16371
|
}
|
|
15703
16372
|
else {
|
|
15704
16373
|
var values = [];
|
|
15705
|
-
forEach(value, function(v) {
|
|
16374
|
+
forEach$2(value, function(v) {
|
|
15706
16375
|
values.push(v.id);
|
|
15707
16376
|
});
|
|
15708
16377
|
|
|
@@ -15742,7 +16411,7 @@
|
|
|
15742
16411
|
attrs = getNsAttrs(namespaces).concat(attrs);
|
|
15743
16412
|
}
|
|
15744
16413
|
|
|
15745
|
-
forEach(attrs, function(a) {
|
|
16414
|
+
forEach$2(attrs, function(a) {
|
|
15746
16415
|
writer
|
|
15747
16416
|
.append(' ')
|
|
15748
16417
|
.append(nsName(a.name)).append('="').append(a.value).append('"');
|
|
@@ -15769,7 +16438,7 @@
|
|
|
15769
16438
|
.indent();
|
|
15770
16439
|
}
|
|
15771
16440
|
|
|
15772
|
-
forEach(this.body, function(b) {
|
|
16441
|
+
forEach$2(this.body, function(b) {
|
|
15773
16442
|
b.serializeTo(writer);
|
|
15774
16443
|
});
|
|
15775
16444
|
|
|
@@ -19703,7 +20372,7 @@
|
|
|
19703
20372
|
function ensureCompatDiRef(businessObject) {
|
|
19704
20373
|
|
|
19705
20374
|
// bpmnElement can have multiple independent DIs
|
|
19706
|
-
if (!has(businessObject, 'di')) {
|
|
20375
|
+
if (!has$2(businessObject, 'di')) {
|
|
19707
20376
|
Object.defineProperty(businessObject, 'di', {
|
|
19708
20377
|
get: function() {
|
|
19709
20378
|
throw new Error(DI_ERROR_MESSAGE);
|
|
@@ -19837,7 +20506,7 @@
|
|
|
19837
20506
|
function handlePlane(plane) {
|
|
19838
20507
|
registerDi(plane);
|
|
19839
20508
|
|
|
19840
|
-
forEach(plane.planeElement, handlePlaneElement);
|
|
20509
|
+
forEach$2(plane.planeElement, handlePlaneElement);
|
|
19841
20510
|
}
|
|
19842
20511
|
|
|
19843
20512
|
function handlePlaneElement(planeElement) {
|
|
@@ -19974,7 +20643,7 @@
|
|
|
19974
20643
|
}
|
|
19975
20644
|
|
|
19976
20645
|
function handleMessageFlows(messageFlows, context) {
|
|
19977
|
-
forEach(messageFlows, contextual(handleMessageFlow, context));
|
|
20646
|
+
forEach$2(messageFlows, contextual(handleMessageFlow, context));
|
|
19978
20647
|
}
|
|
19979
20648
|
|
|
19980
20649
|
function handleDataAssociation(association, context) {
|
|
@@ -20000,7 +20669,7 @@
|
|
|
20000
20669
|
|
|
20001
20670
|
function handleArtifacts(artifacts, context) {
|
|
20002
20671
|
|
|
20003
|
-
forEach(artifacts, function(e) {
|
|
20672
|
+
forEach$2(artifacts, function(e) {
|
|
20004
20673
|
if (is(e, 'bpmn:Association')) {
|
|
20005
20674
|
deferred.push(function() {
|
|
20006
20675
|
handleArtifact(e, context);
|
|
@@ -20017,8 +20686,8 @@
|
|
|
20017
20686
|
return;
|
|
20018
20687
|
}
|
|
20019
20688
|
|
|
20020
|
-
forEach(ioSpecification.dataInputs, contextual(handleDataInput, context));
|
|
20021
|
-
forEach(ioSpecification.dataOutputs, contextual(handleDataOutput, context));
|
|
20689
|
+
forEach$2(ioSpecification.dataInputs, contextual(handleDataInput, context));
|
|
20690
|
+
forEach$2(ioSpecification.dataOutputs, contextual(handleDataOutput, context));
|
|
20022
20691
|
}
|
|
20023
20692
|
|
|
20024
20693
|
function handleSubProcess(subProcess, context) {
|
|
@@ -20045,8 +20714,8 @@
|
|
|
20045
20714
|
// * bpmn:CatchEvent
|
|
20046
20715
|
//
|
|
20047
20716
|
deferred.push(function() {
|
|
20048
|
-
forEach(flowNode.dataInputAssociations, contextual(handleDataAssociation, context));
|
|
20049
|
-
forEach(flowNode.dataOutputAssociations, contextual(handleDataAssociation, context));
|
|
20717
|
+
forEach$2(flowNode.dataInputAssociations, contextual(handleDataAssociation, context));
|
|
20718
|
+
forEach$2(flowNode.dataOutputAssociations, contextual(handleDataAssociation, context));
|
|
20050
20719
|
});
|
|
20051
20720
|
}
|
|
20052
20721
|
|
|
@@ -20073,11 +20742,11 @@
|
|
|
20073
20742
|
}
|
|
20074
20743
|
|
|
20075
20744
|
function handleLaneSet(laneSet, context) {
|
|
20076
|
-
forEach(laneSet.lanes, contextual(handleLane, context));
|
|
20745
|
+
forEach$2(laneSet.lanes, contextual(handleLane, context));
|
|
20077
20746
|
}
|
|
20078
20747
|
|
|
20079
20748
|
function handleLaneSets(laneSets, context) {
|
|
20080
|
-
forEach(laneSets, contextual(handleLaneSet, context));
|
|
20749
|
+
forEach$2(laneSets, contextual(handleLaneSet, context));
|
|
20081
20750
|
}
|
|
20082
20751
|
|
|
20083
20752
|
function handleFlowElementsContainer(container, context) {
|
|
@@ -20089,7 +20758,7 @@
|
|
|
20089
20758
|
}
|
|
20090
20759
|
|
|
20091
20760
|
function handleFlowElements(flowElements, context) {
|
|
20092
|
-
forEach(flowElements, function(e) {
|
|
20761
|
+
forEach$2(flowElements, function(e) {
|
|
20093
20762
|
if (is(e, 'bpmn:SequenceFlow')) {
|
|
20094
20763
|
deferred.push(function() {
|
|
20095
20764
|
handleSequenceFlow(e, context);
|
|
@@ -20127,7 +20796,7 @@
|
|
|
20127
20796
|
|
|
20128
20797
|
function handleCollaboration(collaboration, context) {
|
|
20129
20798
|
|
|
20130
|
-
forEach(collaboration.participants, contextual(handleParticipant, context));
|
|
20799
|
+
forEach$2(collaboration.participants, contextual(handleParticipant, context));
|
|
20131
20800
|
|
|
20132
20801
|
handleArtifacts(collaboration.artifacts, context);
|
|
20133
20802
|
|
|
@@ -20141,7 +20810,7 @@
|
|
|
20141
20810
|
function wireFlowNodeRefs(lane) {
|
|
20142
20811
|
|
|
20143
20812
|
// wire the virtual flowNodeRefs <-> relationship
|
|
20144
|
-
forEach(lane.flowNodeRef, function(flowNode) {
|
|
20813
|
+
forEach$2(lane.flowNodeRef, function(flowNode) {
|
|
20145
20814
|
var lanes = flowNode.get('lanes');
|
|
20146
20815
|
|
|
20147
20816
|
if (lanes) {
|
|
@@ -20235,7 +20904,7 @@
|
|
|
20235
20904
|
|
|
20236
20905
|
// traverse BPMN 2.0 document model,
|
|
20237
20906
|
// starting at definitions
|
|
20238
|
-
forEach(diagramsToImport, function(diagram) {
|
|
20907
|
+
forEach$2(diagramsToImport, function(diagram) {
|
|
20239
20908
|
walker.handleDefinitions(definitions, diagram);
|
|
20240
20909
|
});
|
|
20241
20910
|
|
|
@@ -20317,7 +20986,7 @@
|
|
|
20317
20986
|
|
|
20318
20987
|
// all collaboration processes can contain sub-diagrams
|
|
20319
20988
|
if (collaboration) {
|
|
20320
|
-
rootElements = map
|
|
20989
|
+
rootElements = map(collaboration.participants, function(participant) {
|
|
20321
20990
|
return participant.processRef;
|
|
20322
20991
|
});
|
|
20323
20992
|
|
|
@@ -20331,7 +21000,7 @@
|
|
|
20331
21000
|
var diagramsToImport = [ bpmnDiagram ];
|
|
20332
21001
|
var handledElements = [ bpmnElement ];
|
|
20333
21002
|
|
|
20334
|
-
forEach(definitions.diagrams, function(diagram) {
|
|
21003
|
+
forEach$2(definitions.diagrams, function(diagram) {
|
|
20335
21004
|
var businessObject = diagram.plane.bpmnElement;
|
|
20336
21005
|
|
|
20337
21006
|
if (
|
|
@@ -20350,7 +21019,7 @@
|
|
|
20350
21019
|
function selfAndAllFlowElements(elements) {
|
|
20351
21020
|
var result = [];
|
|
20352
21021
|
|
|
20353
|
-
forEach(elements, function(element) {
|
|
21022
|
+
forEach$2(elements, function(element) {
|
|
20354
21023
|
if (!element) {
|
|
20355
21024
|
return;
|
|
20356
21025
|
}
|
|
@@ -20383,53 +21052,53 @@
|
|
|
20383
21052
|
|
|
20384
21053
|
|
|
20385
21054
|
// inlined ../../resources/logo.svg
|
|
20386
|
-
var BPMNIO_LOGO_SVG = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21"
|
|
21055
|
+
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>';
|
|
20387
21056
|
|
|
20388
21057
|
var BPMNIO_IMG = BPMNIO_LOGO_SVG;
|
|
20389
21058
|
|
|
20390
|
-
|
|
20391
|
-
|
|
20392
|
-
}
|
|
20393
|
-
|
|
20394
|
-
var LINK_STYLES =
|
|
20395
|
-
'color: #404040'
|
|
20396
|
-
|
|
20397
|
-
|
|
20398
|
-
var LIGHTBOX_STYLES =
|
|
20399
|
-
'
|
|
20400
|
-
'position: fixed',
|
|
20401
|
-
'top: 0',
|
|
20402
|
-
'left: 0',
|
|
20403
|
-
'right: 0',
|
|
20404
|
-
'bottom: 0'
|
|
20405
|
-
|
|
20406
|
-
|
|
20407
|
-
var BACKDROP_STYLES =
|
|
20408
|
-
'width: 100%',
|
|
20409
|
-
'height: 100%',
|
|
20410
|
-
'background: rgba(40,40,40,0.2)'
|
|
20411
|
-
|
|
20412
|
-
|
|
20413
|
-
var NOTICE_STYLES =
|
|
20414
|
-
'position: absolute',
|
|
20415
|
-
'left: 50%',
|
|
20416
|
-
'top: 40%',
|
|
20417
|
-
'transform: translate(-50%)',
|
|
20418
|
-
'width: 260px',
|
|
20419
|
-
'padding: 10px',
|
|
20420
|
-
'background: white',
|
|
20421
|
-
'
|
|
20422
|
-
'
|
|
20423
|
-
'
|
|
20424
|
-
'display: flex',
|
|
20425
|
-
'
|
|
20426
|
-
|
|
21059
|
+
var LOGO_STYLES = {
|
|
21060
|
+
verticalAlign: 'middle'
|
|
21061
|
+
};
|
|
21062
|
+
|
|
21063
|
+
var LINK_STYLES = {
|
|
21064
|
+
'color': '#404040'
|
|
21065
|
+
};
|
|
21066
|
+
|
|
21067
|
+
var LIGHTBOX_STYLES = {
|
|
21068
|
+
'zIndex': '1001',
|
|
21069
|
+
'position': 'fixed',
|
|
21070
|
+
'top': '0',
|
|
21071
|
+
'left': '0',
|
|
21072
|
+
'right': '0',
|
|
21073
|
+
'bottom': '0'
|
|
21074
|
+
};
|
|
21075
|
+
|
|
21076
|
+
var BACKDROP_STYLES = {
|
|
21077
|
+
'width': '100%',
|
|
21078
|
+
'height': '100%',
|
|
21079
|
+
'background': 'rgba(40,40,40,0.2)'
|
|
21080
|
+
};
|
|
21081
|
+
|
|
21082
|
+
var NOTICE_STYLES = {
|
|
21083
|
+
'position': 'absolute',
|
|
21084
|
+
'left': '50%',
|
|
21085
|
+
'top': '40%',
|
|
21086
|
+
'transform': 'translate(-50%)',
|
|
21087
|
+
'width': '260px',
|
|
21088
|
+
'padding': '10px',
|
|
21089
|
+
'background': 'white',
|
|
21090
|
+
'boxShadow': '0 1px 4px rgba(0,0,0,0.3)',
|
|
21091
|
+
'fontFamily': 'Helvetica, Arial, sans-serif',
|
|
21092
|
+
'fontSize': '14px',
|
|
21093
|
+
'display': 'flex',
|
|
21094
|
+
'lineHeight': '1.3'
|
|
21095
|
+
};
|
|
20427
21096
|
|
|
20428
21097
|
var LIGHTBOX_MARKUP =
|
|
20429
|
-
'<div class="bjs-powered-by-lightbox"
|
|
20430
|
-
'<div class="backdrop"
|
|
20431
|
-
'<div class="notice"
|
|
20432
|
-
'<a href="https://bpmn.io" target="_blank" rel="noopener"
|
|
21098
|
+
'<div class="bjs-powered-by-lightbox">' +
|
|
21099
|
+
'<div class="backdrop"></div>' +
|
|
21100
|
+
'<div class="notice">' +
|
|
21101
|
+
'<a href="https://bpmn.io" target="_blank" rel="noopener" class="link">' +
|
|
20433
21102
|
BPMNIO_IMG +
|
|
20434
21103
|
'</a>' +
|
|
20435
21104
|
'<span>' +
|
|
@@ -20442,12 +21111,25 @@
|
|
|
20442
21111
|
|
|
20443
21112
|
var lightbox;
|
|
20444
21113
|
|
|
21114
|
+
function createLightbox() {
|
|
21115
|
+
lightbox = domify$1(LIGHTBOX_MARKUP);
|
|
21116
|
+
|
|
21117
|
+
assign$1$1(lightbox, LIGHTBOX_STYLES);
|
|
21118
|
+
assign$1$1(query$1('svg', lightbox), LOGO_STYLES);
|
|
21119
|
+
assign$1$1(query$1('.backdrop', lightbox), BACKDROP_STYLES);
|
|
21120
|
+
assign$1$1(query$1('.notice', lightbox), NOTICE_STYLES);
|
|
21121
|
+
assign$1$1(query$1('.link', lightbox), LINK_STYLES, {
|
|
21122
|
+
'margin': '15px 20px 15px 10px',
|
|
21123
|
+
'alignSelf': 'center'
|
|
21124
|
+
});
|
|
21125
|
+
}
|
|
21126
|
+
|
|
20445
21127
|
function open() {
|
|
20446
21128
|
|
|
20447
21129
|
if (!lightbox) {
|
|
20448
|
-
|
|
21130
|
+
createLightbox();
|
|
20449
21131
|
|
|
20450
|
-
delegate.bind(lightbox, '.backdrop', 'click', function(event) {
|
|
21132
|
+
delegate$1.bind(lightbox, '.backdrop', 'click', function(event) {
|
|
20451
21133
|
document.body.removeChild(lightbox);
|
|
20452
21134
|
});
|
|
20453
21135
|
}
|
|
@@ -20866,7 +21548,7 @@
|
|
|
20866
21548
|
var canvas = self.get('canvas');
|
|
20867
21549
|
|
|
20868
21550
|
var contentNode = canvas.getActiveLayer(),
|
|
20869
|
-
defsNode = query('defs', canvas._svg);
|
|
21551
|
+
defsNode = query$1('defs', canvas._svg);
|
|
20870
21552
|
|
|
20871
21553
|
var contents = innerSVG(contentNode),
|
|
20872
21554
|
defs = defsNode ? '<defs>' + innerSVG(defsNode) + '</defs>' : '';
|
|
@@ -20968,7 +21650,7 @@
|
|
|
20968
21650
|
Diagram.prototype.destroy.call(this);
|
|
20969
21651
|
|
|
20970
21652
|
// dom detach
|
|
20971
|
-
remove$
|
|
21653
|
+
remove$2(this._container);
|
|
20972
21654
|
};
|
|
20973
21655
|
|
|
20974
21656
|
/**
|
|
@@ -21011,7 +21693,7 @@
|
|
|
21011
21693
|
}
|
|
21012
21694
|
|
|
21013
21695
|
if (typeof parentNode === 'string') {
|
|
21014
|
-
parentNode = query(parentNode);
|
|
21696
|
+
parentNode = query$1(parentNode);
|
|
21015
21697
|
}
|
|
21016
21698
|
|
|
21017
21699
|
parentNode.appendChild(this._container);
|
|
@@ -21079,9 +21761,9 @@
|
|
|
21079
21761
|
|
|
21080
21762
|
BaseViewer.prototype._createContainer = function(options) {
|
|
21081
21763
|
|
|
21082
|
-
var container = domify('<div class="bjs-container"></div>');
|
|
21764
|
+
var container = domify$1('<div class="bjs-container"></div>');
|
|
21083
21765
|
|
|
21084
|
-
assign(container
|
|
21766
|
+
assign$1$1(container, {
|
|
21085
21767
|
width: ensureUnit(options.width),
|
|
21086
21768
|
height: ensureUnit(options.height),
|
|
21087
21769
|
position: options.position
|
|
@@ -21171,15 +21853,23 @@
|
|
|
21171
21853
|
'target="_blank" ' +
|
|
21172
21854
|
'class="bjs-powered-by" ' +
|
|
21173
21855
|
'title="Powered by bpmn.io" ' +
|
|
21174
|
-
|
|
21856
|
+
'>' +
|
|
21175
21857
|
img +
|
|
21176
21858
|
'</a>';
|
|
21177
21859
|
|
|
21178
|
-
var linkElement = domify(linkMarkup);
|
|
21860
|
+
var linkElement = domify$1(linkMarkup);
|
|
21861
|
+
|
|
21862
|
+
assign$1$1(query$1('svg', linkElement), LOGO_STYLES);
|
|
21863
|
+
assign$1$1(linkElement, LINK_STYLES, {
|
|
21864
|
+
position: 'absolute',
|
|
21865
|
+
bottom: '15px',
|
|
21866
|
+
right: '15px',
|
|
21867
|
+
zIndex: '100'
|
|
21868
|
+
});
|
|
21179
21869
|
|
|
21180
21870
|
container.appendChild(linkElement);
|
|
21181
21871
|
|
|
21182
|
-
componentEvent.bind(linkElement, 'click', function(event) {
|
|
21872
|
+
componentEvent$1.bind(linkElement, 'click', function(event) {
|
|
21183
21873
|
open();
|
|
21184
21874
|
|
|
21185
21875
|
event.preventDefault();
|