camunda-bpmn-js 5.6.2 → 5.7.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/base-modeler.development.js +294 -147
- package/dist/base-modeler.production.min.js +2 -2
- package/dist/base-navigated-viewer.development.js +92 -41
- package/dist/base-navigated-viewer.production.min.js +1 -1
- package/dist/base-viewer.development.js +92 -41
- package/dist/base-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-modeler.development.js +1577 -403
- package/dist/camunda-cloud-modeler.production.min.js +6 -6
- package/dist/camunda-cloud-navigated-viewer.development.js +92 -41
- package/dist/camunda-cloud-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-viewer.development.js +92 -41
- package/dist/camunda-cloud-viewer.production.min.js +1 -1
- package/dist/camunda-platform-modeler.development.js +294 -147
- package/dist/camunda-platform-modeler.production.min.js +5 -5
- package/dist/camunda-platform-navigated-viewer.development.js +92 -41
- package/dist/camunda-platform-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-platform-viewer.development.js +92 -41
- package/dist/camunda-platform-viewer.production.min.js +1 -1
- package/lib/camunda-cloud/Modeler.js +4 -1
- package/lib/camunda-cloud/features/external-resources/README.md +14 -0
- package/lib/camunda-cloud/features/external-resources/ResourceLoader.d.ts +6 -0
- package/lib/camunda-cloud/features/external-resources/ResourceLoader.js +24 -0
- package/lib/camunda-cloud/features/external-resources/Resources.d.ts +7 -0
- package/lib/camunda-cloud/features/external-resources/Resources.js +19 -0
- package/lib/camunda-cloud/features/external-resources/cmd/ComposedCommandHandler.d.ts +12 -0
- package/lib/camunda-cloud/features/external-resources/cmd/ComposedCommandHandler.js +16 -0
- package/lib/camunda-cloud/features/external-resources/cmd/index.d.ts +4 -0
- package/lib/camunda-cloud/features/external-resources/cmd/index.js +21 -0
- package/lib/camunda-cloud/features/external-resources/handlers/decision/AppendMenuProvider.d.ts +5 -0
- package/lib/camunda-cloud/features/external-resources/handlers/decision/AppendMenuProvider.js +19 -0
- package/lib/camunda-cloud/features/external-resources/handlers/decision/CreateMenuProvider.d.ts +5 -0
- package/lib/camunda-cloud/features/external-resources/handlers/decision/CreateMenuProvider.js +19 -0
- package/lib/camunda-cloud/features/external-resources/handlers/decision/ReplaceMenuProvider.d.ts +5 -0
- package/lib/camunda-cloud/features/external-resources/handlers/decision/ReplaceMenuProvider.js +19 -0
- package/lib/camunda-cloud/features/external-resources/handlers/decision/createElement.d.ts +13 -0
- package/lib/camunda-cloud/features/external-resources/handlers/decision/createElement.js +35 -0
- package/lib/camunda-cloud/features/external-resources/handlers/decision/index.d.ts +8 -0
- package/lib/camunda-cloud/features/external-resources/handlers/decision/index.js +14 -0
- package/lib/camunda-cloud/features/external-resources/handlers/decision/replaceElement.d.ts +15 -0
- package/lib/camunda-cloud/features/external-resources/handlers/decision/replaceElement.js +77 -0
- package/lib/camunda-cloud/features/external-resources/handlers/decision/searchTerms.d.ts +1 -0
- package/lib/camunda-cloud/features/external-resources/handlers/decision/searchTerms.js +6 -0
- package/lib/camunda-cloud/features/external-resources/handlers/form/AppendMenuProvider.d.ts +5 -0
- package/lib/camunda-cloud/features/external-resources/handlers/form/AppendMenuProvider.js +19 -0
- package/lib/camunda-cloud/features/external-resources/handlers/form/CreateMenuProvider.d.ts +5 -0
- package/lib/camunda-cloud/features/external-resources/handlers/form/CreateMenuProvider.js +19 -0
- package/lib/camunda-cloud/features/external-resources/handlers/form/ReplaceMenuProvider.d.ts +5 -0
- package/lib/camunda-cloud/features/external-resources/handlers/form/ReplaceMenuProvider.js +19 -0
- package/lib/camunda-cloud/features/external-resources/handlers/form/createElement.d.ts +9 -0
- package/lib/camunda-cloud/features/external-resources/handlers/form/createElement.js +39 -0
- package/lib/camunda-cloud/features/external-resources/handlers/form/index.d.ts +8 -0
- package/lib/camunda-cloud/features/external-resources/handlers/form/index.js +14 -0
- package/lib/camunda-cloud/features/external-resources/handlers/form/replaceElement.d.ts +15 -0
- package/lib/camunda-cloud/features/external-resources/handlers/form/replaceElement.js +82 -0
- package/lib/camunda-cloud/features/external-resources/handlers/form/searchTerms.d.ts +1 -0
- package/lib/camunda-cloud/features/external-resources/handlers/form/searchTerms.js +6 -0
- package/lib/camunda-cloud/features/external-resources/handlers/process/AppendMenuProvider.d.ts +5 -0
- package/lib/camunda-cloud/features/external-resources/handlers/process/AppendMenuProvider.js +19 -0
- package/lib/camunda-cloud/features/external-resources/handlers/process/CreateMenuProvider.d.ts +5 -0
- package/lib/camunda-cloud/features/external-resources/handlers/process/CreateMenuProvider.js +19 -0
- package/lib/camunda-cloud/features/external-resources/handlers/process/ReplaceMenuProvider.d.ts +5 -0
- package/lib/camunda-cloud/features/external-resources/handlers/process/ReplaceMenuProvider.js +19 -0
- package/lib/camunda-cloud/features/external-resources/handlers/process/createElement.d.ts +14 -0
- package/lib/camunda-cloud/features/external-resources/handlers/process/createElement.js +36 -0
- package/lib/camunda-cloud/features/external-resources/handlers/process/index.d.ts +8 -0
- package/lib/camunda-cloud/features/external-resources/handlers/process/index.js +14 -0
- package/lib/camunda-cloud/features/external-resources/handlers/process/replaceElement.d.ts +16 -0
- package/lib/camunda-cloud/features/external-resources/handlers/process/replaceElement.js +78 -0
- package/lib/camunda-cloud/features/external-resources/handlers/process/searchTerms.d.ts +1 -0
- package/lib/camunda-cloud/features/external-resources/handlers/process/searchTerms.js +6 -0
- package/lib/camunda-cloud/features/external-resources/handlers/util/BaseAppendMenuProvider.d.ts +18 -0
- package/lib/camunda-cloud/features/external-resources/handlers/util/BaseAppendMenuProvider.js +103 -0
- package/lib/camunda-cloud/features/external-resources/handlers/util/BaseCreateMenuProvider.d.ts +17 -0
- package/lib/camunda-cloud/features/external-resources/handlers/util/BaseCreateMenuProvider.js +84 -0
- package/lib/camunda-cloud/features/external-resources/handlers/util/BaseReplaceMenuProvider.d.ts +22 -0
- package/lib/camunda-cloud/features/external-resources/handlers/util/BaseReplaceMenuProvider.js +81 -0
- package/lib/camunda-cloud/features/external-resources/index.d.ts +23 -0
- package/lib/camunda-cloud/features/external-resources/index.js +27 -0
- package/package.json +4 -4
|
@@ -19001,8 +19001,8 @@
|
|
|
19001
19001
|
var pathData = pathMap.getScaledPath('EVENT_MESSAGE', {
|
|
19002
19002
|
xScaleFactor: 0.9,
|
|
19003
19003
|
yScaleFactor: 0.9,
|
|
19004
|
-
containerWidth: element.width,
|
|
19005
|
-
containerHeight: element.height,
|
|
19004
|
+
containerWidth: attrs.width || element.width,
|
|
19005
|
+
containerHeight: attrs.height || element.height,
|
|
19006
19006
|
position: {
|
|
19007
19007
|
mx: 0.235,
|
|
19008
19008
|
my: 0.315
|
|
@@ -19026,17 +19026,23 @@
|
|
|
19026
19026
|
return messagePath;
|
|
19027
19027
|
},
|
|
19028
19028
|
'bpmn:TimerEventDefinition': function(parentGfx, element, attrs = {}) {
|
|
19029
|
-
var
|
|
19029
|
+
var baseWidth = attrs.width || element.width;
|
|
19030
|
+
var baseHeight = attrs.height || element.height;
|
|
19031
|
+
|
|
19032
|
+
// use a lighter stroke for event suprocess icons
|
|
19033
|
+
var strokeWidth = attrs.width ? 1 : 2;
|
|
19034
|
+
|
|
19035
|
+
var circle = drawCircle(parentGfx, baseWidth, baseHeight, 0.2 * baseHeight, {
|
|
19030
19036
|
fill: getFillColor(element, defaultFillColor, attrs.fill),
|
|
19031
19037
|
stroke: getStrokeColor$1(element, defaultStrokeColor, attrs.stroke),
|
|
19032
|
-
strokeWidth:
|
|
19038
|
+
strokeWidth: strokeWidth
|
|
19033
19039
|
});
|
|
19034
19040
|
|
|
19035
19041
|
var pathData = pathMap.getScaledPath('EVENT_TIMER_WH', {
|
|
19036
19042
|
xScaleFactor: 0.75,
|
|
19037
19043
|
yScaleFactor: 0.75,
|
|
19038
|
-
containerWidth:
|
|
19039
|
-
containerHeight:
|
|
19044
|
+
containerWidth: baseWidth,
|
|
19045
|
+
containerHeight: baseHeight,
|
|
19040
19046
|
position: {
|
|
19041
19047
|
mx: 0.5,
|
|
19042
19048
|
my: 0.5
|
|
@@ -19045,23 +19051,23 @@
|
|
|
19045
19051
|
|
|
19046
19052
|
drawPath(parentGfx, pathData, {
|
|
19047
19053
|
stroke: getStrokeColor$1(element, defaultStrokeColor, attrs.stroke),
|
|
19048
|
-
strokeWidth:
|
|
19054
|
+
strokeWidth: strokeWidth
|
|
19049
19055
|
});
|
|
19050
19056
|
|
|
19051
19057
|
for (var i = 0; i < 12; i++) {
|
|
19052
19058
|
var linePathData = pathMap.getScaledPath('EVENT_TIMER_LINE', {
|
|
19053
19059
|
xScaleFactor: 0.75,
|
|
19054
19060
|
yScaleFactor: 0.75,
|
|
19055
|
-
containerWidth:
|
|
19056
|
-
containerHeight:
|
|
19061
|
+
containerWidth: baseWidth,
|
|
19062
|
+
containerHeight: baseHeight,
|
|
19057
19063
|
position: {
|
|
19058
19064
|
mx: 0.5,
|
|
19059
19065
|
my: 0.5
|
|
19060
19066
|
}
|
|
19061
19067
|
});
|
|
19062
19068
|
|
|
19063
|
-
var width =
|
|
19064
|
-
height =
|
|
19069
|
+
var width = baseWidth / 2,
|
|
19070
|
+
height = baseHeight / 2;
|
|
19065
19071
|
|
|
19066
19072
|
drawPath(parentGfx, linePathData, {
|
|
19067
19073
|
strokeWidth: 1,
|
|
@@ -19076,8 +19082,8 @@
|
|
|
19076
19082
|
var pathData = pathMap.getScaledPath('EVENT_ESCALATION', {
|
|
19077
19083
|
xScaleFactor: 1,
|
|
19078
19084
|
yScaleFactor: 1,
|
|
19079
|
-
containerWidth: event.width,
|
|
19080
|
-
containerHeight: event.height,
|
|
19085
|
+
containerWidth: attrs.width || event.width,
|
|
19086
|
+
containerHeight: attrs.height || event.height,
|
|
19081
19087
|
position: {
|
|
19082
19088
|
mx: 0.5,
|
|
19083
19089
|
my: 0.2
|
|
@@ -19098,8 +19104,8 @@
|
|
|
19098
19104
|
var pathData = pathMap.getScaledPath('EVENT_CONDITIONAL', {
|
|
19099
19105
|
xScaleFactor: 1,
|
|
19100
19106
|
yScaleFactor: 1,
|
|
19101
|
-
containerWidth: event.width,
|
|
19102
|
-
containerHeight: event.height,
|
|
19107
|
+
containerWidth: attrs.width || event.width,
|
|
19108
|
+
containerHeight: attrs.height || event.height,
|
|
19103
19109
|
position: {
|
|
19104
19110
|
mx: 0.5,
|
|
19105
19111
|
my: 0.222
|
|
@@ -19138,8 +19144,8 @@
|
|
|
19138
19144
|
var pathData = pathMap.getScaledPath('EVENT_ERROR', {
|
|
19139
19145
|
xScaleFactor: 1.1,
|
|
19140
19146
|
yScaleFactor: 1.1,
|
|
19141
|
-
containerWidth: event.width,
|
|
19142
|
-
containerHeight: event.height,
|
|
19147
|
+
containerWidth: attrs.width || event.width,
|
|
19148
|
+
containerHeight: attrs.height || event.height,
|
|
19143
19149
|
position: {
|
|
19144
19150
|
mx: 0.2,
|
|
19145
19151
|
my: 0.722
|
|
@@ -19184,8 +19190,8 @@
|
|
|
19184
19190
|
var pathData = pathMap.getScaledPath('EVENT_COMPENSATION', {
|
|
19185
19191
|
xScaleFactor: 1,
|
|
19186
19192
|
yScaleFactor: 1,
|
|
19187
|
-
containerWidth: event.width,
|
|
19188
|
-
containerHeight: event.height,
|
|
19193
|
+
containerWidth: attrs.width || event.width,
|
|
19194
|
+
containerHeight: attrs.height || event.height,
|
|
19189
19195
|
position: {
|
|
19190
19196
|
mx: 0.22,
|
|
19191
19197
|
my: 0.5
|
|
@@ -19206,8 +19212,8 @@
|
|
|
19206
19212
|
var pathData = pathMap.getScaledPath('EVENT_SIGNAL', {
|
|
19207
19213
|
xScaleFactor: 0.9,
|
|
19208
19214
|
yScaleFactor: 0.9,
|
|
19209
|
-
containerWidth: event.width,
|
|
19210
|
-
containerHeight: event.height,
|
|
19215
|
+
containerWidth: attrs.width || event.width,
|
|
19216
|
+
containerHeight: attrs.height || event.height,
|
|
19211
19217
|
position: {
|
|
19212
19218
|
mx: 0.5,
|
|
19213
19219
|
my: 0.2
|
|
@@ -19228,10 +19234,10 @@
|
|
|
19228
19234
|
var pathData = pathMap.getScaledPath('EVENT_MULTIPLE', {
|
|
19229
19235
|
xScaleFactor: 1.1,
|
|
19230
19236
|
yScaleFactor: 1.1,
|
|
19231
|
-
containerWidth: event.width,
|
|
19232
|
-
containerHeight: event.height,
|
|
19237
|
+
containerWidth: attrs.width || event.width,
|
|
19238
|
+
containerHeight: attrs.height || event.height,
|
|
19233
19239
|
position: {
|
|
19234
|
-
mx: 0.
|
|
19240
|
+
mx: 0.211,
|
|
19235
19241
|
my: 0.36
|
|
19236
19242
|
}
|
|
19237
19243
|
});
|
|
@@ -19242,6 +19248,7 @@
|
|
|
19242
19248
|
|
|
19243
19249
|
return drawPath(parentGfx, pathData, {
|
|
19244
19250
|
fill,
|
|
19251
|
+
stroke: getStrokeColor$1(event, defaultStrokeColor, attrs.stroke),
|
|
19245
19252
|
strokeWidth: 1
|
|
19246
19253
|
});
|
|
19247
19254
|
},
|
|
@@ -19249,8 +19256,8 @@
|
|
|
19249
19256
|
var pathData = pathMap.getScaledPath('EVENT_PARALLEL_MULTIPLE', {
|
|
19250
19257
|
xScaleFactor: 1.2,
|
|
19251
19258
|
yScaleFactor: 1.2,
|
|
19252
|
-
containerWidth: event.width,
|
|
19253
|
-
containerHeight: event.height,
|
|
19259
|
+
containerWidth: attrs.width || event.width,
|
|
19260
|
+
containerHeight: attrs.height || event.height,
|
|
19254
19261
|
position: {
|
|
19255
19262
|
mx: 0.458,
|
|
19256
19263
|
my: 0.194
|
|
@@ -19274,57 +19281,59 @@
|
|
|
19274
19281
|
}
|
|
19275
19282
|
};
|
|
19276
19283
|
|
|
19277
|
-
function renderEventIcon(element, parentGfx, attrs = {}) {
|
|
19284
|
+
function renderEventIcon(element, parentGfx, attrs = {}, proxyElement) {
|
|
19278
19285
|
var semantic = getBusinessObject$2(element),
|
|
19279
19286
|
isThrowing = isThrowEvent(semantic);
|
|
19280
19287
|
|
|
19288
|
+
var nodeElement = proxyElement || element;
|
|
19289
|
+
|
|
19281
19290
|
if (semantic.get('eventDefinitions') && semantic.get('eventDefinitions').length > 1) {
|
|
19282
19291
|
if (semantic.get('parallelMultiple')) {
|
|
19283
|
-
return eventIconRenderers[ 'bpmn:ParallelMultipleEventDefinition' ](parentGfx,
|
|
19292
|
+
return eventIconRenderers[ 'bpmn:ParallelMultipleEventDefinition' ](parentGfx, nodeElement, attrs, isThrowing);
|
|
19284
19293
|
}
|
|
19285
19294
|
else {
|
|
19286
|
-
return eventIconRenderers[ 'bpmn:MultipleEventDefinition' ](parentGfx,
|
|
19295
|
+
return eventIconRenderers[ 'bpmn:MultipleEventDefinition' ](parentGfx, nodeElement, attrs, isThrowing);
|
|
19287
19296
|
}
|
|
19288
19297
|
}
|
|
19289
19298
|
|
|
19290
19299
|
if (isTypedEvent(semantic, 'bpmn:MessageEventDefinition')) {
|
|
19291
|
-
return eventIconRenderers[ 'bpmn:MessageEventDefinition' ](parentGfx,
|
|
19300
|
+
return eventIconRenderers[ 'bpmn:MessageEventDefinition' ](parentGfx, nodeElement, attrs, isThrowing);
|
|
19292
19301
|
}
|
|
19293
19302
|
|
|
19294
19303
|
if (isTypedEvent(semantic, 'bpmn:TimerEventDefinition')) {
|
|
19295
|
-
return eventIconRenderers[ 'bpmn:TimerEventDefinition' ](parentGfx,
|
|
19304
|
+
return eventIconRenderers[ 'bpmn:TimerEventDefinition' ](parentGfx, nodeElement, attrs, isThrowing);
|
|
19296
19305
|
}
|
|
19297
19306
|
|
|
19298
19307
|
if (isTypedEvent(semantic, 'bpmn:ConditionalEventDefinition')) {
|
|
19299
|
-
return eventIconRenderers[ 'bpmn:ConditionalEventDefinition' ](parentGfx,
|
|
19308
|
+
return eventIconRenderers[ 'bpmn:ConditionalEventDefinition' ](parentGfx, nodeElement, attrs, isThrowing);
|
|
19300
19309
|
}
|
|
19301
19310
|
|
|
19302
19311
|
if (isTypedEvent(semantic, 'bpmn:SignalEventDefinition')) {
|
|
19303
|
-
return eventIconRenderers[ 'bpmn:SignalEventDefinition' ](parentGfx,
|
|
19312
|
+
return eventIconRenderers[ 'bpmn:SignalEventDefinition' ](parentGfx, nodeElement, attrs, isThrowing);
|
|
19304
19313
|
}
|
|
19305
19314
|
|
|
19306
19315
|
if (isTypedEvent(semantic, 'bpmn:EscalationEventDefinition')) {
|
|
19307
|
-
return eventIconRenderers[ 'bpmn:EscalationEventDefinition' ](parentGfx,
|
|
19316
|
+
return eventIconRenderers[ 'bpmn:EscalationEventDefinition' ](parentGfx, nodeElement, attrs, isThrowing);
|
|
19308
19317
|
}
|
|
19309
19318
|
|
|
19310
19319
|
if (isTypedEvent(semantic, 'bpmn:LinkEventDefinition')) {
|
|
19311
|
-
return eventIconRenderers[ 'bpmn:LinkEventDefinition' ](parentGfx,
|
|
19320
|
+
return eventIconRenderers[ 'bpmn:LinkEventDefinition' ](parentGfx, nodeElement, attrs, isThrowing);
|
|
19312
19321
|
}
|
|
19313
19322
|
|
|
19314
19323
|
if (isTypedEvent(semantic, 'bpmn:ErrorEventDefinition')) {
|
|
19315
|
-
return eventIconRenderers[ 'bpmn:ErrorEventDefinition' ](parentGfx,
|
|
19324
|
+
return eventIconRenderers[ 'bpmn:ErrorEventDefinition' ](parentGfx, nodeElement, attrs, isThrowing);
|
|
19316
19325
|
}
|
|
19317
19326
|
|
|
19318
19327
|
if (isTypedEvent(semantic, 'bpmn:CancelEventDefinition')) {
|
|
19319
|
-
return eventIconRenderers[ 'bpmn:CancelEventDefinition' ](parentGfx,
|
|
19328
|
+
return eventIconRenderers[ 'bpmn:CancelEventDefinition' ](parentGfx, nodeElement, attrs, isThrowing);
|
|
19320
19329
|
}
|
|
19321
19330
|
|
|
19322
19331
|
if (isTypedEvent(semantic, 'bpmn:CompensateEventDefinition')) {
|
|
19323
|
-
return eventIconRenderers[ 'bpmn:CompensateEventDefinition' ](parentGfx,
|
|
19332
|
+
return eventIconRenderers[ 'bpmn:CompensateEventDefinition' ](parentGfx, nodeElement, attrs, isThrowing);
|
|
19324
19333
|
}
|
|
19325
19334
|
|
|
19326
19335
|
if (isTypedEvent(semantic, 'bpmn:TerminateEventDefinition')) {
|
|
19327
|
-
return eventIconRenderers[ 'bpmn:TerminateEventDefinition' ](parentGfx,
|
|
19336
|
+
return eventIconRenderers[ 'bpmn:TerminateEventDefinition' ](parentGfx, nodeElement, attrs, isThrowing);
|
|
19328
19337
|
}
|
|
19329
19338
|
|
|
19330
19339
|
return null;
|
|
@@ -19746,14 +19755,23 @@
|
|
|
19746
19755
|
function renderSubProcess(parentGfx, element, attrs = {}) {
|
|
19747
19756
|
var activity = renderActivity(parentGfx, element, attrs);
|
|
19748
19757
|
|
|
19758
|
+
var expanded = isExpanded$1(element);
|
|
19759
|
+
|
|
19749
19760
|
if (isEventSubProcess(element)) {
|
|
19750
19761
|
attr(activity, {
|
|
19751
19762
|
strokeDasharray: '0, 5.5',
|
|
19752
19763
|
strokeWidth: 2.5
|
|
19753
19764
|
});
|
|
19754
|
-
}
|
|
19755
19765
|
|
|
19756
|
-
|
|
19766
|
+
if (!expanded) {
|
|
19767
|
+
var flowElements = getBusinessObject$2(element).flowElements || [];
|
|
19768
|
+
var startEvents = flowElements.filter(e => is$5(e, 'bpmn:StartEvent'));
|
|
19769
|
+
|
|
19770
|
+
if (startEvents.length === 1) {
|
|
19771
|
+
renderEventSubProcessIcon(startEvents[0], parentGfx, attrs, element);
|
|
19772
|
+
}
|
|
19773
|
+
}
|
|
19774
|
+
}
|
|
19757
19775
|
|
|
19758
19776
|
renderEmbeddedLabel(parentGfx, element, expanded ? 'center-top' : 'center-middle', attrs);
|
|
19759
19777
|
|
|
@@ -19766,6 +19784,39 @@
|
|
|
19766
19784
|
return activity;
|
|
19767
19785
|
}
|
|
19768
19786
|
|
|
19787
|
+
function renderEventSubProcessIcon(startEvent, parentGfx, attrs, proxyElement) {
|
|
19788
|
+
var iconSize = 22;
|
|
19789
|
+
|
|
19790
|
+
// match the colors of the enclosing subprocess
|
|
19791
|
+
var proxyAttrs = {
|
|
19792
|
+
fill: getFillColor(proxyElement, defaultFillColor, attrs.fill),
|
|
19793
|
+
stroke: getStrokeColor$1(proxyElement, defaultStrokeColor, attrs.stroke),
|
|
19794
|
+
width: iconSize,
|
|
19795
|
+
height: iconSize
|
|
19796
|
+
};
|
|
19797
|
+
|
|
19798
|
+
var interrupting = getBusinessObject$2(startEvent).isInterrupting;
|
|
19799
|
+
var strokeDasharray = interrupting ? 0 : 3;
|
|
19800
|
+
|
|
19801
|
+
// better visibility for non-interrupting events
|
|
19802
|
+
var strokeWidth = interrupting ? 1 : 1.2;
|
|
19803
|
+
|
|
19804
|
+
// make the icon look larger by drawing a smaller circle
|
|
19805
|
+
var circleSize = 20;
|
|
19806
|
+
var shift = (iconSize - circleSize) / 2;
|
|
19807
|
+
var transform = 'translate(' + shift + ',' + shift + ')';
|
|
19808
|
+
|
|
19809
|
+
drawCircle(parentGfx, circleSize, circleSize, {
|
|
19810
|
+
fill: proxyAttrs.fill,
|
|
19811
|
+
stroke: proxyAttrs.stroke,
|
|
19812
|
+
strokeWidth,
|
|
19813
|
+
strokeDasharray,
|
|
19814
|
+
transform
|
|
19815
|
+
});
|
|
19816
|
+
|
|
19817
|
+
renderEventIcon(startEvent, parentGfx, proxyAttrs, proxyElement);
|
|
19818
|
+
}
|
|
19819
|
+
|
|
19769
19820
|
function renderTask(parentGfx, element, attrs = {}) {
|
|
19770
19821
|
var activity = renderActivity(parentGfx, element, attrs);
|
|
19771
19822
|
|
|
@@ -56608,7 +56659,7 @@
|
|
|
56608
56659
|
* @param {Translate} translate
|
|
56609
56660
|
* @param {ModdleCopy} moddleCopy
|
|
56610
56661
|
*/
|
|
56611
|
-
function ReplaceMenuProvider(
|
|
56662
|
+
function ReplaceMenuProvider$3(
|
|
56612
56663
|
bpmnFactory, popupMenu, modeling, moddle,
|
|
56613
56664
|
bpmnReplace, rules, translate, moddleCopy) {
|
|
56614
56665
|
|
|
@@ -56624,7 +56675,7 @@
|
|
|
56624
56675
|
this._register();
|
|
56625
56676
|
}
|
|
56626
56677
|
|
|
56627
|
-
ReplaceMenuProvider.$inject = [
|
|
56678
|
+
ReplaceMenuProvider$3.$inject = [
|
|
56628
56679
|
'bpmnFactory',
|
|
56629
56680
|
'popupMenu',
|
|
56630
56681
|
'modeling',
|
|
@@ -56635,7 +56686,7 @@
|
|
|
56635
56686
|
'moddleCopy'
|
|
56636
56687
|
];
|
|
56637
56688
|
|
|
56638
|
-
ReplaceMenuProvider.prototype._register = function() {
|
|
56689
|
+
ReplaceMenuProvider$3.prototype._register = function() {
|
|
56639
56690
|
this._popupMenu.registerProvider('bpmn-replace', this);
|
|
56640
56691
|
};
|
|
56641
56692
|
|
|
@@ -56644,7 +56695,7 @@
|
|
|
56644
56695
|
*
|
|
56645
56696
|
* @return {PopupMenuEntries}
|
|
56646
56697
|
*/
|
|
56647
|
-
ReplaceMenuProvider.prototype.getPopupMenuEntries = function(target) {
|
|
56698
|
+
ReplaceMenuProvider$3.prototype.getPopupMenuEntries = function(target) {
|
|
56648
56699
|
|
|
56649
56700
|
var businessObject = target.businessObject;
|
|
56650
56701
|
|
|
@@ -56859,7 +56910,7 @@
|
|
|
56859
56910
|
*
|
|
56860
56911
|
* @return {PopupMenuHeaderEntries}
|
|
56861
56912
|
*/
|
|
56862
|
-
ReplaceMenuProvider.prototype.getPopupMenuHeaderEntries = function(target) {
|
|
56913
|
+
ReplaceMenuProvider$3.prototype.getPopupMenuHeaderEntries = function(target) {
|
|
56863
56914
|
|
|
56864
56915
|
var headerEntries = {};
|
|
56865
56916
|
|
|
@@ -56903,7 +56954,7 @@
|
|
|
56903
56954
|
*
|
|
56904
56955
|
* @return {PopupMenuEntries}
|
|
56905
56956
|
*/
|
|
56906
|
-
ReplaceMenuProvider.prototype._createEntries = function(target, replaceOptions) {
|
|
56957
|
+
ReplaceMenuProvider$3.prototype._createEntries = function(target, replaceOptions) {
|
|
56907
56958
|
var entries = {};
|
|
56908
56959
|
|
|
56909
56960
|
var self = this;
|
|
@@ -56923,7 +56974,7 @@
|
|
|
56923
56974
|
*
|
|
56924
56975
|
* @return {PopupMenuEntries}
|
|
56925
56976
|
*/
|
|
56926
|
-
ReplaceMenuProvider.prototype._createSequenceFlowEntries = function(target, replaceOptions) {
|
|
56977
|
+
ReplaceMenuProvider$3.prototype._createSequenceFlowEntries = function(target, replaceOptions) {
|
|
56927
56978
|
|
|
56928
56979
|
var businessObject = getBusinessObject$2(target);
|
|
56929
56980
|
|
|
@@ -57005,7 +57056,7 @@
|
|
|
57005
57056
|
*
|
|
57006
57057
|
* @return {PopupMenuEntry}
|
|
57007
57058
|
*/
|
|
57008
|
-
ReplaceMenuProvider.prototype._createEntry = function(replaceOption, target, action) {
|
|
57059
|
+
ReplaceMenuProvider$3.prototype._createEntry = function(replaceOption, target, action) {
|
|
57009
57060
|
var translate = this._translate;
|
|
57010
57061
|
var replaceElement = this._bpmnReplace.replaceElement;
|
|
57011
57062
|
|
|
@@ -57034,7 +57085,7 @@
|
|
|
57034
57085
|
*
|
|
57035
57086
|
* @return {PopupMenuHeaderEntries}
|
|
57036
57087
|
*/
|
|
57037
|
-
ReplaceMenuProvider.prototype._getLoopCharacteristicsHeaderEntries = function(target) {
|
|
57088
|
+
ReplaceMenuProvider$3.prototype._getLoopCharacteristicsHeaderEntries = function(target) {
|
|
57038
57089
|
|
|
57039
57090
|
var self = this;
|
|
57040
57091
|
var translate = this._translate;
|
|
@@ -57113,7 +57164,7 @@
|
|
|
57113
57164
|
*
|
|
57114
57165
|
* @return {PopupMenuHeaderEntries}
|
|
57115
57166
|
*/
|
|
57116
|
-
ReplaceMenuProvider.prototype._getCollectionHeaderEntries = function(target) {
|
|
57167
|
+
ReplaceMenuProvider$3.prototype._getCollectionHeaderEntries = function(target) {
|
|
57117
57168
|
|
|
57118
57169
|
var self = this;
|
|
57119
57170
|
var translate = this._translate;
|
|
@@ -57150,7 +57201,7 @@
|
|
|
57150
57201
|
*
|
|
57151
57202
|
* @return {PopupMenuHeaderEntries}
|
|
57152
57203
|
*/
|
|
57153
|
-
ReplaceMenuProvider.prototype._getParticipantMultiplicityHeaderEntries = function(target) {
|
|
57204
|
+
ReplaceMenuProvider$3.prototype._getParticipantMultiplicityHeaderEntries = function(target) {
|
|
57154
57205
|
|
|
57155
57206
|
var self = this;
|
|
57156
57207
|
var bpmnFactory = this._bpmnFactory;
|
|
@@ -57181,7 +57232,7 @@
|
|
|
57181
57232
|
};
|
|
57182
57233
|
};
|
|
57183
57234
|
|
|
57184
|
-
ReplaceMenuProvider.prototype._getNonInterruptingHeaderEntries = function(element) {
|
|
57235
|
+
ReplaceMenuProvider$3.prototype._getNonInterruptingHeaderEntries = function(element) {
|
|
57185
57236
|
const translate = this._translate;
|
|
57186
57237
|
const businessObject = getBusinessObject$2(element);
|
|
57187
57238
|
const self = this;
|
|
@@ -57215,7 +57266,7 @@
|
|
|
57215
57266
|
__init__: [
|
|
57216
57267
|
'replaceMenuProvider'
|
|
57217
57268
|
],
|
|
57218
|
-
replaceMenuProvider: [ 'type', ReplaceMenuProvider ]
|
|
57269
|
+
replaceMenuProvider: [ 'type', ReplaceMenuProvider$3 ]
|
|
57219
57270
|
};
|
|
57220
57271
|
|
|
57221
57272
|
/**
|
|
@@ -115614,19 +115665,19 @@
|
|
|
115614
115665
|
};
|
|
115615
115666
|
MultiCommandHandler$1.$inject = ['commandStack'];
|
|
115616
115667
|
|
|
115617
|
-
const HANDLERS = {
|
|
115668
|
+
const HANDLERS$1 = {
|
|
115618
115669
|
'properties-panel.multi-command-executor': MultiCommandHandler$1
|
|
115619
115670
|
};
|
|
115620
|
-
function CommandInitializer(eventBus, commandStack) {
|
|
115671
|
+
function CommandInitializer$1(eventBus, commandStack) {
|
|
115621
115672
|
eventBus.on('diagram.init', function () {
|
|
115622
|
-
forEach$2(HANDLERS, function (handler, id) {
|
|
115673
|
+
forEach$2(HANDLERS$1, function (handler, id) {
|
|
115623
115674
|
commandStack.registerHandler(id, handler);
|
|
115624
115675
|
});
|
|
115625
115676
|
});
|
|
115626
115677
|
}
|
|
115627
|
-
CommandInitializer.$inject = ['eventBus', 'commandStack'];
|
|
115678
|
+
CommandInitializer$1.$inject = ['eventBus', 'commandStack'];
|
|
115628
115679
|
var Commands = {
|
|
115629
|
-
__init__: [CommandInitializer]
|
|
115680
|
+
__init__: [CommandInitializer$1]
|
|
115630
115681
|
};
|
|
115631
115682
|
|
|
115632
115683
|
var index$3$1 = {
|
|
@@ -115635,6 +115686,188 @@
|
|
|
115635
115686
|
propertiesPanel: ['type', BpmnPropertiesPanelRenderer]
|
|
115636
115687
|
};
|
|
115637
115688
|
|
|
115689
|
+
/**
|
|
115690
|
+
* Create a new element and (optionally) set its parent.
|
|
115691
|
+
*
|
|
115692
|
+
* @param {string} type
|
|
115693
|
+
* @param {Object} properties
|
|
115694
|
+
* @param {import('bpmn-js/lib/model/Types').ModdleElement} parent
|
|
115695
|
+
* @param {import('bpmn-js/lib/features/modeling/BpmnFactory').default} bpmnFactory
|
|
115696
|
+
*
|
|
115697
|
+
* @returns {import('bpmn-js/lib/model/Types').ModdleElement}
|
|
115698
|
+
*/
|
|
115699
|
+
function createElement$6(type, properties, parent, bpmnFactory) {
|
|
115700
|
+
const element = bpmnFactory.create(type, properties);
|
|
115701
|
+
if (parent) {
|
|
115702
|
+
element.$parent = parent;
|
|
115703
|
+
}
|
|
115704
|
+
return element;
|
|
115705
|
+
}
|
|
115706
|
+
|
|
115707
|
+
/**
|
|
115708
|
+
* generate a semantic id with given prefix
|
|
115709
|
+
*/
|
|
115710
|
+
function nextId$1(prefix) {
|
|
115711
|
+
const ids = new Ids$1([32, 32, 1]);
|
|
115712
|
+
return ids.nextPrefixed(prefix);
|
|
115713
|
+
}
|
|
115714
|
+
function getRoot$1(businessObject) {
|
|
115715
|
+
let parent = businessObject;
|
|
115716
|
+
while (parent.$parent) {
|
|
115717
|
+
parent = parent.$parent;
|
|
115718
|
+
}
|
|
115719
|
+
return parent;
|
|
115720
|
+
}
|
|
115721
|
+
function filterElementsByType$1(objectList, type) {
|
|
115722
|
+
const list = objectList || [];
|
|
115723
|
+
return list.filter(element => is$5(element, type));
|
|
115724
|
+
}
|
|
115725
|
+
function findRootElementsByType$1(businessObject, referencedType) {
|
|
115726
|
+
const root = getRoot$1(businessObject);
|
|
115727
|
+
return filterElementsByType$1(root.get('rootElements'), referencedType);
|
|
115728
|
+
}
|
|
115729
|
+
function findRootElementById$1(businessObject, type, id) {
|
|
115730
|
+
const elements = findRootElementsByType$1(businessObject, type);
|
|
115731
|
+
return elements.find(element => element.id === id);
|
|
115732
|
+
}
|
|
115733
|
+
|
|
115734
|
+
/**
|
|
115735
|
+
* createOrUpdateFormalExpression - upserts a specific formal expression
|
|
115736
|
+
*
|
|
115737
|
+
* If the value is falsy, the formal expression is removed.
|
|
115738
|
+
*
|
|
115739
|
+
* @param {djs.model.Base} element
|
|
115740
|
+
* @param {ModdleElement} moddleElement
|
|
115741
|
+
* @param {string} propertyName
|
|
115742
|
+
* @param {string} newValue
|
|
115743
|
+
* @param {BpmnFactory} bpmnFactory
|
|
115744
|
+
* @param {CommandStack} commandStack
|
|
115745
|
+
*/
|
|
115746
|
+
function createOrUpdateFormalExpression(element, moddleElement, propertyName, newValue, bpmnFactory, commandStack) {
|
|
115747
|
+
return commandStack.execute('element.updateModdleProperties', createOrUpdateFormalExpressionCommand(element, moddleElement, propertyName, newValue, bpmnFactory));
|
|
115748
|
+
}
|
|
115749
|
+
|
|
115750
|
+
/**
|
|
115751
|
+
* createOrUpdateFormalExpressionCommand - creates a command to upsert a specific formal expression
|
|
115752
|
+
*
|
|
115753
|
+
* If the value is falsy, the formal expression is removed.
|
|
115754
|
+
*
|
|
115755
|
+
* @param {djs.model.Base} element
|
|
115756
|
+
* @param {ModdleElement} moddleElement
|
|
115757
|
+
* @param {string} propertyName
|
|
115758
|
+
* @param {string} newValue
|
|
115759
|
+
* @param {BpmnFactory} bpmnFactory
|
|
115760
|
+
*/
|
|
115761
|
+
function createOrUpdateFormalExpressionCommand(element, moddleElement, propertyName, newValue, bpmnFactory) {
|
|
115762
|
+
const expressionProps = {};
|
|
115763
|
+
if (!newValue) {
|
|
115764
|
+
// remove formal expression
|
|
115765
|
+
expressionProps[propertyName] = undefined;
|
|
115766
|
+
return {
|
|
115767
|
+
element,
|
|
115768
|
+
moddleElement,
|
|
115769
|
+
properties: expressionProps
|
|
115770
|
+
};
|
|
115771
|
+
}
|
|
115772
|
+
const existingExpression = moddleElement.get(propertyName);
|
|
115773
|
+
if (existingExpression) {
|
|
115774
|
+
// edit existing formal expression
|
|
115775
|
+
return {
|
|
115776
|
+
element,
|
|
115777
|
+
moddleElement: existingExpression,
|
|
115778
|
+
properties: {
|
|
115779
|
+
body: newValue
|
|
115780
|
+
}
|
|
115781
|
+
};
|
|
115782
|
+
}
|
|
115783
|
+
|
|
115784
|
+
// add formal expression
|
|
115785
|
+
expressionProps[propertyName] = createElement$6('bpmn:FormalExpression', {
|
|
115786
|
+
body: newValue
|
|
115787
|
+
}, moddleElement, bpmnFactory);
|
|
115788
|
+
return {
|
|
115789
|
+
element,
|
|
115790
|
+
moddleElement,
|
|
115791
|
+
properties: expressionProps
|
|
115792
|
+
};
|
|
115793
|
+
}
|
|
115794
|
+
|
|
115795
|
+
/**
|
|
115796
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
115797
|
+
*/
|
|
115798
|
+
|
|
115799
|
+
/**
|
|
115800
|
+
* @returns {Array<Entry>} entries
|
|
115801
|
+
*/
|
|
115802
|
+
function AdHocCompletionProps$1(props) {
|
|
115803
|
+
const {
|
|
115804
|
+
element
|
|
115805
|
+
} = props;
|
|
115806
|
+
if (!is$5(element, 'bpmn:AdHocSubProcess')) {
|
|
115807
|
+
return [];
|
|
115808
|
+
}
|
|
115809
|
+
return [{
|
|
115810
|
+
id: 'completionCondition',
|
|
115811
|
+
component: CompletionCondition$3,
|
|
115812
|
+
isEdited: isEdited
|
|
115813
|
+
}, {
|
|
115814
|
+
id: 'cancelRemainingInstances',
|
|
115815
|
+
component: CancelRemainingInstances,
|
|
115816
|
+
isEdited: node => node && !node.checked // the default value is true
|
|
115817
|
+
}];
|
|
115818
|
+
}
|
|
115819
|
+
function CompletionCondition$3(props) {
|
|
115820
|
+
const {
|
|
115821
|
+
element
|
|
115822
|
+
} = props;
|
|
115823
|
+
const bpmnFactory = useService$1('bpmnFactory');
|
|
115824
|
+
const debounce = useService$1('debounceInput');
|
|
115825
|
+
const commandStack = useService$1('commandStack');
|
|
115826
|
+
const translate = useService$1('translate');
|
|
115827
|
+
const getValue = () => {
|
|
115828
|
+
const expression = getBusinessObject$2(element).get('completionCondition');
|
|
115829
|
+
return expression && expression.get('body');
|
|
115830
|
+
};
|
|
115831
|
+
const setValue = value => {
|
|
115832
|
+
return createOrUpdateFormalExpression(element, getBusinessObject$2(element), 'completionCondition', value, bpmnFactory, commandStack);
|
|
115833
|
+
};
|
|
115834
|
+
return TextfieldEntry({
|
|
115835
|
+
element,
|
|
115836
|
+
id: 'completionCondition',
|
|
115837
|
+
label: translate('Completion condition'),
|
|
115838
|
+
getValue,
|
|
115839
|
+
setValue,
|
|
115840
|
+
debounce
|
|
115841
|
+
});
|
|
115842
|
+
}
|
|
115843
|
+
function CancelRemainingInstances(props) {
|
|
115844
|
+
const {
|
|
115845
|
+
element
|
|
115846
|
+
} = props;
|
|
115847
|
+
const commandStack = useService$1('commandStack');
|
|
115848
|
+
const translate = useService$1('translate');
|
|
115849
|
+
const businessObject = getBusinessObject$2(element);
|
|
115850
|
+
const getValue = () => {
|
|
115851
|
+
return businessObject.get('cancelRemainingInstances');
|
|
115852
|
+
};
|
|
115853
|
+
const setValue = value => {
|
|
115854
|
+
commandStack.execute('element.updateModdleProperties', {
|
|
115855
|
+
element,
|
|
115856
|
+
moddleElement: businessObject,
|
|
115857
|
+
properties: {
|
|
115858
|
+
cancelRemainingInstances: value
|
|
115859
|
+
}
|
|
115860
|
+
});
|
|
115861
|
+
};
|
|
115862
|
+
return CheckboxEntry({
|
|
115863
|
+
element,
|
|
115864
|
+
id: 'cancelRemainingInstances',
|
|
115865
|
+
label: translate('Cancel remaining instances'),
|
|
115866
|
+
getValue,
|
|
115867
|
+
setValue
|
|
115868
|
+
});
|
|
115869
|
+
}
|
|
115870
|
+
|
|
115638
115871
|
function ReferenceSelectEntry$1(props) {
|
|
115639
115872
|
const {
|
|
115640
115873
|
autoFocusEntry,
|
|
@@ -116063,51 +116296,6 @@
|
|
|
116063
116296
|
};
|
|
116064
116297
|
}
|
|
116065
116298
|
|
|
116066
|
-
/**
|
|
116067
|
-
* Create a new element and (optionally) set its parent.
|
|
116068
|
-
*
|
|
116069
|
-
* @param {string} type
|
|
116070
|
-
* @param {Object} properties
|
|
116071
|
-
* @param {import('bpmn-js/lib/model/Types').ModdleElement} parent
|
|
116072
|
-
* @param {import('bpmn-js/lib/features/modeling/BpmnFactory').default} bpmnFactory
|
|
116073
|
-
*
|
|
116074
|
-
* @returns {import('bpmn-js/lib/model/Types').ModdleElement}
|
|
116075
|
-
*/
|
|
116076
|
-
function createElement$3(type, properties, parent, bpmnFactory) {
|
|
116077
|
-
const element = bpmnFactory.create(type, properties);
|
|
116078
|
-
if (parent) {
|
|
116079
|
-
element.$parent = parent;
|
|
116080
|
-
}
|
|
116081
|
-
return element;
|
|
116082
|
-
}
|
|
116083
|
-
|
|
116084
|
-
/**
|
|
116085
|
-
* generate a semantic id with given prefix
|
|
116086
|
-
*/
|
|
116087
|
-
function nextId$1(prefix) {
|
|
116088
|
-
const ids = new Ids$1([32, 32, 1]);
|
|
116089
|
-
return ids.nextPrefixed(prefix);
|
|
116090
|
-
}
|
|
116091
|
-
function getRoot$1(businessObject) {
|
|
116092
|
-
let parent = businessObject;
|
|
116093
|
-
while (parent.$parent) {
|
|
116094
|
-
parent = parent.$parent;
|
|
116095
|
-
}
|
|
116096
|
-
return parent;
|
|
116097
|
-
}
|
|
116098
|
-
function filterElementsByType$1(objectList, type) {
|
|
116099
|
-
const list = objectList || [];
|
|
116100
|
-
return list.filter(element => is$5(element, type));
|
|
116101
|
-
}
|
|
116102
|
-
function findRootElementsByType$1(businessObject, referencedType) {
|
|
116103
|
-
const root = getRoot$1(businessObject);
|
|
116104
|
-
return filterElementsByType$1(root.get('rootElements'), referencedType);
|
|
116105
|
-
}
|
|
116106
|
-
function findRootElementById$1(businessObject, type, id) {
|
|
116107
|
-
const elements = findRootElementsByType$1(businessObject, type);
|
|
116108
|
-
return elements.find(element => element.id === id);
|
|
116109
|
-
}
|
|
116110
|
-
|
|
116111
116299
|
const EMPTY_OPTION$4 = '';
|
|
116112
116300
|
const CREATE_NEW_OPTION$4 = 'create-new';
|
|
116113
116301
|
|
|
@@ -116166,7 +116354,7 @@
|
|
|
116166
116354
|
|
|
116167
116355
|
// (1) create new error
|
|
116168
116356
|
if (value === CREATE_NEW_OPTION$4) {
|
|
116169
|
-
error = createElement$
|
|
116357
|
+
error = createElement$6('bpmn:Error', {
|
|
116170
116358
|
name: nextId$1('Error_')
|
|
116171
116359
|
}, root, bpmnFactory);
|
|
116172
116360
|
value = error.get('id');
|
|
@@ -116345,7 +116533,7 @@
|
|
|
116345
116533
|
// (1) create new escalation
|
|
116346
116534
|
if (value === CREATE_NEW_OPTION$3) {
|
|
116347
116535
|
const id = nextId$1('Escalation_');
|
|
116348
|
-
escalation = createElement$
|
|
116536
|
+
escalation = createElement$6('bpmn:Escalation', {
|
|
116349
116537
|
id,
|
|
116350
116538
|
name: id
|
|
116351
116539
|
}, root, bpmnFactory);
|
|
@@ -116733,7 +116921,7 @@
|
|
|
116733
116921
|
// (1) create new message
|
|
116734
116922
|
if (value === CREATE_NEW_OPTION$2) {
|
|
116735
116923
|
const id = nextId$1('Message_');
|
|
116736
|
-
message = createElement$
|
|
116924
|
+
message = createElement$6('bpmn:Message', {
|
|
116737
116925
|
id,
|
|
116738
116926
|
name: id
|
|
116739
116927
|
}, root, bpmnFactory);
|
|
@@ -116849,7 +117037,7 @@
|
|
|
116849
117037
|
isEdited: isEdited
|
|
116850
117038
|
}, {
|
|
116851
117039
|
id: 'completionCondition',
|
|
116852
|
-
component: CompletionCondition$
|
|
117040
|
+
component: CompletionCondition$2,
|
|
116853
117041
|
isEdited: isEdited
|
|
116854
117042
|
}];
|
|
116855
117043
|
return entries;
|
|
@@ -116866,7 +117054,7 @@
|
|
|
116866
117054
|
return getLoopCardinalityValue(element);
|
|
116867
117055
|
};
|
|
116868
117056
|
const setValue = value => {
|
|
116869
|
-
return
|
|
117057
|
+
return createOrUpdateFormalExpression(element, getLoopCharacteristics$2(element), 'loopCardinality', value, bpmnFactory, commandStack);
|
|
116870
117058
|
};
|
|
116871
117059
|
return TextfieldEntry({
|
|
116872
117060
|
element,
|
|
@@ -116877,7 +117065,7 @@
|
|
|
116877
117065
|
debounce
|
|
116878
117066
|
});
|
|
116879
117067
|
}
|
|
116880
|
-
function CompletionCondition$
|
|
117068
|
+
function CompletionCondition$2(props) {
|
|
116881
117069
|
const {
|
|
116882
117070
|
element
|
|
116883
117071
|
} = props;
|
|
@@ -116889,7 +117077,7 @@
|
|
|
116889
117077
|
return getCompletionConditionValue(element);
|
|
116890
117078
|
};
|
|
116891
117079
|
const setValue = value => {
|
|
116892
|
-
return
|
|
117080
|
+
return createOrUpdateFormalExpression(element, getLoopCharacteristics$2(element), 'completionCondition', value, bpmnFactory, commandStack);
|
|
116893
117081
|
};
|
|
116894
117082
|
return TextfieldEntry({
|
|
116895
117083
|
element,
|
|
@@ -116950,62 +117138,6 @@
|
|
|
116950
117138
|
return bo.loopCharacteristics;
|
|
116951
117139
|
}
|
|
116952
117140
|
|
|
116953
|
-
/**
|
|
116954
|
-
* createFormalExpression - creates a 'bpmn:FormalExpression' element.
|
|
116955
|
-
*
|
|
116956
|
-
* @param {ModdleElement} parent
|
|
116957
|
-
* @param {string} body
|
|
116958
|
-
* @param {BpmnFactory} bpmnFactory
|
|
116959
|
-
*
|
|
116960
|
-
* @result {ModdleElement<bpmn:FormalExpression>} a formal expression
|
|
116961
|
-
*/
|
|
116962
|
-
function createFormalExpression$1(parent, body, bpmnFactory) {
|
|
116963
|
-
return createElement$3('bpmn:FormalExpression', {
|
|
116964
|
-
body: body
|
|
116965
|
-
}, parent, bpmnFactory);
|
|
116966
|
-
}
|
|
116967
|
-
|
|
116968
|
-
/**
|
|
116969
|
-
* updateFormalExpression - updates a specific formal expression of the loop characteristics.
|
|
116970
|
-
*
|
|
116971
|
-
* @param {djs.model.Base} element
|
|
116972
|
-
* @param {string} propertyName
|
|
116973
|
-
* @param {string} newValue
|
|
116974
|
-
* @param {BpmnFactory} bpmnFactory
|
|
116975
|
-
*/
|
|
116976
|
-
function updateFormalExpression(element, propertyName, newValue, bpmnFactory) {
|
|
116977
|
-
const loopCharacteristics = getLoopCharacteristics$2(element);
|
|
116978
|
-
const expressionProps = {};
|
|
116979
|
-
if (!newValue) {
|
|
116980
|
-
// remove formal expression
|
|
116981
|
-
expressionProps[propertyName] = undefined;
|
|
116982
|
-
return {
|
|
116983
|
-
element,
|
|
116984
|
-
moddleElement: loopCharacteristics,
|
|
116985
|
-
properties: expressionProps
|
|
116986
|
-
};
|
|
116987
|
-
}
|
|
116988
|
-
const existingExpression = loopCharacteristics.get(propertyName);
|
|
116989
|
-
if (!existingExpression) {
|
|
116990
|
-
// add formal expression
|
|
116991
|
-
expressionProps[propertyName] = createFormalExpression$1(loopCharacteristics, newValue, bpmnFactory);
|
|
116992
|
-
return {
|
|
116993
|
-
element,
|
|
116994
|
-
moddleElement: loopCharacteristics,
|
|
116995
|
-
properties: expressionProps
|
|
116996
|
-
};
|
|
116997
|
-
}
|
|
116998
|
-
|
|
116999
|
-
// edit existing formal expression
|
|
117000
|
-
return {
|
|
117001
|
-
element,
|
|
117002
|
-
moddleElement: existingExpression,
|
|
117003
|
-
properties: {
|
|
117004
|
-
body: newValue
|
|
117005
|
-
}
|
|
117006
|
-
};
|
|
117007
|
-
}
|
|
117008
|
-
|
|
117009
117141
|
// loopCardinality
|
|
117010
117142
|
|
|
117011
117143
|
/**
|
|
@@ -117316,7 +117448,7 @@
|
|
|
117316
117448
|
// (1) create new signal
|
|
117317
117449
|
if (value === CREATE_NEW_OPTION$1) {
|
|
117318
117450
|
const id = nextId$1('Signal_');
|
|
117319
|
-
signal = createElement$
|
|
117451
|
+
signal = createElement$6('bpmn:Signal', {
|
|
117320
117452
|
id,
|
|
117321
117453
|
name: id
|
|
117322
117454
|
}, root, bpmnFactory);
|
|
@@ -117846,8 +117978,23 @@
|
|
|
117846
117978
|
}
|
|
117847
117979
|
return null;
|
|
117848
117980
|
}
|
|
117981
|
+
function AdHocCompletionGroup(element, injector) {
|
|
117982
|
+
const translate = injector.get('translate');
|
|
117983
|
+
const group = {
|
|
117984
|
+
label: translate('Completion'),
|
|
117985
|
+
id: 'adHocCompletion',
|
|
117986
|
+
component: Group$1,
|
|
117987
|
+
entries: [...AdHocCompletionProps$1({
|
|
117988
|
+
element
|
|
117989
|
+
})]
|
|
117990
|
+
};
|
|
117991
|
+
if (group.entries.length) {
|
|
117992
|
+
return group;
|
|
117993
|
+
}
|
|
117994
|
+
return null;
|
|
117995
|
+
}
|
|
117849
117996
|
function getGroups(element, injector) {
|
|
117850
|
-
const groups = [GeneralGroup(element, injector), DocumentationGroup(element, injector), CompensationGroup(element, injector), ErrorGroup(element, injector), LinkGroup(element, injector), MessageGroup(element, injector), MultiInstanceGroup(element, injector), SignalGroup(element, injector), EscalationGroup(element, injector), TimerGroup(element, injector)];
|
|
117997
|
+
const groups = [GeneralGroup(element, injector), DocumentationGroup(element, injector), CompensationGroup(element, injector), ErrorGroup(element, injector), LinkGroup(element, injector), MessageGroup(element, injector), MultiInstanceGroup(element, injector), AdHocCompletionGroup(element, injector), SignalGroup(element, injector), EscalationGroup(element, injector), TimerGroup(element, injector)];
|
|
117851
117998
|
|
|
117852
117999
|
// contract: if a group returns null, it should not be displayed at all
|
|
117853
118000
|
return groups.filter(group => group !== null);
|
|
@@ -117984,7 +118131,7 @@
|
|
|
117984
118131
|
|
|
117985
118132
|
// (1) create bpmn:ExtensionElements if it doesn't exist
|
|
117986
118133
|
if (!extensionElements) {
|
|
117987
|
-
extensionElements = createElement$
|
|
118134
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
117988
118135
|
values: []
|
|
117989
118136
|
}, businessObject, bpmnFactory);
|
|
117990
118137
|
commands.push({
|
|
@@ -118083,7 +118230,7 @@
|
|
|
118083
118230
|
const extensionElement = getExtensionElement(element);
|
|
118084
118231
|
if (!extensionElement) {
|
|
118085
118232
|
// (1) create extension element
|
|
118086
|
-
const adHoc = createElement$
|
|
118233
|
+
const adHoc = createElement$6('zeebe:AdHoc', {
|
|
118087
118234
|
activeElementsCollection: value
|
|
118088
118235
|
}, undefined, bpmnFactory);
|
|
118089
118236
|
const businessObject = getBusinessObject$2(element);
|
|
@@ -118105,6 +118252,52 @@
|
|
|
118105
118252
|
return extensions[0];
|
|
118106
118253
|
}
|
|
118107
118254
|
|
|
118255
|
+
/**
|
|
118256
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
118257
|
+
*/
|
|
118258
|
+
|
|
118259
|
+
/**
|
|
118260
|
+
* @returns {Array<Entry>} entries
|
|
118261
|
+
*/
|
|
118262
|
+
function AdHocCompletionProps(props) {
|
|
118263
|
+
const {
|
|
118264
|
+
element
|
|
118265
|
+
} = props;
|
|
118266
|
+
if (!is$5(element, 'bpmn:AdHocSubProcess')) {
|
|
118267
|
+
return [];
|
|
118268
|
+
}
|
|
118269
|
+
return [{
|
|
118270
|
+
id: 'completionCondition',
|
|
118271
|
+
component: CompletionCondition$1,
|
|
118272
|
+
isEdited: isEdited$6
|
|
118273
|
+
}];
|
|
118274
|
+
}
|
|
118275
|
+
function CompletionCondition$1(props) {
|
|
118276
|
+
const {
|
|
118277
|
+
element
|
|
118278
|
+
} = props;
|
|
118279
|
+
const bpmnFactory = useService$1('bpmnFactory');
|
|
118280
|
+
const debounce = useService$1('debounceInput');
|
|
118281
|
+
const commandStack = useService$1('commandStack');
|
|
118282
|
+
const translate = useService$1('translate');
|
|
118283
|
+
const getValue = () => {
|
|
118284
|
+
const expression = getBusinessObject$2(element).get('completionCondition');
|
|
118285
|
+
return expression && expression.get('body');
|
|
118286
|
+
};
|
|
118287
|
+
const setValue = value => {
|
|
118288
|
+
return createOrUpdateFormalExpression(element, getBusinessObject$2(element), 'completionCondition', value, bpmnFactory, commandStack);
|
|
118289
|
+
};
|
|
118290
|
+
return FeelEntryWithVariableContext$1({
|
|
118291
|
+
element,
|
|
118292
|
+
id: 'completionCondition',
|
|
118293
|
+
label: translate('Completion condition'),
|
|
118294
|
+
feel: 'required',
|
|
118295
|
+
getValue,
|
|
118296
|
+
setValue,
|
|
118297
|
+
debounce
|
|
118298
|
+
});
|
|
118299
|
+
}
|
|
118300
|
+
|
|
118108
118301
|
function AssignmentDefinitionProps(props) {
|
|
118109
118302
|
const {
|
|
118110
118303
|
element
|
|
@@ -118144,7 +118337,7 @@
|
|
|
118144
118337
|
|
|
118145
118338
|
// (1) ensure extension elements
|
|
118146
118339
|
if (!extensionElements) {
|
|
118147
|
-
extensionElements = createElement$
|
|
118340
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
118148
118341
|
values: []
|
|
118149
118342
|
}, businessObject, bpmnFactory);
|
|
118150
118343
|
commands.push({
|
|
@@ -118162,7 +118355,7 @@
|
|
|
118162
118355
|
// (2) ensure AssignmentDefinition
|
|
118163
118356
|
let assignmentDefinition = getAssignmentDefinition(element);
|
|
118164
118357
|
if (!assignmentDefinition) {
|
|
118165
|
-
assignmentDefinition = createElement$
|
|
118358
|
+
assignmentDefinition = createElement$6('zeebe:AssignmentDefinition', {}, extensionElements, bpmnFactory);
|
|
118166
118359
|
commands.push({
|
|
118167
118360
|
cmd: 'element.updateModdleProperties',
|
|
118168
118361
|
context: {
|
|
@@ -118218,7 +118411,7 @@
|
|
|
118218
118411
|
|
|
118219
118412
|
// (1) ensure extension elements
|
|
118220
118413
|
if (!extensionElements) {
|
|
118221
|
-
extensionElements = createElement$
|
|
118414
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
118222
118415
|
values: []
|
|
118223
118416
|
}, businessObject, bpmnFactory);
|
|
118224
118417
|
commands.push({
|
|
@@ -118236,7 +118429,7 @@
|
|
|
118236
118429
|
// (2) ensure assignmentDefinition
|
|
118237
118430
|
let assignmentDefinition = getAssignmentDefinition(element);
|
|
118238
118431
|
if (!assignmentDefinition) {
|
|
118239
|
-
assignmentDefinition = createElement$
|
|
118432
|
+
assignmentDefinition = createElement$6('zeebe:AssignmentDefinition', {}, extensionElements, bpmnFactory);
|
|
118240
118433
|
commands.push({
|
|
118241
118434
|
cmd: 'element.updateModdleProperties',
|
|
118242
118435
|
context: {
|
|
@@ -118290,7 +118483,7 @@
|
|
|
118290
118483
|
|
|
118291
118484
|
// (1) ensure extension elements
|
|
118292
118485
|
if (!extensionElements) {
|
|
118293
|
-
extensionElements = createElement$
|
|
118486
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
118294
118487
|
values: []
|
|
118295
118488
|
}, businessObject, bpmnFactory);
|
|
118296
118489
|
commands.push({
|
|
@@ -118308,7 +118501,7 @@
|
|
|
118308
118501
|
// (2) ensure assignmentDefinition
|
|
118309
118502
|
let assignmentDefinition = getAssignmentDefinition(element);
|
|
118310
118503
|
if (!assignmentDefinition) {
|
|
118311
|
-
assignmentDefinition = createElement$
|
|
118504
|
+
assignmentDefinition = createElement$6('zeebe:AssignmentDefinition', {}, extensionElements, bpmnFactory);
|
|
118312
118505
|
commands.push({
|
|
118313
118506
|
cmd: 'element.updateModdleProperties',
|
|
118314
118507
|
context: {
|
|
@@ -118432,7 +118625,7 @@
|
|
|
118432
118625
|
const bpmnFactory = useService$1('bpmnFactory');
|
|
118433
118626
|
const translate = useService$1('translate');
|
|
118434
118627
|
const getValue = () => {
|
|
118435
|
-
if (getCalledDecision$1(element)) {
|
|
118628
|
+
if (getCalledDecision$1$1(element)) {
|
|
118436
118629
|
return DMN_IMPLEMENTATION_OPTION;
|
|
118437
118630
|
}
|
|
118438
118631
|
if (getTaskDefinition$2(element)) {
|
|
@@ -118449,7 +118642,7 @@
|
|
|
118449
118642
|
const setValue = value => {
|
|
118450
118643
|
let extensionElement, extensionElementType;
|
|
118451
118644
|
if (value === DMN_IMPLEMENTATION_OPTION) {
|
|
118452
|
-
extensionElement = getCalledDecision$1(element);
|
|
118645
|
+
extensionElement = getCalledDecision$1$1(element);
|
|
118453
118646
|
extensionElementType = 'zeebe:CalledDecision';
|
|
118454
118647
|
} else if (value === JOB_WORKER_IMPLEMENTATION_OPTION$2) {
|
|
118455
118648
|
extensionElement = getTaskDefinition$2(element);
|
|
@@ -118458,7 +118651,7 @@
|
|
|
118458
118651
|
resetElement$1(element, commandStack);
|
|
118459
118652
|
}
|
|
118460
118653
|
if (!extensionElement && extensionElementType) {
|
|
118461
|
-
extensionElement = createElement$
|
|
118654
|
+
extensionElement = createElement$6(extensionElementType, {}, null, bpmnFactory);
|
|
118462
118655
|
updateExtensionElements$1(element, extensionElement, bpmnFactory, commandStack);
|
|
118463
118656
|
}
|
|
118464
118657
|
};
|
|
@@ -118491,16 +118684,16 @@
|
|
|
118491
118684
|
const businessObject = getBusinessObject$2(element);
|
|
118492
118685
|
return getExtensionElementsList$2(businessObject, 'zeebe:TaskDefinition')[0];
|
|
118493
118686
|
}
|
|
118494
|
-
function getCalledDecision$1(element) {
|
|
118687
|
+
function getCalledDecision$1$1(element) {
|
|
118495
118688
|
const businessObject = getBusinessObject$2(element);
|
|
118496
118689
|
return getExtensionElementsList$2(businessObject, 'zeebe:CalledDecision')[0];
|
|
118497
118690
|
}
|
|
118498
118691
|
function isBusinessRuleImplementationEdited(element) {
|
|
118499
|
-
return getTaskDefinition$2(element) || getCalledDecision$1(element);
|
|
118692
|
+
return getTaskDefinition$2(element) || getCalledDecision$1$1(element);
|
|
118500
118693
|
}
|
|
118501
118694
|
function resetElement$1(element, commandStack) {
|
|
118502
118695
|
const businessObject = getBusinessObject$2(element);
|
|
118503
|
-
const toRemove = [getTaskDefinition$2(element), getTaskHeaders$1(element), getCalledDecision$1(element)].filter(Boolean);
|
|
118696
|
+
const toRemove = [getTaskDefinition$2(element), getTaskHeaders$1(element), getCalledDecision$1$1(element)].filter(Boolean);
|
|
118504
118697
|
removeExtensionElements$1(element, businessObject, toRemove, commandStack);
|
|
118505
118698
|
}
|
|
118506
118699
|
function updateExtensionElements$1(element, extensionElementToAdd, bpmnFactory, commandStack) {
|
|
@@ -118511,7 +118704,7 @@
|
|
|
118511
118704
|
|
|
118512
118705
|
// (1) create bpmn:ExtensionElements if it doesn't exist
|
|
118513
118706
|
if (!extensionElements) {
|
|
118514
|
-
extensionElements = createElement$
|
|
118707
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
118515
118708
|
values: []
|
|
118516
118709
|
}, businessObject, bpmnFactory);
|
|
118517
118710
|
commands.push({
|
|
@@ -118529,7 +118722,7 @@
|
|
|
118529
118722
|
|
|
118530
118723
|
// (2) remove old exension element from extensionElements
|
|
118531
118724
|
if (is$5(extensionElementToAdd, 'zeebe:TaskDefinition')) {
|
|
118532
|
-
extensionElementValues = without(extensionElements.get('values'), getCalledDecision$1(element));
|
|
118725
|
+
extensionElementValues = without(extensionElements.get('values'), getCalledDecision$1$1(element));
|
|
118533
118726
|
} else if (is$5(extensionElementToAdd, 'zeebe:CalledDecision')) {
|
|
118534
118727
|
extensionElementValues = without(extensionElements.get('values'), getTaskDefinition$2(element));
|
|
118535
118728
|
}
|
|
@@ -118564,7 +118757,7 @@
|
|
|
118564
118757
|
// (1) ensure extension elements
|
|
118565
118758
|
let extensionElements = businessObject.get('extensionElements');
|
|
118566
118759
|
if (!extensionElements) {
|
|
118567
|
-
extensionElements = createElement$
|
|
118760
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
118568
118761
|
values: []
|
|
118569
118762
|
}, businessObject, bpmnFactory);
|
|
118570
118763
|
commands.push({
|
|
@@ -118582,7 +118775,7 @@
|
|
|
118582
118775
|
// (2) ensure extension element
|
|
118583
118776
|
let extensionElement = getExtensionElementsList$2(businessObject, type)[0];
|
|
118584
118777
|
if (!extensionElement) {
|
|
118585
|
-
extensionElement = createElement$
|
|
118778
|
+
extensionElement = createElement$6(type, {}, extensionElements, bpmnFactory);
|
|
118586
118779
|
commands.push({
|
|
118587
118780
|
cmd: 'element.updateModdleProperties',
|
|
118588
118781
|
context: {
|
|
@@ -118655,7 +118848,7 @@
|
|
|
118655
118848
|
// (1) ensure extension elements
|
|
118656
118849
|
let extensionElements = businessObject.get('extensionElements');
|
|
118657
118850
|
if (!extensionElements) {
|
|
118658
|
-
extensionElements = createElement$
|
|
118851
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
118659
118852
|
values: []
|
|
118660
118853
|
}, businessObject, bpmnFactory);
|
|
118661
118854
|
commands.push({
|
|
@@ -118673,7 +118866,7 @@
|
|
|
118673
118866
|
// (2) ensure extension element
|
|
118674
118867
|
let extensionElement = getExtensionElementsList$2(businessObject, type)[0];
|
|
118675
118868
|
if (!extensionElement) {
|
|
118676
|
-
extensionElement = createElement$
|
|
118869
|
+
extensionElement = createElement$6(type, {}, extensionElements, bpmnFactory);
|
|
118677
118870
|
commands.push({
|
|
118678
118871
|
cmd: 'element.updateModdleProperties',
|
|
118679
118872
|
context: {
|
|
@@ -118774,7 +118967,7 @@
|
|
|
118774
118967
|
|
|
118775
118968
|
// (1) ensure extension elements
|
|
118776
118969
|
if (!extensionElements) {
|
|
118777
|
-
extensionElements = createElement$
|
|
118970
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
118778
118971
|
values: []
|
|
118779
118972
|
}, businessObject, bpmnFactory);
|
|
118780
118973
|
commands.push({
|
|
@@ -118792,7 +118985,7 @@
|
|
|
118792
118985
|
// (2) ensure calledDecision
|
|
118793
118986
|
let calledDecision = getCalledDecision$2(element);
|
|
118794
118987
|
if (!calledDecision) {
|
|
118795
|
-
calledDecision = createElement$
|
|
118988
|
+
calledDecision = createElement$6('zeebe:CalledDecision', {}, extensionElements, bpmnFactory);
|
|
118796
118989
|
commands.push({
|
|
118797
118990
|
cmd: 'element.updateModdleProperties',
|
|
118798
118991
|
context: {
|
|
@@ -118849,7 +119042,7 @@
|
|
|
118849
119042
|
|
|
118850
119043
|
// (1) ensure extension elements
|
|
118851
119044
|
if (!extensionElements) {
|
|
118852
|
-
extensionElements = createElement$
|
|
119045
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
118853
119046
|
values: []
|
|
118854
119047
|
}, businessObject, bpmnFactory);
|
|
118855
119048
|
commands.push({
|
|
@@ -118867,7 +119060,7 @@
|
|
|
118867
119060
|
// (2) ensure calledDecision
|
|
118868
119061
|
let calledDecision = getCalledDecision$2(element);
|
|
118869
119062
|
if (!calledDecision) {
|
|
118870
|
-
calledDecision = createElement$
|
|
119063
|
+
calledDecision = createElement$6('zeebe:CalledDecision', {}, extensionElements, bpmnFactory);
|
|
118871
119064
|
commands.push({
|
|
118872
119065
|
cmd: 'element.updateModdleProperties',
|
|
118873
119066
|
context: {
|
|
@@ -118961,7 +119154,7 @@
|
|
|
118961
119154
|
|
|
118962
119155
|
// (2) Create and set formalExpression element containing the conditionExpression,
|
|
118963
119156
|
// unless the provided value is empty
|
|
118964
|
-
const formalExpressionElement = value && value != '' ? createElement$
|
|
119157
|
+
const formalExpressionElement = value && value != '' ? createElement$6('bpmn:FormalExpression', {
|
|
118965
119158
|
body: value
|
|
118966
119159
|
}, businessObject, bpmnFactory) : undefined;
|
|
118967
119160
|
commands.push({
|
|
@@ -119325,7 +119518,7 @@
|
|
|
119325
119518
|
|
|
119326
119519
|
// (1) ensure extension elements
|
|
119327
119520
|
if (!extensionElements) {
|
|
119328
|
-
extensionElements = createElement$
|
|
119521
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
119329
119522
|
values: []
|
|
119330
119523
|
}, businessObject, bpmnFactory);
|
|
119331
119524
|
commands.push({
|
|
@@ -119344,7 +119537,7 @@
|
|
|
119344
119537
|
let executionListeners = getExecutionListenersContainer$1(businessObject);
|
|
119345
119538
|
if (!executionListeners) {
|
|
119346
119539
|
const parent = extensionElements;
|
|
119347
|
-
executionListeners = createElement$
|
|
119540
|
+
executionListeners = createElement$6('zeebe:ExecutionListeners', {
|
|
119348
119541
|
listeners: []
|
|
119349
119542
|
}, parent, bpmnFactory);
|
|
119350
119543
|
commands.push({
|
|
@@ -119360,7 +119553,7 @@
|
|
|
119360
119553
|
}
|
|
119361
119554
|
|
|
119362
119555
|
// (3) create zeebe:ExecutionListener
|
|
119363
|
-
const executionListener = createElement$
|
|
119556
|
+
const executionListener = createElement$6('zeebe:ExecutionListener', getDefaultListenerProps$1(element), executionListeners, bpmnFactory);
|
|
119364
119557
|
|
|
119365
119558
|
// (4) add executionListener to list
|
|
119366
119559
|
commands.push({
|
|
@@ -119424,14 +119617,14 @@
|
|
|
119424
119617
|
CUSTOM_FORM: 'custom-form',
|
|
119425
119618
|
EXTERNAL_REFERENCE: 'external-reference'
|
|
119426
119619
|
};
|
|
119427
|
-
function getFormDefinition$
|
|
119620
|
+
function getFormDefinition$2(element) {
|
|
119428
119621
|
const businessObject = getBusinessObject$2(element);
|
|
119429
119622
|
const formDefinitions = getExtensionElementsList$2(businessObject, 'zeebe:FormDefinition');
|
|
119430
119623
|
return formDefinitions[0];
|
|
119431
119624
|
}
|
|
119432
119625
|
function getUserTaskForm$1(element, rootElement) {
|
|
119433
119626
|
rootElement = rootElement || getRootElement$1$1(element);
|
|
119434
|
-
const formDefinition = getFormDefinition$
|
|
119627
|
+
const formDefinition = getFormDefinition$2(element);
|
|
119435
119628
|
if (!formDefinition) {
|
|
119436
119629
|
return;
|
|
119437
119630
|
}
|
|
@@ -119456,7 +119649,7 @@
|
|
|
119456
119649
|
return parent;
|
|
119457
119650
|
}
|
|
119458
119651
|
function getFormType$1(element) {
|
|
119459
|
-
const formDefinition = getFormDefinition$
|
|
119652
|
+
const formDefinition = getFormDefinition$2(element);
|
|
119460
119653
|
if (!formDefinition) {
|
|
119461
119654
|
return;
|
|
119462
119655
|
}
|
|
@@ -119637,7 +119830,7 @@
|
|
|
119637
119830
|
injector = useService$1('injector'),
|
|
119638
119831
|
translate = useService$1('translate');
|
|
119639
119832
|
const getValue = () => {
|
|
119640
|
-
return getFormDefinition$
|
|
119833
|
+
return getFormDefinition$2(element).get('formId');
|
|
119641
119834
|
};
|
|
119642
119835
|
const setValue = value => {
|
|
119643
119836
|
setFormId(injector, element, isUndefined$5(value) ? '' : value);
|
|
@@ -119659,7 +119852,7 @@
|
|
|
119659
119852
|
injector = useService$1('injector'),
|
|
119660
119853
|
translate = useService$1('translate');
|
|
119661
119854
|
const getValue = () => {
|
|
119662
|
-
const formDefinition = getFormDefinition$
|
|
119855
|
+
const formDefinition = getFormDefinition$2(element);
|
|
119663
119856
|
return formDefinition.get('formKey');
|
|
119664
119857
|
};
|
|
119665
119858
|
const setValue = value => {
|
|
@@ -119682,7 +119875,7 @@
|
|
|
119682
119875
|
injector = useService$1('injector'),
|
|
119683
119876
|
translate = useService$1('translate');
|
|
119684
119877
|
const getValue = () => {
|
|
119685
|
-
const formDefinition = getFormDefinition$
|
|
119878
|
+
const formDefinition = getFormDefinition$2(element);
|
|
119686
119879
|
return formDefinition.get('externalReference');
|
|
119687
119880
|
};
|
|
119688
119881
|
const setValue = value => {
|
|
@@ -119730,7 +119923,7 @@
|
|
|
119730
119923
|
};
|
|
119731
119924
|
}
|
|
119732
119925
|
const bpmnFactory = injector.get('bpmnFactory');
|
|
119733
|
-
extensionElements = createElement$
|
|
119926
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
119734
119927
|
values: []
|
|
119735
119928
|
}, businessObject, bpmnFactory);
|
|
119736
119929
|
return {
|
|
@@ -119751,7 +119944,7 @@
|
|
|
119751
119944
|
* } }
|
|
119752
119945
|
*/
|
|
119753
119946
|
function getOrCreateFormDefintition(injector, element) {
|
|
119754
|
-
let formDefinition = getFormDefinition$
|
|
119947
|
+
let formDefinition = getFormDefinition$2(element);
|
|
119755
119948
|
if (formDefinition) {
|
|
119756
119949
|
return {
|
|
119757
119950
|
commands: [],
|
|
@@ -119762,7 +119955,7 @@
|
|
|
119762
119955
|
extensionElements,
|
|
119763
119956
|
commands
|
|
119764
119957
|
} = getOrCreateExtensionElements(injector, element);
|
|
119765
|
-
formDefinition = createFormDefinition(injector, {}, extensionElements);
|
|
119958
|
+
formDefinition = createFormDefinition$2(injector, {}, extensionElements);
|
|
119766
119959
|
return {
|
|
119767
119960
|
commands: [...commands, createUpdateModdlePropertiesCommand(element, extensionElements, {
|
|
119768
119961
|
values: [...extensionElements.get('values'), formDefinition]
|
|
@@ -119786,7 +119979,7 @@
|
|
|
119786
119979
|
if (userTaskForm) {
|
|
119787
119980
|
return {
|
|
119788
119981
|
commands: [],
|
|
119789
|
-
formDefinition: getFormDefinition$
|
|
119982
|
+
formDefinition: getFormDefinition$2(element),
|
|
119790
119983
|
userTaskForm
|
|
119791
119984
|
};
|
|
119792
119985
|
}
|
|
@@ -119854,7 +120047,7 @@
|
|
|
119854
120047
|
})]);
|
|
119855
120048
|
}
|
|
119856
120049
|
function removeFormDefinition(injector, element) {
|
|
119857
|
-
const formDefinition = getFormDefinition$
|
|
120050
|
+
const formDefinition = getFormDefinition$2(element);
|
|
119858
120051
|
|
|
119859
120052
|
/**
|
|
119860
120053
|
* @type {import('bpmn-js/lib/features/modeling/Modeling').default}
|
|
@@ -119876,9 +120069,9 @@
|
|
|
119876
120069
|
*
|
|
119877
120070
|
* @returns {ModdleElement}
|
|
119878
120071
|
*/
|
|
119879
|
-
function createFormDefinition(injector, properties, parent) {
|
|
120072
|
+
function createFormDefinition$2(injector, properties, parent) {
|
|
119880
120073
|
const bpmnFactory = injector.get('bpmnFactory');
|
|
119881
|
-
return createElement$
|
|
120074
|
+
return createElement$6('zeebe:FormDefinition', properties, parent, bpmnFactory);
|
|
119882
120075
|
}
|
|
119883
120076
|
|
|
119884
120077
|
/**
|
|
@@ -119890,7 +120083,7 @@
|
|
|
119890
120083
|
*/
|
|
119891
120084
|
function createUserTaskForm(injector, properties, parent) {
|
|
119892
120085
|
const bpmnFactory = injector.get('bpmnFactory');
|
|
119893
|
-
return createElement$
|
|
120086
|
+
return createElement$6('zeebe:UserTaskForm', properties, parent, bpmnFactory);
|
|
119894
120087
|
}
|
|
119895
120088
|
|
|
119896
120089
|
/**
|
|
@@ -120083,7 +120276,7 @@
|
|
|
120083
120276
|
|
|
120084
120277
|
// (1) ensure extension elements
|
|
120085
120278
|
if (!extensionElements) {
|
|
120086
|
-
extensionElements = createElement$
|
|
120279
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
120087
120280
|
values: []
|
|
120088
120281
|
}, businessObject, bpmnFactory);
|
|
120089
120282
|
commands.push({
|
|
@@ -120102,7 +120295,7 @@
|
|
|
120102
120295
|
let taskHeaders = getTaskHeaders$1(element);
|
|
120103
120296
|
if (!taskHeaders) {
|
|
120104
120297
|
const parent = extensionElements;
|
|
120105
|
-
taskHeaders = createElement$
|
|
120298
|
+
taskHeaders = createElement$6('zeebe:TaskHeaders', {
|
|
120106
120299
|
values: []
|
|
120107
120300
|
}, parent, bpmnFactory);
|
|
120108
120301
|
commands.push({
|
|
@@ -120118,7 +120311,7 @@
|
|
|
120118
120311
|
}
|
|
120119
120312
|
|
|
120120
120313
|
// (3) create header
|
|
120121
|
-
const header = createElement$
|
|
120314
|
+
const header = createElement$6('zeebe:Header', {}, taskHeaders, bpmnFactory);
|
|
120122
120315
|
|
|
120123
120316
|
// (4) add header to list
|
|
120124
120317
|
commands.push({
|
|
@@ -120136,10 +120329,10 @@
|
|
|
120136
120329
|
}
|
|
120137
120330
|
|
|
120138
120331
|
function getProcessId(element) {
|
|
120139
|
-
const calledElement = getCalledElement$
|
|
120332
|
+
const calledElement = getCalledElement$2(element);
|
|
120140
120333
|
return calledElement ? calledElement.get('processId') : '';
|
|
120141
120334
|
}
|
|
120142
|
-
function getCalledElement$
|
|
120335
|
+
function getCalledElement$2(element) {
|
|
120143
120336
|
const calledElements = getCalledElements$1(element);
|
|
120144
120337
|
return calledElements[0];
|
|
120145
120338
|
}
|
|
@@ -120180,7 +120373,7 @@
|
|
|
120180
120373
|
// (1) ensure extension elements
|
|
120181
120374
|
let extensionElements = businessObject.get('extensionElements');
|
|
120182
120375
|
if (!extensionElements) {
|
|
120183
|
-
extensionElements = createElement$
|
|
120376
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
120184
120377
|
values: []
|
|
120185
120378
|
}, businessObject, bpmnFactory);
|
|
120186
120379
|
commands.push({
|
|
@@ -120196,9 +120389,9 @@
|
|
|
120196
120389
|
}
|
|
120197
120390
|
|
|
120198
120391
|
// (2) ensure zeebe:calledElement
|
|
120199
|
-
let calledElement = getCalledElement$
|
|
120392
|
+
let calledElement = getCalledElement$2(businessObject);
|
|
120200
120393
|
if (!calledElement) {
|
|
120201
|
-
calledElement = createElement$
|
|
120394
|
+
calledElement = createElement$6('zeebe:CalledElement', {}, extensionElements, bpmnFactory);
|
|
120202
120395
|
commands.push({
|
|
120203
120396
|
cmd: 'element.updateModdleProperties',
|
|
120204
120397
|
context: {
|
|
@@ -120255,7 +120448,7 @@
|
|
|
120255
120448
|
return undefined;
|
|
120256
120449
|
}
|
|
120257
120450
|
const bo = getBusinessObject$2(element),
|
|
120258
|
-
calledElement = getCalledElement$
|
|
120451
|
+
calledElement = getCalledElement$2(bo);
|
|
120259
120452
|
return calledElement && has$2(calledElement, 'propagateAllParentVariables') ? calledElement.get('propagateAllParentVariables') : /* default value */true;
|
|
120260
120453
|
}
|
|
120261
120454
|
|
|
@@ -120397,7 +120590,7 @@
|
|
|
120397
120590
|
return getEventDefinition$1(element, 'bpmn:TerminateEventDefinition');
|
|
120398
120591
|
}
|
|
120399
120592
|
function createIOMapping(properties, parent, bpmnFactory) {
|
|
120400
|
-
return createElement$
|
|
120593
|
+
return createElement$6('zeebe:IoMapping', properties, parent, bpmnFactory);
|
|
120401
120594
|
}
|
|
120402
120595
|
function isSignalThrowEvent(element) {
|
|
120403
120596
|
if (!isAny$1(element, ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent'])) {
|
|
@@ -120499,7 +120692,7 @@
|
|
|
120499
120692
|
|
|
120500
120693
|
// (1) ensure extension elements
|
|
120501
120694
|
if (!extensionElements) {
|
|
120502
|
-
extensionElements = createElement$
|
|
120695
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
120503
120696
|
values: []
|
|
120504
120697
|
}, businessObject, bpmnFactory);
|
|
120505
120698
|
commands.push({
|
|
@@ -120534,7 +120727,7 @@
|
|
|
120534
120727
|
}
|
|
120535
120728
|
|
|
120536
120729
|
// (3) create parameter
|
|
120537
|
-
const newParameter = createElement$
|
|
120730
|
+
const newParameter = createElement$6('zeebe:Input', {
|
|
120538
120731
|
target: nextId$1('InputVariable_')
|
|
120539
120732
|
}, ioMapping, bpmnFactory);
|
|
120540
120733
|
|
|
@@ -120626,7 +120819,7 @@
|
|
|
120626
120819
|
|
|
120627
120820
|
// (1) ensure extension elements
|
|
120628
120821
|
if (!extensionElements) {
|
|
120629
|
-
extensionElements = createElement$
|
|
120822
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
120630
120823
|
values: []
|
|
120631
120824
|
}, message, bpmnFactory);
|
|
120632
120825
|
commands.push({
|
|
@@ -120644,7 +120837,7 @@
|
|
|
120644
120837
|
|
|
120645
120838
|
// (2a) add subscription with correlation key
|
|
120646
120839
|
if (!subscription) {
|
|
120647
|
-
subscription = createElement$
|
|
120840
|
+
subscription = createElement$6('zeebe:Subscription', properties, extensionElements, bpmnFactory);
|
|
120648
120841
|
commands.push({
|
|
120649
120842
|
cmd: 'element.updateModdleProperties',
|
|
120650
120843
|
context: {
|
|
@@ -120850,15 +121043,7 @@
|
|
|
120850
121043
|
return completionCondition && completionCondition.get('body');
|
|
120851
121044
|
};
|
|
120852
121045
|
const setValue = value => {
|
|
120853
|
-
|
|
120854
|
-
const loopCharacteristics = getLoopCharacteristics$1(element);
|
|
120855
|
-
const completionCondition = createElement$3('bpmn:FormalExpression', {
|
|
120856
|
-
body: value
|
|
120857
|
-
}, loopCharacteristics, bpmnFactory);
|
|
120858
|
-
setCompletionCondition(element, commandStack, completionCondition);
|
|
120859
|
-
} else {
|
|
120860
|
-
setCompletionCondition(element, commandStack, undefined);
|
|
120861
|
-
}
|
|
121046
|
+
return createOrUpdateFormalExpression(element, getLoopCharacteristics$1(element), 'completionCondition', value, bpmnFactory, commandStack);
|
|
120862
121047
|
};
|
|
120863
121048
|
return FeelEntryWithVariableContext$1({
|
|
120864
121049
|
element,
|
|
@@ -120887,15 +121072,6 @@
|
|
|
120887
121072
|
function getCompletionCondition(element) {
|
|
120888
121073
|
return getLoopCharacteristics$1(element).get('completionCondition');
|
|
120889
121074
|
}
|
|
120890
|
-
function setCompletionCondition(element, commandStack, completionCondition = undefined) {
|
|
120891
|
-
commandStack.execute('element.updateModdleProperties', {
|
|
120892
|
-
element,
|
|
120893
|
-
moddleElement: getLoopCharacteristics$1(element),
|
|
120894
|
-
properties: {
|
|
120895
|
-
completionCondition
|
|
120896
|
-
}
|
|
120897
|
-
});
|
|
120898
|
-
}
|
|
120899
121075
|
function getProperty$1(element, propertyName) {
|
|
120900
121076
|
const loopCharacteristics = getLoopCharacteristics$1(element),
|
|
120901
121077
|
zeebeLoopCharacteristics = getZeebeLoopCharacteristics(loopCharacteristics);
|
|
@@ -120908,7 +121084,7 @@
|
|
|
120908
121084
|
// (1) ensure extension elements
|
|
120909
121085
|
let extensionElements = loopCharacteristics.get('extensionElements');
|
|
120910
121086
|
if (!extensionElements) {
|
|
120911
|
-
extensionElements = createElement$
|
|
121087
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
120912
121088
|
values: []
|
|
120913
121089
|
}, loopCharacteristics, bpmnFactory);
|
|
120914
121090
|
commands.push({
|
|
@@ -120926,7 +121102,7 @@
|
|
|
120926
121102
|
// (2) ensure zeebe loop characteristics
|
|
120927
121103
|
let zeebeLoopCharacteristics = getZeebeLoopCharacteristics(loopCharacteristics);
|
|
120928
121104
|
if (!zeebeLoopCharacteristics) {
|
|
120929
|
-
zeebeLoopCharacteristics = createElement$
|
|
121105
|
+
zeebeLoopCharacteristics = createElement$6('zeebe:LoopCharacteristics', {}, extensionElements, bpmnFactory);
|
|
120930
121106
|
commands.push({
|
|
120931
121107
|
cmd: 'element.updateModdleProperties',
|
|
120932
121108
|
context: {
|
|
@@ -120986,7 +121162,7 @@
|
|
|
120986
121162
|
// (1) ensure extension elements
|
|
120987
121163
|
let extensionElements = businessObject.get('extensionElements');
|
|
120988
121164
|
if (!extensionElements) {
|
|
120989
|
-
extensionElements = createElement$
|
|
121165
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
120990
121166
|
values: []
|
|
120991
121167
|
}, businessObject, bpmnFactory);
|
|
120992
121168
|
commands.push({
|
|
@@ -121002,9 +121178,9 @@
|
|
|
121002
121178
|
}
|
|
121003
121179
|
|
|
121004
121180
|
// (2) ensure zeebe:calledElement
|
|
121005
|
-
let calledElement = getCalledElement$
|
|
121181
|
+
let calledElement = getCalledElement$2(businessObject);
|
|
121006
121182
|
if (!calledElement) {
|
|
121007
|
-
calledElement = createElement$
|
|
121183
|
+
calledElement = createElement$6('zeebe:CalledElement', {}, extensionElements, bpmnFactory);
|
|
121008
121184
|
commands.push({
|
|
121009
121185
|
cmd: 'element.updateModdleProperties',
|
|
121010
121186
|
context: {
|
|
@@ -121075,7 +121251,7 @@
|
|
|
121075
121251
|
return undefined;
|
|
121076
121252
|
}
|
|
121077
121253
|
const bo = getBusinessObject$2(element),
|
|
121078
|
-
calledElement = getCalledElement$
|
|
121254
|
+
calledElement = getCalledElement$2(bo);
|
|
121079
121255
|
return calledElement && has$2(calledElement, 'propagateAllChildVariables') ? calledElement.get('propagateAllChildVariables') : determinePropAllChildVariablesDefault(element);
|
|
121080
121256
|
}
|
|
121081
121257
|
|
|
@@ -121172,7 +121348,7 @@
|
|
|
121172
121348
|
|
|
121173
121349
|
// (1) ensure extension elements
|
|
121174
121350
|
if (!extensionElements) {
|
|
121175
|
-
extensionElements = createElement$
|
|
121351
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
121176
121352
|
values: []
|
|
121177
121353
|
}, businessObject, bpmnFactory);
|
|
121178
121354
|
commands.push({
|
|
@@ -121208,7 +121384,7 @@
|
|
|
121208
121384
|
}
|
|
121209
121385
|
|
|
121210
121386
|
// (3) create parameter
|
|
121211
|
-
const newParameter = createElement$
|
|
121387
|
+
const newParameter = createElement$6('zeebe:Output', {
|
|
121212
121388
|
target: nextId$1('OutputVariable_')
|
|
121213
121389
|
}, ioMapping, bpmnFactory);
|
|
121214
121390
|
|
|
@@ -121285,7 +121461,7 @@
|
|
|
121285
121461
|
});
|
|
121286
121462
|
} else if (!priorityDefinition && !isNullValue) {
|
|
121287
121463
|
// (2c) create priority definition if it does not exist
|
|
121288
|
-
priorityDefinition = createElement$
|
|
121464
|
+
priorityDefinition = createElement$6('zeebe:PriorityDefinition', {
|
|
121289
121465
|
priority: value
|
|
121290
121466
|
}, extensionElements, bpmnFactory);
|
|
121291
121467
|
commands.push({
|
|
@@ -121376,7 +121552,7 @@
|
|
|
121376
121552
|
resetElement(element, commandStack);
|
|
121377
121553
|
}
|
|
121378
121554
|
if (!extensionElement && extensionElementType) {
|
|
121379
|
-
extensionElement = createElement$
|
|
121555
|
+
extensionElement = createElement$6(extensionElementType, {}, null, bpmnFactory);
|
|
121380
121556
|
updateExtensionElements(element, extensionElement, bpmnFactory, commandStack);
|
|
121381
121557
|
}
|
|
121382
121558
|
};
|
|
@@ -121442,7 +121618,7 @@
|
|
|
121442
121618
|
|
|
121443
121619
|
// (1) create bpmn:ExtensionElements if it doesn't exist
|
|
121444
121620
|
if (!extensionElements) {
|
|
121445
|
-
extensionElements = createElement$
|
|
121621
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
121446
121622
|
values: []
|
|
121447
121623
|
}, businessObject, bpmnFactory);
|
|
121448
121624
|
commands.push({
|
|
@@ -121516,7 +121692,7 @@
|
|
|
121516
121692
|
|
|
121517
121693
|
// (1) ensure extension elements
|
|
121518
121694
|
if (!extensionElements) {
|
|
121519
|
-
extensionElements = createElement$
|
|
121695
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
121520
121696
|
values: []
|
|
121521
121697
|
}, businessObject, bpmnFactory);
|
|
121522
121698
|
commands.push({
|
|
@@ -121534,7 +121710,7 @@
|
|
|
121534
121710
|
// (2) ensure script
|
|
121535
121711
|
let script = getScript(element);
|
|
121536
121712
|
if (!script) {
|
|
121537
|
-
script = createElement$
|
|
121713
|
+
script = createElement$6('zeebe:Script', {}, extensionElements, bpmnFactory);
|
|
121538
121714
|
commands.push({
|
|
121539
121715
|
cmd: 'element.updateModdleProperties',
|
|
121540
121716
|
context: {
|
|
@@ -121591,7 +121767,7 @@
|
|
|
121591
121767
|
|
|
121592
121768
|
// (1) ensure extension elements
|
|
121593
121769
|
if (!extensionElements) {
|
|
121594
|
-
extensionElements = createElement$
|
|
121770
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
121595
121771
|
values: []
|
|
121596
121772
|
}, businessObject, bpmnFactory);
|
|
121597
121773
|
commands.push({
|
|
@@ -121609,7 +121785,7 @@
|
|
|
121609
121785
|
// (2) ensure script
|
|
121610
121786
|
let script = getScript(element);
|
|
121611
121787
|
if (!script) {
|
|
121612
|
-
script = createElement$
|
|
121788
|
+
script = createElement$6('zeebe:Script', {}, extensionElements, bpmnFactory);
|
|
121613
121789
|
commands.push({
|
|
121614
121790
|
cmd: 'element.updateModdleProperties',
|
|
121615
121791
|
context: {
|
|
@@ -121756,7 +121932,7 @@
|
|
|
121756
121932
|
// (1) ensure extension elements
|
|
121757
121933
|
let extensionElements = businessObject.get('extensionElements');
|
|
121758
121934
|
if (!extensionElements) {
|
|
121759
|
-
extensionElements = createElement$
|
|
121935
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
121760
121936
|
values: []
|
|
121761
121937
|
}, businessObject, bpmnFactory);
|
|
121762
121938
|
commands.push({
|
|
@@ -121772,9 +121948,9 @@
|
|
|
121772
121948
|
}
|
|
121773
121949
|
|
|
121774
121950
|
// (2) ensure zeebe:calledElement
|
|
121775
|
-
let calledElement = getCalledElement$
|
|
121951
|
+
let calledElement = getCalledElement$2(businessObject);
|
|
121776
121952
|
if (!calledElement) {
|
|
121777
|
-
calledElement = createElement$
|
|
121953
|
+
calledElement = createElement$6('zeebe:CalledElement', {}, extensionElements, bpmnFactory);
|
|
121778
121954
|
commands.push({
|
|
121779
121955
|
cmd: 'element.updateModdleProperties',
|
|
121780
121956
|
context: {
|
|
@@ -121849,7 +122025,7 @@
|
|
|
121849
122025
|
|
|
121850
122026
|
// (1) ensure extension elements
|
|
121851
122027
|
if (!extensionElements) {
|
|
121852
|
-
extensionElements = createElement$
|
|
122028
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
121853
122029
|
values: []
|
|
121854
122030
|
}, businessObject, bpmnFactory);
|
|
121855
122031
|
commands.push({
|
|
@@ -121867,7 +122043,7 @@
|
|
|
121867
122043
|
// (2) ensure task definition
|
|
121868
122044
|
let taskDefinition = getTaskDefinition$4(element);
|
|
121869
122045
|
if (!taskDefinition) {
|
|
121870
|
-
taskDefinition = createElement$
|
|
122046
|
+
taskDefinition = createElement$6('zeebe:TaskDefinition', {}, extensionElements, bpmnFactory);
|
|
121871
122047
|
commands.push({
|
|
121872
122048
|
cmd: 'element.updateModdleProperties',
|
|
121873
122049
|
context: {
|
|
@@ -121924,7 +122100,7 @@
|
|
|
121924
122100
|
|
|
121925
122101
|
// (1) ensure extension elements
|
|
121926
122102
|
if (!extensionElements) {
|
|
121927
|
-
extensionElements = createElement$
|
|
122103
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
121928
122104
|
values: []
|
|
121929
122105
|
}, businessObject, bpmnFactory);
|
|
121930
122106
|
commands.push({
|
|
@@ -121942,7 +122118,7 @@
|
|
|
121942
122118
|
// (2) ensure task definition
|
|
121943
122119
|
let taskDefinition = getTaskDefinition$4(element);
|
|
121944
122120
|
if (!taskDefinition) {
|
|
121945
|
-
taskDefinition = createElement$
|
|
122121
|
+
taskDefinition = createElement$6('zeebe:TaskDefinition', {}, extensionElements, bpmnFactory);
|
|
121946
122122
|
commands.push({
|
|
121947
122123
|
cmd: 'element.updateModdleProperties',
|
|
121948
122124
|
context: {
|
|
@@ -122134,7 +122310,7 @@
|
|
|
122134
122310
|
|
|
122135
122311
|
// (1) ensure extension elements
|
|
122136
122312
|
if (!extensionElements) {
|
|
122137
|
-
extensionElements = createElement$
|
|
122313
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
122138
122314
|
values: []
|
|
122139
122315
|
}, businessObject, bpmnFactory);
|
|
122140
122316
|
commands.push({
|
|
@@ -122153,7 +122329,7 @@
|
|
|
122153
122329
|
let taskListeners = getTaskListenersContainer$1(businessObject);
|
|
122154
122330
|
if (!taskListeners) {
|
|
122155
122331
|
const parent = extensionElements;
|
|
122156
|
-
taskListeners = createElement$
|
|
122332
|
+
taskListeners = createElement$6('zeebe:TaskListeners', {
|
|
122157
122333
|
listeners: []
|
|
122158
122334
|
}, parent, bpmnFactory);
|
|
122159
122335
|
commands.push({
|
|
@@ -122169,7 +122345,7 @@
|
|
|
122169
122345
|
}
|
|
122170
122346
|
|
|
122171
122347
|
// (3) create zeebe:TaskListener
|
|
122172
|
-
const TaskListener = createElement$
|
|
122348
|
+
const TaskListener = createElement$6('zeebe:TaskListener', getDefaultListenerProps(), taskListeners, bpmnFactory);
|
|
122173
122349
|
|
|
122174
122350
|
// (4) add TaskListener to list
|
|
122175
122351
|
commands.push({
|
|
@@ -122254,7 +122430,7 @@
|
|
|
122254
122430
|
|
|
122255
122431
|
// (1) ensure extension elements
|
|
122256
122432
|
if (!extensionElements) {
|
|
122257
|
-
extensionElements = createElement$
|
|
122433
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
122258
122434
|
values: []
|
|
122259
122435
|
}, businessObject, bpmnFactory);
|
|
122260
122436
|
commands.push({
|
|
@@ -122272,7 +122448,7 @@
|
|
|
122272
122448
|
// (2) ensure zeebe:TaskSchedule
|
|
122273
122449
|
let taskSchedule = getTaskSchedule(element);
|
|
122274
122450
|
if (!taskSchedule) {
|
|
122275
|
-
taskSchedule = createElement$
|
|
122451
|
+
taskSchedule = createElement$6('zeebe:TaskSchedule', {}, extensionElements, bpmnFactory);
|
|
122276
122452
|
commands.push({
|
|
122277
122453
|
cmd: 'element.updateModdleProperties',
|
|
122278
122454
|
context: {
|
|
@@ -122330,7 +122506,7 @@
|
|
|
122330
122506
|
|
|
122331
122507
|
// (1) ensure extension elements
|
|
122332
122508
|
if (!extensionElements) {
|
|
122333
|
-
extensionElements = createElement$
|
|
122509
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
122334
122510
|
values: []
|
|
122335
122511
|
}, businessObject, bpmnFactory);
|
|
122336
122512
|
commands.push({
|
|
@@ -122348,7 +122524,7 @@
|
|
|
122348
122524
|
// (2) ensure zeebe:TaskSchedule
|
|
122349
122525
|
let taskSchedule = getTaskSchedule(element);
|
|
122350
122526
|
if (!taskSchedule) {
|
|
122351
|
-
taskSchedule = createElement$
|
|
122527
|
+
taskSchedule = createElement$6('zeebe:TaskSchedule', {}, extensionElements, bpmnFactory);
|
|
122352
122528
|
commands.push({
|
|
122353
122529
|
cmd: 'element.updateModdleProperties',
|
|
122354
122530
|
context: {
|
|
@@ -122739,7 +122915,7 @@
|
|
|
122739
122915
|
*/
|
|
122740
122916
|
const setValue = value => {
|
|
122741
122917
|
if (value === ZEEBE_USER_TASK_IMPLEMENTATION_OPTION) {
|
|
122742
|
-
createZeebeUserTask(element, bpmnFactory, commandStack);
|
|
122918
|
+
createZeebeUserTask$2(element, bpmnFactory, commandStack);
|
|
122743
122919
|
} else if (value === JOB_WORKER_IMPLEMENTATION_OPTION) {
|
|
122744
122920
|
removeZeebeUserTask(element, commandStack);
|
|
122745
122921
|
}
|
|
@@ -122765,9 +122941,9 @@
|
|
|
122765
122941
|
}
|
|
122766
122942
|
|
|
122767
122943
|
// helper ///////////////////////
|
|
122768
|
-
function createZeebeUserTask(element, bpmnFactory, commandStack) {
|
|
122944
|
+
function createZeebeUserTask$2(element, bpmnFactory, commandStack) {
|
|
122769
122945
|
const businessObject = getBusinessObject$2(element);
|
|
122770
|
-
const zeebeUserTask = createElement$
|
|
122946
|
+
const zeebeUserTask = createElement$6('zeebe:UserTask', {}, businessObject, bpmnFactory);
|
|
122771
122947
|
addExtensionElements(element, businessObject, zeebeUserTask, bpmnFactory, commandStack);
|
|
122772
122948
|
}
|
|
122773
122949
|
function removeZeebeUserTask(element, commandStack) {
|
|
@@ -122817,7 +122993,7 @@
|
|
|
122817
122993
|
|
|
122818
122994
|
// (1) ensure extension elements
|
|
122819
122995
|
if (!extensionElements) {
|
|
122820
|
-
extensionElements = createElement$
|
|
122996
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
122821
122997
|
values: []
|
|
122822
122998
|
}, businessObject, bpmnFactory);
|
|
122823
122999
|
commands.push({
|
|
@@ -122835,7 +123011,7 @@
|
|
|
122835
123011
|
// (2) ensure version tag
|
|
122836
123012
|
let versionTag = getVersionTag(element);
|
|
122837
123013
|
if (!versionTag) {
|
|
122838
|
-
versionTag = createElement$
|
|
123014
|
+
versionTag = createElement$6('zeebe:VersionTag', {}, extensionElements, bpmnFactory);
|
|
122839
123015
|
commands.push({
|
|
122840
123016
|
cmd: 'element.updateModdleProperties',
|
|
122841
123017
|
context: {
|
|
@@ -123061,7 +123237,7 @@
|
|
|
123061
123237
|
|
|
123062
123238
|
// (1) ensure extension elements
|
|
123063
123239
|
if (!extensionElements) {
|
|
123064
|
-
extensionElements = createElement$
|
|
123240
|
+
extensionElements = createElement$6('bpmn:ExtensionElements', {
|
|
123065
123241
|
values: []
|
|
123066
123242
|
}, businessObject, bpmnFactory);
|
|
123067
123243
|
commands.push({
|
|
@@ -123081,7 +123257,7 @@
|
|
|
123081
123257
|
let properties = getProperties(businessObject, namespace);
|
|
123082
123258
|
if (!properties) {
|
|
123083
123259
|
const parent = extensionElements;
|
|
123084
|
-
properties = createElement$
|
|
123260
|
+
properties = createElement$6(`${namespace}:Properties`, {
|
|
123085
123261
|
[propertyName]: []
|
|
123086
123262
|
}, parent, bpmnFactory);
|
|
123087
123263
|
commands.push({
|
|
@@ -123097,7 +123273,7 @@
|
|
|
123097
123273
|
}
|
|
123098
123274
|
|
|
123099
123275
|
// (3) create camunda:Property
|
|
123100
|
-
const property = createElement$
|
|
123276
|
+
const property = createElement$6(`${namespace}:Property`, {}, properties, bpmnFactory);
|
|
123101
123277
|
|
|
123102
123278
|
// (4) add property to list
|
|
123103
123279
|
commands.push({
|
|
@@ -123165,6 +123341,7 @@
|
|
|
123165
123341
|
updateSignalGroup(groups, element);
|
|
123166
123342
|
updateTimerGroup$1(groups, element, this._injector);
|
|
123167
123343
|
updateMultiInstanceGroup$1(groups, element);
|
|
123344
|
+
updateAdHocCompletionGroup(groups, element);
|
|
123168
123345
|
|
|
123169
123346
|
// (3) remove message group when not applicable
|
|
123170
123347
|
groups = removeMessageGroup(groups, element);
|
|
@@ -123500,6 +123677,23 @@
|
|
|
123500
123677
|
})];
|
|
123501
123678
|
}
|
|
123502
123679
|
|
|
123680
|
+
// overwrite bpmn generic adHoc completion condition with zeebe-specific one
|
|
123681
|
+
function updateAdHocCompletionGroup(groups, element) {
|
|
123682
|
+
const adHocCompletionGroup = findGroup$1(groups, 'adHocCompletion');
|
|
123683
|
+
if (!adHocCompletionGroup) {
|
|
123684
|
+
return;
|
|
123685
|
+
}
|
|
123686
|
+
adHocCompletionGroup.entries = replaceEntriesPreservingOrder(adHocCompletionGroup.entries, AdHocCompletionProps({
|
|
123687
|
+
element
|
|
123688
|
+
}));
|
|
123689
|
+
|
|
123690
|
+
// reorder groups to move active elements before adHoc completion
|
|
123691
|
+
const activeElementsGroup = findGroup$1(groups, 'activeElements');
|
|
123692
|
+
if (activeElementsGroup) {
|
|
123693
|
+
reorderGroupsIfNecessary(groups, activeElementsGroup, adHocCompletionGroup);
|
|
123694
|
+
}
|
|
123695
|
+
}
|
|
123696
|
+
|
|
123503
123697
|
// remove message group from Message End Event & Message Throw Event
|
|
123504
123698
|
function removeMessageGroup(groups, element) {
|
|
123505
123699
|
const messageGroup = findGroup$1(groups, 'message');
|
|
@@ -123515,9 +123709,26 @@
|
|
|
123515
123709
|
return groups.find(g => g.id === id);
|
|
123516
123710
|
}
|
|
123517
123711
|
|
|
123712
|
+
/**
|
|
123713
|
+
* Put groups into the defined order if necessary.
|
|
123714
|
+
*
|
|
123715
|
+
* @param {Group[]} groups
|
|
123716
|
+
* @param {Group} firstGroup
|
|
123717
|
+
* @param {Group} secondGroup
|
|
123718
|
+
*/
|
|
123719
|
+
function reorderGroupsIfNecessary(groups, firstGroup, secondGroup) {
|
|
123720
|
+
const firstGroupIndex = groups.indexOf(firstGroup);
|
|
123721
|
+
const secondGroupIndex = groups.indexOf(secondGroup);
|
|
123722
|
+
if (firstGroupIndex === -1 || secondGroupIndex === -1 || firstGroupIndex <= secondGroupIndex) {
|
|
123723
|
+
return;
|
|
123724
|
+
}
|
|
123725
|
+
groups[firstGroupIndex] = secondGroup;
|
|
123726
|
+
groups[secondGroupIndex] = firstGroup;
|
|
123727
|
+
}
|
|
123728
|
+
|
|
123518
123729
|
/**
|
|
123519
123730
|
* Replace entries with the same ID.
|
|
123520
|
-
*
|
|
123731
|
+
*
|
|
123521
123732
|
* @param {Entry[]} oldEntries
|
|
123522
123733
|
* @param {Entry[]} newEntries
|
|
123523
123734
|
*
|
|
@@ -123528,6 +123739,44 @@
|
|
|
123528
123739
|
return [...filteredEntries, ...newEntries];
|
|
123529
123740
|
}
|
|
123530
123741
|
|
|
123742
|
+
/**
|
|
123743
|
+
* Replace entries with the same ID, preserving original order and adding new entries at the end.
|
|
123744
|
+
*
|
|
123745
|
+
* @param {Entry[]} oldEntries
|
|
123746
|
+
* @param {Entry[]} newEntries
|
|
123747
|
+
*
|
|
123748
|
+
* @returns {Entry[]} combined entries
|
|
123749
|
+
*/
|
|
123750
|
+
function replaceEntriesPreservingOrder(oldEntries, newEntries) {
|
|
123751
|
+
const indexedNewEntries = indexEntriesById(newEntries);
|
|
123752
|
+
const indexedOldEntries = indexEntriesById(oldEntries);
|
|
123753
|
+
const result = [];
|
|
123754
|
+
|
|
123755
|
+
// iterate original entries and replace with new ones if ID matches
|
|
123756
|
+
oldEntries.forEach(oldEntry => {
|
|
123757
|
+
const newEntryIndex = indexedNewEntries[oldEntry.id];
|
|
123758
|
+
if (newEntryIndex !== undefined) {
|
|
123759
|
+
result.push(newEntries[newEntryIndex]);
|
|
123760
|
+
} else {
|
|
123761
|
+
result.push(oldEntry);
|
|
123762
|
+
}
|
|
123763
|
+
});
|
|
123764
|
+
|
|
123765
|
+
// append remaining new entries
|
|
123766
|
+
newEntries.forEach(newEntry => {
|
|
123767
|
+
if (indexedOldEntries[newEntry.id] === undefined) {
|
|
123768
|
+
result.push(newEntry);
|
|
123769
|
+
}
|
|
123770
|
+
});
|
|
123771
|
+
return result;
|
|
123772
|
+
}
|
|
123773
|
+
function indexEntriesById(entries) {
|
|
123774
|
+
return entries.reduce((index, entry, idx) => {
|
|
123775
|
+
index[entry.id] = idx;
|
|
123776
|
+
return index;
|
|
123777
|
+
}, {});
|
|
123778
|
+
}
|
|
123779
|
+
|
|
123531
123780
|
var index$1$2 = {
|
|
123532
123781
|
__init__: ['zeebePropertiesProvider'],
|
|
123533
123782
|
zeebePropertiesProvider: ['type', ZeebePropertiesProvider$1]
|
|
@@ -123782,7 +124031,7 @@
|
|
|
123782
124031
|
'group-inputs': element => {
|
|
123783
124032
|
const translate = useService$1('translate');
|
|
123784
124033
|
return u("div", {
|
|
123785
|
-
children: [translate('
|
|
124034
|
+
children: [translate('Add input mappings to control what is passed to the activity as local variables. '), u("a", {
|
|
123786
124035
|
href: "https://docs.camunda.io/docs/components/concepts/variables/#input-mappings",
|
|
123787
124036
|
target: "_blank",
|
|
123788
124037
|
rel: "noopener noreferrer",
|
|
@@ -123794,7 +124043,7 @@
|
|
|
123794
124043
|
'group-outputs': element => {
|
|
123795
124044
|
const translate = useService$1('translate');
|
|
123796
124045
|
return u("div", {
|
|
123797
|
-
children: [translate('
|
|
124046
|
+
children: [translate('Add output mappings to control which variables are merged back into the process scope. '), u("a", {
|
|
123798
124047
|
href: "https://docs.camunda.io/docs/components/concepts/variables/#output-mappings",
|
|
123799
124048
|
target: "_blank",
|
|
123800
124049
|
rel: "noopener noreferrer",
|
|
@@ -123872,6 +124121,18 @@
|
|
|
123872
124121
|
})]
|
|
123873
124122
|
});
|
|
123874
124123
|
},
|
|
124124
|
+
'group-adHocCompletion': element => {
|
|
124125
|
+
const translate = useService$1('translate');
|
|
124126
|
+
return u("div", {
|
|
124127
|
+
children: [translate('Define the completion behavior of an ad-hoc subprocess. If no completion condition is set, it will be completed after all active elements have been completed. '), u("a", {
|
|
124128
|
+
href: "https://docs.camunda.io/docs/components/modeler/bpmn/ad-hoc#completion",
|
|
124129
|
+
target: "_blank",
|
|
124130
|
+
rel: "noopener noreferrer",
|
|
124131
|
+
title: translate('Ad-hoc subprocess documentation'),
|
|
124132
|
+
children: translate('Learn more.')
|
|
124133
|
+
})]
|
|
124134
|
+
});
|
|
124135
|
+
},
|
|
123875
124136
|
'group-activeElements': element => {
|
|
123876
124137
|
const translate = useService$1('translate');
|
|
123877
124138
|
return u("div", {
|
|
@@ -124036,7 +124297,7 @@
|
|
|
124036
124297
|
return;
|
|
124037
124298
|
}
|
|
124038
124299
|
|
|
124039
|
-
const calledDecision = getCalledDecision(element),
|
|
124300
|
+
const calledDecision = getCalledDecision$1(element),
|
|
124040
124301
|
taskDefinition = getTaskDefinition(element);
|
|
124041
124302
|
|
|
124042
124303
|
if (
|
|
@@ -124067,7 +124328,7 @@
|
|
|
124067
124328
|
return;
|
|
124068
124329
|
}
|
|
124069
124330
|
|
|
124070
|
-
const calledDecision = getCalledDecision(element),
|
|
124331
|
+
const calledDecision = getCalledDecision$1(element),
|
|
124071
124332
|
taskDefinition = getTaskDefinition(element),
|
|
124072
124333
|
taskHeaders = getTaskHeaders(element);
|
|
124073
124334
|
|
|
@@ -124092,7 +124353,7 @@
|
|
|
124092
124353
|
|
|
124093
124354
|
// helpers //////////
|
|
124094
124355
|
|
|
124095
|
-
function getCalledDecision(element) {
|
|
124356
|
+
function getCalledDecision$1(element) {
|
|
124096
124357
|
const businessObject = getBusinessObject$2(element);
|
|
124097
124358
|
|
|
124098
124359
|
return getExtensionElementsList$1(businessObject, 'zeebe:CalledDecision')[ 0 ];
|
|
@@ -124719,7 +124980,7 @@
|
|
|
124719
124980
|
*
|
|
124720
124981
|
* @returns {djs.model.Base} element which is created
|
|
124721
124982
|
*/
|
|
124722
|
-
function createElement$
|
|
124983
|
+
function createElement$5(elementType, properties, parent, factory) {
|
|
124723
124984
|
var element = factory.create(elementType, properties);
|
|
124724
124985
|
element.$parent = parent;
|
|
124725
124986
|
|
|
@@ -124733,7 +124994,7 @@
|
|
|
124733
124994
|
*
|
|
124734
124995
|
* @returns {ModdleElement}
|
|
124735
124996
|
*/
|
|
124736
|
-
function getCalledElement(element) {
|
|
124997
|
+
function getCalledElement$1(element) {
|
|
124737
124998
|
const calledElements = getCalledElements(element);
|
|
124738
124999
|
|
|
124739
125000
|
return calledElements[ 0 ];
|
|
@@ -124768,13 +125029,13 @@
|
|
|
124768
125029
|
|
|
124769
125030
|
const businessObject = getBusinessObject$2(shape);
|
|
124770
125031
|
|
|
124771
|
-
let calledElement = getCalledElement(businessObject);
|
|
125032
|
+
let calledElement = getCalledElement$1(businessObject);
|
|
124772
125033
|
|
|
124773
125034
|
if (!calledElement) {
|
|
124774
125035
|
let extensionElements = businessObject.get('extensionElements');
|
|
124775
125036
|
|
|
124776
125037
|
if (!extensionElements) {
|
|
124777
|
-
extensionElements = createElement$
|
|
125038
|
+
extensionElements = createElement$5(
|
|
124778
125039
|
'bpmn:ExtensionElements',
|
|
124779
125040
|
{
|
|
124780
125041
|
values: []
|
|
@@ -124786,7 +125047,7 @@
|
|
|
124786
125047
|
modeling.updateProperties(shape, { extensionElements });
|
|
124787
125048
|
}
|
|
124788
125049
|
|
|
124789
|
-
calledElement = createElement$
|
|
125050
|
+
calledElement = createElement$5(
|
|
124790
125051
|
'zeebe:CalledElement',
|
|
124791
125052
|
{
|
|
124792
125053
|
propagateAllChildVariables: false
|
|
@@ -124851,7 +125112,7 @@
|
|
|
124851
125112
|
let extensionElements = businessObject.get('extensionElements');
|
|
124852
125113
|
|
|
124853
125114
|
if (!extensionElements) {
|
|
124854
|
-
extensionElements = createElement$
|
|
125115
|
+
extensionElements = createElement$5(
|
|
124855
125116
|
'bpmn:ExtensionElements',
|
|
124856
125117
|
{
|
|
124857
125118
|
values: [],
|
|
@@ -124863,7 +125124,7 @@
|
|
|
124863
125124
|
modeling.updateProperties(shape, { extensionElements });
|
|
124864
125125
|
}
|
|
124865
125126
|
|
|
124866
|
-
userTaskElement = createElement$
|
|
125127
|
+
userTaskElement = createElement$5(
|
|
124867
125128
|
'zeebe:UserTask',
|
|
124868
125129
|
{},
|
|
124869
125130
|
extensionElements,
|
|
@@ -124949,7 +125210,7 @@
|
|
|
124949
125210
|
const FORM_KEY_PREFIX = 'camunda-forms:bpmn:',
|
|
124950
125211
|
USER_TASK_FORM_ID_PREFIX = 'UserTaskForm_';
|
|
124951
125212
|
|
|
124952
|
-
function getFormDefinition(element) {
|
|
125213
|
+
function getFormDefinition$1(element) {
|
|
124953
125214
|
const businessObject = getBusinessObject$2(element);
|
|
124954
125215
|
|
|
124955
125216
|
const formDefinitions = getExtensionElementsList$1(businessObject, 'zeebe:FormDefinition');
|
|
@@ -124966,7 +125227,7 @@
|
|
|
124966
125227
|
rootElement = rootElement || getRootElement$1(element);
|
|
124967
125228
|
|
|
124968
125229
|
if (!formKey) {
|
|
124969
|
-
const formDefinition = getFormDefinition(element);
|
|
125230
|
+
const formDefinition = getFormDefinition$1(element);
|
|
124970
125231
|
|
|
124971
125232
|
if (!formDefinition) {
|
|
124972
125233
|
return;
|
|
@@ -125068,7 +125329,7 @@
|
|
|
125068
125329
|
return;
|
|
125069
125330
|
}
|
|
125070
125331
|
|
|
125071
|
-
const oldFormDefinition = getFormDefinition(shape);
|
|
125332
|
+
const oldFormDefinition = getFormDefinition$1(shape);
|
|
125072
125333
|
|
|
125073
125334
|
if (!oldFormDefinition) {
|
|
125074
125335
|
return;
|
|
@@ -125085,7 +125346,7 @@
|
|
|
125085
125346
|
return false;
|
|
125086
125347
|
}
|
|
125087
125348
|
|
|
125088
|
-
const formDefinition = getFormDefinition(element);
|
|
125349
|
+
const formDefinition = getFormDefinition$1(element);
|
|
125089
125350
|
|
|
125090
125351
|
return formDefinition
|
|
125091
125352
|
&& formDefinition.get('formKey')
|
|
@@ -125102,7 +125363,7 @@
|
|
|
125102
125363
|
|
|
125103
125364
|
// (1) ensure extension elements exist
|
|
125104
125365
|
if (!extensionElements) {
|
|
125105
|
-
extensionElements = createElement$
|
|
125366
|
+
extensionElements = createElement$5('bpmn:ExtensionElements', {
|
|
125106
125367
|
values: []
|
|
125107
125368
|
}, rootElement, bpmnFactory);
|
|
125108
125369
|
|
|
@@ -125114,7 +125375,7 @@
|
|
|
125114
125375
|
// (2) create new user task form
|
|
125115
125376
|
const userTaskFormId = createUserTaskFormId();
|
|
125116
125377
|
|
|
125117
|
-
const userTaskForm = createElement$
|
|
125378
|
+
const userTaskForm = createElement$5('zeebe:UserTaskForm', {
|
|
125118
125379
|
id: userTaskFormId,
|
|
125119
125380
|
body: oldUserTaskForm.get('body')
|
|
125120
125381
|
}, extensionElements, bpmnFactory);
|
|
@@ -125227,7 +125488,7 @@
|
|
|
125227
125488
|
return;
|
|
125228
125489
|
}
|
|
125229
125490
|
|
|
125230
|
-
const formDefinition = getFormDefinition(element);
|
|
125491
|
+
const formDefinition = getFormDefinition$1(element);
|
|
125231
125492
|
|
|
125232
125493
|
if (!formDefinition) {
|
|
125233
125494
|
return;
|
|
@@ -125257,7 +125518,7 @@
|
|
|
125257
125518
|
return;
|
|
125258
125519
|
}
|
|
125259
125520
|
|
|
125260
|
-
const formDefinition = getFormDefinition(element);
|
|
125521
|
+
const formDefinition = getFormDefinition$1(element);
|
|
125261
125522
|
|
|
125262
125523
|
if (!formDefinition) {
|
|
125263
125524
|
return;
|
|
@@ -129976,7 +130237,7 @@
|
|
|
129976
130237
|
*
|
|
129977
130238
|
* @returns {djs.model.Base} element which is created
|
|
129978
130239
|
*/
|
|
129979
|
-
function createElement$
|
|
130240
|
+
function createElement$4(elementType, properties, parent, factory) {
|
|
129980
130241
|
const element = factory.create(elementType, properties);
|
|
129981
130242
|
if (parent) {
|
|
129982
130243
|
element.$parent = parent;
|
|
@@ -130110,7 +130371,7 @@
|
|
|
130110
130371
|
*
|
|
130111
130372
|
* @return {ModdleElement}
|
|
130112
130373
|
*/
|
|
130113
|
-
function createCalledElement(attrs = {}, bpmnFactory) {
|
|
130374
|
+
function createCalledElement$2(attrs = {}, bpmnFactory) {
|
|
130114
130375
|
return bpmnFactory.create('zeebe:CalledElement', attrs);
|
|
130115
130376
|
}
|
|
130116
130377
|
|
|
@@ -130144,7 +130405,7 @@
|
|
|
130144
130405
|
const businessObject = getBusinessObject$2(element);
|
|
130145
130406
|
let extensionElements = businessObject.get('extensionElements');
|
|
130146
130407
|
if (!extensionElements) {
|
|
130147
|
-
extensionElements = createElement$
|
|
130408
|
+
extensionElements = createElement$4('bpmn:ExtensionElements', {}, businessObject, bpmnFactory);
|
|
130148
130409
|
businessObject.set('extensionElements', extensionElements);
|
|
130149
130410
|
}
|
|
130150
130411
|
let extension = findExtension$1(extensionElements, type);
|
|
@@ -130865,7 +131126,7 @@
|
|
|
130865
131126
|
this._modeling.updateModdleProperties(element, zeebeSubscription, propertiesToSet);
|
|
130866
131127
|
} else {
|
|
130867
131128
|
// create new Subscription
|
|
130868
|
-
const newSubscription = createElement$
|
|
131129
|
+
const newSubscription = createElement$4('zeebe:Subscription', propertiesToSet, message, this._bpmnFactory);
|
|
130869
131130
|
this._modeling.updateModdleProperties(element, messageExtensionElements, {
|
|
130870
131131
|
values: [...messageExtensionElements.get('values'), newSubscription]
|
|
130871
131132
|
});
|
|
@@ -130980,7 +131241,7 @@
|
|
|
130980
131241
|
const properties = {
|
|
130981
131242
|
[propertyName]: newPropertyValue
|
|
130982
131243
|
};
|
|
130983
|
-
calledElement = createCalledElement(properties, bpmnFactory);
|
|
131244
|
+
calledElement = createCalledElement$2(properties, bpmnFactory);
|
|
130984
131245
|
calledElement.$parent = businessObject;
|
|
130985
131246
|
commandStack.execute('element.updateModdleProperties', {
|
|
130986
131247
|
element,
|
|
@@ -131106,7 +131367,7 @@
|
|
|
131106
131367
|
linkName: newBinding.linkName,
|
|
131107
131368
|
[newBinding.property]: newPropertyValue
|
|
131108
131369
|
};
|
|
131109
|
-
const newLinkedResource = createElement$
|
|
131370
|
+
const newLinkedResource = createElement$4('zeebe:LinkedResource', newProperties, extensionElements, bpmnFactory);
|
|
131110
131371
|
commandStack.execute('element.updateModdleProperties', {
|
|
131111
131372
|
element,
|
|
131112
131373
|
moddleElement: linkedResources,
|
|
@@ -131867,7 +132128,7 @@
|
|
|
131867
132128
|
const linkedResources = ensureExtension(element, 'zeebe:LinkedResources', bpmnFactory);
|
|
131868
132129
|
let linkedResource = linkedResources.get('values').find(linkedResource => linkedResource.get('linkName') === linkName);
|
|
131869
132130
|
if (!linkedResource) {
|
|
131870
|
-
linkedResource = createElement$
|
|
132131
|
+
linkedResource = createElement$4('zeebe:LinkedResource', {
|
|
131871
132132
|
linkName
|
|
131872
132133
|
}, bo, bpmnFactory);
|
|
131873
132134
|
linkedResources.get('values').push(linkedResource);
|
|
@@ -132075,7 +132336,7 @@
|
|
|
132075
132336
|
if (EXTENSION_BINDING_TYPES$1.includes(type)) {
|
|
132076
132337
|
extensionElements = businessObject.get('extensionElements');
|
|
132077
132338
|
if (!extensionElements) {
|
|
132078
|
-
extensionElements = createElement$
|
|
132339
|
+
extensionElements = createElement$4('bpmn:ExtensionElements', null, businessObject, bpmnFactory);
|
|
132079
132340
|
commands.push({
|
|
132080
132341
|
cmd: 'element.updateModdleProperties',
|
|
132081
132342
|
context: {
|
|
@@ -132172,7 +132433,7 @@
|
|
|
132172
132433
|
if (IO_BINDING_TYPES$1.includes(type)) {
|
|
132173
132434
|
let ioMapping = findExtension$1(extensionElements, 'zeebe:IoMapping');
|
|
132174
132435
|
if (!ioMapping) {
|
|
132175
|
-
ioMapping = createElement$
|
|
132436
|
+
ioMapping = createElement$4('zeebe:IoMapping', null, businessObject, bpmnFactory);
|
|
132176
132437
|
commands.push({
|
|
132177
132438
|
cmd: 'element.updateModdleProperties',
|
|
132178
132439
|
context: {
|
|
@@ -132234,7 +132495,7 @@
|
|
|
132234
132495
|
if (type === ZEEBE_TASK_HEADER_TYPE) {
|
|
132235
132496
|
let taskHeaders = findExtension$1(extensionElements, 'zeebe:TaskHeaders');
|
|
132236
132497
|
if (!taskHeaders) {
|
|
132237
|
-
taskHeaders = createElement$
|
|
132498
|
+
taskHeaders = createElement$4('zeebe:TaskHeaders', null, businessObject, bpmnFactory);
|
|
132238
132499
|
commands.push({
|
|
132239
132500
|
cmd: 'element.updateModdleProperties',
|
|
132240
132501
|
context: {
|
|
@@ -132280,7 +132541,7 @@
|
|
|
132280
132541
|
if (type === ZEEBE_PROPERTY_TYPE) {
|
|
132281
132542
|
let zeebeProperties = findExtension$1(extensionElements, 'zeebe:Properties');
|
|
132282
132543
|
if (!zeebeProperties) {
|
|
132283
|
-
zeebeProperties = createElement$
|
|
132544
|
+
zeebeProperties = createElement$4('zeebe:Properties', null, businessObject, bpmnFactory);
|
|
132284
132545
|
commands.push({
|
|
132285
132546
|
cmd: 'element.updateModdleProperties',
|
|
132286
132547
|
context: {
|
|
@@ -132326,7 +132587,7 @@
|
|
|
132326
132587
|
}
|
|
132327
132588
|
});
|
|
132328
132589
|
} else {
|
|
132329
|
-
subscription = createElement$
|
|
132590
|
+
subscription = createElement$4('zeebe:Subscription', properties, extensionElements, bpmnFactory);
|
|
132330
132591
|
commands.push({
|
|
132331
132592
|
cmd: 'element.updateModdleProperties',
|
|
132332
132593
|
context: {
|
|
@@ -132357,7 +132618,7 @@
|
|
|
132357
132618
|
}
|
|
132358
132619
|
});
|
|
132359
132620
|
} else {
|
|
132360
|
-
calledElement = createElement$
|
|
132621
|
+
calledElement = createElement$4('zeebe:CalledElement', properties, extensionElements, bpmnFactory);
|
|
132361
132622
|
commands.push({
|
|
132362
132623
|
cmd: 'element.updateModdleProperties',
|
|
132363
132624
|
context: {
|
|
@@ -132373,7 +132634,7 @@
|
|
|
132373
132634
|
if (type === ZEEBE_LINKED_RESOURCE_PROPERTY) {
|
|
132374
132635
|
let linkedResources = findExtension$1(businessObject, 'zeebe:LinkedResources');
|
|
132375
132636
|
if (!linkedResources) {
|
|
132376
|
-
linkedResources = createElement$
|
|
132637
|
+
linkedResources = createElement$4('zeebe:LinkedResources', null, businessObject, bpmnFactory);
|
|
132377
132638
|
commands.push({
|
|
132378
132639
|
cmd: 'element.updateModdleProperties',
|
|
132379
132640
|
context: {
|
|
@@ -132387,7 +132648,7 @@
|
|
|
132387
132648
|
}
|
|
132388
132649
|
let linkedResource = linkedResources.get('values').find(value => value.get('linkName') === linkName);
|
|
132389
132650
|
if (!linkedResource) {
|
|
132390
|
-
linkedResource = createElement$
|
|
132651
|
+
linkedResource = createElement$4('zeebe:LinkedResource', {
|
|
132391
132652
|
linkName
|
|
132392
132653
|
}, businessObject, bpmnFactory);
|
|
132393
132654
|
commands.push({
|
|
@@ -134845,7 +135106,7 @@
|
|
|
134845
135106
|
// (1) create new message
|
|
134846
135107
|
if (value === CREATE_NEW_OPTION) {
|
|
134847
135108
|
const id = nextId('Message_');
|
|
134848
|
-
message = createElement$
|
|
135109
|
+
message = createElement$4('bpmn:Message', {
|
|
134849
135110
|
id,
|
|
134850
135111
|
name: id
|
|
134851
135112
|
}, root, bpmnFactory);
|
|
@@ -144320,7 +144581,7 @@
|
|
|
144320
144581
|
return elem.classList.add(className);
|
|
144321
144582
|
elem.classList.remove(className);
|
|
144322
144583
|
}
|
|
144323
|
-
function createElement(tag, className, content) {
|
|
144584
|
+
function createElement$3(tag, className, content) {
|
|
144324
144585
|
var e = window.document.createElement(tag);
|
|
144325
144586
|
className = className || "";
|
|
144326
144587
|
content = content || "";
|
|
@@ -144341,7 +144602,7 @@
|
|
|
144341
144602
|
return undefined;
|
|
144342
144603
|
}
|
|
144343
144604
|
function createNumberInput(inputClassName, opts) {
|
|
144344
|
-
var wrapper = createElement("div", "numInputWrapper"), numInput = createElement("input", "numInput " + inputClassName), arrowUp = createElement("span", "arrowUp"), arrowDown = createElement("span", "arrowDown");
|
|
144605
|
+
var wrapper = createElement$3("div", "numInputWrapper"), numInput = createElement$3("input", "numInput " + inputClassName), arrowUp = createElement$3("span", "arrowUp"), arrowDown = createElement$3("span", "arrowDown");
|
|
144345
144606
|
if (navigator.userAgent.indexOf("MSIE 9.0") === -1) {
|
|
144346
144607
|
numInput.type = "number";
|
|
144347
144608
|
}
|
|
@@ -144697,7 +144958,7 @@
|
|
|
144697
144958
|
self.clear = clear;
|
|
144698
144959
|
self.close = close;
|
|
144699
144960
|
self.onMouseOver = onMouseOver;
|
|
144700
|
-
self._createElement = createElement;
|
|
144961
|
+
self._createElement = createElement$3;
|
|
144701
144962
|
self.createDay = createDay;
|
|
144702
144963
|
self.destroy = destroy;
|
|
144703
144964
|
self.isEnabled = isEnabled;
|
|
@@ -145017,21 +145278,21 @@
|
|
|
145017
145278
|
}
|
|
145018
145279
|
function build() {
|
|
145019
145280
|
var fragment = window.document.createDocumentFragment();
|
|
145020
|
-
self.calendarContainer = createElement("div", "flatpickr-calendar");
|
|
145281
|
+
self.calendarContainer = createElement$3("div", "flatpickr-calendar");
|
|
145021
145282
|
self.calendarContainer.tabIndex = -1;
|
|
145022
145283
|
if (!self.config.noCalendar) {
|
|
145023
145284
|
fragment.appendChild(buildMonthNav());
|
|
145024
|
-
self.innerContainer = createElement("div", "flatpickr-innerContainer");
|
|
145285
|
+
self.innerContainer = createElement$3("div", "flatpickr-innerContainer");
|
|
145025
145286
|
if (self.config.weekNumbers) {
|
|
145026
145287
|
var _a = buildWeeks(), weekWrapper = _a.weekWrapper, weekNumbers = _a.weekNumbers;
|
|
145027
145288
|
self.innerContainer.appendChild(weekWrapper);
|
|
145028
145289
|
self.weekNumbers = weekNumbers;
|
|
145029
145290
|
self.weekWrapper = weekWrapper;
|
|
145030
145291
|
}
|
|
145031
|
-
self.rContainer = createElement("div", "flatpickr-rContainer");
|
|
145292
|
+
self.rContainer = createElement$3("div", "flatpickr-rContainer");
|
|
145032
145293
|
self.rContainer.appendChild(buildWeekdays());
|
|
145033
145294
|
if (!self.daysContainer) {
|
|
145034
|
-
self.daysContainer = createElement("div", "flatpickr-days");
|
|
145295
|
+
self.daysContainer = createElement$3("div", "flatpickr-days");
|
|
145035
145296
|
self.daysContainer.tabIndex = -1;
|
|
145036
145297
|
}
|
|
145037
145298
|
buildDays();
|
|
@@ -145057,7 +145318,7 @@
|
|
|
145057
145318
|
self.config.appendTo.appendChild(self.calendarContainer);
|
|
145058
145319
|
}
|
|
145059
145320
|
if (self.config.static) {
|
|
145060
|
-
var wrapper = createElement("div", "flatpickr-wrapper");
|
|
145321
|
+
var wrapper = createElement$3("div", "flatpickr-wrapper");
|
|
145061
145322
|
if (self.element.parentNode)
|
|
145062
145323
|
self.element.parentNode.insertBefore(wrapper, self.element);
|
|
145063
145324
|
wrapper.appendChild(self.element);
|
|
@@ -145072,7 +145333,7 @@
|
|
|
145072
145333
|
: window.document.body).appendChild(self.calendarContainer);
|
|
145073
145334
|
}
|
|
145074
145335
|
function createDay(className, date, _dayNumber, i) {
|
|
145075
|
-
var dateIsEnabled = isEnabled(date, true), dayElement = createElement("span", className, date.getDate().toString());
|
|
145336
|
+
var dateIsEnabled = isEnabled(date, true), dayElement = createElement$3("span", className, date.getDate().toString());
|
|
145076
145337
|
dayElement.dateObj = date;
|
|
145077
145338
|
dayElement.$i = i;
|
|
145078
145339
|
dayElement.setAttribute("aria-label", self.formatDate(date, self.config.ariaDateFormat));
|
|
@@ -145196,7 +145457,7 @@
|
|
|
145196
145457
|
(self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {
|
|
145197
145458
|
days.appendChild(createDay("flatpickr-day " + nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));
|
|
145198
145459
|
}
|
|
145199
|
-
var dayContainer = createElement("div", "dayContainer");
|
|
145460
|
+
var dayContainer = createElement$3("div", "dayContainer");
|
|
145200
145461
|
dayContainer.appendChild(days);
|
|
145201
145462
|
return dayContainer;
|
|
145202
145463
|
}
|
|
@@ -145238,7 +145499,7 @@
|
|
|
145238
145499
|
for (var i = 0; i < 12; i++) {
|
|
145239
145500
|
if (!shouldBuildMonth(i))
|
|
145240
145501
|
continue;
|
|
145241
|
-
var month = createElement("option", "flatpickr-monthDropdown-month");
|
|
145502
|
+
var month = createElement$3("option", "flatpickr-monthDropdown-month");
|
|
145242
145503
|
month.value = new Date(self.currentYear, i).getMonth().toString();
|
|
145243
145504
|
month.textContent = monthToStr(i, self.config.shorthandCurrentMonth, self.l10n);
|
|
145244
145505
|
month.tabIndex = -1;
|
|
@@ -145249,15 +145510,15 @@
|
|
|
145249
145510
|
}
|
|
145250
145511
|
}
|
|
145251
145512
|
function buildMonth() {
|
|
145252
|
-
var container = createElement("div", "flatpickr-month");
|
|
145513
|
+
var container = createElement$3("div", "flatpickr-month");
|
|
145253
145514
|
var monthNavFragment = window.document.createDocumentFragment();
|
|
145254
145515
|
var monthElement;
|
|
145255
145516
|
if (self.config.showMonths > 1 ||
|
|
145256
145517
|
self.config.monthSelectorType === "static") {
|
|
145257
|
-
monthElement = createElement("span", "cur-month");
|
|
145518
|
+
monthElement = createElement$3("span", "cur-month");
|
|
145258
145519
|
}
|
|
145259
145520
|
else {
|
|
145260
|
-
self.monthsDropdownContainer = createElement("select", "flatpickr-monthDropdown-months");
|
|
145521
|
+
self.monthsDropdownContainer = createElement$3("select", "flatpickr-monthDropdown-months");
|
|
145261
145522
|
self.monthsDropdownContainer.setAttribute("aria-label", self.l10n.monthAriaLabel);
|
|
145262
145523
|
bind(self.monthsDropdownContainer, "change", function (e) {
|
|
145263
145524
|
var target = getEventTarget(e);
|
|
@@ -145280,7 +145541,7 @@
|
|
|
145280
145541
|
!!self.config.minDate &&
|
|
145281
145542
|
self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();
|
|
145282
145543
|
}
|
|
145283
|
-
var currentMonth = createElement("div", "flatpickr-current-month");
|
|
145544
|
+
var currentMonth = createElement$3("div", "flatpickr-current-month");
|
|
145284
145545
|
currentMonth.appendChild(monthElement);
|
|
145285
145546
|
currentMonth.appendChild(yearInput);
|
|
145286
145547
|
monthNavFragment.appendChild(currentMonth);
|
|
@@ -145307,12 +145568,12 @@
|
|
|
145307
145568
|
self.monthNav.appendChild(self.nextMonthNav);
|
|
145308
145569
|
}
|
|
145309
145570
|
function buildMonthNav() {
|
|
145310
|
-
self.monthNav = createElement("div", "flatpickr-months");
|
|
145571
|
+
self.monthNav = createElement$3("div", "flatpickr-months");
|
|
145311
145572
|
self.yearElements = [];
|
|
145312
145573
|
self.monthElements = [];
|
|
145313
|
-
self.prevMonthNav = createElement("span", "flatpickr-prev-month");
|
|
145574
|
+
self.prevMonthNav = createElement$3("span", "flatpickr-prev-month");
|
|
145314
145575
|
self.prevMonthNav.innerHTML = self.config.prevArrow;
|
|
145315
|
-
self.nextMonthNav = createElement("span", "flatpickr-next-month");
|
|
145576
|
+
self.nextMonthNav = createElement$3("span", "flatpickr-next-month");
|
|
145316
145577
|
self.nextMonthNav.innerHTML = self.config.nextArrow;
|
|
145317
145578
|
buildMonths();
|
|
145318
145579
|
Object.defineProperty(self, "_hidePrevMonthArrow", {
|
|
@@ -145342,9 +145603,9 @@
|
|
|
145342
145603
|
if (self.config.noCalendar)
|
|
145343
145604
|
self.calendarContainer.classList.add("noCalendar");
|
|
145344
145605
|
var defaults = getDefaultHours(self.config);
|
|
145345
|
-
self.timeContainer = createElement("div", "flatpickr-time");
|
|
145606
|
+
self.timeContainer = createElement$3("div", "flatpickr-time");
|
|
145346
145607
|
self.timeContainer.tabIndex = -1;
|
|
145347
|
-
var separator = createElement("span", "flatpickr-time-separator", ":");
|
|
145608
|
+
var separator = createElement$3("span", "flatpickr-time-separator", ":");
|
|
145348
145609
|
var hourInput = createNumberInput("flatpickr-hour", {
|
|
145349
145610
|
"aria-label": self.l10n.hourAriaLabel,
|
|
145350
145611
|
});
|
|
@@ -145386,11 +145647,11 @@
|
|
|
145386
145647
|
self.secondElement.setAttribute("min", "0");
|
|
145387
145648
|
self.secondElement.setAttribute("max", "59");
|
|
145388
145649
|
self.secondElement.setAttribute("maxlength", "2");
|
|
145389
|
-
self.timeContainer.appendChild(createElement("span", "flatpickr-time-separator", ":"));
|
|
145650
|
+
self.timeContainer.appendChild(createElement$3("span", "flatpickr-time-separator", ":"));
|
|
145390
145651
|
self.timeContainer.appendChild(secondInput);
|
|
145391
145652
|
}
|
|
145392
145653
|
if (!self.config.time_24hr) {
|
|
145393
|
-
self.amPM = createElement("span", "flatpickr-am-pm", self.l10n.amPM[int((self.latestSelectedDateObj
|
|
145654
|
+
self.amPM = createElement$3("span", "flatpickr-am-pm", self.l10n.amPM[int((self.latestSelectedDateObj
|
|
145394
145655
|
? self.hourElement.value
|
|
145395
145656
|
: self.config.defaultHour) > 11)]);
|
|
145396
145657
|
self.amPM.title = self.l10n.toggleTitle;
|
|
@@ -145401,11 +145662,11 @@
|
|
|
145401
145662
|
}
|
|
145402
145663
|
function buildWeekdays() {
|
|
145403
145664
|
if (!self.weekdayContainer)
|
|
145404
|
-
self.weekdayContainer = createElement("div", "flatpickr-weekdays");
|
|
145665
|
+
self.weekdayContainer = createElement$3("div", "flatpickr-weekdays");
|
|
145405
145666
|
else
|
|
145406
145667
|
clearNode(self.weekdayContainer);
|
|
145407
145668
|
for (var i = self.config.showMonths; i--;) {
|
|
145408
|
-
var container = createElement("div", "flatpickr-weekdaycontainer");
|
|
145669
|
+
var container = createElement$3("div", "flatpickr-weekdaycontainer");
|
|
145409
145670
|
self.weekdayContainer.appendChild(container);
|
|
145410
145671
|
}
|
|
145411
145672
|
updateWeekdays();
|
|
@@ -145426,9 +145687,9 @@
|
|
|
145426
145687
|
}
|
|
145427
145688
|
function buildWeeks() {
|
|
145428
145689
|
self.calendarContainer.classList.add("hasWeeks");
|
|
145429
|
-
var weekWrapper = createElement("div", "flatpickr-weekwrapper");
|
|
145430
|
-
weekWrapper.appendChild(createElement("span", "flatpickr-weekday", self.l10n.weekAbbreviation));
|
|
145431
|
-
var weekNumbers = createElement("div", "flatpickr-weeks");
|
|
145690
|
+
var weekWrapper = createElement$3("div", "flatpickr-weekwrapper");
|
|
145691
|
+
weekWrapper.appendChild(createElement$3("span", "flatpickr-weekday", self.l10n.weekAbbreviation));
|
|
145692
|
+
var weekNumbers = createElement$3("div", "flatpickr-weeks");
|
|
145432
145693
|
weekWrapper.appendChild(weekNumbers);
|
|
145433
145694
|
return {
|
|
145434
145695
|
weekWrapper: weekWrapper,
|
|
@@ -146415,7 +146676,7 @@
|
|
|
146415
146676
|
self.input.classList.add("flatpickr-input");
|
|
146416
146677
|
self._input = self.input;
|
|
146417
146678
|
if (self.config.altInput) {
|
|
146418
|
-
self.altInput = createElement(self.input.nodeName, self.config.altInputClass);
|
|
146679
|
+
self.altInput = createElement$3(self.input.nodeName, self.config.altInputClass);
|
|
146419
146680
|
self._input = self.altInput;
|
|
146420
146681
|
self.altInput.placeholder = self.input.placeholder;
|
|
146421
146682
|
self.altInput.disabled = self.input.disabled;
|
|
@@ -146439,7 +146700,7 @@
|
|
|
146439
146700
|
? "time"
|
|
146440
146701
|
: "datetime-local"
|
|
146441
146702
|
: "date";
|
|
146442
|
-
self.mobileInput = createElement("input", self.input.className + " flatpickr-mobile");
|
|
146703
|
+
self.mobileInput = createElement$3("input", self.input.className + " flatpickr-mobile");
|
|
146443
146704
|
self.mobileInput.tabIndex = 1;
|
|
146444
146705
|
self.mobileInput.type = inputType;
|
|
146445
146706
|
self.mobileInput.disabled = self.input.disabled;
|
|
@@ -146698,7 +146959,7 @@
|
|
|
146698
146959
|
|
|
146699
146960
|
function g(n,t){for(var e in t)n[e]=t[e];return n}function C(n,t){for(var e in n)if("__source"!==e&&!(e in t))return !0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return !0;return !1}function w(n){this.props=n;}(w.prototype=new d$3).isPureReactComponent=!0,w.prototype.shouldComponentUpdate=function(n,t){return C(this.props,n)||C(this.state,t)};var x=l$5.__b;l$5.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),x&&x(n);};var T=l$5.__e;l$5.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);T(n,t,e,r);};var I=l$5.unmount;function L(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c();}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return L(n,t,e)})),n}function U(n,t,e){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return U(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=e)),n}function D(){this.__u=0,this.t=null,this.__b=null;}function F(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function V(){this.u=null,this.o=null;}l$5.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&!0===n.__h&&(n.type=null),I&&I(n);},(D.prototype=new d$3).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=F(r.__v),o=!1,i=function(){o||(o=!0,e.__R=null,u?u(l):l());};e.__R=i;var l=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=U(n,n.__c.__P,n.__c.__O);}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate();}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i);},D.prototype.componentWillUnmount=function(){this.t=[];},D.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=L(this.__b,r,o.__O=o.__P);}this.__b=null;}var i=e.__a&&h$3(p$4,null,n.fallback);return i&&(i.__h=null),[h$3(p$4,null,e.__a?null:n.children),i]};var W=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.u=e=e[2];}};(V.prototype=new d$3).__a=function(n){var t=this,e=F(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),W(t,n,r)):u();};e?e(o):o();}},V.prototype.render=function(n){this.u=null,this.o=new Map;var t=x$4(n.children);n.revealOrder&&"b"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.o.set(t[e],this.u=[1,0,this.u]);return n.children},V.prototype.componentDidUpdate=V.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){W(n,e,t);});};var z="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,B=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,H="undefined"!=typeof document,Z=function(n){return ("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(n)};d$3.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(d$3.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n});}});});var G=l$5.event;function J(){}function K(){return this.cancelBubble}function Q(){return this.defaultPrevented}l$5.event=function(n){return G&&(n=G(n)),n.persist=J,n.isPropagationStopped=K,n.isDefaultPrevented=Q,n.nativeEvent=n};var nn={configurable:!0,get:function(){return this.class}},tn=l$5.vnode;l$5.vnode=function(n){var t=n.type,e=n.props,u=e;if("string"==typeof t){var o=-1===t.indexOf("-");for(var i in u={},e){var l=e[i];H&&"children"===i&&"noscript"===t||"value"===i&&"defaultValue"in e&&null==l||("defaultValue"===i&&"value"in e&&null==e.value?i="value":"download"===i&&!0===l?l="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+t)&&!Z(e.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():o&&B.test(i)?i=i.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===l&&(l=void 0),/^oninput$/i.test(i)&&(i=i.toLowerCase(),u[i]&&(i="oninputCapture")),u[i]=l);}"select"==t&&u.multiple&&Array.isArray(u.value)&&(u.value=x$4(e.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value);})),"select"==t&&null!=u.defaultValue&&(u.value=x$4(e.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value;})),n.props=u,e.class!=e.className&&(nn.enumerable="className"in e,null!=e.className&&(u.class=e.className),Object.defineProperty(u,"className",nn));}n.$$typeof=z,tn&&tn(n);};var en=l$5.__r;l$5.__r=function(n){en&&en(n),n.__c;};
|
|
146700
146961
|
|
|
146701
|
-
/*! @license DOMPurify 3.2.
|
|
146962
|
+
/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
|
|
146702
146963
|
|
|
146703
146964
|
const {
|
|
146704
146965
|
entries,
|
|
@@ -146737,8 +146998,10 @@
|
|
|
146737
146998
|
};
|
|
146738
146999
|
}
|
|
146739
147000
|
const arrayForEach = unapply(Array.prototype.forEach);
|
|
147001
|
+
const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
|
|
146740
147002
|
const arrayPop = unapply(Array.prototype.pop);
|
|
146741
147003
|
const arrayPush = unapply(Array.prototype.push);
|
|
147004
|
+
const arraySplice = unapply(Array.prototype.splice);
|
|
146742
147005
|
const stringToLowerCase = unapply(String.prototype.toLowerCase);
|
|
146743
147006
|
const stringToString = unapply(String.prototype.toString);
|
|
146744
147007
|
const stringMatch = unapply(String.prototype.match);
|
|
@@ -146873,7 +147136,6 @@
|
|
|
146873
147136
|
}
|
|
146874
147137
|
|
|
146875
147138
|
const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
|
|
146876
|
-
// SVG
|
|
146877
147139
|
const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
|
|
146878
147140
|
const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
|
|
146879
147141
|
// List of SVG elements that are disallowed by default.
|
|
@@ -146895,8 +147157,8 @@
|
|
|
146895
147157
|
// eslint-disable-next-line unicorn/better-regex
|
|
146896
147158
|
const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
|
|
146897
147159
|
const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
|
|
146898
|
-
const TMPLIT_EXPR = seal(
|
|
146899
|
-
const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]
|
|
147160
|
+
const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm); // eslint-disable-line unicorn/better-regex
|
|
147161
|
+
const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/); // eslint-disable-line no-useless-escape
|
|
146900
147162
|
const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
|
|
146901
147163
|
const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
|
|
146902
147164
|
);
|
|
@@ -146979,12 +147241,25 @@
|
|
|
146979
147241
|
return null;
|
|
146980
147242
|
}
|
|
146981
147243
|
};
|
|
147244
|
+
const _createHooksMap = function _createHooksMap() {
|
|
147245
|
+
return {
|
|
147246
|
+
afterSanitizeAttributes: [],
|
|
147247
|
+
afterSanitizeElements: [],
|
|
147248
|
+
afterSanitizeShadowDOM: [],
|
|
147249
|
+
beforeSanitizeAttributes: [],
|
|
147250
|
+
beforeSanitizeElements: [],
|
|
147251
|
+
beforeSanitizeShadowDOM: [],
|
|
147252
|
+
uponSanitizeAttribute: [],
|
|
147253
|
+
uponSanitizeElement: [],
|
|
147254
|
+
uponSanitizeShadowNode: []
|
|
147255
|
+
};
|
|
147256
|
+
};
|
|
146982
147257
|
function createDOMPurify() {
|
|
146983
147258
|
let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
|
|
146984
147259
|
const DOMPurify = root => createDOMPurify(root);
|
|
146985
|
-
DOMPurify.version = '3.2.
|
|
147260
|
+
DOMPurify.version = '3.2.4';
|
|
146986
147261
|
DOMPurify.removed = [];
|
|
146987
|
-
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document) {
|
|
147262
|
+
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
|
|
146988
147263
|
// Not running in a browser, provide a factory function
|
|
146989
147264
|
// so that you can pass your own Window
|
|
146990
147265
|
DOMPurify.isSupported = false;
|
|
@@ -147035,7 +147310,7 @@
|
|
|
147035
147310
|
const {
|
|
147036
147311
|
importNode
|
|
147037
147312
|
} = originalDocument;
|
|
147038
|
-
let hooks =
|
|
147313
|
+
let hooks = _createHooksMap();
|
|
147039
147314
|
/**
|
|
147040
147315
|
* Expose whether this browser supports running the full DOMPurify.
|
|
147041
147316
|
*/
|
|
@@ -147464,8 +147739,8 @@
|
|
|
147464
147739
|
});
|
|
147465
147740
|
}
|
|
147466
147741
|
element.removeAttribute(name);
|
|
147467
|
-
// We void attribute values for unremovable "is"
|
|
147468
|
-
if (name === 'is'
|
|
147742
|
+
// We void attribute values for unremovable "is" attributes
|
|
147743
|
+
if (name === 'is') {
|
|
147469
147744
|
if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
|
|
147470
147745
|
try {
|
|
147471
147746
|
_forceRemove(element);
|
|
@@ -147556,11 +147831,8 @@
|
|
|
147556
147831
|
const _isNode = function _isNode(value) {
|
|
147557
147832
|
return typeof Node === 'function' && value instanceof Node;
|
|
147558
147833
|
};
|
|
147559
|
-
function
|
|
147560
|
-
|
|
147561
|
-
return;
|
|
147562
|
-
}
|
|
147563
|
-
arrayForEach(hooks[entryPoint], hook => {
|
|
147834
|
+
function _executeHooks(hooks, currentNode, data) {
|
|
147835
|
+
arrayForEach(hooks, hook => {
|
|
147564
147836
|
hook.call(DOMPurify, currentNode, data, CONFIG);
|
|
147565
147837
|
});
|
|
147566
147838
|
}
|
|
@@ -147576,7 +147848,7 @@
|
|
|
147576
147848
|
const _sanitizeElements = function _sanitizeElements(currentNode) {
|
|
147577
147849
|
let content = null;
|
|
147578
147850
|
/* Execute a hook if present */
|
|
147579
|
-
|
|
147851
|
+
_executeHooks(hooks.beforeSanitizeElements, currentNode, null);
|
|
147580
147852
|
/* Check if element is clobbered or can clobber */
|
|
147581
147853
|
if (_isClobbered(currentNode)) {
|
|
147582
147854
|
_forceRemove(currentNode);
|
|
@@ -147585,7 +147857,7 @@
|
|
|
147585
147857
|
/* Now let's check the element's type and name */
|
|
147586
147858
|
const tagName = transformCaseFunc(currentNode.nodeName);
|
|
147587
147859
|
/* Execute a hook if present */
|
|
147588
|
-
|
|
147860
|
+
_executeHooks(hooks.uponSanitizeElement, currentNode, {
|
|
147589
147861
|
tagName,
|
|
147590
147862
|
allowedTags: ALLOWED_TAGS
|
|
147591
147863
|
});
|
|
@@ -147656,7 +147928,7 @@
|
|
|
147656
147928
|
}
|
|
147657
147929
|
}
|
|
147658
147930
|
/* Execute a hook if present */
|
|
147659
|
-
|
|
147931
|
+
_executeHooks(hooks.afterSanitizeElements, currentNode, null);
|
|
147660
147932
|
return false;
|
|
147661
147933
|
};
|
|
147662
147934
|
/**
|
|
@@ -147717,12 +147989,12 @@
|
|
|
147717
147989
|
*/
|
|
147718
147990
|
const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
|
|
147719
147991
|
/* Execute a hook if present */
|
|
147720
|
-
|
|
147992
|
+
_executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
|
|
147721
147993
|
const {
|
|
147722
147994
|
attributes
|
|
147723
147995
|
} = currentNode;
|
|
147724
147996
|
/* Check if we have attributes; if not we might have a text node */
|
|
147725
|
-
if (!attributes) {
|
|
147997
|
+
if (!attributes || _isClobbered(currentNode)) {
|
|
147726
147998
|
return;
|
|
147727
147999
|
}
|
|
147728
148000
|
const hookEvent = {
|
|
@@ -147748,7 +148020,7 @@
|
|
|
147748
148020
|
hookEvent.attrValue = value;
|
|
147749
148021
|
hookEvent.keepAttr = true;
|
|
147750
148022
|
hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
|
|
147751
|
-
|
|
148023
|
+
_executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
|
|
147752
148024
|
value = hookEvent.attrValue;
|
|
147753
148025
|
/* Full DOM Clobbering protection via namespace isolation,
|
|
147754
148026
|
* Prefix id and name attributes with `user-content-`
|
|
@@ -147823,7 +148095,7 @@
|
|
|
147823
148095
|
} catch (_) {}
|
|
147824
148096
|
}
|
|
147825
148097
|
/* Execute a hook if present */
|
|
147826
|
-
|
|
148098
|
+
_executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
|
|
147827
148099
|
};
|
|
147828
148100
|
/**
|
|
147829
148101
|
* _sanitizeShadowDOM
|
|
@@ -147834,23 +148106,21 @@
|
|
|
147834
148106
|
let shadowNode = null;
|
|
147835
148107
|
const shadowIterator = _createNodeIterator(fragment);
|
|
147836
148108
|
/* Execute a hook if present */
|
|
147837
|
-
|
|
148109
|
+
_executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
|
|
147838
148110
|
while (shadowNode = shadowIterator.nextNode()) {
|
|
147839
148111
|
/* Execute a hook if present */
|
|
147840
|
-
|
|
148112
|
+
_executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
|
|
147841
148113
|
/* Sanitize tags and elements */
|
|
147842
|
-
|
|
147843
|
-
|
|
147844
|
-
|
|
148114
|
+
_sanitizeElements(shadowNode);
|
|
148115
|
+
/* Check attributes next */
|
|
148116
|
+
_sanitizeAttributes(shadowNode);
|
|
147845
148117
|
/* Deep shadow DOM detected */
|
|
147846
148118
|
if (shadowNode.content instanceof DocumentFragment) {
|
|
147847
148119
|
_sanitizeShadowDOM(shadowNode.content);
|
|
147848
148120
|
}
|
|
147849
|
-
/* Check attributes, sanitize if necessary */
|
|
147850
|
-
_sanitizeAttributes(shadowNode);
|
|
147851
148121
|
}
|
|
147852
148122
|
/* Execute a hook if present */
|
|
147853
|
-
|
|
148123
|
+
_executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
|
|
147854
148124
|
};
|
|
147855
148125
|
// eslint-disable-next-line complexity
|
|
147856
148126
|
DOMPurify.sanitize = function (dirty) {
|
|
@@ -147936,15 +148206,13 @@
|
|
|
147936
148206
|
/* Now start iterating over the created document */
|
|
147937
148207
|
while (currentNode = nodeIterator.nextNode()) {
|
|
147938
148208
|
/* Sanitize tags and elements */
|
|
147939
|
-
|
|
147940
|
-
|
|
147941
|
-
|
|
148209
|
+
_sanitizeElements(currentNode);
|
|
148210
|
+
/* Check attributes next */
|
|
148211
|
+
_sanitizeAttributes(currentNode);
|
|
147942
148212
|
/* Shadow DOM detected, sanitize it */
|
|
147943
148213
|
if (currentNode.content instanceof DocumentFragment) {
|
|
147944
148214
|
_sanitizeShadowDOM(currentNode.content);
|
|
147945
148215
|
}
|
|
147946
|
-
/* Check attributes, sanitize if necessary */
|
|
147947
|
-
_sanitizeAttributes(currentNode);
|
|
147948
148216
|
}
|
|
147949
148217
|
/* If we sanitized `dirty` in-place, return it. */
|
|
147950
148218
|
if (IN_PLACE) {
|
|
@@ -148008,21 +148276,20 @@
|
|
|
148008
148276
|
if (typeof hookFunction !== 'function') {
|
|
148009
148277
|
return;
|
|
148010
148278
|
}
|
|
148011
|
-
hooks[entryPoint] = hooks[entryPoint] || [];
|
|
148012
148279
|
arrayPush(hooks[entryPoint], hookFunction);
|
|
148013
148280
|
};
|
|
148014
|
-
DOMPurify.removeHook = function (entryPoint) {
|
|
148015
|
-
if (
|
|
148016
|
-
|
|
148281
|
+
DOMPurify.removeHook = function (entryPoint, hookFunction) {
|
|
148282
|
+
if (hookFunction !== undefined) {
|
|
148283
|
+
const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
|
|
148284
|
+
return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];
|
|
148017
148285
|
}
|
|
148286
|
+
return arrayPop(hooks[entryPoint]);
|
|
148018
148287
|
};
|
|
148019
148288
|
DOMPurify.removeHooks = function (entryPoint) {
|
|
148020
|
-
|
|
148021
|
-
hooks[entryPoint] = [];
|
|
148022
|
-
}
|
|
148289
|
+
hooks[entryPoint] = [];
|
|
148023
148290
|
};
|
|
148024
148291
|
DOMPurify.removeAllHooks = function () {
|
|
148025
|
-
hooks =
|
|
148292
|
+
hooks = _createHooksMap();
|
|
148026
148293
|
};
|
|
148027
148294
|
return DOMPurify;
|
|
148028
148295
|
}
|
|
@@ -161660,7 +161927,7 @@
|
|
|
161660
161927
|
/**
|
|
161661
161928
|
* This module is an append menu provider for the popup menu.
|
|
161662
161929
|
*/
|
|
161663
|
-
function AppendMenuProvider(
|
|
161930
|
+
function AppendMenuProvider$3(
|
|
161664
161931
|
elementFactory, popupMenu,
|
|
161665
161932
|
create, autoPlace, rules,
|
|
161666
161933
|
mouse, translate
|
|
@@ -161678,7 +161945,7 @@
|
|
|
161678
161945
|
this.register();
|
|
161679
161946
|
}
|
|
161680
161947
|
|
|
161681
|
-
AppendMenuProvider.$inject = [
|
|
161948
|
+
AppendMenuProvider$3.$inject = [
|
|
161682
161949
|
'elementFactory',
|
|
161683
161950
|
'popupMenu',
|
|
161684
161951
|
'create',
|
|
@@ -161691,7 +161958,7 @@
|
|
|
161691
161958
|
/**
|
|
161692
161959
|
* Register append menu provider in the popup menu
|
|
161693
161960
|
*/
|
|
161694
|
-
AppendMenuProvider.prototype.register = function() {
|
|
161961
|
+
AppendMenuProvider$3.prototype.register = function() {
|
|
161695
161962
|
this._popupMenu.registerProvider('bpmn-append', this);
|
|
161696
161963
|
};
|
|
161697
161964
|
|
|
@@ -161702,7 +161969,7 @@
|
|
|
161702
161969
|
*
|
|
161703
161970
|
* @return {Array<Object>} a list of menu entry items
|
|
161704
161971
|
*/
|
|
161705
|
-
AppendMenuProvider.prototype.getPopupMenuEntries = function(element) {
|
|
161972
|
+
AppendMenuProvider$3.prototype.getPopupMenuEntries = function(element) {
|
|
161706
161973
|
const rules = this._rules;
|
|
161707
161974
|
const translate = this._translate;
|
|
161708
161975
|
|
|
@@ -161752,7 +162019,7 @@
|
|
|
161752
162019
|
*
|
|
161753
162020
|
* @return {Array<Object>} filtered entries
|
|
161754
162021
|
*/
|
|
161755
|
-
AppendMenuProvider.prototype._filterEntries = function(entries) {
|
|
162022
|
+
AppendMenuProvider$3.prototype._filterEntries = function(entries) {
|
|
161756
162023
|
return entries.filter(option => {
|
|
161757
162024
|
|
|
161758
162025
|
const target = option.target;
|
|
@@ -161784,7 +162051,7 @@
|
|
|
161784
162051
|
*
|
|
161785
162052
|
* @return {Object}
|
|
161786
162053
|
*/
|
|
161787
|
-
AppendMenuProvider.prototype._createEntryAction = function(element, target) {
|
|
162054
|
+
AppendMenuProvider$3.prototype._createEntryAction = function(element, target) {
|
|
161788
162055
|
const elementFactory = this._elementFactory;
|
|
161789
162056
|
const autoPlace = this._autoPlace;
|
|
161790
162057
|
const create = this._create;
|
|
@@ -161821,7 +162088,7 @@
|
|
|
161821
162088
|
*
|
|
161822
162089
|
* @return {Boolean}
|
|
161823
162090
|
*/
|
|
161824
|
-
AppendMenuProvider.prototype._canAutoPlaceElement = (target) => {
|
|
162091
|
+
AppendMenuProvider$3.prototype._canAutoPlaceElement = (target) => {
|
|
161825
162092
|
const { type } = target;
|
|
161826
162093
|
|
|
161827
162094
|
if (type === 'bpmn:BoundaryEvent') {
|
|
@@ -162410,7 +162677,7 @@
|
|
|
162410
162677
|
'appendContextPadProvider',
|
|
162411
162678
|
'appendRules'
|
|
162412
162679
|
],
|
|
162413
|
-
appendMenuProvider: [ 'type', AppendMenuProvider ],
|
|
162680
|
+
appendMenuProvider: [ 'type', AppendMenuProvider$3 ],
|
|
162414
162681
|
appendContextPadProvider: [ 'type', AppendContextPadProvider ],
|
|
162415
162682
|
appendRules: [ 'type', AppendRules ]
|
|
162416
162683
|
};
|
|
@@ -162418,7 +162685,7 @@
|
|
|
162418
162685
|
/**
|
|
162419
162686
|
* This module is a create menu provider for the popup menu.
|
|
162420
162687
|
*/
|
|
162421
|
-
function CreateMenuProvider(
|
|
162688
|
+
function CreateMenuProvider$3(
|
|
162422
162689
|
elementFactory, popupMenu, create,
|
|
162423
162690
|
autoPlace, mouse, translate
|
|
162424
162691
|
) {
|
|
@@ -162432,7 +162699,7 @@
|
|
|
162432
162699
|
this.register();
|
|
162433
162700
|
}
|
|
162434
162701
|
|
|
162435
|
-
CreateMenuProvider.$inject = [
|
|
162702
|
+
CreateMenuProvider$3.$inject = [
|
|
162436
162703
|
'elementFactory',
|
|
162437
162704
|
'popupMenu',
|
|
162438
162705
|
'create',
|
|
@@ -162444,7 +162711,7 @@
|
|
|
162444
162711
|
/**
|
|
162445
162712
|
* Register create menu provider in the popup menu
|
|
162446
162713
|
*/
|
|
162447
|
-
CreateMenuProvider.prototype.register = function() {
|
|
162714
|
+
CreateMenuProvider$3.prototype.register = function() {
|
|
162448
162715
|
this._popupMenu.registerProvider('bpmn-create', this);
|
|
162449
162716
|
};
|
|
162450
162717
|
|
|
@@ -162455,7 +162722,7 @@
|
|
|
162455
162722
|
*
|
|
162456
162723
|
* @return {Array<Object>} a list of menu entry items
|
|
162457
162724
|
*/
|
|
162458
|
-
CreateMenuProvider.prototype.getPopupMenuEntries = function() {
|
|
162725
|
+
CreateMenuProvider$3.prototype.getPopupMenuEntries = function() {
|
|
162459
162726
|
|
|
162460
162727
|
const entries = {};
|
|
162461
162728
|
|
|
@@ -162500,7 +162767,7 @@
|
|
|
162500
162767
|
* @param {Object} target
|
|
162501
162768
|
* @returns {Object}
|
|
162502
162769
|
*/
|
|
162503
|
-
CreateMenuProvider.prototype._createEntryAction = function(target) {
|
|
162770
|
+
CreateMenuProvider$3.prototype._createEntryAction = function(target) {
|
|
162504
162771
|
|
|
162505
162772
|
const create = this._create;
|
|
162506
162773
|
const mouse = this._mouse;
|
|
@@ -162633,7 +162900,7 @@
|
|
|
162633
162900
|
'createMenuProvider',
|
|
162634
162901
|
'createPaletteProvider'
|
|
162635
162902
|
],
|
|
162636
|
-
createMenuProvider: [ 'type', CreateMenuProvider ],
|
|
162903
|
+
createMenuProvider: [ 'type', CreateMenuProvider$3 ],
|
|
162637
162904
|
createPaletteProvider: [ 'type', CreatePaletteProvider ]
|
|
162638
162905
|
};
|
|
162639
162906
|
|
|
@@ -164895,6 +165162,911 @@
|
|
|
164895
165162
|
camundaDetailsPopupMenuProvider: [ 'type', CamundaDetailsPopupMenuProvider ]
|
|
164896
165163
|
};
|
|
164897
165164
|
|
|
165165
|
+
class Resources {
|
|
165166
|
+
static $inject = [ 'config.resources' ];
|
|
165167
|
+
|
|
165168
|
+
constructor(resources) {
|
|
165169
|
+
this._resources = resources || [];
|
|
165170
|
+
}
|
|
165171
|
+
|
|
165172
|
+
set(resources) {
|
|
165173
|
+
this._resources = resources;
|
|
165174
|
+
}
|
|
165175
|
+
|
|
165176
|
+
getAll() {
|
|
165177
|
+
return this._resources;
|
|
165178
|
+
}
|
|
165179
|
+
|
|
165180
|
+
filter(fn) {
|
|
165181
|
+
return this._resources.filter(fn);
|
|
165182
|
+
}
|
|
165183
|
+
}
|
|
165184
|
+
|
|
165185
|
+
class ResourceLoader {
|
|
165186
|
+
static $inject = [ 'eventBus', 'resources' ];
|
|
165187
|
+
|
|
165188
|
+
constructor(eventBus, resources) {
|
|
165189
|
+
this._resources = resources;
|
|
165190
|
+
this._providers = [];
|
|
165191
|
+
|
|
165192
|
+
eventBus.on('diagram.init', () => {
|
|
165193
|
+
this.reload();
|
|
165194
|
+
});
|
|
165195
|
+
}
|
|
165196
|
+
|
|
165197
|
+
register(resourceProvider) {
|
|
165198
|
+
this._providers.push(resourceProvider);
|
|
165199
|
+
}
|
|
165200
|
+
|
|
165201
|
+
reload() {
|
|
165202
|
+
const combined = this._providers.reduce((resources, provider) => {
|
|
165203
|
+
return resources.concat(provider.getResources());
|
|
165204
|
+
}, []);
|
|
165205
|
+
|
|
165206
|
+
this._resources.set(combined);
|
|
165207
|
+
}
|
|
165208
|
+
}
|
|
165209
|
+
|
|
165210
|
+
/**
|
|
165211
|
+
* @typedef {{
|
|
165212
|
+
* type: 'bpmnProcess',
|
|
165213
|
+
* name: string,
|
|
165214
|
+
* processId: string
|
|
165215
|
+
* }} CallActivity
|
|
165216
|
+
*/
|
|
165217
|
+
|
|
165218
|
+
/**
|
|
165219
|
+
*
|
|
165220
|
+
* @param {CallActivity} resource
|
|
165221
|
+
* @param {import('bpmn-js/lib/features/modeling/BpmnFactory').default} bpmnFactory
|
|
165222
|
+
*/
|
|
165223
|
+
function createElement$2(resource, bpmnFactory) {
|
|
165224
|
+
return createCallActivity(resource, bpmnFactory);
|
|
165225
|
+
}
|
|
165226
|
+
|
|
165227
|
+
function createCallActivity(resource, bpmnFactory) {
|
|
165228
|
+
const calledElement = createCalledElement$1(resource, bpmnFactory);
|
|
165229
|
+
const extensionElements = bpmnFactory.create('bpmn:ExtensionElements', {
|
|
165230
|
+
values: [
|
|
165231
|
+
calledElement
|
|
165232
|
+
]
|
|
165233
|
+
});
|
|
165234
|
+
|
|
165235
|
+
return bpmnFactory.create('bpmn:CallActivity', {
|
|
165236
|
+
name: resource.name,
|
|
165237
|
+
extensionElements
|
|
165238
|
+
});
|
|
165239
|
+
}
|
|
165240
|
+
|
|
165241
|
+
function createCalledElement$1(resource, bpmnFactory) {
|
|
165242
|
+
return bpmnFactory.create('zeebe:CalledElement', {
|
|
165243
|
+
processId: resource.processId
|
|
165244
|
+
});
|
|
165245
|
+
}
|
|
165246
|
+
|
|
165247
|
+
const searchTerms$2 = [
|
|
165248
|
+
'resource',
|
|
165249
|
+
'bpmn',
|
|
165250
|
+
'call activity',
|
|
165251
|
+
'child process'
|
|
165252
|
+
].join(' ');
|
|
165253
|
+
|
|
165254
|
+
/**
|
|
165255
|
+
* @typedef {object} Config
|
|
165256
|
+
* @property {string} resourceType
|
|
165257
|
+
* @property {string} className
|
|
165258
|
+
* @property {string} groupName
|
|
165259
|
+
* @property {Function} createElement
|
|
165260
|
+
* @property {string} [search]
|
|
165261
|
+
*/
|
|
165262
|
+
|
|
165263
|
+
class BaseCreateMenuProvider {
|
|
165264
|
+
|
|
165265
|
+
/**
|
|
165266
|
+
*
|
|
165267
|
+
* @param {import('didi').Injector} injector
|
|
165268
|
+
* @param {Config} config
|
|
165269
|
+
*/
|
|
165270
|
+
constructor(injector, config) {
|
|
165271
|
+
this._elementFactory = injector.get('elementFactory');
|
|
165272
|
+
this._bpmnFactory = injector.get('bpmnFactory');
|
|
165273
|
+
this._popupMenu = injector.get('popupMenu');
|
|
165274
|
+
this._create = injector.get('create');
|
|
165275
|
+
this._autoPlace = injector.get('autoPlace');
|
|
165276
|
+
this._mouse = injector.get('mouse');
|
|
165277
|
+
this._translate = injector.get('translate');
|
|
165278
|
+
this._resources = injector.get('resources');
|
|
165279
|
+
|
|
165280
|
+
injector.get('popupMenu').registerProvider('bpmn-create', this);
|
|
165281
|
+
|
|
165282
|
+
this._config = config;
|
|
165283
|
+
}
|
|
165284
|
+
|
|
165285
|
+
getPopupMenuEntries() {
|
|
165286
|
+
const {
|
|
165287
|
+
resourceType,
|
|
165288
|
+
className,
|
|
165289
|
+
groupName,
|
|
165290
|
+
createElement,
|
|
165291
|
+
search
|
|
165292
|
+
} = this._config;
|
|
165293
|
+
|
|
165294
|
+
const resources = this._resources.filter(r => r.type === resourceType);
|
|
165295
|
+
const entries = {};
|
|
165296
|
+
|
|
165297
|
+
resources.forEach((resource, index) => {
|
|
165298
|
+
const getTarget = () => createElement(resource, this._bpmnFactory);
|
|
165299
|
+
entries[`resources-create-${resourceType}-${index}`] = {
|
|
165300
|
+
label: resource.name,
|
|
165301
|
+
action: this._createEntryAction(getTarget),
|
|
165302
|
+
group: {
|
|
165303
|
+
id: groupName.toLowerCase(),
|
|
165304
|
+
name: this._translate(groupName)
|
|
165305
|
+
},
|
|
165306
|
+
className,
|
|
165307
|
+
search
|
|
165308
|
+
};
|
|
165309
|
+
});
|
|
165310
|
+
|
|
165311
|
+
return entries;
|
|
165312
|
+
}
|
|
165313
|
+
|
|
165314
|
+
_createEntryAction(getTarget) {
|
|
165315
|
+
const create = this._create;
|
|
165316
|
+
const mouse = this._mouse;
|
|
165317
|
+
const popupMenu = this._popupMenu;
|
|
165318
|
+
const elementFactory = this._elementFactory;
|
|
165319
|
+
|
|
165320
|
+
return (event) => {
|
|
165321
|
+
popupMenu.close();
|
|
165322
|
+
|
|
165323
|
+
const businessObject = getTarget();
|
|
165324
|
+
const element = elementFactory.createShape({
|
|
165325
|
+
type: businessObject.$type,
|
|
165326
|
+
businessObject: businessObject
|
|
165327
|
+
});
|
|
165328
|
+
|
|
165329
|
+
// use last mouse event if triggered via keyboard
|
|
165330
|
+
if (event instanceof KeyboardEvent) {
|
|
165331
|
+
event = mouse.getLastMoveEvent();
|
|
165332
|
+
}
|
|
165333
|
+
|
|
165334
|
+
return create.start(event, element);
|
|
165335
|
+
};
|
|
165336
|
+
}
|
|
165337
|
+
}
|
|
165338
|
+
|
|
165339
|
+
let CreateMenuProvider$2 = class CreateMenuProvider extends BaseCreateMenuProvider {
|
|
165340
|
+
static $inject = [
|
|
165341
|
+
'injector'
|
|
165342
|
+
];
|
|
165343
|
+
|
|
165344
|
+
constructor(injector) {
|
|
165345
|
+
super(injector, {
|
|
165346
|
+
resourceType: 'bpmnProcess',
|
|
165347
|
+
groupName: 'Processes',
|
|
165348
|
+
className: 'bpmn-icon-call-activity',
|
|
165349
|
+
createElement: (resource, bpmnFactory) => createElement$2(resource, bpmnFactory),
|
|
165350
|
+
search: searchTerms$2
|
|
165351
|
+
});
|
|
165352
|
+
}
|
|
165353
|
+
};
|
|
165354
|
+
|
|
165355
|
+
/**
|
|
165356
|
+
* @typedef {object} Config
|
|
165357
|
+
* @property {string} resourceType
|
|
165358
|
+
* @property {string} className
|
|
165359
|
+
* @property {string} groupName
|
|
165360
|
+
* @property {Function} createElement
|
|
165361
|
+
* @property {string} [search]
|
|
165362
|
+
*/
|
|
165363
|
+
|
|
165364
|
+
class BaseAppendMenuProvider {
|
|
165365
|
+
|
|
165366
|
+
/**
|
|
165367
|
+
*
|
|
165368
|
+
* @param {import('didi').Injector} injector
|
|
165369
|
+
* @param {Config} config
|
|
165370
|
+
*/
|
|
165371
|
+
constructor(injector, config) {
|
|
165372
|
+
this._elementFactory = injector.get('elementFactory');
|
|
165373
|
+
this._bpmnFactory = injector.get('bpmnFactory');
|
|
165374
|
+
this._popupMenu = injector.get('popupMenu');
|
|
165375
|
+
this._create = injector.get('create');
|
|
165376
|
+
this._autoPlace = injector.get('autoPlace');
|
|
165377
|
+
this._rules = injector.get('rules');
|
|
165378
|
+
this._translate = injector.get('translate');
|
|
165379
|
+
this._resources = injector.get('resources');
|
|
165380
|
+
|
|
165381
|
+
this._config = config;
|
|
165382
|
+
|
|
165383
|
+
this._register();
|
|
165384
|
+
}
|
|
165385
|
+
|
|
165386
|
+
_register() {
|
|
165387
|
+
this._popupMenu.registerProvider('bpmn-append', this);
|
|
165388
|
+
};
|
|
165389
|
+
|
|
165390
|
+
/** @returns {import('diagram-js/lib/features/popup-menu/PopupMenuProvider').PopupMenuEntries} */
|
|
165391
|
+
getPopupMenuEntries(element) {
|
|
165392
|
+
const rules = this._rules;
|
|
165393
|
+
|
|
165394
|
+
if (!rules.allowed('shape.append', { element: element })) {
|
|
165395
|
+
return [];
|
|
165396
|
+
}
|
|
165397
|
+
|
|
165398
|
+
const {
|
|
165399
|
+
resourceType,
|
|
165400
|
+
className,
|
|
165401
|
+
groupName,
|
|
165402
|
+
createElement,
|
|
165403
|
+
search
|
|
165404
|
+
} = this._config;
|
|
165405
|
+
|
|
165406
|
+
const resources = this._resources.filter(r => r.type === resourceType);
|
|
165407
|
+
const entries = {};
|
|
165408
|
+
|
|
165409
|
+
resources.forEach((resource, index) => {
|
|
165410
|
+
const getTarget = () => createElement(resource, this._bpmnFactory);
|
|
165411
|
+
entries[`resources-append-${resourceType}-${index}`] = {
|
|
165412
|
+
label: resource.name,
|
|
165413
|
+
action: this._createEntryAction(element, getTarget),
|
|
165414
|
+
group: {
|
|
165415
|
+
id: groupName.toLowerCase(),
|
|
165416
|
+
name: this._translate(groupName)
|
|
165417
|
+
},
|
|
165418
|
+
className,
|
|
165419
|
+
search
|
|
165420
|
+
};
|
|
165421
|
+
});
|
|
165422
|
+
|
|
165423
|
+
return entries;
|
|
165424
|
+
};
|
|
165425
|
+
|
|
165426
|
+
_createEntryAction(element, targetFactory) {
|
|
165427
|
+
const elementFactory = this._elementFactory;
|
|
165428
|
+
const autoPlace = this._autoPlace;
|
|
165429
|
+
const create = this._create;
|
|
165430
|
+
|
|
165431
|
+
const createElement = () => {
|
|
165432
|
+
const businessObject = targetFactory();
|
|
165433
|
+
|
|
165434
|
+
return elementFactory.createShape({
|
|
165435
|
+
type: businessObject.$type,
|
|
165436
|
+
businessObject: businessObject
|
|
165437
|
+
});
|
|
165438
|
+
};
|
|
165439
|
+
|
|
165440
|
+
const autoPlaceElement = () => {
|
|
165441
|
+
const newElement = createElement();
|
|
165442
|
+
autoPlace.append(element, newElement);
|
|
165443
|
+
};
|
|
165444
|
+
|
|
165445
|
+
const manualPlaceElement = (event) => {
|
|
165446
|
+
const newElement = createElement();
|
|
165447
|
+
return create.start(event, newElement, {
|
|
165448
|
+
source: element
|
|
165449
|
+
});
|
|
165450
|
+
};
|
|
165451
|
+
|
|
165452
|
+
return {
|
|
165453
|
+
click: autoPlaceElement,
|
|
165454
|
+
dragstart: manualPlaceElement
|
|
165455
|
+
};
|
|
165456
|
+
}
|
|
165457
|
+
}
|
|
165458
|
+
|
|
165459
|
+
let AppendMenuProvider$2 = class AppendMenuProvider extends BaseAppendMenuProvider {
|
|
165460
|
+
static $inject = [
|
|
165461
|
+
'injector'
|
|
165462
|
+
];
|
|
165463
|
+
|
|
165464
|
+
constructor(injector) {
|
|
165465
|
+
super(injector, {
|
|
165466
|
+
resourceType: 'bpmnProcess',
|
|
165467
|
+
groupName: 'Processes',
|
|
165468
|
+
className: 'bpmn-icon-call-activity',
|
|
165469
|
+
createElement: (resource, bpmnFactory) => createElement$2(resource, bpmnFactory),
|
|
165470
|
+
search: searchTerms$2
|
|
165471
|
+
});
|
|
165472
|
+
}
|
|
165473
|
+
};
|
|
165474
|
+
|
|
165475
|
+
/**
|
|
165476
|
+
* @typedef {{
|
|
165477
|
+
* type: 'bpmnProcess',
|
|
165478
|
+
* name: string,
|
|
165479
|
+
* processId: string
|
|
165480
|
+
* }} CallActivity
|
|
165481
|
+
*/
|
|
165482
|
+
|
|
165483
|
+
/**
|
|
165484
|
+
*
|
|
165485
|
+
* @param {import('diagram-js/lib/model').Element} element
|
|
165486
|
+
* @param {CallActivity} resource
|
|
165487
|
+
* @param {import('didi').Injector} injector
|
|
165488
|
+
*/
|
|
165489
|
+
function replaceElement$2(element, resource, injector) {
|
|
165490
|
+
const bpmnFactory = injector.get('bpmnFactory'),
|
|
165491
|
+
bpmnReplace = injector.get('bpmnReplace'),
|
|
165492
|
+
modeling = injector.get('modeling'),
|
|
165493
|
+
commandStack = injector.get('commandStack');
|
|
165494
|
+
|
|
165495
|
+
|
|
165496
|
+
commandStack.execute('external-resources.composed-command', {
|
|
165497
|
+
command: replace
|
|
165498
|
+
});
|
|
165499
|
+
|
|
165500
|
+
|
|
165501
|
+
function replace() {
|
|
165502
|
+
const replacedElement = bpmnReplace.replaceElement(element, { type: 'bpmn:CallActivity' });
|
|
165503
|
+
modeling.updateProperties(replacedElement, {
|
|
165504
|
+
name: resource.name
|
|
165505
|
+
});
|
|
165506
|
+
|
|
165507
|
+
const bo = getBusinessObject$2(replacedElement);
|
|
165508
|
+
|
|
165509
|
+
const extensionElements = bo.get('extensionElements');
|
|
165510
|
+
|
|
165511
|
+
if (!extensionElements) {
|
|
165512
|
+
modeling.updateProperties(replacedElement, {
|
|
165513
|
+
extensionElements: bpmnFactory.create('bpmn:ExtensionElements', {
|
|
165514
|
+
values: [
|
|
165515
|
+
createCalledElement(resource, bpmnFactory)
|
|
165516
|
+
]
|
|
165517
|
+
})
|
|
165518
|
+
});
|
|
165519
|
+
|
|
165520
|
+
return;
|
|
165521
|
+
}
|
|
165522
|
+
|
|
165523
|
+
const calledElement = getCalledElement(replacedElement);
|
|
165524
|
+
|
|
165525
|
+
if (!calledElement) {
|
|
165526
|
+
modeling.updateModdleProperties(replacedElement, extensionElements, {
|
|
165527
|
+
values: [
|
|
165528
|
+
...extensionElements.values,
|
|
165529
|
+
createCalledElement(resource, bpmnFactory)
|
|
165530
|
+
]
|
|
165531
|
+
});
|
|
165532
|
+
|
|
165533
|
+
return;
|
|
165534
|
+
}
|
|
165535
|
+
|
|
165536
|
+
modeling.updateModdleProperties(replacedElement, calledElement, {
|
|
165537
|
+
processId: resource.processId
|
|
165538
|
+
});
|
|
165539
|
+
}
|
|
165540
|
+
}
|
|
165541
|
+
|
|
165542
|
+
function getCalledElement(element) {
|
|
165543
|
+
return element.businessObject?.extensionElements?.values.find(value => is$5(value, 'zeebe:CalledElement'));
|
|
165544
|
+
}
|
|
165545
|
+
|
|
165546
|
+
function createCalledElement(resource, bpmnFactory) {
|
|
165547
|
+
return bpmnFactory.create('zeebe:CalledElement', {
|
|
165548
|
+
processId: resource.processId
|
|
165549
|
+
});
|
|
165550
|
+
}
|
|
165551
|
+
|
|
165552
|
+
/**
|
|
165553
|
+
* @typedef {object} Config
|
|
165554
|
+
* @property {string} resourceType
|
|
165555
|
+
* @property {string} className
|
|
165556
|
+
* @property {string} groupName
|
|
165557
|
+
* @property {Function} replaceElement
|
|
165558
|
+
* @property {string} [search]
|
|
165559
|
+
*/
|
|
165560
|
+
|
|
165561
|
+
class BaseReplaceMenuProvider {
|
|
165562
|
+
|
|
165563
|
+
/**
|
|
165564
|
+
*
|
|
165565
|
+
* @param {import('didi').Injector} injector
|
|
165566
|
+
* @param {Config} config
|
|
165567
|
+
*/
|
|
165568
|
+
constructor(injector, config) {
|
|
165569
|
+
|
|
165570
|
+
this._injector = injector;
|
|
165571
|
+
this._popupMenu = injector.get('popupMenu');
|
|
165572
|
+
this._rules = injector.get('rules');
|
|
165573
|
+
this._translate = injector.get('translate');
|
|
165574
|
+
this._resources = injector.get('resources');
|
|
165575
|
+
|
|
165576
|
+
this._popupMenu.registerProvider('bpmn-replace', this);
|
|
165577
|
+
|
|
165578
|
+
this._config = config;
|
|
165579
|
+
}
|
|
165580
|
+
|
|
165581
|
+
|
|
165582
|
+
/**
|
|
165583
|
+
* @param {PopupMenuTarget} element
|
|
165584
|
+
*
|
|
165585
|
+
* @return {PopupMenuEntries}
|
|
165586
|
+
*/
|
|
165587
|
+
getPopupMenuEntries(element) {
|
|
165588
|
+
const rules = this._rules;
|
|
165589
|
+
|
|
165590
|
+
if (isArray$5(element) || !rules.allowed('shape.replace', { element })) {
|
|
165591
|
+
return {};
|
|
165592
|
+
}
|
|
165593
|
+
|
|
165594
|
+
if (!is$5(element, 'bpmn:Activity')) {
|
|
165595
|
+
return {};
|
|
165596
|
+
}
|
|
165597
|
+
|
|
165598
|
+
const {
|
|
165599
|
+
resourceType,
|
|
165600
|
+
className,
|
|
165601
|
+
groupName,
|
|
165602
|
+
replaceElement,
|
|
165603
|
+
search
|
|
165604
|
+
} = this._config;
|
|
165605
|
+
|
|
165606
|
+
const resources = this._resources.filter(r => r.type === resourceType);
|
|
165607
|
+
const entries = {};
|
|
165608
|
+
|
|
165609
|
+
resources.forEach((resource, index) => {
|
|
165610
|
+
const replace = () => replaceElement(element, resource, this._injector);
|
|
165611
|
+
entries[`resources-replace-${resourceType}-${index}`] = {
|
|
165612
|
+
label: resource.name,
|
|
165613
|
+
action: replace,
|
|
165614
|
+
group: {
|
|
165615
|
+
name: this._translate(groupName)
|
|
165616
|
+
},
|
|
165617
|
+
className,
|
|
165618
|
+
search
|
|
165619
|
+
};
|
|
165620
|
+
});
|
|
165621
|
+
|
|
165622
|
+
return entries;
|
|
165623
|
+
}
|
|
165624
|
+
}
|
|
165625
|
+
|
|
165626
|
+
let ReplaceMenuProvider$2 = class ReplaceMenuProvider extends BaseReplaceMenuProvider {
|
|
165627
|
+
static $inject = [
|
|
165628
|
+
'injector'
|
|
165629
|
+
];
|
|
165630
|
+
|
|
165631
|
+
constructor(injector) {
|
|
165632
|
+
super(injector, {
|
|
165633
|
+
resourceType: 'bpmnProcess',
|
|
165634
|
+
groupName: 'Processes',
|
|
165635
|
+
className: 'bpmn-icon-call-activity',
|
|
165636
|
+
replaceElement: (element, resource, injector) => replaceElement$2(element, resource, injector),
|
|
165637
|
+
search: searchTerms$2
|
|
165638
|
+
});
|
|
165639
|
+
}
|
|
165640
|
+
};
|
|
165641
|
+
|
|
165642
|
+
const ProcessHandlerModule = {
|
|
165643
|
+
__init__: [
|
|
165644
|
+
'resources.processHandler.create',
|
|
165645
|
+
'resources.processHandler.append',
|
|
165646
|
+
'resources.processHandler.replace'
|
|
165647
|
+
],
|
|
165648
|
+
'resources.processHandler.create': [ 'type', CreateMenuProvider$2 ],
|
|
165649
|
+
'resources.processHandler.append': [ 'type', AppendMenuProvider$2 ],
|
|
165650
|
+
'resources.processHandler.replace': [ 'type', ReplaceMenuProvider$2 ]
|
|
165651
|
+
};
|
|
165652
|
+
|
|
165653
|
+
/**
|
|
165654
|
+
* @typedef {{
|
|
165655
|
+
* type: 'dmnDecision',
|
|
165656
|
+
* name: string,
|
|
165657
|
+
* decisionId: string
|
|
165658
|
+
* }} Decision
|
|
165659
|
+
*/
|
|
165660
|
+
|
|
165661
|
+
/**
|
|
165662
|
+
* @param {Decision} resource
|
|
165663
|
+
* @param {import('bpmn-js/lib/features/modeling/BpmnFactory').default} bpmnFactory
|
|
165664
|
+
*/
|
|
165665
|
+
function createElement$1(resource, bpmnFactory) {
|
|
165666
|
+
return createDecisionTask(resource, bpmnFactory);
|
|
165667
|
+
}
|
|
165668
|
+
|
|
165669
|
+
function createDecisionTask(resource, bpmnFactory) {
|
|
165670
|
+
const calledElement = createCalledDecision$1(resource, bpmnFactory);
|
|
165671
|
+
const extensionElements = bpmnFactory.create('bpmn:ExtensionElements', {
|
|
165672
|
+
values: [
|
|
165673
|
+
calledElement
|
|
165674
|
+
]
|
|
165675
|
+
});
|
|
165676
|
+
|
|
165677
|
+
return bpmnFactory.create('bpmn:BusinessRuleTask', {
|
|
165678
|
+
name: resource.name,
|
|
165679
|
+
extensionElements
|
|
165680
|
+
});
|
|
165681
|
+
}
|
|
165682
|
+
|
|
165683
|
+
function createCalledDecision$1(resource, bpmnFactory) {
|
|
165684
|
+
return bpmnFactory.create('zeebe:CalledDecision', {
|
|
165685
|
+
decisionId: resource.decisionId
|
|
165686
|
+
});
|
|
165687
|
+
}
|
|
165688
|
+
|
|
165689
|
+
const searchTerms$1 = [
|
|
165690
|
+
'resource',
|
|
165691
|
+
'dmn',
|
|
165692
|
+
'business rule task',
|
|
165693
|
+
'decision'
|
|
165694
|
+
].join(' ');
|
|
165695
|
+
|
|
165696
|
+
let CreateMenuProvider$1 = class CreateMenuProvider extends BaseCreateMenuProvider {
|
|
165697
|
+
static $inject = [
|
|
165698
|
+
'injector'
|
|
165699
|
+
];
|
|
165700
|
+
|
|
165701
|
+
constructor(injector) {
|
|
165702
|
+
super(injector, {
|
|
165703
|
+
resourceType: 'dmnDecision',
|
|
165704
|
+
groupName: 'Decisions',
|
|
165705
|
+
className: 'bpmn-icon-business-rule-task',
|
|
165706
|
+
createElement: (resource, bpmnFactory) => createElement$1(resource, bpmnFactory),
|
|
165707
|
+
search: searchTerms$1
|
|
165708
|
+
});
|
|
165709
|
+
}
|
|
165710
|
+
};
|
|
165711
|
+
|
|
165712
|
+
let AppendMenuProvider$1 = class AppendMenuProvider extends BaseAppendMenuProvider {
|
|
165713
|
+
static $inject = [
|
|
165714
|
+
'injector'
|
|
165715
|
+
];
|
|
165716
|
+
|
|
165717
|
+
constructor(injector) {
|
|
165718
|
+
super(injector, {
|
|
165719
|
+
resourceType: 'dmnDecision',
|
|
165720
|
+
groupName: 'Decisions',
|
|
165721
|
+
className: 'bpmn-icon-business-rule-task',
|
|
165722
|
+
createElement: (resource, bpmnFactory) => createElement$1(resource, bpmnFactory),
|
|
165723
|
+
search: searchTerms$1
|
|
165724
|
+
});
|
|
165725
|
+
}
|
|
165726
|
+
};
|
|
165727
|
+
|
|
165728
|
+
/**
|
|
165729
|
+
* @typedef {{
|
|
165730
|
+
* type: 'dmnDecision',
|
|
165731
|
+
* name: string,
|
|
165732
|
+
* decisionId: string
|
|
165733
|
+
* }} Decision
|
|
165734
|
+
*/
|
|
165735
|
+
|
|
165736
|
+
/**
|
|
165737
|
+
* @param {import('diagram-js/lib/model').Element} element
|
|
165738
|
+
* @param {Decision} resource
|
|
165739
|
+
* @param {import('didi').Injector} injector
|
|
165740
|
+
*/
|
|
165741
|
+
function replaceElement$1(element, resource, injector) {
|
|
165742
|
+
const bpmnFactory = injector.get('bpmnFactory'),
|
|
165743
|
+
bpmnReplace = injector.get('bpmnReplace'),
|
|
165744
|
+
modeling = injector.get('modeling'),
|
|
165745
|
+
commandStack = injector.get('commandStack');
|
|
165746
|
+
|
|
165747
|
+
|
|
165748
|
+
commandStack.execute('external-resources.composed-command', {
|
|
165749
|
+
command: replace
|
|
165750
|
+
});
|
|
165751
|
+
|
|
165752
|
+
|
|
165753
|
+
function replace() {
|
|
165754
|
+
const replacedElement = bpmnReplace.replaceElement(element, { type: 'bpmn:BusinessRuleTask' });
|
|
165755
|
+
modeling.updateProperties(replacedElement, {
|
|
165756
|
+
name: resource.name
|
|
165757
|
+
});
|
|
165758
|
+
|
|
165759
|
+
const bo = getBusinessObject$2(replacedElement);
|
|
165760
|
+
|
|
165761
|
+
const extensionElements = bo.get('extensionElements');
|
|
165762
|
+
|
|
165763
|
+
if (!extensionElements) {
|
|
165764
|
+
modeling.updateProperties(replacedElement, {
|
|
165765
|
+
extensionElements: bpmnFactory.create('bpmn:ExtensionElements', {
|
|
165766
|
+
values: [
|
|
165767
|
+
createCalledDecision(resource, bpmnFactory)
|
|
165768
|
+
]
|
|
165769
|
+
})
|
|
165770
|
+
});
|
|
165771
|
+
|
|
165772
|
+
return;
|
|
165773
|
+
}
|
|
165774
|
+
|
|
165775
|
+
const calledDecision = getCalledDecision(replacedElement);
|
|
165776
|
+
|
|
165777
|
+
if (!calledDecision) {
|
|
165778
|
+
modeling.updateModdleProperties(replacedElement, extensionElements, {
|
|
165779
|
+
values: [
|
|
165780
|
+
...extensionElements.values,
|
|
165781
|
+
createCalledDecision(resource, bpmnFactory)
|
|
165782
|
+
]
|
|
165783
|
+
});
|
|
165784
|
+
|
|
165785
|
+
return;
|
|
165786
|
+
}
|
|
165787
|
+
|
|
165788
|
+
modeling.updateModdleProperties(replacedElement, calledDecision, {
|
|
165789
|
+
decisionId: resource.decisionId
|
|
165790
|
+
});
|
|
165791
|
+
}
|
|
165792
|
+
}
|
|
165793
|
+
|
|
165794
|
+
function getCalledDecision(element) {
|
|
165795
|
+
return element.businessObject?.extensionElements?.values.find(value => is$5(value, 'zeebe:CalledDecision'));
|
|
165796
|
+
}
|
|
165797
|
+
|
|
165798
|
+
function createCalledDecision(resource, bpmnFactory) {
|
|
165799
|
+
return bpmnFactory.create('zeebe:CalledDecision', {
|
|
165800
|
+
decisionId: resource.decisionId
|
|
165801
|
+
});
|
|
165802
|
+
}
|
|
165803
|
+
|
|
165804
|
+
let ReplaceMenuProvider$1 = class ReplaceMenuProvider extends BaseReplaceMenuProvider {
|
|
165805
|
+
static $inject = [
|
|
165806
|
+
'injector'
|
|
165807
|
+
];
|
|
165808
|
+
|
|
165809
|
+
constructor(injector) {
|
|
165810
|
+
super(injector, {
|
|
165811
|
+
resourceType: 'dmnDecision',
|
|
165812
|
+
groupName: 'Decisions',
|
|
165813
|
+
className: 'bpmn-icon-business-rule-task',
|
|
165814
|
+
replaceElement: (element, resource, injector) => replaceElement$1(element, resource, injector),
|
|
165815
|
+
search: searchTerms$1
|
|
165816
|
+
});
|
|
165817
|
+
}
|
|
165818
|
+
};
|
|
165819
|
+
|
|
165820
|
+
const DecisionHandlerModule = {
|
|
165821
|
+
__init__: [
|
|
165822
|
+
'resources.decisionHandler.create',
|
|
165823
|
+
'resources.decisionHandler.append',
|
|
165824
|
+
'resources.decisionHandler.replace'
|
|
165825
|
+
],
|
|
165826
|
+
'resources.decisionHandler.create': [ 'type', CreateMenuProvider$1 ],
|
|
165827
|
+
'resources.decisionHandler.append': [ 'type', AppendMenuProvider$1 ],
|
|
165828
|
+
'resources.decisionHandler.replace': [ 'type', ReplaceMenuProvider$1 ]
|
|
165829
|
+
};
|
|
165830
|
+
|
|
165831
|
+
/**
|
|
165832
|
+
* @typedef {{
|
|
165833
|
+
* type: 'form',
|
|
165834
|
+
* name: string,
|
|
165835
|
+
* formId: string
|
|
165836
|
+
* }} Form
|
|
165837
|
+
*/
|
|
165838
|
+
|
|
165839
|
+
/**
|
|
165840
|
+
* @param {Form} resource
|
|
165841
|
+
*/
|
|
165842
|
+
function createElement(resource, bpmnFactory) {
|
|
165843
|
+
return createFormTask(resource, bpmnFactory);
|
|
165844
|
+
}
|
|
165845
|
+
|
|
165846
|
+
function createFormTask(resource, bpmnFactory) {
|
|
165847
|
+
const formDefinition = createFormDefinition$1(resource, bpmnFactory);
|
|
165848
|
+
const extensionElements = bpmnFactory.create('bpmn:ExtensionElements', {
|
|
165849
|
+
values: [
|
|
165850
|
+
createZeebeUserTask$1(bpmnFactory),
|
|
165851
|
+
formDefinition
|
|
165852
|
+
]
|
|
165853
|
+
});
|
|
165854
|
+
|
|
165855
|
+
return bpmnFactory.create('bpmn:UserTask', {
|
|
165856
|
+
name: resource.name,
|
|
165857
|
+
extensionElements
|
|
165858
|
+
});
|
|
165859
|
+
}
|
|
165860
|
+
|
|
165861
|
+
function createFormDefinition$1(resource, bpmnFactory) {
|
|
165862
|
+
return bpmnFactory.create('zeebe:FormDefinition', {
|
|
165863
|
+
formId: resource.formId
|
|
165864
|
+
});
|
|
165865
|
+
}
|
|
165866
|
+
|
|
165867
|
+
function createZeebeUserTask$1(bpmnFactory) {
|
|
165868
|
+
return bpmnFactory.create('zeebe:UserTask');
|
|
165869
|
+
}
|
|
165870
|
+
|
|
165871
|
+
const searchTerms = [
|
|
165872
|
+
'resource',
|
|
165873
|
+
'form',
|
|
165874
|
+
'user task',
|
|
165875
|
+
'human'
|
|
165876
|
+
].join(' ');
|
|
165877
|
+
|
|
165878
|
+
class CreateMenuProvider extends BaseCreateMenuProvider {
|
|
165879
|
+
static $inject = [
|
|
165880
|
+
'injector'
|
|
165881
|
+
];
|
|
165882
|
+
|
|
165883
|
+
constructor(injector) {
|
|
165884
|
+
super(injector, {
|
|
165885
|
+
resourceType: 'form',
|
|
165886
|
+
groupName: 'Forms',
|
|
165887
|
+
className: 'bpmn-icon-user-task',
|
|
165888
|
+
createElement: (resource, bpmnFactory) => createElement(resource, bpmnFactory),
|
|
165889
|
+
search: searchTerms
|
|
165890
|
+
});
|
|
165891
|
+
}
|
|
165892
|
+
}
|
|
165893
|
+
|
|
165894
|
+
class AppendMenuProvider extends BaseAppendMenuProvider {
|
|
165895
|
+
static $inject = [
|
|
165896
|
+
'injector'
|
|
165897
|
+
];
|
|
165898
|
+
|
|
165899
|
+
constructor(injector) {
|
|
165900
|
+
super(injector, {
|
|
165901
|
+
resourceType: 'form',
|
|
165902
|
+
groupName: 'Forms',
|
|
165903
|
+
className: 'bpmn-icon-user-task',
|
|
165904
|
+
createElement: (resource, bpmnFactory) => createElement(resource, bpmnFactory),
|
|
165905
|
+
search: searchTerms
|
|
165906
|
+
});
|
|
165907
|
+
}
|
|
165908
|
+
}
|
|
165909
|
+
|
|
165910
|
+
/**
|
|
165911
|
+
* @typedef {{
|
|
165912
|
+
* type: 'form',
|
|
165913
|
+
* name: string,
|
|
165914
|
+
* formId: string
|
|
165915
|
+
* }} Form
|
|
165916
|
+
*/
|
|
165917
|
+
|
|
165918
|
+
/**
|
|
165919
|
+
* @param {import('diagram-js/lib/model').Element} element
|
|
165920
|
+
* @param {Form} resource
|
|
165921
|
+
* @param {import('didi').Injector} injector
|
|
165922
|
+
*/
|
|
165923
|
+
function replaceElement(element, resource, injector) {
|
|
165924
|
+
const bpmnFactory = injector.get('bpmnFactory'),
|
|
165925
|
+
bpmnReplace = injector.get('bpmnReplace'),
|
|
165926
|
+
modeling = injector.get('modeling'),
|
|
165927
|
+
commandStack = injector.get('commandStack');
|
|
165928
|
+
|
|
165929
|
+
|
|
165930
|
+
commandStack.execute('external-resources.composed-command', {
|
|
165931
|
+
command: replace
|
|
165932
|
+
});
|
|
165933
|
+
|
|
165934
|
+
|
|
165935
|
+
function replace() {
|
|
165936
|
+
const replacedElement = bpmnReplace.replaceElement(element, { type: 'bpmn:UserTask' });
|
|
165937
|
+
modeling.updateProperties(replacedElement, {
|
|
165938
|
+
name: resource.name
|
|
165939
|
+
});
|
|
165940
|
+
|
|
165941
|
+
const bo = getBusinessObject$2(replacedElement);
|
|
165942
|
+
|
|
165943
|
+
const extensionElements = bo.get('extensionElements');
|
|
165944
|
+
|
|
165945
|
+
if (!extensionElements) {
|
|
165946
|
+
modeling.updateProperties(replacedElement, {
|
|
165947
|
+
extensionElements: bpmnFactory.create('bpmn:ExtensionElements', {
|
|
165948
|
+
values: [
|
|
165949
|
+
createZeebeUserTask(bpmnFactory),
|
|
165950
|
+
createFormDefinition(resource, bpmnFactory)
|
|
165951
|
+
]
|
|
165952
|
+
})
|
|
165953
|
+
});
|
|
165954
|
+
|
|
165955
|
+
return;
|
|
165956
|
+
}
|
|
165957
|
+
|
|
165958
|
+
const formDefinition = getFormDefinition(replacedElement);
|
|
165959
|
+
|
|
165960
|
+
if (!formDefinition) {
|
|
165961
|
+
modeling.updateModdleProperties(replacedElement, extensionElements, {
|
|
165962
|
+
values: [
|
|
165963
|
+
...extensionElements.values,
|
|
165964
|
+
createFormDefinition(resource, bpmnFactory)
|
|
165965
|
+
]
|
|
165966
|
+
});
|
|
165967
|
+
|
|
165968
|
+
return;
|
|
165969
|
+
}
|
|
165970
|
+
|
|
165971
|
+
modeling.updateModdleProperties(replacedElement, formDefinition, {
|
|
165972
|
+
formId: resource.formId
|
|
165973
|
+
});
|
|
165974
|
+
}
|
|
165975
|
+
}
|
|
165976
|
+
|
|
165977
|
+
function getFormDefinition(element) {
|
|
165978
|
+
return element.businessObject?.extensionElements?.values.find(value => is$5(value, 'zeebe:FormDefinition'));
|
|
165979
|
+
}
|
|
165980
|
+
|
|
165981
|
+
function createFormDefinition(resource, bpmnFactory) {
|
|
165982
|
+
return bpmnFactory.create('zeebe:FormDefinition', {
|
|
165983
|
+
formId: resource.formId
|
|
165984
|
+
});
|
|
165985
|
+
}
|
|
165986
|
+
|
|
165987
|
+
function createZeebeUserTask(bpmnFactory) {
|
|
165988
|
+
return bpmnFactory.create('zeebe:UserTask');
|
|
165989
|
+
}
|
|
165990
|
+
|
|
165991
|
+
class ReplaceMenuProvider extends BaseReplaceMenuProvider {
|
|
165992
|
+
static $inject = [
|
|
165993
|
+
'injector'
|
|
165994
|
+
];
|
|
165995
|
+
|
|
165996
|
+
constructor(injector) {
|
|
165997
|
+
super(injector, {
|
|
165998
|
+
resourceType: 'form',
|
|
165999
|
+
groupName: 'Forms',
|
|
166000
|
+
className: 'bpmn-icon-user-task',
|
|
166001
|
+
replaceElement: (element, resource, injector) => replaceElement(element, resource, injector),
|
|
166002
|
+
search: searchTerms
|
|
166003
|
+
});
|
|
166004
|
+
}
|
|
166005
|
+
}
|
|
166006
|
+
|
|
166007
|
+
const FormHandlerModule = {
|
|
166008
|
+
__init__: [
|
|
166009
|
+
'resources.formHandler.create',
|
|
166010
|
+
'resources.formHandler.append',
|
|
166011
|
+
'resources.formHandler.replace'
|
|
166012
|
+
],
|
|
166013
|
+
'resources.formHandler.create': [ 'type', CreateMenuProvider ],
|
|
166014
|
+
'resources.formHandler.append': [ 'type', AppendMenuProvider ],
|
|
166015
|
+
'resources.formHandler.replace': [ 'type', ReplaceMenuProvider ]
|
|
166016
|
+
};
|
|
166017
|
+
|
|
166018
|
+
/**
|
|
166019
|
+
* Command handler to compose multiple commands into a single command.
|
|
166020
|
+
* It allows to use facades like `BpmnReplace` and `Modeling` while retaining
|
|
166021
|
+
* single undo/redo feature.
|
|
166022
|
+
*/
|
|
166023
|
+
class ComposedCommandHandler {
|
|
166024
|
+
constructor(commandStack) {
|
|
166025
|
+
this._commandStack = commandStack;
|
|
166026
|
+
}
|
|
166027
|
+
|
|
166028
|
+
preExecute(context) {
|
|
166029
|
+
context.command();
|
|
166030
|
+
}
|
|
166031
|
+
}
|
|
166032
|
+
|
|
166033
|
+
ComposedCommandHandler.$inject = [ 'commandStack' ];
|
|
166034
|
+
|
|
166035
|
+
const HANDLERS = {
|
|
166036
|
+
'external-resources.composed-command': ComposedCommandHandler
|
|
166037
|
+
};
|
|
166038
|
+
|
|
166039
|
+
|
|
166040
|
+
function CommandInitializer(eventBus, commandStack) {
|
|
166041
|
+
|
|
166042
|
+
eventBus.on('diagram.init', function() {
|
|
166043
|
+
forEach$2(HANDLERS, function(handler, id) {
|
|
166044
|
+
commandStack.registerHandler(id, handler);
|
|
166045
|
+
});
|
|
166046
|
+
});
|
|
166047
|
+
}
|
|
166048
|
+
|
|
166049
|
+
CommandInitializer.$inject = [ 'eventBus', 'commandStack' ];
|
|
166050
|
+
|
|
166051
|
+
const ResourcesModule = {
|
|
166052
|
+
__init__: [
|
|
166053
|
+
'resources.resourceLoader',
|
|
166054
|
+
],
|
|
166055
|
+
'resources.resourceLoader': [ 'type', ResourceLoader ],
|
|
166056
|
+
'resources': [ 'type', Resources ],
|
|
166057
|
+
};
|
|
166058
|
+
|
|
166059
|
+
const DefaultHandlersModule = {
|
|
166060
|
+
__init__: [
|
|
166061
|
+
CommandInitializer
|
|
166062
|
+
],
|
|
166063
|
+
__depends__: [
|
|
166064
|
+
DecisionHandlerModule,
|
|
166065
|
+
FormHandlerModule,
|
|
166066
|
+
ProcessHandlerModule
|
|
166067
|
+
]
|
|
166068
|
+
};
|
|
166069
|
+
|
|
164898
166070
|
/**
|
|
164899
166071
|
* @typedef {import('bpmn-js/lib/BaseViewer').BaseViewerOptions} BaseViewerOptions
|
|
164900
166072
|
*/
|
|
@@ -164963,7 +166135,9 @@
|
|
|
164963
166135
|
ZeebeVariableResolverModule,
|
|
164964
166136
|
exampleDataPropertiesProviderModule,
|
|
164965
166137
|
index$3,
|
|
164966
|
-
camundaDetailsPopupMenuModule
|
|
166138
|
+
camundaDetailsPopupMenuModule,
|
|
166139
|
+
DefaultHandlersModule,
|
|
166140
|
+
ResourcesModule
|
|
164967
166141
|
];
|
|
164968
166142
|
|
|
164969
166143
|
Modeler.prototype._modules = [].concat(
|