camunda-bpmn-js 5.14.1 → 5.15.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/assets/properties-panel.css +7 -1
- package/dist/base-modeler.development.js +1047 -583
- package/dist/base-modeler.production.min.js +35 -35
- package/dist/base-navigated-viewer.development.js +21 -4
- package/dist/base-navigated-viewer.production.min.js +1 -1
- package/dist/base-viewer.development.js +21 -4
- package/dist/base-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-modeler.development.js +1896 -921
- package/dist/camunda-cloud-modeler.production.min.js +37 -37
- package/dist/camunda-cloud-navigated-viewer.development.js +10 -4
- package/dist/camunda-cloud-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-cloud-viewer.development.js +10 -4
- package/dist/camunda-cloud-viewer.production.min.js +1 -1
- package/dist/camunda-platform-modeler.development.js +1650 -945
- package/dist/camunda-platform-modeler.production.min.js +35 -35
- package/dist/camunda-platform-navigated-viewer.development.js +21 -4
- package/dist/camunda-platform-navigated-viewer.production.min.js +1 -1
- package/dist/camunda-platform-viewer.development.js +21 -4
- package/dist/camunda-platform-viewer.production.min.js +1 -1
- package/package.json +7 -7
|
@@ -1450,6 +1450,12 @@
|
|
|
1450
1450
|
return el.querySelector(selector);
|
|
1451
1451
|
}
|
|
1452
1452
|
|
|
1453
|
+
function all$2(selector, el) {
|
|
1454
|
+
el = el || document;
|
|
1455
|
+
|
|
1456
|
+
return el.querySelectorAll(selector);
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1453
1459
|
function remove$5(el) {
|
|
1454
1460
|
el.parentNode && el.parentNode.removeChild(el);
|
|
1455
1461
|
}
|
|
@@ -18870,6 +18876,17 @@
|
|
|
18870
18876
|
return element;
|
|
18871
18877
|
}
|
|
18872
18878
|
|
|
18879
|
+
/**
|
|
18880
|
+
* Returns true if the given element is an external label.
|
|
18881
|
+
*
|
|
18882
|
+
* @param {Element} element
|
|
18883
|
+
*
|
|
18884
|
+
* @return {boolean}
|
|
18885
|
+
*/
|
|
18886
|
+
function isExternalLabel(element) {
|
|
18887
|
+
return isLabel(element) && isLabelExternal(element.labelTarget);
|
|
18888
|
+
}
|
|
18889
|
+
|
|
18873
18890
|
var black = 'hsl(225, 10%, 15%)';
|
|
18874
18891
|
var white = 'white';
|
|
18875
18892
|
|
|
@@ -19000,11 +19017,11 @@
|
|
|
19000
19017
|
[ 'l', width - borderRadius * 2, 0 ],
|
|
19001
19018
|
[ 'a', borderRadius, borderRadius, 0, 0, 1, borderRadius, borderRadius ],
|
|
19002
19019
|
[ 'l', 0, height - borderRadius * 2 ],
|
|
19003
|
-
[ 'a', borderRadius, borderRadius, 0, 0, 1, -
|
|
19020
|
+
[ 'a', borderRadius, borderRadius, 0, 0, 1, -borderRadius, borderRadius ],
|
|
19004
19021
|
[ 'l', borderRadius * 2 - width, 0 ],
|
|
19005
|
-
[ 'a', borderRadius, borderRadius, 0, 0, 1, -
|
|
19022
|
+
[ 'a', borderRadius, borderRadius, 0, 0, 1, -borderRadius, -borderRadius ],
|
|
19006
19023
|
[ 'l', 0, borderRadius * 2 - height ],
|
|
19007
|
-
[ 'a', borderRadius, borderRadius, 0, 0, 1, borderRadius, -
|
|
19024
|
+
[ 'a', borderRadius, borderRadius, 0, 0, 1, borderRadius, -borderRadius ],
|
|
19008
19025
|
[ 'z' ]
|
|
19009
19026
|
];
|
|
19010
19027
|
|
|
@@ -19102,7 +19119,8 @@
|
|
|
19102
19119
|
var ELEMENT_LABEL_DISTANCE$1 = 10,
|
|
19103
19120
|
INNER_OUTER_DIST = 3,
|
|
19104
19121
|
PARTICIPANT_STROKE_WIDTH = 1.5,
|
|
19105
|
-
TASK_BORDER_RADIUS = 10
|
|
19122
|
+
TASK_BORDER_RADIUS = 10,
|
|
19123
|
+
EXTERNAL_LABEL_BORDER_RADIUS = 4;
|
|
19106
19124
|
|
|
19107
19125
|
var DEFAULT_OPACITY = 0.95,
|
|
19108
19126
|
FULL_OPACITY = 1,
|
|
@@ -21411,6 +21429,11 @@
|
|
|
21411
21429
|
* @return {string} path
|
|
21412
21430
|
*/
|
|
21413
21431
|
BpmnRenderer.prototype.getShapePath = function(shape) {
|
|
21432
|
+
|
|
21433
|
+
if (isLabel(shape)) {
|
|
21434
|
+
return getRoundRectPath(shape, EXTERNAL_LABEL_BORDER_RADIUS);
|
|
21435
|
+
}
|
|
21436
|
+
|
|
21414
21437
|
if (is(shape, 'bpmn:Event')) {
|
|
21415
21438
|
return getCirclePath(shape);
|
|
21416
21439
|
}
|
|
@@ -25870,7 +25893,7 @@
|
|
|
25870
25893
|
* @param {KeyboardEvent} event
|
|
25871
25894
|
* @return {boolean}
|
|
25872
25895
|
*/
|
|
25873
|
-
function isCmd(event) {
|
|
25896
|
+
function isCmd$1(event) {
|
|
25874
25897
|
|
|
25875
25898
|
// ensure we don't react to AltGr
|
|
25876
25899
|
// (mapped to CTRL + ALT)
|
|
@@ -25905,28 +25928,28 @@
|
|
|
25905
25928
|
* @param {KeyboardEvent} event
|
|
25906
25929
|
*/
|
|
25907
25930
|
function isCopy(event) {
|
|
25908
|
-
return isCmd(event) && isKey(KEYS_COPY, event);
|
|
25931
|
+
return isCmd$1(event) && isKey(KEYS_COPY, event);
|
|
25909
25932
|
}
|
|
25910
25933
|
|
|
25911
25934
|
/**
|
|
25912
25935
|
* @param {KeyboardEvent} event
|
|
25913
25936
|
*/
|
|
25914
25937
|
function isPaste(event) {
|
|
25915
|
-
return isCmd(event) && isKey(KEYS_PASTE, event);
|
|
25938
|
+
return isCmd$1(event) && isKey(KEYS_PASTE, event);
|
|
25916
25939
|
}
|
|
25917
25940
|
|
|
25918
25941
|
/**
|
|
25919
25942
|
* @param {KeyboardEvent} event
|
|
25920
25943
|
*/
|
|
25921
25944
|
function isUndo(event) {
|
|
25922
|
-
return isCmd(event) && !isShift(event) && isKey(KEYS_UNDO, event);
|
|
25945
|
+
return isCmd$1(event) && !isShift(event) && isKey(KEYS_UNDO, event);
|
|
25923
25946
|
}
|
|
25924
25947
|
|
|
25925
25948
|
/**
|
|
25926
25949
|
* @param {KeyboardEvent} event
|
|
25927
25950
|
*/
|
|
25928
25951
|
function isRedo(event) {
|
|
25929
|
-
return isCmd(event) && (
|
|
25952
|
+
return isCmd$1(event) && (
|
|
25930
25953
|
isKey(KEYS_REDO, event) || (
|
|
25931
25954
|
isKey(KEYS_UNDO, event) && isShift(event)
|
|
25932
25955
|
)
|
|
@@ -26130,7 +26153,7 @@
|
|
|
26130
26153
|
};
|
|
26131
26154
|
|
|
26132
26155
|
Keyboard.prototype.hasModifier = hasModifier;
|
|
26133
|
-
Keyboard.prototype.isCmd = isCmd;
|
|
26156
|
+
Keyboard.prototype.isCmd = isCmd$1;
|
|
26134
26157
|
Keyboard.prototype.isShift = isShift;
|
|
26135
26158
|
Keyboard.prototype.isKey = isKey;
|
|
26136
26159
|
|
|
@@ -26248,7 +26271,7 @@
|
|
|
26248
26271
|
|
|
26249
26272
|
// quirk: it has to be triggered by `=` as well to work on international keyboard layout
|
|
26250
26273
|
// cf: https://github.com/bpmn-io/bpmn-js/issues/1362#issuecomment-722989754
|
|
26251
|
-
if (isKey([ '+', 'Add', '=' ], event) && isCmd(event)) {
|
|
26274
|
+
if (isKey([ '+', 'Add', '=' ], event) && isCmd$1(event)) {
|
|
26252
26275
|
editorActions.trigger('stepZoom', { value: 1 });
|
|
26253
26276
|
|
|
26254
26277
|
return true;
|
|
@@ -26261,7 +26284,7 @@
|
|
|
26261
26284
|
|
|
26262
26285
|
var event = context.keyEvent;
|
|
26263
26286
|
|
|
26264
|
-
if (isKey([ '-', 'Subtract' ], event) && isCmd(event)) {
|
|
26287
|
+
if (isKey([ '-', 'Subtract' ], event) && isCmd$1(event)) {
|
|
26265
26288
|
editorActions.trigger('stepZoom', { value: -1 });
|
|
26266
26289
|
|
|
26267
26290
|
return true;
|
|
@@ -26274,7 +26297,7 @@
|
|
|
26274
26297
|
|
|
26275
26298
|
var event = context.keyEvent;
|
|
26276
26299
|
|
|
26277
|
-
if (isKey('0', event) && isCmd(event)) {
|
|
26300
|
+
if (isKey('0', event) && isCmd$1(event)) {
|
|
26278
26301
|
editorActions.trigger('zoom', { value: 1 });
|
|
26279
26302
|
|
|
26280
26303
|
return true;
|
|
@@ -35976,6 +35999,9 @@
|
|
|
35976
35999
|
// create a DataObject every time a DataObjectReference is created
|
|
35977
36000
|
var dataObject = bpmnFactory.create('bpmn:DataObject');
|
|
35978
36001
|
|
|
36002
|
+
// Copy the isCollection property if needed.
|
|
36003
|
+
dataObject.isCollection = shape.businessObject.dataObjectRef?.isCollection || false;
|
|
36004
|
+
|
|
35979
36005
|
// set the reference to the DataObject
|
|
35980
36006
|
shape.businessObject.dataObjectRef = dataObject;
|
|
35981
36007
|
}
|
|
@@ -44985,7 +45011,8 @@
|
|
|
44985
45011
|
'errorRef',
|
|
44986
45012
|
'escalationRef',
|
|
44987
45013
|
'messageRef',
|
|
44988
|
-
'signalRef'
|
|
45014
|
+
'signalRef',
|
|
45015
|
+
'dataObjectRef'
|
|
44989
45016
|
];
|
|
44990
45017
|
|
|
44991
45018
|
/**
|
|
@@ -59581,7 +59608,7 @@
|
|
|
59581
59608
|
], LOWER_PRIORITY, function(event) {
|
|
59582
59609
|
var originalEvent = event.originalEvent;
|
|
59583
59610
|
|
|
59584
|
-
if (!self.active || (originalEvent && isCmd(originalEvent))) {
|
|
59611
|
+
if (!self.active || (originalEvent && isCmd$1(originalEvent))) {
|
|
59585
59612
|
return;
|
|
59586
59613
|
}
|
|
59587
59614
|
|
|
@@ -62119,6 +62146,487 @@
|
|
|
62119
62146
|
labelEditingPreview: [ 'type', LabelEditingPreview ]
|
|
62120
62147
|
};
|
|
62121
62148
|
|
|
62149
|
+
var LOW_PRIORITY$4 = 500;
|
|
62150
|
+
|
|
62151
|
+
var DEFAULT_PRIORITY$2 = 1000;
|
|
62152
|
+
|
|
62153
|
+
/**
|
|
62154
|
+
* @typedef {import('../../model/Types').Element} Element
|
|
62155
|
+
*
|
|
62156
|
+
* @typedef {import('./OutlineProvider').default} OutlineProvider
|
|
62157
|
+
* @typedef {import('../../core/EventBus').default} EventBus
|
|
62158
|
+
* @typedef {import('../../draw/Styles').default} Styles
|
|
62159
|
+
*/
|
|
62160
|
+
|
|
62161
|
+
/**
|
|
62162
|
+
* @class
|
|
62163
|
+
*
|
|
62164
|
+
* A plugin that adds an outline to shapes and connections that may be activated and styled
|
|
62165
|
+
* via CSS classes.
|
|
62166
|
+
*
|
|
62167
|
+
* @param {EventBus} eventBus
|
|
62168
|
+
* @param {Styles} styles
|
|
62169
|
+
*/
|
|
62170
|
+
function Outline$1(eventBus, styles) {
|
|
62171
|
+
|
|
62172
|
+
this._eventBus = eventBus;
|
|
62173
|
+
|
|
62174
|
+
this.offset = 5;
|
|
62175
|
+
|
|
62176
|
+
var OUTLINE_STYLE = styles.cls('djs-outline', [ 'no-fill' ]);
|
|
62177
|
+
|
|
62178
|
+
var self = this;
|
|
62179
|
+
|
|
62180
|
+
/**
|
|
62181
|
+
* @param {SVGElement} gfx
|
|
62182
|
+
*
|
|
62183
|
+
* @return {SVGElement} outline
|
|
62184
|
+
*/
|
|
62185
|
+
function createOutline(gfx) {
|
|
62186
|
+
var outline = create$1('rect');
|
|
62187
|
+
|
|
62188
|
+
attr$2(outline, assign$2({
|
|
62189
|
+
x: 0,
|
|
62190
|
+
y: 0,
|
|
62191
|
+
rx: 4,
|
|
62192
|
+
width: 100,
|
|
62193
|
+
height: 100
|
|
62194
|
+
}, OUTLINE_STYLE));
|
|
62195
|
+
|
|
62196
|
+
return outline;
|
|
62197
|
+
}
|
|
62198
|
+
|
|
62199
|
+
// A low priortity is necessary, because outlines of labels have to be updated
|
|
62200
|
+
// after the label bounds have been updated in the renderer.
|
|
62201
|
+
eventBus.on([ 'shape.added', 'shape.changed' ], LOW_PRIORITY$4, function(event) {
|
|
62202
|
+
var element = event.element,
|
|
62203
|
+
gfx = event.gfx;
|
|
62204
|
+
|
|
62205
|
+
var outline = query$4('.djs-outline', gfx);
|
|
62206
|
+
|
|
62207
|
+
if (!outline) {
|
|
62208
|
+
outline = self.getOutline(element) || createOutline();
|
|
62209
|
+
append(gfx, outline);
|
|
62210
|
+
}
|
|
62211
|
+
|
|
62212
|
+
self.updateShapeOutline(outline, element);
|
|
62213
|
+
});
|
|
62214
|
+
|
|
62215
|
+
eventBus.on([ 'connection.added', 'connection.changed' ], function(event) {
|
|
62216
|
+
var element = event.element,
|
|
62217
|
+
gfx = event.gfx;
|
|
62218
|
+
|
|
62219
|
+
var outline = query$4('.djs-outline', gfx);
|
|
62220
|
+
|
|
62221
|
+
if (!outline) {
|
|
62222
|
+
outline = createOutline();
|
|
62223
|
+
append(gfx, outline);
|
|
62224
|
+
}
|
|
62225
|
+
|
|
62226
|
+
self.updateConnectionOutline(outline, element);
|
|
62227
|
+
});
|
|
62228
|
+
}
|
|
62229
|
+
|
|
62230
|
+
|
|
62231
|
+
/**
|
|
62232
|
+
* Updates the outline of a shape respecting the dimension of the
|
|
62233
|
+
* element and an outline offset.
|
|
62234
|
+
*
|
|
62235
|
+
* @param {SVGElement} outline
|
|
62236
|
+
* @param {Element} element
|
|
62237
|
+
*/
|
|
62238
|
+
Outline$1.prototype.updateShapeOutline = function(outline, element) {
|
|
62239
|
+
|
|
62240
|
+
var updated = false;
|
|
62241
|
+
var providers = this._getProviders();
|
|
62242
|
+
|
|
62243
|
+
if (providers.length) {
|
|
62244
|
+
forEach$2(providers, function(provider) {
|
|
62245
|
+
updated = updated || provider.updateOutline(element, outline);
|
|
62246
|
+
});
|
|
62247
|
+
}
|
|
62248
|
+
|
|
62249
|
+
if (!updated) {
|
|
62250
|
+
attr$2(outline, {
|
|
62251
|
+
x: -this.offset,
|
|
62252
|
+
y: -this.offset,
|
|
62253
|
+
width: element.width + this.offset * 2,
|
|
62254
|
+
height: element.height + this.offset * 2
|
|
62255
|
+
});
|
|
62256
|
+
}
|
|
62257
|
+
};
|
|
62258
|
+
|
|
62259
|
+
/**
|
|
62260
|
+
* Updates the outline of a connection respecting the bounding box of
|
|
62261
|
+
* the connection and an outline offset.
|
|
62262
|
+
* Register an outline provider with the given priority.
|
|
62263
|
+
*
|
|
62264
|
+
* @param {SVGElement} outline
|
|
62265
|
+
* @param {Element} connection
|
|
62266
|
+
*/
|
|
62267
|
+
Outline$1.prototype.updateConnectionOutline = function(outline, connection) {
|
|
62268
|
+
var bbox = getBBox(connection);
|
|
62269
|
+
|
|
62270
|
+
attr$2(outline, {
|
|
62271
|
+
x: bbox.x - this.offset,
|
|
62272
|
+
y: bbox.y - this.offset,
|
|
62273
|
+
width: bbox.width + this.offset * 2,
|
|
62274
|
+
height: bbox.height + this.offset * 2
|
|
62275
|
+
});
|
|
62276
|
+
};
|
|
62277
|
+
|
|
62278
|
+
/**
|
|
62279
|
+
* Register an outline provider with the given priority.
|
|
62280
|
+
*
|
|
62281
|
+
* @param {number} priority
|
|
62282
|
+
* @param {OutlineProvider} provider
|
|
62283
|
+
*/
|
|
62284
|
+
Outline$1.prototype.registerProvider = function(priority, provider) {
|
|
62285
|
+
if (!provider) {
|
|
62286
|
+
provider = priority;
|
|
62287
|
+
priority = DEFAULT_PRIORITY$2;
|
|
62288
|
+
}
|
|
62289
|
+
|
|
62290
|
+
this._eventBus.on('outline.getProviders', priority, function(event) {
|
|
62291
|
+
event.providers.push(provider);
|
|
62292
|
+
});
|
|
62293
|
+
};
|
|
62294
|
+
|
|
62295
|
+
/**
|
|
62296
|
+
* Returns the registered outline providers.
|
|
62297
|
+
*
|
|
62298
|
+
* @returns {OutlineProvider[]}
|
|
62299
|
+
*/
|
|
62300
|
+
Outline$1.prototype._getProviders = function() {
|
|
62301
|
+
var event = this._eventBus.createEvent({
|
|
62302
|
+
type: 'outline.getProviders',
|
|
62303
|
+
providers: []
|
|
62304
|
+
});
|
|
62305
|
+
|
|
62306
|
+
this._eventBus.fire(event);
|
|
62307
|
+
|
|
62308
|
+
return event.providers;
|
|
62309
|
+
};
|
|
62310
|
+
|
|
62311
|
+
/**
|
|
62312
|
+
* Returns the outline for an element.
|
|
62313
|
+
*
|
|
62314
|
+
* @param {Element} element
|
|
62315
|
+
*/
|
|
62316
|
+
Outline$1.prototype.getOutline = function(element) {
|
|
62317
|
+
var outline;
|
|
62318
|
+
var providers = this._getProviders();
|
|
62319
|
+
|
|
62320
|
+
forEach$2(providers, function(provider) {
|
|
62321
|
+
|
|
62322
|
+
if (!isFunction(provider.getOutline)) {
|
|
62323
|
+
return;
|
|
62324
|
+
}
|
|
62325
|
+
|
|
62326
|
+
outline = outline || provider.getOutline(element);
|
|
62327
|
+
});
|
|
62328
|
+
|
|
62329
|
+
return outline;
|
|
62330
|
+
};
|
|
62331
|
+
|
|
62332
|
+
Outline$1.$inject = [ 'eventBus', 'styles', 'elementRegistry' ];
|
|
62333
|
+
|
|
62334
|
+
var SELECTION_OUTLINE_PADDING = 6;
|
|
62335
|
+
|
|
62336
|
+
/**
|
|
62337
|
+
* @typedef {import('../../model/Types').Element} Element
|
|
62338
|
+
*
|
|
62339
|
+
* @typedef {import('../../core/EventBus').default} EventBus
|
|
62340
|
+
* @typedef {import('../selection/Selection').default} Selection
|
|
62341
|
+
* @typedef {import('../../core/Canvas').default} Canvas
|
|
62342
|
+
*/
|
|
62343
|
+
|
|
62344
|
+
/**
|
|
62345
|
+
* @class
|
|
62346
|
+
*
|
|
62347
|
+
* A plugin that adds an outline to shapes and connections that may be activated and styled
|
|
62348
|
+
* via CSS classes.
|
|
62349
|
+
*
|
|
62350
|
+
* @param {EventBus} eventBus
|
|
62351
|
+
* @param {Canvas} canvas
|
|
62352
|
+
* @param {Selection} selection
|
|
62353
|
+
*/
|
|
62354
|
+
function MultiSelectionOutline(eventBus, canvas, selection) {
|
|
62355
|
+
this._canvas = canvas;
|
|
62356
|
+
|
|
62357
|
+
var self = this;
|
|
62358
|
+
|
|
62359
|
+
eventBus.on('element.changed', function(event) {
|
|
62360
|
+
if (selection.isSelected(event.element)) {
|
|
62361
|
+
self._updateMultiSelectionOutline(selection.get());
|
|
62362
|
+
}
|
|
62363
|
+
});
|
|
62364
|
+
|
|
62365
|
+
eventBus.on('selection.changed', function(event) {
|
|
62366
|
+
var newSelection = event.newSelection;
|
|
62367
|
+
|
|
62368
|
+
self._updateMultiSelectionOutline(newSelection);
|
|
62369
|
+
});
|
|
62370
|
+
}
|
|
62371
|
+
|
|
62372
|
+
|
|
62373
|
+
|
|
62374
|
+
MultiSelectionOutline.prototype._updateMultiSelectionOutline = function(selection) {
|
|
62375
|
+
var layer = this._canvas.getLayer('selectionOutline');
|
|
62376
|
+
|
|
62377
|
+
clear$1(layer);
|
|
62378
|
+
|
|
62379
|
+
var enabled = selection.length > 1;
|
|
62380
|
+
|
|
62381
|
+
var container = this._canvas.getContainer();
|
|
62382
|
+
|
|
62383
|
+
classes$2(container)[enabled ? 'add' : 'remove']('djs-multi-select');
|
|
62384
|
+
|
|
62385
|
+
if (!enabled) {
|
|
62386
|
+
return;
|
|
62387
|
+
}
|
|
62388
|
+
|
|
62389
|
+
var bBox = addSelectionOutlinePadding(getBBox(selection));
|
|
62390
|
+
|
|
62391
|
+
var rect = create$1('rect');
|
|
62392
|
+
|
|
62393
|
+
attr$2(rect, assign$2({
|
|
62394
|
+
rx: 3
|
|
62395
|
+
}, bBox));
|
|
62396
|
+
|
|
62397
|
+
classes$2(rect).add('djs-selection-outline');
|
|
62398
|
+
|
|
62399
|
+
append(layer, rect);
|
|
62400
|
+
};
|
|
62401
|
+
|
|
62402
|
+
|
|
62403
|
+
MultiSelectionOutline.$inject = [ 'eventBus', 'canvas', 'selection' ];
|
|
62404
|
+
|
|
62405
|
+
// helpers //////////
|
|
62406
|
+
|
|
62407
|
+
function addSelectionOutlinePadding(bBox) {
|
|
62408
|
+
return {
|
|
62409
|
+
x: bBox.x - SELECTION_OUTLINE_PADDING,
|
|
62410
|
+
y: bBox.y - SELECTION_OUTLINE_PADDING,
|
|
62411
|
+
width: bBox.width + SELECTION_OUTLINE_PADDING * 2,
|
|
62412
|
+
height: bBox.height + SELECTION_OUTLINE_PADDING * 2
|
|
62413
|
+
};
|
|
62414
|
+
}
|
|
62415
|
+
|
|
62416
|
+
/**
|
|
62417
|
+
* @type { import('didi').ModuleDeclaration }
|
|
62418
|
+
*/
|
|
62419
|
+
var Outline = {
|
|
62420
|
+
__depends__: [
|
|
62421
|
+
SelectionModule
|
|
62422
|
+
],
|
|
62423
|
+
__init__: [ 'outline', 'multiSelectionOutline' ],
|
|
62424
|
+
outline: [ 'type', Outline$1 ],
|
|
62425
|
+
multiSelectionOutline: [ 'type', MultiSelectionOutline ]
|
|
62426
|
+
};
|
|
62427
|
+
|
|
62428
|
+
/**
|
|
62429
|
+
* @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
|
|
62430
|
+
* @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
|
|
62431
|
+
* @typedef {import('diagram-js/lib/core/GraphicsFactory').default} GraphicsFactory
|
|
62432
|
+
* @typedef {import('../outline/OutlineProvider').default} Outline
|
|
62433
|
+
* @typedef {import('diagram-js/lib/features/selection').default} Selection
|
|
62434
|
+
*
|
|
62435
|
+
* @typedef {import('diagram-js/lib/model/Types').Element} Element
|
|
62436
|
+
*/
|
|
62437
|
+
|
|
62438
|
+
const ALLOWED_ELEMENTS = [ 'bpmn:Event', 'bpmn:SequenceFlow', 'bpmn:Gateway' ];
|
|
62439
|
+
|
|
62440
|
+
const LINE_STYLE = {
|
|
62441
|
+
class: 'bjs-label-link',
|
|
62442
|
+
stroke: 'var(--element-selected-outline-secondary-stroke-color)',
|
|
62443
|
+
strokeDasharray: '5, 5',
|
|
62444
|
+
};
|
|
62445
|
+
|
|
62446
|
+
const DISTANCE_THRESHOLD = 15;
|
|
62447
|
+
const PATH_OFFSET = 2;
|
|
62448
|
+
|
|
62449
|
+
/**
|
|
62450
|
+
* Render a line between an external label and its target element,
|
|
62451
|
+
* when either is selected.
|
|
62452
|
+
*
|
|
62453
|
+
* @param {EventBus} eventBus
|
|
62454
|
+
* @param {Canvas} canvas
|
|
62455
|
+
* @param {GraphicsFactory} graphicsFactory
|
|
62456
|
+
* @param {Outline} outline
|
|
62457
|
+
*/
|
|
62458
|
+
function LabelLink$1(eventBus, canvas, graphicsFactory, outline, selection) {
|
|
62459
|
+
|
|
62460
|
+
const layer = canvas.getLayer('overlays');
|
|
62461
|
+
|
|
62462
|
+
eventBus.on([ 'selection.changed', 'shape.changed' ], function() {
|
|
62463
|
+
cleanUp();
|
|
62464
|
+
});
|
|
62465
|
+
|
|
62466
|
+
eventBus.on('selection.changed', function({ newSelection }) {
|
|
62467
|
+
|
|
62468
|
+
const allowedElements = newSelection.filter(element => isAny(element, ALLOWED_ELEMENTS));
|
|
62469
|
+
|
|
62470
|
+
if (allowedElements.length === 1) {
|
|
62471
|
+
const element = allowedElements[0];
|
|
62472
|
+
if (isLabel(element)) {
|
|
62473
|
+
createLink(element, element.labelTarget, newSelection);
|
|
62474
|
+
} else if (element.labels?.length) {
|
|
62475
|
+
createLink(element.labels[0], element, newSelection);
|
|
62476
|
+
}
|
|
62477
|
+
}
|
|
62478
|
+
|
|
62479
|
+
// Only allowed when both label and its target are selected
|
|
62480
|
+
if (allowedElements.length === 2) {
|
|
62481
|
+
const label = allowedElements.find(isLabel);
|
|
62482
|
+
const target = allowedElements.find(el => el.labels?.includes(label));
|
|
62483
|
+
if (label && target) {
|
|
62484
|
+
createLink(label, target, newSelection);
|
|
62485
|
+
}
|
|
62486
|
+
}
|
|
62487
|
+
});
|
|
62488
|
+
|
|
62489
|
+
eventBus.on('shape.changed', function({ element }) {
|
|
62490
|
+
|
|
62491
|
+
if (!isAny(element, ALLOWED_ELEMENTS) || !isElementSelected(element)) {
|
|
62492
|
+
return;
|
|
62493
|
+
}
|
|
62494
|
+
|
|
62495
|
+
if (isLabel(element)) {
|
|
62496
|
+
createLink(element, element.labelTarget, selection.get());
|
|
62497
|
+
} else if (element.labels?.length) {
|
|
62498
|
+
createLink(element.labels[0], element, selection.get());
|
|
62499
|
+
}
|
|
62500
|
+
});
|
|
62501
|
+
|
|
62502
|
+
/**
|
|
62503
|
+
* Render a line between an external label and its target.
|
|
62504
|
+
*
|
|
62505
|
+
* @param {Element} label
|
|
62506
|
+
* @param {Element} target
|
|
62507
|
+
* @param {Element[]} selection
|
|
62508
|
+
*/
|
|
62509
|
+
function createLink(label, target, selection = []) {
|
|
62510
|
+
|
|
62511
|
+
// Create an auxiliary line between label and target mid points
|
|
62512
|
+
const line = createLine(
|
|
62513
|
+
[ getMid(target), getMid(label) ],
|
|
62514
|
+
LINE_STYLE
|
|
62515
|
+
);
|
|
62516
|
+
const linePath = line.getAttribute('d');
|
|
62517
|
+
|
|
62518
|
+
// Calculate the intersection point between line and label
|
|
62519
|
+
const labelSelected = selection.includes(label);
|
|
62520
|
+
const labelPath = labelSelected ? getElementOutlinePath(label) : getElementPath(label);
|
|
62521
|
+
const labelInter = getElementLineIntersection(labelPath, linePath);
|
|
62522
|
+
|
|
62523
|
+
// Label on top of the target
|
|
62524
|
+
if (!labelInter) {
|
|
62525
|
+
return;
|
|
62526
|
+
}
|
|
62527
|
+
|
|
62528
|
+
// Calculate the intersection point between line and label
|
|
62529
|
+
// If the target is a sequence flow, there is no intersection,
|
|
62530
|
+
// so we link to the middle of it.
|
|
62531
|
+
const targetSelected = selection.includes(target);
|
|
62532
|
+
const targetPath = targetSelected ? getElementOutlinePath(target) : getElementPath(target);
|
|
62533
|
+
const targetInter = getElementLineIntersection(targetPath, linePath) || getMid(target);
|
|
62534
|
+
|
|
62535
|
+
// Do not draw a link if the points are too close
|
|
62536
|
+
const distance = getDistancePointPoint(targetInter, labelInter);
|
|
62537
|
+
if (distance < DISTANCE_THRESHOLD) {
|
|
62538
|
+
return;
|
|
62539
|
+
}
|
|
62540
|
+
|
|
62541
|
+
// Connect the actual closest points
|
|
62542
|
+
updateLine(line, [ targetInter, labelInter ]);
|
|
62543
|
+
append(layer, line);
|
|
62544
|
+
}
|
|
62545
|
+
|
|
62546
|
+
/**
|
|
62547
|
+
* Remove all existing label links.
|
|
62548
|
+
*/
|
|
62549
|
+
function cleanUp() {
|
|
62550
|
+
all$2(`.${LINE_STYLE.class}`, layer).forEach(remove$4);
|
|
62551
|
+
}
|
|
62552
|
+
|
|
62553
|
+
/**
|
|
62554
|
+
* Get element's slightly expanded outline path.
|
|
62555
|
+
*
|
|
62556
|
+
* @param {Element} element
|
|
62557
|
+
* @returns {string} svg path
|
|
62558
|
+
*/
|
|
62559
|
+
function getElementOutlinePath(element) {
|
|
62560
|
+
const outlineShape = outline.getOutline(element);
|
|
62561
|
+
const outlineOffset = outline.offset;
|
|
62562
|
+
|
|
62563
|
+
if (!outlineShape) {
|
|
62564
|
+
return getElementPath(element);
|
|
62565
|
+
}
|
|
62566
|
+
|
|
62567
|
+
if (outlineShape.x) {
|
|
62568
|
+
const shape = {
|
|
62569
|
+
x: element.x + parseSvgNumAttr(outlineShape, 'x') - PATH_OFFSET,
|
|
62570
|
+
y: element.y + parseSvgNumAttr(outlineShape, 'y') - PATH_OFFSET,
|
|
62571
|
+
width: parseSvgNumAttr(outlineShape, 'width') + PATH_OFFSET * 2,
|
|
62572
|
+
height: parseSvgNumAttr(outlineShape, 'height') + PATH_OFFSET * 2
|
|
62573
|
+
};
|
|
62574
|
+
|
|
62575
|
+
return getRoundRectPath(shape, parseSvgNumAttr(outlineShape, 'rx'));
|
|
62576
|
+
}
|
|
62577
|
+
|
|
62578
|
+
if (outlineShape.cx) {
|
|
62579
|
+
const shape = {
|
|
62580
|
+
x: element.x - outlineOffset,
|
|
62581
|
+
y: element.y - outlineOffset,
|
|
62582
|
+
width: parseSvgNumAttr(outlineShape, 'r') * 2,
|
|
62583
|
+
height: parseSvgNumAttr(outlineShape, 'r') * 2,
|
|
62584
|
+
};
|
|
62585
|
+
|
|
62586
|
+
return getCirclePath(shape);
|
|
62587
|
+
}
|
|
62588
|
+
}
|
|
62589
|
+
|
|
62590
|
+
function getElementPath(element) {
|
|
62591
|
+
return graphicsFactory.getShapePath(element);
|
|
62592
|
+
}
|
|
62593
|
+
|
|
62594
|
+
function isElementSelected(element) {
|
|
62595
|
+
return selection.get().includes(element);
|
|
62596
|
+
}
|
|
62597
|
+
}
|
|
62598
|
+
|
|
62599
|
+
LabelLink$1.$inject = [
|
|
62600
|
+
'eventBus',
|
|
62601
|
+
'canvas',
|
|
62602
|
+
'graphicsFactory',
|
|
62603
|
+
'outline',
|
|
62604
|
+
'selection'
|
|
62605
|
+
];
|
|
62606
|
+
|
|
62607
|
+
/**
|
|
62608
|
+
* Get numeric attribute from SVG element
|
|
62609
|
+
* or 0 if not present.
|
|
62610
|
+
*
|
|
62611
|
+
* @param {SVGElement} node
|
|
62612
|
+
* @param {string} attr
|
|
62613
|
+
* @returns {number}
|
|
62614
|
+
*/
|
|
62615
|
+
function parseSvgNumAttr(node, attr) {
|
|
62616
|
+
return parseFloat(attr$2(node, attr) || 0);
|
|
62617
|
+
}
|
|
62618
|
+
|
|
62619
|
+
var LabelLink = {
|
|
62620
|
+
__depends__: [
|
|
62621
|
+
SelectionModule,
|
|
62622
|
+
Outline
|
|
62623
|
+
],
|
|
62624
|
+
__init__: [
|
|
62625
|
+
'labelLink'
|
|
62626
|
+
],
|
|
62627
|
+
labelLink: [ 'type', LabelLink$1 ]
|
|
62628
|
+
};
|
|
62629
|
+
|
|
62122
62630
|
/**
|
|
62123
62631
|
* @typedef {import('../../core/Canvas').default} Canvas
|
|
62124
62632
|
* @typedef {import('../../core/EventBus').default} EventBus
|
|
@@ -62566,285 +63074,6 @@
|
|
|
62566
63074
|
modelingFeedback: [ 'type', ModelingFeedback ]
|
|
62567
63075
|
};
|
|
62568
63076
|
|
|
62569
|
-
var LOW_PRIORITY$4 = 500;
|
|
62570
|
-
|
|
62571
|
-
var DEFAULT_PRIORITY$2 = 1000;
|
|
62572
|
-
|
|
62573
|
-
/**
|
|
62574
|
-
* @typedef {import('../../model/Types').Element} Element
|
|
62575
|
-
*
|
|
62576
|
-
* @typedef {import('./OutlineProvider').default} OutlineProvider
|
|
62577
|
-
* @typedef {import('../../core/EventBus').default} EventBus
|
|
62578
|
-
* @typedef {import('../../draw/Styles').default} Styles
|
|
62579
|
-
*/
|
|
62580
|
-
|
|
62581
|
-
/**
|
|
62582
|
-
* @class
|
|
62583
|
-
*
|
|
62584
|
-
* A plugin that adds an outline to shapes and connections that may be activated and styled
|
|
62585
|
-
* via CSS classes.
|
|
62586
|
-
*
|
|
62587
|
-
* @param {EventBus} eventBus
|
|
62588
|
-
* @param {Styles} styles
|
|
62589
|
-
*/
|
|
62590
|
-
function Outline(eventBus, styles) {
|
|
62591
|
-
|
|
62592
|
-
this._eventBus = eventBus;
|
|
62593
|
-
|
|
62594
|
-
this.offset = 5;
|
|
62595
|
-
|
|
62596
|
-
var OUTLINE_STYLE = styles.cls('djs-outline', [ 'no-fill' ]);
|
|
62597
|
-
|
|
62598
|
-
var self = this;
|
|
62599
|
-
|
|
62600
|
-
/**
|
|
62601
|
-
* @param {SVGElement} gfx
|
|
62602
|
-
*
|
|
62603
|
-
* @return {SVGElement} outline
|
|
62604
|
-
*/
|
|
62605
|
-
function createOutline(gfx) {
|
|
62606
|
-
var outline = create$1('rect');
|
|
62607
|
-
|
|
62608
|
-
attr$2(outline, assign$2({
|
|
62609
|
-
x: 0,
|
|
62610
|
-
y: 0,
|
|
62611
|
-
rx: 4,
|
|
62612
|
-
width: 100,
|
|
62613
|
-
height: 100
|
|
62614
|
-
}, OUTLINE_STYLE));
|
|
62615
|
-
|
|
62616
|
-
return outline;
|
|
62617
|
-
}
|
|
62618
|
-
|
|
62619
|
-
// A low priortity is necessary, because outlines of labels have to be updated
|
|
62620
|
-
// after the label bounds have been updated in the renderer.
|
|
62621
|
-
eventBus.on([ 'shape.added', 'shape.changed' ], LOW_PRIORITY$4, function(event) {
|
|
62622
|
-
var element = event.element,
|
|
62623
|
-
gfx = event.gfx;
|
|
62624
|
-
|
|
62625
|
-
var outline = query$4('.djs-outline', gfx);
|
|
62626
|
-
|
|
62627
|
-
if (!outline) {
|
|
62628
|
-
outline = self.getOutline(element) || createOutline();
|
|
62629
|
-
append(gfx, outline);
|
|
62630
|
-
}
|
|
62631
|
-
|
|
62632
|
-
self.updateShapeOutline(outline, element);
|
|
62633
|
-
});
|
|
62634
|
-
|
|
62635
|
-
eventBus.on([ 'connection.added', 'connection.changed' ], function(event) {
|
|
62636
|
-
var element = event.element,
|
|
62637
|
-
gfx = event.gfx;
|
|
62638
|
-
|
|
62639
|
-
var outline = query$4('.djs-outline', gfx);
|
|
62640
|
-
|
|
62641
|
-
if (!outline) {
|
|
62642
|
-
outline = createOutline();
|
|
62643
|
-
append(gfx, outline);
|
|
62644
|
-
}
|
|
62645
|
-
|
|
62646
|
-
self.updateConnectionOutline(outline, element);
|
|
62647
|
-
});
|
|
62648
|
-
}
|
|
62649
|
-
|
|
62650
|
-
|
|
62651
|
-
/**
|
|
62652
|
-
* Updates the outline of a shape respecting the dimension of the
|
|
62653
|
-
* element and an outline offset.
|
|
62654
|
-
*
|
|
62655
|
-
* @param {SVGElement} outline
|
|
62656
|
-
* @param {Element} element
|
|
62657
|
-
*/
|
|
62658
|
-
Outline.prototype.updateShapeOutline = function(outline, element) {
|
|
62659
|
-
|
|
62660
|
-
var updated = false;
|
|
62661
|
-
var providers = this._getProviders();
|
|
62662
|
-
|
|
62663
|
-
if (providers.length) {
|
|
62664
|
-
forEach$2(providers, function(provider) {
|
|
62665
|
-
updated = updated || provider.updateOutline(element, outline);
|
|
62666
|
-
});
|
|
62667
|
-
}
|
|
62668
|
-
|
|
62669
|
-
if (!updated) {
|
|
62670
|
-
attr$2(outline, {
|
|
62671
|
-
x: -this.offset,
|
|
62672
|
-
y: -this.offset,
|
|
62673
|
-
width: element.width + this.offset * 2,
|
|
62674
|
-
height: element.height + this.offset * 2
|
|
62675
|
-
});
|
|
62676
|
-
}
|
|
62677
|
-
};
|
|
62678
|
-
|
|
62679
|
-
/**
|
|
62680
|
-
* Updates the outline of a connection respecting the bounding box of
|
|
62681
|
-
* the connection and an outline offset.
|
|
62682
|
-
* Register an outline provider with the given priority.
|
|
62683
|
-
*
|
|
62684
|
-
* @param {SVGElement} outline
|
|
62685
|
-
* @param {Element} connection
|
|
62686
|
-
*/
|
|
62687
|
-
Outline.prototype.updateConnectionOutline = function(outline, connection) {
|
|
62688
|
-
var bbox = getBBox(connection);
|
|
62689
|
-
|
|
62690
|
-
attr$2(outline, {
|
|
62691
|
-
x: bbox.x - this.offset,
|
|
62692
|
-
y: bbox.y - this.offset,
|
|
62693
|
-
width: bbox.width + this.offset * 2,
|
|
62694
|
-
height: bbox.height + this.offset * 2
|
|
62695
|
-
});
|
|
62696
|
-
};
|
|
62697
|
-
|
|
62698
|
-
/**
|
|
62699
|
-
* Register an outline provider with the given priority.
|
|
62700
|
-
*
|
|
62701
|
-
* @param {number} priority
|
|
62702
|
-
* @param {OutlineProvider} provider
|
|
62703
|
-
*/
|
|
62704
|
-
Outline.prototype.registerProvider = function(priority, provider) {
|
|
62705
|
-
if (!provider) {
|
|
62706
|
-
provider = priority;
|
|
62707
|
-
priority = DEFAULT_PRIORITY$2;
|
|
62708
|
-
}
|
|
62709
|
-
|
|
62710
|
-
this._eventBus.on('outline.getProviders', priority, function(event) {
|
|
62711
|
-
event.providers.push(provider);
|
|
62712
|
-
});
|
|
62713
|
-
};
|
|
62714
|
-
|
|
62715
|
-
/**
|
|
62716
|
-
* Returns the registered outline providers.
|
|
62717
|
-
*
|
|
62718
|
-
* @returns {OutlineProvider[]}
|
|
62719
|
-
*/
|
|
62720
|
-
Outline.prototype._getProviders = function() {
|
|
62721
|
-
var event = this._eventBus.createEvent({
|
|
62722
|
-
type: 'outline.getProviders',
|
|
62723
|
-
providers: []
|
|
62724
|
-
});
|
|
62725
|
-
|
|
62726
|
-
this._eventBus.fire(event);
|
|
62727
|
-
|
|
62728
|
-
return event.providers;
|
|
62729
|
-
};
|
|
62730
|
-
|
|
62731
|
-
/**
|
|
62732
|
-
* Returns the outline for an element.
|
|
62733
|
-
*
|
|
62734
|
-
* @param {Element} element
|
|
62735
|
-
*/
|
|
62736
|
-
Outline.prototype.getOutline = function(element) {
|
|
62737
|
-
var outline;
|
|
62738
|
-
var providers = this._getProviders();
|
|
62739
|
-
|
|
62740
|
-
forEach$2(providers, function(provider) {
|
|
62741
|
-
|
|
62742
|
-
if (!isFunction(provider.getOutline)) {
|
|
62743
|
-
return;
|
|
62744
|
-
}
|
|
62745
|
-
|
|
62746
|
-
outline = outline || provider.getOutline(element);
|
|
62747
|
-
});
|
|
62748
|
-
|
|
62749
|
-
return outline;
|
|
62750
|
-
};
|
|
62751
|
-
|
|
62752
|
-
Outline.$inject = [ 'eventBus', 'styles', 'elementRegistry' ];
|
|
62753
|
-
|
|
62754
|
-
var SELECTION_OUTLINE_PADDING = 6;
|
|
62755
|
-
|
|
62756
|
-
/**
|
|
62757
|
-
* @typedef {import('../../model/Types').Element} Element
|
|
62758
|
-
*
|
|
62759
|
-
* @typedef {import('../../core/EventBus').default} EventBus
|
|
62760
|
-
* @typedef {import('../selection/Selection').default} Selection
|
|
62761
|
-
* @typedef {import('../../core/Canvas').default} Canvas
|
|
62762
|
-
*/
|
|
62763
|
-
|
|
62764
|
-
/**
|
|
62765
|
-
* @class
|
|
62766
|
-
*
|
|
62767
|
-
* A plugin that adds an outline to shapes and connections that may be activated and styled
|
|
62768
|
-
* via CSS classes.
|
|
62769
|
-
*
|
|
62770
|
-
* @param {EventBus} eventBus
|
|
62771
|
-
* @param {Canvas} canvas
|
|
62772
|
-
* @param {Selection} selection
|
|
62773
|
-
*/
|
|
62774
|
-
function MultiSelectionOutline(eventBus, canvas, selection) {
|
|
62775
|
-
this._canvas = canvas;
|
|
62776
|
-
|
|
62777
|
-
var self = this;
|
|
62778
|
-
|
|
62779
|
-
eventBus.on('element.changed', function(event) {
|
|
62780
|
-
if (selection.isSelected(event.element)) {
|
|
62781
|
-
self._updateMultiSelectionOutline(selection.get());
|
|
62782
|
-
}
|
|
62783
|
-
});
|
|
62784
|
-
|
|
62785
|
-
eventBus.on('selection.changed', function(event) {
|
|
62786
|
-
var newSelection = event.newSelection;
|
|
62787
|
-
|
|
62788
|
-
self._updateMultiSelectionOutline(newSelection);
|
|
62789
|
-
});
|
|
62790
|
-
}
|
|
62791
|
-
|
|
62792
|
-
|
|
62793
|
-
|
|
62794
|
-
MultiSelectionOutline.prototype._updateMultiSelectionOutline = function(selection) {
|
|
62795
|
-
var layer = this._canvas.getLayer('selectionOutline');
|
|
62796
|
-
|
|
62797
|
-
clear$1(layer);
|
|
62798
|
-
|
|
62799
|
-
var enabled = selection.length > 1;
|
|
62800
|
-
|
|
62801
|
-
var container = this._canvas.getContainer();
|
|
62802
|
-
|
|
62803
|
-
classes$2(container)[enabled ? 'add' : 'remove']('djs-multi-select');
|
|
62804
|
-
|
|
62805
|
-
if (!enabled) {
|
|
62806
|
-
return;
|
|
62807
|
-
}
|
|
62808
|
-
|
|
62809
|
-
var bBox = addSelectionOutlinePadding(getBBox(selection));
|
|
62810
|
-
|
|
62811
|
-
var rect = create$1('rect');
|
|
62812
|
-
|
|
62813
|
-
attr$2(rect, assign$2({
|
|
62814
|
-
rx: 3
|
|
62815
|
-
}, bBox));
|
|
62816
|
-
|
|
62817
|
-
classes$2(rect).add('djs-selection-outline');
|
|
62818
|
-
|
|
62819
|
-
append(layer, rect);
|
|
62820
|
-
};
|
|
62821
|
-
|
|
62822
|
-
|
|
62823
|
-
MultiSelectionOutline.$inject = [ 'eventBus', 'canvas', 'selection' ];
|
|
62824
|
-
|
|
62825
|
-
// helpers //////////
|
|
62826
|
-
|
|
62827
|
-
function addSelectionOutlinePadding(bBox) {
|
|
62828
|
-
return {
|
|
62829
|
-
x: bBox.x - SELECTION_OUTLINE_PADDING,
|
|
62830
|
-
y: bBox.y - SELECTION_OUTLINE_PADDING,
|
|
62831
|
-
width: bBox.width + SELECTION_OUTLINE_PADDING * 2,
|
|
62832
|
-
height: bBox.height + SELECTION_OUTLINE_PADDING * 2
|
|
62833
|
-
};
|
|
62834
|
-
}
|
|
62835
|
-
|
|
62836
|
-
/**
|
|
62837
|
-
* @type { import('didi').ModuleDeclaration }
|
|
62838
|
-
*/
|
|
62839
|
-
var Ouline = {
|
|
62840
|
-
__depends__: [
|
|
62841
|
-
SelectionModule
|
|
62842
|
-
],
|
|
62843
|
-
__init__: [ 'outline', 'multiSelectionOutline' ],
|
|
62844
|
-
outline: [ 'type', Outline ],
|
|
62845
|
-
multiSelectionOutline: [ 'type', MultiSelectionOutline ]
|
|
62846
|
-
};
|
|
62847
|
-
|
|
62848
63077
|
/**
|
|
62849
63078
|
* @typedef {import('../../core/Types').ElementLike} Element
|
|
62850
63079
|
* @typedef {import('../../core/Types').ShapeLike} Shape
|
|
@@ -63347,7 +63576,7 @@
|
|
|
63347
63576
|
__depends__: [
|
|
63348
63577
|
InteractionEventsModule$1,
|
|
63349
63578
|
SelectionModule,
|
|
63350
|
-
|
|
63579
|
+
Outline,
|
|
63351
63580
|
RulesModule$1,
|
|
63352
63581
|
DraggingModule,
|
|
63353
63582
|
PreviewSupportModule
|
|
@@ -64923,7 +65152,7 @@
|
|
|
64923
65152
|
target = context.target;
|
|
64924
65153
|
|
|
64925
65154
|
// do NOT snap on CMD
|
|
64926
|
-
if (event.originalEvent && isCmd(event.originalEvent)) {
|
|
65155
|
+
if (event.originalEvent && isCmd$1(event.originalEvent)) {
|
|
64927
65156
|
return;
|
|
64928
65157
|
}
|
|
64929
65158
|
|
|
@@ -65362,7 +65591,7 @@
|
|
|
65362
65591
|
snapContext = context.snapContext,
|
|
65363
65592
|
target = context.target;
|
|
65364
65593
|
|
|
65365
|
-
if (event.originalEvent && isCmd(event.originalEvent)) {
|
|
65594
|
+
if (event.originalEvent && isCmd$1(event.originalEvent)) {
|
|
65366
65595
|
return;
|
|
65367
65596
|
}
|
|
65368
65597
|
|
|
@@ -65811,7 +66040,7 @@
|
|
|
65811
66040
|
direction = context.direction,
|
|
65812
66041
|
snapContext = context.snapContext;
|
|
65813
66042
|
|
|
65814
|
-
if (event.originalEvent && isCmd(event.originalEvent)) {
|
|
66043
|
+
if (event.originalEvent && isCmd$1(event.originalEvent)) {
|
|
65815
66044
|
return;
|
|
65816
66045
|
}
|
|
65817
66046
|
|
|
@@ -66835,6 +67064,20 @@
|
|
|
66835
67064
|
|
|
66836
67065
|
var outline;
|
|
66837
67066
|
|
|
67067
|
+
if (isExternalLabel(element)) {
|
|
67068
|
+
outline = create$1('rect');
|
|
67069
|
+
|
|
67070
|
+
attr$2(outline, assign$2({
|
|
67071
|
+
x: -5,
|
|
67072
|
+
y: -5,
|
|
67073
|
+
rx: 4,
|
|
67074
|
+
width: element.width + DEFAULT_OFFSET * 2,
|
|
67075
|
+
height: element.height + DEFAULT_OFFSET * 2
|
|
67076
|
+
}, OUTLINE_STYLE));
|
|
67077
|
+
|
|
67078
|
+
return outline;
|
|
67079
|
+
}
|
|
67080
|
+
|
|
66838
67081
|
if (isLabel(element)) {
|
|
66839
67082
|
return;
|
|
66840
67083
|
}
|
|
@@ -66962,7 +67205,7 @@
|
|
|
66962
67205
|
|
|
66963
67206
|
var OutlineModule = {
|
|
66964
67207
|
__depends__: [
|
|
66965
|
-
|
|
67208
|
+
Outline
|
|
66966
67209
|
],
|
|
66967
67210
|
__init__: [ 'outlineProvider' ],
|
|
66968
67211
|
outlineProvider: [ 'type', OutlineProvider ]
|
|
@@ -67113,6 +67356,7 @@
|
|
|
67113
67356
|
KeyboardModule,
|
|
67114
67357
|
KeyboardMoveSelectionModule,
|
|
67115
67358
|
LabelEditingModule,
|
|
67359
|
+
LabelLink,
|
|
67116
67360
|
ModelingModule,
|
|
67117
67361
|
ModelingFeedbackModule,
|
|
67118
67362
|
MoveModule,
|
|
@@ -103304,22 +103548,30 @@
|
|
|
103304
103548
|
var OpenPopupIcon = function OpenPopupIcon(props) {
|
|
103305
103549
|
return u("svg", {
|
|
103306
103550
|
...props,
|
|
103307
|
-
children:
|
|
103308
|
-
|
|
103309
|
-
|
|
103310
|
-
}), u("path", {
|
|
103311
|
-
fill: "currentColor",
|
|
103312
|
-
d: "M18 26H4V16h2v-2H4a2.006 2.006 0 0 0-2 2v10a2.006 2.006 0 0 0 2 2h14a2.006 2.006 0 0 0 2-2v-2h-2Z"
|
|
103313
|
-
})]
|
|
103551
|
+
children: u("path", {
|
|
103552
|
+
d: "M6 15v-1H2.7L7 9.7 6.3 9 2 13.3V10H1v5zm4-14v1h3.3L9 6.3l.7.7L14 2.7V6h1V1z"
|
|
103553
|
+
})
|
|
103314
103554
|
});
|
|
103315
103555
|
};
|
|
103316
103556
|
OpenPopupIcon.defaultProps = {
|
|
103317
103557
|
xmlns: "http://www.w3.org/2000/svg",
|
|
103318
|
-
|
|
103319
|
-
height: "16",
|
|
103320
|
-
viewBox: "0 0 32 32"
|
|
103558
|
+
viewBox: "0 0 16 16"
|
|
103321
103559
|
};
|
|
103322
103560
|
|
|
103561
|
+
/**
|
|
103562
|
+
* @typedef { {
|
|
103563
|
+
* getElementLabel: (element: object) => string,
|
|
103564
|
+
* getTypeLabel: (element: object) => string,
|
|
103565
|
+
* getElementIcon: (element: object) => import('preact').Component,
|
|
103566
|
+
* getDocumentationRef: (element: object) => string
|
|
103567
|
+
* } } HeaderProvider
|
|
103568
|
+
*/
|
|
103569
|
+
|
|
103570
|
+
/**
|
|
103571
|
+
* @param {Object} props
|
|
103572
|
+
* @param {Object} props.element,
|
|
103573
|
+
* @param {HeaderProvider} props.headerProvider
|
|
103574
|
+
*/
|
|
103323
103575
|
function Header(props) {
|
|
103324
103576
|
const {
|
|
103325
103577
|
element,
|
|
@@ -103347,11 +103599,9 @@
|
|
|
103347
103599
|
}), u("div", {
|
|
103348
103600
|
class: "bio-properties-panel-header-labels",
|
|
103349
103601
|
children: [u("div", {
|
|
103350
|
-
title: type,
|
|
103351
103602
|
class: "bio-properties-panel-header-type",
|
|
103352
103603
|
children: type
|
|
103353
103604
|
}), label ? u("div", {
|
|
103354
|
-
title: label,
|
|
103355
103605
|
class: "bio-properties-panel-header-label",
|
|
103356
103606
|
children: label
|
|
103357
103607
|
}) : null]
|
|
@@ -103444,6 +103694,26 @@
|
|
|
103444
103694
|
return getTooltipForId(id, element);
|
|
103445
103695
|
}
|
|
103446
103696
|
|
|
103697
|
+
/**
|
|
103698
|
+
* @typedef {Object} TooltipProps
|
|
103699
|
+
* @property {Object} [parent] - Parent element ref for portal rendering
|
|
103700
|
+
* @property {String} [direction='right'] - Tooltip direction ( 'right', 'top')
|
|
103701
|
+
* @property {String} [position] - Custom CSS position override
|
|
103702
|
+
* @property {Number} [showDelay=250] - Delay in ms before showing tooltip on hover
|
|
103703
|
+
* @property {Number} [hideDelay=250] - Delay in ms before hiding tooltip when mouse leaves, to avoid multiple tooltips from being opened, this should be the same as showDelay
|
|
103704
|
+
* @property {*} [children] - Child elements to render inside the tooltip wrapper
|
|
103705
|
+
*/
|
|
103706
|
+
|
|
103707
|
+
/**
|
|
103708
|
+
* Tooltip wrapper that provides context-based tooltip content lookup.
|
|
103709
|
+
* All props are forwarded to the underlying Tooltip component.
|
|
103710
|
+
*
|
|
103711
|
+
* @param {TooltipProps & {
|
|
103712
|
+
* forId: String,
|
|
103713
|
+
* value?: String|Object,
|
|
103714
|
+
* element?: Object
|
|
103715
|
+
* }} props - Shared tooltip props plus wrapper-specific ones
|
|
103716
|
+
*/
|
|
103447
103717
|
function TooltipWrapper(props) {
|
|
103448
103718
|
const {
|
|
103449
103719
|
forId,
|
|
@@ -103460,35 +103730,77 @@
|
|
|
103460
103730
|
forId: `bio-properties-panel-${forId}`
|
|
103461
103731
|
});
|
|
103462
103732
|
}
|
|
103733
|
+
|
|
103734
|
+
/**
|
|
103735
|
+
* @param {TooltipProps & {
|
|
103736
|
+
* forId: String,
|
|
103737
|
+
* value: String|Object
|
|
103738
|
+
* }} props
|
|
103739
|
+
*/
|
|
103463
103740
|
function Tooltip(props) {
|
|
103464
103741
|
const {
|
|
103465
103742
|
forId,
|
|
103466
103743
|
value,
|
|
103467
103744
|
parent,
|
|
103468
103745
|
direction = 'right',
|
|
103469
|
-
position
|
|
103746
|
+
position,
|
|
103747
|
+
showDelay = 250,
|
|
103748
|
+
hideDelay = 250
|
|
103470
103749
|
} = props;
|
|
103471
103750
|
const [visible, setVisible] = h(false);
|
|
103472
|
-
|
|
103473
|
-
|
|
103474
|
-
const SHOW_DELAY = 200;
|
|
103475
|
-
let timeout = null;
|
|
103751
|
+
const showTimeoutRef = _(null);
|
|
103752
|
+
const hideTimeoutRef = _(null);
|
|
103476
103753
|
const wrapperRef = _(null);
|
|
103477
103754
|
const tooltipRef = _(null);
|
|
103478
103755
|
const show = (_, delay) => {
|
|
103756
|
+
clearTimeout(showTimeoutRef.current);
|
|
103757
|
+
clearTimeout(hideTimeoutRef.current);
|
|
103479
103758
|
if (visible) return;
|
|
103480
103759
|
if (delay) {
|
|
103481
|
-
|
|
103760
|
+
showTimeoutRef.current = setTimeout(() => {
|
|
103482
103761
|
setVisible(true);
|
|
103483
|
-
},
|
|
103762
|
+
}, showDelay);
|
|
103484
103763
|
} else {
|
|
103485
103764
|
setVisible(true);
|
|
103486
103765
|
}
|
|
103487
103766
|
};
|
|
103488
|
-
const
|
|
103489
|
-
|
|
103490
|
-
setVisible(false);
|
|
103767
|
+
const handleWrapperMouseEnter = e => {
|
|
103768
|
+
show(e, true);
|
|
103491
103769
|
};
|
|
103770
|
+
const hide = (delay = false) => {
|
|
103771
|
+
clearTimeout(showTimeoutRef.current);
|
|
103772
|
+
clearTimeout(hideTimeoutRef.current);
|
|
103773
|
+
if (delay) {
|
|
103774
|
+
hideTimeoutRef.current = setTimeout(() => {
|
|
103775
|
+
setVisible(false);
|
|
103776
|
+
}, hideDelay);
|
|
103777
|
+
} else {
|
|
103778
|
+
setVisible(false);
|
|
103779
|
+
}
|
|
103780
|
+
};
|
|
103781
|
+
|
|
103782
|
+
// Cleanup timeouts on unmount
|
|
103783
|
+
p(() => {
|
|
103784
|
+
return () => {
|
|
103785
|
+
clearTimeout(showTimeoutRef.current);
|
|
103786
|
+
clearTimeout(hideTimeoutRef.current);
|
|
103787
|
+
};
|
|
103788
|
+
}, []);
|
|
103789
|
+
|
|
103790
|
+
// Handle click outside to close tooltip for non-focusable elements
|
|
103791
|
+
p(() => {
|
|
103792
|
+
if (!visible) return;
|
|
103793
|
+
const handleClickOutside = e => {
|
|
103794
|
+
// If clicking outside both the wrapper and tooltip, hide it
|
|
103795
|
+
if (wrapperRef.current && !wrapperRef.current.contains(e.target) && tooltipRef.current && !tooltipRef.current.contains(e.target)) {
|
|
103796
|
+
hide(false);
|
|
103797
|
+
}
|
|
103798
|
+
};
|
|
103799
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
103800
|
+
return () => {
|
|
103801
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
103802
|
+
};
|
|
103803
|
+
}, [visible, hide]);
|
|
103492
103804
|
const handleMouseLeave = ({
|
|
103493
103805
|
relatedTarget
|
|
103494
103806
|
}) => {
|
|
@@ -103496,23 +103808,32 @@
|
|
|
103496
103808
|
if (relatedTarget === wrapperRef.current || relatedTarget === tooltipRef.current || relatedTarget?.parentElement === tooltipRef.current) {
|
|
103497
103809
|
return;
|
|
103498
103810
|
}
|
|
103499
|
-
|
|
103811
|
+
const selection = window.getSelection();
|
|
103812
|
+
if (selection && selection.toString().length > 0) {
|
|
103813
|
+
// Check if selection is within tooltip content
|
|
103814
|
+
const selectionRange = selection.getRangeAt(0);
|
|
103815
|
+
if (tooltipRef.current?.contains(selectionRange.commonAncestorContainer) || tooltipRef.current?.contains(selection.anchorNode) || tooltipRef.current?.contains(selection.focusNode)) {
|
|
103816
|
+
return; // Keep tooltip open during text selection
|
|
103817
|
+
}
|
|
103818
|
+
}
|
|
103819
|
+
hide(true);
|
|
103820
|
+
};
|
|
103821
|
+
const handleTooltipMouseEnter = () => {
|
|
103822
|
+
clearTimeout(hideTimeoutRef.current);
|
|
103500
103823
|
};
|
|
103501
103824
|
const handleFocusOut = e => {
|
|
103502
103825
|
const {
|
|
103503
|
-
|
|
103826
|
+
relatedTarget
|
|
103504
103827
|
} = e;
|
|
103505
103828
|
|
|
103506
|
-
// Don't hide
|
|
103507
|
-
|
|
103508
|
-
if (target === wrapperRef.current && isHovered) {
|
|
103509
|
-
e.stopPropagation();
|
|
103829
|
+
// Don't hide if focus moved to the tooltip or another element within the wrapper
|
|
103830
|
+
if (tooltipRef.current?.contains(relatedTarget) || wrapperRef.current?.contains(relatedTarget)) {
|
|
103510
103831
|
return;
|
|
103511
103832
|
}
|
|
103512
|
-
hide();
|
|
103833
|
+
hide(false);
|
|
103513
103834
|
};
|
|
103514
103835
|
const hideTooltipViaEscape = e => {
|
|
103515
|
-
e.code === 'Escape' && hide();
|
|
103836
|
+
e.code === 'Escape' && hide(false);
|
|
103516
103837
|
};
|
|
103517
103838
|
const renderTooltip = () => {
|
|
103518
103839
|
return u("div", {
|
|
@@ -103523,6 +103844,7 @@
|
|
|
103523
103844
|
style: position || getTooltipPosition(wrapperRef.current),
|
|
103524
103845
|
ref: tooltipRef,
|
|
103525
103846
|
onClick: e => e.stopPropagation(),
|
|
103847
|
+
onMouseEnter: handleTooltipMouseEnter,
|
|
103526
103848
|
onMouseLeave: handleMouseLeave,
|
|
103527
103849
|
children: [u("div", {
|
|
103528
103850
|
class: "bio-properties-panel-tooltip-content",
|
|
@@ -103536,7 +103858,7 @@
|
|
|
103536
103858
|
class: "bio-properties-panel-tooltip-wrapper",
|
|
103537
103859
|
tabIndex: "0",
|
|
103538
103860
|
ref: wrapperRef,
|
|
103539
|
-
onMouseEnter:
|
|
103861
|
+
onMouseEnter: handleWrapperMouseEnter,
|
|
103540
103862
|
onMouseLeave: handleMouseLeave,
|
|
103541
103863
|
onFocus: show,
|
|
103542
103864
|
onBlur: handleFocusOut,
|
|
@@ -103818,6 +104140,9 @@
|
|
|
103818
104140
|
return visible;
|
|
103819
104141
|
}
|
|
103820
104142
|
|
|
104143
|
+
/**
|
|
104144
|
+
* @param {import('../PropertiesPanel').GroupDefinition} props
|
|
104145
|
+
*/
|
|
103821
104146
|
function Group(props) {
|
|
103822
104147
|
const {
|
|
103823
104148
|
element,
|
|
@@ -103872,8 +104197,6 @@
|
|
|
103872
104197
|
class: classnames('bio-properties-panel-group-header', edited ? '' : 'empty', open ? 'open' : '', sticky && open ? 'sticky' : ''),
|
|
103873
104198
|
onClick: toggleOpen,
|
|
103874
104199
|
children: [u("div", {
|
|
103875
|
-
title: props.tooltip ? null : label,
|
|
103876
|
-
"data-title": label,
|
|
103877
104200
|
class: "bio-properties-panel-group-header-title",
|
|
103878
104201
|
children: u(TooltipWrapper, {
|
|
103879
104202
|
value: props.tooltip,
|
|
@@ -104226,6 +104549,12 @@
|
|
|
104226
104549
|
}, deps);
|
|
104227
104550
|
}
|
|
104228
104551
|
|
|
104552
|
+
/**
|
|
104553
|
+
* @param {Object} props
|
|
104554
|
+
* @param {Object} props.element
|
|
104555
|
+
* @param {String} props.forId - id of the entry the description is used for
|
|
104556
|
+
* @param {String} props.value
|
|
104557
|
+
*/
|
|
104229
104558
|
function Description(props) {
|
|
104230
104559
|
const {
|
|
104231
104560
|
element,
|
|
@@ -104357,6 +104686,15 @@
|
|
|
104357
104686
|
return `bio-properties-panel-${id}`;
|
|
104358
104687
|
}
|
|
104359
104688
|
|
|
104689
|
+
/**
|
|
104690
|
+
* Button to open popups.
|
|
104691
|
+
*
|
|
104692
|
+
* @param {Object} props
|
|
104693
|
+
* @param {Function} props.onClick - Callback to trigger when the button is clicked.
|
|
104694
|
+
* @param {string} [props.title] - Tooltip text for the button.
|
|
104695
|
+
* @param {boolean} [props.disabled] - Whether the button is disabled.
|
|
104696
|
+
* @param {string} [props.className] - Additional class names for the button.
|
|
104697
|
+
*/
|
|
104360
104698
|
function OpenPopupButton({
|
|
104361
104699
|
onClick,
|
|
104362
104700
|
title = 'Open pop-up editor'
|
|
@@ -104502,6 +104840,7 @@
|
|
|
104502
104840
|
enableGutters,
|
|
104503
104841
|
value,
|
|
104504
104842
|
onInput,
|
|
104843
|
+
onKeyDown: onKeyDownProp = noop$4,
|
|
104505
104844
|
onFeelToggle = noop$4,
|
|
104506
104845
|
onLint = noop$4,
|
|
104507
104846
|
onOpenPopup = noop$4,
|
|
@@ -104534,6 +104873,8 @@
|
|
|
104534
104873
|
* - AND the cursor is at the beginning of the input
|
|
104535
104874
|
*/
|
|
104536
104875
|
const onKeyDown = e => {
|
|
104876
|
+
// Call parent onKeyDown handler first
|
|
104877
|
+
onKeyDownProp(e);
|
|
104537
104878
|
if (e.key !== 'Backspace' || !editor) {
|
|
104538
104879
|
return;
|
|
104539
104880
|
}
|
|
@@ -104606,6 +104947,22 @@
|
|
|
104606
104947
|
});
|
|
104607
104948
|
});
|
|
104608
104949
|
|
|
104950
|
+
/**
|
|
104951
|
+
* @param {KeyboardEvent} event
|
|
104952
|
+
* @return {boolean}
|
|
104953
|
+
*/
|
|
104954
|
+
function isCmd(event) {
|
|
104955
|
+
// ensure we don't react to AltGr
|
|
104956
|
+
// (mapped to CTRL + ALT)
|
|
104957
|
+
if (event.altKey) {
|
|
104958
|
+
return false;
|
|
104959
|
+
}
|
|
104960
|
+
return event.ctrlKey || event.metaKey;
|
|
104961
|
+
}
|
|
104962
|
+
function isCmdWithChar(event) {
|
|
104963
|
+
return isCmd(event) && event.key.length === 1 && /^[a-zA-Z]$/.test(event.key);
|
|
104964
|
+
}
|
|
104965
|
+
|
|
104609
104966
|
function ToggleSwitch(props) {
|
|
104610
104967
|
const {
|
|
104611
104968
|
id,
|
|
@@ -104753,6 +105110,7 @@
|
|
|
104753
105110
|
id,
|
|
104754
105111
|
disabled,
|
|
104755
105112
|
onInput,
|
|
105113
|
+
onKeyDown,
|
|
104756
105114
|
value,
|
|
104757
105115
|
onFocus,
|
|
104758
105116
|
onBlur,
|
|
@@ -104788,6 +105146,7 @@
|
|
|
104788
105146
|
class: "bio-properties-panel-input",
|
|
104789
105147
|
onInput: e => onInput(e.target.value),
|
|
104790
105148
|
onFocus: onFocus,
|
|
105149
|
+
onKeyDown: onKeyDown,
|
|
104791
105150
|
onBlur: onBlur,
|
|
104792
105151
|
placeholder: placeholder,
|
|
104793
105152
|
value: value || ''
|
|
@@ -104960,6 +105319,24 @@
|
|
|
104960
105319
|
return `bio-properties-panel-${id}`;
|
|
104961
105320
|
}
|
|
104962
105321
|
|
|
105322
|
+
/**
|
|
105323
|
+
* @typedef { { value: string, label: string, disabled: boolean, children: { value: string, label: string, disabled: boolean } } } Option
|
|
105324
|
+
*/
|
|
105325
|
+
|
|
105326
|
+
/**
|
|
105327
|
+
* Provides basic select input.
|
|
105328
|
+
*
|
|
105329
|
+
* @param {object} props
|
|
105330
|
+
* @param {string} props.id
|
|
105331
|
+
* @param {string[]} props.path
|
|
105332
|
+
* @param {string} props.label
|
|
105333
|
+
* @param {Function} props.onChange
|
|
105334
|
+
* @param {Function} props.onFocus
|
|
105335
|
+
* @param {Function} props.onBlur
|
|
105336
|
+
* @param {Array<Option>} [props.options]
|
|
105337
|
+
* @param {string} props.value
|
|
105338
|
+
* @param {boolean} [props.disabled]
|
|
105339
|
+
*/
|
|
104963
105340
|
function Select(props) {
|
|
104964
105341
|
const {
|
|
104965
105342
|
id,
|
|
@@ -105126,12 +105503,13 @@
|
|
|
105126
105503
|
id,
|
|
105127
105504
|
label,
|
|
105128
105505
|
debounce,
|
|
105129
|
-
onInput,
|
|
105506
|
+
onInput: commitValue,
|
|
105130
105507
|
value = '',
|
|
105131
105508
|
disabled,
|
|
105132
105509
|
monospace,
|
|
105133
105510
|
onFocus,
|
|
105134
105511
|
onBlur,
|
|
105512
|
+
onPaste,
|
|
105135
105513
|
autoResize = true,
|
|
105136
105514
|
placeholder,
|
|
105137
105515
|
rows = autoResize ? 1 : 2,
|
|
@@ -105139,16 +105517,16 @@
|
|
|
105139
105517
|
} = props;
|
|
105140
105518
|
const [localValue, setLocalValue] = h(value);
|
|
105141
105519
|
const ref = useShowEntryEvent(id);
|
|
105520
|
+
const onInput = T$1(newValue => {
|
|
105521
|
+
const newModelValue = newValue === '' ? undefined : newValue;
|
|
105522
|
+
commitValue(newModelValue);
|
|
105523
|
+
}, [commitValue]);
|
|
105142
105524
|
const visible = useElementVisible(ref.current);
|
|
105143
105525
|
|
|
105144
105526
|
/**
|
|
105145
105527
|
* @type { import('min-dash').DebouncedFunction }
|
|
105146
105528
|
*/
|
|
105147
|
-
const
|
|
105148
|
-
const handleInput = newValue => {
|
|
105149
|
-
const newModelValue = newValue === '' ? undefined : newValue;
|
|
105150
|
-
handleInputCallback(newModelValue);
|
|
105151
|
-
};
|
|
105529
|
+
const handleInput = useDebounce(onInput, debounce);
|
|
105152
105530
|
const handleLocalInput = e => {
|
|
105153
105531
|
autoResize && resizeToContents(e.target);
|
|
105154
105532
|
if (e.target.value === localValue) {
|
|
@@ -105161,11 +105539,40 @@
|
|
|
105161
105539
|
const trimmedValue = e.target.value.trim();
|
|
105162
105540
|
|
|
105163
105541
|
// trim and commit on blur
|
|
105542
|
+
handleInput.cancel?.();
|
|
105164
105543
|
onInput(trimmedValue);
|
|
105544
|
+
setLocalValue(trimmedValue);
|
|
105165
105545
|
if (onBlur) {
|
|
105166
105546
|
onBlur(e);
|
|
105167
105547
|
}
|
|
105168
105548
|
};
|
|
105549
|
+
const handleOnPaste = e => {
|
|
105550
|
+
const input = e.target;
|
|
105551
|
+
const isFieldEmpty = !input.value;
|
|
105552
|
+
const isAllSelected = input.selectionStart === 0 && input.selectionEnd === input.value.length;
|
|
105553
|
+
|
|
105554
|
+
// Trim and handle paste if field is empty or all content is selected
|
|
105555
|
+
if (isFieldEmpty || isAllSelected) {
|
|
105556
|
+
const trimmedValue = e.clipboardData.getData('text').trim();
|
|
105557
|
+
setLocalValue(trimmedValue);
|
|
105558
|
+
handleInput(trimmedValue);
|
|
105559
|
+
if (onPaste) {
|
|
105560
|
+
onPaste(e);
|
|
105561
|
+
}
|
|
105562
|
+
e.preventDefault();
|
|
105563
|
+
return;
|
|
105564
|
+
}
|
|
105565
|
+
|
|
105566
|
+
// Allow default paste behavior for normal text editing
|
|
105567
|
+
if (onPaste) {
|
|
105568
|
+
onPaste(e);
|
|
105569
|
+
}
|
|
105570
|
+
};
|
|
105571
|
+
const handleOnKeyDown = e => {
|
|
105572
|
+
if (isCmdWithChar(e)) {
|
|
105573
|
+
handleInput.flush();
|
|
105574
|
+
}
|
|
105575
|
+
};
|
|
105169
105576
|
y(() => {
|
|
105170
105577
|
autoResize && resizeToContents(ref.current);
|
|
105171
105578
|
}, []);
|
|
@@ -105197,7 +105604,9 @@
|
|
|
105197
105604
|
class: classnames('bio-properties-panel-input', monospace ? 'bio-properties-panel-input-monospace' : '', autoResize ? 'auto-resize' : ''),
|
|
105198
105605
|
onInput: handleLocalInput,
|
|
105199
105606
|
onFocus: onFocus,
|
|
105607
|
+
onKeyDown: handleOnKeyDown,
|
|
105200
105608
|
onBlur: handleOnBlur,
|
|
105609
|
+
onPaste: handleOnPaste,
|
|
105201
105610
|
placeholder: placeholder,
|
|
105202
105611
|
rows: rows,
|
|
105203
105612
|
value: localValue,
|
|
@@ -105218,6 +105627,7 @@
|
|
|
105218
105627
|
* @param {Function} props.setValue
|
|
105219
105628
|
* @param {Function} props.onFocus
|
|
105220
105629
|
* @param {Function} props.onBlur
|
|
105630
|
+
* @param {Function} props.onPaste
|
|
105221
105631
|
* @param {number} props.rows
|
|
105222
105632
|
* @param {boolean} props.monospace
|
|
105223
105633
|
* @param {Function} [props.validate]
|
|
@@ -105238,6 +105648,7 @@
|
|
|
105238
105648
|
validate,
|
|
105239
105649
|
onFocus,
|
|
105240
105650
|
onBlur,
|
|
105651
|
+
onPaste,
|
|
105241
105652
|
placeholder,
|
|
105242
105653
|
autoResize,
|
|
105243
105654
|
tooltip
|
|
@@ -105273,6 +105684,7 @@
|
|
|
105273
105684
|
onInput: onInput,
|
|
105274
105685
|
onFocus: onFocus,
|
|
105275
105686
|
onBlur: onBlur,
|
|
105687
|
+
onPaste: onPaste,
|
|
105276
105688
|
rows: rows,
|
|
105277
105689
|
debounce: debounce,
|
|
105278
105690
|
monospace: monospace,
|
|
@@ -105307,32 +105719,57 @@
|
|
|
105307
105719
|
disabled = false,
|
|
105308
105720
|
id,
|
|
105309
105721
|
label,
|
|
105310
|
-
onInput,
|
|
105722
|
+
onInput: commitValue,
|
|
105311
105723
|
onFocus,
|
|
105312
105724
|
onBlur,
|
|
105725
|
+
onPaste,
|
|
105313
105726
|
placeholder,
|
|
105314
105727
|
value = '',
|
|
105315
105728
|
tooltip
|
|
105316
105729
|
} = props;
|
|
105317
105730
|
const [localValue, setLocalValue] = h(value || '');
|
|
105318
105731
|
const ref = useShowEntryEvent(id);
|
|
105732
|
+
const onInput = T$1(newValue => {
|
|
105733
|
+
const newModelValue = newValue === '' ? undefined : newValue;
|
|
105734
|
+
commitValue(newModelValue);
|
|
105735
|
+
}, [commitValue]);
|
|
105319
105736
|
|
|
105320
105737
|
/**
|
|
105321
105738
|
* @type { import('min-dash').DebouncedFunction }
|
|
105322
105739
|
*/
|
|
105323
|
-
const
|
|
105740
|
+
const handleInput = useDebounce(onInput, debounce);
|
|
105324
105741
|
const handleOnBlur = e => {
|
|
105325
105742
|
const trimmedValue = e.target.value.trim();
|
|
105326
105743
|
|
|
105327
105744
|
// trim and commit on blur
|
|
105745
|
+
handleInput.cancel?.();
|
|
105328
105746
|
onInput(trimmedValue);
|
|
105747
|
+
setLocalValue(trimmedValue);
|
|
105329
105748
|
if (onBlur) {
|
|
105330
105749
|
onBlur(e);
|
|
105331
105750
|
}
|
|
105332
105751
|
};
|
|
105333
|
-
const
|
|
105334
|
-
const
|
|
105335
|
-
|
|
105752
|
+
const handleOnPaste = e => {
|
|
105753
|
+
const input = e.target;
|
|
105754
|
+
const isFieldEmpty = !input.value;
|
|
105755
|
+
const isAllSelected = input.selectionStart === 0 && input.selectionEnd === input.value.length;
|
|
105756
|
+
|
|
105757
|
+
// Trim and handle paste if field is empty or all content is selected (overwrite)
|
|
105758
|
+
if (isFieldEmpty || isAllSelected) {
|
|
105759
|
+
const trimmedValue = e.clipboardData.getData('text').trim();
|
|
105760
|
+
setLocalValue(trimmedValue);
|
|
105761
|
+
handleInput(trimmedValue);
|
|
105762
|
+
if (onPaste) {
|
|
105763
|
+
onPaste(e);
|
|
105764
|
+
}
|
|
105765
|
+
e.preventDefault();
|
|
105766
|
+
return;
|
|
105767
|
+
}
|
|
105768
|
+
|
|
105769
|
+
// Allow default paste behavior for normal text editing
|
|
105770
|
+
if (onPaste) {
|
|
105771
|
+
onPaste(e);
|
|
105772
|
+
}
|
|
105336
105773
|
};
|
|
105337
105774
|
const handleLocalInput = e => {
|
|
105338
105775
|
if (e.target.value === localValue) {
|
|
@@ -105347,6 +105784,11 @@
|
|
|
105347
105784
|
}
|
|
105348
105785
|
setLocalValue(value);
|
|
105349
105786
|
}, [value]);
|
|
105787
|
+
const handleOnKeyDown = e => {
|
|
105788
|
+
if (isCmdWithChar(e)) {
|
|
105789
|
+
handleInput.flush();
|
|
105790
|
+
}
|
|
105791
|
+
};
|
|
105350
105792
|
return u("div", {
|
|
105351
105793
|
class: "bio-properties-panel-textfield",
|
|
105352
105794
|
children: [u("label", {
|
|
@@ -105369,7 +105811,9 @@
|
|
|
105369
105811
|
class: "bio-properties-panel-input",
|
|
105370
105812
|
onInput: handleLocalInput,
|
|
105371
105813
|
onFocus: onFocus,
|
|
105814
|
+
onKeyDown: handleOnKeyDown,
|
|
105372
105815
|
onBlur: handleOnBlur,
|
|
105816
|
+
onPaste: handleOnPaste,
|
|
105373
105817
|
placeholder: placeholder,
|
|
105374
105818
|
value: localValue
|
|
105375
105819
|
})]
|
|
@@ -105404,6 +105848,7 @@
|
|
|
105404
105848
|
validate,
|
|
105405
105849
|
onFocus,
|
|
105406
105850
|
onBlur,
|
|
105851
|
+
onPaste,
|
|
105407
105852
|
placeholder,
|
|
105408
105853
|
tooltip
|
|
105409
105854
|
} = props;
|
|
@@ -105439,6 +105884,7 @@
|
|
|
105439
105884
|
onInput: onInput,
|
|
105440
105885
|
onFocus: onFocus,
|
|
105441
105886
|
onBlur: onBlur,
|
|
105887
|
+
onPaste: onPaste,
|
|
105442
105888
|
placeholder: placeholder,
|
|
105443
105889
|
value: value,
|
|
105444
105890
|
tooltip: tooltip,
|
|
@@ -105471,7 +105917,7 @@
|
|
|
105471
105917
|
* - If `debounceDelay` is `false`, the function executes immediately without debouncing.
|
|
105472
105918
|
* - If a number is provided, the function execution is delayed by the given time in milliseconds.
|
|
105473
105919
|
*
|
|
105474
|
-
* @param { Boolean | Number } [debounceDelay=
|
|
105920
|
+
* @param { Boolean | Number } [debounceDelay=600]
|
|
105475
105921
|
*
|
|
105476
105922
|
* @example
|
|
105477
105923
|
* const debounce = debounceInput();
|
|
@@ -105791,6 +106237,24 @@
|
|
|
105791
106237
|
event.stopPropagation();
|
|
105792
106238
|
}
|
|
105793
106239
|
|
|
106240
|
+
/**
|
|
106241
|
+
* @typedef {Object} FeelPopupProps
|
|
106242
|
+
* @property {string} entryId
|
|
106243
|
+
* @property {Function} onInput
|
|
106244
|
+
* @property {Function} onClose
|
|
106245
|
+
* @property {string} title
|
|
106246
|
+
* @property {'feel'|'feelers'} type
|
|
106247
|
+
* @property {string} value
|
|
106248
|
+
* @property {Array} [links]
|
|
106249
|
+
* @property {Array|Object} [variables]
|
|
106250
|
+
* @property {Object} [position]
|
|
106251
|
+
* @property {string} [hostLanguage]
|
|
106252
|
+
* @property {boolean} [singleLine]
|
|
106253
|
+
* @property {HTMLElement} [sourceElement]
|
|
106254
|
+
* @property {HTMLElement|string} [tooltipContainer]
|
|
106255
|
+
* @property {Object} [eventBus]
|
|
106256
|
+
*/
|
|
106257
|
+
|
|
105794
106258
|
const FEEL_POPUP_WIDTH = 700;
|
|
105795
106259
|
const FEEL_POPUP_HEIGHT = 250;
|
|
105796
106260
|
|
|
@@ -107555,16 +108019,16 @@
|
|
|
107555
108019
|
parserDialect: 'camunda'
|
|
107556
108020
|
};
|
|
107557
108021
|
|
|
107558
|
-
/**
|
|
107559
|
-
* @param {Object} props
|
|
107560
|
-
* @param {djs.model.Base|Array<djs.model.Base>} [props.element]
|
|
107561
|
-
* @param {Injector} props.injector
|
|
107562
|
-
* @param { (djs.model.Base) => Array<PropertiesProvider> } props.getProviders
|
|
107563
|
-
* @param {Object} props.layoutConfig
|
|
107564
|
-
* @param {Object} props.descriptionConfig
|
|
107565
|
-
* @param {Object} props.tooltipConfig
|
|
107566
|
-
* @param {HTMLElement} props.feelPopupContainer
|
|
107567
|
-
* @param {Function} props.getFeelPopupLinks
|
|
108022
|
+
/**
|
|
108023
|
+
* @param {Object} props
|
|
108024
|
+
* @param {djs.model.Base|Array<djs.model.Base>} [props.element]
|
|
108025
|
+
* @param {Injector} props.injector
|
|
108026
|
+
* @param { (djs.model.Base) => Array<PropertiesProvider> } props.getProviders
|
|
108027
|
+
* @param {Object} props.layoutConfig
|
|
108028
|
+
* @param {Object} props.descriptionConfig
|
|
108029
|
+
* @param {Object} props.tooltipConfig
|
|
108030
|
+
* @param {HTMLElement} props.feelPopupContainer
|
|
108031
|
+
* @param {Function} props.getFeelPopupLinks
|
|
107568
108032
|
*/
|
|
107569
108033
|
function BpmnPropertiesPanel(props) {
|
|
107570
108034
|
const {
|
|
@@ -107586,8 +108050,8 @@
|
|
|
107586
108050
|
});
|
|
107587
108051
|
const selectedElement = state.selectedElement;
|
|
107588
108052
|
|
|
107589
|
-
/**
|
|
107590
|
-
* @param {djs.model.Base | Array<djs.model.Base>} element
|
|
108053
|
+
/**
|
|
108054
|
+
* @param {djs.model.Base | Array<djs.model.Base>} element
|
|
107591
108055
|
*/
|
|
107592
108056
|
const _update = element => {
|
|
107593
108057
|
if (!element) {
|
|
@@ -107775,10 +108239,10 @@
|
|
|
107775
108239
|
|
|
107776
108240
|
const DEFAULT_PRIORITY = 1000;
|
|
107777
108241
|
|
|
107778
|
-
/**
|
|
107779
|
-
* @typedef { import('@bpmn-io/properties-panel').GroupDefinition } GroupDefinition
|
|
107780
|
-
* @typedef { import('@bpmn-io/properties-panel').ListGroupDefinition } ListGroupDefinition
|
|
107781
|
-
* @typedef { { getGroups: (ModdleElement) => (Array{GroupDefinition|ListGroupDefinition}) => Array{GroupDefinition|ListGroupDefinition}) } PropertiesProvider
|
|
108242
|
+
/**
|
|
108243
|
+
* @typedef { import('@bpmn-io/properties-panel').GroupDefinition } GroupDefinition
|
|
108244
|
+
* @typedef { import('@bpmn-io/properties-panel').ListGroupDefinition } ListGroupDefinition
|
|
108245
|
+
* @typedef { { getGroups: (ModdleElement) => (Array{GroupDefinition|ListGroupDefinition}) => Array{GroupDefinition|ListGroupDefinition}) } PropertiesProvider
|
|
107782
108246
|
*/
|
|
107783
108247
|
|
|
107784
108248
|
class BpmnPropertiesPanelRenderer {
|
|
@@ -107817,10 +108281,10 @@
|
|
|
107817
108281
|
});
|
|
107818
108282
|
}
|
|
107819
108283
|
|
|
107820
|
-
/**
|
|
107821
|
-
* Attach the properties panel to a parent node.
|
|
107822
|
-
*
|
|
107823
|
-
* @param {HTMLElement} container
|
|
108284
|
+
/**
|
|
108285
|
+
* Attach the properties panel to a parent node.
|
|
108286
|
+
*
|
|
108287
|
+
* @param {HTMLElement} container
|
|
107824
108288
|
*/
|
|
107825
108289
|
attachTo(container) {
|
|
107826
108290
|
if (!container) {
|
|
@@ -107845,8 +108309,8 @@
|
|
|
107845
108309
|
this._eventBus.fire('propertiesPanel.attach');
|
|
107846
108310
|
}
|
|
107847
108311
|
|
|
107848
|
-
/**
|
|
107849
|
-
* Detach the properties panel from its parent node.
|
|
108312
|
+
/**
|
|
108313
|
+
* Detach the properties panel from its parent node.
|
|
107850
108314
|
*/
|
|
107851
108315
|
detach() {
|
|
107852
108316
|
const parentNode = this._container.parentNode;
|
|
@@ -107856,11 +108320,11 @@
|
|
|
107856
108320
|
}
|
|
107857
108321
|
}
|
|
107858
108322
|
|
|
107859
|
-
/**
|
|
107860
|
-
* Register a new properties provider to the properties panel.
|
|
107861
|
-
*
|
|
107862
|
-
* @param {Number} [priority]
|
|
107863
|
-
* @param {PropertiesProvider} provider
|
|
108323
|
+
/**
|
|
108324
|
+
* Register a new properties provider to the properties panel.
|
|
108325
|
+
*
|
|
108326
|
+
* @param {Number} [priority]
|
|
108327
|
+
* @param {PropertiesProvider} provider
|
|
107864
108328
|
*/
|
|
107865
108329
|
registerProvider(priority, provider) {
|
|
107866
108330
|
if (!provider) {
|
|
@@ -107877,9 +108341,9 @@
|
|
|
107877
108341
|
this._eventBus.fire('propertiesPanel.providersChanged');
|
|
107878
108342
|
}
|
|
107879
108343
|
|
|
107880
|
-
/**
|
|
107881
|
-
* Updates the layout of the properties panel.
|
|
107882
|
-
* @param {Object} layout
|
|
108344
|
+
/**
|
|
108345
|
+
* Updates the layout of the properties panel.
|
|
108346
|
+
* @param {Object} layout
|
|
107883
108347
|
*/
|
|
107884
108348
|
setLayout(layout) {
|
|
107885
108349
|
this._eventBus.fire('propertiesPanel.setLayout', {
|
|
@@ -107929,12 +108393,12 @@
|
|
|
107929
108393
|
return element && element.isImplicit;
|
|
107930
108394
|
}
|
|
107931
108395
|
|
|
107932
|
-
/**
|
|
107933
|
-
* Setup keyboard bindings (undo, redo) on the given container.
|
|
107934
|
-
*
|
|
107935
|
-
* @param {Element} container
|
|
107936
|
-
* @param {EventBus} eventBus
|
|
107937
|
-
* @param {CommandStack} commandStack
|
|
108396
|
+
/**
|
|
108397
|
+
* Setup keyboard bindings (undo, redo) on the given container.
|
|
108398
|
+
*
|
|
108399
|
+
* @param {Element} container
|
|
108400
|
+
* @param {EventBus} eventBus
|
|
108401
|
+
* @param {CommandStack} commandStack
|
|
107938
108402
|
*/
|
|
107939
108403
|
function setupKeyboard(container, eventBus, commandStack) {
|
|
107940
108404
|
function cancel(event) {
|
|
@@ -107959,14 +108423,14 @@
|
|
|
107959
108423
|
});
|
|
107960
108424
|
}
|
|
107961
108425
|
|
|
107962
|
-
/**
|
|
107963
|
-
* A handler that combines and executes multiple commands.
|
|
107964
|
-
*
|
|
107965
|
-
* All updates are bundled on the command stack and executed in one step.
|
|
107966
|
-
* This also makes it possible to revert the changes in one step.
|
|
107967
|
-
*
|
|
107968
|
-
* Example use case: remove the camunda:formKey attribute and in addition
|
|
107969
|
-
* add all form fields needed for the camunda:formData property.
|
|
108426
|
+
/**
|
|
108427
|
+
* A handler that combines and executes multiple commands.
|
|
108428
|
+
*
|
|
108429
|
+
* All updates are bundled on the command stack and executed in one step.
|
|
108430
|
+
* This also makes it possible to revert the changes in one step.
|
|
108431
|
+
*
|
|
108432
|
+
* Example use case: remove the camunda:formKey attribute and in addition
|
|
108433
|
+
* add all form fields needed for the camunda:formData property.
|
|
107970
108434
|
*/
|
|
107971
108435
|
class MultiCommandHandler {
|
|
107972
108436
|
constructor(commandStack) {
|
|
@@ -108002,15 +108466,15 @@
|
|
|
108002
108466
|
propertiesPanel: ['type', BpmnPropertiesPanelRenderer]
|
|
108003
108467
|
};
|
|
108004
108468
|
|
|
108005
|
-
/**
|
|
108006
|
-
* Create a new element and (optionally) set its parent.
|
|
108007
|
-
*
|
|
108008
|
-
* @param {string} type
|
|
108009
|
-
* @param {Object} properties
|
|
108010
|
-
* @param {import('bpmn-js/lib/model/Types').ModdleElement} parent
|
|
108011
|
-
* @param {import('bpmn-js/lib/features/modeling/BpmnFactory').default} bpmnFactory
|
|
108012
|
-
*
|
|
108013
|
-
* @returns {import('bpmn-js/lib/model/Types').ModdleElement}
|
|
108469
|
+
/**
|
|
108470
|
+
* Create a new element and (optionally) set its parent.
|
|
108471
|
+
*
|
|
108472
|
+
* @param {string} type
|
|
108473
|
+
* @param {Object} properties
|
|
108474
|
+
* @param {import('bpmn-js/lib/model/Types').ModdleElement} parent
|
|
108475
|
+
* @param {import('bpmn-js/lib/features/modeling/BpmnFactory').default} bpmnFactory
|
|
108476
|
+
*
|
|
108477
|
+
* @returns {import('bpmn-js/lib/model/Types').ModdleElement}
|
|
108014
108478
|
*/
|
|
108015
108479
|
function createElement(type, properties, parent, bpmnFactory) {
|
|
108016
108480
|
const element = bpmnFactory.create(type, properties);
|
|
@@ -108020,8 +108484,8 @@
|
|
|
108020
108484
|
return element;
|
|
108021
108485
|
}
|
|
108022
108486
|
|
|
108023
|
-
/**
|
|
108024
|
-
* generate a semantic id with given prefix
|
|
108487
|
+
/**
|
|
108488
|
+
* generate a semantic id with given prefix
|
|
108025
108489
|
*/
|
|
108026
108490
|
function nextId(prefix) {
|
|
108027
108491
|
const ids = new Ids$1([32, 32, 1]);
|
|
@@ -108047,32 +108511,32 @@
|
|
|
108047
108511
|
return elements.find(element => element.id === id);
|
|
108048
108512
|
}
|
|
108049
108513
|
|
|
108050
|
-
/**
|
|
108051
|
-
* createOrUpdateFormalExpression - upserts a specific formal expression
|
|
108052
|
-
*
|
|
108053
|
-
* If the value is falsy, the formal expression is removed.
|
|
108054
|
-
*
|
|
108055
|
-
* @param {djs.model.Base} element
|
|
108056
|
-
* @param {ModdleElement} moddleElement
|
|
108057
|
-
* @param {string} propertyName
|
|
108058
|
-
* @param {string} newValue
|
|
108059
|
-
* @param {BpmnFactory} bpmnFactory
|
|
108060
|
-
* @param {CommandStack} commandStack
|
|
108514
|
+
/**
|
|
108515
|
+
* createOrUpdateFormalExpression - upserts a specific formal expression
|
|
108516
|
+
*
|
|
108517
|
+
* If the value is falsy, the formal expression is removed.
|
|
108518
|
+
*
|
|
108519
|
+
* @param {djs.model.Base} element
|
|
108520
|
+
* @param {ModdleElement} moddleElement
|
|
108521
|
+
* @param {string} propertyName
|
|
108522
|
+
* @param {string} newValue
|
|
108523
|
+
* @param {BpmnFactory} bpmnFactory
|
|
108524
|
+
* @param {CommandStack} commandStack
|
|
108061
108525
|
*/
|
|
108062
108526
|
function createOrUpdateFormalExpression(element, moddleElement, propertyName, newValue, bpmnFactory, commandStack) {
|
|
108063
108527
|
return commandStack.execute('element.updateModdleProperties', createOrUpdateFormalExpressionCommand(element, moddleElement, propertyName, newValue, bpmnFactory));
|
|
108064
108528
|
}
|
|
108065
108529
|
|
|
108066
|
-
/**
|
|
108067
|
-
* createOrUpdateFormalExpressionCommand - creates a command to upsert a specific formal expression
|
|
108068
|
-
*
|
|
108069
|
-
* If the value is falsy, the formal expression is removed.
|
|
108070
|
-
*
|
|
108071
|
-
* @param {djs.model.Base} element
|
|
108072
|
-
* @param {ModdleElement} moddleElement
|
|
108073
|
-
* @param {string} propertyName
|
|
108074
|
-
* @param {string} newValue
|
|
108075
|
-
* @param {BpmnFactory} bpmnFactory
|
|
108530
|
+
/**
|
|
108531
|
+
* createOrUpdateFormalExpressionCommand - creates a command to upsert a specific formal expression
|
|
108532
|
+
*
|
|
108533
|
+
* If the value is falsy, the formal expression is removed.
|
|
108534
|
+
*
|
|
108535
|
+
* @param {djs.model.Base} element
|
|
108536
|
+
* @param {ModdleElement} moddleElement
|
|
108537
|
+
* @param {string} propertyName
|
|
108538
|
+
* @param {string} newValue
|
|
108539
|
+
* @param {BpmnFactory} bpmnFactory
|
|
108076
108540
|
*/
|
|
108077
108541
|
function createOrUpdateFormalExpressionCommand(element, moddleElement, propertyName, newValue, bpmnFactory) {
|
|
108078
108542
|
const expressionProps = {};
|
|
@@ -108108,12 +108572,12 @@
|
|
|
108108
108572
|
};
|
|
108109
108573
|
}
|
|
108110
108574
|
|
|
108111
|
-
/**
|
|
108112
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
108575
|
+
/**
|
|
108576
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
108113
108577
|
*/
|
|
108114
108578
|
|
|
108115
|
-
/**
|
|
108116
|
-
* @returns {Array<Entry>} entries
|
|
108579
|
+
/**
|
|
108580
|
+
* @returns {Array<Entry>} entries
|
|
108117
108581
|
*/
|
|
108118
108582
|
function AdHocCompletionProps$1(props) {
|
|
108119
108583
|
const {
|
|
@@ -108129,7 +108593,7 @@
|
|
|
108129
108593
|
}, {
|
|
108130
108594
|
id: 'cancelRemainingInstances',
|
|
108131
108595
|
component: CancelRemainingInstances,
|
|
108132
|
-
isEdited:
|
|
108596
|
+
isEdited: node => node && !node.checked // the default value is true
|
|
108133
108597
|
}];
|
|
108134
108598
|
}
|
|
108135
108599
|
function CompletionCondition$3(props) {
|
|
@@ -108275,12 +108739,12 @@
|
|
|
108275
108739
|
return compensateEventDefinition && compensateEventDefinition.get('activityRef');
|
|
108276
108740
|
}
|
|
108277
108741
|
|
|
108278
|
-
/**
|
|
108279
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
108742
|
+
/**
|
|
108743
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
108280
108744
|
*/
|
|
108281
108745
|
|
|
108282
|
-
/**
|
|
108283
|
-
* @returns {Array<Entry>} entries
|
|
108746
|
+
/**
|
|
108747
|
+
* @returns {Array<Entry>} entries
|
|
108284
108748
|
*/
|
|
108285
108749
|
function CompensationProps(props) {
|
|
108286
108750
|
const {
|
|
@@ -108390,12 +108854,12 @@
|
|
|
108390
108854
|
return getFlowElements(element, 'bpmn:BoundaryEvent');
|
|
108391
108855
|
}
|
|
108392
108856
|
|
|
108393
|
-
/**
|
|
108394
|
-
* Checks whether an Activity is attaching a CompensateEvent of the parent container.
|
|
108395
|
-
*
|
|
108396
|
-
* @param {ModdleElement} activity
|
|
108397
|
-
* @param {Array<ModdleElement>} boundaryEvents
|
|
108398
|
-
* @returns {Boolean}
|
|
108857
|
+
/**
|
|
108858
|
+
* Checks whether an Activity is attaching a CompensateEvent of the parent container.
|
|
108859
|
+
*
|
|
108860
|
+
* @param {ModdleElement} activity
|
|
108861
|
+
* @param {Array<ModdleElement>} boundaryEvents
|
|
108862
|
+
* @returns {Boolean}
|
|
108399
108863
|
*/
|
|
108400
108864
|
function hasCompensationEventAttached(activity, boundaryEvents) {
|
|
108401
108865
|
const {
|
|
@@ -108410,15 +108874,15 @@
|
|
|
108410
108874
|
});
|
|
108411
108875
|
}
|
|
108412
108876
|
|
|
108413
|
-
/**
|
|
108414
|
-
* Checks whether an Activity can be compensated. That's the case when it is
|
|
108415
|
-
* a) a CallActivity
|
|
108416
|
-
* b) a SubProcess, when it is not event based and not a compensation
|
|
108417
|
-
* c) any other Activity, when it is attaching a CompensateEvent of the parent container
|
|
108418
|
-
*
|
|
108419
|
-
* @param {ModdleElement} activity
|
|
108420
|
-
* @param {Array<ModdleElement>} boundaryEvents
|
|
108421
|
-
* @returns {Boolean}
|
|
108877
|
+
/**
|
|
108878
|
+
* Checks whether an Activity can be compensated. That's the case when it is
|
|
108879
|
+
* a) a CallActivity
|
|
108880
|
+
* b) a SubProcess, when it is not event based and not a compensation
|
|
108881
|
+
* c) any other Activity, when it is attaching a CompensateEvent of the parent container
|
|
108882
|
+
*
|
|
108883
|
+
* @param {ModdleElement} activity
|
|
108884
|
+
* @param {Array<ModdleElement>} boundaryEvents
|
|
108885
|
+
* @returns {Boolean}
|
|
108422
108886
|
*/
|
|
108423
108887
|
function canBeCompensated(activity, boundaryEvents) {
|
|
108424
108888
|
return is(activity, 'bpmn:CallActivity') || is(activity, 'bpmn:SubProcess') && !activity.triggeredByEvent && !activity.isForCompensation || hasCompensationEventAttached(activity, boundaryEvents);
|
|
@@ -108431,11 +108895,11 @@
|
|
|
108431
108895
|
});
|
|
108432
108896
|
}
|
|
108433
108897
|
|
|
108434
|
-
/**
|
|
108435
|
-
* Retrieves all possible activities to reference for a Compensation.
|
|
108436
|
-
*
|
|
108437
|
-
* @param {djs.model.Base} element
|
|
108438
|
-
* @returns {Array<ModdleElement>}
|
|
108898
|
+
/**
|
|
108899
|
+
* Retrieves all possible activities to reference for a Compensation.
|
|
108900
|
+
*
|
|
108901
|
+
* @param {djs.model.Base} element
|
|
108902
|
+
* @returns {Array<ModdleElement>}
|
|
108439
108903
|
*/
|
|
108440
108904
|
function findActivityRefs(element) {
|
|
108441
108905
|
const businessObject = getBusinessObject(element);
|
|
@@ -108455,13 +108919,13 @@
|
|
|
108455
108919
|
return activities;
|
|
108456
108920
|
}
|
|
108457
108921
|
|
|
108458
|
-
/**
|
|
108459
|
-
* Retrieves an option label in the form
|
|
108460
|
-
* a) with name: "my Task (id=Task_1)"
|
|
108461
|
-
* b) without name: "(id=Task_1)"
|
|
108462
|
-
*
|
|
108463
|
-
* @param {ModdleElement} activity
|
|
108464
|
-
* @returns {String}
|
|
108922
|
+
/**
|
|
108923
|
+
* Retrieves an option label in the form
|
|
108924
|
+
* a) with name: "my Task (id=Task_1)"
|
|
108925
|
+
* b) without name: "(id=Task_1)"
|
|
108926
|
+
*
|
|
108927
|
+
* @param {ModdleElement} activity
|
|
108928
|
+
* @returns {String}
|
|
108465
108929
|
*/
|
|
108466
108930
|
function createOptionLabel(activity) {
|
|
108467
108931
|
const {
|
|
@@ -108476,12 +108940,12 @@
|
|
|
108476
108940
|
|
|
108477
108941
|
const DOCUMENTATION_TEXT_FORMAT = 'text/plain';
|
|
108478
108942
|
|
|
108479
|
-
/**
|
|
108480
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
108943
|
+
/**
|
|
108944
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
108481
108945
|
*/
|
|
108482
108946
|
|
|
108483
|
-
/**
|
|
108484
|
-
* @returns {Array<Entry>} entries
|
|
108947
|
+
/**
|
|
108948
|
+
* @returns {Array<Entry>} entries
|
|
108485
108949
|
*/
|
|
108486
108950
|
function DocumentationProps(props) {
|
|
108487
108951
|
const {
|
|
@@ -108552,12 +109016,12 @@
|
|
|
108552
109016
|
});
|
|
108553
109017
|
}
|
|
108554
109018
|
|
|
108555
|
-
/**
|
|
108556
|
-
* Retrieves a documentation element from a given moddle element.
|
|
108557
|
-
*
|
|
108558
|
-
* @param {ModdleElement} businessObject
|
|
108559
|
-
*
|
|
108560
|
-
* @returns {ModdleElement} documentation element inside the given moddle element.
|
|
109019
|
+
/**
|
|
109020
|
+
* Retrieves a documentation element from a given moddle element.
|
|
109021
|
+
*
|
|
109022
|
+
* @param {ModdleElement} businessObject
|
|
109023
|
+
*
|
|
109024
|
+
* @returns {ModdleElement} documentation element inside the given moddle element.
|
|
108561
109025
|
*/
|
|
108562
109026
|
function getDocumentation(businessObject) {
|
|
108563
109027
|
return function () {
|
|
@@ -108566,10 +109030,10 @@
|
|
|
108566
109030
|
};
|
|
108567
109031
|
}
|
|
108568
109032
|
|
|
108569
|
-
/**
|
|
108570
|
-
* Sets a documentation element for a given moddle element.
|
|
108571
|
-
*
|
|
108572
|
-
* @param {ModdleElement} businessObject
|
|
109033
|
+
/**
|
|
109034
|
+
* Sets a documentation element for a given moddle element.
|
|
109035
|
+
*
|
|
109036
|
+
* @param {ModdleElement} businessObject
|
|
108573
109037
|
*/
|
|
108574
109038
|
function setDocumentation(element, businessObject, bpmnFactory, commandStack) {
|
|
108575
109039
|
return function (value) {
|
|
@@ -108615,12 +109079,12 @@
|
|
|
108615
109079
|
const EMPTY_OPTION$4 = '';
|
|
108616
109080
|
const CREATE_NEW_OPTION$4 = 'create-new';
|
|
108617
109081
|
|
|
108618
|
-
/**
|
|
108619
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109082
|
+
/**
|
|
109083
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
108620
109084
|
*/
|
|
108621
109085
|
|
|
108622
|
-
/**
|
|
108623
|
-
* @returns {Array<Entry>} entries
|
|
109086
|
+
/**
|
|
109087
|
+
* @returns {Array<Entry>} entries
|
|
108624
109088
|
*/
|
|
108625
109089
|
function ErrorProps$2(props) {
|
|
108626
109090
|
const {
|
|
@@ -108796,12 +109260,12 @@
|
|
|
108796
109260
|
|
|
108797
109261
|
const CREATE_NEW_OPTION$3 = 'create-new';
|
|
108798
109262
|
|
|
108799
|
-
/**
|
|
108800
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109263
|
+
/**
|
|
109264
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
108801
109265
|
*/
|
|
108802
109266
|
|
|
108803
|
-
/**
|
|
108804
|
-
* @returns {Array<Entry>} entries
|
|
109267
|
+
/**
|
|
109268
|
+
* @returns {Array<Entry>} entries
|
|
108805
109269
|
*/
|
|
108806
109270
|
function EscalationProps$2(props) {
|
|
108807
109271
|
const {
|
|
@@ -108974,12 +109438,12 @@
|
|
|
108974
109438
|
return sortBy(elements, e => (e.name || '').toLowerCase());
|
|
108975
109439
|
}
|
|
108976
109440
|
|
|
108977
|
-
/**
|
|
108978
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109441
|
+
/**
|
|
109442
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
108979
109443
|
*/
|
|
108980
109444
|
|
|
108981
|
-
/**
|
|
108982
|
-
* @returns {Array<Entry>} entries
|
|
109445
|
+
/**
|
|
109446
|
+
* @returns {Array<Entry>} entries
|
|
108983
109447
|
*/
|
|
108984
109448
|
function ExecutableProps(props) {
|
|
108985
109449
|
const {
|
|
@@ -109050,14 +109514,14 @@
|
|
|
109050
109514
|
// for ID validation as per BPMN Schema (QName - Namespace)
|
|
109051
109515
|
const ID_REGEX = /^[a-z_][\w-.]*$/i;
|
|
109052
109516
|
|
|
109053
|
-
/**
|
|
109054
|
-
* checks whether the id value is valid
|
|
109055
|
-
*
|
|
109056
|
-
* @param {ModdleElement} element
|
|
109057
|
-
* @param {String} idValue
|
|
109058
|
-
* @param {Function} translate
|
|
109059
|
-
*
|
|
109060
|
-
* @return {String} error message
|
|
109517
|
+
/**
|
|
109518
|
+
* checks whether the id value is valid
|
|
109519
|
+
*
|
|
109520
|
+
* @param {ModdleElement} element
|
|
109521
|
+
* @param {String} idValue
|
|
109522
|
+
* @param {Function} translate
|
|
109523
|
+
*
|
|
109524
|
+
* @return {String} error message
|
|
109061
109525
|
*/
|
|
109062
109526
|
function isIdValid(element, idValue, translate) {
|
|
109063
109527
|
const assigned = element.$model.ids.assigned(idValue);
|
|
@@ -109085,12 +109549,12 @@
|
|
|
109085
109549
|
return SPACE_REGEX.test(value);
|
|
109086
109550
|
}
|
|
109087
109551
|
|
|
109088
|
-
/**
|
|
109089
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109552
|
+
/**
|
|
109553
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109090
109554
|
*/
|
|
109091
109555
|
|
|
109092
|
-
/**
|
|
109093
|
-
* @returns {Array<Entry>} entries
|
|
109556
|
+
/**
|
|
109557
|
+
* @returns {Array<Entry>} entries
|
|
109094
109558
|
*/
|
|
109095
109559
|
function IdProps$1() {
|
|
109096
109560
|
return [{
|
|
@@ -109132,12 +109596,12 @@
|
|
|
109132
109596
|
});
|
|
109133
109597
|
}
|
|
109134
109598
|
|
|
109135
|
-
/**
|
|
109136
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109599
|
+
/**
|
|
109600
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109137
109601
|
*/
|
|
109138
109602
|
|
|
109139
|
-
/**
|
|
109140
|
-
* @returns {Array<Entry>} entries
|
|
109603
|
+
/**
|
|
109604
|
+
* @returns {Array<Entry>} entries
|
|
109141
109605
|
*/
|
|
109142
109606
|
function LinkProps(props) {
|
|
109143
109607
|
const {
|
|
@@ -109185,12 +109649,12 @@
|
|
|
109185
109649
|
const EMPTY_OPTION$3 = '';
|
|
109186
109650
|
const CREATE_NEW_OPTION$2 = 'create-new';
|
|
109187
109651
|
|
|
109188
|
-
/**
|
|
109189
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109652
|
+
/**
|
|
109653
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109190
109654
|
*/
|
|
109191
109655
|
|
|
109192
|
-
/**
|
|
109193
|
-
* @returns {Array<Entry>} entries
|
|
109656
|
+
/**
|
|
109657
|
+
* @returns {Array<Entry>} entries
|
|
109194
109658
|
*/
|
|
109195
109659
|
function MessageProps$1(props) {
|
|
109196
109660
|
const {
|
|
@@ -109333,12 +109797,12 @@
|
|
|
109333
109797
|
return sortBy(elements, e => (e.name || '').toLowerCase());
|
|
109334
109798
|
}
|
|
109335
109799
|
|
|
109336
|
-
/**
|
|
109337
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109800
|
+
/**
|
|
109801
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109338
109802
|
*/
|
|
109339
109803
|
|
|
109340
|
-
/**
|
|
109341
|
-
* @returns {Array<Entry>} entries
|
|
109804
|
+
/**
|
|
109805
|
+
* @returns {Array<Entry>} entries
|
|
109342
109806
|
*/
|
|
109343
109807
|
function MultiInstanceProps$2(props) {
|
|
109344
109808
|
const {
|
|
@@ -109409,45 +109873,45 @@
|
|
|
109409
109873
|
|
|
109410
109874
|
// generic ///////////////////////////
|
|
109411
109875
|
|
|
109412
|
-
/**
|
|
109413
|
-
* isMultiInstanceSupported - check whether given element supports MultiInstanceLoopCharacteristics.
|
|
109414
|
-
*
|
|
109415
|
-
* @param {djs.model.Base} element
|
|
109416
|
-
* @return {boolean}
|
|
109876
|
+
/**
|
|
109877
|
+
* isMultiInstanceSupported - check whether given element supports MultiInstanceLoopCharacteristics.
|
|
109878
|
+
*
|
|
109879
|
+
* @param {djs.model.Base} element
|
|
109880
|
+
* @return {boolean}
|
|
109417
109881
|
*/
|
|
109418
109882
|
function isMultiInstanceSupported$1(element) {
|
|
109419
109883
|
const loopCharacteristics = getLoopCharacteristics$2(element);
|
|
109420
109884
|
return !!loopCharacteristics && is(loopCharacteristics, 'bpmn:MultiInstanceLoopCharacteristics');
|
|
109421
109885
|
}
|
|
109422
109886
|
|
|
109423
|
-
/**
|
|
109424
|
-
* getBody - get the body of a given expression.
|
|
109425
|
-
*
|
|
109426
|
-
* @param {ModdleElement<bpmn:FormalExpression>} expression
|
|
109427
|
-
* @return {string} the body (value) of the expression
|
|
109887
|
+
/**
|
|
109888
|
+
* getBody - get the body of a given expression.
|
|
109889
|
+
*
|
|
109890
|
+
* @param {ModdleElement<bpmn:FormalExpression>} expression
|
|
109891
|
+
* @return {string} the body (value) of the expression
|
|
109428
109892
|
*/
|
|
109429
109893
|
function getBody(expression) {
|
|
109430
109894
|
return expression && expression.get('body');
|
|
109431
109895
|
}
|
|
109432
109896
|
|
|
109433
|
-
/**
|
|
109434
|
-
* getProperty - get a property value of the loop characteristics.
|
|
109435
|
-
*
|
|
109436
|
-
* @param {djs.model.Base} element
|
|
109437
|
-
* @param {string} propertyName
|
|
109438
|
-
*
|
|
109439
|
-
* @return {any} the property value
|
|
109897
|
+
/**
|
|
109898
|
+
* getProperty - get a property value of the loop characteristics.
|
|
109899
|
+
*
|
|
109900
|
+
* @param {djs.model.Base} element
|
|
109901
|
+
* @param {string} propertyName
|
|
109902
|
+
*
|
|
109903
|
+
* @return {any} the property value
|
|
109440
109904
|
*/
|
|
109441
109905
|
function getProperty$3(element, propertyName) {
|
|
109442
109906
|
const loopCharacteristics = getLoopCharacteristics$2(element);
|
|
109443
109907
|
return loopCharacteristics && loopCharacteristics.get(propertyName);
|
|
109444
109908
|
}
|
|
109445
109909
|
|
|
109446
|
-
/**
|
|
109447
|
-
* getLoopCharacteristics - get loopCharacteristics of a given element.
|
|
109448
|
-
*
|
|
109449
|
-
* @param {djs.model.Base} element
|
|
109450
|
-
* @return {ModdleElement<bpmn:MultiInstanceLoopCharacteristics> | undefined}
|
|
109910
|
+
/**
|
|
109911
|
+
* getLoopCharacteristics - get loopCharacteristics of a given element.
|
|
109912
|
+
*
|
|
109913
|
+
* @param {djs.model.Base} element
|
|
109914
|
+
* @return {ModdleElement<bpmn:MultiInstanceLoopCharacteristics> | undefined}
|
|
109451
109915
|
*/
|
|
109452
109916
|
function getLoopCharacteristics$2(element) {
|
|
109453
109917
|
const bo = getBusinessObject(element);
|
|
@@ -109456,23 +109920,23 @@
|
|
|
109456
109920
|
|
|
109457
109921
|
// loopCardinality
|
|
109458
109922
|
|
|
109459
|
-
/**
|
|
109460
|
-
* getLoopCardinality - get the loop cardinality of the loop characteristics.
|
|
109461
|
-
*
|
|
109462
|
-
* @param {djs.model.Base} element
|
|
109463
|
-
*
|
|
109464
|
-
* @return {ModdleElement<bpmn:FormalExpression>} an expression representing the loop cardinality
|
|
109923
|
+
/**
|
|
109924
|
+
* getLoopCardinality - get the loop cardinality of the loop characteristics.
|
|
109925
|
+
*
|
|
109926
|
+
* @param {djs.model.Base} element
|
|
109927
|
+
*
|
|
109928
|
+
* @return {ModdleElement<bpmn:FormalExpression>} an expression representing the loop cardinality
|
|
109465
109929
|
*/
|
|
109466
109930
|
function getLoopCardinality(element) {
|
|
109467
109931
|
return getProperty$3(element, 'loopCardinality');
|
|
109468
109932
|
}
|
|
109469
109933
|
|
|
109470
|
-
/**
|
|
109471
|
-
* getLoopCardinalityValue - get the loop cardinality value of the loop characteristics.
|
|
109472
|
-
*
|
|
109473
|
-
* @param {djs.model.Base} element
|
|
109474
|
-
*
|
|
109475
|
-
* @return {string} the loop cardinality value
|
|
109934
|
+
/**
|
|
109935
|
+
* getLoopCardinalityValue - get the loop cardinality value of the loop characteristics.
|
|
109936
|
+
*
|
|
109937
|
+
* @param {djs.model.Base} element
|
|
109938
|
+
*
|
|
109939
|
+
* @return {string} the loop cardinality value
|
|
109476
109940
|
*/
|
|
109477
109941
|
function getLoopCardinalityValue(element) {
|
|
109478
109942
|
const loopCardinality = getLoopCardinality(element);
|
|
@@ -109481,35 +109945,35 @@
|
|
|
109481
109945
|
|
|
109482
109946
|
// completionCondition /////////////////////
|
|
109483
109947
|
|
|
109484
|
-
/**
|
|
109485
|
-
* getCompletionCondition - get the completion condition of the loop characteristics.
|
|
109486
|
-
*
|
|
109487
|
-
* @param {djs.model.Base} element
|
|
109488
|
-
*
|
|
109489
|
-
* @return {ModdleElement<bpmn:FormalExpression>} an expression representing the completion condition
|
|
109948
|
+
/**
|
|
109949
|
+
* getCompletionCondition - get the completion condition of the loop characteristics.
|
|
109950
|
+
*
|
|
109951
|
+
* @param {djs.model.Base} element
|
|
109952
|
+
*
|
|
109953
|
+
* @return {ModdleElement<bpmn:FormalExpression>} an expression representing the completion condition
|
|
109490
109954
|
*/
|
|
109491
109955
|
function getCompletionCondition$1(element) {
|
|
109492
109956
|
return getProperty$3(element, 'completionCondition');
|
|
109493
109957
|
}
|
|
109494
109958
|
|
|
109495
|
-
/**
|
|
109496
|
-
* getCompletionConditionValue - get the completion condition value of the loop characteristics.
|
|
109497
|
-
*
|
|
109498
|
-
* @param {djs.model.Base} element
|
|
109499
|
-
*
|
|
109500
|
-
* @return {string} the completion condition value
|
|
109959
|
+
/**
|
|
109960
|
+
* getCompletionConditionValue - get the completion condition value of the loop characteristics.
|
|
109961
|
+
*
|
|
109962
|
+
* @param {djs.model.Base} element
|
|
109963
|
+
*
|
|
109964
|
+
* @return {string} the completion condition value
|
|
109501
109965
|
*/
|
|
109502
109966
|
function getCompletionConditionValue(element) {
|
|
109503
109967
|
const completionCondition = getCompletionCondition$1(element);
|
|
109504
109968
|
return getBody(completionCondition);
|
|
109505
109969
|
}
|
|
109506
109970
|
|
|
109507
|
-
/**
|
|
109508
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109971
|
+
/**
|
|
109972
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109509
109973
|
*/
|
|
109510
109974
|
|
|
109511
|
-
/**
|
|
109512
|
-
* @returns {Array<Entry>} entries
|
|
109975
|
+
/**
|
|
109976
|
+
* @returns {Array<Entry>} entries
|
|
109513
109977
|
*/
|
|
109514
109978
|
function NameProps(props) {
|
|
109515
109979
|
const {
|
|
@@ -109613,12 +110077,12 @@
|
|
|
109613
110077
|
return categoryValue;
|
|
109614
110078
|
}
|
|
109615
110079
|
|
|
109616
|
-
/**
|
|
109617
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
110080
|
+
/**
|
|
110081
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109618
110082
|
*/
|
|
109619
110083
|
|
|
109620
|
-
/**
|
|
109621
|
-
* @returns {Array<Entry>} entries
|
|
110084
|
+
/**
|
|
110085
|
+
* @returns {Array<Entry>} entries
|
|
109622
110086
|
*/
|
|
109623
110087
|
function ProcessProps$1(props) {
|
|
109624
110088
|
const {
|
|
@@ -109709,15 +110173,15 @@
|
|
|
109709
110173
|
return is(element, 'bpmn:Participant') && element.businessObject.get('processRef');
|
|
109710
110174
|
}
|
|
109711
110175
|
|
|
109712
|
-
/**
|
|
109713
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
110176
|
+
/**
|
|
110177
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
109714
110178
|
*/
|
|
109715
110179
|
|
|
109716
110180
|
const EMPTY_OPTION$2 = '';
|
|
109717
110181
|
const CREATE_NEW_OPTION$1 = 'create-new';
|
|
109718
110182
|
|
|
109719
|
-
/**
|
|
109720
|
-
* @returns {Entry[]}
|
|
110183
|
+
/**
|
|
110184
|
+
* @returns {Entry[]}
|
|
109721
110185
|
*/
|
|
109722
110186
|
function SignalProps$1(props) {
|
|
109723
110187
|
const {
|
|
@@ -109863,12 +110327,12 @@
|
|
|
109863
110327
|
return isAny(element, ['bpmn:StartEvent', 'bpmn:IntermediateCatchEvent', 'bpmn:BoundaryEvent']) && !!getTimerEventDefinition(element);
|
|
109864
110328
|
}
|
|
109865
110329
|
|
|
109866
|
-
/**
|
|
109867
|
-
* Get the timer definition type for a given timer event definition.
|
|
109868
|
-
*
|
|
109869
|
-
* @param {ModdleElement<bpmn:TimerEventDefinition>} timer
|
|
109870
|
-
*
|
|
109871
|
-
* @return {string|undefined} the timer definition type
|
|
110330
|
+
/**
|
|
110331
|
+
* Get the timer definition type for a given timer event definition.
|
|
110332
|
+
*
|
|
110333
|
+
* @param {ModdleElement<bpmn:TimerEventDefinition>} timer
|
|
110334
|
+
*
|
|
110335
|
+
* @return {string|undefined} the timer definition type
|
|
109872
110336
|
*/
|
|
109873
110337
|
function getTimerDefinitionType(timer) {
|
|
109874
110338
|
if (!timer) {
|
|
@@ -109938,12 +110402,12 @@
|
|
|
109938
110402
|
return entries;
|
|
109939
110403
|
}
|
|
109940
110404
|
|
|
109941
|
-
/**
|
|
109942
|
-
* TimerEventDefinitionType - Generic select entry allowing to select a specific
|
|
109943
|
-
* timerEventDefintionType. To be used together with timerEventDefinitionValue.
|
|
109944
|
-
*
|
|
109945
|
-
* @param {type} props
|
|
109946
|
-
* @return {SelectEntry}
|
|
110405
|
+
/**
|
|
110406
|
+
* TimerEventDefinitionType - Generic select entry allowing to select a specific
|
|
110407
|
+
* timerEventDefintionType. To be used together with timerEventDefinitionValue.
|
|
110408
|
+
*
|
|
110409
|
+
* @param {type} props
|
|
110410
|
+
* @return {SelectEntry}
|
|
109947
110411
|
*/
|
|
109948
110412
|
function TimerEventDefinitionType$2(props) {
|
|
109949
110413
|
const {
|
|
@@ -110011,13 +110475,13 @@
|
|
|
110011
110475
|
});
|
|
110012
110476
|
}
|
|
110013
110477
|
|
|
110014
|
-
/**
|
|
110015
|
-
* TimerEventDefinitionValue - Generic textField entry allowing to specify the
|
|
110016
|
-
* timerEventDefintionValue based on the set timerEventDefintionType. To be used
|
|
110017
|
-
* together with timerEventDefinitionType.
|
|
110018
|
-
*
|
|
110019
|
-
* @param {type} props
|
|
110020
|
-
* @return {TextFieldEntry}
|
|
110478
|
+
/**
|
|
110479
|
+
* TimerEventDefinitionValue - Generic textField entry allowing to specify the
|
|
110480
|
+
* timerEventDefintionValue based on the set timerEventDefintionType. To be used
|
|
110481
|
+
* together with timerEventDefinitionType.
|
|
110482
|
+
*
|
|
110483
|
+
* @param {type} props
|
|
110484
|
+
* @return {TextFieldEntry}
|
|
110021
110485
|
*/
|
|
110022
110486
|
function TimerEventDefinitionValue$2(props) {
|
|
110023
110487
|
const {
|