bpmn-js 10.3.0 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/bpmn-js.css +7 -7
- package/dist/assets/diagram-js.css +212 -45
- package/dist/bpmn-modeler.development.js +866 -487
- package/dist/bpmn-modeler.production.min.js +154 -8
- package/dist/bpmn-navigated-viewer.development.js +20 -21
- package/dist/bpmn-navigated-viewer.production.min.js +3 -3
- package/dist/bpmn-viewer.development.js +6 -6
- package/dist/bpmn-viewer.production.min.js +2 -2
- package/lib/features/align-elements/AlignElementsContextPadProvider.js +4 -9
- package/lib/features/context-pad/ContextPadProvider.js +9 -11
- package/package.json +4 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* bpmn-js - bpmn-modeler
|
|
2
|
+
* bpmn-js - bpmn-modeler v11.0.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2014-present, camunda Services GmbH
|
|
5
5
|
*
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* Source Code: https://github.com/bpmn-io/bpmn-js
|
|
10
10
|
*
|
|
11
|
-
* Date: 2022-11-
|
|
11
|
+
* Date: 2022-11-24
|
|
12
12
|
*/
|
|
13
13
|
(function (global, factory) {
|
|
14
14
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.BpmnJS = factory());
|
|
17
17
|
})(this, (function () { 'use strict';
|
|
18
18
|
|
|
19
|
-
function e(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}));}
|
|
19
|
+
function e$3(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}));}
|
|
20
20
|
|
|
21
21
|
function createCommonjsModule(fn, module) {
|
|
22
22
|
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
@@ -2961,7 +2961,7 @@
|
|
|
2961
2961
|
this.FRAME_STYLE = styles.style([ 'no-fill' ], { stroke: 'fuchsia', strokeDasharray: 4, strokeWidth: 2 });
|
|
2962
2962
|
}
|
|
2963
2963
|
|
|
2964
|
-
e(DefaultRenderer, BaseRenderer);
|
|
2964
|
+
e$3(DefaultRenderer, BaseRenderer);
|
|
2965
2965
|
|
|
2966
2966
|
|
|
2967
2967
|
DefaultRenderer.prototype.canRender = function() {
|
|
@@ -4592,7 +4592,7 @@
|
|
|
4592
4592
|
// this way we can always get the correct container size
|
|
4593
4593
|
// (this is impossible for <svg> elements at the moment)
|
|
4594
4594
|
const parent = document.createElement('div');
|
|
4595
|
-
parent.setAttribute('class', 'djs-container');
|
|
4595
|
+
parent.setAttribute('class', 'djs-container djs-parent');
|
|
4596
4596
|
|
|
4597
4597
|
assign(parent, {
|
|
4598
4598
|
position: 'relative',
|
|
@@ -6013,7 +6013,7 @@
|
|
|
6013
6013
|
/**
|
|
6014
6014
|
* Removes an element from the registry.
|
|
6015
6015
|
*
|
|
6016
|
-
* @param {djs.model.Base} element
|
|
6016
|
+
* @param {string|djs.model.Base} element
|
|
6017
6017
|
*/
|
|
6018
6018
|
ElementRegistry.prototype.remove = function(element) {
|
|
6019
6019
|
var elements = this._elements,
|
|
@@ -6036,7 +6036,7 @@
|
|
|
6036
6036
|
/**
|
|
6037
6037
|
* Update the id of an element
|
|
6038
6038
|
*
|
|
6039
|
-
* @param {djs.model.Base} element
|
|
6039
|
+
* @param {string|djs.model.Base} element
|
|
6040
6040
|
* @param {string} newId
|
|
6041
6041
|
*/
|
|
6042
6042
|
ElementRegistry.prototype.updateId = function(element, newId) {
|
|
@@ -6065,7 +6065,7 @@
|
|
|
6065
6065
|
/**
|
|
6066
6066
|
* Update the graphics of an element
|
|
6067
6067
|
*
|
|
6068
|
-
* @param {djs.model.Base} element
|
|
6068
|
+
* @param {string|djs.model.Base} element
|
|
6069
6069
|
* @param {SVGElement} gfx
|
|
6070
6070
|
* @param {boolean} [secondary=false] whether to update the secondary connected element
|
|
6071
6071
|
*/
|
|
@@ -6675,7 +6675,7 @@
|
|
|
6675
6675
|
attacherRefs.bind(this, 'attachers');
|
|
6676
6676
|
}
|
|
6677
6677
|
|
|
6678
|
-
e(Shape, Base$1);
|
|
6678
|
+
e$3(Shape, Base$1);
|
|
6679
6679
|
|
|
6680
6680
|
|
|
6681
6681
|
/**
|
|
@@ -6690,7 +6690,7 @@
|
|
|
6690
6690
|
Shape.call(this);
|
|
6691
6691
|
}
|
|
6692
6692
|
|
|
6693
|
-
e(Root, Shape);
|
|
6693
|
+
e$3(Root, Shape);
|
|
6694
6694
|
|
|
6695
6695
|
|
|
6696
6696
|
/**
|
|
@@ -6713,7 +6713,7 @@
|
|
|
6713
6713
|
labelRefs.bind(this, 'labelTarget');
|
|
6714
6714
|
}
|
|
6715
6715
|
|
|
6716
|
-
e(Label, Shape);
|
|
6716
|
+
e$3(Label, Shape);
|
|
6717
6717
|
|
|
6718
6718
|
|
|
6719
6719
|
/**
|
|
@@ -6744,7 +6744,7 @@
|
|
|
6744
6744
|
incomingRefs.bind(this, 'target');
|
|
6745
6745
|
}
|
|
6746
6746
|
|
|
6747
|
-
e(Connection, Base$1);
|
|
6747
|
+
e$3(Connection, Base$1);
|
|
6748
6748
|
|
|
6749
6749
|
|
|
6750
6750
|
var types$6 = {
|
|
@@ -16245,7 +16245,7 @@
|
|
|
16245
16245
|
this._init(this._container, this._moddle, options);
|
|
16246
16246
|
}
|
|
16247
16247
|
|
|
16248
|
-
e(BaseViewer, Diagram);
|
|
16248
|
+
e$3(BaseViewer, Diagram);
|
|
16249
16249
|
|
|
16250
16250
|
/**
|
|
16251
16251
|
* The importXML result.
|
|
@@ -16944,7 +16944,7 @@
|
|
|
16944
16944
|
}, this);
|
|
16945
16945
|
}
|
|
16946
16946
|
|
|
16947
|
-
e(BaseModeler, BaseViewer);
|
|
16947
|
+
e$3(BaseModeler, BaseViewer);
|
|
16948
16948
|
|
|
16949
16949
|
|
|
16950
16950
|
/**
|
|
@@ -19069,7 +19069,7 @@
|
|
|
19069
19069
|
}
|
|
19070
19070
|
|
|
19071
19071
|
|
|
19072
|
-
e(BpmnRenderer, BaseRenderer);
|
|
19072
|
+
e$3(BpmnRenderer, BaseRenderer);
|
|
19073
19073
|
|
|
19074
19074
|
BpmnRenderer.$inject = [
|
|
19075
19075
|
'config.bpmnRenderer',
|
|
@@ -22025,7 +22025,7 @@
|
|
|
22025
22025
|
].join(',') +
|
|
22026
22026
|
')';
|
|
22027
22027
|
|
|
22028
|
-
setTransform
|
|
22028
|
+
setTransform(this._overlayRoot, matrix);
|
|
22029
22029
|
};
|
|
22030
22030
|
|
|
22031
22031
|
|
|
@@ -22147,7 +22147,7 @@
|
|
|
22147
22147
|
transform = 'scale(' + scale + ',' + scale + ')';
|
|
22148
22148
|
}
|
|
22149
22149
|
|
|
22150
|
-
setTransform
|
|
22150
|
+
setTransform(htmlContainer, transform);
|
|
22151
22151
|
};
|
|
22152
22152
|
|
|
22153
22153
|
|
|
@@ -22278,7 +22278,7 @@
|
|
|
22278
22278
|
el.style.display = visible === false ? 'none' : '';
|
|
22279
22279
|
}
|
|
22280
22280
|
|
|
22281
|
-
function setTransform
|
|
22281
|
+
function setTransform(el, transform) {
|
|
22282
22282
|
|
|
22283
22283
|
el.style['transform-origin'] = 'top left';
|
|
22284
22284
|
|
|
@@ -22527,7 +22527,7 @@
|
|
|
22527
22527
|
});
|
|
22528
22528
|
}
|
|
22529
22529
|
|
|
22530
|
-
e(RootElementsBehavior, CommandInterceptor);
|
|
22530
|
+
e$3(RootElementsBehavior, CommandInterceptor);
|
|
22531
22531
|
|
|
22532
22532
|
RootElementsBehavior.$inject = [ 'canvas', 'injector' ];
|
|
22533
22533
|
|
|
@@ -22849,7 +22849,7 @@
|
|
|
22849
22849
|
function DrilldownCentering(eventBus, canvas) {
|
|
22850
22850
|
|
|
22851
22851
|
var currentRoot = null;
|
|
22852
|
-
var positionMap = new Map();
|
|
22852
|
+
var positionMap = new Map$1();
|
|
22853
22853
|
|
|
22854
22854
|
eventBus.on('root.set', function(event) {
|
|
22855
22855
|
var newRoot = event.element;
|
|
@@ -22899,7 +22899,7 @@
|
|
|
22899
22899
|
/**
|
|
22900
22900
|
* ES5 Map implementation. Works.
|
|
22901
22901
|
*/
|
|
22902
|
-
function Map() {
|
|
22902
|
+
function Map$1() {
|
|
22903
22903
|
|
|
22904
22904
|
this._entries = [];
|
|
22905
22905
|
|
|
@@ -23255,7 +23255,7 @@
|
|
|
23255
23255
|
|
|
23256
23256
|
}
|
|
23257
23257
|
|
|
23258
|
-
e(DrilldownOverlayBehavior, CommandInterceptor);
|
|
23258
|
+
e$3(DrilldownOverlayBehavior, CommandInterceptor);
|
|
23259
23259
|
|
|
23260
23260
|
DrilldownOverlayBehavior.prototype.updateDrilldownOverlay = function(shape) {
|
|
23261
23261
|
var canvas = this._canvas;
|
|
@@ -23405,7 +23405,7 @@
|
|
|
23405
23405
|
BaseViewer.call(this, options);
|
|
23406
23406
|
}
|
|
23407
23407
|
|
|
23408
|
-
e(Viewer, BaseViewer);
|
|
23408
|
+
e$3(Viewer, BaseViewer);
|
|
23409
23409
|
|
|
23410
23410
|
// modules the viewer is composed of
|
|
23411
23411
|
Viewer.prototype._modules = [
|
|
@@ -23419,15 +23419,10 @@
|
|
|
23419
23419
|
// default moddle extensions the viewer is composed of
|
|
23420
23420
|
Viewer.prototype._moddleExtensions = {};
|
|
23421
23421
|
|
|
23422
|
-
var
|
|
23423
|
-
var
|
|
23424
|
-
var
|
|
23425
|
-
var
|
|
23426
|
-
|
|
23427
|
-
var KEYS_COPY = [ 'c', 'C', KEYCODE_C ];
|
|
23428
|
-
var KEYS_PASTE = [ 'v', 'V', KEYCODE_V ];
|
|
23429
|
-
var KEYS_REDO = [ 'y', 'Y', KEYCODE_Y ];
|
|
23430
|
-
var KEYS_UNDO = [ 'z', 'Z', KEYCODE_Z ];
|
|
23422
|
+
var KEYS_COPY = [ 'c', 'C', 'KeyC' ];
|
|
23423
|
+
var KEYS_PASTE = [ 'v', 'V', 'KeyV' ];
|
|
23424
|
+
var KEYS_REDO = [ 'y', 'Y', 'KeyY' ];
|
|
23425
|
+
var KEYS_UNDO = [ 'z', 'Z', 'KeyZ' ];
|
|
23431
23426
|
|
|
23432
23427
|
/**
|
|
23433
23428
|
* Returns true if event was triggered with any modifier
|
|
@@ -23460,7 +23455,7 @@
|
|
|
23460
23455
|
function isKey(keys, event) {
|
|
23461
23456
|
keys = isArray$3(keys) ? keys : [ keys ];
|
|
23462
23457
|
|
|
23463
|
-
return keys.indexOf(event.key) !== -1 || keys.indexOf(event.
|
|
23458
|
+
return keys.indexOf(event.key) !== -1 || keys.indexOf(event.code) !== -1;
|
|
23464
23459
|
}
|
|
23465
23460
|
|
|
23466
23461
|
/**
|
|
@@ -23499,7 +23494,7 @@
|
|
|
23499
23494
|
|
|
23500
23495
|
/**
|
|
23501
23496
|
* A keyboard abstraction that may be activated and
|
|
23502
|
-
* deactivated by users at will, consuming key events
|
|
23497
|
+
* deactivated by users at will, consuming global key events
|
|
23503
23498
|
* and triggering diagram actions.
|
|
23504
23499
|
*
|
|
23505
23500
|
* For keys pressed down, keyboard fires `keyboard.keydown` event.
|
|
@@ -23584,6 +23579,10 @@
|
|
|
23584
23579
|
};
|
|
23585
23580
|
|
|
23586
23581
|
Keyboard.prototype._isEventIgnored = function(event) {
|
|
23582
|
+
if (event.defaultPrevented) {
|
|
23583
|
+
return true;
|
|
23584
|
+
}
|
|
23585
|
+
|
|
23587
23586
|
return isInput(event.target) && this._isModifiedKeyIgnored(event);
|
|
23588
23587
|
};
|
|
23589
23588
|
|
|
@@ -23614,8 +23613,8 @@
|
|
|
23614
23613
|
this._node = node;
|
|
23615
23614
|
|
|
23616
23615
|
// bind key events
|
|
23617
|
-
event.bind(node, 'keydown', this._keydownHandler
|
|
23618
|
-
event.bind(node, 'keyup', this._keyupHandler
|
|
23616
|
+
event.bind(node, 'keydown', this._keydownHandler);
|
|
23617
|
+
event.bind(node, 'keyup', this._keyupHandler);
|
|
23619
23618
|
|
|
23620
23619
|
this._fire('bind');
|
|
23621
23620
|
};
|
|
@@ -23631,8 +23630,8 @@
|
|
|
23631
23630
|
this._fire('unbind');
|
|
23632
23631
|
|
|
23633
23632
|
// unbind key events
|
|
23634
|
-
event.unbind(node, 'keydown', this._keydownHandler
|
|
23635
|
-
event.unbind(node, 'keyup', this._keyupHandler
|
|
23633
|
+
event.unbind(node, 'keydown', this._keydownHandler);
|
|
23634
|
+
event.unbind(node, 'keyup', this._keyupHandler);
|
|
23636
23635
|
}
|
|
23637
23636
|
|
|
23638
23637
|
this._node = null;
|
|
@@ -24407,7 +24406,7 @@
|
|
|
24407
24406
|
Viewer.call(this, options);
|
|
24408
24407
|
}
|
|
24409
24408
|
|
|
24410
|
-
e(NavigatedViewer, Viewer);
|
|
24409
|
+
e$3(NavigatedViewer, Viewer);
|
|
24411
24410
|
|
|
24412
24411
|
|
|
24413
24412
|
NavigatedViewer.prototype._navigationModules = [
|
|
@@ -28096,6 +28095,483 @@
|
|
|
28096
28095
|
contextPad: [ 'type', ContextPad ]
|
|
28097
28096
|
};
|
|
28098
28097
|
|
|
28098
|
+
var n$1,l$1,u$1,t$2,o$1,f$1={},e$2=[],c$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function s$1(n,l){for(var u in l)n[u]=l[u];return n}function a$1(n){var l=n.parentNode;l&&l.removeChild(n);}function h$1(l,u,i){var t,o,r,f={};for(r in u)"key"==r?t=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n$1.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return v$1(l,f,t,o,null)}function v$1(n,i,t,o,r){var f={type:n,props:i,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u$1:r};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function p$1(n){return n.children}function d$1(n,l){this.props=n,this.context=l;}function _$1(n,l){if(null==l)return n.__?_$1(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?_$1(n):null}function k$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return k$1(n)}}function b$1(n){(!n.__d&&(n.__d=!0)&&t$2.push(n)&&!g$1.__r++||o$1!==l$1.debounceRendering)&&((o$1=l$1.debounceRendering)||setTimeout)(g$1);}function g$1(){for(var n;g$1.__r=t$2.length;)n=t$2.sort(function(n,l){return n.__v.__b-l.__v.__b}),t$2=[],n.some(function(n){var l,u,i,t,o,r;n.__d&&(o=(t=(l=n).__v).__e,(r=l.__P)&&(u=[],(i=s$1({},t)).__v=t.__v+1,j$1(r,t,i,l.__n,void 0!==r.ownerSVGElement,null!=t.__h?[o]:null,u,null==o?_$1(t):o,t.__h),z$1(u,t),t.__e!=o&&k$1(t)));});}function w$1(n,l,u,i,t,o,r,c,s,a){var h,y,d,k,b,g,w,x=i&&i.__k||e$2,C=x.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(k=u.__k[h]=null==(k=l[h])||"boolean"==typeof k?null:"string"==typeof k||"number"==typeof k||"bigint"==typeof k?v$1(null,k,null,null,k):Array.isArray(k)?v$1(p$1,{children:k},null,null,null):k.__b>0?v$1(k.type,k.props,k.key,k.ref?k.ref:null,k.__v):k)){if(k.__=u,k.__b=u.__b+1,null===(d=x[h])||d&&k.key==d.key&&k.type===d.type)x[h]=void 0;else for(y=0;y<C;y++){if((d=x[y])&&k.key==d.key&&k.type===d.type){x[y]=void 0;break}d=null;}j$1(n,k,d=d||f$1,t,o,r,c,s,a),b=k.__e,(y=k.ref)&&d.ref!=y&&(w||(w=[]),d.ref&&w.push(d.ref,null,k),w.push(y,k.__c||b,k)),null!=b?(null==g&&(g=b),"function"==typeof k.type&&k.__k===d.__k?k.__d=s=m$2(k,s,n):s=A(n,k,d,x,b,s),"function"==typeof u.type&&(u.__d=s)):s&&d.__e==s&&s.parentNode!=n&&(s=_$1(d));}for(u.__e=g,h=C;h--;)null!=x[h]&&N(x[h],x[h]);if(w)for(h=0;h<w.length;h++)M(w[h],w[++h],w[++h]);}function m$2(n,l,u){for(var i,t=n.__k,o=0;t&&o<t.length;o++)(i=t[o])&&(i.__=n,l="function"==typeof i.type?m$2(i,l,u):A(u,i,i,t,i.__e,l));return l}function A(n,l,u,i,t,o){var r,f,e;if(void 0!==l.__d)r=l.__d,l.__d=void 0;else if(null==u||t!=o||null==t.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(t),r=null;else {for(f=o,e=0;(f=f.nextSibling)&&e<i.length;e+=1)if(f==t)break n;n.insertBefore(t,o),r=o;}return void 0!==r?r:t.nextSibling}function C(n,l,u,i,t){var o;for(o in u)"children"===o||"key"===o||o in l||H(n,o,null,u[o],i);for(o in l)t&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||H(n,o,l[o],u[o],i);}function $(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||c$1.test(l)?u:u+"px";}function H(n,l,u,i,t){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||$(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||$(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?i||n.addEventListener(l,o?T$1:I,o):n.removeEventListener(l,o?T$1:I,o);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&-1==l.indexOf("-")?n.removeAttribute(l):n.setAttribute(l,u));}}function I(n){this.l[n.type+!1](l$1.event?l$1.event(n):n);}function T$1(n){this.l[n.type+!0](l$1.event?l$1.event(n):n);}function j$1(n,u,i,t,o,r,f,e,c){var a,h,v,y,_,k,b,g,m,x,A,C,$,H,I,T=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(a=l$1.__b)&&a(u);try{n:if("function"==typeof T){if(g=u.props,m=(a=T.contextType)&&t[a.__c],x=a?m?m.props.value:a.__:t,i.__c?b=(h=u.__c=i.__c).__=h.__E:("prototype"in T&&T.prototype.render?u.__c=h=new T(g,x):(u.__c=h=new d$1(g,x),h.constructor=T,h.render=O),m&&m.sub(h),h.props=g,h.state||(h.state={}),h.context=x,h.__n=t,v=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=s$1({},h.__s)),s$1(h.__s,T.getDerivedStateFromProps(g,h.__s))),y=h.props,_=h.state,v)null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(null==T.getDerivedStateFromProps&&g!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(g,x),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(g,h.__s,x)||u.__v===i.__v){for(h.props=g,h.state=h.__s,u.__v!==i.__v&&(h.__d=!1),h.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),A=0;A<h._sb.length;A++)h.__h.push(h._sb[A]);h._sb=[],h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(g,h.__s,x),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,_,k);});}if(h.context=x,h.props=g,h.__v=u,h.__P=n,C=l$1.__r,$=0,"prototype"in T&&T.prototype.render){for(h.state=h.__s,h.__d=!1,C&&C(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[];}else do{h.__d=!1,C&&C(u),a=h.render(h.props,h.state,h.context),h.state=h.__s;}while(h.__d&&++$<25);h.state=h.__s,null!=h.getChildContext&&(t=s$1(s$1({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(k=h.getSnapshotBeforeUpdate(y,_)),I=null!=a&&a.type===p$1&&null==a.key?a.props.children:a,w$1(n,Array.isArray(I)?I:[I],u,i,t,o,r,f,e,c),h.base=u.__e,u.__h=null,h.__h.length&&f.push(h),b&&(h.__E=h.__=null),h.__e=!1;}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=L(i.__e,u,i,t,o,r,f,c);(a=l$1.diffed)&&a(u);}catch(n){u.__v=null,(c||null!=r)&&(u.__e=e,u.__h=!!c,r[r.indexOf(e)]=null),l$1.__e(n,u,i);}}function z$1(n,u){l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function L(l,u,i,t,o,r,e,c){var s,h,v,y=i.props,p=u.props,d=u.type,k=0;if("svg"===d&&(o=!0),null!=r)for(;k<r.length;k++)if((s=r[k])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,r[k]=null;break}if(null==l){if(null===d)return document.createTextNode(p);l=o?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,p.is&&p),r=null,c=!1;}if(null===d)y===p||c&&l.data===p||(l.data=p);else {if(r=r&&n$1.call(l.childNodes),h=(y=i.props||f$1).dangerouslySetInnerHTML,v=p.dangerouslySetInnerHTML,!c){if(null!=r)for(y={},k=0;k<l.attributes.length;k++)y[l.attributes[k].name]=l.attributes[k].value;(v||h)&&(v&&(h&&v.__html==h.__html||v.__html===l.innerHTML)||(l.innerHTML=v&&v.__html||""));}if(C(l,p,y,o,c),v)u.__k=[];else if(k=u.props.children,w$1(l,Array.isArray(k)?k:[k],u,i,t,o&&"foreignObject"!==d,r,e,r?r[0]:i.__k&&_$1(i,0),c),null!=r)for(k=r.length;k--;)null!=r[k]&&a$1(r[k]);c||("value"in p&&void 0!==(k=p.value)&&(k!==l.value||"progress"===d&&!k||"option"===d&&k!==y.value)&&H(l,"value",k,y.value,!1),"checked"in p&&void 0!==(k=p.checked)&&k!==l.checked&&H(l,"checked",k,y.checked,!1));}return l}function M(n,u,i){try{"function"==typeof n?n(u):n.current=u;}catch(n){l$1.__e(n,i);}}function N(n,u,i){var t,o;if(l$1.unmount&&l$1.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||M(t,null,u)),null!=(t=n.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(n){l$1.__e(n,u);}t.base=t.__P=null,n.__c=void 0;}if(t=n.__k)for(o=0;o<t.length;o++)t[o]&&N(t[o],u,i||"function"!=typeof n.type);i||null==n.__e||a$1(n.__e),n.__=n.__e=n.__d=void 0;}function O(n,l,u){return this.constructor(n,u)}function P(u,i,t){var o,r,e;l$1.__&&l$1.__(u,i),r=(o="function"==typeof t)?null:t&&t.__k||i.__k,e=[],j$1(i,u=(!o&&t||i).__k=h$1(p$1,null,[u]),r||f$1,f$1,void 0!==i.ownerSVGElement,!o&&t?[t]:r?null:i.firstChild?n$1.call(i.childNodes):null,e,!o&&t?t:r?r.__e:i.firstChild,o),z$1(e,u);}n$1=e$2.slice,l$1={__e:function(n,l,u,i){for(var t,o,r;l=l.__;)if((t=l.__c)&&!t.__)try{if((o=t.constructor)&&null!=o.getDerivedStateFromError&&(t.setState(o.getDerivedStateFromError(n)),r=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(n,i||{}),r=t.__d),r)return t.__E=t}catch(l){n=l;}throw n}},u$1=0,d$1.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=s$1({},this.state),"function"==typeof n&&(n=n(s$1({},u),this.props)),n&&s$1(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),b$1(this));},d$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),b$1(this));},d$1.prototype.render=p$1,t$2=[],g$1.__r=0;
|
|
28099
|
+
|
|
28100
|
+
var t$1,r$1,u,i,o=0,f=[],c=[],e$1=l$1.__b,a=l$1.__r,v=l$1.diffed,l=l$1.__c,m$1=l$1.unmount;function d(t,u){l$1.__h&&l$1.__h(r$1,t,o||u),o=0;var i=r$1.__H||(r$1.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:c}),i.__[t]}function p(n){return o=1,y(B,n)}function y(n,u,i){var o=d(t$1++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):B(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}));}],o.__c=r$1,!r$1.u)){r$1.u=!0;var f=r$1.shouldComponentUpdate;r$1.shouldComponentUpdate=function(n,t,r){if(!o.__c.__H)return !0;var u=o.__c.__H.__.filter(function(n){return n.__c});if(u.every(function(n){return !n.__N}))return !f||f.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0);}}),!(!i&&o.__c.props===n)&&(!f||f.call(this,n,t,r))};}return o.__N||o.__}function h(u,i){var o=d(t$1++,3);!l$1.__s&&z(o.__H,i)&&(o.__=u,o.i=i,r$1.__H.__h.push(o));}function s(u,i){var o=d(t$1++,4);!l$1.__s&&z(o.__H,i)&&(o.__=u,o.i=i,r$1.__h.push(o));}function _(n){return o=5,F(function(){return {current:n}},[])}function F(n,r){var u=d(t$1++,7);return z(u.__H,r)?(u.__V=n(),u.i=r,u.__h=n,u.__V):u.__}function T(n,t){return o=8,F(function(){return n},t)}function b(){for(var t;t=f.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(k),t.__H.__h.forEach(w),t.__H.__h=[];}catch(r){t.__H.__h=[],l$1.__e(r,t.__v);}}l$1.__b=function(n){r$1=null,e$1&&e$1(n);},l$1.__r=function(n){a&&a(n),t$1=0;var i=(r$1=n.__c).__H;i&&(u===r$1?(i.__h=[],r$1.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c,n.__N=n.i=void 0;})):(i.__h.forEach(k),i.__h.forEach(w),i.__h=[])),u=r$1;},l$1.diffed=function(t){v&&v(t);var o=t.__c;o&&o.__H&&(o.__H.__h.length&&(1!==f.push(o)&&i===l$1.requestAnimationFrame||((i=l$1.requestAnimationFrame)||j)(b)),o.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c&&(n.__=n.__V),n.i=void 0,n.__V=c;})),u=r$1=null;},l$1.__c=function(t,r){r.some(function(t){try{t.__h.forEach(k),t.__h=t.__h.filter(function(n){return !n.__||w(n)});}catch(u){r.some(function(n){n.__h&&(n.__h=[]);}),r=[],l$1.__e(u,t.__v);}}),l&&l(t,r);},l$1.unmount=function(t){m$1&&m$1(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{k(n);}catch(n){r=n;}}),u.__H=void 0,r&&l$1.__e(r,u.__v));};var g="function"==typeof requestAnimationFrame;function j(n){var t,r=function(){clearTimeout(u),g&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);g&&(t=requestAnimationFrame(r));}function k(n){var t=r$1,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r$1=t;}function w(n){var t=r$1;n.__c=n.__(),r$1=t;}function z(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function B(n,t){return "function"==typeof t?t(n):t}
|
|
28101
|
+
|
|
28102
|
+
var n=function(t,s,r,e){var u;s[0]=0;for(var h=1;h<s.length;h++){var p=s[h++],a=s[h]?(s[0]|=p?1:2,r[s[h++]]):s[++h];3===p?e[0]=a:4===p?e[1]=Object.assign(e[1]||{},a):5===p?(e[1]=e[1]||{})[s[++h]]=a:6===p?e[1][s[++h]]+=a+"":p?(u=t.apply(a,n(t,a,r,["",null])),e.push(u),a[0]?s[0]|=2:(s[h-2]=0,s[h]=u)):e.push(a);}return e},t=new Map;function e(s){var r=t.get(this);return r||(r=new Map,t.set(this,r)),(r=n(this,r.get(s)||(r.set(s,r=function(n){for(var t,s,r=1,e="",u="",h=[0],p=function(n){1===r&&(n||(e=e.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?h.push(0,n,e):3===r&&(n||e)?(h.push(3,n,e),r=2):2===r&&"..."===e&&n?h.push(4,n,0):2===r&&e&&!n?h.push(5,0,!0,e):r>=5&&((e||!n&&5===r)&&(h.push(r,0,e,s),r=6),n&&(h.push(r,n,0,s),r=6)),e="";},a=0;a<n.length;a++){a&&(1===r&&p(),p(a));for(var l=0;l<n[a].length;l++)t=n[a][l],1===r?"<"===t?(p(),h=[h],r=3):e+=t:4===r?"--"===e&&">"===t?(r=1,e=""):e=t+e[0]:u?t===u?u="":e+=t:'"'===t||"'"===t?u=t:">"===t?(p(),r=1):r&&("="===t?(r=5,s=e,e=""):"/"===t&&(r<5||">"===n[a][l+1])?(p(),3===r&&(h=h[0]),r=h,(h=h[0]).push(2,0,r),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(p(),r=2):e+=t),3===r&&"!--"===e&&(r=4,h=h[0]);}return p(),h}(s)),r),arguments,[])).length>1?r:r[0]}
|
|
28103
|
+
|
|
28104
|
+
var m=e.bind(h$1);
|
|
28105
|
+
|
|
28106
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
28107
|
+
|
|
28108
|
+
/**
|
|
28109
|
+
* Component that renders a popup menu entry.
|
|
28110
|
+
*
|
|
28111
|
+
* @param {string} key
|
|
28112
|
+
* @param {Object} entry
|
|
28113
|
+
* @param {boolean} selected
|
|
28114
|
+
* @param {function} onMouseEnter
|
|
28115
|
+
* @param {function} onMouseLeave
|
|
28116
|
+
* @param {function} onClick
|
|
28117
|
+
*/
|
|
28118
|
+
function PopupMenuItem(props) {
|
|
28119
|
+
const {
|
|
28120
|
+
entry,
|
|
28121
|
+
selected,
|
|
28122
|
+
onMouseEnter,
|
|
28123
|
+
onMouseLeave,
|
|
28124
|
+
onClick
|
|
28125
|
+
} = props;
|
|
28126
|
+
|
|
28127
|
+
const createImage = imageUrl => {
|
|
28128
|
+
return m`<img src=${ imageUrl } class="djs-popup-entry-icon" />`;
|
|
28129
|
+
};
|
|
28130
|
+
|
|
28131
|
+
return m`
|
|
28132
|
+
<li
|
|
28133
|
+
class=${ clsx('entry', { selected }) }
|
|
28134
|
+
data-id=${ entry.id }
|
|
28135
|
+
onClick=${ onClick }
|
|
28136
|
+
onMouseEnter=${ onMouseEnter }
|
|
28137
|
+
onMouseLeave=${ onMouseLeave }
|
|
28138
|
+
>
|
|
28139
|
+
<div class="djs-popup-entry-content">
|
|
28140
|
+
<span
|
|
28141
|
+
class=${ clsx('djs-popup-entry-name', entry.className) }
|
|
28142
|
+
title=${ entry.label || entry.name }
|
|
28143
|
+
>
|
|
28144
|
+
${ entry.imageUrl ? createImage(entry.imageUrl) : null }
|
|
28145
|
+
${ entry.label || entry.name }
|
|
28146
|
+
</span>
|
|
28147
|
+
${ entry.description && m`
|
|
28148
|
+
<span
|
|
28149
|
+
class="djs-popup-entry-description"
|
|
28150
|
+
title=${ entry.description }
|
|
28151
|
+
>
|
|
28152
|
+
${ entry.description }
|
|
28153
|
+
</span>
|
|
28154
|
+
` }
|
|
28155
|
+
</div>
|
|
28156
|
+
${ entry.documentationRef && m`
|
|
28157
|
+
<div class="djs-popup-entry-docs">
|
|
28158
|
+
<a
|
|
28159
|
+
href="${ entry.documentationRef }"
|
|
28160
|
+
onClick=${ (event) => event.stopPropagation() }
|
|
28161
|
+
title="Open element documentation"
|
|
28162
|
+
target="_blank"
|
|
28163
|
+
rel="noopener"
|
|
28164
|
+
>
|
|
28165
|
+
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
28166
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.6368 10.6375V5.91761H11.9995V10.6382C11.9995 10.9973 11.8623 11.3141 11.5878 11.5885C11.3134 11.863 10.9966 12.0002 10.6375 12.0002H1.36266C0.982345 12.0002 0.660159 11.8681 0.396102 11.6041C0.132044 11.34 1.52588e-05 11.0178 1.52588e-05 10.6375V1.36267C1.52588e-05 0.98236 0.132044 0.660173 0.396102 0.396116C0.660159 0.132058 0.982345 2.95639e-05 1.36266 2.95639e-05H5.91624V1.36267H1.36266V10.6375H10.6368ZM12 0H7.2794L7.27873 1.36197H9.68701L3.06507 7.98391L4.01541 8.93425L10.6373 2.31231V4.72059H12V0Z" fill="#818798"/>
|
|
28167
|
+
</svg>
|
|
28168
|
+
</a>
|
|
28169
|
+
</div>
|
|
28170
|
+
` }
|
|
28171
|
+
</li>
|
|
28172
|
+
`;
|
|
28173
|
+
}
|
|
28174
|
+
|
|
28175
|
+
/**
|
|
28176
|
+
* Component that renders a popup menu entry list.
|
|
28177
|
+
*
|
|
28178
|
+
* @param {Array} entries
|
|
28179
|
+
* @param {Object} selectedEntry
|
|
28180
|
+
* @param {function} setSelectedEntry
|
|
28181
|
+
* @param {function} onClick
|
|
28182
|
+
* @param {Object} resultsRef
|
|
28183
|
+
*/
|
|
28184
|
+
|
|
28185
|
+
function PopupMenuList(props) {
|
|
28186
|
+
const {
|
|
28187
|
+
selectedEntry,
|
|
28188
|
+
setSelectedEntry,
|
|
28189
|
+
onClick,
|
|
28190
|
+
entries
|
|
28191
|
+
} = props;
|
|
28192
|
+
|
|
28193
|
+
const resultsRef = _();
|
|
28194
|
+
|
|
28195
|
+
const groups = F(() => groupEntries(entries), [ entries ]);
|
|
28196
|
+
|
|
28197
|
+
// scroll to selected result
|
|
28198
|
+
s(() => {
|
|
28199
|
+
const containerEl = resultsRef.current;
|
|
28200
|
+
|
|
28201
|
+
if (!containerEl)
|
|
28202
|
+
return;
|
|
28203
|
+
|
|
28204
|
+
const selectedEl = containerEl.querySelector('.selected');
|
|
28205
|
+
|
|
28206
|
+
if (selectedEl) {
|
|
28207
|
+
scrollIntoView(selectedEl);
|
|
28208
|
+
}
|
|
28209
|
+
}, [ selectedEntry ]);
|
|
28210
|
+
|
|
28211
|
+
return m`
|
|
28212
|
+
<div class="djs-popup-results" ref=${ resultsRef }>
|
|
28213
|
+
${ groups.map(group => m`
|
|
28214
|
+
${ group.name && m`
|
|
28215
|
+
<div key=${ group.id } class="entry-header">
|
|
28216
|
+
${ group.name }
|
|
28217
|
+
</div>
|
|
28218
|
+
` }
|
|
28219
|
+
<ul class="djs-popup-group" data-group=${ group.id }>
|
|
28220
|
+
${ group.entries.map(entry => m`
|
|
28221
|
+
<${PopupMenuItem}
|
|
28222
|
+
key=${ entry.id }
|
|
28223
|
+
entry=${ entry }
|
|
28224
|
+
selected=${ entry === selectedEntry }
|
|
28225
|
+
onMouseEnter=${ () => setSelectedEntry(entry) }
|
|
28226
|
+
onMouseLeave=${ () => setSelectedEntry(null) }
|
|
28227
|
+
onClick=${ onClick }
|
|
28228
|
+
/>
|
|
28229
|
+
`) }
|
|
28230
|
+
</ul>
|
|
28231
|
+
`) }
|
|
28232
|
+
</div>
|
|
28233
|
+
`;
|
|
28234
|
+
}
|
|
28235
|
+
|
|
28236
|
+
|
|
28237
|
+
// helpers
|
|
28238
|
+
function groupEntries(entries) {
|
|
28239
|
+
const groups = [];
|
|
28240
|
+
|
|
28241
|
+
const getGroup = group => groups.find(elem => group.id === elem.id);
|
|
28242
|
+
|
|
28243
|
+
const containsGroup = group => !!getGroup(group);
|
|
28244
|
+
|
|
28245
|
+
// legacy support for provider built for the old popUp menu
|
|
28246
|
+
const formatGroup = group =>
|
|
28247
|
+
typeof group === 'string' ? { id: group } : group;
|
|
28248
|
+
|
|
28249
|
+
entries.forEach(entry => {
|
|
28250
|
+
|
|
28251
|
+
// assume a default group when none is provided
|
|
28252
|
+
const group = entry.group ? formatGroup(entry.group) : { id: 'default' };
|
|
28253
|
+
|
|
28254
|
+
if (!containsGroup(group)) {
|
|
28255
|
+
groups.push({ ...group, entries: [ entry ] });
|
|
28256
|
+
} else {
|
|
28257
|
+
getGroup(group).entries.push(entry);
|
|
28258
|
+
}
|
|
28259
|
+
});
|
|
28260
|
+
|
|
28261
|
+
return groups;
|
|
28262
|
+
}
|
|
28263
|
+
|
|
28264
|
+
// helpers ////////////////
|
|
28265
|
+
|
|
28266
|
+
function scrollIntoView(el) {
|
|
28267
|
+
if (typeof el.scrollIntoViewIfNeeded === 'function') {
|
|
28268
|
+
el.scrollIntoViewIfNeeded();
|
|
28269
|
+
} else {
|
|
28270
|
+
el.scrollIntoView({
|
|
28271
|
+
scrollMode: 'if-needed',
|
|
28272
|
+
block: 'nearest'
|
|
28273
|
+
});
|
|
28274
|
+
}
|
|
28275
|
+
}
|
|
28276
|
+
|
|
28277
|
+
/**
|
|
28278
|
+
* A component that renders the popup menus.
|
|
28279
|
+
*
|
|
28280
|
+
* @param {function} onClose
|
|
28281
|
+
* @param {function} position
|
|
28282
|
+
* @param {string} className
|
|
28283
|
+
* @param {Array} entries
|
|
28284
|
+
* @param {Array} headerEntries
|
|
28285
|
+
* @param {number} scale
|
|
28286
|
+
* @param {string} [title]
|
|
28287
|
+
* @param {boolean} [search]
|
|
28288
|
+
* @param {number} [width]
|
|
28289
|
+
*/
|
|
28290
|
+
function PopupMenuComponent(props) {
|
|
28291
|
+
const {
|
|
28292
|
+
onClose,
|
|
28293
|
+
onSelect,
|
|
28294
|
+
className,
|
|
28295
|
+
headerEntries,
|
|
28296
|
+
position,
|
|
28297
|
+
title,
|
|
28298
|
+
width,
|
|
28299
|
+
scale,
|
|
28300
|
+
search,
|
|
28301
|
+
entries: originalEntries
|
|
28302
|
+
} = props;
|
|
28303
|
+
|
|
28304
|
+
const searchable = F(() => {
|
|
28305
|
+
if (!isDefined(search)) {
|
|
28306
|
+
return false;
|
|
28307
|
+
}
|
|
28308
|
+
|
|
28309
|
+
return originalEntries.length > 5;
|
|
28310
|
+
}, [ search, originalEntries ]);
|
|
28311
|
+
|
|
28312
|
+
const inputRef = _();
|
|
28313
|
+
|
|
28314
|
+
const [ value, setValue ] = p('');
|
|
28315
|
+
|
|
28316
|
+
const [ entries, setEntries ] = p(originalEntries);
|
|
28317
|
+
const [ selectedEntry, setSelectedEntry ] = p(entries[0]);
|
|
28318
|
+
|
|
28319
|
+
const updateEntries = T((newEntries) => {
|
|
28320
|
+
|
|
28321
|
+
// select first entry if non is selected
|
|
28322
|
+
if (!selectedEntry || !newEntries.includes(selectedEntry)) {
|
|
28323
|
+
setSelectedEntry(newEntries[0]);
|
|
28324
|
+
}
|
|
28325
|
+
|
|
28326
|
+
setEntries(newEntries);
|
|
28327
|
+
}, [ selectedEntry, setEntries, setSelectedEntry ]);
|
|
28328
|
+
|
|
28329
|
+
// filter entries on value change
|
|
28330
|
+
h(() => {
|
|
28331
|
+
if (!searchable) {
|
|
28332
|
+
return;
|
|
28333
|
+
}
|
|
28334
|
+
|
|
28335
|
+
const filter = entry => {
|
|
28336
|
+
if (!value) {
|
|
28337
|
+
return true;
|
|
28338
|
+
}
|
|
28339
|
+
|
|
28340
|
+
const search = [
|
|
28341
|
+
entry.name,
|
|
28342
|
+
entry.description || '',
|
|
28343
|
+
entry.label || '',
|
|
28344
|
+
entry.id || ''
|
|
28345
|
+
]
|
|
28346
|
+
.join('---')
|
|
28347
|
+
.toLowerCase();
|
|
28348
|
+
|
|
28349
|
+
return value
|
|
28350
|
+
.toLowerCase()
|
|
28351
|
+
.split(/\s/g)
|
|
28352
|
+
.every(term => search.includes(term));
|
|
28353
|
+
};
|
|
28354
|
+
|
|
28355
|
+
const entries = originalEntries.filter(filter);
|
|
28356
|
+
|
|
28357
|
+
updateEntries(entries);
|
|
28358
|
+
}, [ value, originalEntries, searchable ]);
|
|
28359
|
+
|
|
28360
|
+
// register global <Escape> handler
|
|
28361
|
+
h(() => {
|
|
28362
|
+
const handleKeyDown = event => {
|
|
28363
|
+
if (event.key === 'Escape') {
|
|
28364
|
+
event.preventDefault();
|
|
28365
|
+
|
|
28366
|
+
return onClose();
|
|
28367
|
+
}
|
|
28368
|
+
};
|
|
28369
|
+
|
|
28370
|
+
document.documentElement.addEventListener('keydown', handleKeyDown);
|
|
28371
|
+
|
|
28372
|
+
return () => {
|
|
28373
|
+
document.documentElement.removeEventListener('keydown', handleKeyDown);
|
|
28374
|
+
};
|
|
28375
|
+
}, []);
|
|
28376
|
+
|
|
28377
|
+
// focus input on initial mount
|
|
28378
|
+
s(() => {
|
|
28379
|
+
inputRef.current && inputRef.current.focus();
|
|
28380
|
+
}, []);
|
|
28381
|
+
|
|
28382
|
+
// handle keyboard seleciton
|
|
28383
|
+
const keyboardSelect = T(direction => {
|
|
28384
|
+
const idx = entries.indexOf(selectedEntry);
|
|
28385
|
+
|
|
28386
|
+
let nextIdx = idx + direction;
|
|
28387
|
+
|
|
28388
|
+
if (nextIdx < 0) {
|
|
28389
|
+
nextIdx = entries.length - 1;
|
|
28390
|
+
}
|
|
28391
|
+
|
|
28392
|
+
if (nextIdx >= entries.length) {
|
|
28393
|
+
nextIdx = 0;
|
|
28394
|
+
}
|
|
28395
|
+
|
|
28396
|
+
setSelectedEntry(entries[nextIdx]);
|
|
28397
|
+
}, [ entries, selectedEntry, setSelectedEntry ]);
|
|
28398
|
+
|
|
28399
|
+
const handleKeyDown = T(event => {
|
|
28400
|
+
if (event.key === 'Enter' && selectedEntry) {
|
|
28401
|
+
return onSelect(event, selectedEntry);
|
|
28402
|
+
}
|
|
28403
|
+
|
|
28404
|
+
if (event.key === 'Escape') {
|
|
28405
|
+
return onClose();
|
|
28406
|
+
}
|
|
28407
|
+
|
|
28408
|
+
// ARROW_UP or SHIFT + TAB navigation
|
|
28409
|
+
if (event.key === 'ArrowUp' || (event.key === 'Tab' && event.shiftKey)) {
|
|
28410
|
+
keyboardSelect(-1);
|
|
28411
|
+
|
|
28412
|
+
return event.preventDefault();
|
|
28413
|
+
}
|
|
28414
|
+
|
|
28415
|
+
// ARROW_DOWN or TAB navigation
|
|
28416
|
+
if (event.key === 'ArrowDown' || event.key === 'Tab') {
|
|
28417
|
+
keyboardSelect(1);
|
|
28418
|
+
|
|
28419
|
+
return event.preventDefault();
|
|
28420
|
+
}
|
|
28421
|
+
}, [ onSelect, onClose, selectedEntry, keyboardSelect ]);
|
|
28422
|
+
|
|
28423
|
+
const handleKey = T(event => {
|
|
28424
|
+
if (matches(event.target, 'input')) {
|
|
28425
|
+
setValue(() => event.target.value);
|
|
28426
|
+
}
|
|
28427
|
+
}, [ setValue ]);
|
|
28428
|
+
|
|
28429
|
+
const displayHeader = F(() => title || headerEntries.length > 0, [ title, headerEntries ]);
|
|
28430
|
+
|
|
28431
|
+
return m`
|
|
28432
|
+
<${PopupMenuWrapper}
|
|
28433
|
+
onClose=${ onClose }
|
|
28434
|
+
onKeyup=${ handleKey }
|
|
28435
|
+
onKeydown=${ handleKeyDown }
|
|
28436
|
+
className=${ className }
|
|
28437
|
+
position=${position}
|
|
28438
|
+
width=${ width }
|
|
28439
|
+
scale=${ scale }
|
|
28440
|
+
>
|
|
28441
|
+
${ displayHeader && m`
|
|
28442
|
+
<div class="djs-popup-header">
|
|
28443
|
+
<h3 class="djs-popup-title">${ title }</h3>
|
|
28444
|
+
${ headerEntries.map(entry => m`
|
|
28445
|
+
<span
|
|
28446
|
+
class=${ getHeaderClasses(entry, entry === selectedEntry) }
|
|
28447
|
+
onClick=${ event => onSelect(event, entry) }
|
|
28448
|
+
title=${ entry.title }
|
|
28449
|
+
data-id=${ entry.id }
|
|
28450
|
+
onMouseEnter=${ () => setSelectedEntry(entry) }
|
|
28451
|
+
onMouseLeave=${ () => setSelectedEntry(null) }
|
|
28452
|
+
>
|
|
28453
|
+
${ entry.imageUrl ? m`<img src=${ entry.imageUrl } />` : null }
|
|
28454
|
+
${ entry.label ? entry.label : null }
|
|
28455
|
+
</span>
|
|
28456
|
+
`) }
|
|
28457
|
+
</div>
|
|
28458
|
+
` }
|
|
28459
|
+
${ originalEntries.length > 0 && m`
|
|
28460
|
+
<div class="djs-popup-body">
|
|
28461
|
+
|
|
28462
|
+
${ searchable && m`
|
|
28463
|
+
<div class="djs-popup-search">
|
|
28464
|
+
<svg class="djs-popup-search-icon" width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
28465
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.0325 8.5H9.625L13.3675 12.25L12.25 13.3675L8.5 9.625V9.0325L8.2975 8.8225C7.4425 9.5575 6.3325 10 5.125 10C2.4325 10 0.25 7.8175 0.25 5.125C0.25 2.4325 2.4325 0.25 5.125 0.25C7.8175 0.25 10 2.4325 10 5.125C10 6.3325 9.5575 7.4425 8.8225 8.2975L9.0325 8.5ZM1.75 5.125C1.75 6.9925 3.2575 8.5 5.125 8.5C6.9925 8.5 8.5 6.9925 8.5 5.125C8.5 3.2575 6.9925 1.75 5.125 1.75C3.2575 1.75 1.75 3.2575 1.75 5.125Z" fill="#22242A"/>
|
|
28466
|
+
</svg>
|
|
28467
|
+
<input
|
|
28468
|
+
ref=${ inputRef }
|
|
28469
|
+
type="text"
|
|
28470
|
+
/>
|
|
28471
|
+
</div>
|
|
28472
|
+
` }
|
|
28473
|
+
|
|
28474
|
+
<${PopupMenuList}
|
|
28475
|
+
entries=${ entries }
|
|
28476
|
+
selectedEntry=${ selectedEntry }
|
|
28477
|
+
setSelectedEntry=${ setSelectedEntry }
|
|
28478
|
+
onClick=${ onSelect }
|
|
28479
|
+
/>
|
|
28480
|
+
</div>
|
|
28481
|
+
${ entries.length === 0 && m`
|
|
28482
|
+
<div class="djs-popup-no-results">No matching entries found.</div>
|
|
28483
|
+
` }
|
|
28484
|
+
` }
|
|
28485
|
+
</${PopupMenuWrapper}>
|
|
28486
|
+
`;
|
|
28487
|
+
}
|
|
28488
|
+
|
|
28489
|
+
/**
|
|
28490
|
+
* A component that wraps the popup menu.
|
|
28491
|
+
*
|
|
28492
|
+
* @param {any} props
|
|
28493
|
+
*/
|
|
28494
|
+
function PopupMenuWrapper(props) {
|
|
28495
|
+
const {
|
|
28496
|
+
onClose,
|
|
28497
|
+
onKeydown,
|
|
28498
|
+
onKeyup,
|
|
28499
|
+
className,
|
|
28500
|
+
children,
|
|
28501
|
+
position: positionGetter
|
|
28502
|
+
} = props;
|
|
28503
|
+
|
|
28504
|
+
const popupRef = _();
|
|
28505
|
+
|
|
28506
|
+
const checkClose = T((event) => {
|
|
28507
|
+
|
|
28508
|
+
const overlay = closest(event.target, '.djs-popup .djs-popup-overlay', true);
|
|
28509
|
+
|
|
28510
|
+
if (overlay) {
|
|
28511
|
+
return;
|
|
28512
|
+
}
|
|
28513
|
+
|
|
28514
|
+
onClose();
|
|
28515
|
+
}, [ onClose ]);
|
|
28516
|
+
|
|
28517
|
+
const overlayRef = _();
|
|
28518
|
+
|
|
28519
|
+
s(() => {
|
|
28520
|
+
if (typeof positionGetter !== 'function') {
|
|
28521
|
+
return;
|
|
28522
|
+
}
|
|
28523
|
+
|
|
28524
|
+
const overlayEl = overlayRef.current;
|
|
28525
|
+
const position = positionGetter(overlayEl);
|
|
28526
|
+
|
|
28527
|
+
overlayEl.style.left = `${position.x}px`;
|
|
28528
|
+
overlayEl.style.top = `${position.y}px`;
|
|
28529
|
+
}, [ overlayRef.current, positionGetter ]);
|
|
28530
|
+
|
|
28531
|
+
// focus popup initially, on mount
|
|
28532
|
+
s(() => {
|
|
28533
|
+
popupRef.current && popupRef.current.focus();
|
|
28534
|
+
}, []);
|
|
28535
|
+
|
|
28536
|
+
return m`
|
|
28537
|
+
<div
|
|
28538
|
+
class=${ clsx('djs-popup', className) }
|
|
28539
|
+
onClick=${ checkClose }
|
|
28540
|
+
onKeydown=${ onKeydown }
|
|
28541
|
+
onKeyup=${ onKeyup }
|
|
28542
|
+
ref=${ popupRef }
|
|
28543
|
+
tabIndex="-1"
|
|
28544
|
+
>
|
|
28545
|
+
<div
|
|
28546
|
+
class="djs-popup-overlay"
|
|
28547
|
+
ref=${ overlayRef }
|
|
28548
|
+
style=${ getOverlayStyle(props) }
|
|
28549
|
+
>
|
|
28550
|
+
${children}
|
|
28551
|
+
</div>
|
|
28552
|
+
</div>
|
|
28553
|
+
`;
|
|
28554
|
+
}
|
|
28555
|
+
|
|
28556
|
+
// helpers //////////////////////
|
|
28557
|
+
|
|
28558
|
+
function getOverlayStyle(props) {
|
|
28559
|
+
return {
|
|
28560
|
+
transform: `scale(${props.scale})`,
|
|
28561
|
+
width: `${props.width}px`
|
|
28562
|
+
};
|
|
28563
|
+
}
|
|
28564
|
+
|
|
28565
|
+
function getHeaderClasses(entry, selected) {
|
|
28566
|
+
return clsx(
|
|
28567
|
+
'entry',
|
|
28568
|
+
entry.className,
|
|
28569
|
+
entry.active ? 'active' : '',
|
|
28570
|
+
entry.disabled ? 'disabled' : '',
|
|
28571
|
+
selected ? 'selected' : ''
|
|
28572
|
+
);
|
|
28573
|
+
}
|
|
28574
|
+
|
|
28099
28575
|
var DATA_REF = 'data-id';
|
|
28100
28576
|
|
|
28101
28577
|
var CLOSE_EVENTS = [
|
|
@@ -28121,6 +28597,9 @@
|
|
|
28121
28597
|
* @constructor
|
|
28122
28598
|
*/
|
|
28123
28599
|
function PopupMenu(config, eventBus, canvas) {
|
|
28600
|
+
this._eventBus = eventBus;
|
|
28601
|
+
this._canvas = canvas;
|
|
28602
|
+
this._current = {};
|
|
28124
28603
|
|
|
28125
28604
|
var scale = isDefined(config && config.scale) ? config.scale : {
|
|
28126
28605
|
min: 1,
|
|
@@ -28131,10 +28610,20 @@
|
|
|
28131
28610
|
scale: scale
|
|
28132
28611
|
};
|
|
28133
28612
|
|
|
28134
|
-
|
|
28135
|
-
|
|
28136
|
-
|
|
28137
|
-
|
|
28613
|
+
|
|
28614
|
+
eventBus.on('diagram.destroy', () => {
|
|
28615
|
+
this._destroy();
|
|
28616
|
+
});
|
|
28617
|
+
|
|
28618
|
+
eventBus.on('element.changed', event => {
|
|
28619
|
+
|
|
28620
|
+
const element = this.isOpen() && this._current.element;
|
|
28621
|
+
|
|
28622
|
+
if (event.element === element) {
|
|
28623
|
+
this._render();
|
|
28624
|
+
}
|
|
28625
|
+
});
|
|
28626
|
+
|
|
28138
28627
|
}
|
|
28139
28628
|
|
|
28140
28629
|
PopupMenu.$inject = [
|
|
@@ -28143,65 +28632,51 @@
|
|
|
28143
28632
|
'canvas'
|
|
28144
28633
|
];
|
|
28145
28634
|
|
|
28146
|
-
|
|
28147
|
-
* Registers a popup menu provider
|
|
28148
|
-
*
|
|
28149
|
-
* @param {string} id
|
|
28150
|
-
* @param {number} [priority=1000]
|
|
28151
|
-
* @param {Object} provider
|
|
28152
|
-
*
|
|
28153
|
-
* @example
|
|
28154
|
-
* const popupMenuProvider = {
|
|
28155
|
-
* getPopupMenuEntries: function(element) {
|
|
28156
|
-
* return {
|
|
28157
|
-
* 'entry-1': {
|
|
28158
|
-
* label: 'My Entry',
|
|
28159
|
-
* action: function() { alert("I have been clicked!"); }
|
|
28160
|
-
* }
|
|
28161
|
-
* }
|
|
28162
|
-
* }
|
|
28163
|
-
* };
|
|
28164
|
-
*
|
|
28165
|
-
* popupMenu.registerProvider('myMenuID', popupMenuProvider);
|
|
28166
|
-
*/
|
|
28167
|
-
PopupMenu.prototype.registerProvider = function(id, priority, provider) {
|
|
28168
|
-
if (!provider) {
|
|
28169
|
-
provider = priority;
|
|
28170
|
-
priority = DEFAULT_PRIORITY$1;
|
|
28171
|
-
}
|
|
28172
|
-
|
|
28173
|
-
this._eventBus.on('popupMenu.getProviders.' + id, priority, function(event) {
|
|
28174
|
-
event.providers.push(provider);
|
|
28175
|
-
});
|
|
28176
|
-
};
|
|
28177
|
-
|
|
28178
|
-
/**
|
|
28179
|
-
* Determine if the popup menu has entries.
|
|
28180
|
-
*
|
|
28181
|
-
* @return {boolean} true if empty
|
|
28182
|
-
*/
|
|
28183
|
-
PopupMenu.prototype.isEmpty = function(element, providerId) {
|
|
28184
|
-
if (!element) {
|
|
28185
|
-
throw new Error('element parameter is missing');
|
|
28186
|
-
}
|
|
28187
|
-
|
|
28188
|
-
if (!providerId) {
|
|
28189
|
-
throw new Error('providerId parameter is missing');
|
|
28190
|
-
}
|
|
28635
|
+
PopupMenu.prototype._render = function() {
|
|
28191
28636
|
|
|
28192
|
-
|
|
28637
|
+
const {
|
|
28638
|
+
position: _position,
|
|
28639
|
+
className,
|
|
28640
|
+
entries,
|
|
28641
|
+
headerEntries,
|
|
28642
|
+
options
|
|
28643
|
+
} = this._current;
|
|
28193
28644
|
|
|
28194
|
-
|
|
28195
|
-
|
|
28196
|
-
|
|
28645
|
+
const entriesArray = [
|
|
28646
|
+
...Object.entries(entries).map(
|
|
28647
|
+
([ key, value ]) => ({ id: key, ...value })
|
|
28648
|
+
)
|
|
28649
|
+
];
|
|
28197
28650
|
|
|
28198
|
-
|
|
28199
|
-
|
|
28651
|
+
const headerEntriesArray = [
|
|
28652
|
+
...Object.entries(headerEntries).map(
|
|
28653
|
+
([ key, value ]) => ({ id: key, ...value })
|
|
28654
|
+
)
|
|
28655
|
+
];
|
|
28200
28656
|
|
|
28201
|
-
|
|
28202
|
-
|
|
28657
|
+
const position = _position && (
|
|
28658
|
+
(container) => this._ensureVisible(container, _position)
|
|
28659
|
+
);
|
|
28203
28660
|
|
|
28204
|
-
|
|
28661
|
+
const scale = this._updateScale(this._current.container);
|
|
28662
|
+
|
|
28663
|
+
const onClose = result => this.close(result);
|
|
28664
|
+
const onSelect = (event, entry) => this.trigger(event, entry);
|
|
28665
|
+
|
|
28666
|
+
P(m`
|
|
28667
|
+
<${PopupMenuComponent}
|
|
28668
|
+
onClose=${ onClose }
|
|
28669
|
+
onSelect=${ onSelect }
|
|
28670
|
+
position=${ position }
|
|
28671
|
+
className=${ className }
|
|
28672
|
+
entries=${ entriesArray }
|
|
28673
|
+
headerEntries=${ headerEntriesArray }
|
|
28674
|
+
scale=${ scale }
|
|
28675
|
+
...${{ ...options }}
|
|
28676
|
+
/>
|
|
28677
|
+
`,
|
|
28678
|
+
this._current.container
|
|
28679
|
+
);
|
|
28205
28680
|
};
|
|
28206
28681
|
|
|
28207
28682
|
|
|
@@ -28214,16 +28689,13 @@
|
|
|
28214
28689
|
*
|
|
28215
28690
|
* @return {Object} popup menu instance
|
|
28216
28691
|
*/
|
|
28217
|
-
PopupMenu.prototype.open = function(element,
|
|
28218
|
-
|
|
28219
|
-
var providers = this._getProviders(id);
|
|
28220
|
-
|
|
28692
|
+
PopupMenu.prototype.open = function(element, providerId, position, options) {
|
|
28221
28693
|
if (!element) {
|
|
28222
28694
|
throw new Error('Element is missing');
|
|
28223
28695
|
}
|
|
28224
28696
|
|
|
28225
|
-
if (!
|
|
28226
|
-
throw new Error('No registered providers for: ' +
|
|
28697
|
+
if (!providerId) {
|
|
28698
|
+
throw new Error('No registered providers for: ' + providerId);
|
|
28227
28699
|
}
|
|
28228
28700
|
|
|
28229
28701
|
if (!position) {
|
|
@@ -28233,45 +28705,52 @@
|
|
|
28233
28705
|
if (this.isOpen()) {
|
|
28234
28706
|
this.close();
|
|
28235
28707
|
}
|
|
28708
|
+
const {
|
|
28709
|
+
entries,
|
|
28710
|
+
headerEntries
|
|
28711
|
+
} = this._getContext(element, providerId);
|
|
28712
|
+
|
|
28713
|
+
this._current = {
|
|
28714
|
+
position,
|
|
28715
|
+
className: providerId,
|
|
28716
|
+
element,
|
|
28717
|
+
entries,
|
|
28718
|
+
headerEntries,
|
|
28719
|
+
container: this._createContainer({ provider: providerId }),
|
|
28720
|
+
options
|
|
28721
|
+
};
|
|
28236
28722
|
|
|
28237
28723
|
this._emit('open');
|
|
28238
28724
|
|
|
28239
|
-
|
|
28240
|
-
|
|
28241
|
-
|
|
28242
|
-
position: position
|
|
28243
|
-
};
|
|
28725
|
+
this._bindAutoClose();
|
|
28726
|
+
|
|
28727
|
+
this._render();
|
|
28244
28728
|
|
|
28245
|
-
var entries = this._getEntries(element, providers),
|
|
28246
|
-
headerEntries = this._getHeaderEntries(element, providers);
|
|
28247
28729
|
|
|
28248
|
-
|
|
28730
|
+
};
|
|
28249
28731
|
|
|
28250
|
-
current.container = this._createContainer(id);
|
|
28251
28732
|
|
|
28252
|
-
|
|
28253
|
-
current.container.appendChild(
|
|
28254
|
-
this._createEntries(headerEntries, 'djs-popup-header')
|
|
28255
|
-
);
|
|
28256
|
-
}
|
|
28733
|
+
PopupMenu.prototype._getContext = function(element, provider) {
|
|
28257
28734
|
|
|
28258
|
-
|
|
28259
|
-
|
|
28260
|
-
|
|
28261
|
-
);
|
|
28735
|
+
const providers = this._getProviders(provider);
|
|
28736
|
+
|
|
28737
|
+
if (!providers || !providers.length) {
|
|
28738
|
+
throw new Error('No registered providers for: ' + provider);
|
|
28262
28739
|
}
|
|
28263
28740
|
|
|
28264
|
-
|
|
28265
|
-
|
|
28741
|
+
const entries = this._getEntries(element, providers);
|
|
28742
|
+
const headerEntries = this._getHeaderEntries(element, providers);
|
|
28266
28743
|
|
|
28267
|
-
|
|
28268
|
-
|
|
28744
|
+
return {
|
|
28745
|
+
entries,
|
|
28746
|
+
headerEntries,
|
|
28747
|
+
empty: !(
|
|
28748
|
+
Object.keys(entries).length ||
|
|
28749
|
+
Object.keys(headerEntries).length
|
|
28750
|
+
)
|
|
28751
|
+
};
|
|
28269
28752
|
};
|
|
28270
28753
|
|
|
28271
|
-
|
|
28272
|
-
/**
|
|
28273
|
-
* Removes the popup menu and unbinds the event handlers.
|
|
28274
|
-
*/
|
|
28275
28754
|
PopupMenu.prototype.close = function() {
|
|
28276
28755
|
|
|
28277
28756
|
if (!this.isOpen()) {
|
|
@@ -28280,44 +28759,179 @@
|
|
|
28280
28759
|
|
|
28281
28760
|
this._emit('close');
|
|
28282
28761
|
|
|
28283
|
-
this.
|
|
28284
|
-
|
|
28762
|
+
this.reset();
|
|
28763
|
+
|
|
28285
28764
|
this._current.container = null;
|
|
28286
28765
|
};
|
|
28287
28766
|
|
|
28767
|
+
PopupMenu.prototype.reset = function() {
|
|
28768
|
+
P(null, this._current.container);
|
|
28769
|
+
};
|
|
28770
|
+
|
|
28771
|
+
PopupMenu.prototype._emit = function(event, payload) {
|
|
28772
|
+
this._eventBus.fire(`popupMenu.${ event }`, payload);
|
|
28773
|
+
};
|
|
28774
|
+
|
|
28775
|
+
PopupMenu.prototype._createContainer = function(config) {
|
|
28776
|
+
|
|
28777
|
+
let parent = config && config.parent || 'body';
|
|
28778
|
+
|
|
28779
|
+
if (typeof parent === 'string') {
|
|
28780
|
+
parent = document.querySelector(parent);
|
|
28781
|
+
}
|
|
28782
|
+
|
|
28783
|
+
const container = domify$1(`<div class="djs-popup-parent djs-parent" data-popup=${config.provider}></div>`);
|
|
28784
|
+
|
|
28785
|
+
parent.appendChild(container);
|
|
28786
|
+
|
|
28787
|
+
return container;
|
|
28788
|
+
};
|
|
28288
28789
|
|
|
28289
28790
|
/**
|
|
28290
|
-
*
|
|
28291
|
-
*
|
|
28292
|
-
* @return {boolean} true if open
|
|
28791
|
+
* Set up listener to close popup automatically on certain events.
|
|
28293
28792
|
*/
|
|
28294
|
-
PopupMenu.prototype.
|
|
28295
|
-
|
|
28793
|
+
PopupMenu.prototype._bindAutoClose = function() {
|
|
28794
|
+
this._eventBus.once(CLOSE_EVENTS, this.close, this);
|
|
28296
28795
|
};
|
|
28297
28796
|
|
|
28298
28797
|
|
|
28299
28798
|
/**
|
|
28300
|
-
*
|
|
28301
|
-
|
|
28302
|
-
|
|
28799
|
+
* Remove the auto-closing listener.
|
|
28800
|
+
*/
|
|
28801
|
+
PopupMenu.prototype._unbindAutoClose = function() {
|
|
28802
|
+
this._eventBus.off(CLOSE_EVENTS, this.close, this);
|
|
28803
|
+
};
|
|
28804
|
+
|
|
28805
|
+
|
|
28806
|
+
PopupMenu.prototype._destroy = function() {
|
|
28807
|
+
this._current.container && remove$2(this._current.container);
|
|
28808
|
+
};
|
|
28809
|
+
|
|
28810
|
+
|
|
28811
|
+
/**
|
|
28812
|
+
* Updates popup style.transform with respect to the config and zoom level.
|
|
28303
28813
|
*
|
|
28304
|
-
* @
|
|
28814
|
+
* @param {Object} container
|
|
28305
28815
|
*/
|
|
28306
|
-
PopupMenu.prototype.
|
|
28816
|
+
PopupMenu.prototype._updateScale = function(container) {
|
|
28817
|
+
var zoom = this._canvas.zoom();
|
|
28307
28818
|
|
|
28308
|
-
|
|
28309
|
-
|
|
28819
|
+
var scaleConfig = this._config.scale,
|
|
28820
|
+
minScale,
|
|
28821
|
+
maxScale,
|
|
28822
|
+
scale = zoom;
|
|
28310
28823
|
|
|
28311
|
-
|
|
28312
|
-
entryId = attr$1(element, DATA_REF);
|
|
28824
|
+
if (scaleConfig !== true) {
|
|
28313
28825
|
|
|
28314
|
-
|
|
28826
|
+
if (scaleConfig === false) {
|
|
28827
|
+
minScale = 1;
|
|
28828
|
+
maxScale = 1;
|
|
28829
|
+
} else {
|
|
28830
|
+
minScale = scaleConfig.min;
|
|
28831
|
+
maxScale = scaleConfig.max;
|
|
28832
|
+
}
|
|
28315
28833
|
|
|
28316
|
-
|
|
28317
|
-
|
|
28834
|
+
if (isDefined(minScale) && zoom < minScale) {
|
|
28835
|
+
scale = minScale;
|
|
28836
|
+
}
|
|
28837
|
+
|
|
28838
|
+
if (isDefined(maxScale) && zoom > maxScale) {
|
|
28839
|
+
scale = maxScale;
|
|
28840
|
+
}
|
|
28841
|
+
|
|
28842
|
+
}
|
|
28843
|
+
|
|
28844
|
+
return scale;
|
|
28845
|
+
|
|
28846
|
+
};
|
|
28847
|
+
|
|
28848
|
+
PopupMenu.prototype._ensureVisible = function(container, position) {
|
|
28849
|
+
var documentBounds = document.documentElement.getBoundingClientRect();
|
|
28850
|
+
var containerBounds = container.getBoundingClientRect();
|
|
28851
|
+
|
|
28852
|
+
var overAxis = {},
|
|
28853
|
+
left = position.x,
|
|
28854
|
+
top = position.y;
|
|
28855
|
+
|
|
28856
|
+
if (position.x + containerBounds.width > documentBounds.width) {
|
|
28857
|
+
overAxis.x = true;
|
|
28858
|
+
}
|
|
28859
|
+
|
|
28860
|
+
if (position.y + containerBounds.height > documentBounds.height) {
|
|
28861
|
+
overAxis.y = true;
|
|
28862
|
+
}
|
|
28863
|
+
|
|
28864
|
+
if (overAxis.x && overAxis.y) {
|
|
28865
|
+
left = position.x - containerBounds.width;
|
|
28866
|
+
top = position.y - containerBounds.height;
|
|
28867
|
+
} else if (overAxis.x) {
|
|
28868
|
+
left = position.x - containerBounds.width;
|
|
28869
|
+
top = position.y;
|
|
28870
|
+
} else if (overAxis.y && position.y < containerBounds.height) {
|
|
28871
|
+
left = position.x;
|
|
28872
|
+
top = 10;
|
|
28873
|
+
} else if (overAxis.y) {
|
|
28874
|
+
left = position.x;
|
|
28875
|
+
top = position.y - containerBounds.height;
|
|
28876
|
+
}
|
|
28877
|
+
|
|
28878
|
+
return {
|
|
28879
|
+
x: left,
|
|
28880
|
+
y: top
|
|
28881
|
+
};
|
|
28882
|
+
};
|
|
28883
|
+
|
|
28884
|
+
PopupMenu.prototype.isEmpty = function(element, providerId) {
|
|
28885
|
+
if (!element) {
|
|
28886
|
+
throw new Error('element parameter is missing');
|
|
28887
|
+
}
|
|
28888
|
+
|
|
28889
|
+
if (!providerId) {
|
|
28890
|
+
throw new Error('providerId parameter is missing');
|
|
28891
|
+
}
|
|
28892
|
+
|
|
28893
|
+
const providers = this._getProviders(providerId);
|
|
28894
|
+
|
|
28895
|
+
if (!providers || !providers.length) {
|
|
28896
|
+
return true;
|
|
28897
|
+
}
|
|
28898
|
+
|
|
28899
|
+
return this._getContext(element, providerId).empty;
|
|
28900
|
+
};
|
|
28901
|
+
|
|
28902
|
+
/**
|
|
28903
|
+
* Registers a popup menu provider
|
|
28904
|
+
*
|
|
28905
|
+
* @param {string} id
|
|
28906
|
+
* @param {number} [priority=1000]
|
|
28907
|
+
* @param {Object} provider
|
|
28908
|
+
*
|
|
28909
|
+
* @example
|
|
28910
|
+
* const popupMenuProvider = {
|
|
28911
|
+
* getPopupMenuEntries: function(element) {
|
|
28912
|
+
* return {
|
|
28913
|
+
* 'entry-1': {
|
|
28914
|
+
* label: 'My Entry',
|
|
28915
|
+
* action: function() { alert("I have been clicked!"); }
|
|
28916
|
+
* }
|
|
28917
|
+
* }
|
|
28918
|
+
* }
|
|
28919
|
+
* };
|
|
28920
|
+
*
|
|
28921
|
+
* popupMenu.registerProvider('myMenuID', popupMenuProvider);
|
|
28922
|
+
*/
|
|
28923
|
+
PopupMenu.prototype.registerProvider = function(id, priority, provider) {
|
|
28924
|
+
if (!provider) {
|
|
28925
|
+
provider = priority;
|
|
28926
|
+
priority = DEFAULT_PRIORITY$1;
|
|
28318
28927
|
}
|
|
28928
|
+
|
|
28929
|
+
this._eventBus.on('popupMenu.getProviders.' + id, priority, function(event) {
|
|
28930
|
+
event.providers.push(provider);
|
|
28931
|
+
});
|
|
28319
28932
|
};
|
|
28320
28933
|
|
|
28934
|
+
|
|
28321
28935
|
PopupMenu.prototype._getProviders = function(id) {
|
|
28322
28936
|
|
|
28323
28937
|
var event = this._eventBus.createEvent({
|
|
@@ -28406,282 +29020,61 @@
|
|
|
28406
29020
|
|
|
28407
29021
|
};
|
|
28408
29022
|
|
|
28409
|
-
/**
|
|
28410
|
-
* Gets an entry instance (either entry or headerEntry) by id.
|
|
28411
|
-
*
|
|
28412
|
-
* @param {string} entryId
|
|
28413
|
-
*
|
|
28414
|
-
* @return {Object} entry instance
|
|
28415
|
-
*/
|
|
28416
|
-
PopupMenu.prototype._getEntry = function(entryId) {
|
|
28417
|
-
|
|
28418
|
-
var entry = this._current.entries[entryId];
|
|
28419
|
-
|
|
28420
|
-
if (!entry) {
|
|
28421
|
-
throw new Error('entry not found');
|
|
28422
|
-
}
|
|
28423
|
-
|
|
28424
|
-
return entry;
|
|
28425
|
-
};
|
|
28426
|
-
|
|
28427
|
-
PopupMenu.prototype._emit = function(eventName) {
|
|
28428
|
-
this._eventBus.fire('popupMenu.' + eventName);
|
|
28429
|
-
};
|
|
28430
|
-
|
|
28431
|
-
/**
|
|
28432
|
-
* Creates the popup menu container.
|
|
28433
|
-
*
|
|
28434
|
-
* @return {Object} a DOM container
|
|
28435
|
-
*/
|
|
28436
|
-
PopupMenu.prototype._createContainer = function(id) {
|
|
28437
|
-
var container = domify$1('<div class="djs-popup">'),
|
|
28438
|
-
position = this._current.position,
|
|
28439
|
-
className = this._current.className;
|
|
28440
|
-
|
|
28441
|
-
assign(container, {
|
|
28442
|
-
position: 'absolute',
|
|
28443
|
-
left: position.x + 'px',
|
|
28444
|
-
top: position.y + 'px',
|
|
28445
|
-
visibility: 'hidden'
|
|
28446
|
-
});
|
|
28447
|
-
|
|
28448
|
-
classes$1(container).add(className);
|
|
28449
|
-
|
|
28450
|
-
attr$1(container, 'data-popup', id);
|
|
28451
|
-
|
|
28452
|
-
return container;
|
|
28453
|
-
};
|
|
28454
|
-
|
|
28455
29023
|
|
|
28456
29024
|
/**
|
|
28457
|
-
*
|
|
28458
|
-
*
|
|
28459
|
-
* @param {Object} container
|
|
28460
|
-
* @param {Object} parent
|
|
28461
|
-
*/
|
|
28462
|
-
PopupMenu.prototype._attachContainer = function(container, parent, cursor) {
|
|
28463
|
-
var self = this;
|
|
28464
|
-
|
|
28465
|
-
// Event handler
|
|
28466
|
-
delegate.bind(container, '.entry' ,'click', function(event) {
|
|
28467
|
-
self.trigger(event);
|
|
28468
|
-
});
|
|
28469
|
-
|
|
28470
|
-
this._updateScale(container);
|
|
28471
|
-
|
|
28472
|
-
// Attach to DOM
|
|
28473
|
-
parent.appendChild(container);
|
|
28474
|
-
|
|
28475
|
-
if (cursor) {
|
|
28476
|
-
this._assureIsInbounds(container, cursor);
|
|
28477
|
-
}
|
|
28478
|
-
|
|
28479
|
-
// display after position adjustment to avoid flickering
|
|
28480
|
-
assign(container, { visibility: 'visible' });
|
|
28481
|
-
};
|
|
28482
|
-
|
|
28483
|
-
|
|
28484
|
-
/**
|
|
28485
|
-
* Updates popup style.transform with respect to the config and zoom level.
|
|
28486
|
-
*
|
|
28487
|
-
* @method _updateScale
|
|
29025
|
+
* Determine if an open popup menu exist.
|
|
28488
29026
|
*
|
|
28489
|
-
* @
|
|
29027
|
+
* @return {boolean} true if open
|
|
28490
29028
|
*/
|
|
28491
|
-
PopupMenu.prototype.
|
|
28492
|
-
|
|
28493
|
-
|
|
28494
|
-
var scaleConfig = this._config.scale,
|
|
28495
|
-
minScale,
|
|
28496
|
-
maxScale,
|
|
28497
|
-
scale = zoom;
|
|
28498
|
-
|
|
28499
|
-
if (scaleConfig !== true) {
|
|
28500
|
-
|
|
28501
|
-
if (scaleConfig === false) {
|
|
28502
|
-
minScale = 1;
|
|
28503
|
-
maxScale = 1;
|
|
28504
|
-
} else {
|
|
28505
|
-
minScale = scaleConfig.min;
|
|
28506
|
-
maxScale = scaleConfig.max;
|
|
28507
|
-
}
|
|
28508
|
-
|
|
28509
|
-
if (isDefined(minScale) && zoom < minScale) {
|
|
28510
|
-
scale = minScale;
|
|
28511
|
-
}
|
|
28512
|
-
|
|
28513
|
-
if (isDefined(maxScale) && zoom > maxScale) {
|
|
28514
|
-
scale = maxScale;
|
|
28515
|
-
}
|
|
28516
|
-
|
|
28517
|
-
}
|
|
28518
|
-
|
|
28519
|
-
setTransform(container, 'scale(' + scale + ')');
|
|
29029
|
+
PopupMenu.prototype.isOpen = function() {
|
|
29030
|
+
return !!this._current.container;
|
|
28520
29031
|
};
|
|
28521
29032
|
|
|
28522
29033
|
|
|
28523
29034
|
/**
|
|
28524
|
-
*
|
|
29035
|
+
* Trigger an action associated with an entry.
|
|
28525
29036
|
*
|
|
28526
|
-
* @
|
|
29037
|
+
* @param {Object} event
|
|
29038
|
+
* @param {Object} entry
|
|
28527
29039
|
*
|
|
28528
|
-
* @
|
|
28529
|
-
* @param {Position} cursor {x, y}
|
|
29040
|
+
* @return the result of the action callback, if any
|
|
28530
29041
|
*/
|
|
28531
|
-
PopupMenu.prototype.
|
|
28532
|
-
var canvas = this._canvas,
|
|
28533
|
-
clientRect = canvas._container.getBoundingClientRect();
|
|
29042
|
+
PopupMenu.prototype.trigger = function(event, entry) {
|
|
28534
29043
|
|
|
28535
|
-
|
|
28536
|
-
|
|
28537
|
-
containerWidth = container.scrollWidth,
|
|
28538
|
-
containerHeight = container.scrollHeight,
|
|
28539
|
-
overAxis = {},
|
|
28540
|
-
left, top;
|
|
28541
|
-
|
|
28542
|
-
var cursorPosition = {
|
|
28543
|
-
x: cursor.x - clientRect.left,
|
|
28544
|
-
y: cursor.y - clientRect.top
|
|
28545
|
-
};
|
|
29044
|
+
// silence other actions
|
|
29045
|
+
event.preventDefault();
|
|
28546
29046
|
|
|
28547
|
-
if (
|
|
28548
|
-
|
|
28549
|
-
|
|
29047
|
+
if (!entry) {
|
|
29048
|
+
let element = closest(event.delegateTarget || event.target, '.entry', true);
|
|
29049
|
+
let entryId = attr$1(element, DATA_REF);
|
|
28550
29050
|
|
|
28551
|
-
|
|
28552
|
-
overAxis.y = true;
|
|
29051
|
+
entry = this._getEntry(entryId);
|
|
28553
29052
|
}
|
|
28554
29053
|
|
|
28555
|
-
if (
|
|
28556
|
-
|
|
28557
|
-
top = cursorPosition.y - containerHeight + 'px';
|
|
28558
|
-
} else if (overAxis.x) {
|
|
28559
|
-
left = cursorPosition.x - containerWidth + 'px';
|
|
28560
|
-
top = cursorPosition.y + 'px';
|
|
28561
|
-
} else if (overAxis.y && cursorPosition.y < containerHeight) {
|
|
28562
|
-
left = cursorPosition.x + 'px';
|
|
28563
|
-
top = 10 + 'px';
|
|
28564
|
-
} else if (overAxis.y) {
|
|
28565
|
-
left = cursorPosition.x + 'px';
|
|
28566
|
-
top = cursorPosition.y - containerHeight + 'px';
|
|
29054
|
+
if (entry.action) {
|
|
29055
|
+
return entry.action.call(null, event, entry);
|
|
28567
29056
|
}
|
|
28568
|
-
|
|
28569
|
-
assign(container, { left: left, top: top }, { 'zIndex': 1000 });
|
|
28570
29057
|
};
|
|
28571
29058
|
|
|
28572
|
-
|
|
28573
29059
|
/**
|
|
28574
|
-
*
|
|
28575
|
-
*
|
|
28576
|
-
* @param {Array<Object>} entries an array of entry objects
|
|
28577
|
-
* @param {string} className the class name of the entry container
|
|
28578
|
-
*
|
|
28579
|
-
* @return {Object} a DOM container
|
|
28580
|
-
*/
|
|
28581
|
-
PopupMenu.prototype._createEntries = function(entries, className) {
|
|
28582
|
-
|
|
28583
|
-
var entriesContainer = domify$1('<div>'),
|
|
28584
|
-
self = this;
|
|
28585
|
-
|
|
28586
|
-
classes$1(entriesContainer).add(className);
|
|
28587
|
-
|
|
28588
|
-
forEach$1(entries, function(entry, id) {
|
|
28589
|
-
var entryContainer = self._createEntry(entry, id),
|
|
28590
|
-
grouping = entry.group || 'default',
|
|
28591
|
-
groupContainer = query('[data-group=' + cssEscape(grouping) + ']', entriesContainer);
|
|
28592
|
-
|
|
28593
|
-
if (!groupContainer) {
|
|
28594
|
-
groupContainer = domify$1('<div class="group"></div>');
|
|
28595
|
-
attr$1(groupContainer, 'data-group', grouping);
|
|
28596
|
-
|
|
28597
|
-
entriesContainer.appendChild(groupContainer);
|
|
28598
|
-
}
|
|
28599
|
-
|
|
28600
|
-
groupContainer.appendChild(entryContainer);
|
|
28601
|
-
});
|
|
28602
|
-
|
|
28603
|
-
return entriesContainer;
|
|
28604
|
-
};
|
|
28605
|
-
|
|
28606
|
-
|
|
28607
|
-
/**
|
|
28608
|
-
* Creates a single entry and returns it as a DOM container.
|
|
29060
|
+
* Gets an entry instance (either entry or headerEntry) by id.
|
|
28609
29061
|
*
|
|
28610
|
-
* @param {
|
|
29062
|
+
* @param {string} entryId
|
|
28611
29063
|
*
|
|
28612
|
-
* @return {Object}
|
|
29064
|
+
* @return {Object} entry instance
|
|
28613
29065
|
*/
|
|
28614
|
-
PopupMenu.prototype.
|
|
28615
|
-
|
|
28616
|
-
var entryContainer = domify$1('<div>'),
|
|
28617
|
-
entryClasses = classes$1(entryContainer);
|
|
28618
|
-
|
|
28619
|
-
entryClasses.add('entry');
|
|
28620
|
-
|
|
28621
|
-
if (entry.className) {
|
|
28622
|
-
entry.className.split(' ').forEach(function(className) {
|
|
28623
|
-
entryClasses.add(className);
|
|
28624
|
-
});
|
|
28625
|
-
}
|
|
28626
|
-
|
|
28627
|
-
attr$1(entryContainer, DATA_REF, id);
|
|
28628
|
-
|
|
28629
|
-
if (entry.label) {
|
|
28630
|
-
var label = domify$1('<span>');
|
|
28631
|
-
label.textContent = entry.label;
|
|
28632
|
-
entryContainer.appendChild(label);
|
|
28633
|
-
}
|
|
28634
|
-
|
|
28635
|
-
if (entry.imageUrl) {
|
|
28636
|
-
var image = domify$1('<img>');
|
|
28637
|
-
attr$1(image, 'src', entry.imageUrl);
|
|
28638
|
-
|
|
28639
|
-
entryContainer.appendChild(image);
|
|
28640
|
-
}
|
|
29066
|
+
PopupMenu.prototype._getEntry = function(entryId) {
|
|
28641
29067
|
|
|
28642
|
-
|
|
28643
|
-
entryClasses.add('active');
|
|
28644
|
-
}
|
|
29068
|
+
var entry = this._current.entries[entryId] || this._current.headerEntries[entryId];
|
|
28645
29069
|
|
|
28646
|
-
if (entry.disabled === true) {
|
|
28647
|
-
entryClasses.add('disabled');
|
|
28648
|
-
}
|
|
28649
29070
|
|
|
28650
|
-
if (entry
|
|
28651
|
-
|
|
29071
|
+
if (!entry) {
|
|
29072
|
+
throw new Error('entry not found');
|
|
28652
29073
|
}
|
|
28653
29074
|
|
|
28654
|
-
return
|
|
28655
|
-
};
|
|
28656
|
-
|
|
28657
|
-
|
|
28658
|
-
/**
|
|
28659
|
-
* Set up listener to close popup automatically on certain events.
|
|
28660
|
-
*/
|
|
28661
|
-
PopupMenu.prototype._bindAutoClose = function() {
|
|
28662
|
-
this._eventBus.once(CLOSE_EVENTS, this.close, this);
|
|
28663
|
-
};
|
|
28664
|
-
|
|
28665
|
-
|
|
28666
|
-
/**
|
|
28667
|
-
* Remove the auto-closing listener.
|
|
28668
|
-
*/
|
|
28669
|
-
PopupMenu.prototype._unbindAutoClose = function() {
|
|
28670
|
-
this._eventBus.off(CLOSE_EVENTS, this.close, this);
|
|
29075
|
+
return entry;
|
|
28671
29076
|
};
|
|
28672
29077
|
|
|
28673
|
-
|
|
28674
|
-
|
|
28675
|
-
// helpers /////////////////////////////
|
|
28676
|
-
|
|
28677
|
-
function setTransform(element, transform) {
|
|
28678
|
-
element.style['transform-origin'] = 'top left';
|
|
28679
|
-
|
|
28680
|
-
[ '', '-ms-', '-webkit-' ].forEach(function(prefix) {
|
|
28681
|
-
element.style[prefix + 'transform'] = transform;
|
|
28682
|
-
});
|
|
28683
|
-
}
|
|
28684
|
-
|
|
28685
29078
|
var PopupMenuModule$1 = {
|
|
28686
29079
|
__init__: [ 'popupMenu' ],
|
|
28687
29080
|
popupMenu: [ 'type', PopupMenu ]
|
|
@@ -28768,18 +29161,13 @@
|
|
|
28768
29161
|
AlignElementsContextPadProvider.prototype._getMenuPosition = function(elements) {
|
|
28769
29162
|
var Y_OFFSET = 5;
|
|
28770
29163
|
|
|
28771
|
-
var
|
|
28772
|
-
pad = this._contextPad.getPad(elements).html;
|
|
29164
|
+
var pad = this._contextPad.getPad(elements).html;
|
|
28773
29165
|
|
|
28774
|
-
var
|
|
28775
|
-
padRect = pad.getBoundingClientRect();
|
|
28776
|
-
|
|
28777
|
-
var top = padRect.top - diagramRect.top;
|
|
28778
|
-
var left = padRect.left - diagramRect.left;
|
|
29166
|
+
var padRect = pad.getBoundingClientRect();
|
|
28779
29167
|
|
|
28780
29168
|
var pos = {
|
|
28781
|
-
x: left,
|
|
28782
|
-
y:
|
|
29169
|
+
x: padRect.left,
|
|
29170
|
+
y: padRect.bottom + Y_OFFSET
|
|
28783
29171
|
};
|
|
28784
29172
|
|
|
28785
29173
|
return pos;
|
|
@@ -28867,7 +29255,7 @@
|
|
|
28867
29255
|
|
|
28868
29256
|
RuleProvider.$inject = [ 'eventBus' ];
|
|
28869
29257
|
|
|
28870
|
-
e(RuleProvider, CommandInterceptor);
|
|
29258
|
+
e$3(RuleProvider, CommandInterceptor);
|
|
28871
29259
|
|
|
28872
29260
|
|
|
28873
29261
|
/**
|
|
@@ -28944,7 +29332,7 @@
|
|
|
28944
29332
|
|
|
28945
29333
|
BpmnAlignElements.$inject = [ 'eventBus' ];
|
|
28946
29334
|
|
|
28947
|
-
e(BpmnAlignElements, RuleProvider);
|
|
29335
|
+
e$3(BpmnAlignElements, RuleProvider);
|
|
28948
29336
|
|
|
28949
29337
|
BpmnAlignElements.prototype.init = function() {
|
|
28950
29338
|
this.addRule('elements.align', function(context) {
|
|
@@ -29664,7 +30052,7 @@
|
|
|
29664
30052
|
'rules'
|
|
29665
30053
|
];
|
|
29666
30054
|
|
|
29667
|
-
e(AutoResize, CommandInterceptor);
|
|
30055
|
+
e$3(AutoResize, CommandInterceptor);
|
|
29668
30056
|
|
|
29669
30057
|
|
|
29670
30058
|
/**
|
|
@@ -29844,7 +30232,7 @@
|
|
|
29844
30232
|
'injector'
|
|
29845
30233
|
];
|
|
29846
30234
|
|
|
29847
|
-
e(BpmnAutoResize, AutoResize);
|
|
30235
|
+
e$3(BpmnAutoResize, AutoResize);
|
|
29848
30236
|
|
|
29849
30237
|
|
|
29850
30238
|
/**
|
|
@@ -29879,7 +30267,7 @@
|
|
|
29879
30267
|
|
|
29880
30268
|
AutoResizeProvider.$inject = [ 'eventBus' ];
|
|
29881
30269
|
|
|
29882
|
-
e(AutoResizeProvider, RuleProvider);
|
|
30270
|
+
e$3(AutoResizeProvider, RuleProvider);
|
|
29883
30271
|
|
|
29884
30272
|
/**
|
|
29885
30273
|
* Needs to be implemented by sub classes to allow actual auto resize
|
|
@@ -29902,7 +30290,7 @@
|
|
|
29902
30290
|
this._modeling = modeling;
|
|
29903
30291
|
}
|
|
29904
30292
|
|
|
29905
|
-
e(BpmnAutoResizeProvider, AutoResizeProvider);
|
|
30293
|
+
e$3(BpmnAutoResizeProvider, AutoResizeProvider);
|
|
29906
30294
|
|
|
29907
30295
|
BpmnAutoResizeProvider.$inject = [
|
|
29908
30296
|
'eventBus',
|
|
@@ -30370,7 +30758,7 @@
|
|
|
30370
30758
|
|
|
30371
30759
|
function checkCancel(event) {
|
|
30372
30760
|
|
|
30373
|
-
if (event
|
|
30761
|
+
if (isKey('Escape', event)) {
|
|
30374
30762
|
preventDefault$1(event);
|
|
30375
30763
|
|
|
30376
30764
|
cancel();
|
|
@@ -38214,7 +38602,6 @@
|
|
|
38214
38602
|
connect = this._connect,
|
|
38215
38603
|
create = this._create,
|
|
38216
38604
|
popupMenu = this._popupMenu,
|
|
38217
|
-
canvas = this._canvas,
|
|
38218
38605
|
rules = this._rules,
|
|
38219
38606
|
autoPlace = this._autoPlace,
|
|
38220
38607
|
translate = this._translate;
|
|
@@ -38239,18 +38626,13 @@
|
|
|
38239
38626
|
|
|
38240
38627
|
var Y_OFFSET = 5;
|
|
38241
38628
|
|
|
38242
|
-
var
|
|
38243
|
-
pad = contextPad.getPad(element).html;
|
|
38629
|
+
var pad = contextPad.getPad(element).html;
|
|
38244
38630
|
|
|
38245
|
-
var
|
|
38246
|
-
padRect = pad.getBoundingClientRect();
|
|
38247
|
-
|
|
38248
|
-
var top = padRect.top - diagramRect.top;
|
|
38249
|
-
var left = padRect.left - diagramRect.left;
|
|
38631
|
+
var padRect = pad.getBoundingClientRect();
|
|
38250
38632
|
|
|
38251
38633
|
var pos = {
|
|
38252
|
-
x: left,
|
|
38253
|
-
y:
|
|
38634
|
+
x: padRect.left,
|
|
38635
|
+
y: padRect.bottom + Y_OFFSET
|
|
38254
38636
|
};
|
|
38255
38637
|
|
|
38256
38638
|
return pos;
|
|
@@ -38473,7 +38855,11 @@
|
|
|
38473
38855
|
cursor: { x: event.x, y: event.y }
|
|
38474
38856
|
});
|
|
38475
38857
|
|
|
38476
|
-
popupMenu.open(element, 'bpmn-replace', position
|
|
38858
|
+
popupMenu.open(element, 'bpmn-replace', position, {
|
|
38859
|
+
title: translate('Change element'),
|
|
38860
|
+
width: 300,
|
|
38861
|
+
search: true
|
|
38862
|
+
});
|
|
38477
38863
|
}
|
|
38478
38864
|
}
|
|
38479
38865
|
}
|
|
@@ -38828,7 +39214,7 @@
|
|
|
38828
39214
|
|
|
38829
39215
|
BpmnDistributeElements.$inject = [ 'distributeElements', 'eventBus', 'rules' ];
|
|
38830
39216
|
|
|
38831
|
-
e(BpmnDistributeElements, RuleProvider);
|
|
39217
|
+
e$3(BpmnDistributeElements, RuleProvider);
|
|
38832
39218
|
|
|
38833
39219
|
BpmnDistributeElements.prototype.init = function() {
|
|
38834
39220
|
this.addRule('elements.distribute', function(context) {
|
|
@@ -39220,7 +39606,7 @@
|
|
|
39220
39606
|
injector.invoke(EditorActions, this);
|
|
39221
39607
|
}
|
|
39222
39608
|
|
|
39223
|
-
e(BpmnEditorActions, EditorActions);
|
|
39609
|
+
e$3(BpmnEditorActions, EditorActions);
|
|
39224
39610
|
|
|
39225
39611
|
BpmnEditorActions.$inject = [
|
|
39226
39612
|
'injector'
|
|
@@ -39782,7 +40168,7 @@
|
|
|
39782
40168
|
'modeling'
|
|
39783
40169
|
];
|
|
39784
40170
|
|
|
39785
|
-
e(ResizeBehavior$1, CommandInterceptor);
|
|
40171
|
+
e$3(ResizeBehavior$1, CommandInterceptor);
|
|
39786
40172
|
|
|
39787
40173
|
/**
|
|
39788
40174
|
* Snap width and height in relation to center.
|
|
@@ -40105,7 +40491,7 @@
|
|
|
40105
40491
|
'modeling'
|
|
40106
40492
|
];
|
|
40107
40493
|
|
|
40108
|
-
e(GridSnappingLayoutConnectionBehavior, CommandInterceptor);
|
|
40494
|
+
e$3(GridSnappingLayoutConnectionBehavior, CommandInterceptor);
|
|
40109
40495
|
|
|
40110
40496
|
/**
|
|
40111
40497
|
* Snap middle segments of a given connection.
|
|
@@ -40349,7 +40735,7 @@
|
|
|
40349
40735
|
injector.invoke(KeyboardBindings, this);
|
|
40350
40736
|
}
|
|
40351
40737
|
|
|
40352
|
-
e(BpmnKeyboardBindings, KeyboardBindings);
|
|
40738
|
+
e$3(BpmnKeyboardBindings, KeyboardBindings);
|
|
40353
40739
|
|
|
40354
40740
|
BpmnKeyboardBindings.$inject = [
|
|
40355
40741
|
'injector'
|
|
@@ -41881,7 +42267,7 @@
|
|
|
41881
42267
|
|
|
41882
42268
|
}
|
|
41883
42269
|
|
|
41884
|
-
e(AdaptiveLabelPositioningBehavior, CommandInterceptor);
|
|
42270
|
+
e$3(AdaptiveLabelPositioningBehavior, CommandInterceptor);
|
|
41885
42271
|
|
|
41886
42272
|
AdaptiveLabelPositioningBehavior.$inject = [
|
|
41887
42273
|
'eventBus',
|
|
@@ -42024,7 +42410,7 @@
|
|
|
42024
42410
|
}, true);
|
|
42025
42411
|
}
|
|
42026
42412
|
|
|
42027
|
-
e(AppendBehavior, CommandInterceptor);
|
|
42413
|
+
e$3(AppendBehavior, CommandInterceptor);
|
|
42028
42414
|
|
|
42029
42415
|
AppendBehavior.$inject = [
|
|
42030
42416
|
'eventBus',
|
|
@@ -42049,7 +42435,7 @@
|
|
|
42049
42435
|
}, true);
|
|
42050
42436
|
}
|
|
42051
42437
|
|
|
42052
|
-
e(AssociationBehavior, CommandInterceptor);
|
|
42438
|
+
e$3(AssociationBehavior, CommandInterceptor);
|
|
42053
42439
|
|
|
42054
42440
|
AssociationBehavior.$inject = [
|
|
42055
42441
|
'injector',
|
|
@@ -42113,7 +42499,7 @@
|
|
|
42113
42499
|
'injector'
|
|
42114
42500
|
];
|
|
42115
42501
|
|
|
42116
|
-
e(AttachEventBehavior, CommandInterceptor);
|
|
42502
|
+
e$3(AttachEventBehavior, CommandInterceptor);
|
|
42117
42503
|
|
|
42118
42504
|
AttachEventBehavior.prototype.replaceShape = function(shape, host) {
|
|
42119
42505
|
var eventDefinition = getEventDefinition$1(shape);
|
|
@@ -42200,7 +42586,7 @@
|
|
|
42200
42586
|
'modeling'
|
|
42201
42587
|
];
|
|
42202
42588
|
|
|
42203
|
-
e(BoundaryEventBehavior, CommandInterceptor);
|
|
42589
|
+
e$3(BoundaryEventBehavior, CommandInterceptor);
|
|
42204
42590
|
|
|
42205
42591
|
function CreateBehavior(injector) {
|
|
42206
42592
|
injector.invoke(CommandInterceptor, this);
|
|
@@ -42220,7 +42606,7 @@
|
|
|
42220
42606
|
|
|
42221
42607
|
CreateBehavior.$inject = [ 'injector' ];
|
|
42222
42608
|
|
|
42223
|
-
e(CreateBehavior, CommandInterceptor);
|
|
42609
|
+
e$3(CreateBehavior, CommandInterceptor);
|
|
42224
42610
|
|
|
42225
42611
|
/**
|
|
42226
42612
|
* BPMN specific create data object behavior
|
|
@@ -42252,7 +42638,7 @@
|
|
|
42252
42638
|
'moddle'
|
|
42253
42639
|
];
|
|
42254
42640
|
|
|
42255
|
-
e(CreateDataObjectBehavior, CommandInterceptor);
|
|
42641
|
+
e$3(CreateDataObjectBehavior, CommandInterceptor);
|
|
42256
42642
|
|
|
42257
42643
|
var HORIZONTAL_PARTICIPANT_PADDING = 20,
|
|
42258
42644
|
VERTICAL_PARTICIPANT_PADDING = 20;
|
|
@@ -42426,7 +42812,7 @@
|
|
|
42426
42812
|
'modeling'
|
|
42427
42813
|
];
|
|
42428
42814
|
|
|
42429
|
-
e(CreateParticipantBehavior, CommandInterceptor);
|
|
42815
|
+
e$3(CreateParticipantBehavior, CommandInterceptor);
|
|
42430
42816
|
|
|
42431
42817
|
// helpers //////////
|
|
42432
42818
|
|
|
@@ -42588,7 +42974,7 @@
|
|
|
42588
42974
|
'bpmnFactory'
|
|
42589
42975
|
];
|
|
42590
42976
|
|
|
42591
|
-
e(DataInputAssociationBehavior, CommandInterceptor);
|
|
42977
|
+
e$3(DataInputAssociationBehavior, CommandInterceptor);
|
|
42592
42978
|
|
|
42593
42979
|
|
|
42594
42980
|
/**
|
|
@@ -42813,7 +43199,7 @@
|
|
|
42813
43199
|
'eventBus',
|
|
42814
43200
|
];
|
|
42815
43201
|
|
|
42816
|
-
e(DataStoreBehavior, CommandInterceptor);
|
|
43202
|
+
e$3(DataStoreBehavior, CommandInterceptor);
|
|
42817
43203
|
|
|
42818
43204
|
|
|
42819
43205
|
// helpers //////////
|
|
@@ -42940,7 +43326,7 @@
|
|
|
42940
43326
|
'spaceTool'
|
|
42941
43327
|
];
|
|
42942
43328
|
|
|
42943
|
-
e(DeleteLaneBehavior, CommandInterceptor);
|
|
43329
|
+
e$3(DeleteLaneBehavior, CommandInterceptor);
|
|
42944
43330
|
|
|
42945
43331
|
var LOW_PRIORITY$b = 500;
|
|
42946
43332
|
|
|
@@ -42988,7 +43374,7 @@
|
|
|
42988
43374
|
'injector'
|
|
42989
43375
|
];
|
|
42990
43376
|
|
|
42991
|
-
e(DetachEventBehavior, CommandInterceptor);
|
|
43377
|
+
e$3(DetachEventBehavior, CommandInterceptor);
|
|
42992
43378
|
|
|
42993
43379
|
DetachEventBehavior.prototype.replaceShape = function(shape) {
|
|
42994
43380
|
var eventDefinition = getEventDefinition(shape),
|
|
@@ -43194,7 +43580,7 @@
|
|
|
43194
43580
|
}, true);
|
|
43195
43581
|
}
|
|
43196
43582
|
|
|
43197
|
-
e(DropOnFlowBehavior, CommandInterceptor);
|
|
43583
|
+
e$3(DropOnFlowBehavior, CommandInterceptor);
|
|
43198
43584
|
|
|
43199
43585
|
DropOnFlowBehavior.$inject = [
|
|
43200
43586
|
'eventBus',
|
|
@@ -43302,7 +43688,7 @@
|
|
|
43302
43688
|
'modeling'
|
|
43303
43689
|
];
|
|
43304
43690
|
|
|
43305
|
-
e(EventBasedGatewayBehavior, CommandInterceptor);
|
|
43691
|
+
e$3(EventBasedGatewayBehavior, CommandInterceptor);
|
|
43306
43692
|
|
|
43307
43693
|
// helpers //////////
|
|
43308
43694
|
|
|
@@ -43792,7 +44178,7 @@
|
|
|
43792
44178
|
'moddleCopy'
|
|
43793
44179
|
];
|
|
43794
44180
|
|
|
43795
|
-
e(GroupBehavior, CommandInterceptor);
|
|
44181
|
+
e$3(GroupBehavior, CommandInterceptor);
|
|
43796
44182
|
|
|
43797
44183
|
/**
|
|
43798
44184
|
* Returns the intersection between two line segments a and b.
|
|
@@ -43937,7 +44323,7 @@
|
|
|
43937
44323
|
|
|
43938
44324
|
IsHorizontalFix.$inject = [ 'eventBus' ];
|
|
43939
44325
|
|
|
43940
|
-
e(IsHorizontalFix, CommandInterceptor);
|
|
44326
|
+
e$3(IsHorizontalFix, CommandInterceptor);
|
|
43941
44327
|
|
|
43942
44328
|
var sqrt = Math.sqrt,
|
|
43943
44329
|
min$1 = Math.min,
|
|
@@ -44775,7 +45161,7 @@
|
|
|
44775
45161
|
|
|
44776
45162
|
}
|
|
44777
45163
|
|
|
44778
|
-
e(LabelBehavior, CommandInterceptor);
|
|
45164
|
+
e$3(LabelBehavior, CommandInterceptor);
|
|
44779
45165
|
|
|
44780
45166
|
LabelBehavior.$inject = [
|
|
44781
45167
|
'eventBus',
|
|
@@ -45011,7 +45397,7 @@
|
|
|
45011
45397
|
|
|
45012
45398
|
}
|
|
45013
45399
|
|
|
45014
|
-
e(LayoutConnectionBehavior, CommandInterceptor);
|
|
45400
|
+
e$3(LayoutConnectionBehavior, CommandInterceptor);
|
|
45015
45401
|
|
|
45016
45402
|
LayoutConnectionBehavior.$inject = [
|
|
45017
45403
|
'eventBus',
|
|
@@ -45154,7 +45540,7 @@
|
|
|
45154
45540
|
|
|
45155
45541
|
MessageFlowBehavior.$inject = [ 'eventBus', 'modeling' ];
|
|
45156
45542
|
|
|
45157
|
-
e(MessageFlowBehavior, CommandInterceptor);
|
|
45543
|
+
e$3(MessageFlowBehavior, CommandInterceptor);
|
|
45158
45544
|
|
|
45159
45545
|
// helpers //////////
|
|
45160
45546
|
|
|
@@ -45251,7 +45637,7 @@
|
|
|
45251
45637
|
}, true);
|
|
45252
45638
|
}
|
|
45253
45639
|
|
|
45254
|
-
e(RemoveEmbeddedLabelBoundsBehavior, CommandInterceptor);
|
|
45640
|
+
e$3(RemoveEmbeddedLabelBoundsBehavior, CommandInterceptor);
|
|
45255
45641
|
|
|
45256
45642
|
RemoveEmbeddedLabelBoundsBehavior.$inject = [
|
|
45257
45643
|
'eventBus',
|
|
@@ -45295,7 +45681,7 @@
|
|
|
45295
45681
|
|
|
45296
45682
|
}
|
|
45297
45683
|
|
|
45298
|
-
e(RemoveElementBehavior, CommandInterceptor);
|
|
45684
|
+
e$3(RemoveElementBehavior, CommandInterceptor);
|
|
45299
45685
|
|
|
45300
45686
|
RemoveElementBehavior.$inject = [
|
|
45301
45687
|
'eventBus',
|
|
@@ -45372,7 +45758,7 @@
|
|
|
45372
45758
|
|
|
45373
45759
|
RemoveParticipantBehavior.$inject = [ 'eventBus', 'modeling' ];
|
|
45374
45760
|
|
|
45375
|
-
e(RemoveParticipantBehavior, CommandInterceptor);
|
|
45761
|
+
e$3(RemoveParticipantBehavior, CommandInterceptor);
|
|
45376
45762
|
|
|
45377
45763
|
function ReplaceConnectionBehavior(eventBus, modeling, bpmnRules, injector) {
|
|
45378
45764
|
|
|
@@ -45537,7 +45923,7 @@
|
|
|
45537
45923
|
});
|
|
45538
45924
|
}
|
|
45539
45925
|
|
|
45540
|
-
e(ReplaceConnectionBehavior, CommandInterceptor);
|
|
45926
|
+
e$3(ReplaceConnectionBehavior, CommandInterceptor);
|
|
45541
45927
|
|
|
45542
45928
|
ReplaceConnectionBehavior.$inject = [
|
|
45543
45929
|
'eventBus',
|
|
@@ -45634,7 +46020,7 @@
|
|
|
45634
46020
|
});
|
|
45635
46021
|
}
|
|
45636
46022
|
|
|
45637
|
-
e(ReplaceElementBehaviour, CommandInterceptor);
|
|
46023
|
+
e$3(ReplaceElementBehaviour, CommandInterceptor);
|
|
45638
46024
|
|
|
45639
46025
|
ReplaceElementBehaviour.prototype.replaceElements = function(elements, newElements) {
|
|
45640
46026
|
var elementRegistry = this._elementRegistry,
|
|
@@ -46031,7 +46417,7 @@
|
|
|
46031
46417
|
'bpmnFactory'
|
|
46032
46418
|
];
|
|
46033
46419
|
|
|
46034
|
-
e(RootElementReferenceBehavior, CommandInterceptor);
|
|
46420
|
+
e$3(RootElementReferenceBehavior, CommandInterceptor);
|
|
46035
46421
|
|
|
46036
46422
|
// helpers //////////
|
|
46037
46423
|
|
|
@@ -46534,7 +46920,7 @@
|
|
|
46534
46920
|
|
|
46535
46921
|
}
|
|
46536
46922
|
|
|
46537
|
-
e(SubProcessPlaneBehavior, CommandInterceptor);
|
|
46923
|
+
e$3(SubProcessPlaneBehavior, CommandInterceptor);
|
|
46538
46924
|
|
|
46539
46925
|
/**
|
|
46540
46926
|
* Moves the child elements from source to target.
|
|
@@ -46741,7 +47127,7 @@
|
|
|
46741
47127
|
'modeling'
|
|
46742
47128
|
];
|
|
46743
47129
|
|
|
46744
|
-
e(SubProcessStartEventBehavior, CommandInterceptor);
|
|
47130
|
+
e$3(SubProcessStartEventBehavior, CommandInterceptor);
|
|
46745
47131
|
|
|
46746
47132
|
// helpers //////////
|
|
46747
47133
|
|
|
@@ -46803,7 +47189,7 @@
|
|
|
46803
47189
|
|
|
46804
47190
|
}
|
|
46805
47191
|
|
|
46806
|
-
e(ToggleCollapseConnectionBehaviour, CommandInterceptor);
|
|
47192
|
+
e$3(ToggleCollapseConnectionBehaviour, CommandInterceptor);
|
|
46807
47193
|
|
|
46808
47194
|
ToggleCollapseConnectionBehaviour.$inject = [
|
|
46809
47195
|
'eventBus',
|
|
@@ -46929,7 +47315,7 @@
|
|
|
46929
47315
|
}
|
|
46930
47316
|
|
|
46931
47317
|
|
|
46932
|
-
e(ToggleElementCollapseBehaviour, CommandInterceptor);
|
|
47318
|
+
e$3(ToggleElementCollapseBehaviour, CommandInterceptor);
|
|
46933
47319
|
|
|
46934
47320
|
ToggleElementCollapseBehaviour.$inject = [
|
|
46935
47321
|
'eventBus',
|
|
@@ -46992,7 +47378,7 @@
|
|
|
46992
47378
|
});
|
|
46993
47379
|
}
|
|
46994
47380
|
|
|
46995
|
-
e(UnclaimIdBehavior, CommandInterceptor);
|
|
47381
|
+
e$3(UnclaimIdBehavior, CommandInterceptor);
|
|
46996
47382
|
|
|
46997
47383
|
UnclaimIdBehavior.$inject = [ 'canvas', 'injector', 'moddle', 'modeling' ];
|
|
46998
47384
|
|
|
@@ -47022,7 +47408,7 @@
|
|
|
47022
47408
|
});
|
|
47023
47409
|
}
|
|
47024
47410
|
|
|
47025
|
-
e(DeleteSequenceFlowBehavior, CommandInterceptor);
|
|
47411
|
+
e$3(DeleteSequenceFlowBehavior, CommandInterceptor);
|
|
47026
47412
|
|
|
47027
47413
|
DeleteSequenceFlowBehavior.$inject = [
|
|
47028
47414
|
'eventBus',
|
|
@@ -47166,7 +47552,7 @@
|
|
|
47166
47552
|
'translate'
|
|
47167
47553
|
];
|
|
47168
47554
|
|
|
47169
|
-
e(UpdateFlowNodeRefsBehavior, CommandInterceptor);
|
|
47555
|
+
e$3(UpdateFlowNodeRefsBehavior, CommandInterceptor);
|
|
47170
47556
|
|
|
47171
47557
|
|
|
47172
47558
|
function UpdateContext() {
|
|
@@ -47294,7 +47680,7 @@
|
|
|
47294
47680
|
RuleProvider.call(this, eventBus);
|
|
47295
47681
|
}
|
|
47296
47682
|
|
|
47297
|
-
e(BpmnRules, RuleProvider);
|
|
47683
|
+
e$3(BpmnRules, RuleProvider);
|
|
47298
47684
|
|
|
47299
47685
|
BpmnRules.$inject = [ 'eventBus' ];
|
|
47300
47686
|
|
|
@@ -48314,7 +48700,7 @@
|
|
|
48314
48700
|
return null;
|
|
48315
48701
|
};
|
|
48316
48702
|
|
|
48317
|
-
e(OrderingProvider, CommandInterceptor);
|
|
48703
|
+
e$3(OrderingProvider, CommandInterceptor);
|
|
48318
48704
|
|
|
48319
48705
|
/**
|
|
48320
48706
|
* a simple ordering provider that makes sure:
|
|
@@ -48482,7 +48868,7 @@
|
|
|
48482
48868
|
|
|
48483
48869
|
BpmnOrderingProvider.$inject = [ 'eventBus', 'canvas', 'translate' ];
|
|
48484
48870
|
|
|
48485
|
-
e(BpmnOrderingProvider, OrderingProvider);
|
|
48871
|
+
e$3(BpmnOrderingProvider, OrderingProvider);
|
|
48486
48872
|
|
|
48487
48873
|
var OrderingModule = {
|
|
48488
48874
|
__depends__: [
|
|
@@ -49645,7 +50031,7 @@
|
|
|
49645
50031
|
'injector'
|
|
49646
50032
|
];
|
|
49647
50033
|
|
|
49648
|
-
e(BpmnSpaceTool, SpaceTool);
|
|
50034
|
+
e$3(BpmnSpaceTool, SpaceTool);
|
|
49649
50035
|
|
|
49650
50036
|
BpmnSpaceTool.prototype.calculateAdjustments = function(elements, axis, delta, start) {
|
|
49651
50037
|
var adjustments = SpaceTool.prototype.calculateAdjustments.call(this, elements, axis, delta, start);
|
|
@@ -50703,7 +51089,7 @@
|
|
|
50703
51089
|
|
|
50704
51090
|
}
|
|
50705
51091
|
|
|
50706
|
-
e(LabelSupport, CommandInterceptor);
|
|
51092
|
+
e$3(LabelSupport, CommandInterceptor);
|
|
50707
51093
|
|
|
50708
51094
|
LabelSupport.$inject = [
|
|
50709
51095
|
'injector',
|
|
@@ -50980,7 +51366,7 @@
|
|
|
50980
51366
|
});
|
|
50981
51367
|
}
|
|
50982
51368
|
|
|
50983
|
-
e(AttachSupport, CommandInterceptor);
|
|
51369
|
+
e$3(AttachSupport, CommandInterceptor);
|
|
50984
51370
|
|
|
50985
51371
|
AttachSupport.$inject = [
|
|
50986
51372
|
'injector',
|
|
@@ -51417,7 +51803,7 @@
|
|
|
51417
51803
|
this.reverted([ 'element.updateAttachment' ], ifBpmn(updateAttachment));
|
|
51418
51804
|
}
|
|
51419
51805
|
|
|
51420
|
-
e(BpmnUpdater, CommandInterceptor);
|
|
51806
|
+
e$3(BpmnUpdater, CommandInterceptor);
|
|
51421
51807
|
|
|
51422
51808
|
BpmnUpdater.$inject = [
|
|
51423
51809
|
'eventBus',
|
|
@@ -51915,7 +52301,7 @@
|
|
|
51915
52301
|
this._translate = translate;
|
|
51916
52302
|
}
|
|
51917
52303
|
|
|
51918
|
-
e(ElementFactory, ElementFactory$1);
|
|
52304
|
+
e$3(ElementFactory, ElementFactory$1);
|
|
51919
52305
|
|
|
51920
52306
|
ElementFactory.$inject = [
|
|
51921
52307
|
'bpmnFactory',
|
|
@@ -52533,7 +52919,7 @@
|
|
|
52533
52919
|
CreateShapeHandler.call(this, canvas);
|
|
52534
52920
|
}
|
|
52535
52921
|
|
|
52536
|
-
e(CreateLabelHandler, CreateShapeHandler);
|
|
52922
|
+
e$3(CreateLabelHandler, CreateShapeHandler);
|
|
52537
52923
|
|
|
52538
52924
|
CreateLabelHandler.$inject = [ 'canvas' ];
|
|
52539
52925
|
|
|
@@ -55699,7 +56085,7 @@
|
|
|
55699
56085
|
this._bpmnRules = bpmnRules;
|
|
55700
56086
|
}
|
|
55701
56087
|
|
|
55702
|
-
e(Modeling, Modeling$1);
|
|
56088
|
+
e$3(Modeling, Modeling$1);
|
|
55703
56089
|
|
|
55704
56090
|
Modeling.$inject = [
|
|
55705
56091
|
'eventBus',
|
|
@@ -56654,7 +57040,7 @@
|
|
|
56654
57040
|
|
|
56655
57041
|
function BpmnLayouter() {}
|
|
56656
57042
|
|
|
56657
|
-
e(BpmnLayouter, BaseLayouter);
|
|
57043
|
+
e$3(BpmnLayouter, BaseLayouter);
|
|
56658
57044
|
|
|
56659
57045
|
|
|
56660
57046
|
BpmnLayouter.prototype.layoutConnection = function(connection, hints) {
|
|
@@ -58484,7 +58870,7 @@
|
|
|
58484
58870
|
// helpers //////////
|
|
58485
58871
|
|
|
58486
58872
|
function isSpace(keyEvent) {
|
|
58487
|
-
return isKey('
|
|
58873
|
+
return isKey('Space', keyEvent);
|
|
58488
58874
|
}
|
|
58489
58875
|
|
|
58490
58876
|
var HandToolModule = {
|
|
@@ -58956,7 +59342,7 @@
|
|
|
58956
59342
|
'previewSupport'
|
|
58957
59343
|
];
|
|
58958
59344
|
|
|
58959
|
-
e(BpmnReplacePreview, CommandInterceptor);
|
|
59345
|
+
e$3(BpmnReplacePreview, CommandInterceptor);
|
|
58960
59346
|
|
|
58961
59347
|
var ReplacePreviewModule = {
|
|
58962
59348
|
__depends__: [
|
|
@@ -59551,7 +59937,7 @@
|
|
|
59551
59937
|
});
|
|
59552
59938
|
}
|
|
59553
59939
|
|
|
59554
|
-
e(BpmnCreateMoveSnapping, CreateMoveSnapping);
|
|
59940
|
+
e$3(BpmnCreateMoveSnapping, CreateMoveSnapping);
|
|
59555
59941
|
|
|
59556
59942
|
BpmnCreateMoveSnapping.$inject = [
|
|
59557
59943
|
'eventBus',
|
|
@@ -60135,13 +60521,11 @@
|
|
|
60135
60521
|
// navigate results
|
|
60136
60522
|
listen(this._container, SearchPad.INPUT_SELECTOR, 'keydown', function(e) {
|
|
60137
60523
|
|
|
60138
|
-
|
|
60139
|
-
if (e.keyCode === 38) {
|
|
60524
|
+
if (isKey('ArrowUp', e)) {
|
|
60140
60525
|
e.preventDefault();
|
|
60141
60526
|
}
|
|
60142
60527
|
|
|
60143
|
-
|
|
60144
|
-
if (e.keyCode === 40) {
|
|
60528
|
+
if (isKey('ArrowDown', e)) {
|
|
60145
60529
|
e.preventDefault();
|
|
60146
60530
|
}
|
|
60147
60531
|
});
|
|
@@ -60149,31 +60533,26 @@
|
|
|
60149
60533
|
// handle keyboard input
|
|
60150
60534
|
listen(this._container, SearchPad.INPUT_SELECTOR, 'keyup', function(e) {
|
|
60151
60535
|
|
|
60152
|
-
|
|
60153
|
-
if (e.keyCode === 27) {
|
|
60536
|
+
if (isKey('Escape', e)) {
|
|
60154
60537
|
return self.close();
|
|
60155
60538
|
}
|
|
60156
60539
|
|
|
60157
|
-
|
|
60158
|
-
if (e.keyCode === 13) {
|
|
60540
|
+
if (isKey('Enter', e)) {
|
|
60159
60541
|
var selected = self._getCurrentResult();
|
|
60160
60542
|
|
|
60161
60543
|
return selected ? self._select(selected) : self.close();
|
|
60162
60544
|
}
|
|
60163
60545
|
|
|
60164
|
-
|
|
60165
|
-
if (e.keyCode === 38) {
|
|
60546
|
+
if (isKey('ArrowUp', e)) {
|
|
60166
60547
|
return self._scrollToDirection(true);
|
|
60167
60548
|
}
|
|
60168
60549
|
|
|
60169
|
-
|
|
60170
|
-
if (e.keyCode === 40) {
|
|
60550
|
+
if (isKey('ArrowDown', e)) {
|
|
60171
60551
|
return self._scrollToDirection();
|
|
60172
60552
|
}
|
|
60173
60553
|
|
|
60174
|
-
// left && right
|
|
60175
60554
|
// do not search while navigating text input
|
|
60176
|
-
if (
|
|
60555
|
+
if (isKey([ 'ArrowLeft', 'ArrowRight' ], e)) {
|
|
60177
60556
|
return;
|
|
60178
60557
|
}
|
|
60179
60558
|
|
|
@@ -60808,7 +61187,7 @@
|
|
|
60808
61187
|
BaseModeler.call(this, options);
|
|
60809
61188
|
}
|
|
60810
61189
|
|
|
60811
|
-
e(Modeler, BaseModeler);
|
|
61190
|
+
e$3(Modeler, BaseModeler);
|
|
60812
61191
|
|
|
60813
61192
|
|
|
60814
61193
|
Modeler.Viewer = Viewer;
|