bpmn-js 18.30.0 → 18.31.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/diagram-js.css +4 -5
- package/dist/bpmn-modeler.development.js +311 -52
- package/dist/bpmn-modeler.production.min.js +84 -78
- package/dist/bpmn-navigated-viewer.development.js +69 -16
- package/dist/bpmn-navigated-viewer.production.min.js +3 -3
- package/dist/bpmn-viewer.development.js +4 -4
- package/dist/bpmn-viewer.production.min.js +2 -2
- package/lib/features/context-pad/index.d.ts +18 -1
- package/lib/features/context-pad/index.d.ts.map +1 -1
- package/lib/features/label-editing/LabelEditingProvider.d.ts +1 -1
- package/lib/features/label-editing/LabelEditingProvider.d.ts.map +1 -1
- package/lib/features/label-editing/index.d.ts +8 -1
- package/lib/features/label-editing/index.d.ts.map +1 -1
- package/lib/features/modeling/BpmnUpdater.d.ts.map +1 -1
- package/lib/features/modeling/BpmnUpdater.js +27 -0
- package/package.json +11 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* bpmn-js - bpmn-navigated-viewer v18.
|
|
2
|
+
* bpmn-js - bpmn-navigated-viewer v18.31.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: 2026-
|
|
11
|
+
* Date: 2026-10-01
|
|
12
12
|
*/
|
|
13
13
|
(function (global, factory) {
|
|
14
14
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -5363,7 +5363,7 @@
|
|
|
5363
5363
|
textBBox.width = fitLine ? textBBox.width : 0;
|
|
5364
5364
|
|
|
5365
5365
|
// try to fit
|
|
5366
|
-
if (fitLine === ' ' || fitLine === '' || textBBox.width
|
|
5366
|
+
if (fitLine === ' ' || fitLine === '' || textBBox.width <= maxWidth || fitLine.length < 2) {
|
|
5367
5367
|
return fit(lines, fitLine, originalLine, textBBox);
|
|
5368
5368
|
}
|
|
5369
5369
|
|
|
@@ -13911,7 +13911,7 @@
|
|
|
13911
13911
|
function prependTo(newNode, parentNode, siblingNode) {
|
|
13912
13912
|
var node = siblingNode || parentNode.firstChild;
|
|
13913
13913
|
|
|
13914
|
-
// do not prepend node to itself
|
|
13914
|
+
// do not prepend node to itself
|
|
13915
13915
|
// https://github.com/bpmn-io/bpmn-js/issues/746
|
|
13916
13916
|
if (newNode === node) {
|
|
13917
13917
|
return;
|
|
@@ -24482,6 +24482,13 @@
|
|
|
24482
24482
|
/**
|
|
24483
24483
|
* Checks if key pressed is one of provided keys.
|
|
24484
24484
|
*
|
|
24485
|
+
* Keys are matched against the logical key (`KeyboardEvent#key`) first,
|
|
24486
|
+
* respecting Latin keyboard layouts such as QWERTZ or AZERTY.
|
|
24487
|
+
*
|
|
24488
|
+
* If a non-Latin layout (e.g. Cyrillic, Arabic) is active, letter keys
|
|
24489
|
+
* are matched by their physical location (`KeyboardEvent#code`), assuming
|
|
24490
|
+
* a US (QWERTY) layout. This applies to shortcuts with and without modifiers.
|
|
24491
|
+
*
|
|
24485
24492
|
* @param {string|string[]} keys
|
|
24486
24493
|
* @param {KeyboardEvent} event
|
|
24487
24494
|
* @return {boolean}
|
|
@@ -24489,7 +24496,51 @@
|
|
|
24489
24496
|
function isKey(keys, event) {
|
|
24490
24497
|
keys = isArray$1(keys) ? keys : [ keys ];
|
|
24491
24498
|
|
|
24492
|
-
return
|
|
24499
|
+
return (
|
|
24500
|
+
keys.indexOf(event.key) !== -1 ||
|
|
24501
|
+
keys.indexOf(event.code) !== -1 ||
|
|
24502
|
+
keys.indexOf(getPhysicalLetter(event)) !== -1
|
|
24503
|
+
);
|
|
24504
|
+
}
|
|
24505
|
+
|
|
24506
|
+
// letters of a specific, non-Latin script; excludes letters shared with Latin
|
|
24507
|
+
// orthographies, e.g. U+02BC (ʼ) or U+02BB (ʻ)
|
|
24508
|
+
var NON_LATIN_LETTER = /^(?!\p{Script_Extensions=Latin}|\p{Script=Common})\p{Letter}$/u;
|
|
24509
|
+
|
|
24510
|
+
var NON_LETTER = /^\P{Letter}$/u;
|
|
24511
|
+
|
|
24512
|
+
/**
|
|
24513
|
+
* Returns the (US layout) letter of the physical key pressed,
|
|
24514
|
+
* if the logical key is a non-Latin letter.
|
|
24515
|
+
*
|
|
24516
|
+
* With <Shift>, some non-Latin layouts (e.g. Arabic) produce symbols on letter
|
|
24517
|
+
* keys. As a symbol does not reveal the layout, we additionally require the
|
|
24518
|
+
* legacy `KeyboardEvent#keyCode` to agree: the operating system maps it to the
|
|
24519
|
+
* US letter on non-Latin layouts only, but not on Latin ones (e.g. Dvorak).
|
|
24520
|
+
*
|
|
24521
|
+
* @param {KeyboardEvent} event
|
|
24522
|
+
*
|
|
24523
|
+
* @return {string|null}
|
|
24524
|
+
*/
|
|
24525
|
+
function getPhysicalLetter(event) {
|
|
24526
|
+
var key = event.key,
|
|
24527
|
+
match = /^Key([A-Z])$/.exec(event.code || '');
|
|
24528
|
+
|
|
24529
|
+
if (!match || typeof key !== 'string') {
|
|
24530
|
+
return null;
|
|
24531
|
+
}
|
|
24532
|
+
|
|
24533
|
+
var letter = match[1];
|
|
24534
|
+
|
|
24535
|
+
if (NON_LATIN_LETTER.test(key)) {
|
|
24536
|
+
return event.shiftKey ? letter : letter.toLowerCase();
|
|
24537
|
+
}
|
|
24538
|
+
|
|
24539
|
+
if (event.shiftKey && NON_LETTER.test(key) && event.keyCode === letter.charCodeAt(0)) {
|
|
24540
|
+
return letter;
|
|
24541
|
+
}
|
|
24542
|
+
|
|
24543
|
+
return null;
|
|
24493
24544
|
}
|
|
24494
24545
|
|
|
24495
24546
|
/**
|
|
@@ -24887,7 +24938,7 @@
|
|
|
24887
24938
|
|
|
24888
24939
|
// quirk: it has to be triggered by `=` as well to work on international keyboard layout
|
|
24889
24940
|
// cf: https://github.com/bpmn-io/bpmn-js/issues/1362#issuecomment-722989754
|
|
24890
|
-
if (isKey([ '+', '
|
|
24941
|
+
if (isKey([ '+', '=' ], event) && isCmd(event)) {
|
|
24891
24942
|
editorActions.trigger('stepZoom', { value: 1 });
|
|
24892
24943
|
|
|
24893
24944
|
return true;
|
|
@@ -24900,7 +24951,7 @@
|
|
|
24900
24951
|
|
|
24901
24952
|
var event = context.keyEvent;
|
|
24902
24953
|
|
|
24903
|
-
if (isKey(
|
|
24954
|
+
if (isKey('-', event) && isCmd(event)) {
|
|
24904
24955
|
editorActions.trigger('stepZoom', { value: -1 });
|
|
24905
24956
|
|
|
24906
24957
|
return true;
|
|
@@ -24926,7 +24977,7 @@
|
|
|
24926
24977
|
|
|
24927
24978
|
var event = context.keyEvent;
|
|
24928
24979
|
|
|
24929
|
-
if (isKey([ 'Backspace', 'Delete'
|
|
24980
|
+
if (isKey([ 'Backspace', 'Delete' ], event)) {
|
|
24930
24981
|
editorActions.trigger('removeSelection');
|
|
24931
24982
|
|
|
24932
24983
|
return true;
|
|
@@ -24986,10 +25037,10 @@
|
|
|
24986
25037
|
}
|
|
24987
25038
|
|
|
24988
25039
|
if (keyboard.isKey([
|
|
24989
|
-
'ArrowLeft',
|
|
24990
|
-
'ArrowUp',
|
|
24991
|
-
'ArrowDown',
|
|
24992
|
-
'ArrowRight'
|
|
25040
|
+
'ArrowLeft',
|
|
25041
|
+
'ArrowUp',
|
|
25042
|
+
'ArrowDown',
|
|
25043
|
+
'ArrowRight'
|
|
24993
25044
|
], event)) {
|
|
24994
25045
|
|
|
24995
25046
|
var speed = (
|
|
@@ -25002,19 +25053,15 @@
|
|
|
25002
25053
|
|
|
25003
25054
|
switch (event.key) {
|
|
25004
25055
|
case 'ArrowLeft':
|
|
25005
|
-
case 'Left':
|
|
25006
25056
|
direction = 'left';
|
|
25007
25057
|
break;
|
|
25008
25058
|
case 'ArrowUp':
|
|
25009
|
-
case 'Up':
|
|
25010
25059
|
direction = 'up';
|
|
25011
25060
|
break;
|
|
25012
25061
|
case 'ArrowRight':
|
|
25013
|
-
case 'Right':
|
|
25014
25062
|
direction = 'right';
|
|
25015
25063
|
break;
|
|
25016
25064
|
case 'ArrowDown':
|
|
25017
|
-
case 'Down':
|
|
25018
25065
|
direction = 'down';
|
|
25019
25066
|
break;
|
|
25020
25067
|
}
|
|
@@ -25183,6 +25230,12 @@
|
|
|
25183
25230
|
}
|
|
25184
25231
|
});
|
|
25185
25232
|
|
|
25233
|
+
eventBus.on('diagram.destroy', function() {
|
|
25234
|
+
if (context) {
|
|
25235
|
+
handleEnd();
|
|
25236
|
+
}
|
|
25237
|
+
});
|
|
25238
|
+
|
|
25186
25239
|
|
|
25187
25240
|
function handleMove(event) {
|
|
25188
25241
|
|