bpmn-js 18.6.4 → 18.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bpmn-modeler.development.js +58 -38
- package/dist/bpmn-modeler.production.min.js +8 -8
- package/dist/bpmn-navigated-viewer.development.js +2 -2
- package/dist/bpmn-navigated-viewer.production.min.js +1 -1
- package/dist/bpmn-viewer.development.js +2 -2
- package/dist/bpmn-viewer.production.min.js +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* bpmn-js - bpmn-modeler v18.6.
|
|
2
|
+
* bpmn-js - bpmn-modeler v18.6.5
|
|
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: 2025-09-
|
|
11
|
+
* Date: 2025-09-19
|
|
12
12
|
*/
|
|
13
13
|
(function (global, factory) {
|
|
14
14
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -27686,13 +27686,14 @@
|
|
|
27686
27686
|
|
|
27687
27687
|
/**
|
|
27688
27688
|
* @typedef {import('./PopupMenuProvider').PopupMenuEntry} PopupMenuEntry
|
|
27689
|
+
* @typedef {import('./PopupMenuProvider').PopupMenuGroup} PopupMenuGroup
|
|
27689
27690
|
*/
|
|
27690
27691
|
|
|
27691
27692
|
/**
|
|
27692
27693
|
* Component that renders a popup menu entry list.
|
|
27693
27694
|
*
|
|
27694
27695
|
* @param {Object} props
|
|
27695
|
-
* @param {
|
|
27696
|
+
* @param {PopupMenuGroup[]} props.groupedEntries
|
|
27696
27697
|
* @param {PopupMenuEntry} props.selectedEntry
|
|
27697
27698
|
* @param {(entry: PopupMenuEntry | null) => void} props.setSelectedEntry
|
|
27698
27699
|
*/
|
|
@@ -27700,14 +27701,12 @@
|
|
|
27700
27701
|
const {
|
|
27701
27702
|
selectedEntry,
|
|
27702
27703
|
setSelectedEntry,
|
|
27703
|
-
|
|
27704
|
+
groupedEntries,
|
|
27704
27705
|
...restProps
|
|
27705
27706
|
} = props;
|
|
27706
27707
|
|
|
27707
27708
|
const resultsRef = F();
|
|
27708
27709
|
|
|
27709
|
-
const groups = q(() => groupEntries(entries), [ entries ]);
|
|
27710
|
-
|
|
27711
27710
|
// scroll to selected result
|
|
27712
27711
|
A(() => {
|
|
27713
27712
|
const containerEl = resultsRef.current;
|
|
@@ -27724,7 +27723,7 @@
|
|
|
27724
27723
|
|
|
27725
27724
|
return m$1`
|
|
27726
27725
|
<div class="djs-popup-results" ref=${ resultsRef }>
|
|
27727
|
-
${
|
|
27726
|
+
${ groupedEntries.map(group => m$1`
|
|
27728
27727
|
${ group.name && m$1`
|
|
27729
27728
|
<div key=${ group.id } class="entry-header" title=${ group.name }>
|
|
27730
27729
|
${ group.name }
|
|
@@ -27748,33 +27747,6 @@
|
|
|
27748
27747
|
}
|
|
27749
27748
|
|
|
27750
27749
|
|
|
27751
|
-
// helpers
|
|
27752
|
-
function groupEntries(entries) {
|
|
27753
|
-
const groups = [];
|
|
27754
|
-
|
|
27755
|
-
const getGroup = group => groups.find(elem => group.id === elem.id);
|
|
27756
|
-
|
|
27757
|
-
const containsGroup = group => !!getGroup(group);
|
|
27758
|
-
|
|
27759
|
-
// legacy support for provider built for the old popUp menu
|
|
27760
|
-
const formatGroup = group =>
|
|
27761
|
-
typeof group === 'string' ? { id: group } : group;
|
|
27762
|
-
|
|
27763
|
-
entries.forEach(entry => {
|
|
27764
|
-
|
|
27765
|
-
// assume a default group when none is provided
|
|
27766
|
-
const group = entry.group ? formatGroup(entry.group) : { id: 'default' };
|
|
27767
|
-
|
|
27768
|
-
if (!containsGroup(group)) {
|
|
27769
|
-
groups.push({ ...group, entries: [ entry ] });
|
|
27770
|
-
} else {
|
|
27771
|
-
getGroup(group).entries.push(entry);
|
|
27772
|
-
}
|
|
27773
|
-
});
|
|
27774
|
-
|
|
27775
|
-
return groups;
|
|
27776
|
-
}
|
|
27777
|
-
|
|
27778
27750
|
// helpers ////////////////
|
|
27779
27751
|
|
|
27780
27752
|
function scrollIntoView(el) {
|
|
@@ -27792,6 +27764,7 @@
|
|
|
27792
27764
|
* @typedef {import('./PopupMenuProvider').PopupMenuEntry} PopupMenuEntry
|
|
27793
27765
|
* @typedef {import('./PopupMenuProvider').PopupMenuHeaderEntry} PopupMenuHeaderEntry
|
|
27794
27766
|
* @typedef {import('./PopupMenuProvider').PopupMenuEmptyPlaceholderProvider | import('./PopupMenuProvider').PopupMenuEmptyPlaceholder} PopupMenuEmptyPlaceholder
|
|
27767
|
+
* @typedef {import('./PopupMenuProvider').PopupMenuGroup} PopupMenuGroup
|
|
27795
27768
|
*
|
|
27796
27769
|
* @typedef {import('../search/search').default} search
|
|
27797
27770
|
*
|
|
@@ -27867,21 +27840,24 @@
|
|
|
27867
27840
|
const [ entries, setEntries ] = p(filterEntries(originalEntries, searchValue));
|
|
27868
27841
|
const [ selectedEntry, setSelectedEntry ] = p(entries[0]);
|
|
27869
27842
|
|
|
27843
|
+
const groupedEntries = q(() => groupEntries(entries), [ entries ]);
|
|
27844
|
+
|
|
27870
27845
|
const updateEntries = x((newEntries) => {
|
|
27871
27846
|
|
|
27872
27847
|
// always select first
|
|
27873
27848
|
setSelectedEntry(newEntries[0]);
|
|
27874
27849
|
|
|
27875
27850
|
setEntries(newEntries);
|
|
27876
|
-
}, [
|
|
27851
|
+
}, [ setEntries, setSelectedEntry ]);
|
|
27877
27852
|
|
|
27878
27853
|
// filter entries on search value change
|
|
27879
27854
|
_(() => {
|
|
27880
27855
|
updateEntries(filterEntries(originalEntries, searchValue));
|
|
27881
27856
|
}, [ searchValue, originalEntries ]);
|
|
27882
27857
|
|
|
27883
|
-
// handle keyboard
|
|
27858
|
+
// handle keyboard selection
|
|
27884
27859
|
const keyboardSelect = x(direction => {
|
|
27860
|
+
const entries = getOrderedEntries(groupedEntries);
|
|
27885
27861
|
const idx = entries.indexOf(selectedEntry);
|
|
27886
27862
|
|
|
27887
27863
|
let nextIdx = idx + direction;
|
|
@@ -27895,7 +27871,7 @@
|
|
|
27895
27871
|
}
|
|
27896
27872
|
|
|
27897
27873
|
setSelectedEntry(entries[nextIdx]);
|
|
27898
|
-
}, [
|
|
27874
|
+
}, [ groupedEntries, selectedEntry, setSelectedEntry ]);
|
|
27899
27875
|
|
|
27900
27876
|
const handleKeyDown = x(event => {
|
|
27901
27877
|
if (event.key === 'Enter' && selectedEntry) {
|
|
@@ -27965,7 +27941,7 @@
|
|
|
27965
27941
|
` }
|
|
27966
27942
|
|
|
27967
27943
|
<${PopupMenuList}
|
|
27968
|
-
|
|
27944
|
+
groupedEntries=${ groupedEntries }
|
|
27969
27945
|
selectedEntry=${ selectedEntry }
|
|
27970
27946
|
setSelectedEntry=${ setSelectedEntry }
|
|
27971
27947
|
onAction=${ onSelect }
|
|
@@ -28065,6 +28041,7 @@
|
|
|
28065
28041
|
`;
|
|
28066
28042
|
}
|
|
28067
28043
|
|
|
28044
|
+
|
|
28068
28045
|
// helpers //////////////////////
|
|
28069
28046
|
|
|
28070
28047
|
function getPopupStyle(props) {
|
|
@@ -28075,6 +28052,49 @@
|
|
|
28075
28052
|
};
|
|
28076
28053
|
}
|
|
28077
28054
|
|
|
28055
|
+
function getOrderedEntries(groupedEntries) {
|
|
28056
|
+
const entries = [];
|
|
28057
|
+
|
|
28058
|
+
groupedEntries.forEach(group => {
|
|
28059
|
+
group.entries.forEach(entry => {
|
|
28060
|
+
entries.push(entry);
|
|
28061
|
+
});
|
|
28062
|
+
});
|
|
28063
|
+
|
|
28064
|
+
return entries;
|
|
28065
|
+
}
|
|
28066
|
+
|
|
28067
|
+
/**
|
|
28068
|
+
* @param {PopupMenuEntry[]} entries
|
|
28069
|
+
*
|
|
28070
|
+
* @return {PopupMenuGroup[]}
|
|
28071
|
+
*/
|
|
28072
|
+
function groupEntries(entries) {
|
|
28073
|
+
const groups = [];
|
|
28074
|
+
|
|
28075
|
+
const getGroup = group => groups.find(elem => group.id === elem.id);
|
|
28076
|
+
|
|
28077
|
+
const containsGroup = group => !!getGroup(group);
|
|
28078
|
+
|
|
28079
|
+
// legacy support for provider built for the old popUp menu
|
|
28080
|
+
const formatGroup = group =>
|
|
28081
|
+
typeof group === 'string' ? { id: group } : group;
|
|
28082
|
+
|
|
28083
|
+
entries.forEach(entry => {
|
|
28084
|
+
|
|
28085
|
+
// assume a default group when none is provided
|
|
28086
|
+
const group = entry.group ? formatGroup(entry.group) : { id: 'default' };
|
|
28087
|
+
|
|
28088
|
+
if (!containsGroup(group)) {
|
|
28089
|
+
groups.push({ ...group, entries: [ entry ] });
|
|
28090
|
+
} else {
|
|
28091
|
+
getGroup(group).entries.push(entry);
|
|
28092
|
+
}
|
|
28093
|
+
});
|
|
28094
|
+
|
|
28095
|
+
return groups;
|
|
28096
|
+
}
|
|
28097
|
+
|
|
28078
28098
|
/**
|
|
28079
28099
|
* @typedef {import('../../core/Canvas').default} Canvas
|
|
28080
28100
|
* @typedef {import('../../core/EventBus').default} EventBus
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! bpmn-js - bpmn-modeler v18.6.
|
|
1
|
+
/*! bpmn-js - bpmn-modeler v18.6.5 | Copyright (c) 2014-present, camunda Services GmbH | bpmn.io/license */
|
|
2
2
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).BpmnJS=t()}(this,(function(){"use strict";function e(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}var t=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){var t=e.exports=function(e,n){if(n||(n=16),void 0===e&&(e=128),e<=0)return"0";for(var i=Math.log(Math.pow(2,e))/Math.log(n),r=2;i===1/0;r*=2)i=Math.log(Math.pow(2,e/r))/Math.log(n)*r;var o=i-Math.floor(i),a="";for(r=0;r<Math.floor(i);r++){a=Math.floor(Math.random()*n).toString(n)+a}if(o){var s=Math.pow(n,o);a=Math.floor(Math.random()*s).toString(n)+a}var c=parseInt(a,n);return c!==1/0&&c>=Math.pow(2,e)?t(e,n):a};t.rack=function(e,n,i){var r=function(r){var a=0;do{if(a++>10){if(!i)throw new Error("too many ID collisions, use more bits");e+=i}var s=t(e,n)}while(Object.hasOwnProperty.call(o,s));return o[s]=r,s},o=r.hats={};return r.get=function(e){return r.hats[e]},r.set=function(e,t){return r.hats[e]=t,r},r.bits=e||128,r.base=n||16,r}}));function n(e){if(!(this instanceof n))return new n(e);e=e||[128,36,1],this._seed=e.length?t.rack(e[0],e[1],e[2]):e}function i(e){return Array.prototype.concat.apply([],e)}n.prototype.next=function(e){return this._seed(e||!0)},n.prototype.nextPrefixed=function(e,t){var n;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n},n.prototype.claim=function(e,t){this._seed.set(e,t||!0)},n.prototype.assigned=function(e){return this._seed.get(e)||!1},n.prototype.unclaim=function(e){delete this._seed.hats[e]},n.prototype.clear=function(){var e,t=this._seed.hats;for(e in t)this.unclaim(e)};const r=Object.prototype.toString,o=Object.prototype.hasOwnProperty;function a(e){return void 0===e}function s(e){return void 0!==e}function c(e){return null==e}function p(e){return"[object Array]"===r.call(e)}function l(e){return"[object Object]"===r.call(e)}function u(e){return"[object Number]"===r.call(e)}function h(e){const t=r.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t||"[object Proxy]"===t}function d(e){return"[object String]"===r.call(e)}function f(e,t){return o.call(e,t)}function m(e,t){const n=D(t);let i;return g(e,(function(e,t){if(n(e,t))return i=e,!1})),i}function v(e,t){const n=D(t);let i=p(e)?-1:void 0;return g(e,(function(e,t){if(n(e,t))return i=t,!1})),i}function y(e,t){const n=D(t);let i=[];return g(e,(function(e,t){n(e,t)&&i.push(e)})),i}function g(e,t){let n,i;if(a(e))return;const r=p(e)?N:B;for(let o in e)if(f(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function b(e,t){if(a(e))return[];!function(e){if(!p(e))throw new Error("must supply array")}(e);const n=D(t);return e.filter((function(e,t){return!n(e,t)}))}function _(e,t,n){return g(e,(function(e,i){n=t(n,e,i)})),n}function x(e,t){return!!_(e,(function(e,n,i){return e&&t(n,i)}),!0)}function w(e,t){return!!m(e,t)}function E(e,t){let n=[];return g(e,(function(e,i){n.push(t(e,i))})),n}function S(e){return e&&Object.keys(e)||[]}function C(e){return E(e,(e=>e))}function k(e,t,n={}){return t=T(t),g(e,(function(e){let i=t(e)||"_",r=n[i];r||(r=n[i]=[]),r.push(e)})),n}function R(e,...t){e=T(e);let n={};return g(t,(t=>k(t,e,n))),E(n,(function(e,t){return e[0]}))}const P=R;function A(e,t){t=T(t);let n=[];return g(e,(function(e,i){let r=t(e,i),o={d:r,v:e};for(var a=0;a<n.length;a++){let{d:e}=n[a];if(r<e)return void n.splice(a,0,o)}n.push(o)})),E(n,(e=>e.v))}function M(e){return function(t){return x(e,(function(e,n){return t[n]===e}))}}function T(e){return h(e)?e:t=>t[e]}function D(e){return h(e)?e:t=>t===e}function B(e){return e}function N(e){return Number(e)}function j(e,t){let n,i,r,o;function a(n){let a=Date.now(),p=n?0:o+t-a;if(p>0)return s(p);e.apply(r,i),c()}function s(e){n=setTimeout(a,e)}function c(){n&&clearTimeout(n),n=o=i=r=void 0}function p(...e){o=Date.now(),i=e,r=this,n||s(t)}return p.flush=function(){n&&a(!0),c()},p.cancel=c,p}function O(e,t){return e.bind(t)}function L(e,...t){return Object.assign(e,...t)}function $(e,t){let n={},i=Object(e);return g(t,(function(t){t in i&&(n[t]=e[t])})),n}function I(e,t){let n={};return g(Object(e),(function(e,i){-1===t.indexOf(i)&&(n[i]=e)})),n}function F(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}const z=Object.prototype.toString,H=Object.prototype.hasOwnProperty;function V(e,t){return H.call(e,t)}function G(e,t){let n,i;if(void 0===e)return;const r=function(e){return"[object Array]"===z.call(e)}(e)?U:W;for(let o in e)if(V(e,o)&&(n=e[o],i=t(n,r(o)),!1===i))return n}function W(e){return e}function U(e){return Number(e)}function q(e,...t){const n=e.style;return G(t,(function(e){e&&G(e,(function(e,t){n[t]=e}))})),e}function K(e,t,n){return 2==arguments.length?e.getAttribute(t):null===n?e.removeAttribute(t):(e.setAttribute(t,n),e)}const Y=Object.prototype.toString;function X(e){return new Z(e)}function Z(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function Q(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function J(e,t,n){var i=n?e:e.parentNode;return i&&"function"==typeof i.closest&&i.closest(t)||null}Z.prototype.add=function(e){return this.list.add(e),this},Z.prototype.remove=function(e){return"[object RegExp]"==Y.call(e)?this.removeMatching(e):(this.list.remove(e),this)},Z.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},Z.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Z.prototype.array=function(){return Array.from(this.list)},Z.prototype.has=Z.prototype.contains=function(e){return this.list.contains(e)};var ee,te,ne,ie={};function re(){ee=window.addEventListener?"addEventListener":"attachEvent",te=window.removeEventListener?"removeEventListener":"detachEvent",ne="addEventListener"!==ee?"on":""}var oe=F({__proto__:null,bind:ie.bind=function(e,t,n,i){return ee||re(),e[ee](ne+t,n,i||!1),n},unbind:ie.unbind=function(e,t,n,i){return te||re(),e[te](ne+t,n,i||!1),n},default:ie},[ie]),ae=["focus","blur"];var se,ce={bind:function(e,t,n,i,r){return-1!==ae.indexOf(n)&&(r=!0),oe.bind(e,n,(function(n){var r=n.target||n.srcElement;n.delegateTarget=J(r,t,!0),n.delegateTarget&&i.call(e,n)}),r)},unbind:function(e,t,n,i){return-1!==ae.indexOf(t)&&(i=!0),oe.unbind(e,t,n,i)}},pe=function(e,t){if("string"!=typeof e)throw new TypeError("String expected");t||(t=document);var n=/<([\w:]+)/.exec(e);if(!n)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var i=n[1];if("body"==i){return(r=t.createElement("html")).innerHTML=e,r.removeChild(r.lastChild)}var r,o=Object.prototype.hasOwnProperty.call(ue,i)?ue[i]:ue._default,a=o[0],s=o[1],c=o[2];(r=t.createElement("div")).innerHTML=s+e+c;for(;a--;)r=r.lastChild;if(r.firstChild==r.lastChild)return r.removeChild(r.firstChild);var p=t.createDocumentFragment();for(;r.firstChild;)p.appendChild(r.removeChild(r.firstChild));return p},le=!1;"undefined"!=typeof document&&((se=document.createElement("div")).innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',le=!se.getElementsByTagName("link").length,se=void 0);var ue={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:le?[1,"X<div>","</div>"]:[0,"",""]};ue.td=ue.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],ue.option=ue.optgroup=[1,'<select multiple="multiple">',"</select>"],ue.thead=ue.tbody=ue.colgroup=ue.caption=ue.tfoot=[1,"<table>","</table>"],ue.polyline=ue.ellipse=ue.polygon=ue.circle=ue.text=ue.line=ue.path=ue.rect=ue.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];var he=pe;function de(e,t){return e&&"function"==typeof e.matches&&e.matches(t)||!1}function fe(e,t){return(t=t||document).querySelector(e)}function me(e,t){return(t=t||document).querySelectorAll(e)}function ve(e){e.parentNode&&e.parentNode.removeChild(e)}function ye(e,t){return function(e,t){t.appendChild(function(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch(e){}return e}(e,t))}(t,e),e}var ge={"alignment-baseline":1,"baseline-shift":1,clip:1,"clip-path":1,"clip-rule":1,color:1,"color-interpolation":1,"color-interpolation-filters":1,"color-profile":1,"color-rendering":1,cursor:1,direction:1,display:1,"dominant-baseline":1,"enable-background":1,fill:1,"fill-opacity":1,"fill-rule":1,filter:1,"flood-color":1,"flood-opacity":1,font:1,"font-family":1,"font-size":2,"font-size-adjust":1,"font-stretch":1,"font-style":1,"font-variant":1,"font-weight":1,"glyph-orientation-horizontal":1,"glyph-orientation-vertical":1,"image-rendering":1,kerning:1,"letter-spacing":1,"lighting-color":1,marker:1,"marker-end":1,"marker-mid":1,"marker-start":1,mask:1,opacity:1,overflow:1,"pointer-events":1,"shape-rendering":1,"stop-color":1,"stop-opacity":1,stroke:1,"stroke-dasharray":1,"stroke-dashoffset":1,"stroke-linecap":1,"stroke-linejoin":1,"stroke-miterlimit":1,"stroke-opacity":1,"stroke-width":2,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function be(e,t,n){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=ge[i];r?(2===r&&"number"==typeof n&&(n=String(n)+"px"),e.style[i]=n):e.setAttributeNS(null,t,n)}function _e(e,t,n){if("string"==typeof t){if(void 0===n)return function(e,t){return ge[t]?e.style[t]:e.getAttributeNS(null,t)}(e,t);be(e,t,n)}else!function(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)be(e,i,t[i])}(e,t);return e}const xe=Object.prototype.toString;function we(e){return new Ee(e)}function Ee(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function Se(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function Ce(e){return e.cloneNode(!0)}Ee.prototype.add=function(e){return this.list.add(e),this},Ee.prototype.remove=function(e){return"[object RegExp]"==xe.call(e)?this.removeMatching(e):(this.list.remove(e),this)},Ee.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},Ee.prototype.toggle=function(e,t){return void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Ee.prototype.array=function(){return Array.from(this.list)},Ee.prototype.has=Ee.prototype.contains=function(e){return this.list.contains(e)};var ke="http://www.w3.org/2000/svg",Re='<svg xmlns="'+ke+'"';function Pe(e){var t=!1;"<svg"===e.substring(0,4)?-1===e.indexOf(ke)&&(e=Re+e.substring(4)):(e=Re+">"+e+"</svg>",t=!0);var n=function(e){var t;return(t=new DOMParser).async=!1,t.parseFromString(e,"text/xml")}(e);if(!t)return n;for(var i=document.createDocumentFragment(),r=n.firstChild;r.firstChild;)i.appendChild(r.firstChild);return i}function Ae(e,t){var n;return"<"===(e=e.trim()).charAt(0)?(n=Pe(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(ke,e),t&&_e(n,t),n}var Me=null;function Te(){return null===Me&&(Me=Ae("svg")),Me}function De(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)e[i]=t[i];return e}function Be(e){return Te().createSVGTransform()}var Ne=/([&<>]{1})/g,je=/([\n\r"]{1})/g,Oe={"&":"&","<":"<",">":">",'"':"'"};function Le(e,t){return e.replace(t,(function(e,t){return Oe[t]||t}))}function $e(e,t){var n,i,r,o,a;switch(e.nodeType){case 3:t.push(Le(e.textContent,Ne));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(n=0,i=(r=e.attributes).length;n<i;++n)o=r.item(n),t.push(" ",o.name,'="',Le(o.value,je),'"');if(e.hasChildNodes()){for(t.push(">"),n=0,i=(a=e.childNodes).length;n<i;++n)$e(a.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("\x3c!--",Le(e.nodeValue,Ne),"--\x3e");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function Ie(e,t){return function(e){for(var t=e.firstChild,n=[];t;)$e(t,n),t=t.nextSibling;return n.join("")}(e)}function Fe(e){var t=e.parentNode;return t&&t.removeChild(e),e}function ze(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function He(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),function(e,t){var n,i;for(e.clear(),n=0;i=t[n];n++)e.appendItem(ze(e,i))}(n,t)),n.consolidate()}const Ve=/^class[ {]/;function Ge(e){return Array.isArray(e)}function We(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ue(...e){1===e.length&&Ge(e[0])&&(e=e[0]);const t=(e=[...e]).pop();return t.$inject=e,t}const qe=/constructor\s*[^(]*\(\s*([^)]*)\)/m,Ke=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,Ye=/\/\*([^*]*)\*\//m;function Xe(e){if("function"!=typeof e)throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(function(e){return Ve.test(e.toString())}(e)?qe:Ke);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map((e=>{const t=e.match(Ye);return(t&&t[1]||e).trim()}))||[]}function Ze(e,t){const n=t||{get:function(e,t){if(i.push(e),!1===t)return null;throw s(`No provider for "${e}"!`)}},i=[],r=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),a=o.injector=this,s=function(e){const t=i.join(" -> ");return i.length=0,new Error(t?`${e} (Resolving: ${t})`:e)};function c(e,t){if(!r[e]&&e.includes(".")){const t=e.split(".");let n=c(t.shift());for(;t.length;)n=n[t.shift()];return n}if(We(o,e))return o[e];if(We(r,e)){if(-1!==i.indexOf(e))throw i.push(e),s("Cannot resolve circular dependency!");return i.push(e),o[e]=r[e][0](r[e][1]),i.pop(),o[e]}return n.get(e,t)}function p(e,t){if(void 0===t&&(t={}),"function"!=typeof e){if(!Ge(e))throw s(`Cannot invoke "${e}". Expected a function!`);e=Ue(e.slice())}return{fn:e,dependencies:(e.$inject||Xe(e)).map((e=>We(t,e)?t[e]:c(e)))}}function l(e){const{fn:t,dependencies:n}=p(e);return new(Function.prototype.bind.call(t,null,...n))}function u(e,t,n){const{fn:i,dependencies:r}=p(e,n);return i.apply(t,r)}function h(e){return Ue((t=>e.get(t)))}function d(e,t){if(t&&t.length){const n=Object.create(null),i=Object.create(null),o=[],a=[],s=[];let c,p,l,u;for(let e in r)c=r[e],-1!==t.indexOf(e)&&("private"===c[2]?(p=o.indexOf(c[3]),-1===p?(l=c[3].createChild([],t),u=h(l),o.push(c[3]),a.push(l),s.push(u),n[e]=[u,e,"private",l]):n[e]=[s[p],e,"private",a[p]]):n[e]=[c[2],c[1]],i[e]=!0),"factory"!==c[2]&&"type"!==c[2]||!c[1].$scope||t.forEach((t=>{-1!==c[1].$scope.indexOf(t)&&(n[e]=[c[2],c[1]],i[t]=!0)}));t.forEach((e=>{if(!i[e])throw new Error('No provider for "'+e+'". Cannot use provider from the parent!')})),e.unshift(n)}return new Ze(e,a)}const f={factory:u,type:l,value:function(e){return e}};function m(e,t){const n=e.__init__||[];return function(){n.forEach((e=>{"string"==typeof e?t.get(e):t.invoke(e)}))}}function v(e){const t=e.__exports__;if(t){const n=e.__modules__,i=Object.keys(e).reduce(((t,n)=>("__exports__"!==n&&"__modules__"!==n&&"__init__"!==n&&"__depends__"!==n&&(t[n]=e[n]),t)),Object.create(null)),o=d((n||[]).concat(i)),a=Ue((function(e){return o.get(e)}));t.forEach((function(e){r[e]=[a,e,"private",o]}));const s=(e.__init__||[]).slice();return s.unshift((function(){o.init()})),m(e=Object.assign({},e,{__init__:s}),o)}return Object.keys(e).forEach((function(t){if("__init__"===t||"__depends__"===t)return;const n=e[t];if("private"===n[2])return void(r[t]=n);const i=n[0],o=n[1];r[t]=[f[i],Qe(i,o),i]})),m(e,a)}function y(e,t){return-1!==e.indexOf(t)||-1!==(e=(t.__depends__||[]).reduce(y,e)).indexOf(t)?e:e.concat(t)}this.get=c,this.invoke=u,this.instantiate=l,this.createChild=d,this.init=function(e){const t=e.reduce(y,[]).map(v);let n=!1;return function(){n||(n=!0,t.forEach((e=>e())))}}(e)}function Qe(e,t){return"value"!==e&&Ge(t)&&(t=Ue(t.slice())),t}function Je(e,t){var n=this;t=t||1e3,e.on(["render.shape","render.connection"],t,(function(e,t){var i=e.type,r=t.element,o=t.gfx,a=t.attrs;if(n.canRender(r))return"render.shape"===i?n.drawShape(o,r,a):n.drawConnection(o,r,a)})),e.on(["render.getShapePath","render.getConnectionPath"],t,(function(e,t){if(n.canRender(t))return"render.getShapePath"===e.type?n.getShapePath(t):n.getConnectionPath(t)}))}function et(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function tt(e){return["L",e.x,e.y]}function nt(e,t){const n=e.length,i=[(r=e[0],["M",r.x,r.y])];var r,o,a,s;for(let r=1;r<n;r++){const n=e[r-1],c=e[r],p=e[r+1];if(!p||!t){i.push(tt(c));continue}const l=Math.min(t,rt(c.x-n.x,c.y-n.y),rt(p.x-c.x,p.y-c.y));if(!l){i.push(tt(c));continue}const u=it(c,n,l),h=it(c,n,.5*l),d=it(c,p,l),f=it(c,p,.5*l);i.push(tt(u)),i.push((a=f,s=d,["C",(o=h).x,o.y,a.x,a.y,s.x,s.y]))}return i}function it(e,t,n){const i=t.x-e.x,r=t.y-e.y,o=n/rt(i,r);return{x:e.x+i*o,y:e.y+r*o}}function rt(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function ot(e,t,n){u(t)&&(n=t,t=null),t||(t={});const i=Ae("path",t);return u(n)&&(i.dataset.cornerRadius=String(n)),at(i,e)}function at(e,t){return _e(e,{d:et(nt(t,parseInt(e.dataset.cornerRadius,10)||0))}),e}function st(e){return y(e,(function(t){return!m(e,(function(e){return e!==t&&ct(t,e)}))}))}function ct(e,t){if(t){if(e===t)return t;if(e.parent)return ct(e.parent,t)}}function pt(e,t,n){var i=!n||-1===e.indexOf(t);return i&&e.push(t),i}function lt(e,t,n){n=n||0,p(e)||(e=[e]),g(e,(function(e,i){var r=t(e,i,n);p(r)&&r.length&<(r,t,n+1)}))}function ut(e,t){return function(e,t){var n=[],i=[];return lt(e,(function(e,r,o){pt(n,e,t);var a=e.children;if(a&&pt(i,a,t))return a})),n}(e,!t)}function ht(e,t){var n,i,r,o;return t=!!t,p(e)||(e=[e]),g(e,(function(e){var a=e;e.waypoints&&!t&&(a=ht(e.waypoints,!0));var s=a.x,c=a.y,p=a.height||0,l=a.width||0;(s<n||void 0===n)&&(n=s),(c<i||void 0===i)&&(i=c),(s+l>r||void 0===r)&&(r=s+l),(c+p>o||void 0===o)&&(o=c+p)})),{x:n,y:i,height:o-i,width:r-n}}function dt(e,t){var n={};return g(e,(function(e){var i=e;i.waypoints&&(i=ht(i)),!u(t.y)&&i.x>t.x&&(n[e.id]=e),!u(t.x)&&i.y>t.y&&(n[e.id]=e),i.x>t.x&&i.y>t.y&&(u(t.width)&&u(t.height)&&i.width+i.x<t.width+t.x&&i.height+i.y<t.height+t.y?n[e.id]=e:u(t.width)&&u(t.height)||(n[e.id]=e))})),n}function ft(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function mt(e){return!(!e||!e.isFrame)}function vt(e,t){return L({},e||{},t||{})}Je.prototype.canRender=function(e){},Je.prototype.drawShape=function(e,t){},Je.prototype.drawConnection=function(e,t){},Je.prototype.getShapePath=function(e){},Je.prototype.getConnectionPath=function(e){};function yt(e,t){Je.call(this,e,1),this.CONNECTION_STYLE=t.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=t.style({fill:"white",stroke:"fuchsia",strokeWidth:2}),this.FRAME_STYLE=t.style(["no-fill"],{stroke:"fuchsia",strokeDasharray:4,strokeWidth:2})}e(yt,Je),yt.prototype.canRender=function(){return!0},yt.prototype.drawShape=function(e,t,n){var i=Ae("rect");return _e(i,{x:0,y:0,width:t.width||0,height:t.height||0}),mt(t)?_e(i,L({},this.FRAME_STYLE,n||{})):_e(i,L({},this.SHAPE_STYLE,n||{})),ye(e,i),i},yt.prototype.drawConnection=function(e,t,n){var i=ot(t.waypoints,L({},this.CONNECTION_STYLE,n||{}));return ye(e,i),i},yt.prototype.getShapePath=function(e){var t=e.x,n=e.y,i=e.width;return et([["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]])},yt.prototype.getConnectionPath=function(e){var t,n,i=e.waypoints,r=[];for(t=0;n=i[t];t++)n=n.original||n,r.push([0===t?"M":"L",n.x,n.y]);return et(r)},yt.$inject=["eventBus","styles"];var gt={__init__:["defaultRenderer"],defaultRenderer:["type",yt],styles:["type",function(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(e,t,n){return L(this.style(t,n),{class:e})},this.style=function(t,n){p(t)||n||(n=t,t=[]);var i=_(t,(function(t,n){return L(t,e[n]||{})}),{});return n?L(i,n):i},this.computeStyle=function(e,n,i){return p(n)||(i=n,n=[]),t.style(n||[],L({},i,e||{}))}}]};function bt(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return-1!==n&&e.splice(n,1),n}function _t(e,t,n){if(e&&t){"number"!=typeof n&&(n=-1);var i=e.indexOf(t);if(-1!==i){if(i===n)return;if(-1===n)return;e.splice(i,1)}-1!==n?e.splice(n,0,t):e.push(t)}}function xt(e,t){return e&&t?e.indexOf(t):-1}function wt(e,t){return e&&t?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):-1}function Et(e,t,n,i){if(void 0===i&&(i=5),!e||!t||!n)return!1;var r=(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x),o=wt(e,t);return Math.abs(r/o)<=i}function St(e,t){var n=Array.from(arguments).flat();const i={x:"v",y:"h"};for(const[e,t]of Object.entries(i))if(Ct(e,n))return t;return!1}function Ct(e,t){const n=t[0];return x(t,(function(t){return Math.abs(n[e]-t[e])<=2}))}function kt(e,t,n){return n=n||0,e.x>t.x-n&&e.y>t.y-n&&e.x<t.x+t.width+n&&e.y<t.y+t.height+n}function Rt(e,t){return{x:Math.round(e.x+(t.x-e.x)/2),y:Math.round(e.y+(t.y-e.y)/2)}}
|
|
3
3
|
/**
|
|
4
4
|
* This file contains source code adapted from Snap.svg (licensed Apache-2.0).
|
|
@@ -103,9 +103,9 @@ function(e){const t=he('<a href="http://bpmn.io" target="_blank" class="bjs-powe
|
|
|
103
103
|
</div>
|
|
104
104
|
`}
|
|
105
105
|
</li>
|
|
106
|
-
`}function Rc(e){const{selectedEntry:t,setSelectedEntry:n,
|
|
106
|
+
`}function Rc(e){const{selectedEntry:t,setSelectedEntry:n,groupedEntries:i,...r}=e,o=dc();return hc((()=>{const e=o.current;if(!e)return;const t=e.querySelector(".selected");var n;t&&("function"==typeof(n=t).scrollIntoViewIfNeeded?n.scrollIntoViewIfNeeded():n.scrollIntoView({scrollMode:"if-needed",block:"nearest"}))}),[t]),Qs`
|
|
107
107
|
<div class="djs-popup-results" ref=${o}>
|
|
108
|
-
${
|
|
108
|
+
${i.map((e=>Qs`
|
|
109
109
|
${e.name&&Qs`
|
|
110
110
|
<div key=${e.id} class="entry-header" title=${e.name}>
|
|
111
111
|
${e.name}
|
|
@@ -125,17 +125,17 @@ function(e){const t=he('<a href="http://bpmn.io" target="_blank" class="bjs-powe
|
|
|
125
125
|
</ul>
|
|
126
126
|
`))}
|
|
127
127
|
</div>
|
|
128
|
-
`}function Pc(e){const{onClose:t,onSelect:n,className:i,headerEntries:r,position:o,title:a,width:c,scale:p,search:l,emptyPlaceholder:u,searchFn:d,entries:f,onOpened:m,onClosed:v}=e,y=fc((()=>!!s(l)&&f.length>5),[l,f]),[g,b]=lc(""),_=mc(((e,t)=>{if(!y)return e;if(!t.trim())return e.filter((({rank:e=0})=>e>=0));const n=e.filter((({searchable:e})=>!1!==e));return d(n,t,{keys:["label","search","description"]}).map((({item:e})=>e))}),[y]),[x,w]=lc(_(f,g)),[E,S]=lc(x[0]),C=mc((e=>{S(e[0]),w(e)}),[
|
|
128
|
+
`}function Pc(e){const{onClose:t,onSelect:n,className:i,headerEntries:r,position:o,title:a,width:c,scale:p,search:l,emptyPlaceholder:u,searchFn:d,entries:f,onOpened:m,onClosed:v}=e,y=fc((()=>!!s(l)&&f.length>5),[l,f]),[g,b]=lc(""),_=mc(((e,t)=>{if(!y)return e;if(!t.trim())return e.filter((({rank:e=0})=>e>=0));const n=e.filter((({searchable:e})=>!1!==e));return d(n,t,{keys:["label","search","description"]}).map((({item:e})=>e))}),[y]),[x,w]=lc(_(f,g)),[E,S]=lc(x[0]),C=fc((()=>function(e){const t=[],n=e=>t.find((t=>e.id===t.id)),i=e=>!!n(e),r=e=>"string"==typeof e?{id:e}:e;return e.forEach((e=>{const o=e.group?r(e.group):{id:"default"};i(o)?n(o).entries.push(e):t.push({...o,entries:[e]})})),t}(x)),[x]),k=mc((e=>{S(e[0]),w(e)}),[w,S]);uc((()=>{k(_(f,g))}),[g,f]);const R=mc((e=>{const t=function(e){const t=[];return e.forEach((e=>{e.entries.forEach((e=>{t.push(e)}))})),t}(C);let n=t.indexOf(E)+e;n<0&&(n=t.length-1),n>=t.length&&(n=0),S(t[n])}),[C,E,S]),P=mc((e=>"Enter"===e.key&&E?n(e,E):"ArrowUp"===e.key?(R(-1),e.preventDefault()):"ArrowDown"===e.key?(R(1),e.preventDefault()):void 0),[n,E,R]),A=mc((e=>{de(e.target,"input")&&b((()=>e.target.value))}),[b]);uc((()=>(m(),()=>{v()})),[]);const M=fc((()=>a||r.length>0),[a,r]);return Qs`
|
|
129
129
|
<${Ac}
|
|
130
130
|
onClose=${t}
|
|
131
|
-
onKeyup=${
|
|
132
|
-
onKeydown=${
|
|
131
|
+
onKeyup=${A}
|
|
132
|
+
onKeydown=${P}
|
|
133
133
|
className=${i}
|
|
134
134
|
position=${o}
|
|
135
135
|
width=${c}
|
|
136
136
|
scale=${p}
|
|
137
137
|
>
|
|
138
|
-
${
|
|
138
|
+
${M&&Qs`
|
|
139
139
|
<${Cc}
|
|
140
140
|
headerEntries=${r}
|
|
141
141
|
onSelect=${n}
|
|
@@ -157,7 +157,7 @@ function(e){const t=he('<a href="http://bpmn.io" target="_blank" class="bjs-powe
|
|
|
157
157
|
`}
|
|
158
158
|
|
|
159
159
|
<${Rc}
|
|
160
|
-
|
|
160
|
+
groupedEntries=${C}
|
|
161
161
|
selectedEntry=${E}
|
|
162
162
|
setSelectedEntry=${S}
|
|
163
163
|
onAction=${n}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* bpmn-js - bpmn-navigated-viewer v18.6.
|
|
2
|
+
* bpmn-js - bpmn-navigated-viewer v18.6.5
|
|
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: 2025-09-
|
|
11
|
+
* Date: 2025-09-19
|
|
12
12
|
*/
|
|
13
13
|
(function (global, factory) {
|
|
14
14
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|