camunda-bpmn-js 0.23.0 → 0.24.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/bpmn-js.css +7 -7
- package/dist/assets/diagram-js.css +205 -45
- package/dist/base-modeler.development.js +5701 -5951
- package/dist/base-modeler.production.min.js +149 -4
- package/dist/base-navigated-viewer.development.js +18 -19
- package/dist/base-navigated-viewer.production.min.js +1 -1
- package/dist/base-viewer.development.js +4 -4
- package/dist/base-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-modeler.development.js +16976 -18915
- package/dist/camunda-cloud-modeler.production.min.js +149 -4
- package/dist/camunda-cloud-navigated-viewer.development.js +197 -525
- package/dist/camunda-cloud-navigated-viewer.production.min.js +2 -2
- package/dist/camunda-cloud-viewer.development.js +183 -510
- package/dist/camunda-cloud-viewer.production.min.js +1 -1
- package/dist/camunda-platform-modeler.development.js +5944 -8635
- package/dist/camunda-platform-modeler.production.min.js +149 -4
- package/dist/camunda-platform-navigated-viewer.development.js +18 -19
- package/dist/camunda-platform-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-platform-viewer.development.js +4 -4
- package/dist/camunda-platform-viewer.production.min.js +1 -1
- package/lib/camunda-cloud/Modeler.js +3 -1
- package/lib/camunda-cloud/features/replace/ElementTemplatesReplaceProvider.js +249 -0
- package/lib/camunda-cloud/features/replace/ReplaceOptionsUtil.js +7 -0
- package/lib/camunda-cloud/features/replace/index.js +6 -0
- package/package.json +15 -12
|
@@ -469,7 +469,7 @@
|
|
|
469
469
|
return result;
|
|
470
470
|
}
|
|
471
471
|
|
|
472
|
-
var DEFAULT_RENDER_PRIORITY$
|
|
472
|
+
var DEFAULT_RENDER_PRIORITY$1 = 1000;
|
|
473
473
|
|
|
474
474
|
/**
|
|
475
475
|
* The base implementation of shape and connection renderers.
|
|
@@ -477,10 +477,10 @@
|
|
|
477
477
|
* @param {EventBus} eventBus
|
|
478
478
|
* @param {number} [renderPriority=1000]
|
|
479
479
|
*/
|
|
480
|
-
function BaseRenderer
|
|
480
|
+
function BaseRenderer(eventBus, renderPriority) {
|
|
481
481
|
var self = this;
|
|
482
482
|
|
|
483
|
-
renderPriority = renderPriority || DEFAULT_RENDER_PRIORITY$
|
|
483
|
+
renderPriority = renderPriority || DEFAULT_RENDER_PRIORITY$1;
|
|
484
484
|
|
|
485
485
|
eventBus.on([ 'render.shape', 'render.connection' ], renderPriority, function(evt, context) {
|
|
486
486
|
var type = evt.type,
|
|
@@ -516,7 +516,7 @@
|
|
|
516
516
|
*
|
|
517
517
|
* @returns {boolean}
|
|
518
518
|
*/
|
|
519
|
-
BaseRenderer
|
|
519
|
+
BaseRenderer.prototype.canRender = function() {};
|
|
520
520
|
|
|
521
521
|
/**
|
|
522
522
|
* Provides the shape's snap svg element to be drawn on the `canvas`.
|
|
@@ -526,7 +526,7 @@
|
|
|
526
526
|
*
|
|
527
527
|
* @returns {Snap.svg} [returns a Snap.svg paper element ]
|
|
528
528
|
*/
|
|
529
|
-
BaseRenderer
|
|
529
|
+
BaseRenderer.prototype.drawShape = function() {};
|
|
530
530
|
|
|
531
531
|
/**
|
|
532
532
|
* Provides the shape's snap svg element to be drawn on the `canvas`.
|
|
@@ -536,7 +536,7 @@
|
|
|
536
536
|
*
|
|
537
537
|
* @returns {Snap.svg} [returns a Snap.svg paper element ]
|
|
538
538
|
*/
|
|
539
|
-
BaseRenderer
|
|
539
|
+
BaseRenderer.prototype.drawConnection = function() {};
|
|
540
540
|
|
|
541
541
|
/**
|
|
542
542
|
* Gets the SVG path of a shape that represents it's visual bounds.
|
|
@@ -545,7 +545,7 @@
|
|
|
545
545
|
*
|
|
546
546
|
* @return {string} svg path
|
|
547
547
|
*/
|
|
548
|
-
BaseRenderer
|
|
548
|
+
BaseRenderer.prototype.getShapePath = function() {};
|
|
549
549
|
|
|
550
550
|
/**
|
|
551
551
|
* Gets the SVG path of a connection that represents it's visual bounds.
|
|
@@ -554,7 +554,7 @@
|
|
|
554
554
|
*
|
|
555
555
|
* @return {string} svg path
|
|
556
556
|
*/
|
|
557
|
-
BaseRenderer
|
|
557
|
+
BaseRenderer.prototype.getConnectionPath = function() {};
|
|
558
558
|
|
|
559
559
|
/**
|
|
560
560
|
* Is an element of the given BPMN type?
|
|
@@ -682,7 +682,7 @@
|
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
684
|
|
|
685
|
-
function ensureImported
|
|
685
|
+
function ensureImported(element, target) {
|
|
686
686
|
|
|
687
687
|
if (element.ownerDocument !== target.ownerDocument) {
|
|
688
688
|
try {
|
|
@@ -710,8 +710,8 @@
|
|
|
710
710
|
*
|
|
711
711
|
* @return {SVGElement} the appended node
|
|
712
712
|
*/
|
|
713
|
-
function appendTo
|
|
714
|
-
return target.appendChild(ensureImported
|
|
713
|
+
function appendTo(element, target) {
|
|
714
|
+
return target.appendChild(ensureImported(element, target));
|
|
715
715
|
}
|
|
716
716
|
|
|
717
717
|
/**
|
|
@@ -726,8 +726,8 @@
|
|
|
726
726
|
*
|
|
727
727
|
* @return {SVGElement} the element
|
|
728
728
|
*/
|
|
729
|
-
function append
|
|
730
|
-
appendTo
|
|
729
|
+
function append(target, node) {
|
|
730
|
+
appendTo(node, target);
|
|
731
731
|
return target;
|
|
732
732
|
}
|
|
733
733
|
|
|
@@ -735,9 +735,9 @@
|
|
|
735
735
|
* attribute accessor utility
|
|
736
736
|
*/
|
|
737
737
|
|
|
738
|
-
var LENGTH_ATTR
|
|
738
|
+
var LENGTH_ATTR = 2;
|
|
739
739
|
|
|
740
|
-
var CSS_PROPERTIES
|
|
740
|
+
var CSS_PROPERTIES = {
|
|
741
741
|
'alignment-baseline': 1,
|
|
742
742
|
'baseline-shift': 1,
|
|
743
743
|
'clip': 1,
|
|
@@ -761,7 +761,7 @@
|
|
|
761
761
|
'flood-opacity': 1,
|
|
762
762
|
'font': 1,
|
|
763
763
|
'font-family': 1,
|
|
764
|
-
'font-size': LENGTH_ATTR
|
|
764
|
+
'font-size': LENGTH_ATTR,
|
|
765
765
|
'font-size-adjust': 1,
|
|
766
766
|
'font-stretch': 1,
|
|
767
767
|
'font-style': 1,
|
|
@@ -791,7 +791,7 @@
|
|
|
791
791
|
'stroke-linejoin': 1,
|
|
792
792
|
'stroke-miterlimit': 1,
|
|
793
793
|
'stroke-opacity': 1,
|
|
794
|
-
'stroke-width': LENGTH_ATTR
|
|
794
|
+
'stroke-width': LENGTH_ATTR,
|
|
795
795
|
'text-anchor': 1,
|
|
796
796
|
'text-decoration': 1,
|
|
797
797
|
'text-rendering': 1,
|
|
@@ -802,23 +802,23 @@
|
|
|
802
802
|
};
|
|
803
803
|
|
|
804
804
|
|
|
805
|
-
function getAttribute
|
|
806
|
-
if (CSS_PROPERTIES
|
|
805
|
+
function getAttribute(node, name) {
|
|
806
|
+
if (CSS_PROPERTIES[name]) {
|
|
807
807
|
return node.style[name];
|
|
808
808
|
} else {
|
|
809
809
|
return node.getAttributeNS(null, name);
|
|
810
810
|
}
|
|
811
811
|
}
|
|
812
812
|
|
|
813
|
-
function setAttribute
|
|
813
|
+
function setAttribute(node, name, value) {
|
|
814
814
|
var hyphenated = name.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
|
815
815
|
|
|
816
|
-
var type = CSS_PROPERTIES
|
|
816
|
+
var type = CSS_PROPERTIES[hyphenated];
|
|
817
817
|
|
|
818
818
|
if (type) {
|
|
819
819
|
|
|
820
820
|
// append pixel unit, unless present
|
|
821
|
-
if (type === LENGTH_ATTR
|
|
821
|
+
if (type === LENGTH_ATTR && typeof value === 'number') {
|
|
822
822
|
value = String(value) + 'px';
|
|
823
823
|
}
|
|
824
824
|
|
|
@@ -828,12 +828,12 @@
|
|
|
828
828
|
}
|
|
829
829
|
}
|
|
830
830
|
|
|
831
|
-
function setAttributes
|
|
831
|
+
function setAttributes(node, attrs) {
|
|
832
832
|
|
|
833
833
|
var names = Object.keys(attrs), i, name;
|
|
834
834
|
|
|
835
835
|
for (i = 0, name; (name = names[i]); i++) {
|
|
836
|
-
setAttribute
|
|
836
|
+
setAttribute(node, name, attrs[name]);
|
|
837
837
|
}
|
|
838
838
|
}
|
|
839
839
|
|
|
@@ -847,15 +847,15 @@
|
|
|
847
847
|
*
|
|
848
848
|
* @return {String}
|
|
849
849
|
*/
|
|
850
|
-
function attr$
|
|
850
|
+
function attr$1(node, name, value) {
|
|
851
851
|
if (typeof name === 'string') {
|
|
852
852
|
if (value !== undefined) {
|
|
853
|
-
setAttribute
|
|
853
|
+
setAttribute(node, name, value);
|
|
854
854
|
} else {
|
|
855
|
-
return getAttribute
|
|
855
|
+
return getAttribute(node, name);
|
|
856
856
|
}
|
|
857
857
|
} else {
|
|
858
|
-
setAttributes
|
|
858
|
+
setAttributes(node, name);
|
|
859
859
|
}
|
|
860
860
|
|
|
861
861
|
return node;
|
|
@@ -1020,7 +1020,7 @@
|
|
|
1020
1020
|
return element;
|
|
1021
1021
|
}
|
|
1022
1022
|
|
|
1023
|
-
var ns
|
|
1023
|
+
var ns = {
|
|
1024
1024
|
svg: 'http://www.w3.org/2000/svg'
|
|
1025
1025
|
};
|
|
1026
1026
|
|
|
@@ -1028,25 +1028,25 @@
|
|
|
1028
1028
|
* DOM parsing utility
|
|
1029
1029
|
*/
|
|
1030
1030
|
|
|
1031
|
-
var SVG_START
|
|
1031
|
+
var SVG_START = '<svg xmlns="' + ns.svg + '"';
|
|
1032
1032
|
|
|
1033
|
-
function parse$
|
|
1033
|
+
function parse$1(svg) {
|
|
1034
1034
|
|
|
1035
1035
|
var unwrap = false;
|
|
1036
1036
|
|
|
1037
1037
|
// ensure we import a valid svg document
|
|
1038
1038
|
if (svg.substring(0, 4) === '<svg') {
|
|
1039
|
-
if (svg.indexOf(ns
|
|
1040
|
-
svg = SVG_START
|
|
1039
|
+
if (svg.indexOf(ns.svg) === -1) {
|
|
1040
|
+
svg = SVG_START + svg.substring(4);
|
|
1041
1041
|
}
|
|
1042
1042
|
} else {
|
|
1043
1043
|
|
|
1044
1044
|
// namespace svg
|
|
1045
|
-
svg = SVG_START
|
|
1045
|
+
svg = SVG_START + '>' + svg + '</svg>';
|
|
1046
1046
|
unwrap = true;
|
|
1047
1047
|
}
|
|
1048
1048
|
|
|
1049
|
-
var parsed = parseDocument
|
|
1049
|
+
var parsed = parseDocument(svg);
|
|
1050
1050
|
|
|
1051
1051
|
if (!unwrap) {
|
|
1052
1052
|
return parsed;
|
|
@@ -1063,7 +1063,7 @@
|
|
|
1063
1063
|
return fragment;
|
|
1064
1064
|
}
|
|
1065
1065
|
|
|
1066
|
-
function parseDocument
|
|
1066
|
+
function parseDocument(svg) {
|
|
1067
1067
|
|
|
1068
1068
|
var parser;
|
|
1069
1069
|
|
|
@@ -1087,18 +1087,18 @@
|
|
|
1087
1087
|
*
|
|
1088
1088
|
* @returns {SVGElement}
|
|
1089
1089
|
*/
|
|
1090
|
-
function create$
|
|
1090
|
+
function create$1(name, attrs) {
|
|
1091
1091
|
var element;
|
|
1092
1092
|
|
|
1093
1093
|
if (name.charAt(0) === '<') {
|
|
1094
|
-
element = parse$
|
|
1094
|
+
element = parse$1(name).firstChild;
|
|
1095
1095
|
element = document.importNode(element, true);
|
|
1096
1096
|
} else {
|
|
1097
|
-
element = document.createElementNS(ns
|
|
1097
|
+
element = document.createElementNS(ns.svg, name);
|
|
1098
1098
|
}
|
|
1099
1099
|
|
|
1100
1100
|
if (attrs) {
|
|
1101
|
-
attr$
|
|
1101
|
+
attr$1(element, attrs);
|
|
1102
1102
|
}
|
|
1103
1103
|
|
|
1104
1104
|
return element;
|
|
@@ -1113,7 +1113,7 @@
|
|
|
1113
1113
|
|
|
1114
1114
|
function getNode() {
|
|
1115
1115
|
if (node === null) {
|
|
1116
|
-
node = create$
|
|
1116
|
+
node = create$1('svg');
|
|
1117
1117
|
}
|
|
1118
1118
|
|
|
1119
1119
|
return node;
|
|
@@ -1253,7 +1253,7 @@
|
|
|
1253
1253
|
|
|
1254
1254
|
function set(element, svg) {
|
|
1255
1255
|
|
|
1256
|
-
var parsed = parse$
|
|
1256
|
+
var parsed = parse$1(svg);
|
|
1257
1257
|
|
|
1258
1258
|
// clear element contents
|
|
1259
1259
|
clear$1(element);
|
|
@@ -1272,7 +1272,7 @@
|
|
|
1272
1272
|
|
|
1273
1273
|
// import + append each node
|
|
1274
1274
|
for (var i = 0; i < nodes.length; i++) {
|
|
1275
|
-
appendTo
|
|
1275
|
+
appendTo(nodes[i], element);
|
|
1276
1276
|
}
|
|
1277
1277
|
|
|
1278
1278
|
}
|
|
@@ -1376,18 +1376,18 @@
|
|
|
1376
1376
|
|
|
1377
1377
|
function createLine(points, attrs) {
|
|
1378
1378
|
|
|
1379
|
-
var line = create$
|
|
1380
|
-
attr$
|
|
1379
|
+
var line = create$1('polyline');
|
|
1380
|
+
attr$1(line, { points: toSVGPoints(points) });
|
|
1381
1381
|
|
|
1382
1382
|
if (attrs) {
|
|
1383
|
-
attr$
|
|
1383
|
+
attr$1(line, attrs);
|
|
1384
1384
|
}
|
|
1385
1385
|
|
|
1386
1386
|
return line;
|
|
1387
1387
|
}
|
|
1388
1388
|
|
|
1389
1389
|
function updateLine(gfx, points) {
|
|
1390
|
-
attr$
|
|
1390
|
+
attr$1(gfx, { points: toSVGPoints(points) });
|
|
1391
1391
|
|
|
1392
1392
|
return gfx;
|
|
1393
1393
|
}
|
|
@@ -1656,7 +1656,7 @@
|
|
|
1656
1656
|
* @param {String} [val]
|
|
1657
1657
|
* @api public
|
|
1658
1658
|
*/
|
|
1659
|
-
function attr
|
|
1659
|
+
function attr(el, name, val) {
|
|
1660
1660
|
|
|
1661
1661
|
// get
|
|
1662
1662
|
if (arguments.length == 2) {
|
|
@@ -1965,7 +1965,7 @@
|
|
|
1965
1965
|
* Expose `parse`.
|
|
1966
1966
|
*/
|
|
1967
1967
|
|
|
1968
|
-
var domify = parse
|
|
1968
|
+
var domify = parse;
|
|
1969
1969
|
|
|
1970
1970
|
/**
|
|
1971
1971
|
* Tests for browser support.
|
|
@@ -2029,7 +2029,7 @@
|
|
|
2029
2029
|
* @api private
|
|
2030
2030
|
*/
|
|
2031
2031
|
|
|
2032
|
-
function parse
|
|
2032
|
+
function parse(html, doc) {
|
|
2033
2033
|
if ('string' != typeof html) throw new TypeError('String expected');
|
|
2034
2034
|
|
|
2035
2035
|
// default to the global `document` object
|
|
@@ -2313,7 +2313,7 @@
|
|
|
2313
2313
|
config, eventBus, styles, pathMap,
|
|
2314
2314
|
canvas, textRenderer, priority) {
|
|
2315
2315
|
|
|
2316
|
-
BaseRenderer
|
|
2316
|
+
BaseRenderer.call(this, eventBus, priority);
|
|
2317
2317
|
|
|
2318
2318
|
var defaultFillColor = config && config.defaultFillColor,
|
|
2319
2319
|
defaultStrokeColor = config && config.defaultStrokeColor,
|
|
@@ -2343,13 +2343,13 @@
|
|
|
2343
2343
|
attrs.strokeDasharray = [ 10000, 1 ];
|
|
2344
2344
|
}
|
|
2345
2345
|
|
|
2346
|
-
var marker = create$
|
|
2346
|
+
var marker = create$1('marker');
|
|
2347
2347
|
|
|
2348
|
-
attr$
|
|
2348
|
+
attr$1(options.element, attrs);
|
|
2349
2349
|
|
|
2350
|
-
append
|
|
2350
|
+
append(marker, options.element);
|
|
2351
2351
|
|
|
2352
|
-
attr$
|
|
2352
|
+
attr$1(marker, {
|
|
2353
2353
|
id: id,
|
|
2354
2354
|
viewBox: '0 0 20 20',
|
|
2355
2355
|
refX: ref.x,
|
|
@@ -2362,12 +2362,12 @@
|
|
|
2362
2362
|
var defs = query('defs', canvas._svg);
|
|
2363
2363
|
|
|
2364
2364
|
if (!defs) {
|
|
2365
|
-
defs = create$
|
|
2365
|
+
defs = create$1('defs');
|
|
2366
2366
|
|
|
2367
|
-
append
|
|
2367
|
+
append(canvas._svg, defs);
|
|
2368
2368
|
}
|
|
2369
2369
|
|
|
2370
|
-
append
|
|
2370
|
+
append(defs, marker);
|
|
2371
2371
|
|
|
2372
2372
|
markers[id] = marker;
|
|
2373
2373
|
}
|
|
@@ -2391,8 +2391,8 @@
|
|
|
2391
2391
|
function createMarker(id, type, fill, stroke) {
|
|
2392
2392
|
|
|
2393
2393
|
if (type === 'sequenceflow-end') {
|
|
2394
|
-
var sequenceflowEnd = create$
|
|
2395
|
-
attr$
|
|
2394
|
+
var sequenceflowEnd = create$1('path');
|
|
2395
|
+
attr$1(sequenceflowEnd, { d: 'M 1 5 L 11 10 L 1 15 Z' });
|
|
2396
2396
|
|
|
2397
2397
|
addMarker(id, {
|
|
2398
2398
|
element: sequenceflowEnd,
|
|
@@ -2406,8 +2406,8 @@
|
|
|
2406
2406
|
}
|
|
2407
2407
|
|
|
2408
2408
|
if (type === 'messageflow-start') {
|
|
2409
|
-
var messageflowStart = create$
|
|
2410
|
-
attr$
|
|
2409
|
+
var messageflowStart = create$1('circle');
|
|
2410
|
+
attr$1(messageflowStart, { cx: 6, cy: 6, r: 3.5 });
|
|
2411
2411
|
|
|
2412
2412
|
addMarker(id, {
|
|
2413
2413
|
element: messageflowStart,
|
|
@@ -2420,8 +2420,8 @@
|
|
|
2420
2420
|
}
|
|
2421
2421
|
|
|
2422
2422
|
if (type === 'messageflow-end') {
|
|
2423
|
-
var messageflowEnd = create$
|
|
2424
|
-
attr$
|
|
2423
|
+
var messageflowEnd = create$1('path');
|
|
2424
|
+
attr$1(messageflowEnd, { d: 'm 1 5 l 0 -3 l 7 3 l -7 3 z' });
|
|
2425
2425
|
|
|
2426
2426
|
addMarker(id, {
|
|
2427
2427
|
element: messageflowEnd,
|
|
@@ -2435,8 +2435,8 @@
|
|
|
2435
2435
|
}
|
|
2436
2436
|
|
|
2437
2437
|
if (type === 'association-start') {
|
|
2438
|
-
var associationStart = create$
|
|
2439
|
-
attr$
|
|
2438
|
+
var associationStart = create$1('path');
|
|
2439
|
+
attr$1(associationStart, { d: 'M 11 5 L 1 10 L 11 15' });
|
|
2440
2440
|
|
|
2441
2441
|
addMarker(id, {
|
|
2442
2442
|
element: associationStart,
|
|
@@ -2451,8 +2451,8 @@
|
|
|
2451
2451
|
}
|
|
2452
2452
|
|
|
2453
2453
|
if (type === 'association-end') {
|
|
2454
|
-
var associationEnd = create$
|
|
2455
|
-
attr$
|
|
2454
|
+
var associationEnd = create$1('path');
|
|
2455
|
+
attr$1(associationEnd, { d: 'M 1 5 L 11 10 L 1 15' });
|
|
2456
2456
|
|
|
2457
2457
|
addMarker(id, {
|
|
2458
2458
|
element: associationEnd,
|
|
@@ -2467,8 +2467,8 @@
|
|
|
2467
2467
|
}
|
|
2468
2468
|
|
|
2469
2469
|
if (type === 'conditional-flow-marker') {
|
|
2470
|
-
var conditionalflowMarker = create$
|
|
2471
|
-
attr$
|
|
2470
|
+
var conditionalflowMarker = create$1('path');
|
|
2471
|
+
attr$1(conditionalflowMarker, { d: 'M 0 10 L 8 6 L 16 10 L 8 14 Z' });
|
|
2472
2472
|
|
|
2473
2473
|
addMarker(id, {
|
|
2474
2474
|
element: conditionalflowMarker,
|
|
@@ -2482,8 +2482,8 @@
|
|
|
2482
2482
|
}
|
|
2483
2483
|
|
|
2484
2484
|
if (type === 'conditional-default-flow-marker') {
|
|
2485
|
-
var conditionaldefaultflowMarker = create$
|
|
2486
|
-
attr$
|
|
2485
|
+
var conditionaldefaultflowMarker = create$1('path');
|
|
2486
|
+
attr$1(conditionaldefaultflowMarker, { d: 'M 6 4 L 10 16' });
|
|
2487
2487
|
|
|
2488
2488
|
addMarker(id, {
|
|
2489
2489
|
element: conditionaldefaultflowMarker,
|
|
@@ -2518,15 +2518,15 @@
|
|
|
2518
2518
|
var cx = width / 2,
|
|
2519
2519
|
cy = height / 2;
|
|
2520
2520
|
|
|
2521
|
-
var circle = create$
|
|
2522
|
-
attr$
|
|
2521
|
+
var circle = create$1('circle');
|
|
2522
|
+
attr$1(circle, {
|
|
2523
2523
|
cx: cx,
|
|
2524
2524
|
cy: cy,
|
|
2525
2525
|
r: Math.round((width + height) / 4 - offset)
|
|
2526
2526
|
});
|
|
2527
|
-
attr$
|
|
2527
|
+
attr$1(circle, attrs);
|
|
2528
2528
|
|
|
2529
|
-
append
|
|
2529
|
+
append(parentGfx, circle);
|
|
2530
2530
|
|
|
2531
2531
|
return circle;
|
|
2532
2532
|
}
|
|
@@ -2546,8 +2546,8 @@
|
|
|
2546
2546
|
fill: 'white'
|
|
2547
2547
|
});
|
|
2548
2548
|
|
|
2549
|
-
var rect = create$
|
|
2550
|
-
attr$
|
|
2549
|
+
var rect = create$1('rect');
|
|
2550
|
+
attr$1(rect, {
|
|
2551
2551
|
x: offset,
|
|
2552
2552
|
y: offset,
|
|
2553
2553
|
width: width - offset * 2,
|
|
@@ -2555,9 +2555,9 @@
|
|
|
2555
2555
|
rx: r,
|
|
2556
2556
|
ry: r
|
|
2557
2557
|
});
|
|
2558
|
-
attr$
|
|
2558
|
+
attr$1(rect, attrs);
|
|
2559
2559
|
|
|
2560
|
-
append
|
|
2560
|
+
append(parentGfx, rect);
|
|
2561
2561
|
|
|
2562
2562
|
return rect;
|
|
2563
2563
|
}
|
|
@@ -2579,13 +2579,13 @@
|
|
|
2579
2579
|
fill: 'white'
|
|
2580
2580
|
});
|
|
2581
2581
|
|
|
2582
|
-
var polygon = create$
|
|
2583
|
-
attr$
|
|
2582
|
+
var polygon = create$1('polygon');
|
|
2583
|
+
attr$1(polygon, {
|
|
2584
2584
|
points: pointsString
|
|
2585
2585
|
});
|
|
2586
|
-
attr$
|
|
2586
|
+
attr$1(polygon, attrs);
|
|
2587
2587
|
|
|
2588
|
-
append
|
|
2588
|
+
append(parentGfx, polygon);
|
|
2589
2589
|
|
|
2590
2590
|
return polygon;
|
|
2591
2591
|
}
|
|
@@ -2599,7 +2599,7 @@
|
|
|
2599
2599
|
|
|
2600
2600
|
var line = createLine(waypoints, attrs);
|
|
2601
2601
|
|
|
2602
|
-
append
|
|
2602
|
+
append(parentGfx, line);
|
|
2603
2603
|
|
|
2604
2604
|
return line;
|
|
2605
2605
|
}
|
|
@@ -2611,11 +2611,11 @@
|
|
|
2611
2611
|
stroke: black
|
|
2612
2612
|
});
|
|
2613
2613
|
|
|
2614
|
-
var path = create$
|
|
2615
|
-
attr$
|
|
2616
|
-
attr$
|
|
2614
|
+
var path = create$1('path');
|
|
2615
|
+
attr$1(path, { d: d });
|
|
2616
|
+
attr$1(path, attrs);
|
|
2617
2617
|
|
|
2618
|
-
append
|
|
2618
|
+
append(parentGfx, path);
|
|
2619
2619
|
|
|
2620
2620
|
return path;
|
|
2621
2621
|
}
|
|
@@ -2703,7 +2703,7 @@
|
|
|
2703
2703
|
|
|
2704
2704
|
classes$1(text).add('djs-label');
|
|
2705
2705
|
|
|
2706
|
-
append
|
|
2706
|
+
append(parentGfx, text);
|
|
2707
2707
|
|
|
2708
2708
|
return text;
|
|
2709
2709
|
}
|
|
@@ -3313,7 +3313,7 @@
|
|
|
3313
3313
|
});
|
|
3314
3314
|
|
|
3315
3315
|
var businessHeaderPath = drawPath(parentGfx, headerPathData);
|
|
3316
|
-
attr$
|
|
3316
|
+
attr$1(businessHeaderPath, {
|
|
3317
3317
|
strokeWidth: 1,
|
|
3318
3318
|
fill: getFillColor(element, '#aaaaaa'),
|
|
3319
3319
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
@@ -3327,7 +3327,7 @@
|
|
|
3327
3327
|
});
|
|
3328
3328
|
|
|
3329
3329
|
var businessPath = drawPath(parentGfx, headerData);
|
|
3330
|
-
attr$
|
|
3330
|
+
attr$1(businessPath, {
|
|
3331
3331
|
strokeWidth: 1,
|
|
3332
3332
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
3333
3333
|
});
|
|
@@ -3345,7 +3345,7 @@
|
|
|
3345
3345
|
var expanded = isExpanded(element);
|
|
3346
3346
|
|
|
3347
3347
|
if (isEventSubProcess(element)) {
|
|
3348
|
-
attr$
|
|
3348
|
+
attr$1(rect, {
|
|
3349
3349
|
strokeDasharray: '1,2'
|
|
3350
3350
|
});
|
|
3351
3351
|
}
|
|
@@ -3567,7 +3567,7 @@
|
|
|
3567
3567
|
});
|
|
3568
3568
|
|
|
3569
3569
|
var parallelPath = drawPath(parentGfx, pathData);
|
|
3570
|
-
attr$
|
|
3570
|
+
attr$1(parallelPath, {
|
|
3571
3571
|
strokeWidth: 1,
|
|
3572
3572
|
fill: 'none'
|
|
3573
3573
|
});
|
|
@@ -3575,7 +3575,7 @@
|
|
|
3575
3575
|
|
|
3576
3576
|
if (!instantiate) {
|
|
3577
3577
|
var innerCircle = drawCircle(parentGfx, element.width, element.height, element.height * 0.26);
|
|
3578
|
-
attr$
|
|
3578
|
+
attr$1(innerCircle, {
|
|
3579
3579
|
strokeWidth: 1,
|
|
3580
3580
|
fill: 'none',
|
|
3581
3581
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
@@ -3620,7 +3620,7 @@
|
|
|
3620
3620
|
|
|
3621
3621
|
// conditional flow marker
|
|
3622
3622
|
if (sequenceFlow.conditionExpression && source.$instanceOf('bpmn:Activity')) {
|
|
3623
|
-
attr$
|
|
3623
|
+
attr$1(path, {
|
|
3624
3624
|
markerStart: marker('conditional-flow-marker', fill, stroke)
|
|
3625
3625
|
});
|
|
3626
3626
|
}
|
|
@@ -3628,7 +3628,7 @@
|
|
|
3628
3628
|
// default marker
|
|
3629
3629
|
if (source.default && (source.$instanceOf('bpmn:Gateway') || source.$instanceOf('bpmn:Activity')) &&
|
|
3630
3630
|
source.default === sequenceFlow) {
|
|
3631
|
-
attr$
|
|
3631
|
+
attr$1(path, {
|
|
3632
3632
|
markerStart: marker('conditional-default-flow-marker', fill, stroke)
|
|
3633
3633
|
});
|
|
3634
3634
|
}
|
|
@@ -4118,7 +4118,7 @@
|
|
|
4118
4118
|
}
|
|
4119
4119
|
|
|
4120
4120
|
|
|
4121
|
-
e(BpmnRenderer, BaseRenderer
|
|
4121
|
+
e(BpmnRenderer, BaseRenderer);
|
|
4122
4122
|
|
|
4123
4123
|
BpmnRenderer.$inject = [
|
|
4124
4124
|
'config.bpmnRenderer',
|
|
@@ -4346,9 +4346,9 @@
|
|
|
4346
4346
|
var helperSvg = document.getElementById('helper-svg');
|
|
4347
4347
|
|
|
4348
4348
|
if (!helperSvg) {
|
|
4349
|
-
helperSvg = create$
|
|
4349
|
+
helperSvg = create$1('svg');
|
|
4350
4350
|
|
|
4351
|
-
attr$
|
|
4351
|
+
attr$1(helperSvg, {
|
|
4352
4352
|
id: 'helper-svg'
|
|
4353
4353
|
});
|
|
4354
4354
|
|
|
@@ -4442,13 +4442,13 @@
|
|
|
4442
4442
|
var maxWidth = box.width - padding.left - padding.right;
|
|
4443
4443
|
|
|
4444
4444
|
// ensure correct rendering by attaching helper text node to invisible SVG
|
|
4445
|
-
var helperText = create$
|
|
4446
|
-
attr$
|
|
4447
|
-
attr$
|
|
4445
|
+
var helperText = create$1('text');
|
|
4446
|
+
attr$1(helperText, { x: 0, y: 0 });
|
|
4447
|
+
attr$1(helperText, style);
|
|
4448
4448
|
|
|
4449
4449
|
var helperSvg = getHelperSvg();
|
|
4450
4450
|
|
|
4451
|
-
append
|
|
4451
|
+
append(helperSvg, helperText);
|
|
4452
4452
|
|
|
4453
4453
|
while (lines.length) {
|
|
4454
4454
|
layouted.push(layoutNext(lines, maxWidth, helperText));
|
|
@@ -4477,9 +4477,9 @@
|
|
|
4477
4477
|
y -= (lineHeight || layouted[0].height) / 4;
|
|
4478
4478
|
|
|
4479
4479
|
|
|
4480
|
-
var textElement = create$
|
|
4480
|
+
var textElement = create$1('text');
|
|
4481
4481
|
|
|
4482
|
-
attr$
|
|
4482
|
+
attr$1(textElement, style);
|
|
4483
4483
|
|
|
4484
4484
|
// layout each line taking into account that parent
|
|
4485
4485
|
// shape might resize to fit text size
|
|
@@ -4506,12 +4506,12 @@
|
|
|
4506
4506
|
- line.width) / 2 + padding.left), 0);
|
|
4507
4507
|
}
|
|
4508
4508
|
|
|
4509
|
-
var tspan = create$
|
|
4510
|
-
attr$
|
|
4509
|
+
var tspan = create$1('tspan');
|
|
4510
|
+
attr$1(tspan, { x: x, y: y });
|
|
4511
4511
|
|
|
4512
4512
|
tspan.textContent = line.text;
|
|
4513
4513
|
|
|
4514
|
-
append
|
|
4514
|
+
append(textElement, tspan);
|
|
4515
4515
|
});
|
|
4516
4516
|
|
|
4517
4517
|
remove$2(helperText);
|
|
@@ -6089,13 +6089,13 @@
|
|
|
6089
6089
|
throw new Error('invalid hit type <' + type + '>');
|
|
6090
6090
|
}
|
|
6091
6091
|
|
|
6092
|
-
attr$
|
|
6092
|
+
attr$1(hit, attrs);
|
|
6093
6093
|
|
|
6094
6094
|
return hit;
|
|
6095
6095
|
}
|
|
6096
6096
|
|
|
6097
6097
|
function appendHit(gfx, hit) {
|
|
6098
|
-
append
|
|
6098
|
+
append(gfx, hit);
|
|
6099
6099
|
}
|
|
6100
6100
|
|
|
6101
6101
|
|
|
@@ -6173,11 +6173,11 @@
|
|
|
6173
6173
|
y: 0
|
|
6174
6174
|
}, attrs);
|
|
6175
6175
|
|
|
6176
|
-
var hit = create$
|
|
6176
|
+
var hit = create$1('rect');
|
|
6177
6177
|
|
|
6178
6178
|
applyStyle(hit, type);
|
|
6179
6179
|
|
|
6180
|
-
attr$
|
|
6180
|
+
attr$1(hit, attrs);
|
|
6181
6181
|
|
|
6182
6182
|
appendHit(gfx, hit);
|
|
6183
6183
|
|
|
@@ -6203,7 +6203,7 @@
|
|
|
6203
6203
|
if (element.waypoints) {
|
|
6204
6204
|
updateLine(hit, element.waypoints);
|
|
6205
6205
|
} else {
|
|
6206
|
-
attr$
|
|
6206
|
+
attr$1(hit, {
|
|
6207
6207
|
width: element.width,
|
|
6208
6208
|
height: element.height
|
|
6209
6209
|
});
|
|
@@ -6411,9 +6411,9 @@
|
|
|
6411
6411
|
var self = this;
|
|
6412
6412
|
|
|
6413
6413
|
function createOutline(gfx, bounds) {
|
|
6414
|
-
var outline = create$
|
|
6414
|
+
var outline = create$1('rect');
|
|
6415
6415
|
|
|
6416
|
-
attr$
|
|
6416
|
+
attr$1(outline, assign$1({
|
|
6417
6417
|
x: 10,
|
|
6418
6418
|
y: 10,
|
|
6419
6419
|
rx: 3,
|
|
@@ -6421,7 +6421,7 @@
|
|
|
6421
6421
|
height: 100
|
|
6422
6422
|
}, OUTLINE_STYLE));
|
|
6423
6423
|
|
|
6424
|
-
append
|
|
6424
|
+
append(gfx, outline);
|
|
6425
6425
|
|
|
6426
6426
|
return outline;
|
|
6427
6427
|
}
|
|
@@ -6465,7 +6465,7 @@
|
|
|
6465
6465
|
*/
|
|
6466
6466
|
Outline.prototype.updateShapeOutline = function(outline, element) {
|
|
6467
6467
|
|
|
6468
|
-
attr$
|
|
6468
|
+
attr$1(outline, {
|
|
6469
6469
|
x: -this.offset,
|
|
6470
6470
|
y: -this.offset,
|
|
6471
6471
|
width: element.width + this.offset * 2,
|
|
@@ -6486,7 +6486,7 @@
|
|
|
6486
6486
|
|
|
6487
6487
|
var bbox = getBBox(connection);
|
|
6488
6488
|
|
|
6489
|
-
attr$
|
|
6489
|
+
attr$1(outline, {
|
|
6490
6490
|
x: bbox.x - this.offset,
|
|
6491
6491
|
y: bbox.y - this.offset,
|
|
6492
6492
|
width: bbox.width + this.offset * 2,
|
|
@@ -6704,15 +6704,15 @@
|
|
|
6704
6704
|
|
|
6705
6705
|
var bBox = addSelectionOutlinePadding(getBBox(selection));
|
|
6706
6706
|
|
|
6707
|
-
var rect = create$
|
|
6707
|
+
var rect = create$1('rect');
|
|
6708
6708
|
|
|
6709
|
-
attr$
|
|
6709
|
+
attr$1(rect, assign$1({
|
|
6710
6710
|
rx: 3
|
|
6711
6711
|
}, bBox));
|
|
6712
6712
|
|
|
6713
6713
|
classes$1(rect).add('djs-selection-outline');
|
|
6714
6714
|
|
|
6715
|
-
append
|
|
6715
|
+
append(layer, rect);
|
|
6716
6716
|
};
|
|
6717
6717
|
|
|
6718
6718
|
// helpers //////////
|
|
@@ -7176,7 +7176,7 @@
|
|
|
7176
7176
|
|
|
7177
7177
|
setPosition(html, x, y);
|
|
7178
7178
|
|
|
7179
|
-
attr
|
|
7179
|
+
attr(container.html, 'data-container-id', element.id);
|
|
7180
7180
|
};
|
|
7181
7181
|
|
|
7182
7182
|
|
|
@@ -9010,7 +9010,7 @@
|
|
|
9010
9010
|
|
|
9011
9011
|
// apply default renderer with lowest possible priority
|
|
9012
9012
|
// so that it only kicks in if noone else could render
|
|
9013
|
-
var DEFAULT_RENDER_PRIORITY
|
|
9013
|
+
var DEFAULT_RENDER_PRIORITY = 1;
|
|
9014
9014
|
|
|
9015
9015
|
/**
|
|
9016
9016
|
* The default renderer used for shapes and connections.
|
|
@@ -9021,14 +9021,14 @@
|
|
|
9021
9021
|
function DefaultRenderer(eventBus, styles) {
|
|
9022
9022
|
|
|
9023
9023
|
//
|
|
9024
|
-
BaseRenderer
|
|
9024
|
+
BaseRenderer.call(this, eventBus, DEFAULT_RENDER_PRIORITY);
|
|
9025
9025
|
|
|
9026
9026
|
this.CONNECTION_STYLE = styles.style([ 'no-fill' ], { strokeWidth: 5, stroke: 'fuchsia' });
|
|
9027
9027
|
this.SHAPE_STYLE = styles.style({ fill: 'white', stroke: 'fuchsia', strokeWidth: 2 });
|
|
9028
9028
|
this.FRAME_STYLE = styles.style([ 'no-fill' ], { stroke: 'fuchsia', strokeDasharray: 4, strokeWidth: 2 });
|
|
9029
9029
|
}
|
|
9030
9030
|
|
|
9031
|
-
e(DefaultRenderer, BaseRenderer
|
|
9031
|
+
e(DefaultRenderer, BaseRenderer);
|
|
9032
9032
|
|
|
9033
9033
|
|
|
9034
9034
|
DefaultRenderer.prototype.canRender = function() {
|
|
@@ -9036,9 +9036,9 @@
|
|
|
9036
9036
|
};
|
|
9037
9037
|
|
|
9038
9038
|
DefaultRenderer.prototype.drawShape = function drawShape(visuals, element, attrs) {
|
|
9039
|
-
var rect = create$
|
|
9039
|
+
var rect = create$1('rect');
|
|
9040
9040
|
|
|
9041
|
-
attr$
|
|
9041
|
+
attr$1(rect, {
|
|
9042
9042
|
x: 0,
|
|
9043
9043
|
y: 0,
|
|
9044
9044
|
width: element.width || 0,
|
|
@@ -9046,12 +9046,12 @@
|
|
|
9046
9046
|
});
|
|
9047
9047
|
|
|
9048
9048
|
if (isFrameElement(element)) {
|
|
9049
|
-
attr$
|
|
9049
|
+
attr$1(rect, assign$1({}, this.FRAME_STYLE, attrs || {}));
|
|
9050
9050
|
} else {
|
|
9051
|
-
attr$
|
|
9051
|
+
attr$1(rect, assign$1({}, this.SHAPE_STYLE, attrs || {}));
|
|
9052
9052
|
}
|
|
9053
9053
|
|
|
9054
|
-
append
|
|
9054
|
+
append(visuals, rect);
|
|
9055
9055
|
|
|
9056
9056
|
return rect;
|
|
9057
9057
|
};
|
|
@@ -9059,7 +9059,7 @@
|
|
|
9059
9059
|
DefaultRenderer.prototype.drawConnection = function drawConnection(visuals, connection, attrs) {
|
|
9060
9060
|
|
|
9061
9061
|
var line = createLine(connection.waypoints, assign$1({}, this.CONNECTION_STYLE, attrs || {}));
|
|
9062
|
-
append
|
|
9062
|
+
append(visuals, line);
|
|
9063
9063
|
|
|
9064
9064
|
return line;
|
|
9065
9065
|
};
|
|
@@ -9282,7 +9282,7 @@
|
|
|
9282
9282
|
// this way we can always get the correct container size
|
|
9283
9283
|
// (this is impossible for <svg> elements at the moment)
|
|
9284
9284
|
const parent = document.createElement('div');
|
|
9285
|
-
parent.setAttribute('class', 'djs-container');
|
|
9285
|
+
parent.setAttribute('class', 'djs-container djs-parent');
|
|
9286
9286
|
|
|
9287
9287
|
assign(parent, {
|
|
9288
9288
|
position: 'relative',
|
|
@@ -9297,7 +9297,7 @@
|
|
|
9297
9297
|
}
|
|
9298
9298
|
|
|
9299
9299
|
function createGroup(parent, cls, childIndex) {
|
|
9300
|
-
const group = create$
|
|
9300
|
+
const group = create$1('g');
|
|
9301
9301
|
classes$1(group).add(cls);
|
|
9302
9302
|
|
|
9303
9303
|
const index = childIndex !== undefined ? childIndex : parent.childNodes.length - 1;
|
|
@@ -9376,10 +9376,10 @@
|
|
|
9376
9376
|
// html container
|
|
9377
9377
|
const container = this._container = createContainer(config);
|
|
9378
9378
|
|
|
9379
|
-
const svg = this._svg = create$
|
|
9380
|
-
attr$
|
|
9379
|
+
const svg = this._svg = create$1('svg');
|
|
9380
|
+
attr$1(svg, { width: '100%', height: '100%' });
|
|
9381
9381
|
|
|
9382
|
-
append
|
|
9382
|
+
append(container, svg);
|
|
9383
9383
|
|
|
9384
9384
|
const viewport = this._viewport = createGroup(svg, 'viewport');
|
|
9385
9385
|
|
|
@@ -10691,10 +10691,10 @@
|
|
|
10691
10691
|
this._validateId(id);
|
|
10692
10692
|
|
|
10693
10693
|
// associate dom node with element
|
|
10694
|
-
attr$
|
|
10694
|
+
attr$1(gfx, ELEMENT_ID, id);
|
|
10695
10695
|
|
|
10696
10696
|
if (secondaryGfx) {
|
|
10697
|
-
attr$
|
|
10697
|
+
attr$1(secondaryGfx, ELEMENT_ID, id);
|
|
10698
10698
|
}
|
|
10699
10699
|
|
|
10700
10700
|
this._elements[id] = { element: element, gfx: gfx, secondaryGfx: secondaryGfx };
|
|
@@ -10703,7 +10703,7 @@
|
|
|
10703
10703
|
/**
|
|
10704
10704
|
* Removes an element from the registry.
|
|
10705
10705
|
*
|
|
10706
|
-
* @param {djs.model.Base} element
|
|
10706
|
+
* @param {string|djs.model.Base} element
|
|
10707
10707
|
*/
|
|
10708
10708
|
ElementRegistry.prototype.remove = function(element) {
|
|
10709
10709
|
var elements = this._elements,
|
|
@@ -10713,10 +10713,10 @@
|
|
|
10713
10713
|
if (container) {
|
|
10714
10714
|
|
|
10715
10715
|
// unset element id on gfx
|
|
10716
|
-
attr$
|
|
10716
|
+
attr$1(container.gfx, ELEMENT_ID, '');
|
|
10717
10717
|
|
|
10718
10718
|
if (container.secondaryGfx) {
|
|
10719
|
-
attr$
|
|
10719
|
+
attr$1(container.secondaryGfx, ELEMENT_ID, '');
|
|
10720
10720
|
}
|
|
10721
10721
|
|
|
10722
10722
|
delete elements[id];
|
|
@@ -10726,7 +10726,7 @@
|
|
|
10726
10726
|
/**
|
|
10727
10727
|
* Update the id of an element
|
|
10728
10728
|
*
|
|
10729
|
-
* @param {djs.model.Base} element
|
|
10729
|
+
* @param {string|djs.model.Base} element
|
|
10730
10730
|
* @param {string} newId
|
|
10731
10731
|
*/
|
|
10732
10732
|
ElementRegistry.prototype.updateId = function(element, newId) {
|
|
@@ -10755,7 +10755,7 @@
|
|
|
10755
10755
|
/**
|
|
10756
10756
|
* Update the graphics of an element
|
|
10757
10757
|
*
|
|
10758
|
-
* @param {djs.model.Base} element
|
|
10758
|
+
* @param {string|djs.model.Base} element
|
|
10759
10759
|
* @param {SVGElement} gfx
|
|
10760
10760
|
* @param {boolean} [secondary=false] whether to update the secondary connected element
|
|
10761
10761
|
*/
|
|
@@ -10771,7 +10771,7 @@
|
|
|
10771
10771
|
}
|
|
10772
10772
|
|
|
10773
10773
|
if (gfx) {
|
|
10774
|
-
attr$
|
|
10774
|
+
attr$1(gfx, ELEMENT_ID, id);
|
|
10775
10775
|
}
|
|
10776
10776
|
|
|
10777
10777
|
return gfx;
|
|
@@ -10796,7 +10796,7 @@
|
|
|
10796
10796
|
if (typeof filter === 'string') {
|
|
10797
10797
|
id = filter;
|
|
10798
10798
|
} else {
|
|
10799
|
-
id = filter && attr$
|
|
10799
|
+
id = filter && attr$1(filter, ELEMENT_ID);
|
|
10800
10800
|
}
|
|
10801
10801
|
|
|
10802
10802
|
var container = this._elements[id];
|
|
@@ -11461,7 +11461,7 @@
|
|
|
11461
11461
|
*
|
|
11462
11462
|
* @return {Base} the new model instance
|
|
11463
11463
|
*/
|
|
11464
|
-
function create
|
|
11464
|
+
function create(type, attrs) {
|
|
11465
11465
|
var Type = types$7[type];
|
|
11466
11466
|
if (!Type) {
|
|
11467
11467
|
throw new Error('unknown type: <' + type + '>');
|
|
@@ -11509,7 +11509,7 @@
|
|
|
11509
11509
|
attrs.id = type + '_' + (this._uid++);
|
|
11510
11510
|
}
|
|
11511
11511
|
|
|
11512
|
-
return create
|
|
11512
|
+
return create(type, attrs);
|
|
11513
11513
|
};
|
|
11514
11514
|
|
|
11515
11515
|
var FN_REF = '__fn';
|
|
@@ -12079,10 +12079,10 @@
|
|
|
12079
12079
|
} else {
|
|
12080
12080
|
childrenGfx = getChildren(gfx);
|
|
12081
12081
|
if (!childrenGfx) {
|
|
12082
|
-
childrenGfx = create$
|
|
12082
|
+
childrenGfx = create$1('g');
|
|
12083
12083
|
classes$1(childrenGfx).add('djs-children');
|
|
12084
12084
|
|
|
12085
|
-
append
|
|
12085
|
+
append(gfx.parentNode, childrenGfx);
|
|
12086
12086
|
}
|
|
12087
12087
|
}
|
|
12088
12088
|
|
|
@@ -12131,17 +12131,17 @@
|
|
|
12131
12131
|
GraphicsFactory.prototype._createContainer = function(
|
|
12132
12132
|
type, childrenGfx, parentIndex, isFrame
|
|
12133
12133
|
) {
|
|
12134
|
-
var outerGfx = create$
|
|
12134
|
+
var outerGfx = create$1('g');
|
|
12135
12135
|
classes$1(outerGfx).add('djs-group');
|
|
12136
12136
|
|
|
12137
12137
|
// insert node at position
|
|
12138
12138
|
if (typeof parentIndex !== 'undefined') {
|
|
12139
12139
|
prependTo(outerGfx, childrenGfx, childrenGfx.childNodes[parentIndex]);
|
|
12140
12140
|
} else {
|
|
12141
|
-
append
|
|
12141
|
+
append(childrenGfx, outerGfx);
|
|
12142
12142
|
}
|
|
12143
12143
|
|
|
12144
|
-
var gfx = create$
|
|
12144
|
+
var gfx = create$1('g');
|
|
12145
12145
|
classes$1(gfx).add('djs-element');
|
|
12146
12146
|
classes$1(gfx).add('djs-' + type);
|
|
12147
12147
|
|
|
@@ -12149,13 +12149,13 @@
|
|
|
12149
12149
|
classes$1(gfx).add('djs-frame');
|
|
12150
12150
|
}
|
|
12151
12151
|
|
|
12152
|
-
append
|
|
12152
|
+
append(outerGfx, gfx);
|
|
12153
12153
|
|
|
12154
12154
|
// create visual
|
|
12155
|
-
var visual = create$
|
|
12155
|
+
var visual = create$1('g');
|
|
12156
12156
|
classes$1(visual).add('djs-visual');
|
|
12157
12157
|
|
|
12158
|
-
append
|
|
12158
|
+
append(gfx, visual);
|
|
12159
12159
|
|
|
12160
12160
|
return gfx;
|
|
12161
12161
|
};
|
|
@@ -12247,9 +12247,9 @@
|
|
|
12247
12247
|
}
|
|
12248
12248
|
|
|
12249
12249
|
if (element.hidden) {
|
|
12250
|
-
attr$
|
|
12250
|
+
attr$1(gfx, 'display', 'none');
|
|
12251
12251
|
} else {
|
|
12252
|
-
attr$
|
|
12252
|
+
attr$1(gfx, 'display', 'block');
|
|
12253
12253
|
}
|
|
12254
12254
|
};
|
|
12255
12255
|
|
|
@@ -21567,356 +21567,6 @@
|
|
|
21567
21567
|
// default moddle extensions the viewer is composed of
|
|
21568
21568
|
Viewer$1.prototype._moddleExtensions = {};
|
|
21569
21569
|
|
|
21570
|
-
var DEFAULT_RENDER_PRIORITY = 1000;
|
|
21571
|
-
|
|
21572
|
-
/**
|
|
21573
|
-
* The base implementation of shape and connection renderers.
|
|
21574
|
-
*
|
|
21575
|
-
* @param {EventBus} eventBus
|
|
21576
|
-
* @param {number} [renderPriority=1000]
|
|
21577
|
-
*/
|
|
21578
|
-
function BaseRenderer(eventBus, renderPriority) {
|
|
21579
|
-
var self = this;
|
|
21580
|
-
|
|
21581
|
-
renderPriority = renderPriority || DEFAULT_RENDER_PRIORITY;
|
|
21582
|
-
|
|
21583
|
-
eventBus.on([ 'render.shape', 'render.connection' ], renderPriority, function(evt, context) {
|
|
21584
|
-
var type = evt.type,
|
|
21585
|
-
element = context.element,
|
|
21586
|
-
visuals = context.gfx,
|
|
21587
|
-
attrs = context.attrs;
|
|
21588
|
-
|
|
21589
|
-
if (self.canRender(element)) {
|
|
21590
|
-
if (type === 'render.shape') {
|
|
21591
|
-
return self.drawShape(visuals, element, attrs);
|
|
21592
|
-
} else {
|
|
21593
|
-
return self.drawConnection(visuals, element, attrs);
|
|
21594
|
-
}
|
|
21595
|
-
}
|
|
21596
|
-
});
|
|
21597
|
-
|
|
21598
|
-
eventBus.on([ 'render.getShapePath', 'render.getConnectionPath' ], renderPriority, function(evt, element) {
|
|
21599
|
-
if (self.canRender(element)) {
|
|
21600
|
-
if (evt.type === 'render.getShapePath') {
|
|
21601
|
-
return self.getShapePath(element);
|
|
21602
|
-
} else {
|
|
21603
|
-
return self.getConnectionPath(element);
|
|
21604
|
-
}
|
|
21605
|
-
}
|
|
21606
|
-
});
|
|
21607
|
-
}
|
|
21608
|
-
|
|
21609
|
-
/**
|
|
21610
|
-
* Should check whether *this* renderer can render
|
|
21611
|
-
* the element/connection.
|
|
21612
|
-
*
|
|
21613
|
-
* @param {element} element
|
|
21614
|
-
*
|
|
21615
|
-
* @returns {boolean}
|
|
21616
|
-
*/
|
|
21617
|
-
BaseRenderer.prototype.canRender = function() {};
|
|
21618
|
-
|
|
21619
|
-
/**
|
|
21620
|
-
* Provides the shape's snap svg element to be drawn on the `canvas`.
|
|
21621
|
-
*
|
|
21622
|
-
* @param {djs.Graphics} visuals
|
|
21623
|
-
* @param {Shape} shape
|
|
21624
|
-
*
|
|
21625
|
-
* @returns {Snap.svg} [returns a Snap.svg paper element ]
|
|
21626
|
-
*/
|
|
21627
|
-
BaseRenderer.prototype.drawShape = function() {};
|
|
21628
|
-
|
|
21629
|
-
/**
|
|
21630
|
-
* Provides the shape's snap svg element to be drawn on the `canvas`.
|
|
21631
|
-
*
|
|
21632
|
-
* @param {djs.Graphics} visuals
|
|
21633
|
-
* @param {Connection} connection
|
|
21634
|
-
*
|
|
21635
|
-
* @returns {Snap.svg} [returns a Snap.svg paper element ]
|
|
21636
|
-
*/
|
|
21637
|
-
BaseRenderer.prototype.drawConnection = function() {};
|
|
21638
|
-
|
|
21639
|
-
/**
|
|
21640
|
-
* Gets the SVG path of a shape that represents it's visual bounds.
|
|
21641
|
-
*
|
|
21642
|
-
* @param {Shape} shape
|
|
21643
|
-
*
|
|
21644
|
-
* @return {string} svg path
|
|
21645
|
-
*/
|
|
21646
|
-
BaseRenderer.prototype.getShapePath = function() {};
|
|
21647
|
-
|
|
21648
|
-
/**
|
|
21649
|
-
* Gets the SVG path of a connection that represents it's visual bounds.
|
|
21650
|
-
*
|
|
21651
|
-
* @param {Connection} connection
|
|
21652
|
-
*
|
|
21653
|
-
* @return {string} svg path
|
|
21654
|
-
*/
|
|
21655
|
-
BaseRenderer.prototype.getConnectionPath = function() {};
|
|
21656
|
-
|
|
21657
|
-
function ensureImported(element, target) {
|
|
21658
|
-
|
|
21659
|
-
if (element.ownerDocument !== target.ownerDocument) {
|
|
21660
|
-
try {
|
|
21661
|
-
|
|
21662
|
-
// may fail on webkit
|
|
21663
|
-
return target.ownerDocument.importNode(element, true);
|
|
21664
|
-
} catch (e) {
|
|
21665
|
-
|
|
21666
|
-
// ignore
|
|
21667
|
-
}
|
|
21668
|
-
}
|
|
21669
|
-
|
|
21670
|
-
return element;
|
|
21671
|
-
}
|
|
21672
|
-
|
|
21673
|
-
/**
|
|
21674
|
-
* appendTo utility
|
|
21675
|
-
*/
|
|
21676
|
-
|
|
21677
|
-
/**
|
|
21678
|
-
* Append a node to a target element and return the appended node.
|
|
21679
|
-
*
|
|
21680
|
-
* @param {SVGElement} element
|
|
21681
|
-
* @param {SVGElement} target
|
|
21682
|
-
*
|
|
21683
|
-
* @return {SVGElement} the appended node
|
|
21684
|
-
*/
|
|
21685
|
-
function appendTo(element, target) {
|
|
21686
|
-
return target.appendChild(ensureImported(element, target));
|
|
21687
|
-
}
|
|
21688
|
-
|
|
21689
|
-
/**
|
|
21690
|
-
* append utility
|
|
21691
|
-
*/
|
|
21692
|
-
|
|
21693
|
-
/**
|
|
21694
|
-
* Append a node to an element
|
|
21695
|
-
*
|
|
21696
|
-
* @param {SVGElement} element
|
|
21697
|
-
* @param {SVGElement} node
|
|
21698
|
-
*
|
|
21699
|
-
* @return {SVGElement} the element
|
|
21700
|
-
*/
|
|
21701
|
-
function append(target, node) {
|
|
21702
|
-
appendTo(node, target);
|
|
21703
|
-
return target;
|
|
21704
|
-
}
|
|
21705
|
-
|
|
21706
|
-
/**
|
|
21707
|
-
* attribute accessor utility
|
|
21708
|
-
*/
|
|
21709
|
-
|
|
21710
|
-
var LENGTH_ATTR = 2;
|
|
21711
|
-
|
|
21712
|
-
var CSS_PROPERTIES = {
|
|
21713
|
-
'alignment-baseline': 1,
|
|
21714
|
-
'baseline-shift': 1,
|
|
21715
|
-
'clip': 1,
|
|
21716
|
-
'clip-path': 1,
|
|
21717
|
-
'clip-rule': 1,
|
|
21718
|
-
'color': 1,
|
|
21719
|
-
'color-interpolation': 1,
|
|
21720
|
-
'color-interpolation-filters': 1,
|
|
21721
|
-
'color-profile': 1,
|
|
21722
|
-
'color-rendering': 1,
|
|
21723
|
-
'cursor': 1,
|
|
21724
|
-
'direction': 1,
|
|
21725
|
-
'display': 1,
|
|
21726
|
-
'dominant-baseline': 1,
|
|
21727
|
-
'enable-background': 1,
|
|
21728
|
-
'fill': 1,
|
|
21729
|
-
'fill-opacity': 1,
|
|
21730
|
-
'fill-rule': 1,
|
|
21731
|
-
'filter': 1,
|
|
21732
|
-
'flood-color': 1,
|
|
21733
|
-
'flood-opacity': 1,
|
|
21734
|
-
'font': 1,
|
|
21735
|
-
'font-family': 1,
|
|
21736
|
-
'font-size': LENGTH_ATTR,
|
|
21737
|
-
'font-size-adjust': 1,
|
|
21738
|
-
'font-stretch': 1,
|
|
21739
|
-
'font-style': 1,
|
|
21740
|
-
'font-variant': 1,
|
|
21741
|
-
'font-weight': 1,
|
|
21742
|
-
'glyph-orientation-horizontal': 1,
|
|
21743
|
-
'glyph-orientation-vertical': 1,
|
|
21744
|
-
'image-rendering': 1,
|
|
21745
|
-
'kerning': 1,
|
|
21746
|
-
'letter-spacing': 1,
|
|
21747
|
-
'lighting-color': 1,
|
|
21748
|
-
'marker': 1,
|
|
21749
|
-
'marker-end': 1,
|
|
21750
|
-
'marker-mid': 1,
|
|
21751
|
-
'marker-start': 1,
|
|
21752
|
-
'mask': 1,
|
|
21753
|
-
'opacity': 1,
|
|
21754
|
-
'overflow': 1,
|
|
21755
|
-
'pointer-events': 1,
|
|
21756
|
-
'shape-rendering': 1,
|
|
21757
|
-
'stop-color': 1,
|
|
21758
|
-
'stop-opacity': 1,
|
|
21759
|
-
'stroke': 1,
|
|
21760
|
-
'stroke-dasharray': 1,
|
|
21761
|
-
'stroke-dashoffset': 1,
|
|
21762
|
-
'stroke-linecap': 1,
|
|
21763
|
-
'stroke-linejoin': 1,
|
|
21764
|
-
'stroke-miterlimit': 1,
|
|
21765
|
-
'stroke-opacity': 1,
|
|
21766
|
-
'stroke-width': LENGTH_ATTR,
|
|
21767
|
-
'text-anchor': 1,
|
|
21768
|
-
'text-decoration': 1,
|
|
21769
|
-
'text-rendering': 1,
|
|
21770
|
-
'unicode-bidi': 1,
|
|
21771
|
-
'visibility': 1,
|
|
21772
|
-
'word-spacing': 1,
|
|
21773
|
-
'writing-mode': 1
|
|
21774
|
-
};
|
|
21775
|
-
|
|
21776
|
-
|
|
21777
|
-
function getAttribute(node, name) {
|
|
21778
|
-
if (CSS_PROPERTIES[name]) {
|
|
21779
|
-
return node.style[name];
|
|
21780
|
-
} else {
|
|
21781
|
-
return node.getAttributeNS(null, name);
|
|
21782
|
-
}
|
|
21783
|
-
}
|
|
21784
|
-
|
|
21785
|
-
function setAttribute(node, name, value) {
|
|
21786
|
-
var hyphenated = name.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
|
21787
|
-
|
|
21788
|
-
var type = CSS_PROPERTIES[hyphenated];
|
|
21789
|
-
|
|
21790
|
-
if (type) {
|
|
21791
|
-
|
|
21792
|
-
// append pixel unit, unless present
|
|
21793
|
-
if (type === LENGTH_ATTR && typeof value === 'number') {
|
|
21794
|
-
value = String(value) + 'px';
|
|
21795
|
-
}
|
|
21796
|
-
|
|
21797
|
-
node.style[hyphenated] = value;
|
|
21798
|
-
} else {
|
|
21799
|
-
node.setAttributeNS(null, name, value);
|
|
21800
|
-
}
|
|
21801
|
-
}
|
|
21802
|
-
|
|
21803
|
-
function setAttributes(node, attrs) {
|
|
21804
|
-
|
|
21805
|
-
var names = Object.keys(attrs), i, name;
|
|
21806
|
-
|
|
21807
|
-
for (i = 0, name; (name = names[i]); i++) {
|
|
21808
|
-
setAttribute(node, name, attrs[name]);
|
|
21809
|
-
}
|
|
21810
|
-
}
|
|
21811
|
-
|
|
21812
|
-
/**
|
|
21813
|
-
* Gets or sets raw attributes on a node.
|
|
21814
|
-
*
|
|
21815
|
-
* @param {SVGElement} node
|
|
21816
|
-
* @param {Object} [attrs]
|
|
21817
|
-
* @param {String} [name]
|
|
21818
|
-
* @param {String} [value]
|
|
21819
|
-
*
|
|
21820
|
-
* @return {String}
|
|
21821
|
-
*/
|
|
21822
|
-
function attr(node, name, value) {
|
|
21823
|
-
if (typeof name === 'string') {
|
|
21824
|
-
if (value !== undefined) {
|
|
21825
|
-
setAttribute(node, name, value);
|
|
21826
|
-
} else {
|
|
21827
|
-
return getAttribute(node, name);
|
|
21828
|
-
}
|
|
21829
|
-
} else {
|
|
21830
|
-
setAttributes(node, name);
|
|
21831
|
-
}
|
|
21832
|
-
|
|
21833
|
-
return node;
|
|
21834
|
-
}
|
|
21835
|
-
|
|
21836
|
-
var ns = {
|
|
21837
|
-
svg: 'http://www.w3.org/2000/svg'
|
|
21838
|
-
};
|
|
21839
|
-
|
|
21840
|
-
/**
|
|
21841
|
-
* DOM parsing utility
|
|
21842
|
-
*/
|
|
21843
|
-
|
|
21844
|
-
var SVG_START = '<svg xmlns="' + ns.svg + '"';
|
|
21845
|
-
|
|
21846
|
-
function parse(svg) {
|
|
21847
|
-
|
|
21848
|
-
var unwrap = false;
|
|
21849
|
-
|
|
21850
|
-
// ensure we import a valid svg document
|
|
21851
|
-
if (svg.substring(0, 4) === '<svg') {
|
|
21852
|
-
if (svg.indexOf(ns.svg) === -1) {
|
|
21853
|
-
svg = SVG_START + svg.substring(4);
|
|
21854
|
-
}
|
|
21855
|
-
} else {
|
|
21856
|
-
|
|
21857
|
-
// namespace svg
|
|
21858
|
-
svg = SVG_START + '>' + svg + '</svg>';
|
|
21859
|
-
unwrap = true;
|
|
21860
|
-
}
|
|
21861
|
-
|
|
21862
|
-
var parsed = parseDocument(svg);
|
|
21863
|
-
|
|
21864
|
-
if (!unwrap) {
|
|
21865
|
-
return parsed;
|
|
21866
|
-
}
|
|
21867
|
-
|
|
21868
|
-
var fragment = document.createDocumentFragment();
|
|
21869
|
-
|
|
21870
|
-
var parent = parsed.firstChild;
|
|
21871
|
-
|
|
21872
|
-
while (parent.firstChild) {
|
|
21873
|
-
fragment.appendChild(parent.firstChild);
|
|
21874
|
-
}
|
|
21875
|
-
|
|
21876
|
-
return fragment;
|
|
21877
|
-
}
|
|
21878
|
-
|
|
21879
|
-
function parseDocument(svg) {
|
|
21880
|
-
|
|
21881
|
-
var parser;
|
|
21882
|
-
|
|
21883
|
-
// parse
|
|
21884
|
-
parser = new DOMParser();
|
|
21885
|
-
parser.async = false;
|
|
21886
|
-
|
|
21887
|
-
return parser.parseFromString(svg, 'text/xml');
|
|
21888
|
-
}
|
|
21889
|
-
|
|
21890
|
-
/**
|
|
21891
|
-
* Create utility for SVG elements
|
|
21892
|
-
*/
|
|
21893
|
-
|
|
21894
|
-
|
|
21895
|
-
/**
|
|
21896
|
-
* Create a specific type from name or SVG markup.
|
|
21897
|
-
*
|
|
21898
|
-
* @param {String} name the name or markup of the element
|
|
21899
|
-
* @param {Object} [attrs] attributes to set on the element
|
|
21900
|
-
*
|
|
21901
|
-
* @returns {SVGElement}
|
|
21902
|
-
*/
|
|
21903
|
-
function create(name, attrs) {
|
|
21904
|
-
var element;
|
|
21905
|
-
|
|
21906
|
-
if (name.charAt(0) === '<') {
|
|
21907
|
-
element = parse(name).firstChild;
|
|
21908
|
-
element = document.importNode(element, true);
|
|
21909
|
-
} else {
|
|
21910
|
-
element = document.createElementNS(ns.svg, name);
|
|
21911
|
-
}
|
|
21912
|
-
|
|
21913
|
-
if (attrs) {
|
|
21914
|
-
attr(element, attrs);
|
|
21915
|
-
}
|
|
21916
|
-
|
|
21917
|
-
return element;
|
|
21918
|
-
}
|
|
21919
|
-
|
|
21920
21570
|
function getModelerTemplateIcon(element) {
|
|
21921
21571
|
var modelerTemplateIcon = getBusinessObject(element).get('zeebe:modelerTemplateIcon');
|
|
21922
21572
|
return modelerTemplateIcon;
|
|
@@ -21956,8 +21606,8 @@
|
|
|
21956
21606
|
|
|
21957
21607
|
var modelerTemplateIcon = getModelerTemplateIcon(element);
|
|
21958
21608
|
|
|
21959
|
-
var icon = create('image');
|
|
21960
|
-
attr(icon, {
|
|
21609
|
+
var icon = create$1('image');
|
|
21610
|
+
attr$1(icon, {
|
|
21961
21611
|
href: modelerTemplateIcon,
|
|
21962
21612
|
x: 5,
|
|
21963
21613
|
y: 5,
|
|
@@ -22387,6 +22037,29 @@
|
|
|
22387
22037
|
type: "String"
|
|
22388
22038
|
}
|
|
22389
22039
|
]
|
|
22040
|
+
},
|
|
22041
|
+
{
|
|
22042
|
+
name: "Script",
|
|
22043
|
+
superClass: [
|
|
22044
|
+
"Element"
|
|
22045
|
+
],
|
|
22046
|
+
meta: {
|
|
22047
|
+
allowedIn: [
|
|
22048
|
+
"bpmn:ScriptTask"
|
|
22049
|
+
]
|
|
22050
|
+
},
|
|
22051
|
+
properties: [
|
|
22052
|
+
{
|
|
22053
|
+
name: "expression",
|
|
22054
|
+
type: "String",
|
|
22055
|
+
isAttr: true
|
|
22056
|
+
},
|
|
22057
|
+
{
|
|
22058
|
+
name: "resultVariable",
|
|
22059
|
+
type: "String",
|
|
22060
|
+
isAttr: true
|
|
22061
|
+
}
|
|
22062
|
+
]
|
|
22390
22063
|
}
|
|
22391
22064
|
];
|
|
22392
22065
|
var zeebeModdle = {
|