camunda-bpmn-js 0.11.4 → 0.11.5
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/CHANGELOG.md +6 -5
- package/dist/base-modeler.development.js +89 -1060
- package/dist/base-modeler.production.min.js +3 -3
- package/dist/camunda-cloud-modeler.development.js +110 -1081
- package/dist/camunda-cloud-modeler.production.min.js +3 -3
- package/dist/camunda-platform-modeler.development.js +123 -1094
- package/dist/camunda-platform-modeler.production.min.js +3 -3
- package/package.json +3 -3
|
@@ -3231,6 +3231,13 @@
|
|
|
3231
3231
|
return collection.indexOf(element);
|
|
3232
3232
|
}
|
|
3233
3233
|
|
|
3234
|
+
var Collections = /*#__PURE__*/Object.freeze({
|
|
3235
|
+
__proto__: null,
|
|
3236
|
+
remove: remove$2,
|
|
3237
|
+
add: add$1,
|
|
3238
|
+
indexOf: indexOf$1
|
|
3239
|
+
});
|
|
3240
|
+
|
|
3234
3241
|
/**
|
|
3235
3242
|
* Computes the distance between two points
|
|
3236
3243
|
*
|
|
@@ -19778,6 +19785,11 @@
|
|
|
19778
19785
|
translate: [ 'value', translate$1 ]
|
|
19779
19786
|
};
|
|
19780
19787
|
|
|
19788
|
+
var translate$3 = /*#__PURE__*/Object.freeze({
|
|
19789
|
+
__proto__: null,
|
|
19790
|
+
'default': translate$2
|
|
19791
|
+
});
|
|
19792
|
+
|
|
19781
19793
|
var DEFAULT_LABEL_SIZE$1 = {
|
|
19782
19794
|
width: 90,
|
|
19783
19795
|
height: 20
|
|
@@ -30671,537 +30683,6 @@
|
|
|
30671
30683
|
connectionPreview: [ 'type', ConnectionPreview ]
|
|
30672
30684
|
};
|
|
30673
30685
|
|
|
30674
|
-
function getOriginal$1(event) {
|
|
30675
|
-
return event.originalEvent || event.srcEvent;
|
|
30676
|
-
}
|
|
30677
|
-
|
|
30678
|
-
function isButton$1(event, button) {
|
|
30679
|
-
return (getOriginal$1(event) || event).button === button;
|
|
30680
|
-
}
|
|
30681
|
-
|
|
30682
|
-
function isPrimaryButton$1(event) {
|
|
30683
|
-
|
|
30684
|
-
// button === 0 -> left áka primary mouse button
|
|
30685
|
-
return isButton$1(event, 0);
|
|
30686
|
-
}
|
|
30687
|
-
|
|
30688
|
-
function isAuxiliaryButton$1(event) {
|
|
30689
|
-
|
|
30690
|
-
// button === 1 -> auxiliary áka wheel button
|
|
30691
|
-
return isButton$1(event, 1);
|
|
30692
|
-
}
|
|
30693
|
-
|
|
30694
|
-
function toSVGPoints$1(points) {
|
|
30695
|
-
var result = '';
|
|
30696
|
-
|
|
30697
|
-
for (var i = 0, p; (p = points[i]); i++) {
|
|
30698
|
-
result += p.x + ',' + p.y + ' ';
|
|
30699
|
-
}
|
|
30700
|
-
|
|
30701
|
-
return result;
|
|
30702
|
-
}
|
|
30703
|
-
|
|
30704
|
-
function createLine$1(points, attrs) {
|
|
30705
|
-
|
|
30706
|
-
var line = create('polyline');
|
|
30707
|
-
attr$1(line, { points: toSVGPoints$1(points) });
|
|
30708
|
-
|
|
30709
|
-
if (attrs) {
|
|
30710
|
-
attr$1(line, attrs);
|
|
30711
|
-
}
|
|
30712
|
-
|
|
30713
|
-
return line;
|
|
30714
|
-
}
|
|
30715
|
-
|
|
30716
|
-
function updateLine$1(gfx, points) {
|
|
30717
|
-
attr$1(gfx, { points: toSVGPoints$1(points) });
|
|
30718
|
-
|
|
30719
|
-
return gfx;
|
|
30720
|
-
}
|
|
30721
|
-
|
|
30722
|
-
function allowAll$1(event) { return true; }
|
|
30723
|
-
|
|
30724
|
-
function allowPrimaryAndAuxiliary$1(event) {
|
|
30725
|
-
return isPrimaryButton$1(event) || isAuxiliaryButton$1(event);
|
|
30726
|
-
}
|
|
30727
|
-
|
|
30728
|
-
var LOW_PRIORITY$6 = 500;
|
|
30729
|
-
|
|
30730
|
-
|
|
30731
|
-
/**
|
|
30732
|
-
* A plugin that provides interaction events for diagram elements.
|
|
30733
|
-
*
|
|
30734
|
-
* It emits the following events:
|
|
30735
|
-
*
|
|
30736
|
-
* * element.click
|
|
30737
|
-
* * element.contextmenu
|
|
30738
|
-
* * element.dblclick
|
|
30739
|
-
* * element.hover
|
|
30740
|
-
* * element.mousedown
|
|
30741
|
-
* * element.mousemove
|
|
30742
|
-
* * element.mouseup
|
|
30743
|
-
* * element.out
|
|
30744
|
-
*
|
|
30745
|
-
* Each event is a tuple { element, gfx, originalEvent }.
|
|
30746
|
-
*
|
|
30747
|
-
* Canceling the event via Event#preventDefault()
|
|
30748
|
-
* prevents the original DOM operation.
|
|
30749
|
-
*
|
|
30750
|
-
* @param {EventBus} eventBus
|
|
30751
|
-
*/
|
|
30752
|
-
function InteractionEvents$1(eventBus, elementRegistry, styles) {
|
|
30753
|
-
|
|
30754
|
-
var self = this;
|
|
30755
|
-
|
|
30756
|
-
/**
|
|
30757
|
-
* Fire an interaction event.
|
|
30758
|
-
*
|
|
30759
|
-
* @param {string} type local event name, e.g. element.click.
|
|
30760
|
-
* @param {DOMEvent} event native event
|
|
30761
|
-
* @param {djs.model.Base} [element] the diagram element to emit the event on;
|
|
30762
|
-
* defaults to the event target
|
|
30763
|
-
*/
|
|
30764
|
-
function fire(type, event, element) {
|
|
30765
|
-
|
|
30766
|
-
if (isIgnored(type, event)) {
|
|
30767
|
-
return;
|
|
30768
|
-
}
|
|
30769
|
-
|
|
30770
|
-
var target, gfx, returnValue;
|
|
30771
|
-
|
|
30772
|
-
if (!element) {
|
|
30773
|
-
target = event.delegateTarget || event.target;
|
|
30774
|
-
|
|
30775
|
-
if (target) {
|
|
30776
|
-
gfx = target;
|
|
30777
|
-
element = elementRegistry.get(gfx);
|
|
30778
|
-
}
|
|
30779
|
-
} else {
|
|
30780
|
-
gfx = elementRegistry.getGraphics(element);
|
|
30781
|
-
}
|
|
30782
|
-
|
|
30783
|
-
if (!gfx || !element) {
|
|
30784
|
-
return;
|
|
30785
|
-
}
|
|
30786
|
-
|
|
30787
|
-
returnValue = eventBus.fire(type, {
|
|
30788
|
-
element: element,
|
|
30789
|
-
gfx: gfx,
|
|
30790
|
-
originalEvent: event
|
|
30791
|
-
});
|
|
30792
|
-
|
|
30793
|
-
if (returnValue === false) {
|
|
30794
|
-
event.stopPropagation();
|
|
30795
|
-
event.preventDefault();
|
|
30796
|
-
}
|
|
30797
|
-
}
|
|
30798
|
-
|
|
30799
|
-
// TODO(nikku): document this
|
|
30800
|
-
var handlers = {};
|
|
30801
|
-
|
|
30802
|
-
function mouseHandler(localEventName) {
|
|
30803
|
-
return handlers[localEventName];
|
|
30804
|
-
}
|
|
30805
|
-
|
|
30806
|
-
function isIgnored(localEventName, event) {
|
|
30807
|
-
|
|
30808
|
-
var filter = ignoredFilters[localEventName] || isPrimaryButton$1;
|
|
30809
|
-
|
|
30810
|
-
// only react on left mouse button interactions
|
|
30811
|
-
// except for interaction events that are enabled
|
|
30812
|
-
// for secundary mouse button
|
|
30813
|
-
return !filter(event);
|
|
30814
|
-
}
|
|
30815
|
-
|
|
30816
|
-
var bindings = {
|
|
30817
|
-
click: 'element.click',
|
|
30818
|
-
contextmenu: 'element.contextmenu',
|
|
30819
|
-
dblclick: 'element.dblclick',
|
|
30820
|
-
mousedown: 'element.mousedown',
|
|
30821
|
-
mousemove: 'element.mousemove',
|
|
30822
|
-
mouseover: 'element.hover',
|
|
30823
|
-
mouseout: 'element.out',
|
|
30824
|
-
mouseup: 'element.mouseup',
|
|
30825
|
-
};
|
|
30826
|
-
|
|
30827
|
-
var ignoredFilters = {
|
|
30828
|
-
'element.contextmenu': allowAll$1,
|
|
30829
|
-
'element.mousedown': allowPrimaryAndAuxiliary$1,
|
|
30830
|
-
'element.mouseup': allowPrimaryAndAuxiliary$1,
|
|
30831
|
-
'element.click': allowPrimaryAndAuxiliary$1,
|
|
30832
|
-
'element.dblclick': allowPrimaryAndAuxiliary$1
|
|
30833
|
-
};
|
|
30834
|
-
|
|
30835
|
-
|
|
30836
|
-
// manual event trigger //////////
|
|
30837
|
-
|
|
30838
|
-
/**
|
|
30839
|
-
* Trigger an interaction event (based on a native dom event)
|
|
30840
|
-
* on the target shape or connection.
|
|
30841
|
-
*
|
|
30842
|
-
* @param {string} eventName the name of the triggered DOM event
|
|
30843
|
-
* @param {MouseEvent} event
|
|
30844
|
-
* @param {djs.model.Base} targetElement
|
|
30845
|
-
*/
|
|
30846
|
-
function triggerMouseEvent(eventName, event, targetElement) {
|
|
30847
|
-
|
|
30848
|
-
// i.e. element.mousedown...
|
|
30849
|
-
var localEventName = bindings[eventName];
|
|
30850
|
-
|
|
30851
|
-
if (!localEventName) {
|
|
30852
|
-
throw new Error('unmapped DOM event name <' + eventName + '>');
|
|
30853
|
-
}
|
|
30854
|
-
|
|
30855
|
-
return fire(localEventName, event, targetElement);
|
|
30856
|
-
}
|
|
30857
|
-
|
|
30858
|
-
|
|
30859
|
-
var ELEMENT_SELECTOR = 'svg, .djs-element';
|
|
30860
|
-
|
|
30861
|
-
// event handling ///////
|
|
30862
|
-
|
|
30863
|
-
function registerEvent(node, event, localEvent, ignoredFilter) {
|
|
30864
|
-
|
|
30865
|
-
var handler = handlers[localEvent] = function(event) {
|
|
30866
|
-
fire(localEvent, event);
|
|
30867
|
-
};
|
|
30868
|
-
|
|
30869
|
-
if (ignoredFilter) {
|
|
30870
|
-
ignoredFilters[localEvent] = ignoredFilter;
|
|
30871
|
-
}
|
|
30872
|
-
|
|
30873
|
-
handler.$delegate = delegate.bind(node, ELEMENT_SELECTOR, event, handler);
|
|
30874
|
-
}
|
|
30875
|
-
|
|
30876
|
-
function unregisterEvent(node, event, localEvent) {
|
|
30877
|
-
|
|
30878
|
-
var handler = mouseHandler(localEvent);
|
|
30879
|
-
|
|
30880
|
-
if (!handler) {
|
|
30881
|
-
return;
|
|
30882
|
-
}
|
|
30883
|
-
|
|
30884
|
-
delegate.unbind(node, event, handler.$delegate);
|
|
30885
|
-
}
|
|
30886
|
-
|
|
30887
|
-
function registerEvents(svg) {
|
|
30888
|
-
forEach(bindings, function(val, key) {
|
|
30889
|
-
registerEvent(svg, key, val);
|
|
30890
|
-
});
|
|
30891
|
-
}
|
|
30892
|
-
|
|
30893
|
-
function unregisterEvents(svg) {
|
|
30894
|
-
forEach(bindings, function(val, key) {
|
|
30895
|
-
unregisterEvent(svg, key, val);
|
|
30896
|
-
});
|
|
30897
|
-
}
|
|
30898
|
-
|
|
30899
|
-
eventBus.on('canvas.destroy', function(event) {
|
|
30900
|
-
unregisterEvents(event.svg);
|
|
30901
|
-
});
|
|
30902
|
-
|
|
30903
|
-
eventBus.on('canvas.init', function(event) {
|
|
30904
|
-
registerEvents(event.svg);
|
|
30905
|
-
});
|
|
30906
|
-
|
|
30907
|
-
|
|
30908
|
-
// hit box updating ////////////////
|
|
30909
|
-
|
|
30910
|
-
eventBus.on([ 'shape.added', 'connection.added' ], function(event) {
|
|
30911
|
-
var element = event.element,
|
|
30912
|
-
gfx = event.gfx;
|
|
30913
|
-
|
|
30914
|
-
eventBus.fire('interactionEvents.createHit', { element: element, gfx: gfx });
|
|
30915
|
-
});
|
|
30916
|
-
|
|
30917
|
-
// Update djs-hit on change.
|
|
30918
|
-
// A low priortity is necessary, because djs-hit of labels has to be updated
|
|
30919
|
-
// after the label bounds have been updated in the renderer.
|
|
30920
|
-
eventBus.on([
|
|
30921
|
-
'shape.changed',
|
|
30922
|
-
'connection.changed'
|
|
30923
|
-
], LOW_PRIORITY$6, function(event) {
|
|
30924
|
-
|
|
30925
|
-
var element = event.element,
|
|
30926
|
-
gfx = event.gfx;
|
|
30927
|
-
|
|
30928
|
-
eventBus.fire('interactionEvents.updateHit', { element: element, gfx: gfx });
|
|
30929
|
-
});
|
|
30930
|
-
|
|
30931
|
-
eventBus.on('interactionEvents.createHit', LOW_PRIORITY$6, function(event) {
|
|
30932
|
-
var element = event.element,
|
|
30933
|
-
gfx = event.gfx;
|
|
30934
|
-
|
|
30935
|
-
self.createDefaultHit(element, gfx);
|
|
30936
|
-
});
|
|
30937
|
-
|
|
30938
|
-
eventBus.on('interactionEvents.updateHit', function(event) {
|
|
30939
|
-
var element = event.element,
|
|
30940
|
-
gfx = event.gfx;
|
|
30941
|
-
|
|
30942
|
-
self.updateDefaultHit(element, gfx);
|
|
30943
|
-
});
|
|
30944
|
-
|
|
30945
|
-
|
|
30946
|
-
// hit styles ////////////
|
|
30947
|
-
|
|
30948
|
-
var STROKE_HIT_STYLE = createHitStyle('djs-hit djs-hit-stroke');
|
|
30949
|
-
|
|
30950
|
-
var CLICK_STROKE_HIT_STYLE = createHitStyle('djs-hit djs-hit-click-stroke');
|
|
30951
|
-
|
|
30952
|
-
var ALL_HIT_STYLE = createHitStyle('djs-hit djs-hit-all');
|
|
30953
|
-
|
|
30954
|
-
var HIT_TYPES = {
|
|
30955
|
-
'all': ALL_HIT_STYLE,
|
|
30956
|
-
'click-stroke': CLICK_STROKE_HIT_STYLE,
|
|
30957
|
-
'stroke': STROKE_HIT_STYLE
|
|
30958
|
-
};
|
|
30959
|
-
|
|
30960
|
-
function createHitStyle(classNames, attrs) {
|
|
30961
|
-
|
|
30962
|
-
attrs = assign({
|
|
30963
|
-
stroke: 'white',
|
|
30964
|
-
strokeWidth: 15
|
|
30965
|
-
}, attrs || {});
|
|
30966
|
-
|
|
30967
|
-
return styles.cls(classNames, [ 'no-fill', 'no-border' ], attrs);
|
|
30968
|
-
}
|
|
30969
|
-
|
|
30970
|
-
|
|
30971
|
-
// style helpers ///////////////
|
|
30972
|
-
|
|
30973
|
-
function applyStyle(hit, type) {
|
|
30974
|
-
|
|
30975
|
-
var attrs = HIT_TYPES[type];
|
|
30976
|
-
|
|
30977
|
-
if (!attrs) {
|
|
30978
|
-
throw new Error('invalid hit type <' + type + '>');
|
|
30979
|
-
}
|
|
30980
|
-
|
|
30981
|
-
attr$1(hit, attrs);
|
|
30982
|
-
|
|
30983
|
-
return hit;
|
|
30984
|
-
}
|
|
30985
|
-
|
|
30986
|
-
function appendHit(gfx, hit) {
|
|
30987
|
-
append(gfx, hit);
|
|
30988
|
-
}
|
|
30989
|
-
|
|
30990
|
-
|
|
30991
|
-
// API
|
|
30992
|
-
|
|
30993
|
-
/**
|
|
30994
|
-
* Remove hints on the given graphics.
|
|
30995
|
-
*
|
|
30996
|
-
* @param {SVGElement} gfx
|
|
30997
|
-
*/
|
|
30998
|
-
this.removeHits = function(gfx) {
|
|
30999
|
-
var hits = all('.djs-hit', gfx);
|
|
31000
|
-
|
|
31001
|
-
forEach(hits, remove$1);
|
|
31002
|
-
};
|
|
31003
|
-
|
|
31004
|
-
/**
|
|
31005
|
-
* Create default hit for the given element.
|
|
31006
|
-
*
|
|
31007
|
-
* @param {djs.model.Base} element
|
|
31008
|
-
* @param {SVGElement} gfx
|
|
31009
|
-
*
|
|
31010
|
-
* @return {SVGElement} created hit
|
|
31011
|
-
*/
|
|
31012
|
-
this.createDefaultHit = function(element, gfx) {
|
|
31013
|
-
var waypoints = element.waypoints,
|
|
31014
|
-
isFrame = element.isFrame,
|
|
31015
|
-
boxType;
|
|
31016
|
-
|
|
31017
|
-
if (waypoints) {
|
|
31018
|
-
return this.createWaypointsHit(gfx, waypoints);
|
|
31019
|
-
} else {
|
|
31020
|
-
|
|
31021
|
-
boxType = isFrame ? 'stroke' : 'all';
|
|
31022
|
-
|
|
31023
|
-
return this.createBoxHit(gfx, boxType, {
|
|
31024
|
-
width: element.width,
|
|
31025
|
-
height: element.height
|
|
31026
|
-
});
|
|
31027
|
-
}
|
|
31028
|
-
};
|
|
31029
|
-
|
|
31030
|
-
/**
|
|
31031
|
-
* Create hits for the given waypoints.
|
|
31032
|
-
*
|
|
31033
|
-
* @param {SVGElement} gfx
|
|
31034
|
-
* @param {Array<Point>} waypoints
|
|
31035
|
-
*
|
|
31036
|
-
* @return {SVGElement}
|
|
31037
|
-
*/
|
|
31038
|
-
this.createWaypointsHit = function(gfx, waypoints) {
|
|
31039
|
-
|
|
31040
|
-
var hit = createLine$1(waypoints);
|
|
31041
|
-
|
|
31042
|
-
applyStyle(hit, 'stroke');
|
|
31043
|
-
|
|
31044
|
-
appendHit(gfx, hit);
|
|
31045
|
-
|
|
31046
|
-
return hit;
|
|
31047
|
-
};
|
|
31048
|
-
|
|
31049
|
-
/**
|
|
31050
|
-
* Create hits for a box.
|
|
31051
|
-
*
|
|
31052
|
-
* @param {SVGElement} gfx
|
|
31053
|
-
* @param {string} hitType
|
|
31054
|
-
* @param {Object} attrs
|
|
31055
|
-
*
|
|
31056
|
-
* @return {SVGElement}
|
|
31057
|
-
*/
|
|
31058
|
-
this.createBoxHit = function(gfx, type, attrs) {
|
|
31059
|
-
|
|
31060
|
-
attrs = assign({
|
|
31061
|
-
x: 0,
|
|
31062
|
-
y: 0
|
|
31063
|
-
}, attrs);
|
|
31064
|
-
|
|
31065
|
-
var hit = create('rect');
|
|
31066
|
-
|
|
31067
|
-
applyStyle(hit, type);
|
|
31068
|
-
|
|
31069
|
-
attr$1(hit, attrs);
|
|
31070
|
-
|
|
31071
|
-
appendHit(gfx, hit);
|
|
31072
|
-
|
|
31073
|
-
return hit;
|
|
31074
|
-
};
|
|
31075
|
-
|
|
31076
|
-
/**
|
|
31077
|
-
* Update default hit of the element.
|
|
31078
|
-
*
|
|
31079
|
-
* @param {djs.model.Base} element
|
|
31080
|
-
* @param {SVGElement} gfx
|
|
31081
|
-
*
|
|
31082
|
-
* @return {SVGElement} updated hit
|
|
31083
|
-
*/
|
|
31084
|
-
this.updateDefaultHit = function(element, gfx) {
|
|
31085
|
-
|
|
31086
|
-
var hit = query('.djs-hit', gfx);
|
|
31087
|
-
|
|
31088
|
-
if (!hit) {
|
|
31089
|
-
return;
|
|
31090
|
-
}
|
|
31091
|
-
|
|
31092
|
-
if (element.waypoints) {
|
|
31093
|
-
updateLine$1(hit, element.waypoints);
|
|
31094
|
-
} else {
|
|
31095
|
-
attr$1(hit, {
|
|
31096
|
-
width: element.width,
|
|
31097
|
-
height: element.height
|
|
31098
|
-
});
|
|
31099
|
-
}
|
|
31100
|
-
|
|
31101
|
-
return hit;
|
|
31102
|
-
};
|
|
31103
|
-
|
|
31104
|
-
this.fire = fire;
|
|
31105
|
-
|
|
31106
|
-
this.triggerMouseEvent = triggerMouseEvent;
|
|
31107
|
-
|
|
31108
|
-
this.mouseHandler = mouseHandler;
|
|
31109
|
-
|
|
31110
|
-
this.registerEvent = registerEvent;
|
|
31111
|
-
this.unregisterEvent = unregisterEvent;
|
|
31112
|
-
}
|
|
31113
|
-
|
|
31114
|
-
|
|
31115
|
-
InteractionEvents$1.$inject = [
|
|
31116
|
-
'eventBus',
|
|
31117
|
-
'elementRegistry',
|
|
31118
|
-
'styles'
|
|
31119
|
-
];
|
|
31120
|
-
|
|
31121
|
-
|
|
31122
|
-
/**
|
|
31123
|
-
* An event indicating that the mouse hovered over an element
|
|
31124
|
-
*
|
|
31125
|
-
* @event element.hover
|
|
31126
|
-
*
|
|
31127
|
-
* @type {Object}
|
|
31128
|
-
* @property {djs.model.Base} element
|
|
31129
|
-
* @property {SVGElement} gfx
|
|
31130
|
-
* @property {Event} originalEvent
|
|
31131
|
-
*/
|
|
31132
|
-
|
|
31133
|
-
/**
|
|
31134
|
-
* An event indicating that the mouse has left an element
|
|
31135
|
-
*
|
|
31136
|
-
* @event element.out
|
|
31137
|
-
*
|
|
31138
|
-
* @type {Object}
|
|
31139
|
-
* @property {djs.model.Base} element
|
|
31140
|
-
* @property {SVGElement} gfx
|
|
31141
|
-
* @property {Event} originalEvent
|
|
31142
|
-
*/
|
|
31143
|
-
|
|
31144
|
-
/**
|
|
31145
|
-
* An event indicating that the mouse has clicked an element
|
|
31146
|
-
*
|
|
31147
|
-
* @event element.click
|
|
31148
|
-
*
|
|
31149
|
-
* @type {Object}
|
|
31150
|
-
* @property {djs.model.Base} element
|
|
31151
|
-
* @property {SVGElement} gfx
|
|
31152
|
-
* @property {Event} originalEvent
|
|
31153
|
-
*/
|
|
31154
|
-
|
|
31155
|
-
/**
|
|
31156
|
-
* An event indicating that the mouse has double clicked an element
|
|
31157
|
-
*
|
|
31158
|
-
* @event element.dblclick
|
|
31159
|
-
*
|
|
31160
|
-
* @type {Object}
|
|
31161
|
-
* @property {djs.model.Base} element
|
|
31162
|
-
* @property {SVGElement} gfx
|
|
31163
|
-
* @property {Event} originalEvent
|
|
31164
|
-
*/
|
|
31165
|
-
|
|
31166
|
-
/**
|
|
31167
|
-
* An event indicating that the mouse has gone down on an element.
|
|
31168
|
-
*
|
|
31169
|
-
* @event element.mousedown
|
|
31170
|
-
*
|
|
31171
|
-
* @type {Object}
|
|
31172
|
-
* @property {djs.model.Base} element
|
|
31173
|
-
* @property {SVGElement} gfx
|
|
31174
|
-
* @property {Event} originalEvent
|
|
31175
|
-
*/
|
|
31176
|
-
|
|
31177
|
-
/**
|
|
31178
|
-
* An event indicating that the mouse has gone up on an element.
|
|
31179
|
-
*
|
|
31180
|
-
* @event element.mouseup
|
|
31181
|
-
*
|
|
31182
|
-
* @type {Object}
|
|
31183
|
-
* @property {djs.model.Base} element
|
|
31184
|
-
* @property {SVGElement} gfx
|
|
31185
|
-
* @property {Event} originalEvent
|
|
31186
|
-
*/
|
|
31187
|
-
|
|
31188
|
-
/**
|
|
31189
|
-
* An event indicating that the context menu action is triggered
|
|
31190
|
-
* via mouse or touch controls.
|
|
31191
|
-
*
|
|
31192
|
-
* @event element.contextmenu
|
|
31193
|
-
*
|
|
31194
|
-
* @type {Object}
|
|
31195
|
-
* @property {djs.model.Base} element
|
|
31196
|
-
* @property {SVGElement} gfx
|
|
31197
|
-
* @property {Event} originalEvent
|
|
31198
|
-
*/
|
|
31199
|
-
|
|
31200
|
-
var InteractionEventsModule$1 = {
|
|
31201
|
-
__init__: [ 'interactionEvents' ],
|
|
31202
|
-
interactionEvents: [ 'type', InteractionEvents$1 ]
|
|
31203
|
-
};
|
|
31204
|
-
|
|
31205
30686
|
var min = Math.min,
|
|
31206
30687
|
max$1 = Math.max;
|
|
31207
30688
|
|
|
@@ -31835,7 +31316,7 @@
|
|
|
31835
31316
|
|
|
31836
31317
|
var DirectEditingModule = {
|
|
31837
31318
|
__depends__: [
|
|
31838
|
-
InteractionEventsModule
|
|
31319
|
+
InteractionEventsModule
|
|
31839
31320
|
],
|
|
31840
31321
|
__init__: [ 'directEditing' ],
|
|
31841
31322
|
directEditing: [ 'type', DirectEditing ]
|
|
@@ -32784,7 +32265,7 @@
|
|
|
32784
32265
|
return !!element.labelTarget;
|
|
32785
32266
|
}
|
|
32786
32267
|
|
|
32787
|
-
var LOW_PRIORITY$
|
|
32268
|
+
var LOW_PRIORITY$6 = 750;
|
|
32788
32269
|
|
|
32789
32270
|
|
|
32790
32271
|
function CreatePreview(
|
|
@@ -32829,7 +32310,7 @@
|
|
|
32829
32310
|
return dragGroup;
|
|
32830
32311
|
}
|
|
32831
32312
|
|
|
32832
|
-
eventBus.on('create.move', LOW_PRIORITY$
|
|
32313
|
+
eventBus.on('create.move', LOW_PRIORITY$6, function(event) {
|
|
32833
32314
|
|
|
32834
32315
|
var hover = event.hover,
|
|
32835
32316
|
context = event.context,
|
|
@@ -34176,12 +33657,12 @@
|
|
|
34176
33657
|
});
|
|
34177
33658
|
}
|
|
34178
33659
|
|
|
34179
|
-
var LOW_PRIORITY$
|
|
33660
|
+
var LOW_PRIORITY$7 = 750;
|
|
34180
33661
|
|
|
34181
33662
|
|
|
34182
33663
|
function BpmnCopyPaste(bpmnFactory, eventBus, moddleCopy) {
|
|
34183
33664
|
|
|
34184
|
-
eventBus.on('copyPaste.copyElement', LOW_PRIORITY$
|
|
33665
|
+
eventBus.on('copyPaste.copyElement', LOW_PRIORITY$7, function(context) {
|
|
34185
33666
|
var descriptor = context.descriptor,
|
|
34186
33667
|
element = context.element;
|
|
34187
33668
|
|
|
@@ -34528,9 +34009,9 @@
|
|
|
34528
34009
|
return;
|
|
34529
34010
|
}
|
|
34530
34011
|
|
|
34531
|
-
//
|
|
34532
|
-
if (propertyDescriptor.isId
|
|
34533
|
-
return;
|
|
34012
|
+
// copy id
|
|
34013
|
+
if (propertyDescriptor.isId) {
|
|
34014
|
+
return this._copyId(property, parent);
|
|
34534
34015
|
}
|
|
34535
34016
|
|
|
34536
34017
|
// copy arrays
|
|
@@ -34571,6 +34052,18 @@
|
|
|
34571
34052
|
return property;
|
|
34572
34053
|
};
|
|
34573
34054
|
|
|
34055
|
+
ModdleCopy.prototype._copyId = function(id, element) {
|
|
34056
|
+
|
|
34057
|
+
// disallow if already taken
|
|
34058
|
+
if (this._moddle.ids.assigned(id)) {
|
|
34059
|
+
return;
|
|
34060
|
+
} else {
|
|
34061
|
+
|
|
34062
|
+
this._moddle.ids.claim(id, element);
|
|
34063
|
+
return id;
|
|
34064
|
+
}
|
|
34065
|
+
};
|
|
34066
|
+
|
|
34574
34067
|
// helpers //////////
|
|
34575
34068
|
|
|
34576
34069
|
function getPropertyNames(descriptor, keepDefaultProperties) {
|
|
@@ -37977,7 +37470,7 @@
|
|
|
37977
37470
|
}
|
|
37978
37471
|
|
|
37979
37472
|
var LOWER_PRIORITY = 1200;
|
|
37980
|
-
var LOW_PRIORITY$
|
|
37473
|
+
var LOW_PRIORITY$8 = 800;
|
|
37981
37474
|
|
|
37982
37475
|
/**
|
|
37983
37476
|
* Basic grid snapping that covers connecting, creating, moving, resizing shapes, moving bendpoints
|
|
@@ -37991,7 +37484,7 @@
|
|
|
37991
37484
|
|
|
37992
37485
|
var self = this;
|
|
37993
37486
|
|
|
37994
|
-
eventBus.on('diagram.init', LOW_PRIORITY$
|
|
37487
|
+
eventBus.on('diagram.init', LOW_PRIORITY$8, function() {
|
|
37995
37488
|
self.setActive(active);
|
|
37996
37489
|
});
|
|
37997
37490
|
|
|
@@ -38882,7 +38375,7 @@
|
|
|
38882
38375
|
return true;
|
|
38883
38376
|
};
|
|
38884
38377
|
|
|
38885
|
-
var InteractionEventsModule$
|
|
38378
|
+
var InteractionEventsModule$1 = {
|
|
38886
38379
|
__init__: [ 'bpmnInteractionEvents' ],
|
|
38887
38380
|
bpmnInteractionEvents: [ 'type', BpmnInteractionEvents ]
|
|
38888
38381
|
};
|
|
@@ -39537,7 +39030,7 @@
|
|
|
39537
39030
|
var MARKER_RESIZING = 'djs-resizing',
|
|
39538
39031
|
MARKER_RESIZE_NOT_OK = 'resize-not-ok';
|
|
39539
39032
|
|
|
39540
|
-
var LOW_PRIORITY$
|
|
39033
|
+
var LOW_PRIORITY$9 = 500;
|
|
39541
39034
|
|
|
39542
39035
|
|
|
39543
39036
|
/**
|
|
@@ -39598,7 +39091,7 @@
|
|
|
39598
39091
|
}
|
|
39599
39092
|
|
|
39600
39093
|
// add and update previews
|
|
39601
|
-
eventBus.on('resize.move', LOW_PRIORITY$
|
|
39094
|
+
eventBus.on('resize.move', LOW_PRIORITY$9, function(event) {
|
|
39602
39095
|
updateFrame(event.context);
|
|
39603
39096
|
});
|
|
39604
39097
|
|
|
@@ -40695,7 +40188,7 @@
|
|
|
40695
40188
|
'modeling'
|
|
40696
40189
|
];
|
|
40697
40190
|
|
|
40698
|
-
var LOW_PRIORITY$
|
|
40191
|
+
var LOW_PRIORITY$a = 500;
|
|
40699
40192
|
|
|
40700
40193
|
|
|
40701
40194
|
/**
|
|
@@ -40708,7 +40201,7 @@
|
|
|
40708
40201
|
|
|
40709
40202
|
var self = this;
|
|
40710
40203
|
|
|
40711
|
-
this.postExecuted('elements.create', LOW_PRIORITY$
|
|
40204
|
+
this.postExecuted('elements.create', LOW_PRIORITY$a, function(context) {
|
|
40712
40205
|
var elements = context.elements;
|
|
40713
40206
|
|
|
40714
40207
|
elements = elements.filter(function(shape) {
|
|
@@ -40731,7 +40224,7 @@
|
|
|
40731
40224
|
}, true);
|
|
40732
40225
|
|
|
40733
40226
|
|
|
40734
|
-
this.preExecute('elements.move', LOW_PRIORITY$
|
|
40227
|
+
this.preExecute('elements.move', LOW_PRIORITY$a, function(context) {
|
|
40735
40228
|
var shapes = context.shapes,
|
|
40736
40229
|
host = context.newHost;
|
|
40737
40230
|
|
|
@@ -40857,7 +40350,7 @@
|
|
|
40857
40350
|
|
|
40858
40351
|
inherits_browser(BoundaryEventBehavior, CommandInterceptor);
|
|
40859
40352
|
|
|
40860
|
-
var LOW_PRIORITY$
|
|
40353
|
+
var LOW_PRIORITY$b = 500;
|
|
40861
40354
|
|
|
40862
40355
|
|
|
40863
40356
|
/**
|
|
@@ -40971,7 +40464,7 @@
|
|
|
40971
40464
|
}
|
|
40972
40465
|
});
|
|
40973
40466
|
|
|
40974
|
-
eventBus.on('copyPaste.pasteElement', LOW_PRIORITY$
|
|
40467
|
+
eventBus.on('copyPaste.pasteElement', LOW_PRIORITY$b, function(context) {
|
|
40975
40468
|
var descriptor = context.descriptor,
|
|
40976
40469
|
businessObject = descriptor.businessObject;
|
|
40977
40470
|
|
|
@@ -41794,7 +41287,7 @@
|
|
|
41794
41287
|
}
|
|
41795
41288
|
}
|
|
41796
41289
|
|
|
41797
|
-
var LOW_PRIORITY$
|
|
41290
|
+
var LOW_PRIORITY$c = 500;
|
|
41798
41291
|
|
|
41799
41292
|
|
|
41800
41293
|
/**
|
|
@@ -41863,7 +41356,7 @@
|
|
|
41863
41356
|
/**
|
|
41864
41357
|
* Adjust sizes of other lanes after lane deletion
|
|
41865
41358
|
*/
|
|
41866
|
-
this.postExecuted('shape.delete', LOW_PRIORITY$
|
|
41359
|
+
this.postExecuted('shape.delete', LOW_PRIORITY$c, function(event) {
|
|
41867
41360
|
|
|
41868
41361
|
var context = event.context,
|
|
41869
41362
|
hints = context.hints,
|
|
@@ -41892,7 +41385,7 @@
|
|
|
41892
41385
|
|
|
41893
41386
|
inherits_browser(DeleteLaneBehavior, CommandInterceptor);
|
|
41894
41387
|
|
|
41895
|
-
var LOW_PRIORITY$
|
|
41388
|
+
var LOW_PRIORITY$d = 500;
|
|
41896
41389
|
|
|
41897
41390
|
|
|
41898
41391
|
/**
|
|
@@ -41905,7 +41398,7 @@
|
|
|
41905
41398
|
|
|
41906
41399
|
var self = this;
|
|
41907
41400
|
|
|
41908
|
-
this.postExecuted('elements.create', LOW_PRIORITY$
|
|
41401
|
+
this.postExecuted('elements.create', LOW_PRIORITY$d, function(context) {
|
|
41909
41402
|
var elements = context.elements;
|
|
41910
41403
|
|
|
41911
41404
|
elements.filter(function(shape) {
|
|
@@ -41919,7 +41412,7 @@
|
|
|
41919
41412
|
});
|
|
41920
41413
|
}, true);
|
|
41921
41414
|
|
|
41922
|
-
this.preExecute('elements.move', LOW_PRIORITY$
|
|
41415
|
+
this.preExecute('elements.move', LOW_PRIORITY$d, function(context) {
|
|
41923
41416
|
var shapes = context.shapes,
|
|
41924
41417
|
newHost = context.newHost;
|
|
41925
41418
|
|
|
@@ -43711,7 +43204,7 @@
|
|
|
43711
43204
|
}
|
|
43712
43205
|
|
|
43713
43206
|
function getWaypointsInsideBounds(waypoints, bounds) {
|
|
43714
|
-
var originalWaypoints = map(waypoints, getOriginal$
|
|
43207
|
+
var originalWaypoints = map(waypoints, getOriginal$1);
|
|
43715
43208
|
|
|
43716
43209
|
return filter(originalWaypoints, function(waypoint) {
|
|
43717
43210
|
return isInsideBounds(waypoint, bounds);
|
|
@@ -43728,7 +43221,7 @@
|
|
|
43728
43221
|
return getOrientation(bounds, point, 1) === 'intersect';
|
|
43729
43222
|
}
|
|
43730
43223
|
|
|
43731
|
-
function getOriginal$
|
|
43224
|
+
function getOriginal$1(point) {
|
|
43732
43225
|
return point.original || point;
|
|
43733
43226
|
}
|
|
43734
43227
|
|
|
@@ -44615,7 +44108,7 @@
|
|
|
44615
44108
|
};
|
|
44616
44109
|
}
|
|
44617
44110
|
|
|
44618
|
-
var LOW_PRIORITY$
|
|
44111
|
+
var LOW_PRIORITY$e = 500;
|
|
44619
44112
|
|
|
44620
44113
|
|
|
44621
44114
|
function ToggleElementCollapseBehaviour(
|
|
@@ -44673,7 +44166,7 @@
|
|
|
44673
44166
|
};
|
|
44674
44167
|
}
|
|
44675
44168
|
|
|
44676
|
-
this.executed([ 'shape.toggleCollapse' ], LOW_PRIORITY$
|
|
44169
|
+
this.executed([ 'shape.toggleCollapse' ], LOW_PRIORITY$e, function(e) {
|
|
44677
44170
|
|
|
44678
44171
|
var context = e.context,
|
|
44679
44172
|
shape = context.shape;
|
|
@@ -44696,7 +44189,7 @@
|
|
|
44696
44189
|
}
|
|
44697
44190
|
});
|
|
44698
44191
|
|
|
44699
|
-
this.reverted([ 'shape.toggleCollapse' ], LOW_PRIORITY$
|
|
44192
|
+
this.reverted([ 'shape.toggleCollapse' ], LOW_PRIORITY$e, function(e) {
|
|
44700
44193
|
|
|
44701
44194
|
var context = e.context;
|
|
44702
44195
|
var shape = context.shape;
|
|
@@ -44711,7 +44204,7 @@
|
|
|
44711
44204
|
}
|
|
44712
44205
|
});
|
|
44713
44206
|
|
|
44714
|
-
this.postExecuted([ 'shape.toggleCollapse' ], LOW_PRIORITY$
|
|
44207
|
+
this.postExecuted([ 'shape.toggleCollapse' ], LOW_PRIORITY$e, function(e) {
|
|
44715
44208
|
var shape = e.context.shape,
|
|
44716
44209
|
defaultSize = elementFactory._getDefaultSize(shape),
|
|
44717
44210
|
newBounds;
|
|
@@ -44799,7 +44292,7 @@
|
|
|
44799
44292
|
|
|
44800
44293
|
UnclaimIdBehavior.$inject = [ 'canvas', 'injector', 'moddle', 'modeling' ];
|
|
44801
44294
|
|
|
44802
|
-
var LOW_PRIORITY$
|
|
44295
|
+
var LOW_PRIORITY$f = 500,
|
|
44803
44296
|
HIGH_PRIORITY$c = 5000;
|
|
44804
44297
|
|
|
44805
44298
|
|
|
@@ -44881,7 +44374,7 @@
|
|
|
44881
44374
|
initContext();
|
|
44882
44375
|
});
|
|
44883
44376
|
|
|
44884
|
-
this.postExecuted(laneRefUpdateEvents, LOW_PRIORITY$
|
|
44377
|
+
this.postExecuted(laneRefUpdateEvents, LOW_PRIORITY$f, function(event) {
|
|
44885
44378
|
releaseContext();
|
|
44886
44379
|
});
|
|
44887
44380
|
|
|
@@ -47220,7 +46713,7 @@
|
|
|
47220
46713
|
return collection;
|
|
47221
46714
|
}
|
|
47222
46715
|
|
|
47223
|
-
var LOW_PRIORITY$
|
|
46716
|
+
var LOW_PRIORITY$g = 250,
|
|
47224
46717
|
HIGH_PRIORITY$e = 1400;
|
|
47225
46718
|
|
|
47226
46719
|
|
|
@@ -47251,7 +46744,7 @@
|
|
|
47251
46744
|
});
|
|
47252
46745
|
|
|
47253
46746
|
// add labels to visual's group
|
|
47254
|
-
movePreview && eventBus.on('shape.move.start', LOW_PRIORITY$
|
|
46747
|
+
movePreview && eventBus.on('shape.move.start', LOW_PRIORITY$g, function(e) {
|
|
47255
46748
|
|
|
47256
46749
|
var context = e.context,
|
|
47257
46750
|
shapes = context.shapes;
|
|
@@ -47380,7 +46873,7 @@
|
|
|
47380
46873
|
labelSupport: [ 'type', LabelSupport ]
|
|
47381
46874
|
};
|
|
47382
46875
|
|
|
47383
|
-
var LOW_PRIORITY$
|
|
46876
|
+
var LOW_PRIORITY$h = 251,
|
|
47384
46877
|
HIGH_PRIORITY$f = 1401;
|
|
47385
46878
|
|
|
47386
46879
|
var MARKER_ATTACH$1 = 'attach-ok';
|
|
@@ -47422,7 +46915,7 @@
|
|
|
47422
46915
|
});
|
|
47423
46916
|
|
|
47424
46917
|
// add attachers to the visual's group
|
|
47425
|
-
movePreview && eventBus.on('shape.move.start', LOW_PRIORITY$
|
|
46918
|
+
movePreview && eventBus.on('shape.move.start', LOW_PRIORITY$h, function(e) {
|
|
47426
46919
|
|
|
47427
46920
|
var context = e.context,
|
|
47428
46921
|
shapes = context.shapes,
|
|
@@ -47704,7 +47197,7 @@
|
|
|
47704
47197
|
attachSupport: [ 'type', AttachSupport ]
|
|
47705
47198
|
};
|
|
47706
47199
|
|
|
47707
|
-
var LOW_PRIORITY$
|
|
47200
|
+
var LOW_PRIORITY$i = 250;
|
|
47708
47201
|
|
|
47709
47202
|
/**
|
|
47710
47203
|
* The tool manager acts as middle-man between the available tool's and the Palette,
|
|
@@ -47780,7 +47273,7 @@
|
|
|
47780
47273
|
eventsToRegister.push(event + '.canceled');
|
|
47781
47274
|
});
|
|
47782
47275
|
|
|
47783
|
-
eventBus.on(eventsToRegister, LOW_PRIORITY$
|
|
47276
|
+
eventBus.on(eventsToRegister, LOW_PRIORITY$i, function(event) {
|
|
47784
47277
|
|
|
47785
47278
|
// We defer the de-activation of the tool to the .activate phase,
|
|
47786
47279
|
// so we're able to check if we want to toggle off the current
|
|
@@ -48409,7 +47902,7 @@
|
|
|
48409
47902
|
var MARKER_DRAGGING = 'djs-dragging',
|
|
48410
47903
|
MARKER_RESIZING$1 = 'djs-resizing';
|
|
48411
47904
|
|
|
48412
|
-
var LOW_PRIORITY$
|
|
47905
|
+
var LOW_PRIORITY$j = 250;
|
|
48413
47906
|
|
|
48414
47907
|
var max$6 = Math.max;
|
|
48415
47908
|
|
|
@@ -48484,7 +47977,7 @@
|
|
|
48484
47977
|
});
|
|
48485
47978
|
|
|
48486
47979
|
// add and update move/resize previews
|
|
48487
|
-
eventBus.on('spaceTool.move', LOW_PRIORITY$
|
|
47980
|
+
eventBus.on('spaceTool.move', LOW_PRIORITY$j, function(event) {
|
|
48488
47981
|
|
|
48489
47982
|
var context = event.context,
|
|
48490
47983
|
line = context.line,
|
|
@@ -54614,7 +54107,7 @@
|
|
|
54614
54107
|
connectionDocking: [ 'type', CroppingConnectionDocking ]
|
|
54615
54108
|
};
|
|
54616
54109
|
|
|
54617
|
-
var LOW_PRIORITY$
|
|
54110
|
+
var LOW_PRIORITY$k = 500,
|
|
54618
54111
|
MEDIUM_PRIORITY = 1250,
|
|
54619
54112
|
HIGH_PRIORITY$h = 1500;
|
|
54620
54113
|
|
|
@@ -54713,7 +54206,7 @@
|
|
|
54713
54206
|
// to let others modify the move event before we update
|
|
54714
54207
|
// the context
|
|
54715
54208
|
//
|
|
54716
|
-
eventBus.on('shape.move.move', LOW_PRIORITY$
|
|
54209
|
+
eventBus.on('shape.move.move', LOW_PRIORITY$k, function(event) {
|
|
54717
54210
|
|
|
54718
54211
|
var context = event.context,
|
|
54719
54212
|
validatedShapes = context.validatedShapes,
|
|
@@ -54859,7 +54352,7 @@
|
|
|
54859
54352
|
});
|
|
54860
54353
|
}
|
|
54861
54354
|
|
|
54862
|
-
var LOW_PRIORITY$
|
|
54355
|
+
var LOW_PRIORITY$l = 499;
|
|
54863
54356
|
|
|
54864
54357
|
var MARKER_DRAGGING$1 = 'djs-dragging',
|
|
54865
54358
|
MARKER_OK$3 = 'drop-ok',
|
|
@@ -54937,7 +54430,7 @@
|
|
|
54937
54430
|
// assign a low priority to this handler
|
|
54938
54431
|
// to let others modify the move context before
|
|
54939
54432
|
// we draw things
|
|
54940
|
-
eventBus.on('shape.move.start', LOW_PRIORITY$
|
|
54433
|
+
eventBus.on('shape.move.start', LOW_PRIORITY$l, function(event) {
|
|
54941
54434
|
var context = event.context,
|
|
54942
54435
|
dragShapes = context.shapes,
|
|
54943
54436
|
allDraggedElements = context.allDraggedElements;
|
|
@@ -54984,7 +54477,7 @@
|
|
|
54984
54477
|
});
|
|
54985
54478
|
|
|
54986
54479
|
// update previews
|
|
54987
|
-
eventBus.on('shape.move.move', LOW_PRIORITY$
|
|
54480
|
+
eventBus.on('shape.move.move', LOW_PRIORITY$l, function(event) {
|
|
54988
54481
|
|
|
54989
54482
|
var context = event.context,
|
|
54990
54483
|
dragGroup = context.dragGroup,
|
|
@@ -56326,7 +55819,7 @@
|
|
|
56326
55819
|
paletteProvider: [ 'type', PaletteProvider ]
|
|
56327
55820
|
};
|
|
56328
55821
|
|
|
56329
|
-
var LOW_PRIORITY$
|
|
55822
|
+
var LOW_PRIORITY$m = 250;
|
|
56330
55823
|
|
|
56331
55824
|
|
|
56332
55825
|
function BpmnReplacePreview(
|
|
@@ -56407,7 +55900,7 @@
|
|
|
56407
55900
|
});
|
|
56408
55901
|
}
|
|
56409
55902
|
|
|
56410
|
-
eventBus.on('shape.move.move', LOW_PRIORITY$
|
|
55903
|
+
eventBus.on('shape.move.move', LOW_PRIORITY$m, function(event) {
|
|
56411
55904
|
|
|
56412
55905
|
var context = event.context,
|
|
56413
55906
|
canExecute = context.canExecute;
|
|
@@ -58337,7 +57830,7 @@
|
|
|
58337
57830
|
DistributeElementsModule$1,
|
|
58338
57831
|
EditorActionsModule$1,
|
|
58339
57832
|
GridSnappingModule$1,
|
|
58340
|
-
InteractionEventsModule$
|
|
57833
|
+
InteractionEventsModule$1,
|
|
58341
57834
|
KeyboardModule$1,
|
|
58342
57835
|
KeyboardMoveSelectionModule,
|
|
58343
57836
|
LabelEditingModule,
|
|
@@ -58363,24 +57856,6 @@
|
|
|
58363
57856
|
Modeler.prototype._modelingModules
|
|
58364
57857
|
);
|
|
58365
57858
|
|
|
58366
|
-
/**
|
|
58367
|
-
* SVGs for elements are generated by the {@link GraphicsFactory}.
|
|
58368
|
-
*
|
|
58369
|
-
* This utility gives quick access to the important semantic
|
|
58370
|
-
* parts of an element.
|
|
58371
|
-
*/
|
|
58372
|
-
|
|
58373
|
-
/**
|
|
58374
|
-
* Returns the visual part of a diagram element
|
|
58375
|
-
*
|
|
58376
|
-
* @param {Snap<SVGElement>} gfx
|
|
58377
|
-
*
|
|
58378
|
-
* @return {Snap<SVGElement>}
|
|
58379
|
-
*/
|
|
58380
|
-
function getVisual$1(gfx) {
|
|
58381
|
-
return gfx.childNodes[0];
|
|
58382
|
-
}
|
|
58383
|
-
|
|
58384
57859
|
var MINIMAP_VIEWBOX_PADDING = 50;
|
|
58385
57860
|
|
|
58386
57861
|
var RANGE$1 = { min: 0.2, max: 4 },
|
|
@@ -58388,7 +57863,7 @@
|
|
|
58388
57863
|
|
|
58389
57864
|
var DELTA_THRESHOLD$1 = 0.1;
|
|
58390
57865
|
|
|
58391
|
-
var LOW_PRIORITY$
|
|
57866
|
+
var LOW_PRIORITY$n = 250;
|
|
58392
57867
|
|
|
58393
57868
|
|
|
58394
57869
|
/**
|
|
@@ -58662,7 +58137,7 @@
|
|
|
58662
58137
|
});
|
|
58663
58138
|
|
|
58664
58139
|
// update on elements changed
|
|
58665
|
-
eventBus.on('elements.changed', LOW_PRIORITY$
|
|
58140
|
+
eventBus.on('elements.changed', LOW_PRIORITY$n, function(context) {
|
|
58666
58141
|
var elements = context.elements;
|
|
58667
58142
|
|
|
58668
58143
|
elements.forEach(function(element) {
|
|
@@ -59033,7 +58508,7 @@
|
|
|
59033
58508
|
visual;
|
|
59034
58509
|
|
|
59035
58510
|
if (gfx) {
|
|
59036
|
-
visual = getVisual
|
|
58511
|
+
visual = getVisual(gfx);
|
|
59037
58512
|
|
|
59038
58513
|
if (visual) {
|
|
59039
58514
|
var elementGfx = clone(visual);
|
|
@@ -59634,416 +59109,6 @@
|
|
|
59634
59109
|
]
|
|
59635
59110
|
};
|
|
59636
59111
|
|
|
59637
|
-
var DEFAULT_PRIORITY$6 = 1000;
|
|
59638
|
-
|
|
59639
|
-
/**
|
|
59640
|
-
* A utility that can be used to plug-in into the command execution for
|
|
59641
|
-
* extension and/or validation.
|
|
59642
|
-
*
|
|
59643
|
-
* @param {EventBus} eventBus
|
|
59644
|
-
*
|
|
59645
|
-
* @example
|
|
59646
|
-
*
|
|
59647
|
-
* import inherits from 'inherits';
|
|
59648
|
-
*
|
|
59649
|
-
* import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
|
|
59650
|
-
*
|
|
59651
|
-
* function CommandLogger(eventBus) {
|
|
59652
|
-
* CommandInterceptor.call(this, eventBus);
|
|
59653
|
-
*
|
|
59654
|
-
* this.preExecute(function(event) {
|
|
59655
|
-
* console.log('command pre-execute', event);
|
|
59656
|
-
* });
|
|
59657
|
-
* }
|
|
59658
|
-
*
|
|
59659
|
-
* inherits(CommandLogger, CommandInterceptor);
|
|
59660
|
-
*
|
|
59661
|
-
*/
|
|
59662
|
-
function CommandInterceptor$1(eventBus) {
|
|
59663
|
-
this._eventBus = eventBus;
|
|
59664
|
-
}
|
|
59665
|
-
|
|
59666
|
-
CommandInterceptor$1.$inject = [ 'eventBus' ];
|
|
59667
|
-
|
|
59668
|
-
function unwrapEvent$1(fn, that) {
|
|
59669
|
-
return function(event) {
|
|
59670
|
-
return fn.call(that || null, event.context, event.command, event);
|
|
59671
|
-
};
|
|
59672
|
-
}
|
|
59673
|
-
|
|
59674
|
-
/**
|
|
59675
|
-
* Register an interceptor for a command execution
|
|
59676
|
-
*
|
|
59677
|
-
* @param {string|Array<string>} [events] list of commands to register on
|
|
59678
|
-
* @param {string} [hook] command hook, i.e. preExecute, executed to listen on
|
|
59679
|
-
* @param {number} [priority] the priority on which to hook into the execution
|
|
59680
|
-
* @param {Function} handlerFn interceptor to be invoked with (event)
|
|
59681
|
-
* @param {boolean} unwrap if true, unwrap the event and pass (context, command, event) to the
|
|
59682
|
-
* listener instead
|
|
59683
|
-
* @param {Object} [that] Pass context (`this`) to the handler function
|
|
59684
|
-
*/
|
|
59685
|
-
CommandInterceptor$1.prototype.on = function(events, hook, priority, handlerFn, unwrap, that) {
|
|
59686
|
-
|
|
59687
|
-
if (isFunction(hook) || isNumber(hook)) {
|
|
59688
|
-
that = unwrap;
|
|
59689
|
-
unwrap = handlerFn;
|
|
59690
|
-
handlerFn = priority;
|
|
59691
|
-
priority = hook;
|
|
59692
|
-
hook = null;
|
|
59693
|
-
}
|
|
59694
|
-
|
|
59695
|
-
if (isFunction(priority)) {
|
|
59696
|
-
that = unwrap;
|
|
59697
|
-
unwrap = handlerFn;
|
|
59698
|
-
handlerFn = priority;
|
|
59699
|
-
priority = DEFAULT_PRIORITY$6;
|
|
59700
|
-
}
|
|
59701
|
-
|
|
59702
|
-
if (isObject(unwrap)) {
|
|
59703
|
-
that = unwrap;
|
|
59704
|
-
unwrap = false;
|
|
59705
|
-
}
|
|
59706
|
-
|
|
59707
|
-
if (!isFunction(handlerFn)) {
|
|
59708
|
-
throw new Error('handlerFn must be a function');
|
|
59709
|
-
}
|
|
59710
|
-
|
|
59711
|
-
if (!isArray(events)) {
|
|
59712
|
-
events = [ events ];
|
|
59713
|
-
}
|
|
59714
|
-
|
|
59715
|
-
var eventBus = this._eventBus;
|
|
59716
|
-
|
|
59717
|
-
forEach(events, function(event) {
|
|
59718
|
-
|
|
59719
|
-
// concat commandStack(.event)?(.hook)?
|
|
59720
|
-
var fullEvent = [ 'commandStack', event, hook ].filter(function(e) { return e; }).join('.');
|
|
59721
|
-
|
|
59722
|
-
eventBus.on(fullEvent, priority, unwrap ? unwrapEvent$1(handlerFn, that) : handlerFn, that);
|
|
59723
|
-
});
|
|
59724
|
-
};
|
|
59725
|
-
|
|
59726
|
-
|
|
59727
|
-
var hooks$1 = [
|
|
59728
|
-
'canExecute',
|
|
59729
|
-
'preExecute',
|
|
59730
|
-
'preExecuted',
|
|
59731
|
-
'execute',
|
|
59732
|
-
'executed',
|
|
59733
|
-
'postExecute',
|
|
59734
|
-
'postExecuted',
|
|
59735
|
-
'revert',
|
|
59736
|
-
'reverted'
|
|
59737
|
-
];
|
|
59738
|
-
|
|
59739
|
-
/*
|
|
59740
|
-
* Install hook shortcuts
|
|
59741
|
-
*
|
|
59742
|
-
* This will generate the CommandInterceptor#(preExecute|...|reverted) methods
|
|
59743
|
-
* which will in term forward to CommandInterceptor#on.
|
|
59744
|
-
*/
|
|
59745
|
-
forEach(hooks$1, function(hook) {
|
|
59746
|
-
|
|
59747
|
-
/**
|
|
59748
|
-
* {canExecute|preExecute|preExecuted|execute|executed|postExecute|postExecuted|revert|reverted}
|
|
59749
|
-
*
|
|
59750
|
-
* A named hook for plugging into the command execution
|
|
59751
|
-
*
|
|
59752
|
-
* @param {string|Array<string>} [events] list of commands to register on
|
|
59753
|
-
* @param {number} [priority] the priority on which to hook into the execution
|
|
59754
|
-
* @param {Function} handlerFn interceptor to be invoked with (event)
|
|
59755
|
-
* @param {boolean} [unwrap=false] if true, unwrap the event and pass (context, command, event) to the
|
|
59756
|
-
* listener instead
|
|
59757
|
-
* @param {Object} [that] Pass context (`this`) to the handler function
|
|
59758
|
-
*/
|
|
59759
|
-
CommandInterceptor$1.prototype[hook] = function(events, priority, handlerFn, unwrap, that) {
|
|
59760
|
-
|
|
59761
|
-
if (isFunction(events) || isNumber(events)) {
|
|
59762
|
-
that = unwrap;
|
|
59763
|
-
unwrap = handlerFn;
|
|
59764
|
-
handlerFn = priority;
|
|
59765
|
-
priority = events;
|
|
59766
|
-
events = null;
|
|
59767
|
-
}
|
|
59768
|
-
|
|
59769
|
-
this.on(events, hook, priority, handlerFn, unwrap, that);
|
|
59770
|
-
};
|
|
59771
|
-
});
|
|
59772
|
-
|
|
59773
|
-
/**
|
|
59774
|
-
* Failsafe remove an element from a collection
|
|
59775
|
-
*
|
|
59776
|
-
* @param {Array<Object>} [collection]
|
|
59777
|
-
* @param {Object} [element]
|
|
59778
|
-
*
|
|
59779
|
-
* @return {number} the previous index of the element
|
|
59780
|
-
*/
|
|
59781
|
-
function remove$3(collection, element) {
|
|
59782
|
-
|
|
59783
|
-
if (!collection || !element) {
|
|
59784
|
-
return -1;
|
|
59785
|
-
}
|
|
59786
|
-
|
|
59787
|
-
var idx = collection.indexOf(element);
|
|
59788
|
-
|
|
59789
|
-
if (idx !== -1) {
|
|
59790
|
-
collection.splice(idx, 1);
|
|
59791
|
-
}
|
|
59792
|
-
|
|
59793
|
-
return idx;
|
|
59794
|
-
}
|
|
59795
|
-
|
|
59796
|
-
/**
|
|
59797
|
-
* Fail save add an element to the given connection, ensuring
|
|
59798
|
-
* it does not yet exist.
|
|
59799
|
-
*
|
|
59800
|
-
* @param {Array<Object>} collection
|
|
59801
|
-
* @param {Object} element
|
|
59802
|
-
* @param {number} idx
|
|
59803
|
-
*/
|
|
59804
|
-
function add$2(collection, element, idx) {
|
|
59805
|
-
|
|
59806
|
-
if (!collection || !element) {
|
|
59807
|
-
return;
|
|
59808
|
-
}
|
|
59809
|
-
|
|
59810
|
-
if (typeof idx !== 'number') {
|
|
59811
|
-
idx = -1;
|
|
59812
|
-
}
|
|
59813
|
-
|
|
59814
|
-
var currentIdx = collection.indexOf(element);
|
|
59815
|
-
|
|
59816
|
-
if (currentIdx !== -1) {
|
|
59817
|
-
|
|
59818
|
-
if (currentIdx === idx) {
|
|
59819
|
-
|
|
59820
|
-
// nothing to do, position has not changed
|
|
59821
|
-
return;
|
|
59822
|
-
} else {
|
|
59823
|
-
|
|
59824
|
-
if (idx !== -1) {
|
|
59825
|
-
|
|
59826
|
-
// remove from current position
|
|
59827
|
-
collection.splice(currentIdx, 1);
|
|
59828
|
-
} else {
|
|
59829
|
-
|
|
59830
|
-
// already exists in collection
|
|
59831
|
-
return;
|
|
59832
|
-
}
|
|
59833
|
-
}
|
|
59834
|
-
}
|
|
59835
|
-
|
|
59836
|
-
if (idx !== -1) {
|
|
59837
|
-
|
|
59838
|
-
// insert at specified position
|
|
59839
|
-
collection.splice(idx, 0, element);
|
|
59840
|
-
} else {
|
|
59841
|
-
|
|
59842
|
-
// push to end
|
|
59843
|
-
collection.push(element);
|
|
59844
|
-
}
|
|
59845
|
-
}
|
|
59846
|
-
|
|
59847
|
-
|
|
59848
|
-
/**
|
|
59849
|
-
* Fail save get the index of an element in a collection.
|
|
59850
|
-
*
|
|
59851
|
-
* @param {Array<Object>} collection
|
|
59852
|
-
* @param {Object} element
|
|
59853
|
-
*
|
|
59854
|
-
* @return {number} the index or -1 if collection or element do
|
|
59855
|
-
* not exist or the element is not contained.
|
|
59856
|
-
*/
|
|
59857
|
-
function indexOf$2(collection, element) {
|
|
59858
|
-
|
|
59859
|
-
if (!collection || !element) {
|
|
59860
|
-
return -1;
|
|
59861
|
-
}
|
|
59862
|
-
|
|
59863
|
-
return collection.indexOf(element);
|
|
59864
|
-
}
|
|
59865
|
-
|
|
59866
|
-
var Collections = /*#__PURE__*/Object.freeze({
|
|
59867
|
-
__proto__: null,
|
|
59868
|
-
remove: remove$3,
|
|
59869
|
-
add: add$2,
|
|
59870
|
-
indexOf: indexOf$2
|
|
59871
|
-
});
|
|
59872
|
-
|
|
59873
|
-
/**
|
|
59874
|
-
* Remove from the beginning of a collection until it is empty.
|
|
59875
|
-
*
|
|
59876
|
-
* This is a null-safe operation that ensures elements
|
|
59877
|
-
* are being removed from the given collection until the
|
|
59878
|
-
* collection is empty.
|
|
59879
|
-
*
|
|
59880
|
-
* The implementation deals with the fact that a remove operation
|
|
59881
|
-
* may touch, i.e. remove multiple elements in the collection
|
|
59882
|
-
* at a time.
|
|
59883
|
-
*
|
|
59884
|
-
* @param {Array<Object>} [collection]
|
|
59885
|
-
* @param {Function} removeFn
|
|
59886
|
-
*
|
|
59887
|
-
* @return {Array<Object>} the cleared collection
|
|
59888
|
-
*/
|
|
59889
|
-
function saveClear$1(collection, removeFn) {
|
|
59890
|
-
|
|
59891
|
-
if (typeof removeFn !== 'function') {
|
|
59892
|
-
throw new Error('removeFn iterator must be a function');
|
|
59893
|
-
}
|
|
59894
|
-
|
|
59895
|
-
if (!collection) {
|
|
59896
|
-
return;
|
|
59897
|
-
}
|
|
59898
|
-
|
|
59899
|
-
var e;
|
|
59900
|
-
|
|
59901
|
-
while ((e = collection[0])) {
|
|
59902
|
-
removeFn(e);
|
|
59903
|
-
}
|
|
59904
|
-
|
|
59905
|
-
return collection;
|
|
59906
|
-
}
|
|
59907
|
-
|
|
59908
|
-
/**
|
|
59909
|
-
* Returns the surrounding bbox for all elements in
|
|
59910
|
-
* the array or the element primitive.
|
|
59911
|
-
*
|
|
59912
|
-
* @param {Array<djs.model.Shape>|djs.model.Shape} elements
|
|
59913
|
-
* @param {boolean} stopRecursion
|
|
59914
|
-
*/
|
|
59915
|
-
function getBBox$1(elements, stopRecursion) {
|
|
59916
|
-
|
|
59917
|
-
stopRecursion = !!stopRecursion;
|
|
59918
|
-
if (!isArray(elements)) {
|
|
59919
|
-
elements = [elements];
|
|
59920
|
-
}
|
|
59921
|
-
|
|
59922
|
-
var minX,
|
|
59923
|
-
minY,
|
|
59924
|
-
maxX,
|
|
59925
|
-
maxY;
|
|
59926
|
-
|
|
59927
|
-
forEach(elements, function(element) {
|
|
59928
|
-
|
|
59929
|
-
// If element is a connection the bbox must be computed first
|
|
59930
|
-
var bbox = element;
|
|
59931
|
-
if (element.waypoints && !stopRecursion) {
|
|
59932
|
-
bbox = getBBox$1(element.waypoints, true);
|
|
59933
|
-
}
|
|
59934
|
-
|
|
59935
|
-
var x = bbox.x,
|
|
59936
|
-
y = bbox.y,
|
|
59937
|
-
height = bbox.height || 0,
|
|
59938
|
-
width = bbox.width || 0;
|
|
59939
|
-
|
|
59940
|
-
if (x < minX || minX === undefined) {
|
|
59941
|
-
minX = x;
|
|
59942
|
-
}
|
|
59943
|
-
if (y < minY || minY === undefined) {
|
|
59944
|
-
minY = y;
|
|
59945
|
-
}
|
|
59946
|
-
|
|
59947
|
-
if ((x + width) > maxX || maxX === undefined) {
|
|
59948
|
-
maxX = x + width;
|
|
59949
|
-
}
|
|
59950
|
-
if ((y + height) > maxY || maxY === undefined) {
|
|
59951
|
-
maxY = y + height;
|
|
59952
|
-
}
|
|
59953
|
-
});
|
|
59954
|
-
|
|
59955
|
-
return {
|
|
59956
|
-
x: minX,
|
|
59957
|
-
y: minY,
|
|
59958
|
-
height: maxY - minY,
|
|
59959
|
-
width: maxX - minX
|
|
59960
|
-
};
|
|
59961
|
-
}
|
|
59962
|
-
|
|
59963
|
-
var DEFAULT_CHILD_BOX_PADDING$1 = 20;
|
|
59964
|
-
|
|
59965
|
-
function asPadding$1(mayBePadding, defaultValue) {
|
|
59966
|
-
if (typeof mayBePadding !== 'undefined') {
|
|
59967
|
-
return mayBePadding;
|
|
59968
|
-
} else {
|
|
59969
|
-
return DEFAULT_CHILD_BOX_PADDING$1;
|
|
59970
|
-
}
|
|
59971
|
-
}
|
|
59972
|
-
|
|
59973
|
-
function addPadding$2(bbox, padding) {
|
|
59974
|
-
var left, right, top, bottom;
|
|
59975
|
-
|
|
59976
|
-
if (typeof padding === 'object') {
|
|
59977
|
-
left = asPadding$1(padding.left);
|
|
59978
|
-
right = asPadding$1(padding.right);
|
|
59979
|
-
top = asPadding$1(padding.top);
|
|
59980
|
-
bottom = asPadding$1(padding.bottom);
|
|
59981
|
-
} else {
|
|
59982
|
-
left = right = top = bottom = asPadding$1(padding);
|
|
59983
|
-
}
|
|
59984
|
-
|
|
59985
|
-
return {
|
|
59986
|
-
x: bbox.x - left,
|
|
59987
|
-
y: bbox.y - top,
|
|
59988
|
-
width: bbox.width + left + right,
|
|
59989
|
-
height: bbox.height + top + bottom
|
|
59990
|
-
};
|
|
59991
|
-
}
|
|
59992
|
-
|
|
59993
|
-
|
|
59994
|
-
/**
|
|
59995
|
-
* Is the given element part of the resize
|
|
59996
|
-
* targets min boundary box?
|
|
59997
|
-
*
|
|
59998
|
-
* This is the default implementation which excludes
|
|
59999
|
-
* connections and labels.
|
|
60000
|
-
*
|
|
60001
|
-
* @param {djs.model.Base} element
|
|
60002
|
-
*/
|
|
60003
|
-
function isBBoxChild$1(element) {
|
|
60004
|
-
|
|
60005
|
-
// exclude connections
|
|
60006
|
-
if (element.waypoints) {
|
|
60007
|
-
return false;
|
|
60008
|
-
}
|
|
60009
|
-
|
|
60010
|
-
// exclude labels
|
|
60011
|
-
if (element.type === 'label') {
|
|
60012
|
-
return false;
|
|
60013
|
-
}
|
|
60014
|
-
|
|
60015
|
-
return true;
|
|
60016
|
-
}
|
|
60017
|
-
|
|
60018
|
-
/**
|
|
60019
|
-
* Return children bounding computed from a shapes children
|
|
60020
|
-
* or a list of prefiltered children.
|
|
60021
|
-
*
|
|
60022
|
-
* @param {djs.model.Shape|Array<djs.model.Shape>} shapeOrChildren
|
|
60023
|
-
* @param {number|Object} padding
|
|
60024
|
-
*
|
|
60025
|
-
* @return {Bounds}
|
|
60026
|
-
*/
|
|
60027
|
-
function computeChildrenBBox$1(shapeOrChildren, padding) {
|
|
60028
|
-
|
|
60029
|
-
var elements;
|
|
60030
|
-
|
|
60031
|
-
// compute based on shape
|
|
60032
|
-
if (shapeOrChildren.length === undefined) {
|
|
60033
|
-
|
|
60034
|
-
// grab all the children that are part of the
|
|
60035
|
-
// parents children box
|
|
60036
|
-
elements = filter(shapeOrChildren.children, isBBoxChild$1);
|
|
60037
|
-
|
|
60038
|
-
} else {
|
|
60039
|
-
elements = shapeOrChildren;
|
|
60040
|
-
}
|
|
60041
|
-
|
|
60042
|
-
if (elements.length) {
|
|
60043
|
-
return addPadding$2(getBBox$1(elements), padding);
|
|
60044
|
-
}
|
|
60045
|
-
}
|
|
60046
|
-
|
|
60047
59112
|
/**
|
|
60048
59113
|
* Similar to the bpmn-js/lib/import/Importer we emit
|
|
60049
59114
|
* import life-cycle events:
|
|
@@ -60166,7 +59231,7 @@
|
|
|
60166
59231
|
|
|
60167
59232
|
var visibleElements = filterVisible$1(subProcess.children);
|
|
60168
59233
|
|
|
60169
|
-
var visibleBBox = computeChildrenBBox
|
|
59234
|
+
var visibleBBox = computeChildrenBBox(visibleElements);
|
|
60170
59235
|
|
|
60171
59236
|
var visibleBBoxMid = {
|
|
60172
59237
|
x: visibleBBox.x + visibleBBox.width / 2,
|
|
@@ -60192,7 +59257,7 @@
|
|
|
60192
59257
|
var self = this;
|
|
60193
59258
|
|
|
60194
59259
|
function deleteElements(elements) {
|
|
60195
|
-
saveClear
|
|
59260
|
+
saveClear(elements, function(element) {
|
|
60196
59261
|
deleteElement(element);
|
|
60197
59262
|
});
|
|
60198
59263
|
}
|
|
@@ -60270,12 +59335,12 @@
|
|
|
60270
59335
|
|
|
60271
59336
|
// (1) add to target plane
|
|
60272
59337
|
sourcePlaneElements.forEach(function(sourcePlaneElement) {
|
|
60273
|
-
add$
|
|
59338
|
+
add$1(targetPlaneElements, sourcePlaneElement);
|
|
60274
59339
|
});
|
|
60275
59340
|
|
|
60276
59341
|
// (2) remove from source plane
|
|
60277
59342
|
sourcePlaneElements.slice().forEach(function(sourcePlaneElement) {
|
|
60278
|
-
remove$
|
|
59343
|
+
remove$2(sourceDiagram.plane.planeElement, sourcePlaneElement);
|
|
60279
59344
|
|
|
60280
59345
|
sourcePlaneElement.$parent = targetDiagram.plane;
|
|
60281
59346
|
});
|
|
@@ -60316,7 +59381,7 @@
|
|
|
60316
59381
|
var self = this;
|
|
60317
59382
|
|
|
60318
59383
|
function deleteElements(elements) {
|
|
60319
|
-
saveClear
|
|
59384
|
+
saveClear(elements, function(element) {
|
|
60320
59385
|
deleteElement(element);
|
|
60321
59386
|
});
|
|
60322
59387
|
}
|
|
@@ -60353,7 +59418,7 @@
|
|
|
60353
59418
|
var definitions = this._bpmnjs.getDefinitions(),
|
|
60354
59419
|
diagrams = definitions.diagrams;
|
|
60355
59420
|
|
|
60356
|
-
add$
|
|
59421
|
+
add$1(diagrams, targetDiagram);
|
|
60357
59422
|
}
|
|
60358
59423
|
|
|
60359
59424
|
var sourceDiagram = this.findDiagram(this._canvas.getRootElement().id);
|
|
@@ -60417,7 +59482,7 @@
|
|
|
60417
59482
|
var definitions = this._bpmnjs.getDefinitions(),
|
|
60418
59483
|
diagrams = definitions.diagrams;
|
|
60419
59484
|
|
|
60420
|
-
remove$
|
|
59485
|
+
remove$2(diagrams, subProcessDiagram);
|
|
60421
59486
|
}
|
|
60422
59487
|
|
|
60423
59488
|
// (4) try to import
|
|
@@ -60477,12 +59542,12 @@
|
|
|
60477
59542
|
|
|
60478
59543
|
// (1) add to target plane
|
|
60479
59544
|
sourcePlaneElements.forEach(function(sourcePlaneElement) {
|
|
60480
|
-
add$
|
|
59545
|
+
add$1(targetPlaneElements, sourcePlaneElement);
|
|
60481
59546
|
});
|
|
60482
59547
|
|
|
60483
59548
|
// (2) remove from source plane
|
|
60484
59549
|
sourcePlaneElements.slice().forEach(function(sourcePlaneElement) {
|
|
60485
|
-
remove$
|
|
59550
|
+
remove$2(sourceDiagram.plane.planeElement, sourcePlaneElement);
|
|
60486
59551
|
|
|
60487
59552
|
sourcePlaneElement.$parent = targetDiagram.plane;
|
|
60488
59553
|
});
|
|
@@ -60503,7 +59568,7 @@
|
|
|
60503
59568
|
const HIGH_PRIORITY$k = 2000;
|
|
60504
59569
|
|
|
60505
59570
|
|
|
60506
|
-
class SignavioBehavior extends CommandInterceptor
|
|
59571
|
+
class SignavioBehavior extends CommandInterceptor {
|
|
60507
59572
|
|
|
60508
59573
|
constructor(
|
|
60509
59574
|
bpmnjs, bpmnImporter, canvas,
|
|
@@ -64354,42 +63419,6 @@
|
|
|
64354
63419
|
__init__: [ CommandInitializer ]
|
|
64355
63420
|
};
|
|
64356
63421
|
|
|
64357
|
-
/**
|
|
64358
|
-
* A simple translation stub to be used for multi-language support
|
|
64359
|
-
* in diagrams. Can be easily replaced with a more sophisticated
|
|
64360
|
-
* solution.
|
|
64361
|
-
*
|
|
64362
|
-
* @example
|
|
64363
|
-
*
|
|
64364
|
-
* // use it inside any diagram component by injecting `translate`.
|
|
64365
|
-
*
|
|
64366
|
-
* function MyService(translate) {
|
|
64367
|
-
* alert(translate('HELLO {you}', { you: 'You!' }));
|
|
64368
|
-
* }
|
|
64369
|
-
*
|
|
64370
|
-
* @param {string} template to interpolate
|
|
64371
|
-
* @param {Object} [replacements] a map with substitutes
|
|
64372
|
-
*
|
|
64373
|
-
* @return {string} the translated string
|
|
64374
|
-
*/
|
|
64375
|
-
function translate$3(template, replacements) {
|
|
64376
|
-
|
|
64377
|
-
replacements = replacements || {};
|
|
64378
|
-
|
|
64379
|
-
return template.replace(/{([^}]+)}/g, function(_, key) {
|
|
64380
|
-
return replacements[key] || '{' + key + '}';
|
|
64381
|
-
});
|
|
64382
|
-
}
|
|
64383
|
-
|
|
64384
|
-
var translate$4 = {
|
|
64385
|
-
translate: [ 'value', translate$3 ]
|
|
64386
|
-
};
|
|
64387
|
-
|
|
64388
|
-
var translate$5 = /*#__PURE__*/Object.freeze({
|
|
64389
|
-
__proto__: null,
|
|
64390
|
-
'default': translate$4
|
|
64391
|
-
});
|
|
64392
|
-
|
|
64393
63422
|
var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(index_esm$2);
|
|
64394
63423
|
|
|
64395
63424
|
var require$$2 = /*@__PURE__*/getAugmentedNamespace(index_esm);
|
|
@@ -66698,7 +65727,7 @@
|
|
|
66698
65727
|
var HIDE_CLASS = 'bpp-hidden';
|
|
66699
65728
|
var DEBOUNCE_DELAY = 300;
|
|
66700
65729
|
|
|
66701
|
-
var DEFAULT_PRIORITY$
|
|
65730
|
+
var DEFAULT_PRIORITY$6 = 1000;
|
|
66702
65731
|
|
|
66703
65732
|
function isToggle(node) {
|
|
66704
65733
|
return node.type === 'checkbox' || node.type === 'radio';
|
|
@@ -66926,7 +65955,7 @@
|
|
|
66926
65955
|
|
|
66927
65956
|
if (!provider) {
|
|
66928
65957
|
provider = priority;
|
|
66929
|
-
priority = DEFAULT_PRIORITY$
|
|
65958
|
+
priority = DEFAULT_PRIORITY$6;
|
|
66930
65959
|
}
|
|
66931
65960
|
|
|
66932
65961
|
if (typeof provider.getTabs !== 'function') {
|
|
@@ -68051,7 +67080,7 @@
|
|
|
68051
67080
|
return string.replace(/\r\n|\r|\n/g, '\n');
|
|
68052
67081
|
}
|
|
68053
67082
|
|
|
68054
|
-
var require$$1 = /*@__PURE__*/getAugmentedNamespace(translate$
|
|
67083
|
+
var require$$1 = /*@__PURE__*/getAugmentedNamespace(translate$3);
|
|
68055
67084
|
|
|
68056
67085
|
var lib = {
|
|
68057
67086
|
__depends__: [
|
|
@@ -68064,7 +67093,7 @@
|
|
|
68064
67093
|
|
|
68065
67094
|
var bpmnJsPropertiesPanel = lib;
|
|
68066
67095
|
|
|
68067
|
-
var DEFAULT_PRIORITY$
|
|
67096
|
+
var DEFAULT_PRIORITY$7 = 1000;
|
|
68068
67097
|
|
|
68069
67098
|
|
|
68070
67099
|
/**
|
|
@@ -68085,7 +67114,7 @@
|
|
|
68085
67114
|
function PropertiesActivator(eventBus, priority) {
|
|
68086
67115
|
var self = this;
|
|
68087
67116
|
|
|
68088
|
-
priority = priority || DEFAULT_PRIORITY$
|
|
67117
|
+
priority = priority || DEFAULT_PRIORITY$7;
|
|
68089
67118
|
|
|
68090
67119
|
eventBus.on('propertiesPanel.isEntryVisible', priority, function(context) {
|
|
68091
67120
|
var element = context.element,
|
|
@@ -73048,7 +72077,7 @@
|
|
|
73048
72077
|
function CreateZeebeBoundaryEventBehavior(
|
|
73049
72078
|
eventBus, elementFactory, bpmnFactory) {
|
|
73050
72079
|
|
|
73051
|
-
CommandInterceptor
|
|
72080
|
+
CommandInterceptor.call(this, eventBus);
|
|
73052
72081
|
|
|
73053
72082
|
/**
|
|
73054
72083
|
* replace intermediate catch event with boundary event when
|
|
@@ -73110,7 +72139,7 @@
|
|
|
73110
72139
|
'bpmnFactory'
|
|
73111
72140
|
];
|
|
73112
72141
|
|
|
73113
|
-
inherits_browser(CreateZeebeBoundaryEventBehavior, CommandInterceptor
|
|
72142
|
+
inherits_browser(CreateZeebeBoundaryEventBehavior, CommandInterceptor);
|
|
73114
72143
|
|
|
73115
72144
|
function isZeebeServiceTask(element) {
|
|
73116
72145
|
if (!is$1(element, 'zeebe:ZeebeServiceTask')) return false;
|
|
@@ -73347,7 +72376,7 @@
|
|
|
73347
72376
|
function CreateZeebeCallActivityBehavior(
|
|
73348
72377
|
eventBus, bpmnFactory) {
|
|
73349
72378
|
|
|
73350
|
-
CommandInterceptor
|
|
72379
|
+
CommandInterceptor.call(this, eventBus);
|
|
73351
72380
|
|
|
73352
72381
|
/**
|
|
73353
72382
|
* add a zeebe:calledElement extensionElement with
|
|
@@ -73396,7 +72425,7 @@
|
|
|
73396
72425
|
'bpmnFactory'
|
|
73397
72426
|
];
|
|
73398
72427
|
|
|
73399
|
-
inherits_browser(CreateZeebeCallActivityBehavior, CommandInterceptor
|
|
72428
|
+
inherits_browser(CreateZeebeCallActivityBehavior, CommandInterceptor);
|
|
73400
72429
|
|
|
73401
72430
|
const HIGH_PRIORITY$n = 15000;
|
|
73402
72431
|
|
|
@@ -73411,7 +72440,7 @@
|
|
|
73411
72440
|
function UpdatePropagateAllChildVariablesBehavior(
|
|
73412
72441
|
eventBus) {
|
|
73413
72442
|
|
|
73414
|
-
CommandInterceptor
|
|
72443
|
+
CommandInterceptor.call(this, eventBus);
|
|
73415
72444
|
|
|
73416
72445
|
// Behavior when toggling propagateAllChildVariables /////////////////////////
|
|
73417
72446
|
/**
|
|
@@ -73537,7 +72566,7 @@
|
|
|
73537
72566
|
];
|
|
73538
72567
|
|
|
73539
72568
|
|
|
73540
|
-
inherits_browser(UpdatePropagateAllChildVariablesBehavior, CommandInterceptor
|
|
72569
|
+
inherits_browser(UpdatePropagateAllChildVariablesBehavior, CommandInterceptor);
|
|
73541
72570
|
|
|
73542
72571
|
const USER_TASK_FORM_PREFIX = 'userTaskForm_';
|
|
73543
72572
|
|
|
@@ -73623,7 +72652,7 @@
|
|
|
73623
72652
|
function FormDefinitionBehavior(
|
|
73624
72653
|
eventBus, bpmnFactory) {
|
|
73625
72654
|
|
|
73626
|
-
CommandInterceptor
|
|
72655
|
+
CommandInterceptor.call(this, eventBus);
|
|
73627
72656
|
|
|
73628
72657
|
/**
|
|
73629
72658
|
* ensures a zeebe:userTaskForm is cleaned up when user task got removed
|
|
@@ -73644,7 +72673,7 @@
|
|
|
73644
72673
|
return;
|
|
73645
72674
|
}
|
|
73646
72675
|
|
|
73647
|
-
remove$
|
|
72676
|
+
remove$2(rootExtensionElements.get('values'), userTaskForm);
|
|
73648
72677
|
|
|
73649
72678
|
context.removedUserTaskForm = userTaskForm;
|
|
73650
72679
|
}, true);
|
|
@@ -73663,7 +72692,7 @@
|
|
|
73663
72692
|
return;
|
|
73664
72693
|
}
|
|
73665
72694
|
|
|
73666
|
-
add$
|
|
72695
|
+
add$1(rootExtensionElements.get('values'), removedUserTaskForm);
|
|
73667
72696
|
}, true);
|
|
73668
72697
|
|
|
73669
72698
|
|
|
@@ -73707,7 +72736,7 @@
|
|
|
73707
72736
|
// (2) remove existing form definition
|
|
73708
72737
|
context.oldFormDefinition = oldFormDefinition;
|
|
73709
72738
|
|
|
73710
|
-
remove$
|
|
72739
|
+
remove$2(extensionElements.get('values'), oldFormDefinition);
|
|
73711
72740
|
|
|
73712
72741
|
const formId = createFormId();
|
|
73713
72742
|
|
|
@@ -73720,7 +72749,7 @@
|
|
|
73720
72749
|
bpmnFactory
|
|
73721
72750
|
);
|
|
73722
72751
|
|
|
73723
|
-
add$
|
|
72752
|
+
add$1(extensionElements.get('values'), formDefinition);
|
|
73724
72753
|
|
|
73725
72754
|
// (4) create new user task form
|
|
73726
72755
|
const userTaskForm = createUserTaskForm(
|
|
@@ -73732,7 +72761,7 @@
|
|
|
73732
72761
|
bpmnFactory
|
|
73733
72762
|
);
|
|
73734
72763
|
|
|
73735
|
-
add$
|
|
72764
|
+
add$1(rootExtensionElements.get('values'), userTaskForm);
|
|
73736
72765
|
}, true);
|
|
73737
72766
|
|
|
73738
72767
|
this.revert('shape.create', function(context) {
|
|
@@ -73758,10 +72787,10 @@
|
|
|
73758
72787
|
}
|
|
73759
72788
|
|
|
73760
72789
|
// we need to cover the old form definition to make <redo> possible
|
|
73761
|
-
remove$
|
|
73762
|
-
add$
|
|
72790
|
+
remove$2(extensionElements.get('values'), formDefinition);
|
|
72791
|
+
add$1(extensionElements.get('values'), oldFormDefinition);
|
|
73763
72792
|
|
|
73764
|
-
remove$
|
|
72793
|
+
remove$2(rootExtensionElements.get('values'), userTaskForm);
|
|
73765
72794
|
}, true);
|
|
73766
72795
|
|
|
73767
72796
|
}
|
|
@@ -73771,7 +72800,7 @@
|
|
|
73771
72800
|
'bpmnFactory'
|
|
73772
72801
|
];
|
|
73773
72802
|
|
|
73774
|
-
inherits_browser(FormDefinitionBehavior, CommandInterceptor
|
|
72803
|
+
inherits_browser(FormDefinitionBehavior, CommandInterceptor);
|
|
73775
72804
|
|
|
73776
72805
|
|
|
73777
72806
|
// helpers //////////////
|
|
@@ -73822,11 +72851,11 @@
|
|
|
73822
72851
|
'create.group'
|
|
73823
72852
|
];
|
|
73824
72853
|
|
|
73825
|
-
const LOW_PRIORITY$
|
|
72854
|
+
const LOW_PRIORITY$o = 500;
|
|
73826
72855
|
class PaletteProvider$1 {
|
|
73827
72856
|
|
|
73828
72857
|
constructor(palette) {
|
|
73829
|
-
palette.registerProvider(LOW_PRIORITY$
|
|
72858
|
+
palette.registerProvider(LOW_PRIORITY$o, this);
|
|
73830
72859
|
}
|
|
73831
72860
|
|
|
73832
72861
|
getPaletteEntries(element) {
|
|
@@ -73870,7 +72899,7 @@
|
|
|
73870
72899
|
'lane-insert-below'
|
|
73871
72900
|
];
|
|
73872
72901
|
|
|
73873
|
-
const LOW_PRIORITY$
|
|
72902
|
+
const LOW_PRIORITY$p = 500;
|
|
73874
72903
|
|
|
73875
72904
|
class ContextPadProvider$1 {
|
|
73876
72905
|
|
|
@@ -73882,7 +72911,7 @@
|
|
|
73882
72911
|
contextPadProvider.autoPlace = injector.get('autoPlace', false);
|
|
73883
72912
|
}
|
|
73884
72913
|
|
|
73885
|
-
contextPad.registerProvider(LOW_PRIORITY$
|
|
72914
|
+
contextPad.registerProvider(LOW_PRIORITY$p, this);
|
|
73886
72915
|
}
|
|
73887
72916
|
|
|
73888
72917
|
getContextPadEntries(element) {
|
|
@@ -76101,7 +75130,7 @@
|
|
|
76101
75130
|
|
|
76102
75131
|
var propertiesProviderModule = {
|
|
76103
75132
|
__depends__: [
|
|
76104
|
-
translate$
|
|
75133
|
+
translate$2
|
|
76105
75134
|
],
|
|
76106
75135
|
__init__: [ 'propertiesProvider' ],
|
|
76107
75136
|
propertiesProvider: [ 'type', ZeebePropertiesProvider ]
|