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
|
|
@@ -26857,6 +26869,11 @@
|
|
|
26857
26869
|
};
|
|
26858
26870
|
});
|
|
26859
26871
|
|
|
26872
|
+
var CommandInterceptor$1 = /*#__PURE__*/Object.freeze({
|
|
26873
|
+
__proto__: null,
|
|
26874
|
+
'default': CommandInterceptor
|
|
26875
|
+
});
|
|
26876
|
+
|
|
26860
26877
|
/**
|
|
26861
26878
|
* An auto resize component that takes care of expanding a parent element
|
|
26862
26879
|
* if child elements are created or moved close the parents edge.
|
|
@@ -30671,537 +30688,6 @@
|
|
|
30671
30688
|
connectionPreview: [ 'type', ConnectionPreview ]
|
|
30672
30689
|
};
|
|
30673
30690
|
|
|
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
30691
|
var min = Math.min,
|
|
31206
30692
|
max$1 = Math.max;
|
|
31207
30693
|
|
|
@@ -31835,7 +31321,7 @@
|
|
|
31835
31321
|
|
|
31836
31322
|
var DirectEditingModule = {
|
|
31837
31323
|
__depends__: [
|
|
31838
|
-
InteractionEventsModule
|
|
31324
|
+
InteractionEventsModule
|
|
31839
31325
|
],
|
|
31840
31326
|
__init__: [ 'directEditing' ],
|
|
31841
31327
|
directEditing: [ 'type', DirectEditing ]
|
|
@@ -32784,7 +32270,7 @@
|
|
|
32784
32270
|
return !!element.labelTarget;
|
|
32785
32271
|
}
|
|
32786
32272
|
|
|
32787
|
-
var LOW_PRIORITY$
|
|
32273
|
+
var LOW_PRIORITY$6 = 750;
|
|
32788
32274
|
|
|
32789
32275
|
|
|
32790
32276
|
function CreatePreview(
|
|
@@ -32829,7 +32315,7 @@
|
|
|
32829
32315
|
return dragGroup;
|
|
32830
32316
|
}
|
|
32831
32317
|
|
|
32832
|
-
eventBus.on('create.move', LOW_PRIORITY$
|
|
32318
|
+
eventBus.on('create.move', LOW_PRIORITY$6, function(event) {
|
|
32833
32319
|
|
|
32834
32320
|
var hover = event.hover,
|
|
32835
32321
|
context = event.context,
|
|
@@ -34176,12 +33662,12 @@
|
|
|
34176
33662
|
});
|
|
34177
33663
|
}
|
|
34178
33664
|
|
|
34179
|
-
var LOW_PRIORITY$
|
|
33665
|
+
var LOW_PRIORITY$7 = 750;
|
|
34180
33666
|
|
|
34181
33667
|
|
|
34182
33668
|
function BpmnCopyPaste(bpmnFactory, eventBus, moddleCopy) {
|
|
34183
33669
|
|
|
34184
|
-
eventBus.on('copyPaste.copyElement', LOW_PRIORITY$
|
|
33670
|
+
eventBus.on('copyPaste.copyElement', LOW_PRIORITY$7, function(context) {
|
|
34185
33671
|
var descriptor = context.descriptor,
|
|
34186
33672
|
element = context.element;
|
|
34187
33673
|
|
|
@@ -34528,9 +34014,9 @@
|
|
|
34528
34014
|
return;
|
|
34529
34015
|
}
|
|
34530
34016
|
|
|
34531
|
-
//
|
|
34532
|
-
if (propertyDescriptor.isId
|
|
34533
|
-
return;
|
|
34017
|
+
// copy id
|
|
34018
|
+
if (propertyDescriptor.isId) {
|
|
34019
|
+
return this._copyId(property, parent);
|
|
34534
34020
|
}
|
|
34535
34021
|
|
|
34536
34022
|
// copy arrays
|
|
@@ -34571,6 +34057,18 @@
|
|
|
34571
34057
|
return property;
|
|
34572
34058
|
};
|
|
34573
34059
|
|
|
34060
|
+
ModdleCopy.prototype._copyId = function(id, element) {
|
|
34061
|
+
|
|
34062
|
+
// disallow if already taken
|
|
34063
|
+
if (this._moddle.ids.assigned(id)) {
|
|
34064
|
+
return;
|
|
34065
|
+
} else {
|
|
34066
|
+
|
|
34067
|
+
this._moddle.ids.claim(id, element);
|
|
34068
|
+
return id;
|
|
34069
|
+
}
|
|
34070
|
+
};
|
|
34071
|
+
|
|
34574
34072
|
// helpers //////////
|
|
34575
34073
|
|
|
34576
34074
|
function getPropertyNames(descriptor, keepDefaultProperties) {
|
|
@@ -37977,7 +37475,7 @@
|
|
|
37977
37475
|
}
|
|
37978
37476
|
|
|
37979
37477
|
var LOWER_PRIORITY = 1200;
|
|
37980
|
-
var LOW_PRIORITY$
|
|
37478
|
+
var LOW_PRIORITY$8 = 800;
|
|
37981
37479
|
|
|
37982
37480
|
/**
|
|
37983
37481
|
* Basic grid snapping that covers connecting, creating, moving, resizing shapes, moving bendpoints
|
|
@@ -37991,7 +37489,7 @@
|
|
|
37991
37489
|
|
|
37992
37490
|
var self = this;
|
|
37993
37491
|
|
|
37994
|
-
eventBus.on('diagram.init', LOW_PRIORITY$
|
|
37492
|
+
eventBus.on('diagram.init', LOW_PRIORITY$8, function() {
|
|
37995
37493
|
self.setActive(active);
|
|
37996
37494
|
});
|
|
37997
37495
|
|
|
@@ -38882,7 +38380,7 @@
|
|
|
38882
38380
|
return true;
|
|
38883
38381
|
};
|
|
38884
38382
|
|
|
38885
|
-
var InteractionEventsModule$
|
|
38383
|
+
var InteractionEventsModule$1 = {
|
|
38886
38384
|
__init__: [ 'bpmnInteractionEvents' ],
|
|
38887
38385
|
bpmnInteractionEvents: [ 'type', BpmnInteractionEvents ]
|
|
38888
38386
|
};
|
|
@@ -39537,7 +39035,7 @@
|
|
|
39537
39035
|
var MARKER_RESIZING = 'djs-resizing',
|
|
39538
39036
|
MARKER_RESIZE_NOT_OK = 'resize-not-ok';
|
|
39539
39037
|
|
|
39540
|
-
var LOW_PRIORITY$
|
|
39038
|
+
var LOW_PRIORITY$9 = 500;
|
|
39541
39039
|
|
|
39542
39040
|
|
|
39543
39041
|
/**
|
|
@@ -39598,7 +39096,7 @@
|
|
|
39598
39096
|
}
|
|
39599
39097
|
|
|
39600
39098
|
// add and update previews
|
|
39601
|
-
eventBus.on('resize.move', LOW_PRIORITY$
|
|
39099
|
+
eventBus.on('resize.move', LOW_PRIORITY$9, function(event) {
|
|
39602
39100
|
updateFrame(event.context);
|
|
39603
39101
|
});
|
|
39604
39102
|
|
|
@@ -40695,7 +40193,7 @@
|
|
|
40695
40193
|
'modeling'
|
|
40696
40194
|
];
|
|
40697
40195
|
|
|
40698
|
-
var LOW_PRIORITY$
|
|
40196
|
+
var LOW_PRIORITY$a = 500;
|
|
40699
40197
|
|
|
40700
40198
|
|
|
40701
40199
|
/**
|
|
@@ -40708,7 +40206,7 @@
|
|
|
40708
40206
|
|
|
40709
40207
|
var self = this;
|
|
40710
40208
|
|
|
40711
|
-
this.postExecuted('elements.create', LOW_PRIORITY$
|
|
40209
|
+
this.postExecuted('elements.create', LOW_PRIORITY$a, function(context) {
|
|
40712
40210
|
var elements = context.elements;
|
|
40713
40211
|
|
|
40714
40212
|
elements = elements.filter(function(shape) {
|
|
@@ -40731,7 +40229,7 @@
|
|
|
40731
40229
|
}, true);
|
|
40732
40230
|
|
|
40733
40231
|
|
|
40734
|
-
this.preExecute('elements.move', LOW_PRIORITY$
|
|
40232
|
+
this.preExecute('elements.move', LOW_PRIORITY$a, function(context) {
|
|
40735
40233
|
var shapes = context.shapes,
|
|
40736
40234
|
host = context.newHost;
|
|
40737
40235
|
|
|
@@ -40857,7 +40355,7 @@
|
|
|
40857
40355
|
|
|
40858
40356
|
inherits_browser(BoundaryEventBehavior, CommandInterceptor);
|
|
40859
40357
|
|
|
40860
|
-
var LOW_PRIORITY$
|
|
40358
|
+
var LOW_PRIORITY$b = 500;
|
|
40861
40359
|
|
|
40862
40360
|
|
|
40863
40361
|
/**
|
|
@@ -40971,7 +40469,7 @@
|
|
|
40971
40469
|
}
|
|
40972
40470
|
});
|
|
40973
40471
|
|
|
40974
|
-
eventBus.on('copyPaste.pasteElement', LOW_PRIORITY$
|
|
40472
|
+
eventBus.on('copyPaste.pasteElement', LOW_PRIORITY$b, function(context) {
|
|
40975
40473
|
var descriptor = context.descriptor,
|
|
40976
40474
|
businessObject = descriptor.businessObject;
|
|
40977
40475
|
|
|
@@ -41794,7 +41292,7 @@
|
|
|
41794
41292
|
}
|
|
41795
41293
|
}
|
|
41796
41294
|
|
|
41797
|
-
var LOW_PRIORITY$
|
|
41295
|
+
var LOW_PRIORITY$c = 500;
|
|
41798
41296
|
|
|
41799
41297
|
|
|
41800
41298
|
/**
|
|
@@ -41863,7 +41361,7 @@
|
|
|
41863
41361
|
/**
|
|
41864
41362
|
* Adjust sizes of other lanes after lane deletion
|
|
41865
41363
|
*/
|
|
41866
|
-
this.postExecuted('shape.delete', LOW_PRIORITY$
|
|
41364
|
+
this.postExecuted('shape.delete', LOW_PRIORITY$c, function(event) {
|
|
41867
41365
|
|
|
41868
41366
|
var context = event.context,
|
|
41869
41367
|
hints = context.hints,
|
|
@@ -41892,7 +41390,7 @@
|
|
|
41892
41390
|
|
|
41893
41391
|
inherits_browser(DeleteLaneBehavior, CommandInterceptor);
|
|
41894
41392
|
|
|
41895
|
-
var LOW_PRIORITY$
|
|
41393
|
+
var LOW_PRIORITY$d = 500;
|
|
41896
41394
|
|
|
41897
41395
|
|
|
41898
41396
|
/**
|
|
@@ -41905,7 +41403,7 @@
|
|
|
41905
41403
|
|
|
41906
41404
|
var self = this;
|
|
41907
41405
|
|
|
41908
|
-
this.postExecuted('elements.create', LOW_PRIORITY$
|
|
41406
|
+
this.postExecuted('elements.create', LOW_PRIORITY$d, function(context) {
|
|
41909
41407
|
var elements = context.elements;
|
|
41910
41408
|
|
|
41911
41409
|
elements.filter(function(shape) {
|
|
@@ -41919,7 +41417,7 @@
|
|
|
41919
41417
|
});
|
|
41920
41418
|
}, true);
|
|
41921
41419
|
|
|
41922
|
-
this.preExecute('elements.move', LOW_PRIORITY$
|
|
41420
|
+
this.preExecute('elements.move', LOW_PRIORITY$d, function(context) {
|
|
41923
41421
|
var shapes = context.shapes,
|
|
41924
41422
|
newHost = context.newHost;
|
|
41925
41423
|
|
|
@@ -43711,7 +43209,7 @@
|
|
|
43711
43209
|
}
|
|
43712
43210
|
|
|
43713
43211
|
function getWaypointsInsideBounds(waypoints, bounds) {
|
|
43714
|
-
var originalWaypoints = map(waypoints, getOriginal$
|
|
43212
|
+
var originalWaypoints = map(waypoints, getOriginal$1);
|
|
43715
43213
|
|
|
43716
43214
|
return filter(originalWaypoints, function(waypoint) {
|
|
43717
43215
|
return isInsideBounds(waypoint, bounds);
|
|
@@ -43728,7 +43226,7 @@
|
|
|
43728
43226
|
return getOrientation(bounds, point, 1) === 'intersect';
|
|
43729
43227
|
}
|
|
43730
43228
|
|
|
43731
|
-
function getOriginal$
|
|
43229
|
+
function getOriginal$1(point) {
|
|
43732
43230
|
return point.original || point;
|
|
43733
43231
|
}
|
|
43734
43232
|
|
|
@@ -44615,7 +44113,7 @@
|
|
|
44615
44113
|
};
|
|
44616
44114
|
}
|
|
44617
44115
|
|
|
44618
|
-
var LOW_PRIORITY$
|
|
44116
|
+
var LOW_PRIORITY$e = 500;
|
|
44619
44117
|
|
|
44620
44118
|
|
|
44621
44119
|
function ToggleElementCollapseBehaviour(
|
|
@@ -44673,7 +44171,7 @@
|
|
|
44673
44171
|
};
|
|
44674
44172
|
}
|
|
44675
44173
|
|
|
44676
|
-
this.executed([ 'shape.toggleCollapse' ], LOW_PRIORITY$
|
|
44174
|
+
this.executed([ 'shape.toggleCollapse' ], LOW_PRIORITY$e, function(e) {
|
|
44677
44175
|
|
|
44678
44176
|
var context = e.context,
|
|
44679
44177
|
shape = context.shape;
|
|
@@ -44696,7 +44194,7 @@
|
|
|
44696
44194
|
}
|
|
44697
44195
|
});
|
|
44698
44196
|
|
|
44699
|
-
this.reverted([ 'shape.toggleCollapse' ], LOW_PRIORITY$
|
|
44197
|
+
this.reverted([ 'shape.toggleCollapse' ], LOW_PRIORITY$e, function(e) {
|
|
44700
44198
|
|
|
44701
44199
|
var context = e.context;
|
|
44702
44200
|
var shape = context.shape;
|
|
@@ -44711,7 +44209,7 @@
|
|
|
44711
44209
|
}
|
|
44712
44210
|
});
|
|
44713
44211
|
|
|
44714
|
-
this.postExecuted([ 'shape.toggleCollapse' ], LOW_PRIORITY$
|
|
44212
|
+
this.postExecuted([ 'shape.toggleCollapse' ], LOW_PRIORITY$e, function(e) {
|
|
44715
44213
|
var shape = e.context.shape,
|
|
44716
44214
|
defaultSize = elementFactory._getDefaultSize(shape),
|
|
44717
44215
|
newBounds;
|
|
@@ -44799,7 +44297,7 @@
|
|
|
44799
44297
|
|
|
44800
44298
|
UnclaimIdBehavior.$inject = [ 'canvas', 'injector', 'moddle', 'modeling' ];
|
|
44801
44299
|
|
|
44802
|
-
var LOW_PRIORITY$
|
|
44300
|
+
var LOW_PRIORITY$f = 500,
|
|
44803
44301
|
HIGH_PRIORITY$c = 5000;
|
|
44804
44302
|
|
|
44805
44303
|
|
|
@@ -44881,7 +44379,7 @@
|
|
|
44881
44379
|
initContext();
|
|
44882
44380
|
});
|
|
44883
44381
|
|
|
44884
|
-
this.postExecuted(laneRefUpdateEvents, LOW_PRIORITY$
|
|
44382
|
+
this.postExecuted(laneRefUpdateEvents, LOW_PRIORITY$f, function(event) {
|
|
44885
44383
|
releaseContext();
|
|
44886
44384
|
});
|
|
44887
44385
|
|
|
@@ -47220,7 +46718,7 @@
|
|
|
47220
46718
|
return collection;
|
|
47221
46719
|
}
|
|
47222
46720
|
|
|
47223
|
-
var LOW_PRIORITY$
|
|
46721
|
+
var LOW_PRIORITY$g = 250,
|
|
47224
46722
|
HIGH_PRIORITY$e = 1400;
|
|
47225
46723
|
|
|
47226
46724
|
|
|
@@ -47251,7 +46749,7 @@
|
|
|
47251
46749
|
});
|
|
47252
46750
|
|
|
47253
46751
|
// add labels to visual's group
|
|
47254
|
-
movePreview && eventBus.on('shape.move.start', LOW_PRIORITY$
|
|
46752
|
+
movePreview && eventBus.on('shape.move.start', LOW_PRIORITY$g, function(e) {
|
|
47255
46753
|
|
|
47256
46754
|
var context = e.context,
|
|
47257
46755
|
shapes = context.shapes;
|
|
@@ -47380,7 +46878,7 @@
|
|
|
47380
46878
|
labelSupport: [ 'type', LabelSupport ]
|
|
47381
46879
|
};
|
|
47382
46880
|
|
|
47383
|
-
var LOW_PRIORITY$
|
|
46881
|
+
var LOW_PRIORITY$h = 251,
|
|
47384
46882
|
HIGH_PRIORITY$f = 1401;
|
|
47385
46883
|
|
|
47386
46884
|
var MARKER_ATTACH$1 = 'attach-ok';
|
|
@@ -47422,7 +46920,7 @@
|
|
|
47422
46920
|
});
|
|
47423
46921
|
|
|
47424
46922
|
// add attachers to the visual's group
|
|
47425
|
-
movePreview && eventBus.on('shape.move.start', LOW_PRIORITY$
|
|
46923
|
+
movePreview && eventBus.on('shape.move.start', LOW_PRIORITY$h, function(e) {
|
|
47426
46924
|
|
|
47427
46925
|
var context = e.context,
|
|
47428
46926
|
shapes = context.shapes,
|
|
@@ -47704,7 +47202,7 @@
|
|
|
47704
47202
|
attachSupport: [ 'type', AttachSupport ]
|
|
47705
47203
|
};
|
|
47706
47204
|
|
|
47707
|
-
var LOW_PRIORITY$
|
|
47205
|
+
var LOW_PRIORITY$i = 250;
|
|
47708
47206
|
|
|
47709
47207
|
/**
|
|
47710
47208
|
* The tool manager acts as middle-man between the available tool's and the Palette,
|
|
@@ -47780,7 +47278,7 @@
|
|
|
47780
47278
|
eventsToRegister.push(event + '.canceled');
|
|
47781
47279
|
});
|
|
47782
47280
|
|
|
47783
|
-
eventBus.on(eventsToRegister, LOW_PRIORITY$
|
|
47281
|
+
eventBus.on(eventsToRegister, LOW_PRIORITY$i, function(event) {
|
|
47784
47282
|
|
|
47785
47283
|
// We defer the de-activation of the tool to the .activate phase,
|
|
47786
47284
|
// so we're able to check if we want to toggle off the current
|
|
@@ -48409,7 +47907,7 @@
|
|
|
48409
47907
|
var MARKER_DRAGGING = 'djs-dragging',
|
|
48410
47908
|
MARKER_RESIZING$1 = 'djs-resizing';
|
|
48411
47909
|
|
|
48412
|
-
var LOW_PRIORITY$
|
|
47910
|
+
var LOW_PRIORITY$j = 250;
|
|
48413
47911
|
|
|
48414
47912
|
var max$6 = Math.max;
|
|
48415
47913
|
|
|
@@ -48484,7 +47982,7 @@
|
|
|
48484
47982
|
});
|
|
48485
47983
|
|
|
48486
47984
|
// add and update move/resize previews
|
|
48487
|
-
eventBus.on('spaceTool.move', LOW_PRIORITY$
|
|
47985
|
+
eventBus.on('spaceTool.move', LOW_PRIORITY$j, function(event) {
|
|
48488
47986
|
|
|
48489
47987
|
var context = event.context,
|
|
48490
47988
|
line = context.line,
|
|
@@ -54614,7 +54112,7 @@
|
|
|
54614
54112
|
connectionDocking: [ 'type', CroppingConnectionDocking ]
|
|
54615
54113
|
};
|
|
54616
54114
|
|
|
54617
|
-
var LOW_PRIORITY$
|
|
54115
|
+
var LOW_PRIORITY$k = 500,
|
|
54618
54116
|
MEDIUM_PRIORITY = 1250,
|
|
54619
54117
|
HIGH_PRIORITY$h = 1500;
|
|
54620
54118
|
|
|
@@ -54713,7 +54211,7 @@
|
|
|
54713
54211
|
// to let others modify the move event before we update
|
|
54714
54212
|
// the context
|
|
54715
54213
|
//
|
|
54716
|
-
eventBus.on('shape.move.move', LOW_PRIORITY$
|
|
54214
|
+
eventBus.on('shape.move.move', LOW_PRIORITY$k, function(event) {
|
|
54717
54215
|
|
|
54718
54216
|
var context = event.context,
|
|
54719
54217
|
validatedShapes = context.validatedShapes,
|
|
@@ -54859,7 +54357,7 @@
|
|
|
54859
54357
|
});
|
|
54860
54358
|
}
|
|
54861
54359
|
|
|
54862
|
-
var LOW_PRIORITY$
|
|
54360
|
+
var LOW_PRIORITY$l = 499;
|
|
54863
54361
|
|
|
54864
54362
|
var MARKER_DRAGGING$1 = 'djs-dragging',
|
|
54865
54363
|
MARKER_OK$3 = 'drop-ok',
|
|
@@ -54937,7 +54435,7 @@
|
|
|
54937
54435
|
// assign a low priority to this handler
|
|
54938
54436
|
// to let others modify the move context before
|
|
54939
54437
|
// we draw things
|
|
54940
|
-
eventBus.on('shape.move.start', LOW_PRIORITY$
|
|
54438
|
+
eventBus.on('shape.move.start', LOW_PRIORITY$l, function(event) {
|
|
54941
54439
|
var context = event.context,
|
|
54942
54440
|
dragShapes = context.shapes,
|
|
54943
54441
|
allDraggedElements = context.allDraggedElements;
|
|
@@ -54984,7 +54482,7 @@
|
|
|
54984
54482
|
});
|
|
54985
54483
|
|
|
54986
54484
|
// update previews
|
|
54987
|
-
eventBus.on('shape.move.move', LOW_PRIORITY$
|
|
54485
|
+
eventBus.on('shape.move.move', LOW_PRIORITY$l, function(event) {
|
|
54988
54486
|
|
|
54989
54487
|
var context = event.context,
|
|
54990
54488
|
dragGroup = context.dragGroup,
|
|
@@ -56326,7 +55824,7 @@
|
|
|
56326
55824
|
paletteProvider: [ 'type', PaletteProvider ]
|
|
56327
55825
|
};
|
|
56328
55826
|
|
|
56329
|
-
var LOW_PRIORITY$
|
|
55827
|
+
var LOW_PRIORITY$m = 250;
|
|
56330
55828
|
|
|
56331
55829
|
|
|
56332
55830
|
function BpmnReplacePreview(
|
|
@@ -56407,7 +55905,7 @@
|
|
|
56407
55905
|
});
|
|
56408
55906
|
}
|
|
56409
55907
|
|
|
56410
|
-
eventBus.on('shape.move.move', LOW_PRIORITY$
|
|
55908
|
+
eventBus.on('shape.move.move', LOW_PRIORITY$m, function(event) {
|
|
56411
55909
|
|
|
56412
55910
|
var context = event.context,
|
|
56413
55911
|
canExecute = context.canExecute;
|
|
@@ -58337,7 +57835,7 @@
|
|
|
58337
57835
|
DistributeElementsModule$1,
|
|
58338
57836
|
EditorActionsModule$1,
|
|
58339
57837
|
GridSnappingModule$1,
|
|
58340
|
-
InteractionEventsModule$
|
|
57838
|
+
InteractionEventsModule$1,
|
|
58341
57839
|
KeyboardModule$1,
|
|
58342
57840
|
KeyboardMoveSelectionModule,
|
|
58343
57841
|
LabelEditingModule,
|
|
@@ -58363,24 +57861,6 @@
|
|
|
58363
57861
|
Modeler.prototype._modelingModules
|
|
58364
57862
|
);
|
|
58365
57863
|
|
|
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
57864
|
var MINIMAP_VIEWBOX_PADDING = 50;
|
|
58385
57865
|
|
|
58386
57866
|
var RANGE$1 = { min: 0.2, max: 4 },
|
|
@@ -58388,7 +57868,7 @@
|
|
|
58388
57868
|
|
|
58389
57869
|
var DELTA_THRESHOLD$1 = 0.1;
|
|
58390
57870
|
|
|
58391
|
-
var LOW_PRIORITY$
|
|
57871
|
+
var LOW_PRIORITY$n = 250;
|
|
58392
57872
|
|
|
58393
57873
|
|
|
58394
57874
|
/**
|
|
@@ -58662,7 +58142,7 @@
|
|
|
58662
58142
|
});
|
|
58663
58143
|
|
|
58664
58144
|
// update on elements changed
|
|
58665
|
-
eventBus.on('elements.changed', LOW_PRIORITY$
|
|
58145
|
+
eventBus.on('elements.changed', LOW_PRIORITY$n, function(context) {
|
|
58666
58146
|
var elements = context.elements;
|
|
58667
58147
|
|
|
58668
58148
|
elements.forEach(function(element) {
|
|
@@ -59033,7 +58513,7 @@
|
|
|
59033
58513
|
visual;
|
|
59034
58514
|
|
|
59035
58515
|
if (gfx) {
|
|
59036
|
-
visual = getVisual
|
|
58516
|
+
visual = getVisual(gfx);
|
|
59037
58517
|
|
|
59038
58518
|
if (visual) {
|
|
59039
58519
|
var elementGfx = clone(visual);
|
|
@@ -59634,421 +59114,6 @@
|
|
|
59634
59114
|
]
|
|
59635
59115
|
};
|
|
59636
59116
|
|
|
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
|
-
var CommandInterceptor$2 = /*#__PURE__*/Object.freeze({
|
|
59774
|
-
__proto__: null,
|
|
59775
|
-
'default': CommandInterceptor$1
|
|
59776
|
-
});
|
|
59777
|
-
|
|
59778
|
-
/**
|
|
59779
|
-
* Failsafe remove an element from a collection
|
|
59780
|
-
*
|
|
59781
|
-
* @param {Array<Object>} [collection]
|
|
59782
|
-
* @param {Object} [element]
|
|
59783
|
-
*
|
|
59784
|
-
* @return {number} the previous index of the element
|
|
59785
|
-
*/
|
|
59786
|
-
function remove$3(collection, element) {
|
|
59787
|
-
|
|
59788
|
-
if (!collection || !element) {
|
|
59789
|
-
return -1;
|
|
59790
|
-
}
|
|
59791
|
-
|
|
59792
|
-
var idx = collection.indexOf(element);
|
|
59793
|
-
|
|
59794
|
-
if (idx !== -1) {
|
|
59795
|
-
collection.splice(idx, 1);
|
|
59796
|
-
}
|
|
59797
|
-
|
|
59798
|
-
return idx;
|
|
59799
|
-
}
|
|
59800
|
-
|
|
59801
|
-
/**
|
|
59802
|
-
* Fail save add an element to the given connection, ensuring
|
|
59803
|
-
* it does not yet exist.
|
|
59804
|
-
*
|
|
59805
|
-
* @param {Array<Object>} collection
|
|
59806
|
-
* @param {Object} element
|
|
59807
|
-
* @param {number} idx
|
|
59808
|
-
*/
|
|
59809
|
-
function add$2(collection, element, idx) {
|
|
59810
|
-
|
|
59811
|
-
if (!collection || !element) {
|
|
59812
|
-
return;
|
|
59813
|
-
}
|
|
59814
|
-
|
|
59815
|
-
if (typeof idx !== 'number') {
|
|
59816
|
-
idx = -1;
|
|
59817
|
-
}
|
|
59818
|
-
|
|
59819
|
-
var currentIdx = collection.indexOf(element);
|
|
59820
|
-
|
|
59821
|
-
if (currentIdx !== -1) {
|
|
59822
|
-
|
|
59823
|
-
if (currentIdx === idx) {
|
|
59824
|
-
|
|
59825
|
-
// nothing to do, position has not changed
|
|
59826
|
-
return;
|
|
59827
|
-
} else {
|
|
59828
|
-
|
|
59829
|
-
if (idx !== -1) {
|
|
59830
|
-
|
|
59831
|
-
// remove from current position
|
|
59832
|
-
collection.splice(currentIdx, 1);
|
|
59833
|
-
} else {
|
|
59834
|
-
|
|
59835
|
-
// already exists in collection
|
|
59836
|
-
return;
|
|
59837
|
-
}
|
|
59838
|
-
}
|
|
59839
|
-
}
|
|
59840
|
-
|
|
59841
|
-
if (idx !== -1) {
|
|
59842
|
-
|
|
59843
|
-
// insert at specified position
|
|
59844
|
-
collection.splice(idx, 0, element);
|
|
59845
|
-
} else {
|
|
59846
|
-
|
|
59847
|
-
// push to end
|
|
59848
|
-
collection.push(element);
|
|
59849
|
-
}
|
|
59850
|
-
}
|
|
59851
|
-
|
|
59852
|
-
|
|
59853
|
-
/**
|
|
59854
|
-
* Fail save get the index of an element in a collection.
|
|
59855
|
-
*
|
|
59856
|
-
* @param {Array<Object>} collection
|
|
59857
|
-
* @param {Object} element
|
|
59858
|
-
*
|
|
59859
|
-
* @return {number} the index or -1 if collection or element do
|
|
59860
|
-
* not exist or the element is not contained.
|
|
59861
|
-
*/
|
|
59862
|
-
function indexOf$2(collection, element) {
|
|
59863
|
-
|
|
59864
|
-
if (!collection || !element) {
|
|
59865
|
-
return -1;
|
|
59866
|
-
}
|
|
59867
|
-
|
|
59868
|
-
return collection.indexOf(element);
|
|
59869
|
-
}
|
|
59870
|
-
|
|
59871
|
-
var Collections = /*#__PURE__*/Object.freeze({
|
|
59872
|
-
__proto__: null,
|
|
59873
|
-
remove: remove$3,
|
|
59874
|
-
add: add$2,
|
|
59875
|
-
indexOf: indexOf$2
|
|
59876
|
-
});
|
|
59877
|
-
|
|
59878
|
-
/**
|
|
59879
|
-
* Remove from the beginning of a collection until it is empty.
|
|
59880
|
-
*
|
|
59881
|
-
* This is a null-safe operation that ensures elements
|
|
59882
|
-
* are being removed from the given collection until the
|
|
59883
|
-
* collection is empty.
|
|
59884
|
-
*
|
|
59885
|
-
* The implementation deals with the fact that a remove operation
|
|
59886
|
-
* may touch, i.e. remove multiple elements in the collection
|
|
59887
|
-
* at a time.
|
|
59888
|
-
*
|
|
59889
|
-
* @param {Array<Object>} [collection]
|
|
59890
|
-
* @param {Function} removeFn
|
|
59891
|
-
*
|
|
59892
|
-
* @return {Array<Object>} the cleared collection
|
|
59893
|
-
*/
|
|
59894
|
-
function saveClear$1(collection, removeFn) {
|
|
59895
|
-
|
|
59896
|
-
if (typeof removeFn !== 'function') {
|
|
59897
|
-
throw new Error('removeFn iterator must be a function');
|
|
59898
|
-
}
|
|
59899
|
-
|
|
59900
|
-
if (!collection) {
|
|
59901
|
-
return;
|
|
59902
|
-
}
|
|
59903
|
-
|
|
59904
|
-
var e;
|
|
59905
|
-
|
|
59906
|
-
while ((e = collection[0])) {
|
|
59907
|
-
removeFn(e);
|
|
59908
|
-
}
|
|
59909
|
-
|
|
59910
|
-
return collection;
|
|
59911
|
-
}
|
|
59912
|
-
|
|
59913
|
-
/**
|
|
59914
|
-
* Returns the surrounding bbox for all elements in
|
|
59915
|
-
* the array or the element primitive.
|
|
59916
|
-
*
|
|
59917
|
-
* @param {Array<djs.model.Shape>|djs.model.Shape} elements
|
|
59918
|
-
* @param {boolean} stopRecursion
|
|
59919
|
-
*/
|
|
59920
|
-
function getBBox$1(elements, stopRecursion) {
|
|
59921
|
-
|
|
59922
|
-
stopRecursion = !!stopRecursion;
|
|
59923
|
-
if (!isArray(elements)) {
|
|
59924
|
-
elements = [elements];
|
|
59925
|
-
}
|
|
59926
|
-
|
|
59927
|
-
var minX,
|
|
59928
|
-
minY,
|
|
59929
|
-
maxX,
|
|
59930
|
-
maxY;
|
|
59931
|
-
|
|
59932
|
-
forEach(elements, function(element) {
|
|
59933
|
-
|
|
59934
|
-
// If element is a connection the bbox must be computed first
|
|
59935
|
-
var bbox = element;
|
|
59936
|
-
if (element.waypoints && !stopRecursion) {
|
|
59937
|
-
bbox = getBBox$1(element.waypoints, true);
|
|
59938
|
-
}
|
|
59939
|
-
|
|
59940
|
-
var x = bbox.x,
|
|
59941
|
-
y = bbox.y,
|
|
59942
|
-
height = bbox.height || 0,
|
|
59943
|
-
width = bbox.width || 0;
|
|
59944
|
-
|
|
59945
|
-
if (x < minX || minX === undefined) {
|
|
59946
|
-
minX = x;
|
|
59947
|
-
}
|
|
59948
|
-
if (y < minY || minY === undefined) {
|
|
59949
|
-
minY = y;
|
|
59950
|
-
}
|
|
59951
|
-
|
|
59952
|
-
if ((x + width) > maxX || maxX === undefined) {
|
|
59953
|
-
maxX = x + width;
|
|
59954
|
-
}
|
|
59955
|
-
if ((y + height) > maxY || maxY === undefined) {
|
|
59956
|
-
maxY = y + height;
|
|
59957
|
-
}
|
|
59958
|
-
});
|
|
59959
|
-
|
|
59960
|
-
return {
|
|
59961
|
-
x: minX,
|
|
59962
|
-
y: minY,
|
|
59963
|
-
height: maxY - minY,
|
|
59964
|
-
width: maxX - minX
|
|
59965
|
-
};
|
|
59966
|
-
}
|
|
59967
|
-
|
|
59968
|
-
var DEFAULT_CHILD_BOX_PADDING$1 = 20;
|
|
59969
|
-
|
|
59970
|
-
function asPadding$1(mayBePadding, defaultValue) {
|
|
59971
|
-
if (typeof mayBePadding !== 'undefined') {
|
|
59972
|
-
return mayBePadding;
|
|
59973
|
-
} else {
|
|
59974
|
-
return DEFAULT_CHILD_BOX_PADDING$1;
|
|
59975
|
-
}
|
|
59976
|
-
}
|
|
59977
|
-
|
|
59978
|
-
function addPadding$2(bbox, padding) {
|
|
59979
|
-
var left, right, top, bottom;
|
|
59980
|
-
|
|
59981
|
-
if (typeof padding === 'object') {
|
|
59982
|
-
left = asPadding$1(padding.left);
|
|
59983
|
-
right = asPadding$1(padding.right);
|
|
59984
|
-
top = asPadding$1(padding.top);
|
|
59985
|
-
bottom = asPadding$1(padding.bottom);
|
|
59986
|
-
} else {
|
|
59987
|
-
left = right = top = bottom = asPadding$1(padding);
|
|
59988
|
-
}
|
|
59989
|
-
|
|
59990
|
-
return {
|
|
59991
|
-
x: bbox.x - left,
|
|
59992
|
-
y: bbox.y - top,
|
|
59993
|
-
width: bbox.width + left + right,
|
|
59994
|
-
height: bbox.height + top + bottom
|
|
59995
|
-
};
|
|
59996
|
-
}
|
|
59997
|
-
|
|
59998
|
-
|
|
59999
|
-
/**
|
|
60000
|
-
* Is the given element part of the resize
|
|
60001
|
-
* targets min boundary box?
|
|
60002
|
-
*
|
|
60003
|
-
* This is the default implementation which excludes
|
|
60004
|
-
* connections and labels.
|
|
60005
|
-
*
|
|
60006
|
-
* @param {djs.model.Base} element
|
|
60007
|
-
*/
|
|
60008
|
-
function isBBoxChild$1(element) {
|
|
60009
|
-
|
|
60010
|
-
// exclude connections
|
|
60011
|
-
if (element.waypoints) {
|
|
60012
|
-
return false;
|
|
60013
|
-
}
|
|
60014
|
-
|
|
60015
|
-
// exclude labels
|
|
60016
|
-
if (element.type === 'label') {
|
|
60017
|
-
return false;
|
|
60018
|
-
}
|
|
60019
|
-
|
|
60020
|
-
return true;
|
|
60021
|
-
}
|
|
60022
|
-
|
|
60023
|
-
/**
|
|
60024
|
-
* Return children bounding computed from a shapes children
|
|
60025
|
-
* or a list of prefiltered children.
|
|
60026
|
-
*
|
|
60027
|
-
* @param {djs.model.Shape|Array<djs.model.Shape>} shapeOrChildren
|
|
60028
|
-
* @param {number|Object} padding
|
|
60029
|
-
*
|
|
60030
|
-
* @return {Bounds}
|
|
60031
|
-
*/
|
|
60032
|
-
function computeChildrenBBox$1(shapeOrChildren, padding) {
|
|
60033
|
-
|
|
60034
|
-
var elements;
|
|
60035
|
-
|
|
60036
|
-
// compute based on shape
|
|
60037
|
-
if (shapeOrChildren.length === undefined) {
|
|
60038
|
-
|
|
60039
|
-
// grab all the children that are part of the
|
|
60040
|
-
// parents children box
|
|
60041
|
-
elements = filter(shapeOrChildren.children, isBBoxChild$1);
|
|
60042
|
-
|
|
60043
|
-
} else {
|
|
60044
|
-
elements = shapeOrChildren;
|
|
60045
|
-
}
|
|
60046
|
-
|
|
60047
|
-
if (elements.length) {
|
|
60048
|
-
return addPadding$2(getBBox$1(elements), padding);
|
|
60049
|
-
}
|
|
60050
|
-
}
|
|
60051
|
-
|
|
60052
59117
|
/**
|
|
60053
59118
|
* Similar to the bpmn-js/lib/import/Importer we emit
|
|
60054
59119
|
* import life-cycle events:
|
|
@@ -60171,7 +59236,7 @@
|
|
|
60171
59236
|
|
|
60172
59237
|
var visibleElements = filterVisible$1(subProcess.children);
|
|
60173
59238
|
|
|
60174
|
-
var visibleBBox = computeChildrenBBox
|
|
59239
|
+
var visibleBBox = computeChildrenBBox(visibleElements);
|
|
60175
59240
|
|
|
60176
59241
|
var visibleBBoxMid = {
|
|
60177
59242
|
x: visibleBBox.x + visibleBBox.width / 2,
|
|
@@ -60197,7 +59262,7 @@
|
|
|
60197
59262
|
var self = this;
|
|
60198
59263
|
|
|
60199
59264
|
function deleteElements(elements) {
|
|
60200
|
-
saveClear
|
|
59265
|
+
saveClear(elements, function(element) {
|
|
60201
59266
|
deleteElement(element);
|
|
60202
59267
|
});
|
|
60203
59268
|
}
|
|
@@ -60275,12 +59340,12 @@
|
|
|
60275
59340
|
|
|
60276
59341
|
// (1) add to target plane
|
|
60277
59342
|
sourcePlaneElements.forEach(function(sourcePlaneElement) {
|
|
60278
|
-
add$
|
|
59343
|
+
add$1(targetPlaneElements, sourcePlaneElement);
|
|
60279
59344
|
});
|
|
60280
59345
|
|
|
60281
59346
|
// (2) remove from source plane
|
|
60282
59347
|
sourcePlaneElements.slice().forEach(function(sourcePlaneElement) {
|
|
60283
|
-
remove$
|
|
59348
|
+
remove$2(sourceDiagram.plane.planeElement, sourcePlaneElement);
|
|
60284
59349
|
|
|
60285
59350
|
sourcePlaneElement.$parent = targetDiagram.plane;
|
|
60286
59351
|
});
|
|
@@ -60321,7 +59386,7 @@
|
|
|
60321
59386
|
var self = this;
|
|
60322
59387
|
|
|
60323
59388
|
function deleteElements(elements) {
|
|
60324
|
-
saveClear
|
|
59389
|
+
saveClear(elements, function(element) {
|
|
60325
59390
|
deleteElement(element);
|
|
60326
59391
|
});
|
|
60327
59392
|
}
|
|
@@ -60358,7 +59423,7 @@
|
|
|
60358
59423
|
var definitions = this._bpmnjs.getDefinitions(),
|
|
60359
59424
|
diagrams = definitions.diagrams;
|
|
60360
59425
|
|
|
60361
|
-
add$
|
|
59426
|
+
add$1(diagrams, targetDiagram);
|
|
60362
59427
|
}
|
|
60363
59428
|
|
|
60364
59429
|
var sourceDiagram = this.findDiagram(this._canvas.getRootElement().id);
|
|
@@ -60422,7 +59487,7 @@
|
|
|
60422
59487
|
var definitions = this._bpmnjs.getDefinitions(),
|
|
60423
59488
|
diagrams = definitions.diagrams;
|
|
60424
59489
|
|
|
60425
|
-
remove$
|
|
59490
|
+
remove$2(diagrams, subProcessDiagram);
|
|
60426
59491
|
}
|
|
60427
59492
|
|
|
60428
59493
|
// (4) try to import
|
|
@@ -60482,12 +59547,12 @@
|
|
|
60482
59547
|
|
|
60483
59548
|
// (1) add to target plane
|
|
60484
59549
|
sourcePlaneElements.forEach(function(sourcePlaneElement) {
|
|
60485
|
-
add$
|
|
59550
|
+
add$1(targetPlaneElements, sourcePlaneElement);
|
|
60486
59551
|
});
|
|
60487
59552
|
|
|
60488
59553
|
// (2) remove from source plane
|
|
60489
59554
|
sourcePlaneElements.slice().forEach(function(sourcePlaneElement) {
|
|
60490
|
-
remove$
|
|
59555
|
+
remove$2(sourceDiagram.plane.planeElement, sourcePlaneElement);
|
|
60491
59556
|
|
|
60492
59557
|
sourcePlaneElement.$parent = targetDiagram.plane;
|
|
60493
59558
|
});
|
|
@@ -60508,7 +59573,7 @@
|
|
|
60508
59573
|
const HIGH_PRIORITY$k = 2000;
|
|
60509
59574
|
|
|
60510
59575
|
|
|
60511
|
-
class SignavioBehavior extends CommandInterceptor
|
|
59576
|
+
class SignavioBehavior extends CommandInterceptor {
|
|
60512
59577
|
|
|
60513
59578
|
constructor(
|
|
60514
59579
|
bpmnjs, bpmnImporter, canvas,
|
|
@@ -64359,42 +63424,6 @@
|
|
|
64359
63424
|
__init__: [ CommandInitializer ]
|
|
64360
63425
|
};
|
|
64361
63426
|
|
|
64362
|
-
/**
|
|
64363
|
-
* A simple translation stub to be used for multi-language support
|
|
64364
|
-
* in diagrams. Can be easily replaced with a more sophisticated
|
|
64365
|
-
* solution.
|
|
64366
|
-
*
|
|
64367
|
-
* @example
|
|
64368
|
-
*
|
|
64369
|
-
* // use it inside any diagram component by injecting `translate`.
|
|
64370
|
-
*
|
|
64371
|
-
* function MyService(translate) {
|
|
64372
|
-
* alert(translate('HELLO {you}', { you: 'You!' }));
|
|
64373
|
-
* }
|
|
64374
|
-
*
|
|
64375
|
-
* @param {string} template to interpolate
|
|
64376
|
-
* @param {Object} [replacements] a map with substitutes
|
|
64377
|
-
*
|
|
64378
|
-
* @return {string} the translated string
|
|
64379
|
-
*/
|
|
64380
|
-
function translate$3(template, replacements) {
|
|
64381
|
-
|
|
64382
|
-
replacements = replacements || {};
|
|
64383
|
-
|
|
64384
|
-
return template.replace(/{([^}]+)}/g, function(_, key) {
|
|
64385
|
-
return replacements[key] || '{' + key + '}';
|
|
64386
|
-
});
|
|
64387
|
-
}
|
|
64388
|
-
|
|
64389
|
-
var index$2 = {
|
|
64390
|
-
translate: [ 'value', translate$3 ]
|
|
64391
|
-
};
|
|
64392
|
-
|
|
64393
|
-
var translate$4 = /*#__PURE__*/Object.freeze({
|
|
64394
|
-
__proto__: null,
|
|
64395
|
-
'default': index$2
|
|
64396
|
-
});
|
|
64397
|
-
|
|
64398
63427
|
var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(index_esm$2);
|
|
64399
63428
|
|
|
64400
63429
|
var require$$2 = /*@__PURE__*/getAugmentedNamespace(index_esm);
|
|
@@ -66703,7 +65732,7 @@
|
|
|
66703
65732
|
var HIDE_CLASS = 'bpp-hidden';
|
|
66704
65733
|
var DEBOUNCE_DELAY = 300;
|
|
66705
65734
|
|
|
66706
|
-
var DEFAULT_PRIORITY$
|
|
65735
|
+
var DEFAULT_PRIORITY$6 = 1000;
|
|
66707
65736
|
|
|
66708
65737
|
function isToggle(node) {
|
|
66709
65738
|
return node.type === 'checkbox' || node.type === 'radio';
|
|
@@ -66931,7 +65960,7 @@
|
|
|
66931
65960
|
|
|
66932
65961
|
if (!provider) {
|
|
66933
65962
|
provider = priority;
|
|
66934
|
-
priority = DEFAULT_PRIORITY$
|
|
65963
|
+
priority = DEFAULT_PRIORITY$6;
|
|
66935
65964
|
}
|
|
66936
65965
|
|
|
66937
65966
|
if (typeof provider.getTabs !== 'function') {
|
|
@@ -68056,7 +67085,7 @@
|
|
|
68056
67085
|
return string.replace(/\r\n|\r|\n/g, '\n');
|
|
68057
67086
|
}
|
|
68058
67087
|
|
|
68059
|
-
var require$$1$2 = /*@__PURE__*/getAugmentedNamespace(translate$
|
|
67088
|
+
var require$$1$2 = /*@__PURE__*/getAugmentedNamespace(translate$3);
|
|
68060
67089
|
|
|
68061
67090
|
var lib = {
|
|
68062
67091
|
__depends__: [
|
|
@@ -68069,7 +67098,7 @@
|
|
|
68069
67098
|
|
|
68070
67099
|
var bpmnJsPropertiesPanel = lib;
|
|
68071
67100
|
|
|
68072
|
-
var DEFAULT_PRIORITY$
|
|
67101
|
+
var DEFAULT_PRIORITY$7 = 1000;
|
|
68073
67102
|
|
|
68074
67103
|
|
|
68075
67104
|
/**
|
|
@@ -68090,7 +67119,7 @@
|
|
|
68090
67119
|
function PropertiesActivator(eventBus, priority) {
|
|
68091
67120
|
var self = this;
|
|
68092
67121
|
|
|
68093
|
-
priority = priority || DEFAULT_PRIORITY$
|
|
67122
|
+
priority = priority || DEFAULT_PRIORITY$7;
|
|
68094
67123
|
|
|
68095
67124
|
eventBus.on('propertiesPanel.isEntryVisible', priority, function(context) {
|
|
68096
67125
|
var element = context.element,
|
|
@@ -73057,7 +72086,7 @@
|
|
|
73057
72086
|
*/
|
|
73058
72087
|
function DeleteErrorEventDefinitionBehavior(eventBus) {
|
|
73059
72088
|
|
|
73060
|
-
CommandInterceptor
|
|
72089
|
+
CommandInterceptor.call(this, eventBus);
|
|
73061
72090
|
|
|
73062
72091
|
this.executed([ 'properties-panel.update-businessobject', 'element.updateProperties' ],
|
|
73063
72092
|
HIGH_PRIORITY$l, function(context) {
|
|
@@ -73110,7 +72139,7 @@
|
|
|
73110
72139
|
'eventBus'
|
|
73111
72140
|
];
|
|
73112
72141
|
|
|
73113
|
-
inherits_browser(DeleteErrorEventDefinitionBehavior, CommandInterceptor
|
|
72142
|
+
inherits_browser(DeleteErrorEventDefinitionBehavior, CommandInterceptor);
|
|
73114
72143
|
|
|
73115
72144
|
|
|
73116
72145
|
// helper //////////////////
|
|
@@ -73139,7 +72168,7 @@
|
|
|
73139
72168
|
*/
|
|
73140
72169
|
function DeleteRetryTimeCycleBehavior(eventBus) {
|
|
73141
72170
|
|
|
73142
|
-
CommandInterceptor
|
|
72171
|
+
CommandInterceptor.call(this, eventBus);
|
|
73143
72172
|
|
|
73144
72173
|
this.executed([ 'properties-panel.update-businessobject', 'element.updateProperties' ],
|
|
73145
72174
|
HIGH_PRIORITY$m, function(context) {
|
|
@@ -73198,7 +72227,7 @@
|
|
|
73198
72227
|
'eventBus'
|
|
73199
72228
|
];
|
|
73200
72229
|
|
|
73201
|
-
inherits_browser(DeleteRetryTimeCycleBehavior, CommandInterceptor
|
|
72230
|
+
inherits_browser(DeleteRetryTimeCycleBehavior, CommandInterceptor);
|
|
73202
72231
|
|
|
73203
72232
|
|
|
73204
72233
|
// helper //////////////////
|
|
@@ -73253,7 +72282,7 @@
|
|
|
73253
72282
|
*/
|
|
73254
72283
|
function UpdateCamundaExclusiveBehavior(eventBus) {
|
|
73255
72284
|
|
|
73256
|
-
CommandInterceptor
|
|
72285
|
+
CommandInterceptor.call(this, eventBus);
|
|
73257
72286
|
|
|
73258
72287
|
this.preExecute([ 'properties-panel.update-businessobject', 'element.updateProperties' ],
|
|
73259
72288
|
HIGH_PRIORITY$n, function(context) {
|
|
@@ -73291,7 +72320,7 @@
|
|
|
73291
72320
|
'eventBus'
|
|
73292
72321
|
];
|
|
73293
72322
|
|
|
73294
|
-
inherits_browser(UpdateCamundaExclusiveBehavior, CommandInterceptor
|
|
72323
|
+
inherits_browser(UpdateCamundaExclusiveBehavior, CommandInterceptor);
|
|
73295
72324
|
|
|
73296
72325
|
|
|
73297
72326
|
// helper //////////////////
|
|
@@ -73337,7 +72366,7 @@
|
|
|
73337
72366
|
*/
|
|
73338
72367
|
function UpdateInputOutputBehavior(eventBus, modeling) {
|
|
73339
72368
|
|
|
73340
|
-
CommandInterceptor
|
|
72369
|
+
CommandInterceptor.call(this, eventBus);
|
|
73341
72370
|
|
|
73342
72371
|
this.postExecute([
|
|
73343
72372
|
'element.updateProperties',
|
|
@@ -73378,7 +72407,7 @@
|
|
|
73378
72407
|
'modeling'
|
|
73379
72408
|
];
|
|
73380
72409
|
|
|
73381
|
-
inherits_browser(UpdateInputOutputBehavior, CommandInterceptor
|
|
72410
|
+
inherits_browser(UpdateInputOutputBehavior, CommandInterceptor);
|
|
73382
72411
|
|
|
73383
72412
|
|
|
73384
72413
|
// helper //////////////////
|
|
@@ -73423,7 +72452,7 @@
|
|
|
73423
72452
|
*/
|
|
73424
72453
|
function UpdateResultVariableBehavior(eventBus) {
|
|
73425
72454
|
|
|
73426
|
-
CommandInterceptor
|
|
72455
|
+
CommandInterceptor.call(this, eventBus);
|
|
73427
72456
|
|
|
73428
72457
|
this.preExecute([ 'properties-panel.update-businessobject', 'element.updateProperties' ],
|
|
73429
72458
|
HIGH_PRIORITY$o, function(context) {
|
|
@@ -73447,7 +72476,7 @@
|
|
|
73447
72476
|
'eventBus'
|
|
73448
72477
|
];
|
|
73449
72478
|
|
|
73450
|
-
inherits_browser(UpdateResultVariableBehavior, CommandInterceptor
|
|
72479
|
+
inherits_browser(UpdateResultVariableBehavior, CommandInterceptor);
|
|
73451
72480
|
|
|
73452
72481
|
|
|
73453
72482
|
// helper //////////////////
|
|
@@ -73462,7 +72491,7 @@
|
|
|
73462
72491
|
* 1. embedded, external or Camunda forms using camunda:formKey
|
|
73463
72492
|
* 2. Camunda forms using camunda:formRef
|
|
73464
72493
|
*/
|
|
73465
|
-
class UserTaskFormsBehavior extends CommandInterceptor
|
|
72494
|
+
class UserTaskFormsBehavior extends CommandInterceptor {
|
|
73466
72495
|
constructor(eventBus) {
|
|
73467
72496
|
super(eventBus);
|
|
73468
72497
|
|
|
@@ -73523,7 +72552,7 @@
|
|
|
73523
72552
|
* 2. Updates camunda:FormData#businessKey if camunda:FormField#id is changed.
|
|
73524
72553
|
* 3. Removes camunda:FormData#businessKey if camunda:FormField is removed.
|
|
73525
72554
|
*/
|
|
73526
|
-
class UserTaskFormsBehavior$1 extends CommandInterceptor
|
|
72555
|
+
class UserTaskFormsBehavior$1 extends CommandInterceptor {
|
|
73527
72556
|
constructor(eventBus, modeling) {
|
|
73528
72557
|
super(eventBus);
|
|
73529
72558
|
|
|
@@ -74478,7 +73507,7 @@
|
|
|
74478
73507
|
* console.log(evens);
|
|
74479
73508
|
* // => [2, 4]
|
|
74480
73509
|
*/
|
|
74481
|
-
function remove$
|
|
73510
|
+
function remove$3(array, predicate) {
|
|
74482
73511
|
var result = [];
|
|
74483
73512
|
if (!(array && array.length)) {
|
|
74484
73513
|
return result;
|
|
@@ -74499,7 +73528,7 @@
|
|
|
74499
73528
|
return result;
|
|
74500
73529
|
}
|
|
74501
73530
|
|
|
74502
|
-
var remove_1 = remove$
|
|
73531
|
+
var remove_1 = remove$3;
|
|
74503
73532
|
|
|
74504
73533
|
var findExtension$1 = Helper.findExtension,
|
|
74505
73534
|
findExtensions$1 = Helper.findExtensions,
|
|
@@ -83416,7 +82445,7 @@
|
|
|
83416
82445
|
* @param {Object} e
|
|
83417
82446
|
* @param {boolean} unique
|
|
83418
82447
|
*/
|
|
83419
|
-
function add$
|
|
82448
|
+
function add$2(elements, e, unique) {
|
|
83420
82449
|
var canAdd = !unique || elements.indexOf(e) === -1;
|
|
83421
82450
|
|
|
83422
82451
|
if (canAdd) {
|
|
@@ -83440,7 +82469,7 @@
|
|
|
83440
82469
|
processedFlowElements = [];
|
|
83441
82470
|
|
|
83442
82471
|
eachElement$1(elements, function(element, i, depth) {
|
|
83443
|
-
add$
|
|
82472
|
+
add$2(result, element, unique);
|
|
83444
82473
|
|
|
83445
82474
|
var flowElements = element.flowElements;
|
|
83446
82475
|
|
|
@@ -83448,7 +82477,7 @@
|
|
|
83448
82477
|
if (maxDepth === -1 || depth < maxDepth) {
|
|
83449
82478
|
|
|
83450
82479
|
// flowElements exist && flowElements not yet processed
|
|
83451
|
-
if (flowElements && add$
|
|
82480
|
+
if (flowElements && add$2(processedFlowElements, flowElements, unique)) {
|
|
83452
82481
|
return flowElements;
|
|
83453
82482
|
}
|
|
83454
82483
|
}
|
|
@@ -91034,12 +90063,12 @@
|
|
|
91034
90063
|
return allowedIn.indexOf(WILDCARD) !== -1;
|
|
91035
90064
|
}
|
|
91036
90065
|
|
|
91037
|
-
var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(CommandInterceptor$
|
|
90066
|
+
var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(CommandInterceptor$1);
|
|
91038
90067
|
|
|
91039
90068
|
var find$5 = require$$0.find,
|
|
91040
90069
|
matchPattern$1 = require$$0.matchPattern;
|
|
91041
90070
|
|
|
91042
|
-
var CommandInterceptor$
|
|
90071
|
+
var CommandInterceptor$2 = require$$0$1.default;
|
|
91043
90072
|
|
|
91044
90073
|
var collectionAdd$1 = require$$2$2.add,
|
|
91045
90074
|
collectionRemove = require$$2$2.remove;
|
|
@@ -91047,7 +90076,7 @@
|
|
|
91047
90076
|
var getBusinessObject$T = require$$1.getBusinessObject,
|
|
91048
90077
|
is$O = require$$1.is;
|
|
91049
90078
|
|
|
91050
|
-
var LOW_PRIORITY$
|
|
90079
|
+
var LOW_PRIORITY$o = 500;
|
|
91051
90080
|
|
|
91052
90081
|
|
|
91053
90082
|
/**
|
|
@@ -91058,7 +90087,7 @@
|
|
|
91058
90087
|
bpmnjs, eventBus, injector, moddleCopy, bpmnFactory
|
|
91059
90088
|
) {
|
|
91060
90089
|
|
|
91061
|
-
injector.invoke(CommandInterceptor$
|
|
90090
|
+
injector.invoke(CommandInterceptor$2, this);
|
|
91062
90091
|
|
|
91063
90092
|
|
|
91064
90093
|
function hasRootElement(rootElement) {
|
|
@@ -91129,7 +90158,7 @@
|
|
|
91129
90158
|
});
|
|
91130
90159
|
|
|
91131
90160
|
|
|
91132
|
-
eventBus.on('copyPaste.pasteElement', LOW_PRIORITY$
|
|
90161
|
+
eventBus.on('copyPaste.pasteElement', LOW_PRIORITY$o, function(context) {
|
|
91133
90162
|
var descriptor = context.descriptor,
|
|
91134
90163
|
businessObject = descriptor.businessObject;
|
|
91135
90164
|
|
|
@@ -91173,7 +90202,7 @@
|
|
|
91173
90202
|
'bpmnFactory'
|
|
91174
90203
|
];
|
|
91175
90204
|
|
|
91176
|
-
inherits_browser(CopyPasteRootElementBehavior, CommandInterceptor$
|
|
90205
|
+
inherits_browser(CopyPasteRootElementBehavior, CommandInterceptor$2);
|
|
91177
90206
|
|
|
91178
90207
|
var CopyPasteRootElementBehavior_1 = CopyPasteRootElementBehavior;
|
|
91179
90208
|
|
|
@@ -91258,7 +90287,7 @@
|
|
|
91258
90287
|
return extensionElements.values.indexOf(extensionElement);
|
|
91259
90288
|
}
|
|
91260
90289
|
|
|
91261
|
-
var CommandInterceptor$
|
|
90290
|
+
var CommandInterceptor$3 = require$$0$1.default;
|
|
91262
90291
|
var is$P = require$$1.is;
|
|
91263
90292
|
var getBusinessObject$U = require$$1.getBusinessObject;
|
|
91264
90293
|
|
|
@@ -91269,7 +90298,7 @@
|
|
|
91269
90298
|
modeling, injector
|
|
91270
90299
|
) {
|
|
91271
90300
|
|
|
91272
|
-
injector.invoke(CommandInterceptor$
|
|
90301
|
+
injector.invoke(CommandInterceptor$3, this);
|
|
91273
90302
|
|
|
91274
90303
|
this.postExecuted(['shape.create','shape.move'], function(context) {
|
|
91275
90304
|
|
|
@@ -91297,11 +90326,11 @@
|
|
|
91297
90326
|
'injector',
|
|
91298
90327
|
];
|
|
91299
90328
|
|
|
91300
|
-
inherits_browser(RemoveInitiatorBehaviour, CommandInterceptor$
|
|
90329
|
+
inherits_browser(RemoveInitiatorBehaviour, CommandInterceptor$3);
|
|
91301
90330
|
|
|
91302
90331
|
var RemoveInitiatorBehaviour_1 = RemoveInitiatorBehaviour;
|
|
91303
90332
|
|
|
91304
|
-
var CommandInterceptor$
|
|
90333
|
+
var CommandInterceptor$4 = require$$0$1.default;
|
|
91305
90334
|
var is$Q = require$$1.is;
|
|
91306
90335
|
var getBusinessObject$V = require$$1.getBusinessObject;
|
|
91307
90336
|
|
|
@@ -91311,7 +90340,7 @@
|
|
|
91311
90340
|
function RemoveVariableEventBehaviour(
|
|
91312
90341
|
modeling, injector, bpmnFactory, moddleCopy
|
|
91313
90342
|
) {
|
|
91314
|
-
injector.invoke(CommandInterceptor$
|
|
90343
|
+
injector.invoke(CommandInterceptor$4, this);
|
|
91315
90344
|
|
|
91316
90345
|
this.postExecuted(['shape.move', 'shape.create'], function(context) {
|
|
91317
90346
|
|
|
@@ -91363,7 +90392,7 @@
|
|
|
91363
90392
|
'moddleCopy'
|
|
91364
90393
|
];
|
|
91365
90394
|
|
|
91366
|
-
inherits_browser(RemoveVariableEventBehaviour, CommandInterceptor$
|
|
90395
|
+
inherits_browser(RemoveVariableEventBehaviour, CommandInterceptor$4);
|
|
91367
90396
|
|
|
91368
90397
|
var RemoveVariableEventBehaviour_1 = RemoveVariableEventBehaviour;
|
|
91369
90398
|
|