camunda-bpmn-js 0.15.1 → 0.15.2
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.
|
@@ -84203,16 +84203,6 @@
|
|
|
84203
84203
|
function isArray$4(obj) {
|
|
84204
84204
|
return nativeToString$2.call(obj) === '[object Array]';
|
|
84205
84205
|
}
|
|
84206
|
-
function isObject$1(obj) {
|
|
84207
|
-
return nativeToString$2.call(obj) === '[object Object]';
|
|
84208
|
-
}
|
|
84209
|
-
function isNumber$1(obj) {
|
|
84210
|
-
return nativeToString$2.call(obj) === '[object Number]';
|
|
84211
|
-
}
|
|
84212
|
-
function isFunction$1(obj) {
|
|
84213
|
-
var tag = nativeToString$2.call(obj);
|
|
84214
|
-
return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object AsyncGeneratorFunction]' || tag === '[object Proxy]';
|
|
84215
|
-
}
|
|
84216
84206
|
/**
|
|
84217
84207
|
* Return true, if target owns a property with the given key.
|
|
84218
84208
|
*
|
|
@@ -84225,205 +84215,6 @@
|
|
|
84225
84215
|
function has$2(target, key) {
|
|
84226
84216
|
return nativeHasOwnProperty$2.call(target, key);
|
|
84227
84217
|
}
|
|
84228
|
-
/**
|
|
84229
|
-
* Iterate over collection; returning something
|
|
84230
|
-
* (non-undefined) will stop iteration.
|
|
84231
|
-
*
|
|
84232
|
-
* @param {Array|Object} collection
|
|
84233
|
-
* @param {Function} iterator
|
|
84234
|
-
*
|
|
84235
|
-
* @return {Object} return result that stopped the iteration
|
|
84236
|
-
*/
|
|
84237
|
-
|
|
84238
|
-
function forEach$2(collection, iterator) {
|
|
84239
|
-
var val, result;
|
|
84240
|
-
|
|
84241
|
-
if (isUndefined$4(collection)) {
|
|
84242
|
-
return;
|
|
84243
|
-
}
|
|
84244
|
-
|
|
84245
|
-
var convertKey = isArray$4(collection) ? toNum$2 : identity$2;
|
|
84246
|
-
|
|
84247
|
-
for (var key in collection) {
|
|
84248
|
-
if (has$2(collection, key)) {
|
|
84249
|
-
val = collection[key];
|
|
84250
|
-
result = iterator(val, convertKey(key));
|
|
84251
|
-
|
|
84252
|
-
if (result === false) {
|
|
84253
|
-
return val;
|
|
84254
|
-
}
|
|
84255
|
-
}
|
|
84256
|
-
}
|
|
84257
|
-
}
|
|
84258
|
-
|
|
84259
|
-
function identity$2(arg) {
|
|
84260
|
-
return arg;
|
|
84261
|
-
}
|
|
84262
|
-
|
|
84263
|
-
function toNum$2(arg) {
|
|
84264
|
-
return Number(arg);
|
|
84265
|
-
}
|
|
84266
|
-
|
|
84267
|
-
var DEFAULT_PRIORITY$8 = 1000;
|
|
84268
|
-
|
|
84269
|
-
/**
|
|
84270
|
-
* A utility that can be used to plug-in into the command execution for
|
|
84271
|
-
* extension and/or validation.
|
|
84272
|
-
*
|
|
84273
|
-
* @param {EventBus} eventBus
|
|
84274
|
-
*
|
|
84275
|
-
* @example
|
|
84276
|
-
*
|
|
84277
|
-
* import inherits from 'inherits';
|
|
84278
|
-
*
|
|
84279
|
-
* import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
|
|
84280
|
-
*
|
|
84281
|
-
* function CommandLogger(eventBus) {
|
|
84282
|
-
* CommandInterceptor.call(this, eventBus);
|
|
84283
|
-
*
|
|
84284
|
-
* this.preExecute(function(event) {
|
|
84285
|
-
* console.log('command pre-execute', event);
|
|
84286
|
-
* });
|
|
84287
|
-
* }
|
|
84288
|
-
*
|
|
84289
|
-
* inherits(CommandLogger, CommandInterceptor);
|
|
84290
|
-
*
|
|
84291
|
-
*/
|
|
84292
|
-
function CommandInterceptor$2(eventBus) {
|
|
84293
|
-
this._eventBus = eventBus;
|
|
84294
|
-
}
|
|
84295
|
-
|
|
84296
|
-
CommandInterceptor$2.$inject = [ 'eventBus' ];
|
|
84297
|
-
|
|
84298
|
-
function unwrapEvent$1(fn, that) {
|
|
84299
|
-
return function(event) {
|
|
84300
|
-
return fn.call(that || null, event.context, event.command, event);
|
|
84301
|
-
};
|
|
84302
|
-
}
|
|
84303
|
-
|
|
84304
|
-
/**
|
|
84305
|
-
* Register an interceptor for a command execution
|
|
84306
|
-
*
|
|
84307
|
-
* @param {string|Array<string>} [events] list of commands to register on
|
|
84308
|
-
* @param {string} [hook] command hook, i.e. preExecute, executed to listen on
|
|
84309
|
-
* @param {number} [priority] the priority on which to hook into the execution
|
|
84310
|
-
* @param {Function} handlerFn interceptor to be invoked with (event)
|
|
84311
|
-
* @param {boolean} unwrap if true, unwrap the event and pass (context, command, event) to the
|
|
84312
|
-
* listener instead
|
|
84313
|
-
* @param {Object} [that] Pass context (`this`) to the handler function
|
|
84314
|
-
*/
|
|
84315
|
-
CommandInterceptor$2.prototype.on = function(events, hook, priority, handlerFn, unwrap, that) {
|
|
84316
|
-
|
|
84317
|
-
if (isFunction$1(hook) || isNumber$1(hook)) {
|
|
84318
|
-
that = unwrap;
|
|
84319
|
-
unwrap = handlerFn;
|
|
84320
|
-
handlerFn = priority;
|
|
84321
|
-
priority = hook;
|
|
84322
|
-
hook = null;
|
|
84323
|
-
}
|
|
84324
|
-
|
|
84325
|
-
if (isFunction$1(priority)) {
|
|
84326
|
-
that = unwrap;
|
|
84327
|
-
unwrap = handlerFn;
|
|
84328
|
-
handlerFn = priority;
|
|
84329
|
-
priority = DEFAULT_PRIORITY$8;
|
|
84330
|
-
}
|
|
84331
|
-
|
|
84332
|
-
if (isObject$1(unwrap)) {
|
|
84333
|
-
that = unwrap;
|
|
84334
|
-
unwrap = false;
|
|
84335
|
-
}
|
|
84336
|
-
|
|
84337
|
-
if (!isFunction$1(handlerFn)) {
|
|
84338
|
-
throw new Error('handlerFn must be a function');
|
|
84339
|
-
}
|
|
84340
|
-
|
|
84341
|
-
if (!isArray$4(events)) {
|
|
84342
|
-
events = [ events ];
|
|
84343
|
-
}
|
|
84344
|
-
|
|
84345
|
-
var eventBus = this._eventBus;
|
|
84346
|
-
|
|
84347
|
-
forEach$2(events, function(event) {
|
|
84348
|
-
|
|
84349
|
-
// concat commandStack(.event)?(.hook)?
|
|
84350
|
-
var fullEvent = [ 'commandStack', event, hook ].filter(function(e) { return e; }).join('.');
|
|
84351
|
-
|
|
84352
|
-
eventBus.on(fullEvent, priority, unwrap ? unwrapEvent$1(handlerFn, that) : handlerFn, that);
|
|
84353
|
-
});
|
|
84354
|
-
};
|
|
84355
|
-
|
|
84356
|
-
|
|
84357
|
-
var hooks$1 = [
|
|
84358
|
-
'canExecute',
|
|
84359
|
-
'preExecute',
|
|
84360
|
-
'preExecuted',
|
|
84361
|
-
'execute',
|
|
84362
|
-
'executed',
|
|
84363
|
-
'postExecute',
|
|
84364
|
-
'postExecuted',
|
|
84365
|
-
'revert',
|
|
84366
|
-
'reverted'
|
|
84367
|
-
];
|
|
84368
|
-
|
|
84369
|
-
/*
|
|
84370
|
-
* Install hook shortcuts
|
|
84371
|
-
*
|
|
84372
|
-
* This will generate the CommandInterceptor#(preExecute|...|reverted) methods
|
|
84373
|
-
* which will in term forward to CommandInterceptor#on.
|
|
84374
|
-
*/
|
|
84375
|
-
forEach$2(hooks$1, function(hook) {
|
|
84376
|
-
|
|
84377
|
-
/**
|
|
84378
|
-
* {canExecute|preExecute|preExecuted|execute|executed|postExecute|postExecuted|revert|reverted}
|
|
84379
|
-
*
|
|
84380
|
-
* A named hook for plugging into the command execution
|
|
84381
|
-
*
|
|
84382
|
-
* @param {string|Array<string>} [events] list of commands to register on
|
|
84383
|
-
* @param {number} [priority] the priority on which to hook into the execution
|
|
84384
|
-
* @param {Function} handlerFn interceptor to be invoked with (event)
|
|
84385
|
-
* @param {boolean} [unwrap=false] if true, unwrap the event and pass (context, command, event) to the
|
|
84386
|
-
* listener instead
|
|
84387
|
-
* @param {Object} [that] Pass context (`this`) to the handler function
|
|
84388
|
-
*/
|
|
84389
|
-
CommandInterceptor$2.prototype[hook] = function(events, priority, handlerFn, unwrap, that) {
|
|
84390
|
-
|
|
84391
|
-
if (isFunction$1(events) || isNumber$1(events)) {
|
|
84392
|
-
that = unwrap;
|
|
84393
|
-
unwrap = handlerFn;
|
|
84394
|
-
handlerFn = priority;
|
|
84395
|
-
priority = events;
|
|
84396
|
-
events = null;
|
|
84397
|
-
}
|
|
84398
|
-
|
|
84399
|
-
this.on(events, hook, priority, handlerFn, unwrap, that);
|
|
84400
|
-
};
|
|
84401
|
-
});
|
|
84402
|
-
|
|
84403
|
-
/**
|
|
84404
|
-
* Is an element of the given BPMN type?
|
|
84405
|
-
*
|
|
84406
|
-
* @param {djs.model.Base|ModdleElement} element
|
|
84407
|
-
* @param {string} type
|
|
84408
|
-
*
|
|
84409
|
-
* @return {boolean}
|
|
84410
|
-
*/
|
|
84411
|
-
function is$4(element, type) {
|
|
84412
|
-
var bo = getBusinessObject$1(element);
|
|
84413
|
-
|
|
84414
|
-
return bo && (typeof bo.$instanceOf === 'function') && bo.$instanceOf(type);
|
|
84415
|
-
}
|
|
84416
|
-
|
|
84417
|
-
/**
|
|
84418
|
-
* Return the business object for a given element.
|
|
84419
|
-
*
|
|
84420
|
-
* @param {djs.model.Base|ModdleElement} element
|
|
84421
|
-
*
|
|
84422
|
-
* @return {ModdleElement}
|
|
84423
|
-
*/
|
|
84424
|
-
function getBusinessObject$1(element) {
|
|
84425
|
-
return (element && element.businessObject) || element;
|
|
84426
|
-
}
|
|
84427
84218
|
|
|
84428
84219
|
/**
|
|
84429
84220
|
* Get extension elements of business object. Optionally filter by type.
|
|
@@ -84433,7 +84224,7 @@
|
|
|
84433
84224
|
* @returns {Array<ModdleElement>}
|
|
84434
84225
|
*/
|
|
84435
84226
|
function getExtensionElementsList$1(element, type = undefined) {
|
|
84436
|
-
const businessObject = getBusinessObject
|
|
84227
|
+
const businessObject = getBusinessObject(element),
|
|
84437
84228
|
extensionElements = businessObject.get('extensionElements');
|
|
84438
84229
|
|
|
84439
84230
|
if (!extensionElements) {
|
|
@@ -84447,7 +84238,7 @@
|
|
|
84447
84238
|
}
|
|
84448
84239
|
|
|
84449
84240
|
if (type) {
|
|
84450
|
-
return values.filter(value => is$
|
|
84241
|
+
return values.filter(value => is$1(value, type));
|
|
84451
84242
|
}
|
|
84452
84243
|
|
|
84453
84244
|
return values;
|
|
@@ -84485,7 +84276,7 @@
|
|
|
84485
84276
|
* Camunda BPMN specific behavior ensuring camunda:ErrorEventDefinition extension elements are removed
|
|
84486
84277
|
* if type of e.g. bpmn:ServiceTask is set to something other than external.
|
|
84487
84278
|
*/
|
|
84488
|
-
class DeleteErrorEventDefinitionBehavior extends CommandInterceptor
|
|
84279
|
+
class DeleteErrorEventDefinitionBehavior extends CommandInterceptor {
|
|
84489
84280
|
constructor(commandStack, eventBus) {
|
|
84490
84281
|
super(eventBus);
|
|
84491
84282
|
|
|
@@ -84499,10 +84290,10 @@
|
|
|
84499
84290
|
properties
|
|
84500
84291
|
} = context;
|
|
84501
84292
|
|
|
84502
|
-
const businessObject = moddleElement || getBusinessObject
|
|
84293
|
+
const businessObject = moddleElement || getBusinessObject(element);
|
|
84503
84294
|
|
|
84504
|
-
if (is$
|
|
84505
|
-
&& is$
|
|
84295
|
+
if (is$1(element, 'camunda:ExternalCapable')
|
|
84296
|
+
&& is$1(businessObject, 'camunda:ExternalCapable')
|
|
84506
84297
|
&& properties[ 'camunda:type' ] !== 'external'
|
|
84507
84298
|
) {
|
|
84508
84299
|
const errorEventDefinitions = getExtensionElementsList$1(businessObject, 'camunda:ErrorEventDefinition');
|
|
@@ -84529,7 +84320,7 @@
|
|
|
84529
84320
|
* removed when both camunda:asyncAfter and camunda:asyncBefore set to false.
|
|
84530
84321
|
* Doesn't apply if element has bpmn:TimerEventDefinition.
|
|
84531
84322
|
*/
|
|
84532
|
-
class DeleteRetryTimeCycleBehavior extends CommandInterceptor
|
|
84323
|
+
class DeleteRetryTimeCycleBehavior extends CommandInterceptor {
|
|
84533
84324
|
constructor(commandStack, eventBus) {
|
|
84534
84325
|
super(eventBus);
|
|
84535
84326
|
|
|
@@ -84546,13 +84337,13 @@
|
|
|
84546
84337
|
const asyncAfter = properties[ 'camunda:asyncAfter' ],
|
|
84547
84338
|
asyncBefore = properties[ 'camunda:asyncBefore' ];
|
|
84548
84339
|
|
|
84549
|
-
const businessObject = moddleElement || getBusinessObject
|
|
84340
|
+
const businessObject = moddleElement || getBusinessObject(element);
|
|
84550
84341
|
|
|
84551
84342
|
const failedJobRetryTimeCycle = getFailedJobRetryTimeCycle(element);
|
|
84552
84343
|
|
|
84553
84344
|
if (
|
|
84554
|
-
!is$
|
|
84555
|
-
|| !is$
|
|
84345
|
+
!is$1(element, 'camunda:AsyncCapable')
|
|
84346
|
+
|| !is$1(businessObject, 'camunda:AsyncCapable')
|
|
84556
84347
|
|| (asyncAfter !== false && asyncBefore !== false)
|
|
84557
84348
|
|| !failedJobRetryTimeCycle
|
|
84558
84349
|
|| getTimerEventDefinition$1(element)
|
|
@@ -84593,7 +84384,7 @@
|
|
|
84593
84384
|
}
|
|
84594
84385
|
|
|
84595
84386
|
function getEventDefinition$3(element, type) {
|
|
84596
|
-
const businessObject = getBusinessObject
|
|
84387
|
+
const businessObject = getBusinessObject(element);
|
|
84597
84388
|
|
|
84598
84389
|
const eventDefinitions = businessObject.get('eventDefinitions');
|
|
84599
84390
|
|
|
@@ -84602,7 +84393,7 @@
|
|
|
84602
84393
|
}
|
|
84603
84394
|
|
|
84604
84395
|
return eventDefinitions.find((eventDefinition) => {
|
|
84605
|
-
return is$
|
|
84396
|
+
return is$1(eventDefinition, type);
|
|
84606
84397
|
});
|
|
84607
84398
|
}
|
|
84608
84399
|
|
|
@@ -84613,7 +84404,7 @@
|
|
|
84613
84404
|
* Camunda BPMN specific behavior ensuring camunda:exclusive is set to true if
|
|
84614
84405
|
* camunda:asyncBefore or camunda:asyncAfter is set to false.
|
|
84615
84406
|
*/
|
|
84616
|
-
class UpdateCamundaExclusiveBehavior extends CommandInterceptor
|
|
84407
|
+
class UpdateCamundaExclusiveBehavior extends CommandInterceptor {
|
|
84617
84408
|
constructor(eventBus) {
|
|
84618
84409
|
super(eventBus);
|
|
84619
84410
|
|
|
@@ -84627,13 +84418,13 @@
|
|
|
84627
84418
|
properties = {}
|
|
84628
84419
|
} = context;
|
|
84629
84420
|
|
|
84630
|
-
const businessObject = moddleElement || getBusinessObject
|
|
84421
|
+
const businessObject = moddleElement || getBusinessObject(element);
|
|
84631
84422
|
|
|
84632
84423
|
const asyncAfter = properties[ 'camunda:asyncAfter' ],
|
|
84633
84424
|
asyncBefore = properties[ 'camunda:asyncBefore' ];
|
|
84634
84425
|
|
|
84635
|
-
if (!is$
|
|
84636
|
-
|| !is$
|
|
84426
|
+
if (!is$1(element, 'camunda:AsyncCapable')
|
|
84427
|
+
|| !is$1(businessObject, 'camunda:AsyncCapable')
|
|
84637
84428
|
|| (asyncAfter !== false && asyncBefore !== false)
|
|
84638
84429
|
|| isExclusive$2(businessObject)
|
|
84639
84430
|
|| (isAsyncAfter$4(businessObject) && asyncAfter !== false)
|
|
@@ -84689,7 +84480,7 @@
|
|
|
84689
84480
|
/**
|
|
84690
84481
|
* Camunda BPMN specific behavior ensuring empty camunda:InputOutput is removed.
|
|
84691
84482
|
*/
|
|
84692
|
-
class UpdateInputOutputBehavior extends CommandInterceptor
|
|
84483
|
+
class UpdateInputOutputBehavior extends CommandInterceptor {
|
|
84693
84484
|
constructor(commandStack, eventBus) {
|
|
84694
84485
|
super(eventBus);
|
|
84695
84486
|
|
|
@@ -84699,12 +84490,12 @@
|
|
|
84699
84490
|
moddleElement
|
|
84700
84491
|
} = context;
|
|
84701
84492
|
|
|
84702
|
-
if (!is$
|
|
84493
|
+
if (!is$1(moddleElement, 'camunda:InputOutput')) {
|
|
84703
84494
|
return;
|
|
84704
84495
|
}
|
|
84705
84496
|
|
|
84706
84497
|
if (isInputOutputEmpty(moddleElement)) {
|
|
84707
|
-
removeExtensionElements$1(element, getBusinessObject
|
|
84498
|
+
removeExtensionElements$1(element, getBusinessObject(element), moddleElement, commandStack);
|
|
84708
84499
|
}
|
|
84709
84500
|
}, true);
|
|
84710
84501
|
}
|
|
@@ -84722,7 +84513,7 @@
|
|
|
84722
84513
|
* Camunda BPMN specific camunda:resultVariable behavior ensuring
|
|
84723
84514
|
* camunda:mapDecisionResult is removed when camunda:resultVariable is removed.
|
|
84724
84515
|
*/
|
|
84725
|
-
class UpdateResultVariableBehavior extends CommandInterceptor
|
|
84516
|
+
class UpdateResultVariableBehavior extends CommandInterceptor {
|
|
84726
84517
|
constructor(eventBus) {
|
|
84727
84518
|
super(eventBus);
|
|
84728
84519
|
|
|
@@ -84736,11 +84527,11 @@
|
|
|
84736
84527
|
properties
|
|
84737
84528
|
} = context;
|
|
84738
84529
|
|
|
84739
|
-
const businessObject = moddleElement || getBusinessObject
|
|
84530
|
+
const businessObject = moddleElement || getBusinessObject(element);
|
|
84740
84531
|
|
|
84741
84532
|
if (
|
|
84742
|
-
is$
|
|
84743
|
-
&& is$
|
|
84533
|
+
is$1(element, 'camunda:DmnCapable')
|
|
84534
|
+
&& is$1(businessObject, 'camunda:DmnCapable')
|
|
84744
84535
|
&& has$2(properties, 'camunda:resultVariable')
|
|
84745
84536
|
&& isEmpty(properties[ 'camunda:resultVariable' ])
|
|
84746
84537
|
) {
|
|
@@ -84764,7 +84555,7 @@
|
|
|
84764
84555
|
/**
|
|
84765
84556
|
* Camunda BPMN specific user task forms behavior.
|
|
84766
84557
|
*/
|
|
84767
|
-
class UserTaskFormsBehavior extends CommandInterceptor
|
|
84558
|
+
class UserTaskFormsBehavior extends CommandInterceptor {
|
|
84768
84559
|
constructor(eventBus) {
|
|
84769
84560
|
super(eventBus);
|
|
84770
84561
|
|
|
@@ -84784,7 +84575,7 @@
|
|
|
84784
84575
|
properties
|
|
84785
84576
|
} = context;
|
|
84786
84577
|
|
|
84787
|
-
const businessObject = moddleElement || getBusinessObject
|
|
84578
|
+
const businessObject = moddleElement || getBusinessObject(element);
|
|
84788
84579
|
|
|
84789
84580
|
if (has$2(properties, 'camunda:formKey')) {
|
|
84790
84581
|
Object.assign(properties, {
|
|
@@ -84830,7 +84621,7 @@
|
|
|
84830
84621
|
* 2. Updates camunda:FormData#businessKey if camunda:FormField#id is changed.
|
|
84831
84622
|
* 3. Removes camunda:FormData#businessKey if camunda:FormField is removed.
|
|
84832
84623
|
*/
|
|
84833
|
-
class UserTaskFormsBehavior$1 extends CommandInterceptor
|
|
84624
|
+
class UserTaskFormsBehavior$1 extends CommandInterceptor {
|
|
84834
84625
|
constructor(eventBus, modeling) {
|
|
84835
84626
|
super(eventBus);
|
|
84836
84627
|
|
|
@@ -84844,7 +84635,7 @@
|
|
|
84844
84635
|
properties
|
|
84845
84636
|
} = context;
|
|
84846
84637
|
|
|
84847
|
-
if (!is$
|
|
84638
|
+
if (!is$1(moddleElement, 'camunda:FormField')) {
|
|
84848
84639
|
return;
|
|
84849
84640
|
}
|
|
84850
84641
|
|
|
@@ -84866,7 +84657,7 @@
|
|
|
84866
84657
|
properties
|
|
84867
84658
|
} = context;
|
|
84868
84659
|
|
|
84869
|
-
if (!is$
|
|
84660
|
+
if (!is$1(moddleElement, 'camunda:FormField')
|
|
84870
84661
|
|| (!has$2(properties, 'id') && !has$2(properties, 'camunda:id'))
|
|
84871
84662
|
) {
|
|
84872
84663
|
return;
|
|
@@ -84891,7 +84682,7 @@
|
|
|
84891
84682
|
properties
|
|
84892
84683
|
} = context;
|
|
84893
84684
|
|
|
84894
|
-
if (!is$
|
|
84685
|
+
if (!is$1(moddleElement, 'camunda:FormData') || !has$2(properties, 'fields')) {
|
|
84895
84686
|
return;
|
|
84896
84687
|
}
|
|
84897
84688
|
|
|
@@ -84924,7 +84715,7 @@
|
|
|
84924
84715
|
}
|
|
84925
84716
|
|
|
84926
84717
|
function getFormData$4(element) {
|
|
84927
|
-
const businessObject = getBusinessObject
|
|
84718
|
+
const businessObject = getBusinessObject(element),
|
|
84928
84719
|
extensionElements = businessObject.get('extensionElements');
|
|
84929
84720
|
|
|
84930
84721
|
if (!extensionElements) {
|
|
@@ -84934,7 +84725,7 @@
|
|
|
84934
84725
|
const values = extensionElements.get('values');
|
|
84935
84726
|
|
|
84936
84727
|
return values.find((value) => {
|
|
84937
|
-
return is$
|
|
84728
|
+
return is$1(value, 'camunda:FormData');
|
|
84938
84729
|
});
|
|
84939
84730
|
}
|
|
84940
84731
|
|
|
@@ -84957,8 +84748,8 @@
|
|
|
84957
84748
|
userTaskGeneratedFormsBehavior: [ 'type', UserTaskFormsBehavior$1 ]
|
|
84958
84749
|
};
|
|
84959
84750
|
|
|
84960
|
-
var isFunction$
|
|
84961
|
-
isObject$
|
|
84751
|
+
var isFunction$1 = require$$0.isFunction,
|
|
84752
|
+
isObject$1 = require$$0.isObject,
|
|
84962
84753
|
some$1 = require$$0.some;
|
|
84963
84754
|
|
|
84964
84755
|
var WILDCARD = '*';
|
|
@@ -84984,14 +84775,14 @@
|
|
|
84984
84775
|
CopyPasteBehavior.prototype.canCopyProperty = function(property, parent) {
|
|
84985
84776
|
|
|
84986
84777
|
// (1) check wether property is allowed in parent
|
|
84987
|
-
if (isObject$
|
|
84778
|
+
if (isObject$1(property) && !isAllowedInParent(property, parent)) {
|
|
84988
84779
|
|
|
84989
84780
|
return false;
|
|
84990
84781
|
}
|
|
84991
84782
|
|
|
84992
84783
|
// (2) check more complex scenarios
|
|
84993
84784
|
|
|
84994
|
-
if (is$
|
|
84785
|
+
if (is$4(property, 'camunda:InputOutput') && !this.canHostInputOutput(parent)) {
|
|
84995
84786
|
return false;
|
|
84996
84787
|
}
|
|
84997
84788
|
|
|
@@ -84999,7 +84790,7 @@
|
|
|
84999
84790
|
return false;
|
|
85000
84791
|
}
|
|
85001
84792
|
|
|
85002
|
-
if (is$
|
|
84793
|
+
if (is$4(property, 'camunda:In') && !this.canHostIn(parent)) {
|
|
85003
84794
|
return false;
|
|
85004
84795
|
}
|
|
85005
84796
|
};
|
|
@@ -85024,7 +84815,7 @@
|
|
|
85024
84815
|
return false;
|
|
85025
84816
|
}
|
|
85026
84817
|
|
|
85027
|
-
if (is$
|
|
84818
|
+
if (is$4(flowNode, 'bpmn:SubProcess') && flowNode.get('triggeredByEvent')) {
|
|
85028
84819
|
return false;
|
|
85029
84820
|
}
|
|
85030
84821
|
|
|
@@ -85035,7 +84826,7 @@
|
|
|
85035
84826
|
|
|
85036
84827
|
var serviceTaskLike = getParent$2(parent, 'camunda:ServiceTaskLike');
|
|
85037
84828
|
|
|
85038
|
-
if (is$
|
|
84829
|
+
if (is$4(serviceTaskLike, 'bpmn:MessageEventDefinition')) {
|
|
85039
84830
|
|
|
85040
84831
|
// only allow on throw and end events
|
|
85041
84832
|
return (
|
|
@@ -85073,13 +84864,13 @@
|
|
|
85073
84864
|
|
|
85074
84865
|
// helpers //////////
|
|
85075
84866
|
|
|
85076
|
-
function is$
|
|
85077
|
-
return element && isFunction$
|
|
84867
|
+
function is$4(element, type) {
|
|
84868
|
+
return element && isFunction$1(element.$instanceOf) && element.$instanceOf(type);
|
|
85078
84869
|
}
|
|
85079
84870
|
|
|
85080
84871
|
function isAny$1(element, types) {
|
|
85081
84872
|
return some$1(types, function(t) {
|
|
85082
|
-
return is$
|
|
84873
|
+
return is$4(element, t);
|
|
85083
84874
|
});
|
|
85084
84875
|
}
|
|
85085
84876
|
|
|
@@ -85088,7 +84879,7 @@
|
|
|
85088
84879
|
return element.$parent;
|
|
85089
84880
|
}
|
|
85090
84881
|
|
|
85091
|
-
if (is$
|
|
84882
|
+
if (is$4(element, type)) {
|
|
85092
84883
|
return element;
|
|
85093
84884
|
}
|
|
85094
84885
|
|
|
@@ -85129,13 +84920,13 @@
|
|
|
85129
84920
|
var find$1 = require$$0.find,
|
|
85130
84921
|
matchPattern$1 = require$$0.matchPattern;
|
|
85131
84922
|
|
|
85132
|
-
var CommandInterceptor$
|
|
84923
|
+
var CommandInterceptor$2 = require$$0$1.default;
|
|
85133
84924
|
|
|
85134
84925
|
var collectionAdd = require$$2.add,
|
|
85135
84926
|
collectionRemove = require$$2.remove;
|
|
85136
84927
|
|
|
85137
|
-
var getBusinessObject$
|
|
85138
|
-
is$
|
|
84928
|
+
var getBusinessObject$1 = require$$1.getBusinessObject,
|
|
84929
|
+
is$5 = require$$1.is;
|
|
85139
84930
|
|
|
85140
84931
|
var LOW_PRIORITY$u = 500;
|
|
85141
84932
|
|
|
@@ -85148,7 +84939,7 @@
|
|
|
85148
84939
|
bpmnjs, eventBus, injector, moddleCopy, bpmnFactory
|
|
85149
84940
|
) {
|
|
85150
84941
|
|
|
85151
|
-
injector.invoke(CommandInterceptor$
|
|
84942
|
+
injector.invoke(CommandInterceptor$2, this);
|
|
85152
84943
|
|
|
85153
84944
|
|
|
85154
84945
|
function hasRootElement(rootElement) {
|
|
@@ -85163,7 +84954,7 @@
|
|
|
85163
84954
|
this.executed('shape.create', function(context) {
|
|
85164
84955
|
|
|
85165
84956
|
var shape = context.shape,
|
|
85166
|
-
businessObject = getBusinessObject$
|
|
84957
|
+
businessObject = getBusinessObject$1(shape);
|
|
85167
84958
|
|
|
85168
84959
|
if (!canHaveNestedRootElementReference(businessObject)) {
|
|
85169
84960
|
return;
|
|
@@ -85205,7 +84996,7 @@
|
|
|
85205
84996
|
eventBus.on('copyPaste.copyElement', function(context) {
|
|
85206
84997
|
var descriptor = context.descriptor,
|
|
85207
84998
|
element = context.element,
|
|
85208
|
-
businessObject = getBusinessObject$
|
|
84999
|
+
businessObject = getBusinessObject$1(element);
|
|
85209
85000
|
|
|
85210
85001
|
if (!canHaveNestedRootElementReference(businessObject)) {
|
|
85211
85002
|
return;
|
|
@@ -85263,7 +85054,7 @@
|
|
|
85263
85054
|
'bpmnFactory'
|
|
85264
85055
|
];
|
|
85265
85056
|
|
|
85266
|
-
inherits_browser(CopyPasteRootElementBehavior, CommandInterceptor$
|
|
85057
|
+
inherits_browser(CopyPasteRootElementBehavior, CommandInterceptor$2);
|
|
85267
85058
|
|
|
85268
85059
|
var CopyPasteRootElementBehavior_1 = CopyPasteRootElementBehavior;
|
|
85269
85060
|
|
|
@@ -85271,19 +85062,19 @@
|
|
|
85271
85062
|
// helpers //////////////////////////
|
|
85272
85063
|
|
|
85273
85064
|
function getReferencingElement(element) {
|
|
85274
|
-
if (is$
|
|
85065
|
+
if (is$5(element, 'bpmn:ServiceTask')) {
|
|
85275
85066
|
return 'camunda:ErrorEventDefinition';
|
|
85276
85067
|
}
|
|
85277
85068
|
}
|
|
85278
85069
|
|
|
85279
85070
|
function getRootElementReferencePropertyName(bo) {
|
|
85280
|
-
if (is$
|
|
85071
|
+
if (is$5(bo, 'camunda:ErrorEventDefinition')) {
|
|
85281
85072
|
return 'errorRef';
|
|
85282
85073
|
}
|
|
85283
85074
|
}
|
|
85284
85075
|
|
|
85285
85076
|
function canHaveNestedRootElementReference(bo) {
|
|
85286
|
-
var isExternalServiceTask = is$
|
|
85077
|
+
var isExternalServiceTask = is$5(bo, 'bpmn:ServiceTask') && bo.type === 'external';
|
|
85287
85078
|
return isExternalServiceTask;
|
|
85288
85079
|
}
|
|
85289
85080
|
|
|
@@ -85311,7 +85102,7 @@
|
|
|
85311
85102
|
|
|
85312
85103
|
if (extensionElements) {
|
|
85313
85104
|
filteredExtensionElements = extensionElements.values.filter(function(element) {
|
|
85314
|
-
return is$
|
|
85105
|
+
return is$5(element, extensionElementType);
|
|
85315
85106
|
});
|
|
85316
85107
|
}
|
|
85317
85108
|
|
|
@@ -85348,9 +85139,9 @@
|
|
|
85348
85139
|
return extensionElements.values.indexOf(extensionElement);
|
|
85349
85140
|
}
|
|
85350
85141
|
|
|
85351
|
-
var CommandInterceptor$
|
|
85352
|
-
var is$
|
|
85353
|
-
var getBusinessObject$
|
|
85142
|
+
var CommandInterceptor$3 = require$$0$1.default;
|
|
85143
|
+
var is$6 = require$$1.is;
|
|
85144
|
+
var getBusinessObject$2 = require$$1.getBusinessObject;
|
|
85354
85145
|
|
|
85355
85146
|
/**
|
|
85356
85147
|
* Remove `camunda:initiator` property when a startEvent is moved to or created within a subProcess.
|
|
@@ -85359,19 +85150,19 @@
|
|
|
85359
85150
|
modeling, injector
|
|
85360
85151
|
) {
|
|
85361
85152
|
|
|
85362
|
-
injector.invoke(CommandInterceptor$
|
|
85153
|
+
injector.invoke(CommandInterceptor$3, this);
|
|
85363
85154
|
|
|
85364
85155
|
this.postExecuted(['shape.create','shape.move'], function(context) {
|
|
85365
85156
|
|
|
85366
85157
|
var shape = context.shape,
|
|
85367
85158
|
newParent = context.newParent || context.parent,
|
|
85368
|
-
businessObject = getBusinessObject$
|
|
85159
|
+
businessObject = getBusinessObject$2(shape);
|
|
85369
85160
|
|
|
85370
85161
|
// if shape is a startEvent and has an initiator proterty
|
|
85371
|
-
if (is$
|
|
85162
|
+
if (is$6(shape, 'bpmn:StartEvent') && businessObject.get('camunda:initiator') !== undefined) {
|
|
85372
85163
|
|
|
85373
85164
|
// if subProcess becomes the new parent
|
|
85374
|
-
if ((is$
|
|
85165
|
+
if ((is$6(newParent, 'bpmn:SubProcess'))) {
|
|
85375
85166
|
|
|
85376
85167
|
// remove initiator property
|
|
85377
85168
|
modeling.updateProperties(shape, { 'camunda:initiator': undefined });
|
|
@@ -85387,13 +85178,13 @@
|
|
|
85387
85178
|
'injector',
|
|
85388
85179
|
];
|
|
85389
85180
|
|
|
85390
|
-
inherits_browser(RemoveInitiatorBehaviour, CommandInterceptor$
|
|
85181
|
+
inherits_browser(RemoveInitiatorBehaviour, CommandInterceptor$3);
|
|
85391
85182
|
|
|
85392
85183
|
var RemoveInitiatorBehaviour_1 = RemoveInitiatorBehaviour;
|
|
85393
85184
|
|
|
85394
|
-
var CommandInterceptor$
|
|
85395
|
-
var is$
|
|
85396
|
-
var getBusinessObject$
|
|
85185
|
+
var CommandInterceptor$4 = require$$0$1.default;
|
|
85186
|
+
var is$7 = require$$1.is;
|
|
85187
|
+
var getBusinessObject$3 = require$$1.getBusinessObject;
|
|
85397
85188
|
|
|
85398
85189
|
/**
|
|
85399
85190
|
* Remove 'camunda:variableEvents' property when a startEvent is moved out of an event subProcess.
|
|
@@ -85401,27 +85192,27 @@
|
|
|
85401
85192
|
function RemoveVariableEventBehaviour(
|
|
85402
85193
|
modeling, injector, bpmnFactory, moddleCopy
|
|
85403
85194
|
) {
|
|
85404
|
-
injector.invoke(CommandInterceptor$
|
|
85195
|
+
injector.invoke(CommandInterceptor$4, this);
|
|
85405
85196
|
|
|
85406
85197
|
this.postExecuted(['shape.move', 'shape.create'], function(context) {
|
|
85407
85198
|
|
|
85408
85199
|
var newParent = context.newParent || context.parent,
|
|
85409
|
-
newParentBusinessObject = getBusinessObject$
|
|
85200
|
+
newParentBusinessObject = getBusinessObject$3(newParent),
|
|
85410
85201
|
shape = context.shape,
|
|
85411
|
-
shapeBusinessObject = getBusinessObject$
|
|
85202
|
+
shapeBusinessObject = getBusinessObject$3(shape),
|
|
85412
85203
|
eventDefinitions, definitionsCopy;
|
|
85413
85204
|
|
|
85414
85205
|
var update = false;
|
|
85415
85206
|
|
|
85416
|
-
if (is$
|
|
85207
|
+
if (is$7(shape, 'bpmn:StartEvent')) {
|
|
85417
85208
|
|
|
85418
|
-
if (!(is$
|
|
85209
|
+
if (!(is$7(newParent, 'bpmn:SubProcess') && newParentBusinessObject.get('triggeredByEvent'))) {
|
|
85419
85210
|
|
|
85420
85211
|
eventDefinitions = shapeBusinessObject.get('eventDefinitions');
|
|
85421
85212
|
definitionsCopy = eventDefinitions.slice();
|
|
85422
85213
|
|
|
85423
85214
|
definitionsCopy.forEach(function(eventDefinition, index) {
|
|
85424
|
-
if (!is$
|
|
85215
|
+
if (!is$7(eventDefinition, 'bpmn:ConditionalEventDefinition')) {
|
|
85425
85216
|
return;
|
|
85426
85217
|
}
|
|
85427
85218
|
|
|
@@ -85453,7 +85244,7 @@
|
|
|
85453
85244
|
'moddleCopy'
|
|
85454
85245
|
];
|
|
85455
85246
|
|
|
85456
|
-
inherits_browser(RemoveVariableEventBehaviour, CommandInterceptor$
|
|
85247
|
+
inherits_browser(RemoveVariableEventBehaviour, CommandInterceptor$4);
|
|
85457
85248
|
|
|
85458
85249
|
var RemoveVariableEventBehaviour_1 = RemoveVariableEventBehaviour;
|
|
85459
85250
|
|