camunda-bpmn-js 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/dist/assets/bpmn-font/bpmn-codes.css +108 -0
- package/dist/assets/bpmn-font/bpmn-embedded.css +161 -0
- package/dist/assets/bpmn-font/bpmn.css +164 -0
- package/dist/assets/bpmn-font/bpmn.eot +0 -0
- package/dist/assets/bpmn-font/bpmn.svg +224 -0
- package/dist/assets/bpmn-font/bpmn.ttf +0 -0
- package/dist/assets/bpmn-font/bpmn.woff +0 -0
- package/dist/assets/bpmn-font/bpmn.woff2 +0 -0
- package/dist/assets/bpmn-font/css/bpmn-codes.css +108 -0
- package/dist/assets/bpmn-font/css/bpmn-embedded.css +161 -0
- package/dist/assets/bpmn-font/css/bpmn.css +164 -0
- package/dist/assets/bpmn-font/font/bpmn.eot +0 -0
- package/dist/assets/bpmn-font/font/bpmn.svg +224 -0
- package/dist/assets/bpmn-font/font/bpmn.ttf +0 -0
- package/dist/assets/bpmn-font/font/bpmn.woff +0 -0
- package/dist/assets/bpmn-font/font/bpmn.woff2 +0 -0
- package/dist/assets/bpmn-js.css +116 -0
- package/dist/assets/diagram-js-minimap.css +87 -0
- package/dist/assets/diagram-js.css +819 -0
- package/dist/assets/element-templates.css +79 -0
- package/dist/assets/properties-panel.css +901 -0
- package/dist/base-modeler.development.js +272 -866
- package/dist/base-modeler.production.min.js +4 -4
- package/dist/base-navigated-viewer.development.js +36 -4
- package/dist/base-navigated-viewer.production.min.js +2 -2
- package/dist/base-viewer.development.js +36 -4
- package/dist/base-viewer.production.min.js +2 -2
- package/dist/camunda-cloud-modeler.development.js +394 -1215
- package/dist/camunda-cloud-modeler.production.min.js +4 -4
- package/dist/camunda-cloud-navigated-viewer.development.js +42 -95
- package/dist/camunda-cloud-navigated-viewer.production.min.js +2 -2
- package/dist/camunda-cloud-viewer.development.js +42 -95
- package/dist/camunda-cloud-viewer.production.min.js +2 -2
- package/dist/camunda-platform-modeler.development.js +367 -1161
- package/dist/camunda-platform-modeler.production.min.js +4 -4
- package/dist/camunda-platform-navigated-viewer.development.js +36 -4
- package/dist/camunda-platform-navigated-viewer.production.min.js +2 -2
- package/dist/camunda-platform-viewer.development.js +36 -4
- package/dist/camunda-platform-viewer.production.min.js +2 -2
- package/package.json +13 -6
|
@@ -15994,7 +15994,7 @@
|
|
|
15994
15994
|
}
|
|
15995
15995
|
|
|
15996
15996
|
/**
|
|
15997
|
-
* Returns all diagrams in the same
|
|
15997
|
+
* Returns all diagrams in the same hierarchy as the requested diagram.
|
|
15998
15998
|
* Includes all parent and sub process diagrams.
|
|
15999
15999
|
*
|
|
16000
16000
|
* @param {Array} definitions
|
|
@@ -20089,7 +20089,7 @@
|
|
|
20089
20089
|
});
|
|
20090
20090
|
}
|
|
20091
20091
|
|
|
20092
|
-
var
|
|
20092
|
+
var translateModule = {
|
|
20093
20093
|
translate: [ 'value', translate$1 ]
|
|
20094
20094
|
};
|
|
20095
20095
|
|
|
@@ -20570,7 +20570,7 @@
|
|
|
20570
20570
|
|
|
20571
20571
|
var ImportModule = {
|
|
20572
20572
|
__depends__: [
|
|
20573
|
-
|
|
20573
|
+
translateModule
|
|
20574
20574
|
],
|
|
20575
20575
|
bpmnImporter: [ 'type', BpmnImporter ]
|
|
20576
20576
|
};
|
|
@@ -22950,7 +22950,7 @@
|
|
|
22950
22950
|
collapsedElements.push(bo);
|
|
22951
22951
|
}
|
|
22952
22952
|
|
|
22953
|
-
if (
|
|
22953
|
+
if (shouldMoveToPlane(bo, plane)) {
|
|
22954
22954
|
|
|
22955
22955
|
// don't change the array while we iterate over it
|
|
22956
22956
|
elementsToMove.push({ diElement: diElement, parent: parent });
|
|
@@ -23039,7 +23039,7 @@
|
|
|
23039
23039
|
SubprocessCompatibility.$inject = [ 'eventBus', 'moddle' ];
|
|
23040
23040
|
|
|
23041
23041
|
|
|
23042
|
-
// helpers
|
|
23042
|
+
// helpers //////////////////////////
|
|
23043
23043
|
|
|
23044
23044
|
function findRootDiagram(element) {
|
|
23045
23045
|
if (is$1(element, 'bpmndi:BPMNDiagram')) {
|
|
@@ -23071,6 +23071,23 @@
|
|
|
23071
23071
|
return asBounds(planeTrbl);
|
|
23072
23072
|
}
|
|
23073
23073
|
|
|
23074
|
+
function shouldMoveToPlane(bo, plane) {
|
|
23075
|
+
var parent = bo.$parent;
|
|
23076
|
+
|
|
23077
|
+
// don't move elements that are already on the plane
|
|
23078
|
+
if (!is$1(parent, 'bpmn:SubProcess') || parent === plane.bpmnElement) {
|
|
23079
|
+
return false;
|
|
23080
|
+
}
|
|
23081
|
+
|
|
23082
|
+
// dataAssociations are children of the subprocess but rendered on process level
|
|
23083
|
+
// cf. https://github.com/bpmn-io/bpmn-js/issues/1619
|
|
23084
|
+
if (isAny(bo, ['bpmn:DataInputAssociation', 'bpmn:DataOutputAssociation'])) {
|
|
23085
|
+
return false;
|
|
23086
|
+
}
|
|
23087
|
+
|
|
23088
|
+
return true;
|
|
23089
|
+
}
|
|
23090
|
+
|
|
23074
23091
|
var LOW_PRIORITY$3 = 250;
|
|
23075
23092
|
var ARROW_DOWN_SVG = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.81801948,3.50735931 L10.4996894,9.1896894 L10.5,4 L12,4 L12,12 L4,12 L4,10.5 L9.6896894,10.4996894 L3.75735931,4.56801948 C3.46446609,4.27512627 3.46446609,3.80025253 3.75735931,3.50735931 C4.05025253,3.21446609 4.52512627,3.21446609 4.81801948,3.50735931 Z"/></svg>';
|
|
23076
23093
|
|
|
@@ -23146,7 +23163,7 @@
|
|
|
23146
23163
|
}, true);
|
|
23147
23164
|
|
|
23148
23165
|
|
|
23149
|
-
eventBus.on('import.
|
|
23166
|
+
eventBus.on('import.render.complete', function() {
|
|
23150
23167
|
elementRegistry.filter(function(e) {
|
|
23151
23168
|
return self.canDrillDown(e);
|
|
23152
23169
|
}).map(function(el) {
|
|
@@ -23311,7 +23328,7 @@
|
|
|
23311
23328
|
// modules the viewer is composed of
|
|
23312
23329
|
Viewer.prototype._modules = [
|
|
23313
23330
|
CoreModule$1,
|
|
23314
|
-
|
|
23331
|
+
translateModule,
|
|
23315
23332
|
SelectionModule,
|
|
23316
23333
|
OverlaysModule,
|
|
23317
23334
|
DrilldownModdule
|
|
@@ -31777,537 +31794,6 @@
|
|
|
31777
31794
|
connectionPreview: [ 'type', ConnectionPreview ]
|
|
31778
31795
|
};
|
|
31779
31796
|
|
|
31780
|
-
function getOriginal$1(event) {
|
|
31781
|
-
return event.originalEvent || event.srcEvent;
|
|
31782
|
-
}
|
|
31783
|
-
|
|
31784
|
-
function isButton$1(event, button) {
|
|
31785
|
-
return (getOriginal$1(event) || event).button === button;
|
|
31786
|
-
}
|
|
31787
|
-
|
|
31788
|
-
function isPrimaryButton$1(event) {
|
|
31789
|
-
|
|
31790
|
-
// button === 0 -> left áka primary mouse button
|
|
31791
|
-
return isButton$1(event, 0);
|
|
31792
|
-
}
|
|
31793
|
-
|
|
31794
|
-
function isAuxiliaryButton$1(event) {
|
|
31795
|
-
|
|
31796
|
-
// button === 1 -> auxiliary áka wheel button
|
|
31797
|
-
return isButton$1(event, 1);
|
|
31798
|
-
}
|
|
31799
|
-
|
|
31800
|
-
function toSVGPoints$1(points) {
|
|
31801
|
-
var result = '';
|
|
31802
|
-
|
|
31803
|
-
for (var i = 0, p; (p = points[i]); i++) {
|
|
31804
|
-
result += p.x + ',' + p.y + ' ';
|
|
31805
|
-
}
|
|
31806
|
-
|
|
31807
|
-
return result;
|
|
31808
|
-
}
|
|
31809
|
-
|
|
31810
|
-
function createLine$1(points, attrs) {
|
|
31811
|
-
|
|
31812
|
-
var line = create('polyline');
|
|
31813
|
-
attr$1(line, { points: toSVGPoints$1(points) });
|
|
31814
|
-
|
|
31815
|
-
if (attrs) {
|
|
31816
|
-
attr$1(line, attrs);
|
|
31817
|
-
}
|
|
31818
|
-
|
|
31819
|
-
return line;
|
|
31820
|
-
}
|
|
31821
|
-
|
|
31822
|
-
function updateLine$1(gfx, points) {
|
|
31823
|
-
attr$1(gfx, { points: toSVGPoints$1(points) });
|
|
31824
|
-
|
|
31825
|
-
return gfx;
|
|
31826
|
-
}
|
|
31827
|
-
|
|
31828
|
-
function allowAll$1(event) { return true; }
|
|
31829
|
-
|
|
31830
|
-
function allowPrimaryAndAuxiliary$1(event) {
|
|
31831
|
-
return isPrimaryButton$1(event) || isAuxiliaryButton$1(event);
|
|
31832
|
-
}
|
|
31833
|
-
|
|
31834
|
-
var LOW_PRIORITY$7 = 500;
|
|
31835
|
-
|
|
31836
|
-
|
|
31837
|
-
/**
|
|
31838
|
-
* A plugin that provides interaction events for diagram elements.
|
|
31839
|
-
*
|
|
31840
|
-
* It emits the following events:
|
|
31841
|
-
*
|
|
31842
|
-
* * element.click
|
|
31843
|
-
* * element.contextmenu
|
|
31844
|
-
* * element.dblclick
|
|
31845
|
-
* * element.hover
|
|
31846
|
-
* * element.mousedown
|
|
31847
|
-
* * element.mousemove
|
|
31848
|
-
* * element.mouseup
|
|
31849
|
-
* * element.out
|
|
31850
|
-
*
|
|
31851
|
-
* Each event is a tuple { element, gfx, originalEvent }.
|
|
31852
|
-
*
|
|
31853
|
-
* Canceling the event via Event#preventDefault()
|
|
31854
|
-
* prevents the original DOM operation.
|
|
31855
|
-
*
|
|
31856
|
-
* @param {EventBus} eventBus
|
|
31857
|
-
*/
|
|
31858
|
-
function InteractionEvents$1(eventBus, elementRegistry, styles) {
|
|
31859
|
-
|
|
31860
|
-
var self = this;
|
|
31861
|
-
|
|
31862
|
-
/**
|
|
31863
|
-
* Fire an interaction event.
|
|
31864
|
-
*
|
|
31865
|
-
* @param {string} type local event name, e.g. element.click.
|
|
31866
|
-
* @param {DOMEvent} event native event
|
|
31867
|
-
* @param {djs.model.Base} [element] the diagram element to emit the event on;
|
|
31868
|
-
* defaults to the event target
|
|
31869
|
-
*/
|
|
31870
|
-
function fire(type, event, element) {
|
|
31871
|
-
|
|
31872
|
-
if (isIgnored(type, event)) {
|
|
31873
|
-
return;
|
|
31874
|
-
}
|
|
31875
|
-
|
|
31876
|
-
var target, gfx, returnValue;
|
|
31877
|
-
|
|
31878
|
-
if (!element) {
|
|
31879
|
-
target = event.delegateTarget || event.target;
|
|
31880
|
-
|
|
31881
|
-
if (target) {
|
|
31882
|
-
gfx = target;
|
|
31883
|
-
element = elementRegistry.get(gfx);
|
|
31884
|
-
}
|
|
31885
|
-
} else {
|
|
31886
|
-
gfx = elementRegistry.getGraphics(element);
|
|
31887
|
-
}
|
|
31888
|
-
|
|
31889
|
-
if (!gfx || !element) {
|
|
31890
|
-
return;
|
|
31891
|
-
}
|
|
31892
|
-
|
|
31893
|
-
returnValue = eventBus.fire(type, {
|
|
31894
|
-
element: element,
|
|
31895
|
-
gfx: gfx,
|
|
31896
|
-
originalEvent: event
|
|
31897
|
-
});
|
|
31898
|
-
|
|
31899
|
-
if (returnValue === false) {
|
|
31900
|
-
event.stopPropagation();
|
|
31901
|
-
event.preventDefault();
|
|
31902
|
-
}
|
|
31903
|
-
}
|
|
31904
|
-
|
|
31905
|
-
// TODO(nikku): document this
|
|
31906
|
-
var handlers = {};
|
|
31907
|
-
|
|
31908
|
-
function mouseHandler(localEventName) {
|
|
31909
|
-
return handlers[localEventName];
|
|
31910
|
-
}
|
|
31911
|
-
|
|
31912
|
-
function isIgnored(localEventName, event) {
|
|
31913
|
-
|
|
31914
|
-
var filter = ignoredFilters[localEventName] || isPrimaryButton$1;
|
|
31915
|
-
|
|
31916
|
-
// only react on left mouse button interactions
|
|
31917
|
-
// except for interaction events that are enabled
|
|
31918
|
-
// for secundary mouse button
|
|
31919
|
-
return !filter(event);
|
|
31920
|
-
}
|
|
31921
|
-
|
|
31922
|
-
var bindings = {
|
|
31923
|
-
click: 'element.click',
|
|
31924
|
-
contextmenu: 'element.contextmenu',
|
|
31925
|
-
dblclick: 'element.dblclick',
|
|
31926
|
-
mousedown: 'element.mousedown',
|
|
31927
|
-
mousemove: 'element.mousemove',
|
|
31928
|
-
mouseover: 'element.hover',
|
|
31929
|
-
mouseout: 'element.out',
|
|
31930
|
-
mouseup: 'element.mouseup',
|
|
31931
|
-
};
|
|
31932
|
-
|
|
31933
|
-
var ignoredFilters = {
|
|
31934
|
-
'element.contextmenu': allowAll$1,
|
|
31935
|
-
'element.mousedown': allowPrimaryAndAuxiliary$1,
|
|
31936
|
-
'element.mouseup': allowPrimaryAndAuxiliary$1,
|
|
31937
|
-
'element.click': allowPrimaryAndAuxiliary$1,
|
|
31938
|
-
'element.dblclick': allowPrimaryAndAuxiliary$1
|
|
31939
|
-
};
|
|
31940
|
-
|
|
31941
|
-
|
|
31942
|
-
// manual event trigger //////////
|
|
31943
|
-
|
|
31944
|
-
/**
|
|
31945
|
-
* Trigger an interaction event (based on a native dom event)
|
|
31946
|
-
* on the target shape or connection.
|
|
31947
|
-
*
|
|
31948
|
-
* @param {string} eventName the name of the triggered DOM event
|
|
31949
|
-
* @param {MouseEvent} event
|
|
31950
|
-
* @param {djs.model.Base} targetElement
|
|
31951
|
-
*/
|
|
31952
|
-
function triggerMouseEvent(eventName, event, targetElement) {
|
|
31953
|
-
|
|
31954
|
-
// i.e. element.mousedown...
|
|
31955
|
-
var localEventName = bindings[eventName];
|
|
31956
|
-
|
|
31957
|
-
if (!localEventName) {
|
|
31958
|
-
throw new Error('unmapped DOM event name <' + eventName + '>');
|
|
31959
|
-
}
|
|
31960
|
-
|
|
31961
|
-
return fire(localEventName, event, targetElement);
|
|
31962
|
-
}
|
|
31963
|
-
|
|
31964
|
-
|
|
31965
|
-
var ELEMENT_SELECTOR = 'svg, .djs-element';
|
|
31966
|
-
|
|
31967
|
-
// event handling ///////
|
|
31968
|
-
|
|
31969
|
-
function registerEvent(node, event, localEvent, ignoredFilter) {
|
|
31970
|
-
|
|
31971
|
-
var handler = handlers[localEvent] = function(event) {
|
|
31972
|
-
fire(localEvent, event);
|
|
31973
|
-
};
|
|
31974
|
-
|
|
31975
|
-
if (ignoredFilter) {
|
|
31976
|
-
ignoredFilters[localEvent] = ignoredFilter;
|
|
31977
|
-
}
|
|
31978
|
-
|
|
31979
|
-
handler.$delegate = delegate.bind(node, ELEMENT_SELECTOR, event, handler);
|
|
31980
|
-
}
|
|
31981
|
-
|
|
31982
|
-
function unregisterEvent(node, event, localEvent) {
|
|
31983
|
-
|
|
31984
|
-
var handler = mouseHandler(localEvent);
|
|
31985
|
-
|
|
31986
|
-
if (!handler) {
|
|
31987
|
-
return;
|
|
31988
|
-
}
|
|
31989
|
-
|
|
31990
|
-
delegate.unbind(node, event, handler.$delegate);
|
|
31991
|
-
}
|
|
31992
|
-
|
|
31993
|
-
function registerEvents(svg) {
|
|
31994
|
-
forEach(bindings, function(val, key) {
|
|
31995
|
-
registerEvent(svg, key, val);
|
|
31996
|
-
});
|
|
31997
|
-
}
|
|
31998
|
-
|
|
31999
|
-
function unregisterEvents(svg) {
|
|
32000
|
-
forEach(bindings, function(val, key) {
|
|
32001
|
-
unregisterEvent(svg, key, val);
|
|
32002
|
-
});
|
|
32003
|
-
}
|
|
32004
|
-
|
|
32005
|
-
eventBus.on('canvas.destroy', function(event) {
|
|
32006
|
-
unregisterEvents(event.svg);
|
|
32007
|
-
});
|
|
32008
|
-
|
|
32009
|
-
eventBus.on('canvas.init', function(event) {
|
|
32010
|
-
registerEvents(event.svg);
|
|
32011
|
-
});
|
|
32012
|
-
|
|
32013
|
-
|
|
32014
|
-
// hit box updating ////////////////
|
|
32015
|
-
|
|
32016
|
-
eventBus.on([ 'shape.added', 'connection.added' ], function(event) {
|
|
32017
|
-
var element = event.element,
|
|
32018
|
-
gfx = event.gfx;
|
|
32019
|
-
|
|
32020
|
-
eventBus.fire('interactionEvents.createHit', { element: element, gfx: gfx });
|
|
32021
|
-
});
|
|
32022
|
-
|
|
32023
|
-
// Update djs-hit on change.
|
|
32024
|
-
// A low priortity is necessary, because djs-hit of labels has to be updated
|
|
32025
|
-
// after the label bounds have been updated in the renderer.
|
|
32026
|
-
eventBus.on([
|
|
32027
|
-
'shape.changed',
|
|
32028
|
-
'connection.changed'
|
|
32029
|
-
], LOW_PRIORITY$7, function(event) {
|
|
32030
|
-
|
|
32031
|
-
var element = event.element,
|
|
32032
|
-
gfx = event.gfx;
|
|
32033
|
-
|
|
32034
|
-
eventBus.fire('interactionEvents.updateHit', { element: element, gfx: gfx });
|
|
32035
|
-
});
|
|
32036
|
-
|
|
32037
|
-
eventBus.on('interactionEvents.createHit', LOW_PRIORITY$7, function(event) {
|
|
32038
|
-
var element = event.element,
|
|
32039
|
-
gfx = event.gfx;
|
|
32040
|
-
|
|
32041
|
-
self.createDefaultHit(element, gfx);
|
|
32042
|
-
});
|
|
32043
|
-
|
|
32044
|
-
eventBus.on('interactionEvents.updateHit', function(event) {
|
|
32045
|
-
var element = event.element,
|
|
32046
|
-
gfx = event.gfx;
|
|
32047
|
-
|
|
32048
|
-
self.updateDefaultHit(element, gfx);
|
|
32049
|
-
});
|
|
32050
|
-
|
|
32051
|
-
|
|
32052
|
-
// hit styles ////////////
|
|
32053
|
-
|
|
32054
|
-
var STROKE_HIT_STYLE = createHitStyle('djs-hit djs-hit-stroke');
|
|
32055
|
-
|
|
32056
|
-
var CLICK_STROKE_HIT_STYLE = createHitStyle('djs-hit djs-hit-click-stroke');
|
|
32057
|
-
|
|
32058
|
-
var ALL_HIT_STYLE = createHitStyle('djs-hit djs-hit-all');
|
|
32059
|
-
|
|
32060
|
-
var HIT_TYPES = {
|
|
32061
|
-
'all': ALL_HIT_STYLE,
|
|
32062
|
-
'click-stroke': CLICK_STROKE_HIT_STYLE,
|
|
32063
|
-
'stroke': STROKE_HIT_STYLE
|
|
32064
|
-
};
|
|
32065
|
-
|
|
32066
|
-
function createHitStyle(classNames, attrs) {
|
|
32067
|
-
|
|
32068
|
-
attrs = assign({
|
|
32069
|
-
stroke: 'white',
|
|
32070
|
-
strokeWidth: 15
|
|
32071
|
-
}, attrs || {});
|
|
32072
|
-
|
|
32073
|
-
return styles.cls(classNames, [ 'no-fill', 'no-border' ], attrs);
|
|
32074
|
-
}
|
|
32075
|
-
|
|
32076
|
-
|
|
32077
|
-
// style helpers ///////////////
|
|
32078
|
-
|
|
32079
|
-
function applyStyle(hit, type) {
|
|
32080
|
-
|
|
32081
|
-
var attrs = HIT_TYPES[type];
|
|
32082
|
-
|
|
32083
|
-
if (!attrs) {
|
|
32084
|
-
throw new Error('invalid hit type <' + type + '>');
|
|
32085
|
-
}
|
|
32086
|
-
|
|
32087
|
-
attr$1(hit, attrs);
|
|
32088
|
-
|
|
32089
|
-
return hit;
|
|
32090
|
-
}
|
|
32091
|
-
|
|
32092
|
-
function appendHit(gfx, hit) {
|
|
32093
|
-
append(gfx, hit);
|
|
32094
|
-
}
|
|
32095
|
-
|
|
32096
|
-
|
|
32097
|
-
// API
|
|
32098
|
-
|
|
32099
|
-
/**
|
|
32100
|
-
* Remove hints on the given graphics.
|
|
32101
|
-
*
|
|
32102
|
-
* @param {SVGElement} gfx
|
|
32103
|
-
*/
|
|
32104
|
-
this.removeHits = function(gfx) {
|
|
32105
|
-
var hits = all('.djs-hit', gfx);
|
|
32106
|
-
|
|
32107
|
-
forEach(hits, remove$1);
|
|
32108
|
-
};
|
|
32109
|
-
|
|
32110
|
-
/**
|
|
32111
|
-
* Create default hit for the given element.
|
|
32112
|
-
*
|
|
32113
|
-
* @param {djs.model.Base} element
|
|
32114
|
-
* @param {SVGElement} gfx
|
|
32115
|
-
*
|
|
32116
|
-
* @return {SVGElement} created hit
|
|
32117
|
-
*/
|
|
32118
|
-
this.createDefaultHit = function(element, gfx) {
|
|
32119
|
-
var waypoints = element.waypoints,
|
|
32120
|
-
isFrame = element.isFrame,
|
|
32121
|
-
boxType;
|
|
32122
|
-
|
|
32123
|
-
if (waypoints) {
|
|
32124
|
-
return this.createWaypointsHit(gfx, waypoints);
|
|
32125
|
-
} else {
|
|
32126
|
-
|
|
32127
|
-
boxType = isFrame ? 'stroke' : 'all';
|
|
32128
|
-
|
|
32129
|
-
return this.createBoxHit(gfx, boxType, {
|
|
32130
|
-
width: element.width,
|
|
32131
|
-
height: element.height
|
|
32132
|
-
});
|
|
32133
|
-
}
|
|
32134
|
-
};
|
|
32135
|
-
|
|
32136
|
-
/**
|
|
32137
|
-
* Create hits for the given waypoints.
|
|
32138
|
-
*
|
|
32139
|
-
* @param {SVGElement} gfx
|
|
32140
|
-
* @param {Array<Point>} waypoints
|
|
32141
|
-
*
|
|
32142
|
-
* @return {SVGElement}
|
|
32143
|
-
*/
|
|
32144
|
-
this.createWaypointsHit = function(gfx, waypoints) {
|
|
32145
|
-
|
|
32146
|
-
var hit = createLine$1(waypoints);
|
|
32147
|
-
|
|
32148
|
-
applyStyle(hit, 'stroke');
|
|
32149
|
-
|
|
32150
|
-
appendHit(gfx, hit);
|
|
32151
|
-
|
|
32152
|
-
return hit;
|
|
32153
|
-
};
|
|
32154
|
-
|
|
32155
|
-
/**
|
|
32156
|
-
* Create hits for a box.
|
|
32157
|
-
*
|
|
32158
|
-
* @param {SVGElement} gfx
|
|
32159
|
-
* @param {string} hitType
|
|
32160
|
-
* @param {Object} attrs
|
|
32161
|
-
*
|
|
32162
|
-
* @return {SVGElement}
|
|
32163
|
-
*/
|
|
32164
|
-
this.createBoxHit = function(gfx, type, attrs) {
|
|
32165
|
-
|
|
32166
|
-
attrs = assign({
|
|
32167
|
-
x: 0,
|
|
32168
|
-
y: 0
|
|
32169
|
-
}, attrs);
|
|
32170
|
-
|
|
32171
|
-
var hit = create('rect');
|
|
32172
|
-
|
|
32173
|
-
applyStyle(hit, type);
|
|
32174
|
-
|
|
32175
|
-
attr$1(hit, attrs);
|
|
32176
|
-
|
|
32177
|
-
appendHit(gfx, hit);
|
|
32178
|
-
|
|
32179
|
-
return hit;
|
|
32180
|
-
};
|
|
32181
|
-
|
|
32182
|
-
/**
|
|
32183
|
-
* Update default hit of the element.
|
|
32184
|
-
*
|
|
32185
|
-
* @param {djs.model.Base} element
|
|
32186
|
-
* @param {SVGElement} gfx
|
|
32187
|
-
*
|
|
32188
|
-
* @return {SVGElement} updated hit
|
|
32189
|
-
*/
|
|
32190
|
-
this.updateDefaultHit = function(element, gfx) {
|
|
32191
|
-
|
|
32192
|
-
var hit = query('.djs-hit', gfx);
|
|
32193
|
-
|
|
32194
|
-
if (!hit) {
|
|
32195
|
-
return;
|
|
32196
|
-
}
|
|
32197
|
-
|
|
32198
|
-
if (element.waypoints) {
|
|
32199
|
-
updateLine$1(hit, element.waypoints);
|
|
32200
|
-
} else {
|
|
32201
|
-
attr$1(hit, {
|
|
32202
|
-
width: element.width,
|
|
32203
|
-
height: element.height
|
|
32204
|
-
});
|
|
32205
|
-
}
|
|
32206
|
-
|
|
32207
|
-
return hit;
|
|
32208
|
-
};
|
|
32209
|
-
|
|
32210
|
-
this.fire = fire;
|
|
32211
|
-
|
|
32212
|
-
this.triggerMouseEvent = triggerMouseEvent;
|
|
32213
|
-
|
|
32214
|
-
this.mouseHandler = mouseHandler;
|
|
32215
|
-
|
|
32216
|
-
this.registerEvent = registerEvent;
|
|
32217
|
-
this.unregisterEvent = unregisterEvent;
|
|
32218
|
-
}
|
|
32219
|
-
|
|
32220
|
-
|
|
32221
|
-
InteractionEvents$1.$inject = [
|
|
32222
|
-
'eventBus',
|
|
32223
|
-
'elementRegistry',
|
|
32224
|
-
'styles'
|
|
32225
|
-
];
|
|
32226
|
-
|
|
32227
|
-
|
|
32228
|
-
/**
|
|
32229
|
-
* An event indicating that the mouse hovered over an element
|
|
32230
|
-
*
|
|
32231
|
-
* @event element.hover
|
|
32232
|
-
*
|
|
32233
|
-
* @type {Object}
|
|
32234
|
-
* @property {djs.model.Base} element
|
|
32235
|
-
* @property {SVGElement} gfx
|
|
32236
|
-
* @property {Event} originalEvent
|
|
32237
|
-
*/
|
|
32238
|
-
|
|
32239
|
-
/**
|
|
32240
|
-
* An event indicating that the mouse has left an element
|
|
32241
|
-
*
|
|
32242
|
-
* @event element.out
|
|
32243
|
-
*
|
|
32244
|
-
* @type {Object}
|
|
32245
|
-
* @property {djs.model.Base} element
|
|
32246
|
-
* @property {SVGElement} gfx
|
|
32247
|
-
* @property {Event} originalEvent
|
|
32248
|
-
*/
|
|
32249
|
-
|
|
32250
|
-
/**
|
|
32251
|
-
* An event indicating that the mouse has clicked an element
|
|
32252
|
-
*
|
|
32253
|
-
* @event element.click
|
|
32254
|
-
*
|
|
32255
|
-
* @type {Object}
|
|
32256
|
-
* @property {djs.model.Base} element
|
|
32257
|
-
* @property {SVGElement} gfx
|
|
32258
|
-
* @property {Event} originalEvent
|
|
32259
|
-
*/
|
|
32260
|
-
|
|
32261
|
-
/**
|
|
32262
|
-
* An event indicating that the mouse has double clicked an element
|
|
32263
|
-
*
|
|
32264
|
-
* @event element.dblclick
|
|
32265
|
-
*
|
|
32266
|
-
* @type {Object}
|
|
32267
|
-
* @property {djs.model.Base} element
|
|
32268
|
-
* @property {SVGElement} gfx
|
|
32269
|
-
* @property {Event} originalEvent
|
|
32270
|
-
*/
|
|
32271
|
-
|
|
32272
|
-
/**
|
|
32273
|
-
* An event indicating that the mouse has gone down on an element.
|
|
32274
|
-
*
|
|
32275
|
-
* @event element.mousedown
|
|
32276
|
-
*
|
|
32277
|
-
* @type {Object}
|
|
32278
|
-
* @property {djs.model.Base} element
|
|
32279
|
-
* @property {SVGElement} gfx
|
|
32280
|
-
* @property {Event} originalEvent
|
|
32281
|
-
*/
|
|
32282
|
-
|
|
32283
|
-
/**
|
|
32284
|
-
* An event indicating that the mouse has gone up on an element.
|
|
32285
|
-
*
|
|
32286
|
-
* @event element.mouseup
|
|
32287
|
-
*
|
|
32288
|
-
* @type {Object}
|
|
32289
|
-
* @property {djs.model.Base} element
|
|
32290
|
-
* @property {SVGElement} gfx
|
|
32291
|
-
* @property {Event} originalEvent
|
|
32292
|
-
*/
|
|
32293
|
-
|
|
32294
|
-
/**
|
|
32295
|
-
* An event indicating that the context menu action is triggered
|
|
32296
|
-
* via mouse or touch controls.
|
|
32297
|
-
*
|
|
32298
|
-
* @event element.contextmenu
|
|
32299
|
-
*
|
|
32300
|
-
* @type {Object}
|
|
32301
|
-
* @property {djs.model.Base} element
|
|
32302
|
-
* @property {SVGElement} gfx
|
|
32303
|
-
* @property {Event} originalEvent
|
|
32304
|
-
*/
|
|
32305
|
-
|
|
32306
|
-
var InteractionEventsModule$1 = {
|
|
32307
|
-
__init__: [ 'interactionEvents' ],
|
|
32308
|
-
interactionEvents: [ 'type', InteractionEvents$1 ]
|
|
32309
|
-
};
|
|
32310
|
-
|
|
32311
31797
|
var min = Math.min,
|
|
32312
31798
|
max$1 = Math.max;
|
|
32313
31799
|
|
|
@@ -32941,7 +32427,7 @@
|
|
|
32941
32427
|
|
|
32942
32428
|
var DirectEditingModule = {
|
|
32943
32429
|
__depends__: [
|
|
32944
|
-
InteractionEventsModule
|
|
32430
|
+
InteractionEventsModule
|
|
32945
32431
|
],
|
|
32946
32432
|
__init__: [ 'directEditing' ],
|
|
32947
32433
|
directEditing: [ 'type', DirectEditing ]
|
|
@@ -33894,7 +33380,7 @@
|
|
|
33894
33380
|
return !!element.labelTarget;
|
|
33895
33381
|
}
|
|
33896
33382
|
|
|
33897
|
-
var LOW_PRIORITY$
|
|
33383
|
+
var LOW_PRIORITY$7 = 750;
|
|
33898
33384
|
|
|
33899
33385
|
|
|
33900
33386
|
function CreatePreview(
|
|
@@ -33939,7 +33425,7 @@
|
|
|
33939
33425
|
return dragGroup;
|
|
33940
33426
|
}
|
|
33941
33427
|
|
|
33942
|
-
eventBus.on('create.move', LOW_PRIORITY$
|
|
33428
|
+
eventBus.on('create.move', LOW_PRIORITY$7, function(event) {
|
|
33943
33429
|
|
|
33944
33430
|
var hover = event.hover,
|
|
33945
33431
|
context = event.context,
|
|
@@ -35306,12 +34792,12 @@
|
|
|
35306
34792
|
});
|
|
35307
34793
|
}
|
|
35308
34794
|
|
|
35309
|
-
var LOW_PRIORITY$
|
|
34795
|
+
var LOW_PRIORITY$8 = 750;
|
|
35310
34796
|
|
|
35311
34797
|
|
|
35312
34798
|
function BpmnCopyPaste(bpmnFactory, eventBus, moddleCopy) {
|
|
35313
34799
|
|
|
35314
|
-
eventBus.on('copyPaste.copyElement', LOW_PRIORITY$
|
|
34800
|
+
eventBus.on('copyPaste.copyElement', LOW_PRIORITY$8, function(context) {
|
|
35315
34801
|
var descriptor = context.descriptor,
|
|
35316
34802
|
element = context.element;
|
|
35317
34803
|
|
|
@@ -37397,16 +36883,16 @@
|
|
|
37397
36883
|
var translate = this._translate;
|
|
37398
36884
|
|
|
37399
36885
|
function toggleLoopEntry(event, entry) {
|
|
37400
|
-
var loopCharacteristics;
|
|
36886
|
+
var loopCharacteristics = getBusinessObject(element).loopCharacteristics;
|
|
37401
36887
|
|
|
37402
36888
|
if (entry.active) {
|
|
37403
36889
|
loopCharacteristics = undefined;
|
|
37404
36890
|
} else {
|
|
37405
|
-
|
|
37406
|
-
|
|
37407
|
-
if (entry.options.isSequential) {
|
|
37408
|
-
loopCharacteristics.isSequential = entry.options.isSequential;
|
|
36891
|
+
if (isUndefined(entry.options.isSequential) || !loopCharacteristics) {
|
|
36892
|
+
loopCharacteristics = self._moddle.create(entry.options.loopCharacteristics);
|
|
37409
36893
|
}
|
|
36894
|
+
|
|
36895
|
+
loopCharacteristics.isSequential = entry.options.isSequential;
|
|
37410
36896
|
}
|
|
37411
36897
|
self._modeling.updateProperties(element, { loopCharacteristics: loopCharacteristics });
|
|
37412
36898
|
}
|
|
@@ -39119,7 +38605,7 @@
|
|
|
39119
38605
|
}
|
|
39120
38606
|
|
|
39121
38607
|
var LOWER_PRIORITY = 1200;
|
|
39122
|
-
var LOW_PRIORITY$
|
|
38608
|
+
var LOW_PRIORITY$9 = 800;
|
|
39123
38609
|
|
|
39124
38610
|
/**
|
|
39125
38611
|
* Basic grid snapping that covers connecting, creating, moving, resizing shapes, moving bendpoints
|
|
@@ -39133,7 +38619,7 @@
|
|
|
39133
38619
|
|
|
39134
38620
|
var self = this;
|
|
39135
38621
|
|
|
39136
|
-
eventBus.on('diagram.init', LOW_PRIORITY$
|
|
38622
|
+
eventBus.on('diagram.init', LOW_PRIORITY$9, function() {
|
|
39137
38623
|
self.setActive(active);
|
|
39138
38624
|
});
|
|
39139
38625
|
|
|
@@ -40024,7 +39510,7 @@
|
|
|
40024
39510
|
return true;
|
|
40025
39511
|
};
|
|
40026
39512
|
|
|
40027
|
-
var InteractionEventsModule$
|
|
39513
|
+
var InteractionEventsModule$1 = {
|
|
40028
39514
|
__init__: [ 'bpmnInteractionEvents' ],
|
|
40029
39515
|
bpmnInteractionEvents: [ 'type', BpmnInteractionEvents ]
|
|
40030
39516
|
};
|
|
@@ -40610,7 +40096,7 @@
|
|
|
40610
40096
|
var MARKER_RESIZING = 'djs-resizing',
|
|
40611
40097
|
MARKER_RESIZE_NOT_OK = 'resize-not-ok';
|
|
40612
40098
|
|
|
40613
|
-
var LOW_PRIORITY$
|
|
40099
|
+
var LOW_PRIORITY$a = 500;
|
|
40614
40100
|
|
|
40615
40101
|
|
|
40616
40102
|
/**
|
|
@@ -40671,7 +40157,7 @@
|
|
|
40671
40157
|
}
|
|
40672
40158
|
|
|
40673
40159
|
// add and update previews
|
|
40674
|
-
eventBus.on('resize.move', LOW_PRIORITY$
|
|
40160
|
+
eventBus.on('resize.move', LOW_PRIORITY$a, function(event) {
|
|
40675
40161
|
updateFrame(event.context);
|
|
40676
40162
|
});
|
|
40677
40163
|
|
|
@@ -41769,7 +41255,7 @@
|
|
|
41769
41255
|
'modeling'
|
|
41770
41256
|
];
|
|
41771
41257
|
|
|
41772
|
-
var LOW_PRIORITY$
|
|
41258
|
+
var LOW_PRIORITY$b = 500;
|
|
41773
41259
|
|
|
41774
41260
|
|
|
41775
41261
|
/**
|
|
@@ -41782,7 +41268,7 @@
|
|
|
41782
41268
|
|
|
41783
41269
|
var self = this;
|
|
41784
41270
|
|
|
41785
|
-
this.postExecuted('elements.create', LOW_PRIORITY$
|
|
41271
|
+
this.postExecuted('elements.create', LOW_PRIORITY$b, function(context) {
|
|
41786
41272
|
var elements = context.elements;
|
|
41787
41273
|
|
|
41788
41274
|
elements = elements.filter(function(shape) {
|
|
@@ -41805,7 +41291,7 @@
|
|
|
41805
41291
|
}, true);
|
|
41806
41292
|
|
|
41807
41293
|
|
|
41808
|
-
this.preExecute('elements.move', LOW_PRIORITY$
|
|
41294
|
+
this.preExecute('elements.move', LOW_PRIORITY$b, function(context) {
|
|
41809
41295
|
var shapes = context.shapes,
|
|
41810
41296
|
host = context.newHost;
|
|
41811
41297
|
|
|
@@ -42573,7 +42059,7 @@
|
|
|
42573
42059
|
}
|
|
42574
42060
|
}
|
|
42575
42061
|
|
|
42576
|
-
var LOW_PRIORITY$
|
|
42062
|
+
var LOW_PRIORITY$c = 500;
|
|
42577
42063
|
|
|
42578
42064
|
|
|
42579
42065
|
/**
|
|
@@ -42642,7 +42128,7 @@
|
|
|
42642
42128
|
/**
|
|
42643
42129
|
* Adjust sizes of other lanes after lane deletion
|
|
42644
42130
|
*/
|
|
42645
|
-
this.postExecuted('shape.delete', LOW_PRIORITY$
|
|
42131
|
+
this.postExecuted('shape.delete', LOW_PRIORITY$c, function(event) {
|
|
42646
42132
|
|
|
42647
42133
|
var context = event.context,
|
|
42648
42134
|
hints = context.hints,
|
|
@@ -42671,7 +42157,7 @@
|
|
|
42671
42157
|
|
|
42672
42158
|
inherits_browser(DeleteLaneBehavior, CommandInterceptor);
|
|
42673
42159
|
|
|
42674
|
-
var LOW_PRIORITY$
|
|
42160
|
+
var LOW_PRIORITY$d = 500;
|
|
42675
42161
|
|
|
42676
42162
|
|
|
42677
42163
|
/**
|
|
@@ -42684,7 +42170,7 @@
|
|
|
42684
42170
|
|
|
42685
42171
|
var self = this;
|
|
42686
42172
|
|
|
42687
|
-
this.postExecuted('elements.create', LOW_PRIORITY$
|
|
42173
|
+
this.postExecuted('elements.create', LOW_PRIORITY$d, function(context) {
|
|
42688
42174
|
var elements = context.elements;
|
|
42689
42175
|
|
|
42690
42176
|
elements.filter(function(shape) {
|
|
@@ -42698,7 +42184,7 @@
|
|
|
42698
42184
|
});
|
|
42699
42185
|
}, true);
|
|
42700
42186
|
|
|
42701
|
-
this.preExecute('elements.move', LOW_PRIORITY$
|
|
42187
|
+
this.preExecute('elements.move', LOW_PRIORITY$d, function(context) {
|
|
42702
42188
|
var shapes = context.shapes,
|
|
42703
42189
|
newHost = context.newHost;
|
|
42704
42190
|
|
|
@@ -44592,7 +44078,7 @@
|
|
|
44592
44078
|
}
|
|
44593
44079
|
|
|
44594
44080
|
function getWaypointsInsideBounds(waypoints, bounds) {
|
|
44595
|
-
var originalWaypoints = map(waypoints, getOriginal$
|
|
44081
|
+
var originalWaypoints = map(waypoints, getOriginal$1);
|
|
44596
44082
|
|
|
44597
44083
|
return filter(originalWaypoints, function(waypoint) {
|
|
44598
44084
|
return isInsideBounds(waypoint, bounds);
|
|
@@ -44609,7 +44095,7 @@
|
|
|
44609
44095
|
return getOrientation(bounds, point, 1) === 'intersect';
|
|
44610
44096
|
}
|
|
44611
44097
|
|
|
44612
|
-
function getOriginal$
|
|
44098
|
+
function getOriginal$1(point) {
|
|
44613
44099
|
return point.original || point;
|
|
44614
44100
|
}
|
|
44615
44101
|
|
|
@@ -45372,7 +44858,7 @@
|
|
|
45372
44858
|
'modeling'
|
|
45373
44859
|
];
|
|
45374
44860
|
|
|
45375
|
-
var LOW_PRIORITY$
|
|
44861
|
+
var LOW_PRIORITY$e = 500;
|
|
45376
44862
|
|
|
45377
44863
|
|
|
45378
44864
|
/**
|
|
@@ -45486,7 +44972,7 @@
|
|
|
45486
44972
|
}
|
|
45487
44973
|
});
|
|
45488
44974
|
|
|
45489
|
-
eventBus.on('copyPaste.pasteElement', LOW_PRIORITY$
|
|
44975
|
+
eventBus.on('copyPaste.pasteElement', LOW_PRIORITY$e, function(context) {
|
|
45490
44976
|
var descriptor = context.descriptor,
|
|
45491
44977
|
businessObject = descriptor.businessObject;
|
|
45492
44978
|
|
|
@@ -45643,7 +45129,7 @@
|
|
|
45643
45129
|
}
|
|
45644
45130
|
}
|
|
45645
45131
|
|
|
45646
|
-
var LOW_PRIORITY$
|
|
45132
|
+
var LOW_PRIORITY$f = 400;
|
|
45647
45133
|
var HIGH_PRIORITY$c = 600;
|
|
45648
45134
|
|
|
45649
45135
|
var DEFAULT_POSITION$1 = {
|
|
@@ -45897,7 +45383,7 @@
|
|
|
45897
45383
|
|
|
45898
45384
|
|
|
45899
45385
|
// create/remove plane for the subprocess
|
|
45900
|
-
this.executed('shape.toggleCollapse', LOW_PRIORITY$
|
|
45386
|
+
this.executed('shape.toggleCollapse', LOW_PRIORITY$f, function(context) {
|
|
45901
45387
|
var shape = context.shape;
|
|
45902
45388
|
|
|
45903
45389
|
if (!is$1(shape, 'bpmn:SubProcess')) {
|
|
@@ -45915,7 +45401,7 @@
|
|
|
45915
45401
|
|
|
45916
45402
|
|
|
45917
45403
|
// create/remove plane for the subprocess
|
|
45918
|
-
this.reverted('shape.toggleCollapse', LOW_PRIORITY$
|
|
45404
|
+
this.reverted('shape.toggleCollapse', LOW_PRIORITY$f, function(context) {
|
|
45919
45405
|
var shape = context.shape;
|
|
45920
45406
|
|
|
45921
45407
|
if (!is$1(shape, 'bpmn:SubProcess')) {
|
|
@@ -46199,7 +45685,7 @@
|
|
|
46199
45685
|
|
|
46200
45686
|
if (
|
|
46201
45687
|
!is$1(newShape, 'bpmn:SubProcess') ||
|
|
46202
|
-
!is$1(oldShape, 'bpmn:Task') ||
|
|
45688
|
+
! (is$1(oldShape, 'bpmn:Task') || is$1(oldShape, 'bpmn:CallActivity')) ||
|
|
46203
45689
|
!isExpanded(newShape)
|
|
46204
45690
|
) {
|
|
46205
45691
|
return;
|
|
@@ -46285,7 +45771,7 @@
|
|
|
46285
45771
|
'modeling',
|
|
46286
45772
|
];
|
|
46287
45773
|
|
|
46288
|
-
var LOW_PRIORITY$
|
|
45774
|
+
var LOW_PRIORITY$g = 500;
|
|
46289
45775
|
|
|
46290
45776
|
|
|
46291
45777
|
function ToggleElementCollapseBehaviour(
|
|
@@ -46343,7 +45829,7 @@
|
|
|
46343
45829
|
};
|
|
46344
45830
|
}
|
|
46345
45831
|
|
|
46346
|
-
this.executed([ 'shape.toggleCollapse' ], LOW_PRIORITY$
|
|
45832
|
+
this.executed([ 'shape.toggleCollapse' ], LOW_PRIORITY$g, function(e) {
|
|
46347
45833
|
|
|
46348
45834
|
var context = e.context,
|
|
46349
45835
|
shape = context.shape;
|
|
@@ -46366,7 +45852,7 @@
|
|
|
46366
45852
|
}
|
|
46367
45853
|
});
|
|
46368
45854
|
|
|
46369
|
-
this.reverted([ 'shape.toggleCollapse' ], LOW_PRIORITY$
|
|
45855
|
+
this.reverted([ 'shape.toggleCollapse' ], LOW_PRIORITY$g, function(e) {
|
|
46370
45856
|
|
|
46371
45857
|
var context = e.context;
|
|
46372
45858
|
var shape = context.shape;
|
|
@@ -46381,7 +45867,7 @@
|
|
|
46381
45867
|
}
|
|
46382
45868
|
});
|
|
46383
45869
|
|
|
46384
|
-
this.postExecuted([ 'shape.toggleCollapse' ], LOW_PRIORITY$
|
|
45870
|
+
this.postExecuted([ 'shape.toggleCollapse' ], LOW_PRIORITY$g, function(e) {
|
|
46385
45871
|
var shape = e.context.shape,
|
|
46386
45872
|
defaultSize = elementFactory.getDefaultSize(shape),
|
|
46387
45873
|
newBounds;
|
|
@@ -46519,7 +46005,7 @@
|
|
|
46519
46005
|
return sourceBo.get('default') === sequenceFlow;
|
|
46520
46006
|
}
|
|
46521
46007
|
|
|
46522
|
-
var LOW_PRIORITY$
|
|
46008
|
+
var LOW_PRIORITY$h = 500,
|
|
46523
46009
|
HIGH_PRIORITY$d = 5000;
|
|
46524
46010
|
|
|
46525
46011
|
|
|
@@ -46601,7 +46087,7 @@
|
|
|
46601
46087
|
initContext();
|
|
46602
46088
|
});
|
|
46603
46089
|
|
|
46604
|
-
this.postExecuted(laneRefUpdateEvents, LOW_PRIORITY$
|
|
46090
|
+
this.postExecuted(laneRefUpdateEvents, LOW_PRIORITY$h, function(event) {
|
|
46605
46091
|
releaseContext();
|
|
46606
46092
|
});
|
|
46607
46093
|
|
|
@@ -47936,7 +47422,7 @@
|
|
|
47936
47422
|
// render labels always on top
|
|
47937
47423
|
if (element.labelTarget) {
|
|
47938
47424
|
return {
|
|
47939
|
-
parent: canvas.findRoot(
|
|
47425
|
+
parent: canvas.findRoot(newParent) || canvas.getRootElement(),
|
|
47940
47426
|
index: -1
|
|
47941
47427
|
};
|
|
47942
47428
|
}
|
|
@@ -47985,7 +47471,7 @@
|
|
|
47985
47471
|
|
|
47986
47472
|
var OrderingModule = {
|
|
47987
47473
|
__depends__: [
|
|
47988
|
-
|
|
47474
|
+
translateModule
|
|
47989
47475
|
],
|
|
47990
47476
|
__init__: [ 'bpmnOrderingProvider' ],
|
|
47991
47477
|
bpmnOrderingProvider: [ 'type', BpmnOrderingProvider ]
|
|
@@ -48901,7 +48387,7 @@
|
|
|
48901
48387
|
return collection;
|
|
48902
48388
|
}
|
|
48903
48389
|
|
|
48904
|
-
var LOW_PRIORITY$
|
|
48390
|
+
var LOW_PRIORITY$i = 250,
|
|
48905
48391
|
HIGH_PRIORITY$f = 1400;
|
|
48906
48392
|
|
|
48907
48393
|
|
|
@@ -48932,7 +48418,7 @@
|
|
|
48932
48418
|
});
|
|
48933
48419
|
|
|
48934
48420
|
// add labels to visual's group
|
|
48935
|
-
movePreview && eventBus.on('shape.move.start', LOW_PRIORITY$
|
|
48421
|
+
movePreview && eventBus.on('shape.move.start', LOW_PRIORITY$i, function(e) {
|
|
48936
48422
|
|
|
48937
48423
|
var context = e.context,
|
|
48938
48424
|
shapes = context.shapes;
|
|
@@ -49061,7 +48547,7 @@
|
|
|
49061
48547
|
labelSupport: [ 'type', LabelSupport ]
|
|
49062
48548
|
};
|
|
49063
48549
|
|
|
49064
|
-
var LOW_PRIORITY$
|
|
48550
|
+
var LOW_PRIORITY$j = 251,
|
|
49065
48551
|
HIGH_PRIORITY$g = 1401;
|
|
49066
48552
|
|
|
49067
48553
|
var MARKER_ATTACH$1 = 'attach-ok';
|
|
@@ -49103,7 +48589,7 @@
|
|
|
49103
48589
|
});
|
|
49104
48590
|
|
|
49105
48591
|
// add attachers to the visual's group
|
|
49106
|
-
movePreview && eventBus.on('shape.move.start', LOW_PRIORITY$
|
|
48592
|
+
movePreview && eventBus.on('shape.move.start', LOW_PRIORITY$j, function(e) {
|
|
49107
48593
|
|
|
49108
48594
|
var context = e.context,
|
|
49109
48595
|
shapes = context.shapes,
|
|
@@ -49385,7 +48871,7 @@
|
|
|
49385
48871
|
attachSupport: [ 'type', AttachSupport ]
|
|
49386
48872
|
};
|
|
49387
48873
|
|
|
49388
|
-
var LOW_PRIORITY$
|
|
48874
|
+
var LOW_PRIORITY$k = 250;
|
|
49389
48875
|
|
|
49390
48876
|
/**
|
|
49391
48877
|
* The tool manager acts as middle-man between the available tool's and the Palette,
|
|
@@ -49461,7 +48947,7 @@
|
|
|
49461
48947
|
eventsToRegister.push(event + '.canceled');
|
|
49462
48948
|
});
|
|
49463
48949
|
|
|
49464
|
-
eventBus.on(eventsToRegister, LOW_PRIORITY$
|
|
48950
|
+
eventBus.on(eventsToRegister, LOW_PRIORITY$k, function(event) {
|
|
49465
48951
|
|
|
49466
48952
|
// We defer the de-activation of the tool to the .activate phase,
|
|
49467
48953
|
// so we're able to check if we want to toggle off the current
|
|
@@ -50090,7 +49576,7 @@
|
|
|
50090
49576
|
var MARKER_DRAGGING = 'djs-dragging',
|
|
50091
49577
|
MARKER_RESIZING$1 = 'djs-resizing';
|
|
50092
49578
|
|
|
50093
|
-
var LOW_PRIORITY$
|
|
49579
|
+
var LOW_PRIORITY$l = 250;
|
|
50094
49580
|
|
|
50095
49581
|
var max$6 = Math.max;
|
|
50096
49582
|
|
|
@@ -50165,7 +49651,7 @@
|
|
|
50165
49651
|
});
|
|
50166
49652
|
|
|
50167
49653
|
// add and update move/resize previews
|
|
50168
|
-
eventBus.on('spaceTool.move', LOW_PRIORITY$
|
|
49654
|
+
eventBus.on('spaceTool.move', LOW_PRIORITY$l, function(event) {
|
|
50169
49655
|
|
|
50170
49656
|
var context = event.context,
|
|
50171
49657
|
line = context.line,
|
|
@@ -54853,7 +54339,7 @@
|
|
|
54853
54339
|
}
|
|
54854
54340
|
|
|
54855
54341
|
if (!text && di.label) {
|
|
54856
|
-
di.label
|
|
54342
|
+
delete di.label;
|
|
54857
54343
|
}
|
|
54858
54344
|
}
|
|
54859
54345
|
|
|
@@ -56412,7 +55898,7 @@
|
|
|
56412
55898
|
connectionDocking: [ 'type', CroppingConnectionDocking ]
|
|
56413
55899
|
};
|
|
56414
55900
|
|
|
56415
|
-
var LOW_PRIORITY$
|
|
55901
|
+
var LOW_PRIORITY$m = 500,
|
|
56416
55902
|
MEDIUM_PRIORITY = 1250,
|
|
56417
55903
|
HIGH_PRIORITY$i = 1500;
|
|
56418
55904
|
|
|
@@ -56511,7 +55997,7 @@
|
|
|
56511
55997
|
// to let others modify the move event before we update
|
|
56512
55998
|
// the context
|
|
56513
55999
|
//
|
|
56514
|
-
eventBus.on('shape.move.move', LOW_PRIORITY$
|
|
56000
|
+
eventBus.on('shape.move.move', LOW_PRIORITY$m, function(event) {
|
|
56515
56001
|
|
|
56516
56002
|
var context = event.context,
|
|
56517
56003
|
validatedShapes = context.validatedShapes,
|
|
@@ -56657,7 +56143,7 @@
|
|
|
56657
56143
|
});
|
|
56658
56144
|
}
|
|
56659
56145
|
|
|
56660
|
-
var LOW_PRIORITY$
|
|
56146
|
+
var LOW_PRIORITY$n = 499;
|
|
56661
56147
|
|
|
56662
56148
|
var MARKER_DRAGGING$1 = 'djs-dragging',
|
|
56663
56149
|
MARKER_OK$3 = 'drop-ok',
|
|
@@ -56735,7 +56221,7 @@
|
|
|
56735
56221
|
// assign a low priority to this handler
|
|
56736
56222
|
// to let others modify the move context before
|
|
56737
56223
|
// we draw things
|
|
56738
|
-
eventBus.on('shape.move.start', LOW_PRIORITY$
|
|
56224
|
+
eventBus.on('shape.move.start', LOW_PRIORITY$n, function(event) {
|
|
56739
56225
|
var context = event.context,
|
|
56740
56226
|
dragShapes = context.shapes,
|
|
56741
56227
|
allDraggedElements = context.allDraggedElements;
|
|
@@ -56782,7 +56268,7 @@
|
|
|
56782
56268
|
});
|
|
56783
56269
|
|
|
56784
56270
|
// update previews
|
|
56785
|
-
eventBus.on('shape.move.move', LOW_PRIORITY$
|
|
56271
|
+
eventBus.on('shape.move.move', LOW_PRIORITY$n, function(event) {
|
|
56786
56272
|
|
|
56787
56273
|
var context = event.context,
|
|
56788
56274
|
dragGroup = context.dragGroup,
|
|
@@ -58125,13 +57611,13 @@
|
|
|
58125
57611
|
LassoToolModule,
|
|
58126
57612
|
HandToolModule,
|
|
58127
57613
|
GlobalConnectModule,
|
|
58128
|
-
|
|
57614
|
+
translateModule
|
|
58129
57615
|
],
|
|
58130
57616
|
__init__: [ 'paletteProvider' ],
|
|
58131
57617
|
paletteProvider: [ 'type', PaletteProvider ]
|
|
58132
57618
|
};
|
|
58133
57619
|
|
|
58134
|
-
var LOW_PRIORITY$
|
|
57620
|
+
var LOW_PRIORITY$o = 250;
|
|
58135
57621
|
|
|
58136
57622
|
|
|
58137
57623
|
function BpmnReplacePreview(
|
|
@@ -58212,7 +57698,7 @@
|
|
|
58212
57698
|
});
|
|
58213
57699
|
}
|
|
58214
57700
|
|
|
58215
|
-
eventBus.on('shape.move.move', LOW_PRIORITY$
|
|
57701
|
+
eventBus.on('shape.move.move', LOW_PRIORITY$o, function(event) {
|
|
58216
57702
|
|
|
58217
57703
|
var context = event.context,
|
|
58218
57704
|
canExecute = context.canExecute;
|
|
@@ -60142,7 +59628,7 @@
|
|
|
60142
59628
|
DistributeElementsModule$1,
|
|
60143
59629
|
EditorActionsModule$1,
|
|
60144
59630
|
GridSnappingModule$1,
|
|
60145
|
-
InteractionEventsModule$
|
|
59631
|
+
InteractionEventsModule$1,
|
|
60146
59632
|
KeyboardModule$1,
|
|
60147
59633
|
KeyboardMoveSelectionModule,
|
|
60148
59634
|
LabelEditingModule,
|
|
@@ -60168,24 +59654,6 @@
|
|
|
60168
59654
|
Modeler.prototype._modelingModules
|
|
60169
59655
|
);
|
|
60170
59656
|
|
|
60171
|
-
/**
|
|
60172
|
-
* SVGs for elements are generated by the {@link GraphicsFactory}.
|
|
60173
|
-
*
|
|
60174
|
-
* This utility gives quick access to the important semantic
|
|
60175
|
-
* parts of an element.
|
|
60176
|
-
*/
|
|
60177
|
-
|
|
60178
|
-
/**
|
|
60179
|
-
* Returns the visual part of a diagram element
|
|
60180
|
-
*
|
|
60181
|
-
* @param {Snap<SVGElement>} gfx
|
|
60182
|
-
*
|
|
60183
|
-
* @return {Snap<SVGElement>}
|
|
60184
|
-
*/
|
|
60185
|
-
function getVisual$1(gfx) {
|
|
60186
|
-
return gfx.childNodes[0];
|
|
60187
|
-
}
|
|
60188
|
-
|
|
60189
59657
|
var MINIMAP_VIEWBOX_PADDING = 50;
|
|
60190
59658
|
|
|
60191
59659
|
var RANGE$1 = { min: 0.2, max: 4 },
|
|
@@ -60193,7 +59661,7 @@
|
|
|
60193
59661
|
|
|
60194
59662
|
var DELTA_THRESHOLD$1 = 0.1;
|
|
60195
59663
|
|
|
60196
|
-
var LOW_PRIORITY$
|
|
59664
|
+
var LOW_PRIORITY$p = 250;
|
|
60197
59665
|
|
|
60198
59666
|
|
|
60199
59667
|
/**
|
|
@@ -60467,7 +59935,7 @@
|
|
|
60467
59935
|
});
|
|
60468
59936
|
|
|
60469
59937
|
// update on elements changed
|
|
60470
|
-
eventBus.on('elements.changed', LOW_PRIORITY$
|
|
59938
|
+
eventBus.on('elements.changed', LOW_PRIORITY$p, function(context) {
|
|
60471
59939
|
var elements = context.elements;
|
|
60472
59940
|
|
|
60473
59941
|
elements.forEach(function(element) {
|
|
@@ -60853,7 +60321,7 @@
|
|
|
60853
60321
|
visual;
|
|
60854
60322
|
|
|
60855
60323
|
if (gfx) {
|
|
60856
|
-
visual = getVisual
|
|
60324
|
+
visual = getVisual(gfx);
|
|
60857
60325
|
|
|
60858
60326
|
if (visual) {
|
|
60859
60327
|
var elementGfx = clone(visual);
|
|
@@ -61699,19 +61167,19 @@
|
|
|
61699
61167
|
getDescriptionForId: () => {}
|
|
61700
61168
|
});
|
|
61701
61169
|
|
|
61702
|
-
/**
|
|
61703
|
-
* @typedef {Function} <propertiesPanel.showEntry> callback
|
|
61704
|
-
*
|
|
61705
|
-
* @example
|
|
61706
|
-
*
|
|
61707
|
-
* useEvent('propertiesPanel.showEntry', ({ focus = false, ...rest }) => {
|
|
61708
|
-
* // ...
|
|
61709
|
-
* });
|
|
61710
|
-
*
|
|
61711
|
-
* @param {Object} context
|
|
61712
|
-
* @param {boolean} [context.focus]
|
|
61713
|
-
*
|
|
61714
|
-
* @returns void
|
|
61170
|
+
/**
|
|
61171
|
+
* @typedef {Function} <propertiesPanel.showEntry> callback
|
|
61172
|
+
*
|
|
61173
|
+
* @example
|
|
61174
|
+
*
|
|
61175
|
+
* useEvent('propertiesPanel.showEntry', ({ focus = false, ...rest }) => {
|
|
61176
|
+
* // ...
|
|
61177
|
+
* });
|
|
61178
|
+
*
|
|
61179
|
+
* @param {Object} context
|
|
61180
|
+
* @param {boolean} [context.focus]
|
|
61181
|
+
*
|
|
61182
|
+
* @returns void
|
|
61715
61183
|
*/
|
|
61716
61184
|
const EventContext = q({
|
|
61717
61185
|
eventBus: null
|
|
@@ -61724,20 +61192,20 @@
|
|
|
61724
61192
|
setLayoutForKey: () => {}
|
|
61725
61193
|
});
|
|
61726
61194
|
|
|
61727
|
-
/**
|
|
61728
|
-
* Accesses the global DescriptionContext and returns a description for a given id and element.
|
|
61729
|
-
*
|
|
61730
|
-
* @example
|
|
61731
|
-
* ```jsx
|
|
61732
|
-
* function TextField(props) {
|
|
61733
|
-
* const description = useDescriptionContext('input1', element);
|
|
61734
|
-
* }
|
|
61735
|
-
* ```
|
|
61736
|
-
*
|
|
61737
|
-
* @param {string} id
|
|
61738
|
-
* @param {djs.model.Base} element
|
|
61739
|
-
*
|
|
61740
|
-
* @returns {string}
|
|
61195
|
+
/**
|
|
61196
|
+
* Accesses the global DescriptionContext and returns a description for a given id and element.
|
|
61197
|
+
*
|
|
61198
|
+
* @example
|
|
61199
|
+
* ```jsx
|
|
61200
|
+
* function TextField(props) {
|
|
61201
|
+
* const description = useDescriptionContext('input1', element);
|
|
61202
|
+
* }
|
|
61203
|
+
* ```
|
|
61204
|
+
*
|
|
61205
|
+
* @param {string} id
|
|
61206
|
+
* @param {djs.model.Base} element
|
|
61207
|
+
*
|
|
61208
|
+
* @returns {string}
|
|
61741
61209
|
*/
|
|
61742
61210
|
|
|
61743
61211
|
function useDescriptionContext(id, element) {
|
|
@@ -61748,14 +61216,14 @@
|
|
|
61748
61216
|
}
|
|
61749
61217
|
|
|
61750
61218
|
const DEFAULT_PRIORITY$6 = 1000;
|
|
61751
|
-
/**
|
|
61752
|
-
* Subscribe to an event.
|
|
61753
|
-
*
|
|
61754
|
-
* @param {string} event
|
|
61755
|
-
* @param {Function} callback
|
|
61756
|
-
* @param {number} [priority]
|
|
61757
|
-
*
|
|
61758
|
-
* @returns {import('preact').Ref}
|
|
61219
|
+
/**
|
|
61220
|
+
* Subscribe to an event.
|
|
61221
|
+
*
|
|
61222
|
+
* @param {string} event
|
|
61223
|
+
* @param {Function} callback
|
|
61224
|
+
* @param {number} [priority]
|
|
61225
|
+
*
|
|
61226
|
+
* @returns {import('preact').Ref}
|
|
61759
61227
|
*/
|
|
61760
61228
|
|
|
61761
61229
|
function useEvent(event, callback, priority = DEFAULT_PRIORITY$6) {
|
|
@@ -61773,11 +61241,11 @@
|
|
|
61773
61241
|
}
|
|
61774
61242
|
|
|
61775
61243
|
const HIGH_PRIORITY$l = 10000;
|
|
61776
|
-
/**
|
|
61777
|
-
* Buffer events and re-fire during passive effect phase.
|
|
61778
|
-
*
|
|
61779
|
-
* @param {string[]} bufferedEvents
|
|
61780
|
-
* @param {Object} [eventBus]
|
|
61244
|
+
/**
|
|
61245
|
+
* Buffer events and re-fire during passive effect phase.
|
|
61246
|
+
*
|
|
61247
|
+
* @param {string[]} bufferedEvents
|
|
61248
|
+
* @param {Object} [eventBus]
|
|
61781
61249
|
*/
|
|
61782
61250
|
|
|
61783
61251
|
function useEventBuffer(bufferedEvents, eventBus) {
|
|
@@ -61825,20 +61293,20 @@
|
|
|
61825
61293
|
});
|
|
61826
61294
|
}
|
|
61827
61295
|
|
|
61828
|
-
/**
|
|
61829
|
-
* Creates a state that persists in the global LayoutContext.
|
|
61830
|
-
*
|
|
61831
|
-
* @example
|
|
61832
|
-
* ```jsx
|
|
61833
|
-
* function Group(props) {
|
|
61834
|
-
* const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
|
|
61835
|
-
* }
|
|
61836
|
-
* ```
|
|
61837
|
-
*
|
|
61838
|
-
* @param {(string|number)[]} path
|
|
61839
|
-
* @param {any} [defaultValue]
|
|
61840
|
-
*
|
|
61841
|
-
* @returns {[ any, Function ]}
|
|
61296
|
+
/**
|
|
61297
|
+
* Creates a state that persists in the global LayoutContext.
|
|
61298
|
+
*
|
|
61299
|
+
* @example
|
|
61300
|
+
* ```jsx
|
|
61301
|
+
* function Group(props) {
|
|
61302
|
+
* const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
|
|
61303
|
+
* }
|
|
61304
|
+
* ```
|
|
61305
|
+
*
|
|
61306
|
+
* @param {(string|number)[]} path
|
|
61307
|
+
* @param {any} [defaultValue]
|
|
61308
|
+
*
|
|
61309
|
+
* @returns {[ any, Function ]}
|
|
61842
61310
|
*/
|
|
61843
61311
|
|
|
61844
61312
|
function useLayoutState(path, defaultValue) {
|
|
@@ -61859,11 +61327,11 @@
|
|
|
61859
61327
|
return [value, setState];
|
|
61860
61328
|
}
|
|
61861
61329
|
|
|
61862
|
-
/**
|
|
61863
|
-
* @pinussilvestrus: we need to introduce our own hook to persist the previous
|
|
61864
|
-
* state on updates.
|
|
61865
|
-
*
|
|
61866
|
-
* cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
|
|
61330
|
+
/**
|
|
61331
|
+
* @pinussilvestrus: we need to introduce our own hook to persist the previous
|
|
61332
|
+
* state on updates.
|
|
61333
|
+
*
|
|
61334
|
+
* cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
|
|
61867
61335
|
*/
|
|
61868
61336
|
|
|
61869
61337
|
function usePrevious(value) {
|
|
@@ -61874,12 +61342,12 @@
|
|
|
61874
61342
|
return ref.current;
|
|
61875
61343
|
}
|
|
61876
61344
|
|
|
61877
|
-
/**
|
|
61878
|
-
* Subscribe to `propertiesPanel.showEntry`.
|
|
61879
|
-
*
|
|
61880
|
-
* @param {Function} show
|
|
61881
|
-
*
|
|
61882
|
-
* @returns {import('preact').Ref}
|
|
61345
|
+
/**
|
|
61346
|
+
* Subscribe to `propertiesPanel.showEntry`.
|
|
61347
|
+
*
|
|
61348
|
+
* @param {Function} show
|
|
61349
|
+
*
|
|
61350
|
+
* @returns {import('preact').Ref}
|
|
61883
61351
|
*/
|
|
61884
61352
|
|
|
61885
61353
|
function useShowEntryEvent(show) {
|
|
@@ -61916,14 +61384,14 @@
|
|
|
61916
61384
|
return ref;
|
|
61917
61385
|
}
|
|
61918
61386
|
|
|
61919
|
-
/**
|
|
61920
|
-
* Subscribe to `propertiesPanel.showError`. On `propertiesPanel.showError` set
|
|
61921
|
-
* temporary error. Fire `propertiesPanel.showEntry` for temporary error to be
|
|
61922
|
-
* visible. Unset error on `propertiesPanel.updated`.
|
|
61923
|
-
*
|
|
61924
|
-
* @param {Function} show
|
|
61925
|
-
*
|
|
61926
|
-
* @returns {import('preact').Ref}
|
|
61387
|
+
/**
|
|
61388
|
+
* Subscribe to `propertiesPanel.showError`. On `propertiesPanel.showError` set
|
|
61389
|
+
* temporary error. Fire `propertiesPanel.showEntry` for temporary error to be
|
|
61390
|
+
* visible. Unset error on `propertiesPanel.updated`.
|
|
61391
|
+
*
|
|
61392
|
+
* @param {Function} show
|
|
61393
|
+
*
|
|
61394
|
+
* @returns {import('preact').Ref}
|
|
61927
61395
|
*/
|
|
61928
61396
|
|
|
61929
61397
|
function useShowErrorEvent(show) {
|
|
@@ -62034,66 +61502,66 @@
|
|
|
62034
61502
|
};
|
|
62035
61503
|
const DEFAULT_DESCRIPTION = {};
|
|
62036
61504
|
const bufferedEvents = ['propertiesPanel.showEntry', 'propertiesPanel.showError'];
|
|
62037
|
-
/**
|
|
62038
|
-
* @typedef { {
|
|
62039
|
-
* component: import('preact').Component,
|
|
62040
|
-
* id: String,
|
|
62041
|
-
* isEdited?: Function
|
|
62042
|
-
* } } EntryDefinition
|
|
62043
|
-
*
|
|
62044
|
-
* @typedef { {
|
|
62045
|
-
* autoFocusEntry: String,
|
|
62046
|
-
* autoOpen?: Boolean,
|
|
62047
|
-
* entries: Array<EntryDefinition>,
|
|
62048
|
-
* id: String,
|
|
62049
|
-
* label: String,
|
|
62050
|
-
* remove: (event: MouseEvent) => void
|
|
62051
|
-
* } } ListItemDefinition
|
|
62052
|
-
*
|
|
62053
|
-
* @typedef { {
|
|
62054
|
-
* add: (event: MouseEvent) => void,
|
|
62055
|
-
* component: import('preact').Component,
|
|
62056
|
-
* element: Object,
|
|
62057
|
-
* id: String,
|
|
62058
|
-
* items: Array<ListItemDefinition>,
|
|
62059
|
-
* label: String,
|
|
62060
|
-
* shouldSort?: Boolean,
|
|
62061
|
-
* shouldOpen?: Boolean
|
|
62062
|
-
* } } ListGroupDefinition
|
|
62063
|
-
*
|
|
62064
|
-
* @typedef { {
|
|
62065
|
-
* component?: import('preact').Component,
|
|
62066
|
-
* entries: Array<EntryDefinition>,
|
|
62067
|
-
* id: String,
|
|
62068
|
-
* label: String,
|
|
62069
|
-
* shouldOpen?: Boolean
|
|
62070
|
-
* } } GroupDefinition
|
|
62071
|
-
*
|
|
62072
|
-
* @typedef { {
|
|
62073
|
-
* [id: String]: GetDescriptionFunction
|
|
62074
|
-
* } } DescriptionConfig
|
|
62075
|
-
*
|
|
62076
|
-
* @callback { {
|
|
62077
|
-
* @param {string} id
|
|
62078
|
-
* @param {djs.model.base} element
|
|
62079
|
-
* @returns {string}
|
|
62080
|
-
* } } GetDescriptionFunction
|
|
62081
|
-
*
|
|
61505
|
+
/**
|
|
61506
|
+
* @typedef { {
|
|
61507
|
+
* component: import('preact').Component,
|
|
61508
|
+
* id: String,
|
|
61509
|
+
* isEdited?: Function
|
|
61510
|
+
* } } EntryDefinition
|
|
61511
|
+
*
|
|
61512
|
+
* @typedef { {
|
|
61513
|
+
* autoFocusEntry: String,
|
|
61514
|
+
* autoOpen?: Boolean,
|
|
61515
|
+
* entries: Array<EntryDefinition>,
|
|
61516
|
+
* id: String,
|
|
61517
|
+
* label: String,
|
|
61518
|
+
* remove: (event: MouseEvent) => void
|
|
61519
|
+
* } } ListItemDefinition
|
|
61520
|
+
*
|
|
61521
|
+
* @typedef { {
|
|
61522
|
+
* add: (event: MouseEvent) => void,
|
|
61523
|
+
* component: import('preact').Component,
|
|
61524
|
+
* element: Object,
|
|
61525
|
+
* id: String,
|
|
61526
|
+
* items: Array<ListItemDefinition>,
|
|
61527
|
+
* label: String,
|
|
61528
|
+
* shouldSort?: Boolean,
|
|
61529
|
+
* shouldOpen?: Boolean
|
|
61530
|
+
* } } ListGroupDefinition
|
|
61531
|
+
*
|
|
61532
|
+
* @typedef { {
|
|
61533
|
+
* component?: import('preact').Component,
|
|
61534
|
+
* entries: Array<EntryDefinition>,
|
|
61535
|
+
* id: String,
|
|
61536
|
+
* label: String,
|
|
61537
|
+
* shouldOpen?: Boolean
|
|
61538
|
+
* } } GroupDefinition
|
|
61539
|
+
*
|
|
61540
|
+
* @typedef { {
|
|
61541
|
+
* [id: String]: GetDescriptionFunction
|
|
61542
|
+
* } } DescriptionConfig
|
|
61543
|
+
*
|
|
61544
|
+
* @callback { {
|
|
61545
|
+
* @param {string} id
|
|
61546
|
+
* @param {djs.model.base} element
|
|
61547
|
+
* @returns {string}
|
|
61548
|
+
* } } GetDescriptionFunction
|
|
61549
|
+
*
|
|
62082
61550
|
*/
|
|
62083
61551
|
|
|
62084
|
-
/**
|
|
62085
|
-
* A basic properties panel component. Describes *how* content will be rendered, accepts
|
|
62086
|
-
* data from implementor to describe *what* will be rendered.
|
|
62087
|
-
*
|
|
62088
|
-
* @param {Object} props
|
|
62089
|
-
* @param {Object} props.element
|
|
62090
|
-
* @param {import('./components/Header').HeaderProvider} props.headerProvider
|
|
62091
|
-
* @param {Array<GroupDefinition|ListGroupDefinition>} props.groups
|
|
62092
|
-
* @param {Object} [props.layoutConfig]
|
|
62093
|
-
* @param {Function} [props.layoutChanged]
|
|
62094
|
-
* @param {DescriptionConfig} [props.descriptionConfig]
|
|
62095
|
-
* @param {Function} [props.descriptionLoaded]
|
|
62096
|
-
* @param {Object} [props.eventBus]
|
|
61552
|
+
/**
|
|
61553
|
+
* A basic properties panel component. Describes *how* content will be rendered, accepts
|
|
61554
|
+
* data from implementor to describe *what* will be rendered.
|
|
61555
|
+
*
|
|
61556
|
+
* @param {Object} props
|
|
61557
|
+
* @param {Object} props.element
|
|
61558
|
+
* @param {import('./components/Header').HeaderProvider} props.headerProvider
|
|
61559
|
+
* @param {Array<GroupDefinition|ListGroupDefinition>} props.groups
|
|
61560
|
+
* @param {Object} [props.layoutConfig]
|
|
61561
|
+
* @param {Function} [props.layoutChanged]
|
|
61562
|
+
* @param {DescriptionConfig} [props.descriptionConfig]
|
|
61563
|
+
* @param {Function} [props.descriptionLoaded]
|
|
61564
|
+
* @param {Object} [props.eventBus]
|
|
62097
61565
|
*/
|
|
62098
61566
|
|
|
62099
61567
|
function PropertiesPanel(props) {
|
|
@@ -62274,17 +61742,17 @@
|
|
|
62274
61742
|
children: item.entry
|
|
62275
61743
|
});
|
|
62276
61744
|
}
|
|
62277
|
-
/**
|
|
62278
|
-
*
|
|
62279
|
-
* @param {Array<null | Element>} ignoredElements
|
|
62280
|
-
* @param {Function} callback
|
|
61745
|
+
/**
|
|
61746
|
+
*
|
|
61747
|
+
* @param {Array<null | Element>} ignoredElements
|
|
61748
|
+
* @param {Function} callback
|
|
62281
61749
|
*/
|
|
62282
61750
|
|
|
62283
61751
|
|
|
62284
61752
|
function useGlobalClick(ignoredElements, callback) {
|
|
62285
61753
|
y$1(() => {
|
|
62286
|
-
/**
|
|
62287
|
-
* @param {MouseEvent} event
|
|
61754
|
+
/**
|
|
61755
|
+
* @param {MouseEvent} event
|
|
62288
61756
|
*/
|
|
62289
61757
|
function listener(event) {
|
|
62290
61758
|
if (ignoredElements.some(element => element && element.contains(event.target))) {
|
|
@@ -62414,8 +61882,8 @@
|
|
|
62414
61882
|
}
|
|
62415
61883
|
|
|
62416
61884
|
const noop$3 = () => {};
|
|
62417
|
-
/**
|
|
62418
|
-
* @param {import('../PropertiesPanel').ListGroupDefinition} props
|
|
61885
|
+
/**
|
|
61886
|
+
* @param {import('../PropertiesPanel').ListGroupDefinition} props
|
|
62419
61887
|
*/
|
|
62420
61888
|
|
|
62421
61889
|
|
|
@@ -62568,8 +62036,8 @@
|
|
|
62568
62036
|
});
|
|
62569
62037
|
} // helpers ////////////////////
|
|
62570
62038
|
|
|
62571
|
-
/**
|
|
62572
|
-
* Sorts given items alphanumeric by label
|
|
62039
|
+
/**
|
|
62040
|
+
* Sorts given items alphanumeric by label
|
|
62573
62041
|
*/
|
|
62574
62042
|
|
|
62575
62043
|
function sortItems(items) {
|
|
@@ -62638,15 +62106,15 @@
|
|
|
62638
62106
|
})]
|
|
62639
62107
|
});
|
|
62640
62108
|
}
|
|
62641
|
-
/**
|
|
62642
|
-
* @param {Object} props
|
|
62643
|
-
* @param {Object} props.element
|
|
62644
|
-
* @param {String} props.id
|
|
62645
|
-
* @param {String} props.description
|
|
62646
|
-
* @param {String} props.label
|
|
62647
|
-
* @param {Function} props.getValue
|
|
62648
|
-
* @param {Function} props.setValue
|
|
62649
|
-
* @param {boolean} [props.disabled]
|
|
62109
|
+
/**
|
|
62110
|
+
* @param {Object} props
|
|
62111
|
+
* @param {Object} props.element
|
|
62112
|
+
* @param {String} props.id
|
|
62113
|
+
* @param {String} props.description
|
|
62114
|
+
* @param {String} props.label
|
|
62115
|
+
* @param {Function} props.getValue
|
|
62116
|
+
* @param {Function} props.setValue
|
|
62117
|
+
* @param {boolean} [props.disabled]
|
|
62650
62118
|
*/
|
|
62651
62119
|
|
|
62652
62120
|
|
|
@@ -62692,21 +62160,21 @@
|
|
|
62692
62160
|
}
|
|
62693
62161
|
|
|
62694
62162
|
const noop$1 = () => {};
|
|
62695
|
-
/**
|
|
62696
|
-
* @typedef { { value: string, label: string, disabled: boolean } } Option
|
|
62163
|
+
/**
|
|
62164
|
+
* @typedef { { value: string, label: string, disabled: boolean } } Option
|
|
62697
62165
|
*/
|
|
62698
62166
|
|
|
62699
|
-
/**
|
|
62700
|
-
* Provides basic select input.
|
|
62701
|
-
*
|
|
62702
|
-
* @param {object} props
|
|
62703
|
-
* @param {string} props.id
|
|
62704
|
-
* @param {string[]} props.path
|
|
62705
|
-
* @param {string} props.label
|
|
62706
|
-
* @param {Function} props.onChange
|
|
62707
|
-
* @param {Array<Option>} [props.options]
|
|
62708
|
-
* @param {string} props.value
|
|
62709
|
-
* @param {boolean} [props.disabled]
|
|
62167
|
+
/**
|
|
62168
|
+
* Provides basic select input.
|
|
62169
|
+
*
|
|
62170
|
+
* @param {object} props
|
|
62171
|
+
* @param {string} props.id
|
|
62172
|
+
* @param {string[]} props.path
|
|
62173
|
+
* @param {string} props.label
|
|
62174
|
+
* @param {Function} props.onChange
|
|
62175
|
+
* @param {Array<Option>} [props.options]
|
|
62176
|
+
* @param {string} props.value
|
|
62177
|
+
* @param {boolean} [props.disabled]
|
|
62710
62178
|
*/
|
|
62711
62179
|
|
|
62712
62180
|
|
|
@@ -62752,16 +62220,16 @@
|
|
|
62752
62220
|
})]
|
|
62753
62221
|
});
|
|
62754
62222
|
}
|
|
62755
|
-
/**
|
|
62756
|
-
* @param {object} props
|
|
62757
|
-
* @param {object} props.element
|
|
62758
|
-
* @param {string} props.id
|
|
62759
|
-
* @param {string} [props.description]
|
|
62760
|
-
* @param {string} props.label
|
|
62761
|
-
* @param {Function} props.getValue
|
|
62762
|
-
* @param {Function} props.setValue
|
|
62763
|
-
* @param {Function} props.getOptions
|
|
62764
|
-
* @param {boolean} [props.disabled]
|
|
62223
|
+
/**
|
|
62224
|
+
* @param {object} props
|
|
62225
|
+
* @param {object} props.element
|
|
62226
|
+
* @param {string} props.id
|
|
62227
|
+
* @param {string} [props.description]
|
|
62228
|
+
* @param {string} props.label
|
|
62229
|
+
* @param {Function} props.getValue
|
|
62230
|
+
* @param {Function} props.setValue
|
|
62231
|
+
* @param {Function} props.getOptions
|
|
62232
|
+
* @param {boolean} [props.disabled]
|
|
62765
62233
|
*/
|
|
62766
62234
|
|
|
62767
62235
|
|
|
@@ -62863,18 +62331,18 @@
|
|
|
62863
62331
|
})]
|
|
62864
62332
|
});
|
|
62865
62333
|
}
|
|
62866
|
-
/**
|
|
62867
|
-
* @param {object} props
|
|
62868
|
-
* @param {object} props.element
|
|
62869
|
-
* @param {string} props.id
|
|
62870
|
-
* @param {string} props.description
|
|
62871
|
-
* @param {boolean} props.debounce
|
|
62872
|
-
* @param {string} props.label
|
|
62873
|
-
* @param {Function} props.getValue
|
|
62874
|
-
* @param {Function} props.setValue
|
|
62875
|
-
* @param {number} props.rows
|
|
62876
|
-
* @param {boolean} props.monospace
|
|
62877
|
-
* @param {boolean} [props.disabled]
|
|
62334
|
+
/**
|
|
62335
|
+
* @param {object} props
|
|
62336
|
+
* @param {object} props.element
|
|
62337
|
+
* @param {string} props.id
|
|
62338
|
+
* @param {string} props.description
|
|
62339
|
+
* @param {boolean} props.debounce
|
|
62340
|
+
* @param {string} props.label
|
|
62341
|
+
* @param {Function} props.getValue
|
|
62342
|
+
* @param {Function} props.setValue
|
|
62343
|
+
* @param {number} props.rows
|
|
62344
|
+
* @param {boolean} props.monospace
|
|
62345
|
+
* @param {boolean} [props.disabled]
|
|
62878
62346
|
*/
|
|
62879
62347
|
|
|
62880
62348
|
|
|
@@ -62965,17 +62433,17 @@
|
|
|
62965
62433
|
})]
|
|
62966
62434
|
});
|
|
62967
62435
|
}
|
|
62968
|
-
/**
|
|
62969
|
-
* @param {Object} props
|
|
62970
|
-
* @param {Object} props.element
|
|
62971
|
-
* @param {String} props.id
|
|
62972
|
-
* @param {String} props.description
|
|
62973
|
-
* @param {Boolean} props.debounce
|
|
62974
|
-
* @param {Boolean} props.disabled
|
|
62975
|
-
* @param {String} props.label
|
|
62976
|
-
* @param {Function} props.getValue
|
|
62977
|
-
* @param {Function} props.setValue
|
|
62978
|
-
* @param {Function} props.validate
|
|
62436
|
+
/**
|
|
62437
|
+
* @param {Object} props
|
|
62438
|
+
* @param {Object} props.element
|
|
62439
|
+
* @param {String} props.id
|
|
62440
|
+
* @param {String} props.description
|
|
62441
|
+
* @param {Boolean} props.debounce
|
|
62442
|
+
* @param {Boolean} props.disabled
|
|
62443
|
+
* @param {String} props.label
|
|
62444
|
+
* @param {Function} props.getValue
|
|
62445
|
+
* @param {Function} props.setValue
|
|
62446
|
+
* @param {Function} props.validate
|
|
62979
62447
|
*/
|
|
62980
62448
|
|
|
62981
62449
|
|
|
@@ -63096,15 +62564,15 @@
|
|
|
63096
62564
|
})]
|
|
63097
62565
|
});
|
|
63098
62566
|
}
|
|
63099
|
-
/**
|
|
63100
|
-
* @param {Object} props
|
|
63101
|
-
* @param {Object} props.element
|
|
63102
|
-
* @param {String} props.id
|
|
63103
|
-
* @param {String} props.description
|
|
63104
|
-
* @param {String} props.label
|
|
63105
|
-
* @param {String} props.switcherLabel
|
|
63106
|
-
* @param {Function} props.getValue
|
|
63107
|
-
* @param {Function} props.setValue
|
|
62567
|
+
/**
|
|
62568
|
+
* @param {Object} props
|
|
62569
|
+
* @param {Object} props.element
|
|
62570
|
+
* @param {String} props.id
|
|
62571
|
+
* @param {String} props.description
|
|
62572
|
+
* @param {String} props.label
|
|
62573
|
+
* @param {String} props.switcherLabel
|
|
62574
|
+
* @param {Function} props.getValue
|
|
62575
|
+
* @param {Function} props.setValue
|
|
63108
62576
|
*/
|
|
63109
62577
|
|
|
63110
62578
|
|
|
@@ -63299,97 +62767,6 @@
|
|
|
63299
62767
|
return path.join(separator);
|
|
63300
62768
|
}
|
|
63301
62769
|
|
|
63302
|
-
/**
|
|
63303
|
-
* Failsafe remove an element from a collection
|
|
63304
|
-
*
|
|
63305
|
-
* @param {Array<Object>} [collection]
|
|
63306
|
-
* @param {Object} [element]
|
|
63307
|
-
*
|
|
63308
|
-
* @return {number} the previous index of the element
|
|
63309
|
-
*/
|
|
63310
|
-
|
|
63311
|
-
/**
|
|
63312
|
-
* Fail save add an element to the given connection, ensuring
|
|
63313
|
-
* it does not yet exist.
|
|
63314
|
-
*
|
|
63315
|
-
* @param {Array<Object>} collection
|
|
63316
|
-
* @param {Object} element
|
|
63317
|
-
* @param {number} idx
|
|
63318
|
-
*/
|
|
63319
|
-
function add$2(collection, element, idx) {
|
|
63320
|
-
|
|
63321
|
-
if (!collection || !element) {
|
|
63322
|
-
return;
|
|
63323
|
-
}
|
|
63324
|
-
|
|
63325
|
-
if (typeof idx !== 'number') {
|
|
63326
|
-
idx = -1;
|
|
63327
|
-
}
|
|
63328
|
-
|
|
63329
|
-
var currentIdx = collection.indexOf(element);
|
|
63330
|
-
|
|
63331
|
-
if (currentIdx !== -1) {
|
|
63332
|
-
|
|
63333
|
-
if (currentIdx === idx) {
|
|
63334
|
-
|
|
63335
|
-
// nothing to do, position has not changed
|
|
63336
|
-
return;
|
|
63337
|
-
} else {
|
|
63338
|
-
|
|
63339
|
-
if (idx !== -1) {
|
|
63340
|
-
|
|
63341
|
-
// remove from current position
|
|
63342
|
-
collection.splice(currentIdx, 1);
|
|
63343
|
-
} else {
|
|
63344
|
-
|
|
63345
|
-
// already exists in collection
|
|
63346
|
-
return;
|
|
63347
|
-
}
|
|
63348
|
-
}
|
|
63349
|
-
}
|
|
63350
|
-
|
|
63351
|
-
if (idx !== -1) {
|
|
63352
|
-
|
|
63353
|
-
// insert at specified position
|
|
63354
|
-
collection.splice(idx, 0, element);
|
|
63355
|
-
} else {
|
|
63356
|
-
|
|
63357
|
-
// push to end
|
|
63358
|
-
collection.push(element);
|
|
63359
|
-
}
|
|
63360
|
-
}
|
|
63361
|
-
|
|
63362
|
-
/**
|
|
63363
|
-
* A simple translation stub to be used for multi-language support
|
|
63364
|
-
* in diagrams. Can be easily replaced with a more sophisticated
|
|
63365
|
-
* solution.
|
|
63366
|
-
*
|
|
63367
|
-
* @example
|
|
63368
|
-
*
|
|
63369
|
-
* // use it inside any diagram component by injecting `translate`.
|
|
63370
|
-
*
|
|
63371
|
-
* function MyService(translate) {
|
|
63372
|
-
* alert(translate('HELLO {you}', { you: 'You!' }));
|
|
63373
|
-
* }
|
|
63374
|
-
*
|
|
63375
|
-
* @param {string} template to interpolate
|
|
63376
|
-
* @param {Object} [replacements] a map with substitutes
|
|
63377
|
-
*
|
|
63378
|
-
* @return {string} the translated string
|
|
63379
|
-
*/
|
|
63380
|
-
function translate$3(template, replacements) {
|
|
63381
|
-
|
|
63382
|
-
replacements = replacements || {};
|
|
63383
|
-
|
|
63384
|
-
return template.replace(/{([^}]+)}/g, function(_, key) {
|
|
63385
|
-
return replacements[key] || '{' + key + '}';
|
|
63386
|
-
});
|
|
63387
|
-
}
|
|
63388
|
-
|
|
63389
|
-
var translateModule = {
|
|
63390
|
-
translate: [ 'value', translate$3 ]
|
|
63391
|
-
};
|
|
63392
|
-
|
|
63393
62770
|
var semverCompare = function cmp (a, b) {
|
|
63394
62771
|
var pa = a.split('.');
|
|
63395
62772
|
var pb = b.split('.');
|
|
@@ -64054,142 +63431,6 @@
|
|
|
64054
63431
|
return _validate(object, standaloneZeebeValidator);
|
|
64055
63432
|
}
|
|
64056
63433
|
|
|
64057
|
-
var DEFAULT_PRIORITY$7 = 1000;
|
|
64058
|
-
|
|
64059
|
-
/**
|
|
64060
|
-
* A utility that can be used to plug-in into the command execution for
|
|
64061
|
-
* extension and/or validation.
|
|
64062
|
-
*
|
|
64063
|
-
* @param {EventBus} eventBus
|
|
64064
|
-
*
|
|
64065
|
-
* @example
|
|
64066
|
-
*
|
|
64067
|
-
* import inherits from 'inherits';
|
|
64068
|
-
*
|
|
64069
|
-
* import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
|
|
64070
|
-
*
|
|
64071
|
-
* function CommandLogger(eventBus) {
|
|
64072
|
-
* CommandInterceptor.call(this, eventBus);
|
|
64073
|
-
*
|
|
64074
|
-
* this.preExecute(function(event) {
|
|
64075
|
-
* console.log('command pre-execute', event);
|
|
64076
|
-
* });
|
|
64077
|
-
* }
|
|
64078
|
-
*
|
|
64079
|
-
* inherits(CommandLogger, CommandInterceptor);
|
|
64080
|
-
*
|
|
64081
|
-
*/
|
|
64082
|
-
function CommandInterceptor$1(eventBus) {
|
|
64083
|
-
this._eventBus = eventBus;
|
|
64084
|
-
}
|
|
64085
|
-
|
|
64086
|
-
CommandInterceptor$1.$inject = [ 'eventBus' ];
|
|
64087
|
-
|
|
64088
|
-
function unwrapEvent$1(fn, that) {
|
|
64089
|
-
return function(event) {
|
|
64090
|
-
return fn.call(that || null, event.context, event.command, event);
|
|
64091
|
-
};
|
|
64092
|
-
}
|
|
64093
|
-
|
|
64094
|
-
/**
|
|
64095
|
-
* Register an interceptor for a command execution
|
|
64096
|
-
*
|
|
64097
|
-
* @param {string|Array<string>} [events] list of commands to register on
|
|
64098
|
-
* @param {string} [hook] command hook, i.e. preExecute, executed to listen on
|
|
64099
|
-
* @param {number} [priority] the priority on which to hook into the execution
|
|
64100
|
-
* @param {Function} handlerFn interceptor to be invoked with (event)
|
|
64101
|
-
* @param {boolean} unwrap if true, unwrap the event and pass (context, command, event) to the
|
|
64102
|
-
* listener instead
|
|
64103
|
-
* @param {Object} [that] Pass context (`this`) to the handler function
|
|
64104
|
-
*/
|
|
64105
|
-
CommandInterceptor$1.prototype.on = function(events, hook, priority, handlerFn, unwrap, that) {
|
|
64106
|
-
|
|
64107
|
-
if (isFunction(hook) || isNumber(hook)) {
|
|
64108
|
-
that = unwrap;
|
|
64109
|
-
unwrap = handlerFn;
|
|
64110
|
-
handlerFn = priority;
|
|
64111
|
-
priority = hook;
|
|
64112
|
-
hook = null;
|
|
64113
|
-
}
|
|
64114
|
-
|
|
64115
|
-
if (isFunction(priority)) {
|
|
64116
|
-
that = unwrap;
|
|
64117
|
-
unwrap = handlerFn;
|
|
64118
|
-
handlerFn = priority;
|
|
64119
|
-
priority = DEFAULT_PRIORITY$7;
|
|
64120
|
-
}
|
|
64121
|
-
|
|
64122
|
-
if (isObject(unwrap)) {
|
|
64123
|
-
that = unwrap;
|
|
64124
|
-
unwrap = false;
|
|
64125
|
-
}
|
|
64126
|
-
|
|
64127
|
-
if (!isFunction(handlerFn)) {
|
|
64128
|
-
throw new Error('handlerFn must be a function');
|
|
64129
|
-
}
|
|
64130
|
-
|
|
64131
|
-
if (!isArray(events)) {
|
|
64132
|
-
events = [ events ];
|
|
64133
|
-
}
|
|
64134
|
-
|
|
64135
|
-
var eventBus = this._eventBus;
|
|
64136
|
-
|
|
64137
|
-
forEach(events, function(event) {
|
|
64138
|
-
|
|
64139
|
-
// concat commandStack(.event)?(.hook)?
|
|
64140
|
-
var fullEvent = [ 'commandStack', event, hook ].filter(function(e) { return e; }).join('.');
|
|
64141
|
-
|
|
64142
|
-
eventBus.on(fullEvent, priority, unwrap ? unwrapEvent$1(handlerFn, that) : handlerFn, that);
|
|
64143
|
-
});
|
|
64144
|
-
};
|
|
64145
|
-
|
|
64146
|
-
|
|
64147
|
-
var hooks$1 = [
|
|
64148
|
-
'canExecute',
|
|
64149
|
-
'preExecute',
|
|
64150
|
-
'preExecuted',
|
|
64151
|
-
'execute',
|
|
64152
|
-
'executed',
|
|
64153
|
-
'postExecute',
|
|
64154
|
-
'postExecuted',
|
|
64155
|
-
'revert',
|
|
64156
|
-
'reverted'
|
|
64157
|
-
];
|
|
64158
|
-
|
|
64159
|
-
/*
|
|
64160
|
-
* Install hook shortcuts
|
|
64161
|
-
*
|
|
64162
|
-
* This will generate the CommandInterceptor#(preExecute|...|reverted) methods
|
|
64163
|
-
* which will in term forward to CommandInterceptor#on.
|
|
64164
|
-
*/
|
|
64165
|
-
forEach(hooks$1, function(hook) {
|
|
64166
|
-
|
|
64167
|
-
/**
|
|
64168
|
-
* {canExecute|preExecute|preExecuted|execute|executed|postExecute|postExecuted|revert|reverted}
|
|
64169
|
-
*
|
|
64170
|
-
* A named hook for plugging into the command execution
|
|
64171
|
-
*
|
|
64172
|
-
* @param {string|Array<string>} [events] list of commands to register on
|
|
64173
|
-
* @param {number} [priority] the priority on which to hook into the execution
|
|
64174
|
-
* @param {Function} handlerFn interceptor to be invoked with (event)
|
|
64175
|
-
* @param {boolean} [unwrap=false] if true, unwrap the event and pass (context, command, event) to the
|
|
64176
|
-
* listener instead
|
|
64177
|
-
* @param {Object} [that] Pass context (`this`) to the handler function
|
|
64178
|
-
*/
|
|
64179
|
-
CommandInterceptor$1.prototype[hook] = function(events, priority, handlerFn, unwrap, that) {
|
|
64180
|
-
|
|
64181
|
-
if (isFunction(events) || isNumber(events)) {
|
|
64182
|
-
that = unwrap;
|
|
64183
|
-
unwrap = handlerFn;
|
|
64184
|
-
handlerFn = priority;
|
|
64185
|
-
priority = events;
|
|
64186
|
-
events = null;
|
|
64187
|
-
}
|
|
64188
|
-
|
|
64189
|
-
this.on(events, hook, priority, handlerFn, unwrap, that);
|
|
64190
|
-
};
|
|
64191
|
-
});
|
|
64192
|
-
|
|
64193
63434
|
const BpmnPropertiesPanelContext = q({
|
|
64194
63435
|
selectedElement: null,
|
|
64195
63436
|
injector: null,
|
|
@@ -65572,9 +64813,7 @@
|
|
|
65572
64813
|
}
|
|
65573
64814
|
|
|
65574
64815
|
function getTemplate(element, elementTemplates) {
|
|
65575
|
-
|
|
65576
|
-
|
|
65577
|
-
return templateId && elementTemplates.get(templateId);
|
|
64816
|
+
return elementTemplates.get(element);
|
|
65578
64817
|
}
|
|
65579
64818
|
|
|
65580
64819
|
function getTemplateDocumentation(element, elementTemplates) {
|
|
@@ -65748,7 +64987,7 @@
|
|
|
65748
64987
|
return element && elementRegistry.get(element.id);
|
|
65749
64988
|
}
|
|
65750
64989
|
|
|
65751
|
-
const DEFAULT_PRIORITY$
|
|
64990
|
+
const DEFAULT_PRIORITY$7 = 1000;
|
|
65752
64991
|
/**
|
|
65753
64992
|
* @typedef { import('@bpmn-io/properties-panel').GroupDefinition } GroupDefinition
|
|
65754
64993
|
* @typedef { import('@bpmn-io/properties-panel').ListGroupDefinition } ListGroupDefinition
|
|
@@ -65831,7 +65070,7 @@
|
|
|
65831
65070
|
registerProvider(priority, provider) {
|
|
65832
65071
|
if (!provider) {
|
|
65833
65072
|
provider = priority;
|
|
65834
|
-
priority = DEFAULT_PRIORITY$
|
|
65073
|
+
priority = DEFAULT_PRIORITY$7;
|
|
65835
65074
|
}
|
|
65836
65075
|
|
|
65837
65076
|
if (typeof provider.getGroups !== 'function') {
|
|
@@ -67629,7 +66868,7 @@
|
|
|
67629
66868
|
categoryValue: [categoryValue]
|
|
67630
66869
|
}); // add to correct place
|
|
67631
66870
|
|
|
67632
|
-
add$
|
|
66871
|
+
add$1(definitions.get('rootElements'), category);
|
|
67633
66872
|
getBusinessObject(category).$parent = definitions;
|
|
67634
66873
|
getBusinessObject(categoryValue).$parent = category;
|
|
67635
66874
|
return categoryValue;
|
|
@@ -72645,7 +71884,7 @@
|
|
|
72645
71884
|
* it if not.
|
|
72646
71885
|
*/
|
|
72647
71886
|
|
|
72648
|
-
class ReplaceBehavior$1 extends CommandInterceptor
|
|
71887
|
+
class ReplaceBehavior$1 extends CommandInterceptor {
|
|
72649
71888
|
constructor(elementTemplates, injector) {
|
|
72650
71889
|
super(injector.get('eventBus'));
|
|
72651
71890
|
this.postExecuted('shape.replace', function (e) {
|
|
@@ -72917,7 +72156,7 @@
|
|
|
72917
72156
|
changedElement = businessObject;
|
|
72918
72157
|
let properties = {};
|
|
72919
72158
|
|
|
72920
|
-
if (
|
|
72159
|
+
if (shouldKeepValue(changedElement, oldProperty, newProperty)) {
|
|
72921
72160
|
return;
|
|
72922
72161
|
}
|
|
72923
72162
|
|
|
@@ -72958,18 +72197,18 @@
|
|
|
72958
72197
|
const oldProperty = findOldProperty$1(oldTemplate, newProperty),
|
|
72959
72198
|
oldBinding = oldProperty && oldProperty.binding,
|
|
72960
72199
|
oldBindingType = oldBinding && oldBinding.type,
|
|
72961
|
-
oldTaskDefinition =
|
|
72200
|
+
oldTaskDefinition = findBusinessObject(businessObject, newProperty),
|
|
72962
72201
|
newPropertyValue = newProperty.value,
|
|
72963
72202
|
newBinding = newProperty.binding,
|
|
72964
72203
|
newBindingType = newBinding.type; // (2) update old task definition
|
|
72965
72204
|
|
|
72966
|
-
if (
|
|
72967
|
-
if (!
|
|
72205
|
+
if (oldTaskDefinition) {
|
|
72206
|
+
if (!shouldKeepValue(oldTaskDefinition, oldProperty, newProperty)) {
|
|
72968
72207
|
// TODO(pinussilvestrus): for now we only support <type>
|
|
72969
72208
|
// this needs to be adjusted once we support more
|
|
72970
72209
|
let properties = {};
|
|
72971
72210
|
|
|
72972
|
-
if (oldBindingType === 'zeebe:taskDefinition:type') {
|
|
72211
|
+
if (oldBindingType === 'zeebe:taskDefinition:type' || !oldBindingType) {
|
|
72973
72212
|
properties = {
|
|
72974
72213
|
type: newPropertyValue
|
|
72975
72214
|
};
|
|
@@ -73053,27 +72292,27 @@
|
|
|
73053
72292
|
let propertyName;
|
|
73054
72293
|
newProperties.forEach(newProperty => {
|
|
73055
72294
|
const oldProperty = findOldProperty$1(oldTemplate, newProperty),
|
|
73056
|
-
|
|
72295
|
+
inputOrOutput = findBusinessObject(businessObject, newProperty),
|
|
73057
72296
|
newPropertyValue = newProperty.value,
|
|
73058
72297
|
newBinding = newProperty.binding,
|
|
73059
72298
|
newBindingType = newBinding.type;
|
|
73060
72299
|
let newInputOrOutput, properties; // (2) update old inputs and outputs
|
|
73061
72300
|
|
|
73062
|
-
if (
|
|
72301
|
+
if (inputOrOutput) {
|
|
73063
72302
|
// (2a) exclude old inputs and outputs from cleanup, unless
|
|
73064
72303
|
// a) optional and has empty value, and
|
|
73065
72304
|
// b) not changed
|
|
73066
|
-
if (shouldUpdate(newPropertyValue, newProperty) ||
|
|
73067
|
-
if (is$1(
|
|
73068
|
-
remove$1$1(oldInputs,
|
|
72305
|
+
if (shouldUpdate(newPropertyValue, newProperty) || shouldKeepValue(inputOrOutput, oldProperty, newProperty)) {
|
|
72306
|
+
if (is$1(inputOrOutput, 'zeebe:Input')) {
|
|
72307
|
+
remove$1$1(oldInputs, inputOrOutput);
|
|
73069
72308
|
} else {
|
|
73070
|
-
remove$1$1(oldOutputs,
|
|
72309
|
+
remove$1$1(oldOutputs, inputOrOutput);
|
|
73071
72310
|
}
|
|
73072
72311
|
} // (2a) do updates (unless changed)
|
|
73073
72312
|
|
|
73074
72313
|
|
|
73075
|
-
if (!
|
|
73076
|
-
if (is$1(
|
|
72314
|
+
if (!shouldKeepValue(inputOrOutput, oldProperty, newProperty)) {
|
|
72315
|
+
if (is$1(inputOrOutput, 'zeebe:Input')) {
|
|
73077
72316
|
properties = {
|
|
73078
72317
|
source: newPropertyValue
|
|
73079
72318
|
};
|
|
@@ -73085,7 +72324,7 @@
|
|
|
73085
72324
|
|
|
73086
72325
|
commandStack.execute('element.updateModdleProperties', {
|
|
73087
72326
|
element,
|
|
73088
|
-
moddleElement:
|
|
72327
|
+
moddleElement: inputOrOutput,
|
|
73089
72328
|
properties
|
|
73090
72329
|
});
|
|
73091
72330
|
}
|
|
@@ -73180,12 +72419,12 @@
|
|
|
73180
72419
|
const oldHeaders = taskHeaders.get('zeebe:values') ? taskHeaders.get('zeebe:values').slice() : [];
|
|
73181
72420
|
newProperties.forEach(newProperty => {
|
|
73182
72421
|
const oldProperty = findOldProperty$1(oldTemplate, newProperty),
|
|
73183
|
-
oldHeader =
|
|
72422
|
+
oldHeader = findBusinessObject(businessObject, newProperty),
|
|
73184
72423
|
newPropertyValue = newProperty.value,
|
|
73185
72424
|
newBinding = newProperty.binding; // (2) update old headers
|
|
73186
72425
|
|
|
73187
|
-
if (
|
|
73188
|
-
if (!
|
|
72426
|
+
if (oldHeader) {
|
|
72427
|
+
if (!shouldKeepValue(oldHeader, oldProperty, newProperty)) {
|
|
73189
72428
|
const properties = {
|
|
73190
72429
|
value: newPropertyValue
|
|
73191
72430
|
};
|
|
@@ -73250,50 +72489,50 @@
|
|
|
73250
72489
|
ChangeElementTemplateHandler$1.$inject = ['bpmnFactory', 'bpmnReplace', 'commandStack', 'modeling']; // helpers //////////
|
|
73251
72490
|
|
|
73252
72491
|
/**
|
|
73253
|
-
* Find
|
|
72492
|
+
* Find business object matching specified property.
|
|
73254
72493
|
*
|
|
73255
72494
|
* @param {djs.model.Base|ModdleElement} element
|
|
73256
|
-
* @param {Object}
|
|
72495
|
+
* @param {Object} property
|
|
73257
72496
|
*
|
|
73258
72497
|
* @returns {ModdleElement}
|
|
73259
72498
|
*/
|
|
73260
72499
|
|
|
73261
|
-
function
|
|
73262
|
-
|
|
73263
|
-
const
|
|
73264
|
-
|
|
72500
|
+
function findBusinessObject(element, property) {
|
|
72501
|
+
const businessObject = getBusinessObject(element);
|
|
72502
|
+
const binding = property.binding,
|
|
72503
|
+
bindingType = binding.type;
|
|
73265
72504
|
|
|
73266
|
-
if (
|
|
72505
|
+
if (bindingType === 'zeebe:taskDefinition:type') {
|
|
73267
72506
|
return findExtension$1(businessObject, 'zeebe:TaskDefinition');
|
|
73268
72507
|
}
|
|
73269
72508
|
|
|
73270
|
-
if (
|
|
73271
|
-
|
|
72509
|
+
if (bindingType === 'zeebe:input' || bindingType === 'zeebe:output') {
|
|
72510
|
+
const extensionElements = findExtension$1(businessObject, 'zeebe:IoMapping');
|
|
73272
72511
|
|
|
73273
|
-
if (!
|
|
72512
|
+
if (!extensionElements) {
|
|
73274
72513
|
return;
|
|
73275
72514
|
}
|
|
73276
72515
|
|
|
73277
|
-
if (
|
|
73278
|
-
return find(
|
|
73279
|
-
return
|
|
72516
|
+
if (bindingType === 'zeebe:input') {
|
|
72517
|
+
return find(extensionElements.get('zeebe:inputParameters'), function (input) {
|
|
72518
|
+
return input.get('zeebe:target') === binding.name;
|
|
73280
72519
|
});
|
|
73281
72520
|
} else {
|
|
73282
|
-
return find(
|
|
73283
|
-
return
|
|
72521
|
+
return find(extensionElements.get('zeebe:outputParameters'), function (output) {
|
|
72522
|
+
return output.get('zeebe:source') === binding.source;
|
|
73284
72523
|
});
|
|
73285
72524
|
}
|
|
73286
72525
|
}
|
|
73287
72526
|
|
|
73288
|
-
if (
|
|
73289
|
-
|
|
72527
|
+
if (bindingType === 'zeebe:taskHeader') {
|
|
72528
|
+
const extensionElements = findExtension$1(businessObject, 'zeebe:TaskHeaders');
|
|
73290
72529
|
|
|
73291
|
-
if (!
|
|
72530
|
+
if (!extensionElements) {
|
|
73292
72531
|
return;
|
|
73293
72532
|
}
|
|
73294
72533
|
|
|
73295
|
-
return find(
|
|
73296
|
-
return
|
|
72534
|
+
return find(extensionElements.get('zeebe:values'), function (value) {
|
|
72535
|
+
return value.get('zeebe:key') === binding.key;
|
|
73297
72536
|
});
|
|
73298
72537
|
}
|
|
73299
72538
|
}
|
|
@@ -73374,6 +72613,30 @@
|
|
|
73374
72613
|
});
|
|
73375
72614
|
}
|
|
73376
72615
|
}
|
|
72616
|
+
/**
|
|
72617
|
+
* Check whether the existing property should be keept. This is the case if
|
|
72618
|
+
* - an old template was set and the value differs from the default
|
|
72619
|
+
* - no template was set but the property was set manually
|
|
72620
|
+
*
|
|
72621
|
+
* @param {djs.model.Base|ModdleElement} element
|
|
72622
|
+
* @param {Object} oldProperty
|
|
72623
|
+
* @param {Object} newProperty
|
|
72624
|
+
*
|
|
72625
|
+
* @returns {boolean}
|
|
72626
|
+
*/
|
|
72627
|
+
|
|
72628
|
+
|
|
72629
|
+
function shouldKeepValue(element, oldProperty, newProperty) {
|
|
72630
|
+
if (newProperty.type === 'Hidden') {
|
|
72631
|
+
return false;
|
|
72632
|
+
}
|
|
72633
|
+
|
|
72634
|
+
if (oldProperty) {
|
|
72635
|
+
return propertyChanged$1(element, oldProperty);
|
|
72636
|
+
} else {
|
|
72637
|
+
return !!getPropertyValue(element, newProperty);
|
|
72638
|
+
}
|
|
72639
|
+
}
|
|
73377
72640
|
/**
|
|
73378
72641
|
* Check whether property was changed after being set by template.
|
|
73379
72642
|
*
|
|
@@ -73385,30 +72648,34 @@
|
|
|
73385
72648
|
|
|
73386
72649
|
|
|
73387
72650
|
function propertyChanged$1(element, oldProperty) {
|
|
72651
|
+
const oldPropertyValue = oldProperty.value;
|
|
72652
|
+
return getPropertyValue(element, oldProperty) !== oldPropertyValue;
|
|
72653
|
+
}
|
|
72654
|
+
|
|
72655
|
+
function getPropertyValue(element, property) {
|
|
73388
72656
|
const businessObject = getBusinessObject(element);
|
|
73389
|
-
const
|
|
73390
|
-
|
|
73391
|
-
|
|
73392
|
-
oldPropertyValue = oldProperty.value;
|
|
72657
|
+
const binding = property.binding,
|
|
72658
|
+
bindingName = binding.name,
|
|
72659
|
+
bindingType = binding.type;
|
|
73393
72660
|
|
|
73394
|
-
if (
|
|
73395
|
-
return businessObject.get(
|
|
72661
|
+
if (bindingType === 'property') {
|
|
72662
|
+
return businessObject.get(bindingName);
|
|
73396
72663
|
}
|
|
73397
72664
|
|
|
73398
|
-
if (
|
|
73399
|
-
return businessObject.get('zeebe:type')
|
|
72665
|
+
if (bindingType === 'zeebe:taskDefinition:type') {
|
|
72666
|
+
return businessObject.get('zeebe:type');
|
|
73400
72667
|
}
|
|
73401
72668
|
|
|
73402
|
-
if (
|
|
73403
|
-
return businessObject.get('zeebe:source')
|
|
72669
|
+
if (bindingType === 'zeebe:input') {
|
|
72670
|
+
return businessObject.get('zeebe:source');
|
|
73404
72671
|
}
|
|
73405
72672
|
|
|
73406
|
-
if (
|
|
73407
|
-
return businessObject.get('zeebe:target')
|
|
72673
|
+
if (bindingType === 'zeebe:output') {
|
|
72674
|
+
return businessObject.get('zeebe:target');
|
|
73408
72675
|
}
|
|
73409
72676
|
|
|
73410
|
-
if (
|
|
73411
|
-
return businessObject.get('zeebe:value')
|
|
72677
|
+
if (bindingType === 'zeebe:taskHeader') {
|
|
72678
|
+
return businessObject.get('zeebe:value');
|
|
73412
72679
|
}
|
|
73413
72680
|
}
|
|
73414
72681
|
|
|
@@ -74658,10 +73925,9 @@
|
|
|
74658
73925
|
function propertyGetter$1(element, property) {
|
|
74659
73926
|
return function getValue() {
|
|
74660
73927
|
let businessObject = getBusinessObject(element);
|
|
73928
|
+
const defaultValue = '';
|
|
74661
73929
|
const {
|
|
74662
|
-
binding
|
|
74663
|
-
optional,
|
|
74664
|
-
value: defaultValue = ''
|
|
73930
|
+
binding
|
|
74665
73931
|
} = property;
|
|
74666
73932
|
const {
|
|
74667
73933
|
name,
|
|
@@ -74704,10 +73970,9 @@
|
|
|
74704
73970
|
|
|
74705
73971
|
if (inputParameter) {
|
|
74706
73972
|
return inputParameter.get('source');
|
|
74707
|
-
}
|
|
74708
|
-
|
|
73973
|
+
}
|
|
74709
73974
|
|
|
74710
|
-
return
|
|
73975
|
+
return defaultValue;
|
|
74711
73976
|
} // zeebe:Output
|
|
74712
73977
|
|
|
74713
73978
|
|
|
@@ -74716,10 +73981,9 @@
|
|
|
74716
73981
|
|
|
74717
73982
|
if (outputParameter) {
|
|
74718
73983
|
return outputParameter.get('target');
|
|
74719
|
-
}
|
|
74720
|
-
|
|
73984
|
+
}
|
|
74721
73985
|
|
|
74722
|
-
return
|
|
73986
|
+
return defaultValue;
|
|
74723
73987
|
}
|
|
74724
73988
|
} // zeebe:taskHeaders
|
|
74725
73989
|
|
|
@@ -75613,7 +74877,7 @@
|
|
|
75613
74877
|
* (1) zeebe:CalledDecision
|
|
75614
74878
|
* (2) zeebe:TaskDefinition and zeebe:TaskHeaders
|
|
75615
74879
|
*/
|
|
75616
|
-
class CleanUpBusinessRuleTaskBehavior extends CommandInterceptor
|
|
74880
|
+
class CleanUpBusinessRuleTaskBehavior extends CommandInterceptor {
|
|
75617
74881
|
constructor(commandStack, eventBus) {
|
|
75618
74882
|
super(eventBus);
|
|
75619
74883
|
|
|
@@ -75850,7 +75114,7 @@
|
|
|
75850
75114
|
/**
|
|
75851
75115
|
* Zeebe BPMN specific behavior for creating call activities.
|
|
75852
75116
|
*/
|
|
75853
|
-
class CreateZeebeCallActivityBehavior extends CommandInterceptor
|
|
75117
|
+
class CreateZeebeCallActivityBehavior extends CommandInterceptor {
|
|
75854
75118
|
constructor(bpmnFactory, eventBus, modeling) {
|
|
75855
75119
|
super(eventBus);
|
|
75856
75120
|
|
|
@@ -76165,7 +75429,7 @@
|
|
|
76165
75429
|
/**
|
|
76166
75430
|
* Zeebe BPMN specific form definition behavior.
|
|
76167
75431
|
*/
|
|
76168
|
-
class FormDefinitionBehavior extends CommandInterceptor
|
|
75432
|
+
class FormDefinitionBehavior extends CommandInterceptor {
|
|
76169
75433
|
constructor(bpmnFactory, eventBus, modeling) {
|
|
76170
75434
|
super(eventBus);
|
|
76171
75435
|
|
|
@@ -76288,7 +75552,7 @@
|
|
|
76288
75552
|
* Zeebe BPMN behavior removing zeebe:AssignmentDefinition elements without
|
|
76289
75553
|
* zeebe:assignee and zeebe:candidateGroups.
|
|
76290
75554
|
*/
|
|
76291
|
-
class CleanUpBusinessRuleTaskBehavior$1 extends CommandInterceptor
|
|
75555
|
+
class CleanUpBusinessRuleTaskBehavior$1 extends CommandInterceptor {
|
|
76292
75556
|
constructor(commandStack, eventBus) {
|
|
76293
75557
|
super(eventBus);
|
|
76294
75558
|
|
|
@@ -76333,7 +75597,7 @@
|
|
|
76333
75597
|
* (1) zeebe:propagateAllChildVariables of zeebe:CalledElement is set to true
|
|
76334
75598
|
* (2) zeebe:IoMapping extension element has zeebe:Output elements
|
|
76335
75599
|
*/
|
|
76336
|
-
class UpdatePropagateAllChildVariablesBehavior extends CommandInterceptor
|
|
75600
|
+
class UpdatePropagateAllChildVariablesBehavior extends CommandInterceptor {
|
|
76337
75601
|
constructor(commandStack, eventBus, modeling) {
|
|
76338
75602
|
super(eventBus);
|
|
76339
75603
|
|
|
@@ -76469,11 +75733,11 @@
|
|
|
76469
75733
|
'create.group'
|
|
76470
75734
|
];
|
|
76471
75735
|
|
|
76472
|
-
const LOW_PRIORITY$
|
|
75736
|
+
const LOW_PRIORITY$q = 500;
|
|
76473
75737
|
class PaletteProvider$1 {
|
|
76474
75738
|
|
|
76475
75739
|
constructor(palette) {
|
|
76476
|
-
palette.registerProvider(LOW_PRIORITY$
|
|
75740
|
+
palette.registerProvider(LOW_PRIORITY$q, this);
|
|
76477
75741
|
}
|
|
76478
75742
|
|
|
76479
75743
|
getPaletteEntries(element) {
|
|
@@ -76517,7 +75781,7 @@
|
|
|
76517
75781
|
'lane-insert-below'
|
|
76518
75782
|
];
|
|
76519
75783
|
|
|
76520
|
-
const LOW_PRIORITY$
|
|
75784
|
+
const LOW_PRIORITY$r = 500;
|
|
76521
75785
|
|
|
76522
75786
|
class ContextPadProvider$1 {
|
|
76523
75787
|
|
|
@@ -76529,7 +75793,7 @@
|
|
|
76529
75793
|
contextPadProvider.autoPlace = injector.get('autoPlace', false);
|
|
76530
75794
|
}
|
|
76531
75795
|
|
|
76532
|
-
contextPad.registerProvider(LOW_PRIORITY$
|
|
75796
|
+
contextPad.registerProvider(LOW_PRIORITY$r, this);
|
|
76533
75797
|
}
|
|
76534
75798
|
|
|
76535
75799
|
getContextPadEntries(element) {
|
|
@@ -76903,93 +76167,6 @@
|
|
|
76903
76167
|
zeebeModdleExtension: [ 'type', extension ]
|
|
76904
76168
|
};
|
|
76905
76169
|
|
|
76906
|
-
var DEFAULT_RENDER_PRIORITY$2 = 1000;
|
|
76907
|
-
|
|
76908
|
-
/**
|
|
76909
|
-
* The base implementation of shape and connection renderers.
|
|
76910
|
-
*
|
|
76911
|
-
* @param {EventBus} eventBus
|
|
76912
|
-
* @param {number} [renderPriority=1000]
|
|
76913
|
-
*/
|
|
76914
|
-
function BaseRenderer$1(eventBus, renderPriority) {
|
|
76915
|
-
var self = this;
|
|
76916
|
-
|
|
76917
|
-
renderPriority = renderPriority || DEFAULT_RENDER_PRIORITY$2;
|
|
76918
|
-
|
|
76919
|
-
eventBus.on([ 'render.shape', 'render.connection' ], renderPriority, function(evt, context) {
|
|
76920
|
-
var type = evt.type,
|
|
76921
|
-
element = context.element,
|
|
76922
|
-
visuals = context.gfx,
|
|
76923
|
-
attrs = context.attrs;
|
|
76924
|
-
|
|
76925
|
-
if (self.canRender(element)) {
|
|
76926
|
-
if (type === 'render.shape') {
|
|
76927
|
-
return self.drawShape(visuals, element, attrs);
|
|
76928
|
-
} else {
|
|
76929
|
-
return self.drawConnection(visuals, element, attrs);
|
|
76930
|
-
}
|
|
76931
|
-
}
|
|
76932
|
-
});
|
|
76933
|
-
|
|
76934
|
-
eventBus.on([ 'render.getShapePath', 'render.getConnectionPath' ], renderPriority, function(evt, element) {
|
|
76935
|
-
if (self.canRender(element)) {
|
|
76936
|
-
if (evt.type === 'render.getShapePath') {
|
|
76937
|
-
return self.getShapePath(element);
|
|
76938
|
-
} else {
|
|
76939
|
-
return self.getConnectionPath(element);
|
|
76940
|
-
}
|
|
76941
|
-
}
|
|
76942
|
-
});
|
|
76943
|
-
}
|
|
76944
|
-
|
|
76945
|
-
/**
|
|
76946
|
-
* Should check whether *this* renderer can render
|
|
76947
|
-
* the element/connection.
|
|
76948
|
-
*
|
|
76949
|
-
* @param {element} element
|
|
76950
|
-
*
|
|
76951
|
-
* @returns {boolean}
|
|
76952
|
-
*/
|
|
76953
|
-
BaseRenderer$1.prototype.canRender = function() {};
|
|
76954
|
-
|
|
76955
|
-
/**
|
|
76956
|
-
* Provides the shape's snap svg element to be drawn on the `canvas`.
|
|
76957
|
-
*
|
|
76958
|
-
* @param {djs.Graphics} visuals
|
|
76959
|
-
* @param {Shape} shape
|
|
76960
|
-
*
|
|
76961
|
-
* @returns {Snap.svg} [returns a Snap.svg paper element ]
|
|
76962
|
-
*/
|
|
76963
|
-
BaseRenderer$1.prototype.drawShape = function() {};
|
|
76964
|
-
|
|
76965
|
-
/**
|
|
76966
|
-
* Provides the shape's snap svg element to be drawn on the `canvas`.
|
|
76967
|
-
*
|
|
76968
|
-
* @param {djs.Graphics} visuals
|
|
76969
|
-
* @param {Connection} connection
|
|
76970
|
-
*
|
|
76971
|
-
* @returns {Snap.svg} [returns a Snap.svg paper element ]
|
|
76972
|
-
*/
|
|
76973
|
-
BaseRenderer$1.prototype.drawConnection = function() {};
|
|
76974
|
-
|
|
76975
|
-
/**
|
|
76976
|
-
* Gets the SVG path of a shape that represents it's visual bounds.
|
|
76977
|
-
*
|
|
76978
|
-
* @param {Shape} shape
|
|
76979
|
-
*
|
|
76980
|
-
* @return {string} svg path
|
|
76981
|
-
*/
|
|
76982
|
-
BaseRenderer$1.prototype.getShapePath = function() {};
|
|
76983
|
-
|
|
76984
|
-
/**
|
|
76985
|
-
* Gets the SVG path of a connection that represents it's visual bounds.
|
|
76986
|
-
*
|
|
76987
|
-
* @param {Connection} connection
|
|
76988
|
-
*
|
|
76989
|
-
* @return {string} svg path
|
|
76990
|
-
*/
|
|
76991
|
-
BaseRenderer$1.prototype.getConnectionPath = function() {};
|
|
76992
|
-
|
|
76993
76170
|
function ensureImported$1(element, target) {
|
|
76994
76171
|
|
|
76995
76172
|
if (element.ownerDocument !== target.ownerDocument) {
|
|
@@ -77270,10 +76447,10 @@
|
|
|
77270
76447
|
) {
|
|
77271
76448
|
this._bpmnRenderer = bpmnRenderer;
|
|
77272
76449
|
|
|
77273
|
-
BaseRenderer
|
|
76450
|
+
BaseRenderer.call(this, eventBus, HIGH_PRIORITY$r);
|
|
77274
76451
|
}
|
|
77275
76452
|
|
|
77276
|
-
inherits_browser(IconsRenderer, BaseRenderer
|
|
76453
|
+
inherits_browser(IconsRenderer, BaseRenderer);
|
|
77277
76454
|
|
|
77278
76455
|
IconsRenderer.prototype.canRender = function(element) {
|
|
77279
76456
|
|
|
@@ -77298,8 +76475,10 @@
|
|
|
77298
76475
|
var icon = create$2('image');
|
|
77299
76476
|
attr$2(icon, {
|
|
77300
76477
|
href: modelerTemplateIcon,
|
|
77301
|
-
x:
|
|
77302
|
-
y:
|
|
76478
|
+
x: 5,
|
|
76479
|
+
y: 5,
|
|
76480
|
+
width: 18,
|
|
76481
|
+
height: 18
|
|
77303
76482
|
});
|
|
77304
76483
|
|
|
77305
76484
|
append$1(parentGfx, icon);
|