bpmn-js 15.2.2 → 16.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/bpmn-modeler.development.js +253 -155
- package/dist/bpmn-modeler.production.min.js +35 -35
- package/dist/bpmn-navigated-viewer.development.js +83 -16
- package/dist/bpmn-navigated-viewer.production.min.js +5 -5
- package/dist/bpmn-viewer.development.js +83 -16
- package/dist/bpmn-viewer.production.min.js +5 -5
- package/lib/draw/BpmnRenderer.js +36 -8
- package/lib/features/context-pad/ContextPadProvider.js +21 -26
- package/lib/features/label-editing/LabelEditingProvider.js +43 -6
- package/lib/features/modeling/behavior/IsHorizontalFix.js +7 -2
- package/lib/features/palette/PaletteProvider.js +15 -17
- package/lib/features/popup-menu/ReplaceMenuProvider.js +5 -5
- package/lib/features/replace/ReplaceOptions.js +84 -84
- package/lib/util/DiUtil.d.ts +7 -0
- package/lib/util/DiUtil.js +20 -0
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* bpmn-js - bpmn-navigated-viewer
|
|
2
|
+
* bpmn-js - bpmn-navigated-viewer v16.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: 2023-11
|
|
11
|
+
* Date: 2023-12-11
|
|
12
12
|
*/
|
|
13
13
|
(function (global, factory) {
|
|
14
14
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -725,6 +725,26 @@
|
|
|
725
725
|
return true;
|
|
726
726
|
}
|
|
727
727
|
|
|
728
|
+
/**
|
|
729
|
+
* @param {Element} element
|
|
730
|
+
*
|
|
731
|
+
* @return {boolean}
|
|
732
|
+
*/
|
|
733
|
+
function isHorizontal(element) {
|
|
734
|
+
|
|
735
|
+
if (!is$1(element, 'bpmn:Participant') && !is$1(element, 'bpmn:Lane')) {
|
|
736
|
+
return undefined;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
var isHorizontal = getDi(element).isHorizontal;
|
|
740
|
+
|
|
741
|
+
if (isHorizontal === undefined) {
|
|
742
|
+
return true;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
return isHorizontal;
|
|
746
|
+
}
|
|
747
|
+
|
|
728
748
|
/**
|
|
729
749
|
* @param {Element} element
|
|
730
750
|
*
|
|
@@ -3784,10 +3804,12 @@
|
|
|
3784
3804
|
}
|
|
3785
3805
|
|
|
3786
3806
|
function renderLaneLabel(parentGfx, text, element, attrs = {}) {
|
|
3807
|
+
var isHorizontalLane = isHorizontal(element);
|
|
3808
|
+
|
|
3787
3809
|
var textBox = renderLabel(parentGfx, text, {
|
|
3788
3810
|
box: {
|
|
3789
3811
|
height: 30,
|
|
3790
|
-
width: getHeight(element, attrs),
|
|
3812
|
+
width: isHorizontalLane ? getHeight(element, attrs) : getWidth(element, attrs),
|
|
3791
3813
|
},
|
|
3792
3814
|
align: 'center-middle',
|
|
3793
3815
|
style: {
|
|
@@ -3795,9 +3817,10 @@
|
|
|
3795
3817
|
}
|
|
3796
3818
|
});
|
|
3797
3819
|
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3820
|
+
if (isHorizontalLane) {
|
|
3821
|
+
var top = -1 * getHeight(element, attrs);
|
|
3822
|
+
transform(textBox, 0, -top, 270);
|
|
3823
|
+
}
|
|
3801
3824
|
}
|
|
3802
3825
|
|
|
3803
3826
|
function renderActivity(parentGfx, element, attrs = {}) {
|
|
@@ -4515,12 +4538,13 @@
|
|
|
4515
4538
|
var participant = renderLane(parentGfx, element, attrs);
|
|
4516
4539
|
|
|
4517
4540
|
var expandedParticipant = isExpanded(element);
|
|
4541
|
+
var horizontalParticipant = isHorizontal(element);
|
|
4518
4542
|
|
|
4519
4543
|
var semantic = getBusinessObject(element),
|
|
4520
4544
|
name = semantic.get('name');
|
|
4521
4545
|
|
|
4522
4546
|
if (expandedParticipant) {
|
|
4523
|
-
|
|
4547
|
+
var waypoints = horizontalParticipant ? [
|
|
4524
4548
|
{
|
|
4525
4549
|
x: 30,
|
|
4526
4550
|
y: 0
|
|
@@ -4529,20 +4553,43 @@
|
|
|
4529
4553
|
x: 30,
|
|
4530
4554
|
y: getHeight(element, attrs)
|
|
4531
4555
|
}
|
|
4532
|
-
]
|
|
4556
|
+
] : [
|
|
4557
|
+
{
|
|
4558
|
+
x: 0,
|
|
4559
|
+
y: 30
|
|
4560
|
+
},
|
|
4561
|
+
{
|
|
4562
|
+
x: getWidth(element, attrs),
|
|
4563
|
+
y: 30
|
|
4564
|
+
}
|
|
4565
|
+
];
|
|
4566
|
+
|
|
4567
|
+
drawLine(parentGfx, waypoints, {
|
|
4533
4568
|
stroke: getStrokeColor(element, defaultStrokeColor, attrs.stroke),
|
|
4534
4569
|
strokeWidth: PARTICIPANT_STROKE_WIDTH
|
|
4535
4570
|
});
|
|
4536
4571
|
|
|
4537
4572
|
renderLaneLabel(parentGfx, name, element, attrs);
|
|
4538
4573
|
} else {
|
|
4539
|
-
|
|
4540
|
-
|
|
4574
|
+
var bounds = getBounds(element, attrs);
|
|
4575
|
+
|
|
4576
|
+
if (!horizontalParticipant) {
|
|
4577
|
+
bounds.height = getWidth(element, attrs);
|
|
4578
|
+
bounds.width = getHeight(element, attrs);
|
|
4579
|
+
}
|
|
4580
|
+
|
|
4581
|
+
var textBox = renderLabel(parentGfx, name, {
|
|
4582
|
+
box: bounds,
|
|
4541
4583
|
align: 'center-middle',
|
|
4542
4584
|
style: {
|
|
4543
4585
|
fill: getLabelColor(element, defaultLabelColor, defaultStrokeColor, attrs.stroke)
|
|
4544
4586
|
}
|
|
4545
4587
|
});
|
|
4588
|
+
|
|
4589
|
+
if (!horizontalParticipant) {
|
|
4590
|
+
var top = -1 * getHeight(element, attrs);
|
|
4591
|
+
transform(textBox, 0, -top, 270);
|
|
4592
|
+
}
|
|
4546
4593
|
}
|
|
4547
4594
|
|
|
4548
4595
|
if (semantic.get('participantMultiplicity')) {
|
|
@@ -9837,7 +9884,7 @@
|
|
|
9837
9884
|
}
|
|
9838
9885
|
|
|
9839
9886
|
/**
|
|
9840
|
-
* @typedef {import('./index').InjectAnnotated } InjectAnnotated
|
|
9887
|
+
* @typedef {import('./index.js').InjectAnnotated } InjectAnnotated
|
|
9841
9888
|
*/
|
|
9842
9889
|
|
|
9843
9890
|
/**
|
|
@@ -9907,9 +9954,9 @@
|
|
|
9907
9954
|
}
|
|
9908
9955
|
|
|
9909
9956
|
/**
|
|
9910
|
-
* @typedef { import('./index').ModuleDeclaration } ModuleDeclaration
|
|
9911
|
-
* @typedef { import('./index').ModuleDefinition } ModuleDefinition
|
|
9912
|
-
* @typedef { import('./index').InjectorContext } InjectorContext
|
|
9957
|
+
* @typedef { import('./index.js').ModuleDeclaration } ModuleDeclaration
|
|
9958
|
+
* @typedef { import('./index.js').ModuleDefinition } ModuleDefinition
|
|
9959
|
+
* @typedef { import('./index.js').InjectorContext } InjectorContext
|
|
9913
9960
|
*/
|
|
9914
9961
|
|
|
9915
9962
|
/**
|
|
@@ -10012,11 +10059,20 @@
|
|
|
10012
10059
|
};
|
|
10013
10060
|
}
|
|
10014
10061
|
|
|
10015
|
-
|
|
10062
|
+
/**
|
|
10063
|
+
* Instantiate the given type, injecting dependencies.
|
|
10064
|
+
*
|
|
10065
|
+
* @template T
|
|
10066
|
+
*
|
|
10067
|
+
* @param { Function | [...string[], Function ]} type
|
|
10068
|
+
*
|
|
10069
|
+
* @return T
|
|
10070
|
+
*/
|
|
10071
|
+
function instantiate(type) {
|
|
10016
10072
|
const {
|
|
10017
10073
|
fn,
|
|
10018
10074
|
dependencies
|
|
10019
|
-
} = fnDef(
|
|
10075
|
+
} = fnDef(type);
|
|
10020
10076
|
|
|
10021
10077
|
// instantiate var args constructor
|
|
10022
10078
|
const Constructor = Function.prototype.bind.apply(fn, [ null ].concat(dependencies));
|
|
@@ -10024,6 +10080,17 @@
|
|
|
10024
10080
|
return new Constructor();
|
|
10025
10081
|
}
|
|
10026
10082
|
|
|
10083
|
+
/**
|
|
10084
|
+
* Invoke the given function, injecting dependencies. Return the result.
|
|
10085
|
+
*
|
|
10086
|
+
* @template T
|
|
10087
|
+
*
|
|
10088
|
+
* @param { Function | [...string[], Function ]} func
|
|
10089
|
+
* @param { Object } [context]
|
|
10090
|
+
* @param { Object } [locals]
|
|
10091
|
+
*
|
|
10092
|
+
* @return {T} invocation result
|
|
10093
|
+
*/
|
|
10027
10094
|
function invoke(func, context, locals) {
|
|
10028
10095
|
const {
|
|
10029
10096
|
fn,
|