bpmn-js 18.1.2 → 18.3.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 +336 -78
- package/dist/bpmn-modeler.production.min.js +11 -11
- package/dist/bpmn-navigated-viewer.development.js +4 -4
- 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 +3 -3
- package/lib/BaseViewer.js +2 -2
- package/lib/features/popup-menu/ReplaceMenuProvider.js +52 -73
- package/lib/features/replace/BpmnReplace.js +1 -1
- package/lib/features/replace/ReplaceOptions.d.ts +10 -0
- package/lib/features/replace/ReplaceOptions.js +279 -0
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* bpmn-js - bpmn-modeler v18.
|
|
2
|
+
* bpmn-js - bpmn-modeler v18.3.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:
|
|
11
|
+
* Date: 2025-02-18
|
|
12
12
|
*/
|
|
13
13
|
(function (global, factory) {
|
|
14
14
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -17231,13 +17231,13 @@
|
|
|
17231
17231
|
*/
|
|
17232
17232
|
this._container = this._createContainer(options);
|
|
17233
17233
|
|
|
17234
|
+
this._init(this._container, this._moddle, options);
|
|
17235
|
+
|
|
17234
17236
|
/* <project-logo> */
|
|
17235
17237
|
|
|
17236
17238
|
addProjectLogo(this._container);
|
|
17237
17239
|
|
|
17238
17240
|
/* </project-logo> */
|
|
17239
|
-
|
|
17240
|
-
this._init(this._container, this._moddle, options);
|
|
17241
17241
|
}
|
|
17242
17242
|
|
|
17243
17243
|
e$2(BaseViewer, Diagram);
|
|
@@ -44806,7 +44806,7 @@
|
|
|
44806
44806
|
var type = targetElement.type,
|
|
44807
44807
|
oldBusinessObject = element.businessObject;
|
|
44808
44808
|
|
|
44809
|
-
if (isSubProcess(oldBusinessObject) && type === 'bpmn:SubProcess') {
|
|
44809
|
+
if (isSubProcess(oldBusinessObject) && (type === 'bpmn:SubProcess' || type === 'bpmn:AdHocSubProcess')) {
|
|
44810
44810
|
if (shouldToggleCollapsed(element, targetElement)) {
|
|
44811
44811
|
|
|
44812
44812
|
// expanding or collapsing process
|
|
@@ -55744,6 +55744,15 @@
|
|
|
55744
55744
|
isExpanded: true
|
|
55745
55745
|
}
|
|
55746
55746
|
},
|
|
55747
|
+
{
|
|
55748
|
+
label: 'Ad-hoc sub-process',
|
|
55749
|
+
actionName: 'replace-with-ad-hoc-subprocess',
|
|
55750
|
+
className: 'bpmn-icon-subprocess-expanded',
|
|
55751
|
+
target: {
|
|
55752
|
+
type: 'bpmn:AdHocSubProcess',
|
|
55753
|
+
isExpanded: true
|
|
55754
|
+
}
|
|
55755
|
+
},
|
|
55747
55756
|
{
|
|
55748
55757
|
label: 'Sub-process (collapsed)',
|
|
55749
55758
|
actionName: 'replace-with-collapsed-subprocess',
|
|
@@ -55755,6 +55764,49 @@
|
|
|
55755
55764
|
}
|
|
55756
55765
|
];
|
|
55757
55766
|
|
|
55767
|
+
/**
|
|
55768
|
+
* @type {ReplaceOption[]}
|
|
55769
|
+
*/
|
|
55770
|
+
var AD_HOC_SUBPROCESS_EXPANDED = [
|
|
55771
|
+
{
|
|
55772
|
+
label: 'Sub-process',
|
|
55773
|
+
actionName: 'replace-with-subprocess',
|
|
55774
|
+
className: 'bpmn-icon-subprocess-expanded',
|
|
55775
|
+
target: {
|
|
55776
|
+
type: 'bpmn:SubProcess',
|
|
55777
|
+
isExpanded: true
|
|
55778
|
+
}
|
|
55779
|
+
},
|
|
55780
|
+
{
|
|
55781
|
+
label: 'Transaction',
|
|
55782
|
+
actionName: 'replace-with-transaction',
|
|
55783
|
+
className: 'bpmn-icon-transaction',
|
|
55784
|
+
target: {
|
|
55785
|
+
type: 'bpmn:Transaction',
|
|
55786
|
+
isExpanded: true
|
|
55787
|
+
}
|
|
55788
|
+
},
|
|
55789
|
+
{
|
|
55790
|
+
label: 'Event sub-process',
|
|
55791
|
+
actionName: 'replace-with-event-subprocess',
|
|
55792
|
+
className: 'bpmn-icon-event-subprocess-expanded',
|
|
55793
|
+
target: {
|
|
55794
|
+
type: 'bpmn:SubProcess',
|
|
55795
|
+
triggeredByEvent: true,
|
|
55796
|
+
isExpanded: true
|
|
55797
|
+
}
|
|
55798
|
+
},
|
|
55799
|
+
{
|
|
55800
|
+
label: 'Ad-hoc sub-process (collapsed)',
|
|
55801
|
+
actionName: 'replace-with-collapsed-ad-hoc-subprocess',
|
|
55802
|
+
className: 'bpmn-icon-subprocess-collapsed',
|
|
55803
|
+
target: {
|
|
55804
|
+
type: 'bpmn:AdHocSubProcess',
|
|
55805
|
+
isExpanded: false
|
|
55806
|
+
}
|
|
55807
|
+
}
|
|
55808
|
+
];
|
|
55809
|
+
|
|
55758
55810
|
/**
|
|
55759
55811
|
* @type {ReplaceOption[]}
|
|
55760
55812
|
*/
|
|
@@ -55777,6 +55829,15 @@
|
|
|
55777
55829
|
isExpanded: true
|
|
55778
55830
|
}
|
|
55779
55831
|
},
|
|
55832
|
+
{
|
|
55833
|
+
label: 'Ad-hoc sub-process',
|
|
55834
|
+
actionName: 'replace-with-ad-hoc-subprocess',
|
|
55835
|
+
className: 'bpmn-icon-subprocess-expanded',
|
|
55836
|
+
target: {
|
|
55837
|
+
type: 'bpmn:AdHocSubProcess',
|
|
55838
|
+
isExpanded: true
|
|
55839
|
+
}
|
|
55840
|
+
},
|
|
55780
55841
|
{
|
|
55781
55842
|
label: 'Event sub-process',
|
|
55782
55843
|
actionName: 'replace-with-event-subprocess',
|
|
@@ -55887,6 +55948,24 @@
|
|
|
55887
55948
|
type: 'bpmn:SubProcess',
|
|
55888
55949
|
isExpanded: true
|
|
55889
55950
|
}
|
|
55951
|
+
},
|
|
55952
|
+
{
|
|
55953
|
+
label: 'Ad-hoc sub-process (collapsed)',
|
|
55954
|
+
actionName: 'replace-with-collapsed-ad-hoc-subprocess',
|
|
55955
|
+
className: 'bpmn-icon-subprocess-collapsed',
|
|
55956
|
+
target: {
|
|
55957
|
+
type: 'bpmn:AdHocSubProcess',
|
|
55958
|
+
isExpanded: false
|
|
55959
|
+
}
|
|
55960
|
+
},
|
|
55961
|
+
{
|
|
55962
|
+
label: 'Ad-hoc sub-process (expanded)',
|
|
55963
|
+
actionName: 'replace-with-ad-hoc-subprocess',
|
|
55964
|
+
className: 'bpmn-icon-subprocess-expanded',
|
|
55965
|
+
target: {
|
|
55966
|
+
type: 'bpmn:AdHocSubProcess',
|
|
55967
|
+
isExpanded: true
|
|
55968
|
+
}
|
|
55890
55969
|
}
|
|
55891
55970
|
];
|
|
55892
55971
|
|
|
@@ -56235,6 +56314,206 @@
|
|
|
56235
56314
|
}
|
|
56236
56315
|
];
|
|
56237
56316
|
|
|
56317
|
+
/**
|
|
56318
|
+
* @type {{ [key: string]: ReplaceOption[]}}
|
|
56319
|
+
*/
|
|
56320
|
+
var TYPED_EVENT = {
|
|
56321
|
+
'bpmn:MessageEventDefinition': [
|
|
56322
|
+
{
|
|
56323
|
+
label: 'Message start event',
|
|
56324
|
+
actionName: 'replace-with-message-start',
|
|
56325
|
+
className: 'bpmn-icon-start-event-message',
|
|
56326
|
+
target: {
|
|
56327
|
+
type: 'bpmn:StartEvent',
|
|
56328
|
+
eventDefinitionType: 'bpmn:MessageEventDefinition'
|
|
56329
|
+
}
|
|
56330
|
+
},
|
|
56331
|
+
{
|
|
56332
|
+
label: 'Message intermediate catch event',
|
|
56333
|
+
actionName: 'replace-with-message-intermediate-catch',
|
|
56334
|
+
className: 'bpmn-icon-intermediate-event-catch-message',
|
|
56335
|
+
target: {
|
|
56336
|
+
type: 'bpmn:IntermediateCatchEvent',
|
|
56337
|
+
eventDefinitionType: 'bpmn:MessageEventDefinition'
|
|
56338
|
+
}
|
|
56339
|
+
},
|
|
56340
|
+
{
|
|
56341
|
+
label: 'Message intermediate throw event',
|
|
56342
|
+
actionName: 'replace-with-message-intermediate-throw',
|
|
56343
|
+
className: 'bpmn-icon-intermediate-event-throw-message',
|
|
56344
|
+
target: {
|
|
56345
|
+
type: 'bpmn:IntermediateThrowEvent',
|
|
56346
|
+
eventDefinitionType: 'bpmn:MessageEventDefinition'
|
|
56347
|
+
}
|
|
56348
|
+
},
|
|
56349
|
+
{
|
|
56350
|
+
label: 'Message end event',
|
|
56351
|
+
actionName: 'replace-with-message-end',
|
|
56352
|
+
className: 'bpmn-icon-end-event-message',
|
|
56353
|
+
target: {
|
|
56354
|
+
type: 'bpmn:EndEvent',
|
|
56355
|
+
eventDefinitionType: 'bpmn:MessageEventDefinition'
|
|
56356
|
+
}
|
|
56357
|
+
}
|
|
56358
|
+
],
|
|
56359
|
+
'bpmn:TimerEventDefinition': [
|
|
56360
|
+
{
|
|
56361
|
+
label: 'Timer start event',
|
|
56362
|
+
actionName: 'replace-with-timer-start',
|
|
56363
|
+
className: 'bpmn-icon-start-event-timer',
|
|
56364
|
+
target: {
|
|
56365
|
+
type: 'bpmn:StartEvent',
|
|
56366
|
+
eventDefinitionType: 'bpmn:TimerEventDefinition'
|
|
56367
|
+
}
|
|
56368
|
+
},
|
|
56369
|
+
{
|
|
56370
|
+
label: 'Timer intermediate catch event',
|
|
56371
|
+
actionName: 'replace-with-timer-intermediate-catch',
|
|
56372
|
+
className: 'bpmn-icon-intermediate-event-catch-timer',
|
|
56373
|
+
target: {
|
|
56374
|
+
type: 'bpmn:IntermediateCatchEvent',
|
|
56375
|
+
eventDefinitionType: 'bpmn:TimerEventDefinition'
|
|
56376
|
+
}
|
|
56377
|
+
}
|
|
56378
|
+
],
|
|
56379
|
+
'bpmn:ConditionalEventDefinition': [
|
|
56380
|
+
{
|
|
56381
|
+
label: 'Conditional start event',
|
|
56382
|
+
actionName: 'replace-with-conditional-start',
|
|
56383
|
+
className: 'bpmn-icon-start-event-condition',
|
|
56384
|
+
target: {
|
|
56385
|
+
type: 'bpmn:StartEvent',
|
|
56386
|
+
eventDefinitionType: 'bpmn:ConditionalEventDefinition'
|
|
56387
|
+
}
|
|
56388
|
+
},
|
|
56389
|
+
{
|
|
56390
|
+
label: 'Conditional intermediate catch event',
|
|
56391
|
+
actionName: 'replace-with-conditional-intermediate-catch',
|
|
56392
|
+
className: 'bpmn-icon-intermediate-event-catch-condition',
|
|
56393
|
+
target: {
|
|
56394
|
+
type: 'bpmn:IntermediateCatchEvent',
|
|
56395
|
+
eventDefinitionType: 'bpmn:ConditionalEventDefinition'
|
|
56396
|
+
}
|
|
56397
|
+
}
|
|
56398
|
+
],
|
|
56399
|
+
'bpmn:SignalEventDefinition': [
|
|
56400
|
+
{
|
|
56401
|
+
label: 'Signal start event',
|
|
56402
|
+
actionName: 'replace-with-signal-start',
|
|
56403
|
+
className: 'bpmn-icon-start-event-signal',
|
|
56404
|
+
target: {
|
|
56405
|
+
type: 'bpmn:StartEvent',
|
|
56406
|
+
eventDefinitionType: 'bpmn:SignalEventDefinition'
|
|
56407
|
+
}
|
|
56408
|
+
},
|
|
56409
|
+
{
|
|
56410
|
+
label: 'Signal intermediate catch event',
|
|
56411
|
+
actionName: 'replace-with-signal-intermediate-catch',
|
|
56412
|
+
className: 'bpmn-icon-intermediate-event-catch-signal',
|
|
56413
|
+
target: {
|
|
56414
|
+
type: 'bpmn:IntermediateCatchEvent',
|
|
56415
|
+
eventDefinitionType: 'bpmn:SignalEventDefinition'
|
|
56416
|
+
}
|
|
56417
|
+
},
|
|
56418
|
+
{
|
|
56419
|
+
label: 'Signal intermediate throw event',
|
|
56420
|
+
actionName: 'replace-with-signal-intermediate-throw',
|
|
56421
|
+
className: 'bpmn-icon-intermediate-event-throw-signal',
|
|
56422
|
+
target: {
|
|
56423
|
+
type: 'bpmn:IntermediateThrowEvent',
|
|
56424
|
+
eventDefinitionType: 'bpmn:SignalEventDefinition'
|
|
56425
|
+
}
|
|
56426
|
+
},
|
|
56427
|
+
{
|
|
56428
|
+
label: 'Signal end event',
|
|
56429
|
+
actionName: 'replace-with-signal-end',
|
|
56430
|
+
className: 'bpmn-icon-end-event-signal',
|
|
56431
|
+
target: {
|
|
56432
|
+
type: 'bpmn:EndEvent',
|
|
56433
|
+
eventDefinitionType: 'bpmn:SignalEventDefinition'
|
|
56434
|
+
}
|
|
56435
|
+
}
|
|
56436
|
+
],
|
|
56437
|
+
'bpmn:ErrorEventDefinition': [
|
|
56438
|
+
{
|
|
56439
|
+
label: 'Error start event',
|
|
56440
|
+
actionName: 'replace-with-error-start',
|
|
56441
|
+
className: 'bpmn-icon-start-event-error',
|
|
56442
|
+
target: {
|
|
56443
|
+
type: 'bpmn:StartEvent',
|
|
56444
|
+
eventDefinitionType: 'bpmn:ErrorEventDefinition'
|
|
56445
|
+
}
|
|
56446
|
+
},
|
|
56447
|
+
{
|
|
56448
|
+
label: 'Error end event',
|
|
56449
|
+
actionName: 'replace-with-error-end',
|
|
56450
|
+
className: 'bpmn-icon-end-event-error',
|
|
56451
|
+
target: {
|
|
56452
|
+
type: 'bpmn:EndEvent',
|
|
56453
|
+
eventDefinitionType: 'bpmn:ErrorEventDefinition'
|
|
56454
|
+
}
|
|
56455
|
+
}
|
|
56456
|
+
],
|
|
56457
|
+
'bpmn:EscalationEventDefinition': [
|
|
56458
|
+
{
|
|
56459
|
+
label: 'Escalation start event',
|
|
56460
|
+
actionName: 'replace-with-escalation-start',
|
|
56461
|
+
className: 'bpmn-icon-start-event-escalation',
|
|
56462
|
+
target: {
|
|
56463
|
+
type: 'bpmn:StartEvent',
|
|
56464
|
+
eventDefinitionType: 'bpmn:EscalationEventDefinition'
|
|
56465
|
+
}
|
|
56466
|
+
},
|
|
56467
|
+
{
|
|
56468
|
+
label: 'Escalation intermediate throw event',
|
|
56469
|
+
actionName: 'replace-with-escalation-intermediate-throw',
|
|
56470
|
+
className: 'bpmn-icon-intermediate-event-throw-escalation',
|
|
56471
|
+
target: {
|
|
56472
|
+
type: 'bpmn:IntermediateThrowEvent',
|
|
56473
|
+
eventDefinitionType: 'bpmn:EscalationEventDefinition'
|
|
56474
|
+
}
|
|
56475
|
+
},
|
|
56476
|
+
{
|
|
56477
|
+
label: 'Escalation end event',
|
|
56478
|
+
actionName: 'replace-with-escalation-end',
|
|
56479
|
+
className: 'bpmn-icon-end-event-escalation',
|
|
56480
|
+
target: {
|
|
56481
|
+
type: 'bpmn:EndEvent',
|
|
56482
|
+
eventDefinitionType: 'bpmn:EscalationEventDefinition'
|
|
56483
|
+
}
|
|
56484
|
+
}
|
|
56485
|
+
],
|
|
56486
|
+
'bpmn:CompensateEventDefinition': [
|
|
56487
|
+
{
|
|
56488
|
+
label: 'Compensation start event',
|
|
56489
|
+
actionName: 'replace-with-compensation-start',
|
|
56490
|
+
className: 'bpmn-icon-start-event-compensation',
|
|
56491
|
+
target: {
|
|
56492
|
+
type: 'bpmn:StartEvent',
|
|
56493
|
+
eventDefinitionType: 'bpmn:CompensateEventDefinition'
|
|
56494
|
+
}
|
|
56495
|
+
},
|
|
56496
|
+
{
|
|
56497
|
+
label: 'Compensation intermediate throw event',
|
|
56498
|
+
actionName: 'replace-with-compensation-intermediate-throw',
|
|
56499
|
+
className: 'bpmn-icon-intermediate-event-throw-compensation',
|
|
56500
|
+
target: {
|
|
56501
|
+
type: 'bpmn:IntermediateThrowEvent',
|
|
56502
|
+
eventDefinitionType: 'bpmn:CompensateEventDefinition'
|
|
56503
|
+
}
|
|
56504
|
+
},
|
|
56505
|
+
{
|
|
56506
|
+
label: 'Compensation end event',
|
|
56507
|
+
actionName: 'replace-with-compensation-end',
|
|
56508
|
+
className: 'bpmn-icon-end-event-compensation',
|
|
56509
|
+
target: {
|
|
56510
|
+
type: 'bpmn:EndEvent',
|
|
56511
|
+
eventDefinitionType: 'bpmn:CompensateEventDefinition'
|
|
56512
|
+
}
|
|
56513
|
+
}
|
|
56514
|
+
]
|
|
56515
|
+
};
|
|
56516
|
+
|
|
56238
56517
|
var Icons = {
|
|
56239
56518
|
'start-event-non-interrupting': `
|
|
56240
56519
|
<svg viewBox="0 0 2048 2048" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -56329,6 +56608,9 @@
|
|
|
56329
56608
|
|
|
56330
56609
|
var rules = this._rules;
|
|
56331
56610
|
|
|
56611
|
+
var sameTypeEventOptions = [],
|
|
56612
|
+
eventDefinitionType;
|
|
56613
|
+
|
|
56332
56614
|
var filteredReplaceOptions = [];
|
|
56333
56615
|
|
|
56334
56616
|
if (isArray$3(target) || !rules.allowed('shape.replace', { element: target })) {
|
|
@@ -56345,10 +56627,26 @@
|
|
|
56345
56627
|
return this._createEntries(target, DATA_STORE_REFERENCE);
|
|
56346
56628
|
}
|
|
56347
56629
|
|
|
56630
|
+
// typed start, intermediate, and end events
|
|
56631
|
+
if (is$1(businessObject, 'bpmn:Event') && !is$1(businessObject, 'bpmn:BoundaryEvent')) {
|
|
56632
|
+
eventDefinitionType = businessObject.get('eventDefinitions')[0]?.$type;
|
|
56633
|
+
|
|
56634
|
+
sameTypeEventOptions = TYPED_EVENT[eventDefinitionType] || [];
|
|
56635
|
+
|
|
56636
|
+
if (!isEventSubProcess(businessObject.$parent) && is$1(businessObject.$parent, 'bpmn:SubProcess')) {
|
|
56637
|
+
sameTypeEventOptions = filter(sameTypeEventOptions, function(option) {
|
|
56638
|
+
return option.target.type !== 'bpmn:StartEvent';
|
|
56639
|
+
});
|
|
56640
|
+
}
|
|
56641
|
+
}
|
|
56642
|
+
|
|
56348
56643
|
// start events outside sub processes
|
|
56349
56644
|
if (is$1(businessObject, 'bpmn:StartEvent') && !is$1(businessObject.$parent, 'bpmn:SubProcess')) {
|
|
56350
56645
|
|
|
56351
|
-
filteredReplaceOptions = filter(
|
|
56646
|
+
filteredReplaceOptions = filter(
|
|
56647
|
+
START_EVENT.concat(sameTypeEventOptions),
|
|
56648
|
+
differentType
|
|
56649
|
+
);
|
|
56352
56650
|
|
|
56353
56651
|
return this._createEntries(target, filteredReplaceOptions);
|
|
56354
56652
|
}
|
|
@@ -56365,18 +56663,20 @@
|
|
|
56365
56663
|
|
|
56366
56664
|
// start events inside event sub processes
|
|
56367
56665
|
if (is$1(businessObject, 'bpmn:StartEvent') && isEventSubProcess(businessObject.$parent)) {
|
|
56368
|
-
filteredReplaceOptions = filter(
|
|
56666
|
+
filteredReplaceOptions = filter(
|
|
56667
|
+
EVENT_SUB_PROCESS_START_EVENT.concat(sameTypeEventOptions), function(replaceOption) {
|
|
56369
56668
|
|
|
56370
|
-
|
|
56669
|
+
var target = replaceOption.target;
|
|
56371
56670
|
|
|
56372
|
-
|
|
56671
|
+
var isInterrupting = target.isInterrupting !== false;
|
|
56373
56672
|
|
|
56374
|
-
|
|
56673
|
+
var isInterruptingEqual = businessObject.isInterrupting === isInterrupting;
|
|
56375
56674
|
|
|
56376
|
-
|
|
56377
|
-
|
|
56675
|
+
// filters elements which types and event definition are equal but have have different interrupting types
|
|
56676
|
+
return differentType(replaceOption) || !differentType(replaceOption) && !isInterruptingEqual;
|
|
56378
56677
|
|
|
56379
|
-
|
|
56678
|
+
}
|
|
56679
|
+
);
|
|
56380
56680
|
|
|
56381
56681
|
return this._createEntries(target, filteredReplaceOptions);
|
|
56382
56682
|
}
|
|
@@ -56384,7 +56684,10 @@
|
|
|
56384
56684
|
// start events inside sub processes
|
|
56385
56685
|
if (is$1(businessObject, 'bpmn:StartEvent') && !isEventSubProcess(businessObject.$parent)
|
|
56386
56686
|
&& is$1(businessObject.$parent, 'bpmn:SubProcess')) {
|
|
56387
|
-
filteredReplaceOptions = filter(
|
|
56687
|
+
filteredReplaceOptions = filter(
|
|
56688
|
+
START_EVENT_SUB_PROCESS.concat(sameTypeEventOptions),
|
|
56689
|
+
differentType
|
|
56690
|
+
);
|
|
56388
56691
|
|
|
56389
56692
|
return this._createEntries(target, filteredReplaceOptions);
|
|
56390
56693
|
}
|
|
@@ -56392,7 +56695,7 @@
|
|
|
56392
56695
|
// end events
|
|
56393
56696
|
if (is$1(businessObject, 'bpmn:EndEvent')) {
|
|
56394
56697
|
|
|
56395
|
-
filteredReplaceOptions = filter(END_EVENT, function(replaceOption) {
|
|
56698
|
+
filteredReplaceOptions = filter(END_EVENT.concat(sameTypeEventOptions), function(replaceOption) {
|
|
56396
56699
|
var target = replaceOption.target;
|
|
56397
56700
|
|
|
56398
56701
|
// hide cancel end events outside transactions
|
|
@@ -56431,7 +56734,10 @@
|
|
|
56431
56734
|
if (is$1(businessObject, 'bpmn:IntermediateCatchEvent') ||
|
|
56432
56735
|
is$1(businessObject, 'bpmn:IntermediateThrowEvent')) {
|
|
56433
56736
|
|
|
56434
|
-
filteredReplaceOptions = filter(
|
|
56737
|
+
filteredReplaceOptions = filter(
|
|
56738
|
+
INTERMEDIATE_EVENT.concat(sameTypeEventOptions),
|
|
56739
|
+
differentType
|
|
56740
|
+
);
|
|
56435
56741
|
|
|
56436
56742
|
return this._createEntries(target, filteredReplaceOptions);
|
|
56437
56743
|
}
|
|
@@ -56460,6 +56766,14 @@
|
|
|
56460
56766
|
return this._createEntries(target, filteredReplaceOptions);
|
|
56461
56767
|
}
|
|
56462
56768
|
|
|
56769
|
+
// expanded ad hoc sub processes
|
|
56770
|
+
if (is$1(businessObject, 'bpmn:AdHocSubProcess') && isExpanded(target)) {
|
|
56771
|
+
|
|
56772
|
+
filteredReplaceOptions = filter(AD_HOC_SUBPROCESS_EXPANDED, differentType);
|
|
56773
|
+
|
|
56774
|
+
return this._createEntries(target, filteredReplaceOptions);
|
|
56775
|
+
}
|
|
56776
|
+
|
|
56463
56777
|
// expanded sub processes
|
|
56464
56778
|
if (is$1(businessObject, 'bpmn:SubProcess') && isExpanded(target)) {
|
|
56465
56779
|
|
|
@@ -56468,18 +56782,16 @@
|
|
|
56468
56782
|
return this._createEntries(target, filteredReplaceOptions);
|
|
56469
56783
|
}
|
|
56470
56784
|
|
|
56471
|
-
// collapsed ad hoc sub
|
|
56472
|
-
if (is$1(businessObject, 'bpmn:
|
|
56785
|
+
// collapsed sub process or collapsed ad hoc sub process
|
|
56786
|
+
if (is$1(businessObject, 'bpmn:SubProcess') && !isExpanded(target)) {
|
|
56473
56787
|
|
|
56474
56788
|
filteredReplaceOptions = filter(TASK, function(replaceOption) {
|
|
56475
56789
|
|
|
56476
|
-
var
|
|
56477
|
-
|
|
56478
|
-
var isTargetSubProcess = target.type === 'bpmn:SubProcess';
|
|
56790
|
+
var isTargetSameType = replaceOption.target.type === target.type;
|
|
56791
|
+
var isTargetExpanded = replaceOption.target.isExpanded === true;
|
|
56479
56792
|
|
|
56480
|
-
|
|
56481
|
-
|
|
56482
|
-
return isDifferentType(target) && (!isTargetSubProcess || isTargetExpanded);
|
|
56793
|
+
// Collapsed subprocess cannot be replaced with itself or expanded subprocess of different type.
|
|
56794
|
+
return isTargetSameType === isTargetExpanded;
|
|
56483
56795
|
});
|
|
56484
56796
|
|
|
56485
56797
|
return this._createEntries(target, filteredReplaceOptions);
|
|
@@ -56494,13 +56806,6 @@
|
|
|
56494
56806
|
if (is$1(businessObject, 'bpmn:FlowNode')) {
|
|
56495
56807
|
filteredReplaceOptions = filter(TASK, differentType);
|
|
56496
56808
|
|
|
56497
|
-
// collapsed sub process cannot be replaced with itself
|
|
56498
|
-
if (is$1(businessObject, 'bpmn:SubProcess') && !isExpanded(target)) {
|
|
56499
|
-
filteredReplaceOptions = filter(filteredReplaceOptions, function(replaceOption) {
|
|
56500
|
-
return replaceOption.label !== 'Sub-process (collapsed)';
|
|
56501
|
-
});
|
|
56502
|
-
}
|
|
56503
|
-
|
|
56504
56809
|
return this._createEntries(target, filteredReplaceOptions);
|
|
56505
56810
|
}
|
|
56506
56811
|
|
|
@@ -56537,15 +56842,6 @@
|
|
|
56537
56842
|
};
|
|
56538
56843
|
}
|
|
56539
56844
|
|
|
56540
|
-
if (is$1(target, 'bpmn:SubProcess') &&
|
|
56541
|
-
!is$1(target, 'bpmn:Transaction') &&
|
|
56542
|
-
!isEventSubProcess(target)) {
|
|
56543
|
-
headerEntries = {
|
|
56544
|
-
...headerEntries,
|
|
56545
|
-
...this._getAdHocHeaderEntries(target)
|
|
56546
|
-
};
|
|
56547
|
-
}
|
|
56548
|
-
|
|
56549
56845
|
if (canBeNonInterrupting(target)) {
|
|
56550
56846
|
headerEntries = {
|
|
56551
56847
|
...headerEntries,
|
|
@@ -56843,44 +57139,6 @@
|
|
|
56843
57139
|
};
|
|
56844
57140
|
};
|
|
56845
57141
|
|
|
56846
|
-
/**
|
|
56847
|
-
* Get popup menu header entries for the ad-hoc property of the given BPMN element.
|
|
56848
|
-
*
|
|
56849
|
-
* @param {PopupMenuTarget} element
|
|
56850
|
-
*
|
|
56851
|
-
* @return {PopupMenuHeaderEntries}
|
|
56852
|
-
*/
|
|
56853
|
-
ReplaceMenuProvider.prototype._getAdHocHeaderEntries = function(element) {
|
|
56854
|
-
var translate = this._translate;
|
|
56855
|
-
var businessObject = getBusinessObject(element);
|
|
56856
|
-
|
|
56857
|
-
var isAdHoc = is$1(businessObject, 'bpmn:AdHocSubProcess');
|
|
56858
|
-
|
|
56859
|
-
var replaceElement = this._bpmnReplace.replaceElement;
|
|
56860
|
-
|
|
56861
|
-
return {
|
|
56862
|
-
'toggle-adhoc': {
|
|
56863
|
-
className: 'bpmn-icon-ad-hoc-marker',
|
|
56864
|
-
title: translate('Ad-hoc'),
|
|
56865
|
-
active: isAdHoc,
|
|
56866
|
-
action: function(event, entry) {
|
|
56867
|
-
if (isAdHoc) {
|
|
56868
|
-
return replaceElement(element, { type: 'bpmn:SubProcess' }, {
|
|
56869
|
-
autoResize: false,
|
|
56870
|
-
layoutConnection: false
|
|
56871
|
-
});
|
|
56872
|
-
} else {
|
|
56873
|
-
return replaceElement(element, { type: 'bpmn:AdHocSubProcess' }, {
|
|
56874
|
-
autoResize: false,
|
|
56875
|
-
layoutConnection: false
|
|
56876
|
-
});
|
|
56877
|
-
}
|
|
56878
|
-
}
|
|
56879
|
-
}
|
|
56880
|
-
};
|
|
56881
|
-
};
|
|
56882
|
-
|
|
56883
|
-
|
|
56884
57142
|
ReplaceMenuProvider.prototype._getNonInterruptingHeaderEntries = function(element) {
|
|
56885
57143
|
const translate = this._translate;
|
|
56886
57144
|
const businessObject = getBusinessObject(element);
|