camunda-bpmn-js 5.6.0 → 5.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/properties-panel.css +1521 -1517
- package/dist/base-modeler.development.js +367 -371
- package/dist/base-modeler.production.min.js +35 -35
- package/dist/camunda-cloud-modeler.development.js +570 -513
- package/dist/camunda-cloud-modeler.production.min.js +37 -37
- package/dist/camunda-platform-modeler.development.js +527 -531
- package/dist/camunda-platform-modeler.production.min.js +35 -35
- package/package.json +6 -6
|
@@ -40735,6 +40735,7 @@
|
|
|
40735
40735
|
|
|
40736
40736
|
if (
|
|
40737
40737
|
!is$5(newShape, 'bpmn:SubProcess') ||
|
|
40738
|
+
is$5(newShape,'bpmn:AdHocSubProcess') ||
|
|
40738
40739
|
! (is$5(oldShape, 'bpmn:Task') || is$5(oldShape, 'bpmn:CallActivity')) ||
|
|
40739
40740
|
!isExpanded$1(newShape)
|
|
40740
40741
|
) {
|
|
@@ -46255,6 +46256,7 @@
|
|
|
46255
46256
|
|
|
46256
46257
|
/**
|
|
46257
46258
|
* @typedef {import('didi').Injector} Injector
|
|
46259
|
+
* @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
|
|
46258
46260
|
*
|
|
46259
46261
|
* @typedef {import('../../model/Types').Shape} Shape
|
|
46260
46262
|
*
|
|
@@ -46264,13 +46266,17 @@
|
|
|
46264
46266
|
|
|
46265
46267
|
/**
|
|
46266
46268
|
* @param {Injector} injector
|
|
46269
|
+
* @param {Canvas} canvas
|
|
46267
46270
|
*/
|
|
46268
|
-
function BpmnSpaceTool(injector) {
|
|
46271
|
+
function BpmnSpaceTool(injector, canvas) {
|
|
46269
46272
|
injector.invoke(SpaceTool, this);
|
|
46273
|
+
|
|
46274
|
+
this._canvas = canvas;
|
|
46270
46275
|
}
|
|
46271
46276
|
|
|
46272
46277
|
BpmnSpaceTool.$inject = [
|
|
46273
|
-
'injector'
|
|
46278
|
+
'injector',
|
|
46279
|
+
'canvas'
|
|
46274
46280
|
];
|
|
46275
46281
|
|
|
46276
46282
|
e$7(BpmnSpaceTool, SpaceTool);
|
|
@@ -46284,7 +46290,26 @@
|
|
|
46284
46290
|
* @return {Object}
|
|
46285
46291
|
*/
|
|
46286
46292
|
BpmnSpaceTool.prototype.calculateAdjustments = function(elements, axis, delta, start) {
|
|
46287
|
-
|
|
46293
|
+
|
|
46294
|
+
var canvasRoot = this._canvas.getRootElement(),
|
|
46295
|
+
spaceRoot = elements[0] === canvasRoot ? null : elements[0],
|
|
46296
|
+
enclosedArtifacts = [];
|
|
46297
|
+
|
|
46298
|
+
// ensure
|
|
46299
|
+
if (spaceRoot) {
|
|
46300
|
+
enclosedArtifacts = values(
|
|
46301
|
+
getEnclosedElements(
|
|
46302
|
+
canvasRoot.children.filter(
|
|
46303
|
+
(child) => is$5(child, 'bpmn:Artifact')
|
|
46304
|
+
),
|
|
46305
|
+
getBBox(spaceRoot)
|
|
46306
|
+
)
|
|
46307
|
+
);
|
|
46308
|
+
}
|
|
46309
|
+
|
|
46310
|
+
const elementsToMove = [ ...elements, ...enclosedArtifacts ];
|
|
46311
|
+
|
|
46312
|
+
var adjustments = SpaceTool.prototype.calculateAdjustments.call(this, elementsToMove, axis, delta, start);
|
|
46288
46313
|
|
|
46289
46314
|
// do not resize:
|
|
46290
46315
|
//
|
|
@@ -61627,6 +61652,7 @@
|
|
|
61627
61652
|
*/
|
|
61628
61653
|
|
|
61629
61654
|
var COLLAB_ERR_MSG = 'flow elements must be children of pools/participants';
|
|
61655
|
+
var DATA_OBJECT_ERR_MSG = 'Data object must be placed within a pool/participant.';
|
|
61630
61656
|
|
|
61631
61657
|
/**
|
|
61632
61658
|
* @param {EventBus} eventBus
|
|
@@ -61652,8 +61678,12 @@
|
|
|
61652
61678
|
shape = context.shape,
|
|
61653
61679
|
target = context.target;
|
|
61654
61680
|
|
|
61655
|
-
if (is$5(target, 'bpmn:Collaboration')
|
|
61656
|
-
|
|
61681
|
+
if (is$5(target, 'bpmn:Collaboration')) {
|
|
61682
|
+
if (is$5(shape, 'bpmn:FlowNode')) {
|
|
61683
|
+
showError(event, translate(COLLAB_ERR_MSG));
|
|
61684
|
+
} else if (is$5(shape, 'bpmn:DataObjectReference')) {
|
|
61685
|
+
showError(event, translate(DATA_OBJECT_ERR_MSG));
|
|
61686
|
+
}
|
|
61657
61687
|
}
|
|
61658
61688
|
});
|
|
61659
61689
|
|
|
@@ -109407,19 +109437,19 @@
|
|
|
109407
109437
|
errors: {}
|
|
109408
109438
|
});
|
|
109409
109439
|
|
|
109410
|
-
/**
|
|
109411
|
-
* @typedef {Function} <propertiesPanel.showEntry> callback
|
|
109412
|
-
*
|
|
109413
|
-
* @example
|
|
109414
|
-
*
|
|
109415
|
-
* useEvent('propertiesPanel.showEntry', ({ focus = false, ...rest }) => {
|
|
109416
|
-
* // ...
|
|
109417
|
-
* });
|
|
109418
|
-
*
|
|
109419
|
-
* @param {Object} context
|
|
109420
|
-
* @param {boolean} [context.focus]
|
|
109421
|
-
*
|
|
109422
|
-
* @returns void
|
|
109440
|
+
/**
|
|
109441
|
+
* @typedef {Function} <propertiesPanel.showEntry> callback
|
|
109442
|
+
*
|
|
109443
|
+
* @example
|
|
109444
|
+
*
|
|
109445
|
+
* useEvent('propertiesPanel.showEntry', ({ focus = false, ...rest }) => {
|
|
109446
|
+
* // ...
|
|
109447
|
+
* });
|
|
109448
|
+
*
|
|
109449
|
+
* @param {Object} context
|
|
109450
|
+
* @param {boolean} [context.focus]
|
|
109451
|
+
*
|
|
109452
|
+
* @returns void
|
|
109423
109453
|
*/
|
|
109424
109454
|
|
|
109425
109455
|
const EventContext = F$3({
|
|
@@ -109438,20 +109468,20 @@
|
|
|
109438
109468
|
getTooltipForId: () => {}
|
|
109439
109469
|
});
|
|
109440
109470
|
|
|
109441
|
-
/**
|
|
109442
|
-
* Accesses the global TooltipContext and returns a tooltip for a given id and element.
|
|
109443
|
-
*
|
|
109444
|
-
* @example
|
|
109445
|
-
* ```jsx
|
|
109446
|
-
* function TextField(props) {
|
|
109447
|
-
* const tooltip = useTooltipContext('input1', element);
|
|
109448
|
-
* }
|
|
109449
|
-
* ```
|
|
109450
|
-
*
|
|
109451
|
-
* @param {string} id
|
|
109452
|
-
* @param {object} element
|
|
109453
|
-
*
|
|
109454
|
-
* @returns {string}
|
|
109471
|
+
/**
|
|
109472
|
+
* Accesses the global TooltipContext and returns a tooltip for a given id and element.
|
|
109473
|
+
*
|
|
109474
|
+
* @example
|
|
109475
|
+
* ```jsx
|
|
109476
|
+
* function TextField(props) {
|
|
109477
|
+
* const tooltip = useTooltipContext('input1', element);
|
|
109478
|
+
* }
|
|
109479
|
+
* ```
|
|
109480
|
+
*
|
|
109481
|
+
* @param {string} id
|
|
109482
|
+
* @param {object} element
|
|
109483
|
+
*
|
|
109484
|
+
* @returns {string}
|
|
109455
109485
|
*/
|
|
109456
109486
|
function useTooltipContext(id, element) {
|
|
109457
109487
|
const {
|
|
@@ -109473,7 +109503,7 @@
|
|
|
109473
109503
|
return u(Tooltip, {
|
|
109474
109504
|
...props,
|
|
109475
109505
|
value: value,
|
|
109476
|
-
forId:
|
|
109506
|
+
forId: `bio-properties-panel-${forId}`
|
|
109477
109507
|
});
|
|
109478
109508
|
}
|
|
109479
109509
|
function Tooltip(props) {
|
|
@@ -109484,71 +109514,52 @@
|
|
|
109484
109514
|
direction = 'right',
|
|
109485
109515
|
position
|
|
109486
109516
|
} = props;
|
|
109487
|
-
const [visible,
|
|
109488
|
-
|
|
109517
|
+
const [visible, setVisible] = h(false);
|
|
109518
|
+
|
|
109519
|
+
// Tooltip will be shown after SHOW_DELAY ms from hovering over the source element.
|
|
109520
|
+
const SHOW_DELAY = 200;
|
|
109489
109521
|
let timeout = null;
|
|
109490
109522
|
const wrapperRef = _$1(null);
|
|
109491
109523
|
const tooltipRef = _$1(null);
|
|
109492
|
-
const
|
|
109493
|
-
|
|
109494
|
-
if (
|
|
109495
|
-
|
|
109496
|
-
|
|
109497
|
-
}
|
|
109498
|
-
|
|
109499
|
-
|
|
109500
|
-
}
|
|
109524
|
+
const show = (_, delay) => {
|
|
109525
|
+
if (visible) return;
|
|
109526
|
+
if (delay) {
|
|
109527
|
+
timeout = setTimeout(() => {
|
|
109528
|
+
setVisible(true);
|
|
109529
|
+
}, SHOW_DELAY);
|
|
109530
|
+
} else {
|
|
109531
|
+
setVisible(true);
|
|
109501
109532
|
}
|
|
109502
109533
|
};
|
|
109503
|
-
const
|
|
109504
|
-
|
|
109505
|
-
|
|
109534
|
+
const hide = () => {
|
|
109535
|
+
clearTimeout(timeout);
|
|
109536
|
+
setVisible(false);
|
|
109506
109537
|
};
|
|
109507
|
-
const
|
|
109508
|
-
|
|
109509
|
-
};
|
|
109510
|
-
const isTooltipHovered = ({
|
|
109511
|
-
x,
|
|
109512
|
-
y
|
|
109538
|
+
const handleMouseLeave = ({
|
|
109539
|
+
relatedTarget
|
|
109513
109540
|
}) => {
|
|
109514
|
-
|
|
109515
|
-
|
|
109516
|
-
|
|
109541
|
+
// Don't hide the tooltip when moving mouse between the wrapper and the tooltip.
|
|
109542
|
+
if (relatedTarget === wrapperRef.current || relatedTarget === tooltipRef.current || relatedTarget?.parentElement === tooltipRef.current) {
|
|
109543
|
+
return;
|
|
109544
|
+
}
|
|
109545
|
+
hide();
|
|
109517
109546
|
};
|
|
109518
|
-
|
|
109547
|
+
const handleFocusOut = e => {
|
|
109519
109548
|
const {
|
|
109520
|
-
|
|
109521
|
-
} =
|
|
109522
|
-
|
|
109549
|
+
target
|
|
109550
|
+
} = e;
|
|
109551
|
+
|
|
109552
|
+
// Don't hide the tooltip if the wrapper or the tooltip itself is clicked.
|
|
109553
|
+
const isHovered = target.matches(':hover') || tooltipRef.current?.matches(':hover');
|
|
109554
|
+
if (target === wrapperRef.current && isHovered) {
|
|
109555
|
+
e.stopPropagation();
|
|
109523
109556
|
return;
|
|
109524
109557
|
}
|
|
109525
|
-
|
|
109526
|
-
|
|
109527
|
-
|
|
109528
|
-
|
|
109529
|
-
|
|
109530
|
-
}) && !(isFocused && focusedViaKeyboard)) {
|
|
109531
|
-
hideTooltip();
|
|
109532
|
-
}
|
|
109533
|
-
};
|
|
109534
|
-
const hideFocusedTooltip = e => {
|
|
109535
|
-
const {
|
|
109536
|
-
relatedTarget
|
|
109537
|
-
} = e;
|
|
109538
|
-
const isTooltipChild = el => !!el.closest('.bio-properties-panel-tooltip');
|
|
109539
|
-
if (visible && !isHovered(wrapperRef.current) && relatedTarget && !isTooltipChild(relatedTarget)) {
|
|
109540
|
-
hideTooltip();
|
|
109541
|
-
}
|
|
109542
|
-
};
|
|
109543
|
-
document.addEventListener('wheel', hideHoveredTooltip);
|
|
109544
|
-
document.addEventListener('focusout', hideFocusedTooltip);
|
|
109545
|
-
document.addEventListener('mousemove', hideHoveredTooltip);
|
|
109546
|
-
return () => {
|
|
109547
|
-
document.removeEventListener('wheel', hideHoveredTooltip);
|
|
109548
|
-
document.removeEventListener('mousemove', hideHoveredTooltip);
|
|
109549
|
-
document.removeEventListener('focusout', hideFocusedTooltip);
|
|
109550
|
-
};
|
|
109551
|
-
}, [wrapperRef.current, visible, focusedViaKeyboard]);
|
|
109558
|
+
hide();
|
|
109559
|
+
};
|
|
109560
|
+
const hideTooltipViaEscape = e => {
|
|
109561
|
+
e.code === 'Escape' && hide();
|
|
109562
|
+
};
|
|
109552
109563
|
const renderTooltip = () => {
|
|
109553
109564
|
return u("div", {
|
|
109554
109565
|
class: `bio-properties-panel-tooltip ${direction}`,
|
|
@@ -109558,6 +109569,7 @@
|
|
|
109558
109569
|
style: position || getTooltipPosition(wrapperRef.current),
|
|
109559
109570
|
ref: tooltipRef,
|
|
109560
109571
|
onClick: e => e.stopPropagation(),
|
|
109572
|
+
onMouseLeave: handleMouseLeave,
|
|
109561
109573
|
children: [u("div", {
|
|
109562
109574
|
class: "bio-properties-panel-tooltip-content",
|
|
109563
109575
|
children: value
|
|
@@ -109570,54 +109582,38 @@
|
|
|
109570
109582
|
class: "bio-properties-panel-tooltip-wrapper",
|
|
109571
109583
|
tabIndex: "0",
|
|
109572
109584
|
ref: wrapperRef,
|
|
109573
|
-
onMouseEnter:
|
|
109574
|
-
onMouseLeave:
|
|
109575
|
-
|
|
109576
|
-
|
|
109577
|
-
},
|
|
109578
|
-
onFocus: showTooltip,
|
|
109585
|
+
onMouseEnter: e => show(e, true),
|
|
109586
|
+
onMouseLeave: handleMouseLeave,
|
|
109587
|
+
onFocus: show,
|
|
109588
|
+
onBlur: handleFocusOut,
|
|
109579
109589
|
onKeyDown: hideTooltipViaEscape,
|
|
109580
109590
|
children: [props.children, visible ? parent ? j(renderTooltip(), parent.current) : renderTooltip() : null]
|
|
109581
109591
|
});
|
|
109582
109592
|
}
|
|
109583
109593
|
|
|
109584
109594
|
// helper
|
|
109585
|
-
|
|
109586
|
-
const {
|
|
109587
|
-
top,
|
|
109588
|
-
right,
|
|
109589
|
-
bottom,
|
|
109590
|
-
left
|
|
109591
|
-
} = bounds;
|
|
109592
|
-
return x >= left && x <= right && y >= top && y <= bottom;
|
|
109593
|
-
}
|
|
109595
|
+
|
|
109594
109596
|
function getTooltipPosition(refElement) {
|
|
109595
109597
|
const refPosition = refElement.getBoundingClientRect();
|
|
109596
109598
|
const right = `calc(100% - ${refPosition.x}px)`;
|
|
109597
109599
|
const top = `${refPosition.top - 10}px`;
|
|
109598
109600
|
return `right: ${right}; top: ${top};`;
|
|
109599
109601
|
}
|
|
109600
|
-
function isHovered(element) {
|
|
109601
|
-
return element.matches(':hover');
|
|
109602
|
-
}
|
|
109603
|
-
function prefixId$9(id) {
|
|
109604
|
-
return `bio-properties-panel-${id}`;
|
|
109605
|
-
}
|
|
109606
109602
|
|
|
109607
|
-
/**
|
|
109608
|
-
* Accesses the global DescriptionContext and returns a description for a given id and element.
|
|
109609
|
-
*
|
|
109610
|
-
* @example
|
|
109611
|
-
* ```jsx
|
|
109612
|
-
* function TextField(props) {
|
|
109613
|
-
* const description = useDescriptionContext('input1', element);
|
|
109614
|
-
* }
|
|
109615
|
-
* ```
|
|
109616
|
-
*
|
|
109617
|
-
* @param {string} id
|
|
109618
|
-
* @param {object} element
|
|
109619
|
-
*
|
|
109620
|
-
* @returns {string}
|
|
109603
|
+
/**
|
|
109604
|
+
* Accesses the global DescriptionContext and returns a description for a given id and element.
|
|
109605
|
+
*
|
|
109606
|
+
* @example
|
|
109607
|
+
* ```jsx
|
|
109608
|
+
* function TextField(props) {
|
|
109609
|
+
* const description = useDescriptionContext('input1', element);
|
|
109610
|
+
* }
|
|
109611
|
+
* ```
|
|
109612
|
+
*
|
|
109613
|
+
* @param {string} id
|
|
109614
|
+
* @param {object} element
|
|
109615
|
+
*
|
|
109616
|
+
* @returns {string}
|
|
109621
109617
|
*/
|
|
109622
109618
|
function useDescriptionContext(id, element) {
|
|
109623
109619
|
const {
|
|
@@ -109639,11 +109635,11 @@
|
|
|
109639
109635
|
return errors;
|
|
109640
109636
|
}
|
|
109641
109637
|
|
|
109642
|
-
/**
|
|
109643
|
-
* Subscribe to an event immediately. Update subscription after inputs changed.
|
|
109644
|
-
*
|
|
109645
|
-
* @param {string} event
|
|
109646
|
-
* @param {Function} callback
|
|
109638
|
+
/**
|
|
109639
|
+
* Subscribe to an event immediately. Update subscription after inputs changed.
|
|
109640
|
+
*
|
|
109641
|
+
* @param {string} event
|
|
109642
|
+
* @param {Function} callback
|
|
109647
109643
|
*/
|
|
109648
109644
|
function useEvent(event, callback, eventBus) {
|
|
109649
109645
|
const eventContext = q$1(EventContext);
|
|
@@ -109673,20 +109669,20 @@
|
|
|
109673
109669
|
}, [callback, event, eventBus]);
|
|
109674
109670
|
}
|
|
109675
109671
|
|
|
109676
|
-
/**
|
|
109677
|
-
* Creates a state that persists in the global LayoutContext.
|
|
109678
|
-
*
|
|
109679
|
-
* @example
|
|
109680
|
-
* ```jsx
|
|
109681
|
-
* function Group(props) {
|
|
109682
|
-
* const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
|
|
109683
|
-
* }
|
|
109684
|
-
* ```
|
|
109685
|
-
*
|
|
109686
|
-
* @param {(string|number)[]} path
|
|
109687
|
-
* @param {any} [defaultValue]
|
|
109688
|
-
*
|
|
109689
|
-
* @returns {[ any, Function ]}
|
|
109672
|
+
/**
|
|
109673
|
+
* Creates a state that persists in the global LayoutContext.
|
|
109674
|
+
*
|
|
109675
|
+
* @example
|
|
109676
|
+
* ```jsx
|
|
109677
|
+
* function Group(props) {
|
|
109678
|
+
* const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
|
|
109679
|
+
* }
|
|
109680
|
+
* ```
|
|
109681
|
+
*
|
|
109682
|
+
* @param {(string|number)[]} path
|
|
109683
|
+
* @param {any} [defaultValue]
|
|
109684
|
+
*
|
|
109685
|
+
* @returns {[ any, Function ]}
|
|
109690
109686
|
*/
|
|
109691
109687
|
function useLayoutState(path, defaultValue) {
|
|
109692
109688
|
const {
|
|
@@ -109700,11 +109696,11 @@
|
|
|
109700
109696
|
return [layoutForKey, setState];
|
|
109701
109697
|
}
|
|
109702
109698
|
|
|
109703
|
-
/**
|
|
109704
|
-
* @pinussilvestrus: we need to introduce our own hook to persist the previous
|
|
109705
|
-
* state on updates.
|
|
109706
|
-
*
|
|
109707
|
-
* cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
|
|
109699
|
+
/**
|
|
109700
|
+
* @pinussilvestrus: we need to introduce our own hook to persist the previous
|
|
109701
|
+
* state on updates.
|
|
109702
|
+
*
|
|
109703
|
+
* cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
|
|
109708
109704
|
*/
|
|
109709
109705
|
|
|
109710
109706
|
function usePrevious$1(value) {
|
|
@@ -109715,12 +109711,12 @@
|
|
|
109715
109711
|
return ref.current;
|
|
109716
109712
|
}
|
|
109717
109713
|
|
|
109718
|
-
/**
|
|
109719
|
-
* Subscribe to `propertiesPanel.showEntry`.
|
|
109720
|
-
*
|
|
109721
|
-
* @param {string} id
|
|
109722
|
-
*
|
|
109723
|
-
* @returns {import('preact').Ref}
|
|
109714
|
+
/**
|
|
109715
|
+
* Subscribe to `propertiesPanel.showEntry`.
|
|
109716
|
+
*
|
|
109717
|
+
* @param {string} id
|
|
109718
|
+
*
|
|
109719
|
+
* @returns {import('preact').Ref}
|
|
109724
109720
|
*/
|
|
109725
109721
|
function useShowEntryEvent(id) {
|
|
109726
109722
|
const {
|
|
@@ -109751,20 +109747,20 @@
|
|
|
109751
109747
|
return ref;
|
|
109752
109748
|
}
|
|
109753
109749
|
|
|
109754
|
-
/**
|
|
109755
|
-
* @callback setSticky
|
|
109756
|
-
* @param {boolean} value
|
|
109750
|
+
/**
|
|
109751
|
+
* @callback setSticky
|
|
109752
|
+
* @param {boolean} value
|
|
109757
109753
|
*/
|
|
109758
109754
|
|
|
109759
|
-
/**
|
|
109760
|
-
* Use IntersectionObserver to identify when DOM element is in sticky mode.
|
|
109761
|
-
* If sticky is observered setSticky(true) will be called.
|
|
109762
|
-
* If sticky mode is left, setSticky(false) will be called.
|
|
109763
|
-
*
|
|
109764
|
-
*
|
|
109765
|
-
* @param {Object} ref
|
|
109766
|
-
* @param {string} scrollContainerSelector
|
|
109767
|
-
* @param {setSticky} setSticky
|
|
109755
|
+
/**
|
|
109756
|
+
* Use IntersectionObserver to identify when DOM element is in sticky mode.
|
|
109757
|
+
* If sticky is observered setSticky(true) will be called.
|
|
109758
|
+
* If sticky mode is left, setSticky(false) will be called.
|
|
109759
|
+
*
|
|
109760
|
+
*
|
|
109761
|
+
* @param {Object} ref
|
|
109762
|
+
* @param {string} scrollContainerSelector
|
|
109763
|
+
* @param {setSticky} setSticky
|
|
109768
109764
|
*/
|
|
109769
109765
|
function useStickyIntersectionObserver(ref, scrollContainerSelector, setSticky) {
|
|
109770
109766
|
const [scrollContainer, setScrollContainer] = h(query$1(scrollContainerSelector));
|
|
@@ -109818,19 +109814,19 @@
|
|
|
109818
109814
|
}, [ref.current, scrollContainer, setSticky]);
|
|
109819
109815
|
}
|
|
109820
109816
|
|
|
109821
|
-
/**
|
|
109822
|
-
* Creates a static function reference with changing body.
|
|
109823
|
-
* This is necessary when external libraries require a callback function
|
|
109824
|
-
* that has references to state variables.
|
|
109825
|
-
*
|
|
109826
|
-
* Usage:
|
|
109827
|
-
* const callback = useStaticCallback((val) => {val === currentState});
|
|
109828
|
-
*
|
|
109829
|
-
* The `callback` reference is static and can be safely used in external
|
|
109830
|
-
* libraries or as a prop that does not cause rerendering of children.
|
|
109831
|
-
*
|
|
109832
|
-
* @param {Function} callback function with changing reference
|
|
109833
|
-
* @returns {Function} static function reference
|
|
109817
|
+
/**
|
|
109818
|
+
* Creates a static function reference with changing body.
|
|
109819
|
+
* This is necessary when external libraries require a callback function
|
|
109820
|
+
* that has references to state variables.
|
|
109821
|
+
*
|
|
109822
|
+
* Usage:
|
|
109823
|
+
* const callback = useStaticCallback((val) => {val === currentState});
|
|
109824
|
+
*
|
|
109825
|
+
* The `callback` reference is static and can be safely used in external
|
|
109826
|
+
* libraries or as a prop that does not cause rerendering of children.
|
|
109827
|
+
*
|
|
109828
|
+
* @param {Function} callback function with changing reference
|
|
109829
|
+
* @returns {Function} static function reference
|
|
109834
109830
|
*/
|
|
109835
109831
|
function useStaticCallback(callback) {
|
|
109836
109832
|
const callbackRef = _$1(callback);
|
|
@@ -109973,13 +109969,13 @@
|
|
|
109973
109969
|
return null;
|
|
109974
109970
|
}
|
|
109975
109971
|
|
|
109976
|
-
/**
|
|
109977
|
-
* @typedef { {
|
|
109978
|
-
* text: (element: object) => string,
|
|
109979
|
-
* icon?: (element: Object) => import('preact').Component
|
|
109980
|
-
* } } PlaceholderDefinition
|
|
109981
|
-
*
|
|
109982
|
-
* @param { PlaceholderDefinition } props
|
|
109972
|
+
/**
|
|
109973
|
+
* @typedef { {
|
|
109974
|
+
* text: (element: object) => string,
|
|
109975
|
+
* icon?: (element: Object) => import('preact').Component
|
|
109976
|
+
* } } PlaceholderDefinition
|
|
109977
|
+
*
|
|
109978
|
+
* @param { PlaceholderDefinition } props
|
|
109983
109979
|
*/
|
|
109984
109980
|
function Placeholder(props) {
|
|
109985
109981
|
const {
|
|
@@ -110018,9 +110014,9 @@
|
|
|
110018
110014
|
|
|
110019
110015
|
const noop$6 = () => {};
|
|
110020
110016
|
|
|
110021
|
-
/**
|
|
110022
|
-
* Buffer `.focus()` calls while the editor is not initialized.
|
|
110023
|
-
* Set Focus inside when the editor is ready.
|
|
110017
|
+
/**
|
|
110018
|
+
* Buffer `.focus()` calls while the editor is not initialized.
|
|
110019
|
+
* Set Focus inside when the editor is ready.
|
|
110024
110020
|
*/
|
|
110025
110021
|
const useBufferedFocus$1 = function (editor, ref) {
|
|
110026
110022
|
const [buffer, setBuffer] = h(undefined);
|
|
@@ -110121,9 +110117,9 @@
|
|
|
110121
110117
|
|
|
110122
110118
|
const noop$5 = () => {};
|
|
110123
110119
|
|
|
110124
|
-
/**
|
|
110125
|
-
* Buffer `.focus()` calls while the editor is not initialized.
|
|
110126
|
-
* Set Focus inside when the editor is ready.
|
|
110120
|
+
/**
|
|
110121
|
+
* Buffer `.focus()` calls while the editor is not initialized.
|
|
110122
|
+
* Set Focus inside when the editor is ready.
|
|
110127
110123
|
*/
|
|
110128
110124
|
const useBufferedFocus = function (editor, ref) {
|
|
110129
110125
|
const [buffer, setBuffer] = h(undefined);
|
|
@@ -110172,10 +110168,10 @@
|
|
|
110172
110168
|
p$1(() => {
|
|
110173
110169
|
let editor;
|
|
110174
110170
|
|
|
110175
|
-
/* Trigger FEEL toggle when
|
|
110176
|
-
*
|
|
110177
|
-
* - `backspace` is pressed
|
|
110178
|
-
* - AND the cursor is at the beginning of the input
|
|
110171
|
+
/* Trigger FEEL toggle when
|
|
110172
|
+
*
|
|
110173
|
+
* - `backspace` is pressed
|
|
110174
|
+
* - AND the cursor is at the beginning of the input
|
|
110179
110175
|
*/
|
|
110180
110176
|
const onKeyDown = e => {
|
|
110181
110177
|
if (e.key !== 'Backspace' || !editor) {
|
|
@@ -110266,10 +110262,10 @@
|
|
|
110266
110262
|
|
|
110267
110263
|
const noop$4 = () => {};
|
|
110268
110264
|
|
|
110269
|
-
/**
|
|
110270
|
-
* @param {Object} props
|
|
110271
|
-
* @param {Object} props.label
|
|
110272
|
-
* @param {String} props.feel
|
|
110265
|
+
/**
|
|
110266
|
+
* @param {Object} props
|
|
110267
|
+
* @param {Object} props.label
|
|
110268
|
+
* @param {String} props.feel
|
|
110273
110269
|
*/
|
|
110274
110270
|
function FeelIcon(props) {
|
|
110275
110271
|
const {
|
|
@@ -110304,22 +110300,22 @@
|
|
|
110304
110300
|
source: null
|
|
110305
110301
|
});
|
|
110306
110302
|
|
|
110307
|
-
/**
|
|
110308
|
-
* Add a dragger that calls back the passed function with
|
|
110309
|
-
* { event, delta } on drag.
|
|
110310
|
-
*
|
|
110311
|
-
* @example
|
|
110312
|
-
*
|
|
110313
|
-
* function dragMove(event, delta) {
|
|
110314
|
-
* // we are dragging (!!)
|
|
110315
|
-
* }
|
|
110316
|
-
*
|
|
110317
|
-
* domElement.addEventListener('dragstart', dragger(dragMove));
|
|
110318
|
-
*
|
|
110319
|
-
* @param {Function} fn
|
|
110320
|
-
* @param {Element} [dragPreview]
|
|
110321
|
-
*
|
|
110322
|
-
* @return {Function} drag start callback function
|
|
110303
|
+
/**
|
|
110304
|
+
* Add a dragger that calls back the passed function with
|
|
110305
|
+
* { event, delta } on drag.
|
|
110306
|
+
*
|
|
110307
|
+
* @example
|
|
110308
|
+
*
|
|
110309
|
+
* function dragMove(event, delta) {
|
|
110310
|
+
* // we are dragging (!!)
|
|
110311
|
+
* }
|
|
110312
|
+
*
|
|
110313
|
+
* domElement.addEventListener('dragstart', dragger(dragMove));
|
|
110314
|
+
*
|
|
110315
|
+
* @param {Function} fn
|
|
110316
|
+
* @param {Element} [dragPreview]
|
|
110317
|
+
*
|
|
110318
|
+
* @return {Function} drag start callback function
|
|
110323
110319
|
*/
|
|
110324
110320
|
function createDragger(fn, dragPreview) {
|
|
110325
110321
|
let self;
|
|
@@ -110374,23 +110370,23 @@
|
|
|
110374
110370
|
|
|
110375
110371
|
const noop$3 = () => {};
|
|
110376
110372
|
|
|
110377
|
-
/**
|
|
110378
|
-
* A generic popup component.
|
|
110379
|
-
*
|
|
110380
|
-
* @param {Object} props
|
|
110381
|
-
* @param {HTMLElement} [props.container]
|
|
110382
|
-
* @param {string} [props.className]
|
|
110383
|
-
* @param {boolean} [props.delayInitialFocus]
|
|
110384
|
-
* @param {{x: number, y: number}} [props.position]
|
|
110385
|
-
* @param {number} [props.width]
|
|
110386
|
-
* @param {number} [props.height]
|
|
110387
|
-
* @param {Function} props.onClose
|
|
110388
|
-
* @param {Function} [props.onPostActivate]
|
|
110389
|
-
* @param {Function} [props.onPostDeactivate]
|
|
110390
|
-
* @param {boolean} [props.returnFocus]
|
|
110391
|
-
* @param {boolean} [props.closeOnEscape]
|
|
110392
|
-
* @param {string} props.title
|
|
110393
|
-
* @param {Ref} [ref]
|
|
110373
|
+
/**
|
|
110374
|
+
* A generic popup component.
|
|
110375
|
+
*
|
|
110376
|
+
* @param {Object} props
|
|
110377
|
+
* @param {HTMLElement} [props.container]
|
|
110378
|
+
* @param {string} [props.className]
|
|
110379
|
+
* @param {boolean} [props.delayInitialFocus]
|
|
110380
|
+
* @param {{x: number, y: number}} [props.position]
|
|
110381
|
+
* @param {number} [props.width]
|
|
110382
|
+
* @param {number} [props.height]
|
|
110383
|
+
* @param {Function} props.onClose
|
|
110384
|
+
* @param {Function} [props.onPostActivate]
|
|
110385
|
+
* @param {Function} [props.onPostDeactivate]
|
|
110386
|
+
* @param {boolean} [props.returnFocus]
|
|
110387
|
+
* @param {boolean} [props.closeOnEscape]
|
|
110388
|
+
* @param {string} props.title
|
|
110389
|
+
* @param {Ref} [ref]
|
|
110394
110390
|
*/
|
|
110395
110391
|
function PopupComponent(props, globalRef) {
|
|
110396
110392
|
const {
|
|
@@ -110609,12 +110605,12 @@
|
|
|
110609
110605
|
const FEEL_POPUP_WIDTH = 700;
|
|
110610
110606
|
const FEEL_POPUP_HEIGHT = 250;
|
|
110611
110607
|
|
|
110612
|
-
/**
|
|
110613
|
-
* FEEL popup component, built as a singleton. Emits lifecycle events as follows:
|
|
110614
|
-
* - `feelPopup.open` - fired before the popup is mounted
|
|
110615
|
-
* - `feelPopup.opened` - fired after the popup is mounted. Event context contains the DOM node of the popup
|
|
110616
|
-
* - `feelPopup.close` - fired before the popup is unmounted. Event context contains the DOM node of the popup
|
|
110617
|
-
* - `feelPopup.closed` - fired after the popup is unmounted
|
|
110608
|
+
/**
|
|
110609
|
+
* FEEL popup component, built as a singleton. Emits lifecycle events as follows:
|
|
110610
|
+
* - `feelPopup.open` - fired before the popup is mounted
|
|
110611
|
+
* - `feelPopup.opened` - fired after the popup is mounted. Event context contains the DOM node of the popup
|
|
110612
|
+
* - `feelPopup.close` - fired before the popup is unmounted. Event context contains the DOM node of the popup
|
|
110613
|
+
* - `feelPopup.closed` - fired after the popup is unmounted
|
|
110618
110614
|
*/
|
|
110619
110615
|
function FEELPopupRoot(props) {
|
|
110620
110616
|
const {
|
|
@@ -110840,11 +110836,11 @@
|
|
|
110840
110836
|
return element.closest('.cm-editor').querySelector('.cm-tooltip-autocomplete');
|
|
110841
110837
|
}
|
|
110842
110838
|
|
|
110843
|
-
/**
|
|
110844
|
-
* This hook behaves like useEffect, but does not trigger on the first render.
|
|
110845
|
-
*
|
|
110846
|
-
* @param {Function} effect
|
|
110847
|
-
* @param {Array} deps
|
|
110839
|
+
/**
|
|
110840
|
+
* This hook behaves like useEffect, but does not trigger on the first render.
|
|
110841
|
+
*
|
|
110842
|
+
* @param {Function} effect
|
|
110843
|
+
* @param {Array} deps
|
|
110848
110844
|
*/
|
|
110849
110845
|
function useUpdateEffect(effect, deps) {
|
|
110850
110846
|
const isMounted = _$1(false);
|
|
@@ -110922,19 +110918,19 @@
|
|
|
110922
110918
|
});
|
|
110923
110919
|
}
|
|
110924
110920
|
|
|
110925
|
-
/**
|
|
110926
|
-
* @param {Object} props
|
|
110927
|
-
* @param {Object} props.element
|
|
110928
|
-
* @param {String} props.id
|
|
110929
|
-
* @param {String} props.description
|
|
110930
|
-
* @param {String} props.label
|
|
110931
|
-
* @param {String} props.switcherLabel
|
|
110932
|
-
* @param {Boolean} props.inline
|
|
110933
|
-
* @param {Function} props.getValue
|
|
110934
|
-
* @param {Function} props.setValue
|
|
110935
|
-
* @param {Function} props.onFocus
|
|
110936
|
-
* @param {Function} props.onBlur
|
|
110937
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
110921
|
+
/**
|
|
110922
|
+
* @param {Object} props
|
|
110923
|
+
* @param {Object} props.element
|
|
110924
|
+
* @param {String} props.id
|
|
110925
|
+
* @param {String} props.description
|
|
110926
|
+
* @param {String} props.label
|
|
110927
|
+
* @param {String} props.switcherLabel
|
|
110928
|
+
* @param {Boolean} props.inline
|
|
110929
|
+
* @param {Function} props.getValue
|
|
110930
|
+
* @param {Function} props.setValue
|
|
110931
|
+
* @param {Function} props.onFocus
|
|
110932
|
+
* @param {Function} props.onBlur
|
|
110933
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
110938
110934
|
*/
|
|
110939
110935
|
function ToggleSwitchEntry(props) {
|
|
110940
110936
|
const {
|
|
@@ -111042,22 +111038,22 @@
|
|
|
111042
111038
|
});
|
|
111043
111039
|
}
|
|
111044
111040
|
|
|
111045
|
-
/**
|
|
111046
|
-
* @param {Object} props
|
|
111047
|
-
* @param {Boolean} props.debounce
|
|
111048
|
-
* @param {String} props.description
|
|
111049
|
-
* @param {Boolean} props.disabled
|
|
111050
|
-
* @param {Object} props.element
|
|
111051
|
-
* @param {Function} props.getValue
|
|
111052
|
-
* @param {String} props.id
|
|
111053
|
-
* @param {String} props.label
|
|
111054
|
-
* @param {String} props.max
|
|
111055
|
-
* @param {String} props.min
|
|
111056
|
-
* @param {Function} props.setValue
|
|
111057
|
-
* @param {Function} props.onFocus
|
|
111058
|
-
* @param {Function} props.onBlur
|
|
111059
|
-
* @param {String} props.step
|
|
111060
|
-
* @param {Function} props.validate
|
|
111041
|
+
/**
|
|
111042
|
+
* @param {Object} props
|
|
111043
|
+
* @param {Boolean} props.debounce
|
|
111044
|
+
* @param {String} props.description
|
|
111045
|
+
* @param {Boolean} props.disabled
|
|
111046
|
+
* @param {Object} props.element
|
|
111047
|
+
* @param {Function} props.getValue
|
|
111048
|
+
* @param {String} props.id
|
|
111049
|
+
* @param {String} props.label
|
|
111050
|
+
* @param {String} props.max
|
|
111051
|
+
* @param {String} props.min
|
|
111052
|
+
* @param {Function} props.setValue
|
|
111053
|
+
* @param {Function} props.onFocus
|
|
111054
|
+
* @param {Function} props.onBlur
|
|
111055
|
+
* @param {String} props.step
|
|
111056
|
+
* @param {Function} props.validate
|
|
111061
111057
|
*/
|
|
111062
111058
|
function NumberFieldEntry(props) {
|
|
111063
111059
|
const {
|
|
@@ -111543,26 +111539,26 @@
|
|
|
111543
111539
|
});
|
|
111544
111540
|
});
|
|
111545
111541
|
|
|
111546
|
-
/**
|
|
111547
|
-
* @param {Object} props
|
|
111548
|
-
* @param {Object} props.element
|
|
111549
|
-
* @param {String} props.id
|
|
111550
|
-
* @param {String} props.description
|
|
111551
|
-
* @param {Boolean} props.debounce
|
|
111552
|
-
* @param {Boolean} props.disabled
|
|
111553
|
-
* @param {Boolean} props.feel
|
|
111554
|
-
* @param {String} props.label
|
|
111555
|
-
* @param {Function} props.getValue
|
|
111556
|
-
* @param {Function} props.setValue
|
|
111557
|
-
* @param {Function} props.tooltipContainer
|
|
111558
|
-
* @param {Function} props.validate
|
|
111559
|
-
* @param {Function} props.show
|
|
111560
|
-
* @param {Function} props.example
|
|
111561
|
-
* @param {Function} props.variables
|
|
111562
|
-
* @param {Function} props.onFocus
|
|
111563
|
-
* @param {Function} props.onBlur
|
|
111564
|
-
* @param {string} [props.placeholder]
|
|
111565
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
111542
|
+
/**
|
|
111543
|
+
* @param {Object} props
|
|
111544
|
+
* @param {Object} props.element
|
|
111545
|
+
* @param {String} props.id
|
|
111546
|
+
* @param {String} props.description
|
|
111547
|
+
* @param {Boolean} props.debounce
|
|
111548
|
+
* @param {Boolean} props.disabled
|
|
111549
|
+
* @param {Boolean} props.feel
|
|
111550
|
+
* @param {String} props.label
|
|
111551
|
+
* @param {Function} props.getValue
|
|
111552
|
+
* @param {Function} props.setValue
|
|
111553
|
+
* @param {Function} props.tooltipContainer
|
|
111554
|
+
* @param {Function} props.validate
|
|
111555
|
+
* @param {Function} props.show
|
|
111556
|
+
* @param {Function} props.example
|
|
111557
|
+
* @param {Function} props.variables
|
|
111558
|
+
* @param {Function} props.onFocus
|
|
111559
|
+
* @param {Function} props.onBlur
|
|
111560
|
+
* @param {string} [props.placeholder]
|
|
111561
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
111566
111562
|
*/
|
|
111567
111563
|
function FeelEntry$2(props) {
|
|
111568
111564
|
const {
|
|
@@ -111649,27 +111645,27 @@
|
|
|
111649
111645
|
});
|
|
111650
111646
|
}
|
|
111651
111647
|
|
|
111652
|
-
/**
|
|
111653
|
-
* @param {Object} props
|
|
111654
|
-
* @param {Object} props.element
|
|
111655
|
-
* @param {String} props.id
|
|
111656
|
-
* @param {String} props.description
|
|
111657
|
-
* @param {Boolean} props.debounce
|
|
111658
|
-
* @param {Boolean} props.disabled
|
|
111659
|
-
* @param {String} props.max
|
|
111660
|
-
* @param {String} props.min
|
|
111661
|
-
* @param {String} props.step
|
|
111662
|
-
* @param {Boolean} props.feel
|
|
111663
|
-
* @param {String} props.label
|
|
111664
|
-
* @param {Function} props.getValue
|
|
111665
|
-
* @param {Function} props.setValue
|
|
111666
|
-
* @param {Function} props.tooltipContainer
|
|
111667
|
-
* @param {Function} props.validate
|
|
111668
|
-
* @param {Function} props.show
|
|
111669
|
-
* @param {Function} props.example
|
|
111670
|
-
* @param {Function} props.variables
|
|
111671
|
-
* @param {Function} props.onFocus
|
|
111672
|
-
* @param {Function} props.onBlur
|
|
111648
|
+
/**
|
|
111649
|
+
* @param {Object} props
|
|
111650
|
+
* @param {Object} props.element
|
|
111651
|
+
* @param {String} props.id
|
|
111652
|
+
* @param {String} props.description
|
|
111653
|
+
* @param {Boolean} props.debounce
|
|
111654
|
+
* @param {Boolean} props.disabled
|
|
111655
|
+
* @param {String} props.max
|
|
111656
|
+
* @param {String} props.min
|
|
111657
|
+
* @param {String} props.step
|
|
111658
|
+
* @param {Boolean} props.feel
|
|
111659
|
+
* @param {String} props.label
|
|
111660
|
+
* @param {Function} props.getValue
|
|
111661
|
+
* @param {Function} props.setValue
|
|
111662
|
+
* @param {Function} props.tooltipContainer
|
|
111663
|
+
* @param {Function} props.validate
|
|
111664
|
+
* @param {Function} props.show
|
|
111665
|
+
* @param {Function} props.example
|
|
111666
|
+
* @param {Function} props.variables
|
|
111667
|
+
* @param {Function} props.onFocus
|
|
111668
|
+
* @param {Function} props.onBlur
|
|
111673
111669
|
*/
|
|
111674
111670
|
function FeelNumberEntry(props) {
|
|
111675
111671
|
return u(FeelEntry$2, {
|
|
@@ -111679,25 +111675,25 @@
|
|
|
111679
111675
|
});
|
|
111680
111676
|
}
|
|
111681
111677
|
|
|
111682
|
-
/**
|
|
111683
|
-
* @param {Object} props
|
|
111684
|
-
* @param {Object} props.element
|
|
111685
|
-
* @param {String} props.id
|
|
111686
|
-
* @param {String} props.description
|
|
111687
|
-
* @param {Boolean} props.debounce
|
|
111688
|
-
* @param {Boolean} props.disabled
|
|
111689
|
-
* @param {Boolean} props.feel
|
|
111690
|
-
* @param {String} props.label
|
|
111691
|
-
* @param {Function} props.getValue
|
|
111692
|
-
* @param {Function} props.setValue
|
|
111693
|
-
* @param {Function} props.tooltipContainer
|
|
111694
|
-
* @param {Function} props.validate
|
|
111695
|
-
* @param {Function} props.show
|
|
111696
|
-
* @param {Function} props.example
|
|
111697
|
-
* @param {Function} props.variables
|
|
111698
|
-
* @param {Function} props.onFocus
|
|
111699
|
-
* @param {Function} props.onBlur
|
|
111700
|
-
* @param {string} [props.placeholder]
|
|
111678
|
+
/**
|
|
111679
|
+
* @param {Object} props
|
|
111680
|
+
* @param {Object} props.element
|
|
111681
|
+
* @param {String} props.id
|
|
111682
|
+
* @param {String} props.description
|
|
111683
|
+
* @param {Boolean} props.debounce
|
|
111684
|
+
* @param {Boolean} props.disabled
|
|
111685
|
+
* @param {Boolean} props.feel
|
|
111686
|
+
* @param {String} props.label
|
|
111687
|
+
* @param {Function} props.getValue
|
|
111688
|
+
* @param {Function} props.setValue
|
|
111689
|
+
* @param {Function} props.tooltipContainer
|
|
111690
|
+
* @param {Function} props.validate
|
|
111691
|
+
* @param {Function} props.show
|
|
111692
|
+
* @param {Function} props.example
|
|
111693
|
+
* @param {Function} props.variables
|
|
111694
|
+
* @param {Function} props.onFocus
|
|
111695
|
+
* @param {Function} props.onBlur
|
|
111696
|
+
* @param {string} [props.placeholder]
|
|
111701
111697
|
*/
|
|
111702
111698
|
function FeelTextAreaEntry$1(props) {
|
|
111703
111699
|
return u(FeelEntry$2, {
|
|
@@ -111707,24 +111703,24 @@
|
|
|
111707
111703
|
});
|
|
111708
111704
|
}
|
|
111709
111705
|
|
|
111710
|
-
/**
|
|
111711
|
-
* @param {Object} props
|
|
111712
|
-
* @param {Object} props.element
|
|
111713
|
-
* @param {String} props.id
|
|
111714
|
-
* @param {String} props.description
|
|
111715
|
-
* @param {Boolean} props.debounce
|
|
111716
|
-
* @param {Boolean} props.disabled
|
|
111717
|
-
* @param {Boolean} props.feel
|
|
111718
|
-
* @param {String} props.label
|
|
111719
|
-
* @param {Function} props.getValue
|
|
111720
|
-
* @param {Function} props.setValue
|
|
111721
|
-
* @param {Function} props.tooltipContainer
|
|
111722
|
-
* @param {Function} props.validate
|
|
111723
|
-
* @param {Function} props.show
|
|
111724
|
-
* @param {Function} props.example
|
|
111725
|
-
* @param {Function} props.variables
|
|
111726
|
-
* @param {Function} props.onFocus
|
|
111727
|
-
* @param {Function} props.onBlur
|
|
111706
|
+
/**
|
|
111707
|
+
* @param {Object} props
|
|
111708
|
+
* @param {Object} props.element
|
|
111709
|
+
* @param {String} props.id
|
|
111710
|
+
* @param {String} props.description
|
|
111711
|
+
* @param {Boolean} props.debounce
|
|
111712
|
+
* @param {Boolean} props.disabled
|
|
111713
|
+
* @param {Boolean} props.feel
|
|
111714
|
+
* @param {String} props.label
|
|
111715
|
+
* @param {Function} props.getValue
|
|
111716
|
+
* @param {Function} props.setValue
|
|
111717
|
+
* @param {Function} props.tooltipContainer
|
|
111718
|
+
* @param {Function} props.validate
|
|
111719
|
+
* @param {Function} props.show
|
|
111720
|
+
* @param {Function} props.example
|
|
111721
|
+
* @param {Function} props.variables
|
|
111722
|
+
* @param {Function} props.onFocus
|
|
111723
|
+
* @param {Function} props.onBlur
|
|
111728
111724
|
*/
|
|
111729
111725
|
function FeelCheckboxEntry(props) {
|
|
111730
111726
|
return u(FeelEntry$2, {
|
|
@@ -111793,85 +111789,85 @@
|
|
|
111793
111789
|
const DEFAULT_DESCRIPTION = {};
|
|
111794
111790
|
const DEFAULT_TOOLTIP = {};
|
|
111795
111791
|
|
|
111796
|
-
/**
|
|
111797
|
-
* @typedef { {
|
|
111798
|
-
* component: import('preact').Component,
|
|
111799
|
-
* id: String,
|
|
111800
|
-
* isEdited?: Function
|
|
111801
|
-
* } } EntryDefinition
|
|
111802
|
-
*
|
|
111803
|
-
* @typedef { {
|
|
111804
|
-
* autoFocusEntry: String,
|
|
111805
|
-
* autoOpen?: Boolean,
|
|
111806
|
-
* entries: Array<EntryDefinition>,
|
|
111807
|
-
* id: String,
|
|
111808
|
-
* label: String,
|
|
111809
|
-
* remove: (event: MouseEvent) => void
|
|
111810
|
-
* } } ListItemDefinition
|
|
111811
|
-
*
|
|
111812
|
-
* @typedef { {
|
|
111813
|
-
* add: (event: MouseEvent) => void,
|
|
111814
|
-
* component: import('preact').Component,
|
|
111815
|
-
* element: Object,
|
|
111816
|
-
* id: String,
|
|
111817
|
-
* items: Array<ListItemDefinition>,
|
|
111818
|
-
* label: String,
|
|
111819
|
-
* shouldOpen?: Boolean
|
|
111820
|
-
* } } ListGroupDefinition
|
|
111821
|
-
*
|
|
111822
|
-
* @typedef { {
|
|
111823
|
-
* component?: import('preact').Component,
|
|
111824
|
-
* entries: Array<EntryDefinition>,
|
|
111825
|
-
* id: String,
|
|
111826
|
-
* label: String,
|
|
111827
|
-
* shouldOpen?: Boolean
|
|
111828
|
-
* } } GroupDefinition
|
|
111829
|
-
*
|
|
111830
|
-
* @typedef { {
|
|
111831
|
-
* [id: String]: GetDescriptionFunction
|
|
111832
|
-
* } } DescriptionConfig
|
|
111833
|
-
*
|
|
111834
|
-
* @typedef { {
|
|
111835
|
-
* [id: String]: GetTooltipFunction
|
|
111836
|
-
* } } TooltipConfig
|
|
111837
|
-
*
|
|
111838
|
-
* @callback { {
|
|
111839
|
-
* @param {string} id
|
|
111840
|
-
* @param {Object} element
|
|
111841
|
-
* @returns {string}
|
|
111842
|
-
* } } GetDescriptionFunction
|
|
111843
|
-
*
|
|
111844
|
-
* @callback { {
|
|
111845
|
-
* @param {string} id
|
|
111846
|
-
* @param {Object} element
|
|
111847
|
-
* @returns {string}
|
|
111848
|
-
* } } GetTooltipFunction
|
|
111849
|
-
*
|
|
111850
|
-
* @typedef { {
|
|
111851
|
-
* getEmpty: (element: object) => import('./components/Placeholder').PlaceholderDefinition,
|
|
111852
|
-
* getMultiple: (element: Object) => import('./components/Placeholder').PlaceholderDefinition
|
|
111853
|
-
* } } PlaceholderProvider
|
|
111854
|
-
*
|
|
111792
|
+
/**
|
|
111793
|
+
* @typedef { {
|
|
111794
|
+
* component: import('preact').Component,
|
|
111795
|
+
* id: String,
|
|
111796
|
+
* isEdited?: Function
|
|
111797
|
+
* } } EntryDefinition
|
|
111798
|
+
*
|
|
111799
|
+
* @typedef { {
|
|
111800
|
+
* autoFocusEntry: String,
|
|
111801
|
+
* autoOpen?: Boolean,
|
|
111802
|
+
* entries: Array<EntryDefinition>,
|
|
111803
|
+
* id: String,
|
|
111804
|
+
* label: String,
|
|
111805
|
+
* remove: (event: MouseEvent) => void
|
|
111806
|
+
* } } ListItemDefinition
|
|
111807
|
+
*
|
|
111808
|
+
* @typedef { {
|
|
111809
|
+
* add: (event: MouseEvent) => void,
|
|
111810
|
+
* component: import('preact').Component,
|
|
111811
|
+
* element: Object,
|
|
111812
|
+
* id: String,
|
|
111813
|
+
* items: Array<ListItemDefinition>,
|
|
111814
|
+
* label: String,
|
|
111815
|
+
* shouldOpen?: Boolean
|
|
111816
|
+
* } } ListGroupDefinition
|
|
111817
|
+
*
|
|
111818
|
+
* @typedef { {
|
|
111819
|
+
* component?: import('preact').Component,
|
|
111820
|
+
* entries: Array<EntryDefinition>,
|
|
111821
|
+
* id: String,
|
|
111822
|
+
* label: String,
|
|
111823
|
+
* shouldOpen?: Boolean
|
|
111824
|
+
* } } GroupDefinition
|
|
111825
|
+
*
|
|
111826
|
+
* @typedef { {
|
|
111827
|
+
* [id: String]: GetDescriptionFunction
|
|
111828
|
+
* } } DescriptionConfig
|
|
111829
|
+
*
|
|
111830
|
+
* @typedef { {
|
|
111831
|
+
* [id: String]: GetTooltipFunction
|
|
111832
|
+
* } } TooltipConfig
|
|
111833
|
+
*
|
|
111834
|
+
* @callback { {
|
|
111835
|
+
* @param {string} id
|
|
111836
|
+
* @param {Object} element
|
|
111837
|
+
* @returns {string}
|
|
111838
|
+
* } } GetDescriptionFunction
|
|
111839
|
+
*
|
|
111840
|
+
* @callback { {
|
|
111841
|
+
* @param {string} id
|
|
111842
|
+
* @param {Object} element
|
|
111843
|
+
* @returns {string}
|
|
111844
|
+
* } } GetTooltipFunction
|
|
111845
|
+
*
|
|
111846
|
+
* @typedef { {
|
|
111847
|
+
* getEmpty: (element: object) => import('./components/Placeholder').PlaceholderDefinition,
|
|
111848
|
+
* getMultiple: (element: Object) => import('./components/Placeholder').PlaceholderDefinition
|
|
111849
|
+
* } } PlaceholderProvider
|
|
111850
|
+
*
|
|
111855
111851
|
*/
|
|
111856
111852
|
|
|
111857
|
-
/**
|
|
111858
|
-
* A basic properties panel component. Describes *how* content will be rendered, accepts
|
|
111859
|
-
* data from implementor to describe *what* will be rendered.
|
|
111860
|
-
*
|
|
111861
|
-
* @param {Object} props
|
|
111862
|
-
* @param {Object|Array} props.element
|
|
111863
|
-
* @param {import('./components/Header').HeaderProvider} props.headerProvider
|
|
111864
|
-
* @param {PlaceholderProvider} [props.placeholderProvider]
|
|
111865
|
-
* @param {Array<GroupDefinition|ListGroupDefinition>} props.groups
|
|
111866
|
-
* @param {Object} [props.layoutConfig]
|
|
111867
|
-
* @param {Function} [props.layoutChanged]
|
|
111868
|
-
* @param {DescriptionConfig} [props.descriptionConfig]
|
|
111869
|
-
* @param {Function} [props.descriptionLoaded]
|
|
111870
|
-
* @param {TooltipConfig} [props.tooltipConfig]
|
|
111871
|
-
* @param {Function} [props.tooltipLoaded]
|
|
111872
|
-
* @param {HTMLElement} [props.feelPopupContainer]
|
|
111873
|
-
* @param {Function} [props.getFeelPopupLinks]
|
|
111874
|
-
* @param {Object} [props.eventBus]
|
|
111853
|
+
/**
|
|
111854
|
+
* A basic properties panel component. Describes *how* content will be rendered, accepts
|
|
111855
|
+
* data from implementor to describe *what* will be rendered.
|
|
111856
|
+
*
|
|
111857
|
+
* @param {Object} props
|
|
111858
|
+
* @param {Object|Array} props.element
|
|
111859
|
+
* @param {import('./components/Header').HeaderProvider} props.headerProvider
|
|
111860
|
+
* @param {PlaceholderProvider} [props.placeholderProvider]
|
|
111861
|
+
* @param {Array<GroupDefinition|ListGroupDefinition>} props.groups
|
|
111862
|
+
* @param {Object} [props.layoutConfig]
|
|
111863
|
+
* @param {Function} [props.layoutChanged]
|
|
111864
|
+
* @param {DescriptionConfig} [props.descriptionConfig]
|
|
111865
|
+
* @param {Function} [props.descriptionLoaded]
|
|
111866
|
+
* @param {TooltipConfig} [props.tooltipConfig]
|
|
111867
|
+
* @param {Function} [props.tooltipLoaded]
|
|
111868
|
+
* @param {HTMLElement} [props.feelPopupContainer]
|
|
111869
|
+
* @param {Function} [props.getFeelPopupLinks]
|
|
111870
|
+
* @param {Object} [props.eventBus]
|
|
111875
111871
|
*/
|
|
111876
111872
|
function PropertiesPanel(props) {
|
|
111877
111873
|
const {
|
|
@@ -112044,11 +112040,11 @@
|
|
|
112044
112040
|
|
|
112045
112041
|
// hooks //////////////////
|
|
112046
112042
|
|
|
112047
|
-
/**
|
|
112048
|
-
* This hook behaves like useLayoutEffect, but does not trigger on the first render.
|
|
112049
|
-
*
|
|
112050
|
-
* @param {Function} effect
|
|
112051
|
-
* @param {Array} deps
|
|
112043
|
+
/**
|
|
112044
|
+
* This hook behaves like useLayoutEffect, but does not trigger on the first render.
|
|
112045
|
+
*
|
|
112046
|
+
* @param {Function} effect
|
|
112047
|
+
* @param {Array} deps
|
|
112052
112048
|
*/
|
|
112053
112049
|
function useUpdateLayoutEffect(effect, deps) {
|
|
112054
112050
|
const isMounted = _$1(false);
|
|
@@ -112123,15 +112119,15 @@
|
|
|
112123
112119
|
});
|
|
112124
112120
|
}
|
|
112125
112121
|
|
|
112126
|
-
/**
|
|
112127
|
-
*
|
|
112128
|
-
* @param {Array<null | Element>} ignoredElements
|
|
112129
|
-
* @param {Function} callback
|
|
112122
|
+
/**
|
|
112123
|
+
*
|
|
112124
|
+
* @param {Array<null | Element>} ignoredElements
|
|
112125
|
+
* @param {Function} callback
|
|
112130
112126
|
*/
|
|
112131
112127
|
function useGlobalClick(ignoredElements, callback) {
|
|
112132
112128
|
p$1(() => {
|
|
112133
|
-
/**
|
|
112134
|
-
* @param {MouseEvent} event
|
|
112129
|
+
/**
|
|
112130
|
+
* @param {MouseEvent} event
|
|
112135
112131
|
*/
|
|
112136
112132
|
function listener(event) {
|
|
112137
112133
|
if (ignoredElements.some(element => element && element.contains(event.target))) {
|
|
@@ -112164,20 +112160,20 @@
|
|
|
112164
112160
|
});
|
|
112165
112161
|
}
|
|
112166
112162
|
|
|
112167
|
-
/**
|
|
112168
|
-
* @typedef { {
|
|
112169
|
-
* [key: string]: string;
|
|
112170
|
-
* } } TranslateReplacements
|
|
112163
|
+
/**
|
|
112164
|
+
* @typedef { {
|
|
112165
|
+
* [key: string]: string;
|
|
112166
|
+
* } } TranslateReplacements
|
|
112171
112167
|
*/
|
|
112172
112168
|
|
|
112173
|
-
/**
|
|
112174
|
-
* A simple translation stub to be used for multi-language support.
|
|
112175
|
-
* Can be easily replaced with a more sophisticated solution.
|
|
112176
|
-
*
|
|
112177
|
-
* @param {string} template to interpolate
|
|
112178
|
-
* @param {TranslateReplacements} [replacements] a map with substitutes
|
|
112179
|
-
*
|
|
112180
|
-
* @return {string} the translated string
|
|
112169
|
+
/**
|
|
112170
|
+
* A simple translation stub to be used for multi-language support.
|
|
112171
|
+
* Can be easily replaced with a more sophisticated solution.
|
|
112172
|
+
*
|
|
112173
|
+
* @param {string} template to interpolate
|
|
112174
|
+
* @param {TranslateReplacements} [replacements] a map with substitutes
|
|
112175
|
+
*
|
|
112176
|
+
* @return {string} the translated string
|
|
112181
112177
|
*/
|
|
112182
112178
|
function translateFallback(template, replacements) {
|
|
112183
112179
|
replacements = replacements || {};
|
|
@@ -112289,8 +112285,8 @@
|
|
|
112289
112285
|
|
|
112290
112286
|
const noop$1$1 = () => {};
|
|
112291
112287
|
|
|
112292
|
-
/**
|
|
112293
|
-
* @param {import('../PropertiesPanel').ListGroupDefinition} props
|
|
112288
|
+
/**
|
|
112289
|
+
* @param {import('../PropertiesPanel').ListGroupDefinition} props
|
|
112294
112290
|
*/
|
|
112295
112291
|
function ListGroup(props) {
|
|
112296
112292
|
const {
|
|
@@ -112482,18 +112478,18 @@
|
|
|
112482
112478
|
});
|
|
112483
112479
|
}
|
|
112484
112480
|
|
|
112485
|
-
/**
|
|
112486
|
-
* @param {Object} props
|
|
112487
|
-
* @param {Object} props.element
|
|
112488
|
-
* @param {String} props.id
|
|
112489
|
-
* @param {String} props.description
|
|
112490
|
-
* @param {String} props.label
|
|
112491
|
-
* @param {Function} props.getValue
|
|
112492
|
-
* @param {Function} props.setValue
|
|
112493
|
-
* @param {Function} props.onFocus
|
|
112494
|
-
* @param {Function} props.onBlur
|
|
112495
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
112496
|
-
* @param {boolean} [props.disabled]
|
|
112481
|
+
/**
|
|
112482
|
+
* @param {Object} props
|
|
112483
|
+
* @param {Object} props.element
|
|
112484
|
+
* @param {String} props.id
|
|
112485
|
+
* @param {String} props.description
|
|
112486
|
+
* @param {String} props.label
|
|
112487
|
+
* @param {Function} props.getValue
|
|
112488
|
+
* @param {Function} props.setValue
|
|
112489
|
+
* @param {Function} props.onFocus
|
|
112490
|
+
* @param {Function} props.onBlur
|
|
112491
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
112492
|
+
* @param {boolean} [props.disabled]
|
|
112497
112493
|
*/
|
|
112498
112494
|
function CheckboxEntry(props) {
|
|
112499
112495
|
const {
|
|
@@ -112614,20 +112610,20 @@
|
|
|
112614
112610
|
});
|
|
112615
112611
|
}
|
|
112616
112612
|
|
|
112617
|
-
/**
|
|
112618
|
-
* @param {object} props
|
|
112619
|
-
* @param {object} props.element
|
|
112620
|
-
* @param {string} props.id
|
|
112621
|
-
* @param {string} [props.description]
|
|
112622
|
-
* @param {string} props.label
|
|
112623
|
-
* @param {Function} props.getValue
|
|
112624
|
-
* @param {Function} props.setValue
|
|
112625
|
-
* @param {Function} props.onFocus
|
|
112626
|
-
* @param {Function} props.onBlur
|
|
112627
|
-
* @param {Function} props.getOptions
|
|
112628
|
-
* @param {boolean} [props.disabled]
|
|
112629
|
-
* @param {Function} [props.validate]
|
|
112630
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
112613
|
+
/**
|
|
112614
|
+
* @param {object} props
|
|
112615
|
+
* @param {object} props.element
|
|
112616
|
+
* @param {string} props.id
|
|
112617
|
+
* @param {string} [props.description]
|
|
112618
|
+
* @param {string} props.label
|
|
112619
|
+
* @param {Function} props.getValue
|
|
112620
|
+
* @param {Function} props.setValue
|
|
112621
|
+
* @param {Function} props.onFocus
|
|
112622
|
+
* @param {Function} props.onBlur
|
|
112623
|
+
* @param {Function} props.getOptions
|
|
112624
|
+
* @param {boolean} [props.disabled]
|
|
112625
|
+
* @param {Function} [props.validate]
|
|
112626
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
112631
112627
|
*/
|
|
112632
112628
|
function SelectEntry(props) {
|
|
112633
112629
|
const {
|
|
@@ -112920,20 +112916,20 @@
|
|
|
112920
112916
|
});
|
|
112921
112917
|
}
|
|
112922
112918
|
|
|
112923
|
-
/**
|
|
112924
|
-
* @param {Object} props
|
|
112925
|
-
* @param {Object} props.element
|
|
112926
|
-
* @param {String} props.id
|
|
112927
|
-
* @param {String} props.description
|
|
112928
|
-
* @param {Boolean} props.debounce
|
|
112929
|
-
* @param {Boolean} props.disabled
|
|
112930
|
-
* @param {String} props.label
|
|
112931
|
-
* @param {Function} props.getValue
|
|
112932
|
-
* @param {Function} props.setValue
|
|
112933
|
-
* @param {Function} props.onFocus
|
|
112934
|
-
* @param {Function} props.onBlur
|
|
112935
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
112936
|
-
* @param {Function} props.validate
|
|
112919
|
+
/**
|
|
112920
|
+
* @param {Object} props
|
|
112921
|
+
* @param {Object} props.element
|
|
112922
|
+
* @param {String} props.id
|
|
112923
|
+
* @param {String} props.description
|
|
112924
|
+
* @param {Boolean} props.debounce
|
|
112925
|
+
* @param {Boolean} props.disabled
|
|
112926
|
+
* @param {String} props.label
|
|
112927
|
+
* @param {Function} props.getValue
|
|
112928
|
+
* @param {Function} props.setValue
|
|
112929
|
+
* @param {Function} props.onFocus
|
|
112930
|
+
* @param {Function} props.onBlur
|
|
112931
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
112932
|
+
* @param {Function} props.validate
|
|
112937
112933
|
*/
|
|
112938
112934
|
function TextfieldEntry(props) {
|
|
112939
112935
|
const {
|
|
@@ -113026,20 +113022,20 @@
|
|
|
113026
113022
|
this._eventBus = eventBus;
|
|
113027
113023
|
}
|
|
113028
113024
|
|
|
113029
|
-
/**
|
|
113030
|
-
* Check if the FEEL popup is open.
|
|
113031
|
-
* @return {Boolean}
|
|
113025
|
+
/**
|
|
113026
|
+
* Check if the FEEL popup is open.
|
|
113027
|
+
* @return {Boolean}
|
|
113032
113028
|
*/
|
|
113033
113029
|
isOpen() {
|
|
113034
113030
|
return this._eventBus.fire('feelPopup._isOpen');
|
|
113035
113031
|
}
|
|
113036
113032
|
|
|
113037
|
-
/**
|
|
113038
|
-
* Open the FEEL popup.
|
|
113039
|
-
*
|
|
113040
|
-
* @param {String} entryId
|
|
113041
|
-
* @param {Object} popupConfig
|
|
113042
|
-
* @param {HTMLElement} sourceElement
|
|
113033
|
+
/**
|
|
113034
|
+
* Open the FEEL popup.
|
|
113035
|
+
*
|
|
113036
|
+
* @param {String} entryId
|
|
113037
|
+
* @param {Object} popupConfig
|
|
113038
|
+
* @param {HTMLElement} sourceElement
|
|
113043
113039
|
*/
|
|
113044
113040
|
open(entryId, popupConfig, sourceElement) {
|
|
113045
113041
|
return this._eventBus.fire('feelPopup._open', {
|
|
@@ -113049,8 +113045,8 @@
|
|
|
113049
113045
|
});
|
|
113050
113046
|
}
|
|
113051
113047
|
|
|
113052
|
-
/**
|
|
113053
|
-
* Close the FEEL popup.
|
|
113048
|
+
/**
|
|
113049
|
+
* Close the FEEL popup.
|
|
113054
113050
|
*/
|
|
113055
113051
|
close() {
|
|
113056
113052
|
return this._eventBus.fire('feelPopup._close');
|
|
@@ -121991,9 +121987,10 @@
|
|
|
121991
121987
|
}
|
|
121992
121988
|
|
|
121993
121989
|
// ensure types are in logical order
|
|
121994
|
-
const EVENT_TYPE = ['assigning', 'completing'];
|
|
121990
|
+
const EVENT_TYPE = ['assigning', 'updating', 'completing'];
|
|
121995
121991
|
const EVENT_TO_LABEL$1 = {
|
|
121996
121992
|
assigning: 'Assigning',
|
|
121993
|
+
updating: 'Updating',
|
|
121997
121994
|
completing: 'Completing'
|
|
121998
121995
|
};
|
|
121999
121996
|
function TaskListenerEntries(props) {
|
|
@@ -123886,6 +123883,22 @@
|
|
|
123886
123883
|
children: translate('Learn more.')
|
|
123887
123884
|
})]
|
|
123888
123885
|
});
|
|
123886
|
+
},
|
|
123887
|
+
'messageSubscriptionCorrelationKey': element => {
|
|
123888
|
+
const translate = useService$1('translate');
|
|
123889
|
+
return u("div", {
|
|
123890
|
+
children: u("p", {
|
|
123891
|
+
children: [translate('Identifier computed from the process context that is used to correlate an incoming message (e.g. '), u("code", {
|
|
123892
|
+
children: "= orderId"
|
|
123893
|
+
}), translate('). '), u("a", {
|
|
123894
|
+
href: "https://docs.camunda.io/docs/8.7/components/modeler/bpmn/message-events/#messages",
|
|
123895
|
+
target: "_blank",
|
|
123896
|
+
rel: "noopener noreferrer",
|
|
123897
|
+
title: translate('Subscription correlation key documentation'),
|
|
123898
|
+
children: translate('Learn more.')
|
|
123899
|
+
}), " "]
|
|
123900
|
+
})
|
|
123901
|
+
});
|
|
123889
123902
|
}
|
|
123890
123903
|
};
|
|
123891
123904
|
|
|
@@ -129161,7 +129174,7 @@
|
|
|
129161
129174
|
}
|
|
129162
129175
|
|
|
129163
129176
|
// eslint-disable-next-line no-undef
|
|
129164
|
-
const packageVersion = "2.5.
|
|
129177
|
+
const packageVersion = "2.5.3";
|
|
129165
129178
|
|
|
129166
129179
|
/**
|
|
129167
129180
|
* Registry for element templates.
|
|
@@ -131061,7 +131074,7 @@
|
|
|
131061
131074
|
});
|
|
131062
131075
|
}
|
|
131063
131076
|
const unusedLinkedResources = linkedResources.get('values').slice();
|
|
131064
|
-
const unusedResourceProperties = oldTemplate?.properties.slice() || [];
|
|
131077
|
+
const unusedResourceProperties = (oldTemplate?.properties.slice() || []).filter(property => property.binding.type === ZEEBE_LINKED_RESOURCE_PROPERTY);
|
|
131065
131078
|
newLinkedResources.forEach(newLinkedResource => {
|
|
131066
131079
|
const oldProperty = findOldProperty$1(oldTemplate, newLinkedResource),
|
|
131067
131080
|
oldLinkedResource = findBusinessObject(extensionElements, newLinkedResource),
|
|
@@ -131426,8 +131439,8 @@
|
|
|
131426
131439
|
return eventDefinition.$type;
|
|
131427
131440
|
}
|
|
131428
131441
|
|
|
131429
|
-
class RemoveElementTemplateHandler {
|
|
131430
|
-
constructor(modeling, elementFactory, elementRegistry, canvas, bpmnFactory, replace, commandStack) {
|
|
131442
|
+
let RemoveElementTemplateHandler$1 = class RemoveElementTemplateHandler {
|
|
131443
|
+
constructor(modeling, elementFactory, elementRegistry, canvas, bpmnFactory, replace, commandStack, moddleCopy) {
|
|
131431
131444
|
this._modeling = modeling;
|
|
131432
131445
|
this._elementFactory = elementFactory;
|
|
131433
131446
|
this._elementRegistry = elementRegistry;
|
|
@@ -131435,6 +131448,7 @@
|
|
|
131435
131448
|
this._bpmnFactory = bpmnFactory;
|
|
131436
131449
|
this._replace = replace;
|
|
131437
131450
|
this._commandStack = commandStack;
|
|
131451
|
+
this._moddleCopy = moddleCopy;
|
|
131438
131452
|
}
|
|
131439
131453
|
preExecute(context) {
|
|
131440
131454
|
const {
|
|
@@ -131451,7 +131465,7 @@
|
|
|
131451
131465
|
const businessObject = getBusinessObject$2(element);
|
|
131452
131466
|
const type = businessObject.$type,
|
|
131453
131467
|
eventDefinitionType = this._getEventDefinitionType(businessObject);
|
|
131454
|
-
const newBusinessObject = this.
|
|
131468
|
+
const newBusinessObject = this._createNewBusinessObject(element);
|
|
131455
131469
|
return replace.replaceElement(element, {
|
|
131456
131470
|
type: type,
|
|
131457
131471
|
businessObject: newBusinessObject,
|
|
@@ -131485,7 +131499,7 @@
|
|
|
131485
131499
|
}
|
|
131486
131500
|
const businessObject = getBusinessObject$2(element);
|
|
131487
131501
|
const type = businessObject.$type;
|
|
131488
|
-
const newBusinessObject = this.
|
|
131502
|
+
const newBusinessObject = this._createNewBusinessObject(element);
|
|
131489
131503
|
const newRoot = elementFactory.create('root', {
|
|
131490
131504
|
type: type,
|
|
131491
131505
|
businessObject: newBusinessObject
|
|
@@ -131510,11 +131524,15 @@
|
|
|
131510
131524
|
}
|
|
131511
131525
|
return eventDefinition.$type;
|
|
131512
131526
|
}
|
|
131513
|
-
|
|
131527
|
+
_createNewBusinessObject(element) {
|
|
131514
131528
|
const bpmnFactory = this._bpmnFactory;
|
|
131515
131529
|
const bo = getBusinessObject$2(element),
|
|
131516
131530
|
newBo = bpmnFactory.create(bo.$type),
|
|
131517
131531
|
label = getLabel(element);
|
|
131532
|
+
|
|
131533
|
+
// Make we we keep general properties unrelated to the template.
|
|
131534
|
+
this._copyProperties(bo, newBo, ['documentation']);
|
|
131535
|
+
this._copyExtensionElements(bo, newBo, ['zeebe:ExecutionListeners']);
|
|
131518
131536
|
if (!label) {
|
|
131519
131537
|
return newBo;
|
|
131520
131538
|
}
|
|
@@ -131526,8 +131544,47 @@
|
|
|
131526
131544
|
}, label);
|
|
131527
131545
|
return newBo;
|
|
131528
131546
|
}
|
|
131529
|
-
|
|
131530
|
-
|
|
131547
|
+
|
|
131548
|
+
/**
|
|
131549
|
+
* Copy specified properties to the target business object.
|
|
131550
|
+
*
|
|
131551
|
+
* @param {ModdleElement} source
|
|
131552
|
+
* @param {ModdleElement} target
|
|
131553
|
+
* @param {Array<string>} properties
|
|
131554
|
+
*/
|
|
131555
|
+
_copyProperties(source, target, properties) {
|
|
131556
|
+
const copy = this._moddleCopy;
|
|
131557
|
+
properties.forEach(propertyName => {
|
|
131558
|
+
const property = source.get(propertyName);
|
|
131559
|
+
if (property) {
|
|
131560
|
+
const propertyCopy = copy.copyProperty(property, target, propertyName);
|
|
131561
|
+
target.set(propertyName, propertyCopy);
|
|
131562
|
+
}
|
|
131563
|
+
});
|
|
131564
|
+
}
|
|
131565
|
+
|
|
131566
|
+
/**
|
|
131567
|
+
* Copy extension elements of specified types to the target business object.
|
|
131568
|
+
*
|
|
131569
|
+
* @param {ModdleElement} source
|
|
131570
|
+
* @param {ModdleElement} target
|
|
131571
|
+
* @param {Array<string>} extensionElements
|
|
131572
|
+
*/
|
|
131573
|
+
_copyExtensionElements(source, target, extensionElements) {
|
|
131574
|
+
const bpmnFactory = this._bpmnFactory;
|
|
131575
|
+
|
|
131576
|
+
// No extension elements in the source business object.
|
|
131577
|
+
if (!source.extensionElements || !source.extensionElements.values) return;
|
|
131578
|
+
const newExtensionElements = source.extensionElements.values.filter(value => extensionElements.some(extensionElement => is$5(value, extensionElement)));
|
|
131579
|
+
|
|
131580
|
+
// Nothing to copy.
|
|
131581
|
+
if (!newExtensionElements.length) return;
|
|
131582
|
+
target.extensionElements = bpmnFactory.create('bpmn:ExtensionElements', {
|
|
131583
|
+
values: newExtensionElements
|
|
131584
|
+
});
|
|
131585
|
+
}
|
|
131586
|
+
};
|
|
131587
|
+
RemoveElementTemplateHandler$1.$inject = ['modeling', 'elementFactory', 'elementRegistry', 'canvas', 'bpmnFactory', 'replace', 'commandStack', 'moddleCopy'];
|
|
131531
131588
|
|
|
131532
131589
|
/**
|
|
131533
131590
|
* A handler that combines and executes multiple commands.
|
|
@@ -131555,7 +131612,7 @@
|
|
|
131555
131612
|
constructor(commandStack, elementTemplates, eventBus) {
|
|
131556
131613
|
commandStack.registerHandler('element-templates.multi-command-executor', MultiCommandHandler);
|
|
131557
131614
|
commandStack.registerHandler('propertiesPanel.zeebe.changeTemplate', ChangeElementTemplateHandler$1);
|
|
131558
|
-
commandStack.registerHandler('propertiesPanel.removeTemplate', RemoveElementTemplateHandler);
|
|
131615
|
+
commandStack.registerHandler('propertiesPanel.removeTemplate', RemoveElementTemplateHandler$1);
|
|
131559
131616
|
|
|
131560
131617
|
// apply default element templates on shape creation
|
|
131561
131618
|
eventBus.on(['commandStack.shape.create.postExecuted'], function (event) {
|