bpmn-js 15.0.0 → 15.1.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 +153 -21
- package/dist/bpmn-modeler.production.min.js +3 -5
- 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/lib/features/modeling/behavior/NonInterruptingBehavior.d.ts +4 -0
- package/lib/features/modeling/behavior/NonInterruptingBehavior.js +41 -0
- package/lib/features/modeling/behavior/index.js +3 -0
- package/lib/features/modeling/behavior/util/NonInterruptingUtil.d.ts +3 -0
- package/lib/features/modeling/behavior/util/NonInterruptingUtil.js +33 -0
- package/lib/features/popup-menu/ReplaceMenuProvider.js +35 -0
- package/lib/features/popup-menu/util/Icons.d.ts +5 -0
- package/lib/features/popup-menu/util/Icons.js +15 -0
- package/lib/features/replace/BpmnReplace.js +1 -1
- package/lib/features/replace/ReplaceOptions.js +30 -15
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* bpmn-js - bpmn-modeler v15.
|
|
2
|
+
* bpmn-js - bpmn-modeler v15.1.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
|
+
* Date: 2023-11-03
|
|
12
12
|
*/
|
|
13
13
|
(function (global, factory) {
|
|
14
14
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -30446,9 +30446,8 @@
|
|
|
30446
30446
|
onMouseEnter=${ () => setSelectedEntry(entry) }
|
|
30447
30447
|
onMouseLeave=${ () => setSelectedEntry(null) }
|
|
30448
30448
|
>
|
|
30449
|
-
|
|
30450
|
-
|
|
30451
|
-
` : null }
|
|
30449
|
+
${(entry.imageUrl && m$1`<img class="djs-popup-entry-icon" src=${ entry.imageUrl } alt="" />`) ||
|
|
30450
|
+
(entry.imageHtml && m$1`<div class="djs-popup-entry-icon" dangerouslySetInnerHTML=${ { __html: entry.imageHtml } } />`)}
|
|
30452
30451
|
|
|
30453
30452
|
${ entry.label ? m$1`
|
|
30454
30453
|
<span class="djs-popup-label">${ entry.label }</span>
|
|
@@ -40678,6 +40677,73 @@
|
|
|
40678
40677
|
};
|
|
40679
40678
|
}
|
|
40680
40679
|
|
|
40680
|
+
const NON_INTERRUPTING_EVENT_TYPES = [
|
|
40681
|
+
'bpmn:MessageEventDefinition',
|
|
40682
|
+
'bpmn:TimerEventDefinition',
|
|
40683
|
+
'bpmn:EscalationEventDefinition',
|
|
40684
|
+
'bpmn:ConditionalEventDefinition',
|
|
40685
|
+
'bpmn:SignalEventDefinition'
|
|
40686
|
+
];
|
|
40687
|
+
|
|
40688
|
+
function canBeNonInterrupting(shape) {
|
|
40689
|
+
|
|
40690
|
+
const businessObject = getBusinessObject(shape);
|
|
40691
|
+
|
|
40692
|
+
if (
|
|
40693
|
+
!is$1(businessObject, 'bpmn:BoundaryEvent') &&
|
|
40694
|
+
!(is$1(businessObject, 'bpmn:StartEvent') && isEventSubProcess(businessObject.$parent))
|
|
40695
|
+
) {
|
|
40696
|
+
return false;
|
|
40697
|
+
}
|
|
40698
|
+
|
|
40699
|
+
const eventDefinitions = businessObject.get('eventDefinitions');
|
|
40700
|
+
if (!eventDefinitions || !eventDefinitions.length) {
|
|
40701
|
+
return false;
|
|
40702
|
+
}
|
|
40703
|
+
|
|
40704
|
+
return NON_INTERRUPTING_EVENT_TYPES.some(event => is$1(eventDefinitions[0], event));
|
|
40705
|
+
}
|
|
40706
|
+
|
|
40707
|
+
function getInterruptingProperty(shape) {
|
|
40708
|
+
return is$1(shape, 'bpmn:BoundaryEvent') ? 'cancelActivity' : 'isInterrupting';
|
|
40709
|
+
}
|
|
40710
|
+
|
|
40711
|
+
function NonInterruptingBehavior(injector, modeling) {
|
|
40712
|
+
injector.invoke(CommandInterceptor, this);
|
|
40713
|
+
|
|
40714
|
+
this.postExecuted('shape.replace', function(event) {
|
|
40715
|
+
const oldShape = event.context.oldShape;
|
|
40716
|
+
const newShape = event.context.newShape;
|
|
40717
|
+
const hints = event.context.hints;
|
|
40718
|
+
|
|
40719
|
+
if (!canBeNonInterrupting(newShape)) {
|
|
40720
|
+
return;
|
|
40721
|
+
}
|
|
40722
|
+
|
|
40723
|
+
const property = getInterruptingProperty(newShape);
|
|
40724
|
+
const isExplicitChange = hints.targetElement && hints.targetElement[property] !== undefined;
|
|
40725
|
+
|
|
40726
|
+
if (isExplicitChange) {
|
|
40727
|
+
return;
|
|
40728
|
+
}
|
|
40729
|
+
|
|
40730
|
+
const isOldInterrupting = getBusinessObject(oldShape).get(property);
|
|
40731
|
+
const isNewInterruptingDefault = getBusinessObject(newShape).get(property);
|
|
40732
|
+
|
|
40733
|
+
if (isOldInterrupting === isNewInterruptingDefault) {
|
|
40734
|
+
return;
|
|
40735
|
+
}
|
|
40736
|
+
|
|
40737
|
+
modeling.updateProperties(newShape, {
|
|
40738
|
+
[property]: isOldInterrupting
|
|
40739
|
+
});
|
|
40740
|
+
});
|
|
40741
|
+
}
|
|
40742
|
+
|
|
40743
|
+
NonInterruptingBehavior.$inject = [ 'injector', 'modeling' ];
|
|
40744
|
+
|
|
40745
|
+
e$2(NonInterruptingBehavior, CommandInterceptor);
|
|
40746
|
+
|
|
40681
40747
|
/**
|
|
40682
40748
|
* @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
|
|
40683
40749
|
* @typedef {import('../Modeling').default} Modeling
|
|
@@ -42866,6 +42932,7 @@
|
|
|
42866
42932
|
'labelBehavior',
|
|
42867
42933
|
'layoutConnectionBehavior',
|
|
42868
42934
|
'messageFlowBehavior',
|
|
42935
|
+
'nonInterruptingBehavior',
|
|
42869
42936
|
'removeElementBehavior',
|
|
42870
42937
|
'removeEmbeddedLabelBoundsBehavior',
|
|
42871
42938
|
'removeParticipantBehavior',
|
|
@@ -42904,6 +42971,7 @@
|
|
|
42904
42971
|
labelBehavior: [ 'type', LabelBehavior ],
|
|
42905
42972
|
layoutConnectionBehavior: [ 'type', LayoutConnectionBehavior ],
|
|
42906
42973
|
messageFlowBehavior: [ 'type', MessageFlowBehavior ],
|
|
42974
|
+
nonInterruptingBehavior: [ 'type', NonInterruptingBehavior ],
|
|
42907
42975
|
removeElementBehavior: [ 'type', RemoveElementBehavior ],
|
|
42908
42976
|
removeEmbeddedLabelBoundsBehavior: [ 'type', RemoveEmbeddedLabelBoundsBehavior ],
|
|
42909
42977
|
removeParticipantBehavior: [ 'type', RemoveParticipantBehavior ],
|
|
@@ -46471,7 +46539,7 @@
|
|
|
46471
46539
|
newElement.x = element.x + (element.width - newElement.width) / 2;
|
|
46472
46540
|
}
|
|
46473
46541
|
|
|
46474
|
-
return replace.replaceElement(element, newElement, hints);
|
|
46542
|
+
return replace.replaceElement(element, newElement, { ...hints, targetElement });
|
|
46475
46543
|
}
|
|
46476
46544
|
|
|
46477
46545
|
this.replaceElement = replaceElement;
|
|
@@ -57284,7 +57352,8 @@
|
|
|
57284
57352
|
className: 'bpmn-icon-intermediate-event-catch-message',
|
|
57285
57353
|
target: {
|
|
57286
57354
|
type: 'bpmn:BoundaryEvent',
|
|
57287
|
-
eventDefinitionType: 'bpmn:MessageEventDefinition'
|
|
57355
|
+
eventDefinitionType: 'bpmn:MessageEventDefinition',
|
|
57356
|
+
cancelActivity: true
|
|
57288
57357
|
}
|
|
57289
57358
|
},
|
|
57290
57359
|
{
|
|
@@ -57293,7 +57362,8 @@
|
|
|
57293
57362
|
className: 'bpmn-icon-intermediate-event-catch-timer',
|
|
57294
57363
|
target: {
|
|
57295
57364
|
type: 'bpmn:BoundaryEvent',
|
|
57296
|
-
eventDefinitionType: 'bpmn:TimerEventDefinition'
|
|
57365
|
+
eventDefinitionType: 'bpmn:TimerEventDefinition',
|
|
57366
|
+
cancelActivity: true
|
|
57297
57367
|
}
|
|
57298
57368
|
},
|
|
57299
57369
|
{
|
|
@@ -57302,7 +57372,8 @@
|
|
|
57302
57372
|
className: 'bpmn-icon-intermediate-event-catch-escalation',
|
|
57303
57373
|
target: {
|
|
57304
57374
|
type: 'bpmn:BoundaryEvent',
|
|
57305
|
-
eventDefinitionType: 'bpmn:EscalationEventDefinition'
|
|
57375
|
+
eventDefinitionType: 'bpmn:EscalationEventDefinition',
|
|
57376
|
+
cancelActivity: true
|
|
57306
57377
|
}
|
|
57307
57378
|
},
|
|
57308
57379
|
{
|
|
@@ -57311,7 +57382,8 @@
|
|
|
57311
57382
|
className: 'bpmn-icon-intermediate-event-catch-condition',
|
|
57312
57383
|
target: {
|
|
57313
57384
|
type: 'bpmn:BoundaryEvent',
|
|
57314
|
-
eventDefinitionType: 'bpmn:ConditionalEventDefinition'
|
|
57385
|
+
eventDefinitionType: 'bpmn:ConditionalEventDefinition',
|
|
57386
|
+
cancelActivity: true
|
|
57315
57387
|
}
|
|
57316
57388
|
},
|
|
57317
57389
|
{
|
|
@@ -57320,7 +57392,8 @@
|
|
|
57320
57392
|
className: 'bpmn-icon-intermediate-event-catch-error',
|
|
57321
57393
|
target: {
|
|
57322
57394
|
type: 'bpmn:BoundaryEvent',
|
|
57323
|
-
eventDefinitionType: 'bpmn:ErrorEventDefinition'
|
|
57395
|
+
eventDefinitionType: 'bpmn:ErrorEventDefinition',
|
|
57396
|
+
cancelActivity: true
|
|
57324
57397
|
}
|
|
57325
57398
|
},
|
|
57326
57399
|
{
|
|
@@ -57329,7 +57402,8 @@
|
|
|
57329
57402
|
className: 'bpmn-icon-intermediate-event-catch-cancel',
|
|
57330
57403
|
target: {
|
|
57331
57404
|
type: 'bpmn:BoundaryEvent',
|
|
57332
|
-
eventDefinitionType: 'bpmn:CancelEventDefinition'
|
|
57405
|
+
eventDefinitionType: 'bpmn:CancelEventDefinition',
|
|
57406
|
+
cancelActivity: true
|
|
57333
57407
|
}
|
|
57334
57408
|
},
|
|
57335
57409
|
{
|
|
@@ -57338,7 +57412,8 @@
|
|
|
57338
57412
|
className: 'bpmn-icon-intermediate-event-catch-signal',
|
|
57339
57413
|
target: {
|
|
57340
57414
|
type: 'bpmn:BoundaryEvent',
|
|
57341
|
-
eventDefinitionType: 'bpmn:SignalEventDefinition'
|
|
57415
|
+
eventDefinitionType: 'bpmn:SignalEventDefinition',
|
|
57416
|
+
cancelActivity: true
|
|
57342
57417
|
}
|
|
57343
57418
|
},
|
|
57344
57419
|
{
|
|
@@ -57347,7 +57422,8 @@
|
|
|
57347
57422
|
className: 'bpmn-icon-intermediate-event-catch-compensation',
|
|
57348
57423
|
target: {
|
|
57349
57424
|
type: 'bpmn:BoundaryEvent',
|
|
57350
|
-
eventDefinitionType: 'bpmn:CompensateEventDefinition'
|
|
57425
|
+
eventDefinitionType: 'bpmn:CompensateEventDefinition',
|
|
57426
|
+
cancelActivity: true
|
|
57351
57427
|
}
|
|
57352
57428
|
},
|
|
57353
57429
|
{
|
|
@@ -57412,7 +57488,8 @@
|
|
|
57412
57488
|
className: 'bpmn-icon-start-event-message',
|
|
57413
57489
|
target: {
|
|
57414
57490
|
type: 'bpmn:StartEvent',
|
|
57415
|
-
eventDefinitionType: 'bpmn:MessageEventDefinition'
|
|
57491
|
+
eventDefinitionType: 'bpmn:MessageEventDefinition',
|
|
57492
|
+
isInterrupting: true
|
|
57416
57493
|
}
|
|
57417
57494
|
},
|
|
57418
57495
|
{
|
|
@@ -57421,7 +57498,8 @@
|
|
|
57421
57498
|
className: 'bpmn-icon-start-event-timer',
|
|
57422
57499
|
target: {
|
|
57423
57500
|
type: 'bpmn:StartEvent',
|
|
57424
|
-
eventDefinitionType: 'bpmn:TimerEventDefinition'
|
|
57501
|
+
eventDefinitionType: 'bpmn:TimerEventDefinition',
|
|
57502
|
+
isInterrupting: true
|
|
57425
57503
|
}
|
|
57426
57504
|
},
|
|
57427
57505
|
{
|
|
@@ -57430,7 +57508,8 @@
|
|
|
57430
57508
|
className: 'bpmn-icon-start-event-condition',
|
|
57431
57509
|
target: {
|
|
57432
57510
|
type: 'bpmn:StartEvent',
|
|
57433
|
-
eventDefinitionType: 'bpmn:ConditionalEventDefinition'
|
|
57511
|
+
eventDefinitionType: 'bpmn:ConditionalEventDefinition',
|
|
57512
|
+
isInterrupting: true
|
|
57434
57513
|
}
|
|
57435
57514
|
},
|
|
57436
57515
|
{
|
|
@@ -57439,7 +57518,8 @@
|
|
|
57439
57518
|
className: 'bpmn-icon-start-event-signal',
|
|
57440
57519
|
target: {
|
|
57441
57520
|
type: 'bpmn:StartEvent',
|
|
57442
|
-
eventDefinitionType: 'bpmn:SignalEventDefinition'
|
|
57521
|
+
eventDefinitionType: 'bpmn:SignalEventDefinition',
|
|
57522
|
+
isInterrupting: true
|
|
57443
57523
|
}
|
|
57444
57524
|
},
|
|
57445
57525
|
{
|
|
@@ -57448,7 +57528,8 @@
|
|
|
57448
57528
|
className: 'bpmn-icon-start-event-error',
|
|
57449
57529
|
target: {
|
|
57450
57530
|
type: 'bpmn:StartEvent',
|
|
57451
|
-
eventDefinitionType: 'bpmn:ErrorEventDefinition'
|
|
57531
|
+
eventDefinitionType: 'bpmn:ErrorEventDefinition',
|
|
57532
|
+
isInterrupting: true
|
|
57452
57533
|
}
|
|
57453
57534
|
},
|
|
57454
57535
|
{
|
|
@@ -57457,7 +57538,8 @@
|
|
|
57457
57538
|
className: 'bpmn-icon-start-event-escalation',
|
|
57458
57539
|
target: {
|
|
57459
57540
|
type: 'bpmn:StartEvent',
|
|
57460
|
-
eventDefinitionType: 'bpmn:EscalationEventDefinition'
|
|
57541
|
+
eventDefinitionType: 'bpmn:EscalationEventDefinition',
|
|
57542
|
+
isInterrupting: true
|
|
57461
57543
|
}
|
|
57462
57544
|
},
|
|
57463
57545
|
{
|
|
@@ -57466,7 +57548,8 @@
|
|
|
57466
57548
|
className: 'bpmn-icon-start-event-compensation',
|
|
57467
57549
|
target: {
|
|
57468
57550
|
type: 'bpmn:StartEvent',
|
|
57469
|
-
eventDefinitionType: 'bpmn:CompensateEventDefinition'
|
|
57551
|
+
eventDefinitionType: 'bpmn:CompensateEventDefinition',
|
|
57552
|
+
isInterrupting: true
|
|
57470
57553
|
}
|
|
57471
57554
|
},
|
|
57472
57555
|
{
|
|
@@ -57576,6 +57659,22 @@
|
|
|
57576
57659
|
}
|
|
57577
57660
|
];
|
|
57578
57661
|
|
|
57662
|
+
var Icons = {
|
|
57663
|
+
'start-event-non-interrupting': `
|
|
57664
|
+
<svg viewBox="0 0 2048 2048" xmlns="http://www.w3.org/2000/svg">
|
|
57665
|
+
<g transform="translate(0 995.64)">
|
|
57666
|
+
<path d="m1899 28.357c21.545 567.43-598.38 1023.5-1133.6 835.92-548.09-147.21-801.57-873.95-463.59-1330 302.62-480.3 1071.7-507.54 1407.6-49.847 122.14 153.12 190.07 348.07 189.59 543.91z" fill="none" stroke="currentColor" stroke-dasharray="418.310422, 361.2328165" stroke-linecap="round" stroke-width="100"/>
|
|
57667
|
+
</g>
|
|
57668
|
+
</svg>`,
|
|
57669
|
+
'intermediate-event-non-interrupting': `
|
|
57670
|
+
<svg viewBox="0 0 2048 2048" xmlns="http://www.w3.org/2000/svg">
|
|
57671
|
+
<g transform="translate(0 995.64)" fill="none" stroke="currentColor" stroke-linecap="round">
|
|
57672
|
+
<circle cx="1024" cy="28.357" r="875" stroke-dasharray="418.310422, 361.2328165" stroke-width="100"/>
|
|
57673
|
+
<circle cx="1024" cy="28.357" r="685" stroke-dasharray="348.31044857,261.23283643" stroke-dashoffset="500" stroke-width="100"/>
|
|
57674
|
+
</g>
|
|
57675
|
+
</svg>`
|
|
57676
|
+
};
|
|
57677
|
+
|
|
57579
57678
|
/**
|
|
57580
57679
|
* @typedef {import('../modeling/BpmnFactory').default} BpmnFactory
|
|
57581
57680
|
* @typedef {import('diagram-js/lib/features/popup-menu/PopupMenu').default} PopupMenu
|
|
@@ -57871,6 +57970,13 @@
|
|
|
57871
57970
|
};
|
|
57872
57971
|
}
|
|
57873
57972
|
|
|
57973
|
+
if (canBeNonInterrupting(target)) {
|
|
57974
|
+
headerEntries = {
|
|
57975
|
+
...headerEntries,
|
|
57976
|
+
...this._getNonInterruptingHeaderEntries(target)
|
|
57977
|
+
};
|
|
57978
|
+
}
|
|
57979
|
+
|
|
57874
57980
|
return headerEntries;
|
|
57875
57981
|
};
|
|
57876
57982
|
|
|
@@ -58200,6 +58306,32 @@
|
|
|
58200
58306
|
};
|
|
58201
58307
|
};
|
|
58202
58308
|
|
|
58309
|
+
|
|
58310
|
+
ReplaceMenuProvider.prototype._getNonInterruptingHeaderEntries = function(element) {
|
|
58311
|
+
const translate = this._translate;
|
|
58312
|
+
const businessObject = getBusinessObject(element);
|
|
58313
|
+
const self = this;
|
|
58314
|
+
|
|
58315
|
+
const interruptingProperty = getInterruptingProperty(element);
|
|
58316
|
+
|
|
58317
|
+
const icon = is$1(element, 'bpmn:BoundaryEvent') ? Icons['intermediate-event-non-interrupting'] : Icons['start-event-non-interrupting'];
|
|
58318
|
+
|
|
58319
|
+
const isNonInterrupting = !businessObject[interruptingProperty];
|
|
58320
|
+
|
|
58321
|
+
return {
|
|
58322
|
+
'toggle-non-interrupting': {
|
|
58323
|
+
imageHtml: icon,
|
|
58324
|
+
title: translate('Toggle Non-Interrupting'),
|
|
58325
|
+
active: isNonInterrupting,
|
|
58326
|
+
action: function() {
|
|
58327
|
+
self._modeling.updateProperties(element, {
|
|
58328
|
+
[interruptingProperty]: !!isNonInterrupting
|
|
58329
|
+
});
|
|
58330
|
+
}
|
|
58331
|
+
}
|
|
58332
|
+
};
|
|
58333
|
+
};
|
|
58334
|
+
|
|
58203
58335
|
var PopupMenuModule = {
|
|
58204
58336
|
__depends__: [
|
|
58205
58337
|
PopupMenuModule$1,
|