camunda-bpmn-js 4.15.0 → 4.16.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/LICENSE +20 -20
- package/README.md +88 -88
- package/dist/assets/base-modeler.css +5 -5
- package/dist/assets/base-navigated-viewer.css +1 -1
- package/dist/assets/base-viewer.css +1 -1
- package/dist/assets/camunda-cloud-modeler.css +2 -2
- package/dist/assets/camunda-platform-modeler.css +1 -1
- package/dist/assets/properties-panel.css +1505 -1499
- package/dist/base-modeler.development.js +570 -570
- package/dist/camunda-cloud-modeler.development.js +2327 -2185
- package/dist/camunda-cloud-modeler.production.min.js +4 -4
- package/dist/camunda-cloud-navigated-viewer.development.js +40 -40
- package/dist/camunda-cloud-viewer.development.js +40 -40
- package/dist/camunda-platform-modeler.development.js +1941 -1941
- package/dist/camunda-platform-navigated-viewer.development.js +27 -27
- package/dist/camunda-platform-viewer.development.js +27 -27
- package/lib/base/Modeler.d.ts +20 -20
- package/lib/base/Modeler.js +65 -65
- package/lib/base/NavigatedViewer.d.ts +2 -2
- package/lib/base/NavigatedViewer.js +2 -2
- package/lib/base/Viewer.d.ts +2 -2
- package/lib/base/Viewer.js +2 -2
- package/lib/camunda-cloud/ElementTemplatesValidator.d.ts +1 -1
- package/lib/camunda-cloud/Modeler.d.ts +3 -3
- package/lib/camunda-cloud/Modeler.js +84 -84
- package/lib/camunda-cloud/NavigatedViewer.d.ts +9 -9
- package/lib/camunda-cloud/NavigatedViewer.js +36 -36
- package/lib/camunda-cloud/Viewer.d.ts +9 -9
- package/lib/camunda-cloud/Viewer.js +36 -36
- package/lib/camunda-cloud/util/commonModules.d.ts +9 -9
- package/lib/camunda-cloud/util/commonModules.js +15 -15
- package/lib/camunda-platform/Modeler.d.ts +3 -3
- package/lib/camunda-platform/Modeler.js +68 -68
- package/lib/camunda-platform/NavigatedViewer.d.ts +9 -9
- package/lib/camunda-platform/NavigatedViewer.js +27 -27
- package/lib/camunda-platform/Viewer.d.ts +9 -9
- package/lib/camunda-platform/Viewer.js +27 -27
- package/lib/camunda-platform/util/commonModules.d.ts +9 -9
- package/lib/camunda-platform/util/commonModules.js +11 -11
- package/lib/util/ExtensionElementsUtil.d.ts +24 -24
- package/lib/util/ExtensionElementsUtil.js +68 -68
- package/package.json +140 -140
- package/styles/base-modeler.css +5 -5
- package/styles/base-navigated-viewer.css +1 -1
- package/styles/base-viewer.css +1 -1
- package/styles/camunda-cloud-modeler.css +2 -2
- package/styles/camunda-platform-modeler.css +1 -1
|
@@ -98097,19 +98097,19 @@
|
|
|
98097
98097
|
errors: {}
|
|
98098
98098
|
});
|
|
98099
98099
|
|
|
98100
|
-
/**
|
|
98101
|
-
* @typedef {Function} <propertiesPanel.showEntry> callback
|
|
98102
|
-
*
|
|
98103
|
-
* @example
|
|
98104
|
-
*
|
|
98105
|
-
* useEvent('propertiesPanel.showEntry', ({ focus = false, ...rest }) => {
|
|
98106
|
-
* // ...
|
|
98107
|
-
* });
|
|
98108
|
-
*
|
|
98109
|
-
* @param {Object} context
|
|
98110
|
-
* @param {boolean} [context.focus]
|
|
98111
|
-
*
|
|
98112
|
-
* @returns void
|
|
98100
|
+
/**
|
|
98101
|
+
* @typedef {Function} <propertiesPanel.showEntry> callback
|
|
98102
|
+
*
|
|
98103
|
+
* @example
|
|
98104
|
+
*
|
|
98105
|
+
* useEvent('propertiesPanel.showEntry', ({ focus = false, ...rest }) => {
|
|
98106
|
+
* // ...
|
|
98107
|
+
* });
|
|
98108
|
+
*
|
|
98109
|
+
* @param {Object} context
|
|
98110
|
+
* @param {boolean} [context.focus]
|
|
98111
|
+
*
|
|
98112
|
+
* @returns void
|
|
98113
98113
|
*/
|
|
98114
98114
|
|
|
98115
98115
|
const EventContext = F$2({
|
|
@@ -98128,20 +98128,20 @@
|
|
|
98128
98128
|
getTooltipForId: () => {}
|
|
98129
98129
|
});
|
|
98130
98130
|
|
|
98131
|
-
/**
|
|
98132
|
-
* Accesses the global TooltipContext and returns a tooltip for a given id and element.
|
|
98133
|
-
*
|
|
98134
|
-
* @example
|
|
98135
|
-
* ```jsx
|
|
98136
|
-
* function TextField(props) {
|
|
98137
|
-
* const tooltip = useTooltipContext('input1', element);
|
|
98138
|
-
* }
|
|
98139
|
-
* ```
|
|
98140
|
-
*
|
|
98141
|
-
* @param {string} id
|
|
98142
|
-
* @param {object} element
|
|
98143
|
-
*
|
|
98144
|
-
* @returns {string}
|
|
98131
|
+
/**
|
|
98132
|
+
* Accesses the global TooltipContext and returns a tooltip for a given id and element.
|
|
98133
|
+
*
|
|
98134
|
+
* @example
|
|
98135
|
+
* ```jsx
|
|
98136
|
+
* function TextField(props) {
|
|
98137
|
+
* const tooltip = useTooltipContext('input1', element);
|
|
98138
|
+
* }
|
|
98139
|
+
* ```
|
|
98140
|
+
*
|
|
98141
|
+
* @param {string} id
|
|
98142
|
+
* @param {object} element
|
|
98143
|
+
*
|
|
98144
|
+
* @returns {string}
|
|
98145
98145
|
*/
|
|
98146
98146
|
function useTooltipContext(id, element) {
|
|
98147
98147
|
const {
|
|
@@ -98294,20 +98294,20 @@
|
|
|
98294
98294
|
return `bio-properties-panel-${id}`;
|
|
98295
98295
|
}
|
|
98296
98296
|
|
|
98297
|
-
/**
|
|
98298
|
-
* Accesses the global DescriptionContext and returns a description for a given id and element.
|
|
98299
|
-
*
|
|
98300
|
-
* @example
|
|
98301
|
-
* ```jsx
|
|
98302
|
-
* function TextField(props) {
|
|
98303
|
-
* const description = useDescriptionContext('input1', element);
|
|
98304
|
-
* }
|
|
98305
|
-
* ```
|
|
98306
|
-
*
|
|
98307
|
-
* @param {string} id
|
|
98308
|
-
* @param {object} element
|
|
98309
|
-
*
|
|
98310
|
-
* @returns {string}
|
|
98297
|
+
/**
|
|
98298
|
+
* Accesses the global DescriptionContext and returns a description for a given id and element.
|
|
98299
|
+
*
|
|
98300
|
+
* @example
|
|
98301
|
+
* ```jsx
|
|
98302
|
+
* function TextField(props) {
|
|
98303
|
+
* const description = useDescriptionContext('input1', element);
|
|
98304
|
+
* }
|
|
98305
|
+
* ```
|
|
98306
|
+
*
|
|
98307
|
+
* @param {string} id
|
|
98308
|
+
* @param {object} element
|
|
98309
|
+
*
|
|
98310
|
+
* @returns {string}
|
|
98311
98311
|
*/
|
|
98312
98312
|
function useDescriptionContext(id, element) {
|
|
98313
98313
|
const {
|
|
@@ -98329,11 +98329,11 @@
|
|
|
98329
98329
|
return errors;
|
|
98330
98330
|
}
|
|
98331
98331
|
|
|
98332
|
-
/**
|
|
98333
|
-
* Subscribe to an event immediately. Update subscription after inputs changed.
|
|
98334
|
-
*
|
|
98335
|
-
* @param {string} event
|
|
98336
|
-
* @param {Function} callback
|
|
98332
|
+
/**
|
|
98333
|
+
* Subscribe to an event immediately. Update subscription after inputs changed.
|
|
98334
|
+
*
|
|
98335
|
+
* @param {string} event
|
|
98336
|
+
* @param {Function} callback
|
|
98337
98337
|
*/
|
|
98338
98338
|
function useEvent(event, callback, eventBus) {
|
|
98339
98339
|
const eventContext = q$1(EventContext);
|
|
@@ -98365,24 +98365,24 @@
|
|
|
98365
98365
|
|
|
98366
98366
|
const KEY_LENGTH = 6;
|
|
98367
98367
|
|
|
98368
|
-
/**
|
|
98369
|
-
* Create a persistent key factory for plain objects without id.
|
|
98370
|
-
*
|
|
98371
|
-
* @example
|
|
98372
|
-
* ```jsx
|
|
98373
|
-
* function List({ objects }) {
|
|
98374
|
-
* const getKey = useKeyFactory();
|
|
98375
|
-
* return (<ol>{
|
|
98376
|
-
* objects.map(obj => {
|
|
98377
|
-
* const key = getKey(obj);
|
|
98378
|
-
* return <li key={key}>obj.name</li>
|
|
98379
|
-
* })
|
|
98380
|
-
* }</ol>);
|
|
98381
|
-
* }
|
|
98382
|
-
* ```
|
|
98383
|
-
*
|
|
98384
|
-
* @param {any[]} dependencies
|
|
98385
|
-
* @returns {(element: object) => string}
|
|
98368
|
+
/**
|
|
98369
|
+
* Create a persistent key factory for plain objects without id.
|
|
98370
|
+
*
|
|
98371
|
+
* @example
|
|
98372
|
+
* ```jsx
|
|
98373
|
+
* function List({ objects }) {
|
|
98374
|
+
* const getKey = useKeyFactory();
|
|
98375
|
+
* return (<ol>{
|
|
98376
|
+
* objects.map(obj => {
|
|
98377
|
+
* const key = getKey(obj);
|
|
98378
|
+
* return <li key={key}>obj.name</li>
|
|
98379
|
+
* })
|
|
98380
|
+
* }</ol>);
|
|
98381
|
+
* }
|
|
98382
|
+
* ```
|
|
98383
|
+
*
|
|
98384
|
+
* @param {any[]} dependencies
|
|
98385
|
+
* @returns {(element: object) => string}
|
|
98386
98386
|
*/
|
|
98387
98387
|
function useKeyFactory(dependencies = []) {
|
|
98388
98388
|
const map = F$1(() => new Map(), dependencies);
|
|
@@ -98397,20 +98397,20 @@
|
|
|
98397
98397
|
return getKey;
|
|
98398
98398
|
}
|
|
98399
98399
|
|
|
98400
|
-
/**
|
|
98401
|
-
* Creates a state that persists in the global LayoutContext.
|
|
98402
|
-
*
|
|
98403
|
-
* @example
|
|
98404
|
-
* ```jsx
|
|
98405
|
-
* function Group(props) {
|
|
98406
|
-
* const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
|
|
98407
|
-
* }
|
|
98408
|
-
* ```
|
|
98409
|
-
*
|
|
98410
|
-
* @param {(string|number)[]} path
|
|
98411
|
-
* @param {any} [defaultValue]
|
|
98412
|
-
*
|
|
98413
|
-
* @returns {[ any, Function ]}
|
|
98400
|
+
/**
|
|
98401
|
+
* Creates a state that persists in the global LayoutContext.
|
|
98402
|
+
*
|
|
98403
|
+
* @example
|
|
98404
|
+
* ```jsx
|
|
98405
|
+
* function Group(props) {
|
|
98406
|
+
* const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
|
|
98407
|
+
* }
|
|
98408
|
+
* ```
|
|
98409
|
+
*
|
|
98410
|
+
* @param {(string|number)[]} path
|
|
98411
|
+
* @param {any} [defaultValue]
|
|
98412
|
+
*
|
|
98413
|
+
* @returns {[ any, Function ]}
|
|
98414
98414
|
*/
|
|
98415
98415
|
function useLayoutState(path, defaultValue) {
|
|
98416
98416
|
const {
|
|
@@ -98424,11 +98424,11 @@
|
|
|
98424
98424
|
return [layoutForKey, setState];
|
|
98425
98425
|
}
|
|
98426
98426
|
|
|
98427
|
-
/**
|
|
98428
|
-
* @pinussilvestrus: we need to introduce our own hook to persist the previous
|
|
98429
|
-
* state on updates.
|
|
98430
|
-
*
|
|
98431
|
-
* cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
|
|
98427
|
+
/**
|
|
98428
|
+
* @pinussilvestrus: we need to introduce our own hook to persist the previous
|
|
98429
|
+
* state on updates.
|
|
98430
|
+
*
|
|
98431
|
+
* cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
|
|
98432
98432
|
*/
|
|
98433
98433
|
|
|
98434
98434
|
function usePrevious(value) {
|
|
@@ -98439,12 +98439,12 @@
|
|
|
98439
98439
|
return ref.current;
|
|
98440
98440
|
}
|
|
98441
98441
|
|
|
98442
|
-
/**
|
|
98443
|
-
* Subscribe to `propertiesPanel.showEntry`.
|
|
98444
|
-
*
|
|
98445
|
-
* @param {string} id
|
|
98446
|
-
*
|
|
98447
|
-
* @returns {import('preact').Ref}
|
|
98442
|
+
/**
|
|
98443
|
+
* Subscribe to `propertiesPanel.showEntry`.
|
|
98444
|
+
*
|
|
98445
|
+
* @param {string} id
|
|
98446
|
+
*
|
|
98447
|
+
* @returns {import('preact').Ref}
|
|
98448
98448
|
*/
|
|
98449
98449
|
function useShowEntryEvent(id) {
|
|
98450
98450
|
const {
|
|
@@ -98475,20 +98475,20 @@
|
|
|
98475
98475
|
return ref;
|
|
98476
98476
|
}
|
|
98477
98477
|
|
|
98478
|
-
/**
|
|
98479
|
-
* @callback setSticky
|
|
98480
|
-
* @param {boolean} value
|
|
98478
|
+
/**
|
|
98479
|
+
* @callback setSticky
|
|
98480
|
+
* @param {boolean} value
|
|
98481
98481
|
*/
|
|
98482
98482
|
|
|
98483
|
-
/**
|
|
98484
|
-
* Use IntersectionObserver to identify when DOM element is in sticky mode.
|
|
98485
|
-
* If sticky is observered setSticky(true) will be called.
|
|
98486
|
-
* If sticky mode is left, setSticky(false) will be called.
|
|
98487
|
-
*
|
|
98488
|
-
*
|
|
98489
|
-
* @param {Object} ref
|
|
98490
|
-
* @param {string} scrollContainerSelector
|
|
98491
|
-
* @param {setSticky} setSticky
|
|
98483
|
+
/**
|
|
98484
|
+
* Use IntersectionObserver to identify when DOM element is in sticky mode.
|
|
98485
|
+
* If sticky is observered setSticky(true) will be called.
|
|
98486
|
+
* If sticky mode is left, setSticky(false) will be called.
|
|
98487
|
+
*
|
|
98488
|
+
*
|
|
98489
|
+
* @param {Object} ref
|
|
98490
|
+
* @param {string} scrollContainerSelector
|
|
98491
|
+
* @param {setSticky} setSticky
|
|
98492
98492
|
*/
|
|
98493
98493
|
function useStickyIntersectionObserver(ref, scrollContainerSelector, setSticky) {
|
|
98494
98494
|
const [scrollContainer, setScrollContainer] = h(query$1(scrollContainerSelector));
|
|
@@ -98542,19 +98542,19 @@
|
|
|
98542
98542
|
}, [ref.current, scrollContainer, setSticky]);
|
|
98543
98543
|
}
|
|
98544
98544
|
|
|
98545
|
-
/**
|
|
98546
|
-
* Creates a static function reference with changing body.
|
|
98547
|
-
* This is necessary when external libraries require a callback function
|
|
98548
|
-
* that has references to state variables.
|
|
98549
|
-
*
|
|
98550
|
-
* Usage:
|
|
98551
|
-
* const callback = useStaticCallback((val) => {val === currentState});
|
|
98552
|
-
*
|
|
98553
|
-
* The `callback` reference is static and can be safely used in external
|
|
98554
|
-
* libraries or as a prop that does not cause rerendering of children.
|
|
98555
|
-
*
|
|
98556
|
-
* @param {Function} callback function with changing reference
|
|
98557
|
-
* @returns {Function} static function reference
|
|
98545
|
+
/**
|
|
98546
|
+
* Creates a static function reference with changing body.
|
|
98547
|
+
* This is necessary when external libraries require a callback function
|
|
98548
|
+
* that has references to state variables.
|
|
98549
|
+
*
|
|
98550
|
+
* Usage:
|
|
98551
|
+
* const callback = useStaticCallback((val) => {val === currentState});
|
|
98552
|
+
*
|
|
98553
|
+
* The `callback` reference is static and can be safely used in external
|
|
98554
|
+
* libraries or as a prop that does not cause rerendering of children.
|
|
98555
|
+
*
|
|
98556
|
+
* @param {Function} callback function with changing reference
|
|
98557
|
+
* @returns {Function} static function reference
|
|
98558
98558
|
*/
|
|
98559
98559
|
function useStaticCallback(callback) {
|
|
98560
98560
|
const callbackRef = _(callback);
|
|
@@ -98697,13 +98697,13 @@
|
|
|
98697
98697
|
return null;
|
|
98698
98698
|
}
|
|
98699
98699
|
|
|
98700
|
-
/**
|
|
98701
|
-
* @typedef { {
|
|
98702
|
-
* text: (element: object) => string,
|
|
98703
|
-
* icon?: (element: Object) => import('preact').Component
|
|
98704
|
-
* } } PlaceholderDefinition
|
|
98705
|
-
*
|
|
98706
|
-
* @param { PlaceholderDefinition } props
|
|
98700
|
+
/**
|
|
98701
|
+
* @typedef { {
|
|
98702
|
+
* text: (element: object) => string,
|
|
98703
|
+
* icon?: (element: Object) => import('preact').Component
|
|
98704
|
+
* } } PlaceholderDefinition
|
|
98705
|
+
*
|
|
98706
|
+
* @param { PlaceholderDefinition } props
|
|
98707
98707
|
*/
|
|
98708
98708
|
function Placeholder(props) {
|
|
98709
98709
|
const {
|
|
@@ -98742,9 +98742,9 @@
|
|
|
98742
98742
|
|
|
98743
98743
|
const noop$6 = () => {};
|
|
98744
98744
|
|
|
98745
|
-
/**
|
|
98746
|
-
* Buffer `.focus()` calls while the editor is not initialized.
|
|
98747
|
-
* Set Focus inside when the editor is ready.
|
|
98745
|
+
/**
|
|
98746
|
+
* Buffer `.focus()` calls while the editor is not initialized.
|
|
98747
|
+
* Set Focus inside when the editor is ready.
|
|
98748
98748
|
*/
|
|
98749
98749
|
const useBufferedFocus$1 = function (editor, ref) {
|
|
98750
98750
|
const [buffer, setBuffer] = h(undefined);
|
|
@@ -98845,9 +98845,9 @@
|
|
|
98845
98845
|
|
|
98846
98846
|
const noop$5 = () => {};
|
|
98847
98847
|
|
|
98848
|
-
/**
|
|
98849
|
-
* Buffer `.focus()` calls while the editor is not initialized.
|
|
98850
|
-
* Set Focus inside when the editor is ready.
|
|
98848
|
+
/**
|
|
98849
|
+
* Buffer `.focus()` calls while the editor is not initialized.
|
|
98850
|
+
* Set Focus inside when the editor is ready.
|
|
98851
98851
|
*/
|
|
98852
98852
|
const useBufferedFocus = function (editor, ref) {
|
|
98853
98853
|
const [buffer, setBuffer] = h(undefined);
|
|
@@ -98896,10 +98896,10 @@
|
|
|
98896
98896
|
p$1(() => {
|
|
98897
98897
|
let editor;
|
|
98898
98898
|
|
|
98899
|
-
/* Trigger FEEL toggle when
|
|
98900
|
-
*
|
|
98901
|
-
* - `backspace` is pressed
|
|
98902
|
-
* - AND the cursor is at the beginning of the input
|
|
98899
|
+
/* Trigger FEEL toggle when
|
|
98900
|
+
*
|
|
98901
|
+
* - `backspace` is pressed
|
|
98902
|
+
* - AND the cursor is at the beginning of the input
|
|
98903
98903
|
*/
|
|
98904
98904
|
const onKeyDown = e => {
|
|
98905
98905
|
if (e.key !== 'Backspace' || !editor) {
|
|
@@ -98981,22 +98981,22 @@
|
|
|
98981
98981
|
source: null
|
|
98982
98982
|
});
|
|
98983
98983
|
|
|
98984
|
-
/**
|
|
98985
|
-
* Add a dragger that calls back the passed function with
|
|
98986
|
-
* { event, delta } on drag.
|
|
98987
|
-
*
|
|
98988
|
-
* @example
|
|
98989
|
-
*
|
|
98990
|
-
* function dragMove(event, delta) {
|
|
98991
|
-
* // we are dragging (!!)
|
|
98992
|
-
* }
|
|
98993
|
-
*
|
|
98994
|
-
* domElement.addEventListener('dragstart', dragger(dragMove));
|
|
98995
|
-
*
|
|
98996
|
-
* @param {Function} fn
|
|
98997
|
-
* @param {Element} [dragPreview]
|
|
98998
|
-
*
|
|
98999
|
-
* @return {Function} drag start callback function
|
|
98984
|
+
/**
|
|
98985
|
+
* Add a dragger that calls back the passed function with
|
|
98986
|
+
* { event, delta } on drag.
|
|
98987
|
+
*
|
|
98988
|
+
* @example
|
|
98989
|
+
*
|
|
98990
|
+
* function dragMove(event, delta) {
|
|
98991
|
+
* // we are dragging (!!)
|
|
98992
|
+
* }
|
|
98993
|
+
*
|
|
98994
|
+
* domElement.addEventListener('dragstart', dragger(dragMove));
|
|
98995
|
+
*
|
|
98996
|
+
* @param {Function} fn
|
|
98997
|
+
* @param {Element} [dragPreview]
|
|
98998
|
+
*
|
|
98999
|
+
* @return {Function} drag start callback function
|
|
99000
99000
|
*/
|
|
99001
99001
|
function createDragger(fn, dragPreview) {
|
|
99002
99002
|
let self;
|
|
@@ -99051,23 +99051,23 @@
|
|
|
99051
99051
|
|
|
99052
99052
|
const noop$3 = () => {};
|
|
99053
99053
|
|
|
99054
|
-
/**
|
|
99055
|
-
* A generic popup component.
|
|
99056
|
-
*
|
|
99057
|
-
* @param {Object} props
|
|
99058
|
-
* @param {HTMLElement} [props.container]
|
|
99059
|
-
* @param {string} [props.className]
|
|
99060
|
-
* @param {boolean} [props.delayInitialFocus]
|
|
99061
|
-
* @param {{x: number, y: number}} [props.position]
|
|
99062
|
-
* @param {number} [props.width]
|
|
99063
|
-
* @param {number} [props.height]
|
|
99064
|
-
* @param {Function} props.onClose
|
|
99065
|
-
* @param {Function} [props.onPostActivate]
|
|
99066
|
-
* @param {Function} [props.onPostDeactivate]
|
|
99067
|
-
* @param {boolean} [props.returnFocus]
|
|
99068
|
-
* @param {boolean} [props.closeOnEscape]
|
|
99069
|
-
* @param {string} props.title
|
|
99070
|
-
* @param {Ref} [ref]
|
|
99054
|
+
/**
|
|
99055
|
+
* A generic popup component.
|
|
99056
|
+
*
|
|
99057
|
+
* @param {Object} props
|
|
99058
|
+
* @param {HTMLElement} [props.container]
|
|
99059
|
+
* @param {string} [props.className]
|
|
99060
|
+
* @param {boolean} [props.delayInitialFocus]
|
|
99061
|
+
* @param {{x: number, y: number}} [props.position]
|
|
99062
|
+
* @param {number} [props.width]
|
|
99063
|
+
* @param {number} [props.height]
|
|
99064
|
+
* @param {Function} props.onClose
|
|
99065
|
+
* @param {Function} [props.onPostActivate]
|
|
99066
|
+
* @param {Function} [props.onPostDeactivate]
|
|
99067
|
+
* @param {boolean} [props.returnFocus]
|
|
99068
|
+
* @param {boolean} [props.closeOnEscape]
|
|
99069
|
+
* @param {string} props.title
|
|
99070
|
+
* @param {Ref} [ref]
|
|
99071
99071
|
*/
|
|
99072
99072
|
function PopupComponent(props, globalRef) {
|
|
99073
99073
|
const {
|
|
@@ -99286,12 +99286,12 @@
|
|
|
99286
99286
|
const FEEL_POPUP_WIDTH = 700;
|
|
99287
99287
|
const FEEL_POPUP_HEIGHT = 250;
|
|
99288
99288
|
|
|
99289
|
-
/**
|
|
99290
|
-
* FEEL popup component, built as a singleton. Emits lifecycle events as follows:
|
|
99291
|
-
* - `feelPopup.open` - fired before the popup is mounted
|
|
99292
|
-
* - `feelPopup.opened` - fired after the popup is mounted. Event context contains the DOM node of the popup
|
|
99293
|
-
* - `feelPopup.close` - fired before the popup is unmounted. Event context contains the DOM node of the popup
|
|
99294
|
-
* - `feelPopup.closed` - fired after the popup is unmounted
|
|
99289
|
+
/**
|
|
99290
|
+
* FEEL popup component, built as a singleton. Emits lifecycle events as follows:
|
|
99291
|
+
* - `feelPopup.open` - fired before the popup is mounted
|
|
99292
|
+
* - `feelPopup.opened` - fired after the popup is mounted. Event context contains the DOM node of the popup
|
|
99293
|
+
* - `feelPopup.close` - fired before the popup is unmounted. Event context contains the DOM node of the popup
|
|
99294
|
+
* - `feelPopup.closed` - fired after the popup is unmounted
|
|
99295
99295
|
*/
|
|
99296
99296
|
function FEELPopupRoot(props) {
|
|
99297
99297
|
const {
|
|
@@ -99514,11 +99514,11 @@
|
|
|
99514
99514
|
return element.closest('.cm-editor').querySelector('.cm-tooltip-autocomplete');
|
|
99515
99515
|
}
|
|
99516
99516
|
|
|
99517
|
-
/**
|
|
99518
|
-
* This hook behaves like useEffect, but does not trigger on the first render.
|
|
99519
|
-
*
|
|
99520
|
-
* @param {Function} effect
|
|
99521
|
-
* @param {Array} deps
|
|
99517
|
+
/**
|
|
99518
|
+
* This hook behaves like useEffect, but does not trigger on the first render.
|
|
99519
|
+
*
|
|
99520
|
+
* @param {Function} effect
|
|
99521
|
+
* @param {Array} deps
|
|
99522
99522
|
*/
|
|
99523
99523
|
function useUpdateEffect(effect, deps) {
|
|
99524
99524
|
const isMounted = _(false);
|
|
@@ -99596,19 +99596,19 @@
|
|
|
99596
99596
|
});
|
|
99597
99597
|
}
|
|
99598
99598
|
|
|
99599
|
-
/**
|
|
99600
|
-
* @param {Object} props
|
|
99601
|
-
* @param {Object} props.element
|
|
99602
|
-
* @param {String} props.id
|
|
99603
|
-
* @param {String} props.description
|
|
99604
|
-
* @param {String} props.label
|
|
99605
|
-
* @param {String} props.switcherLabel
|
|
99606
|
-
* @param {Boolean} props.inline
|
|
99607
|
-
* @param {Function} props.getValue
|
|
99608
|
-
* @param {Function} props.setValue
|
|
99609
|
-
* @param {Function} props.onFocus
|
|
99610
|
-
* @param {Function} props.onBlur
|
|
99611
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
99599
|
+
/**
|
|
99600
|
+
* @param {Object} props
|
|
99601
|
+
* @param {Object} props.element
|
|
99602
|
+
* @param {String} props.id
|
|
99603
|
+
* @param {String} props.description
|
|
99604
|
+
* @param {String} props.label
|
|
99605
|
+
* @param {String} props.switcherLabel
|
|
99606
|
+
* @param {Boolean} props.inline
|
|
99607
|
+
* @param {Function} props.getValue
|
|
99608
|
+
* @param {Function} props.setValue
|
|
99609
|
+
* @param {Function} props.onFocus
|
|
99610
|
+
* @param {Function} props.onBlur
|
|
99611
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
99612
99612
|
*/
|
|
99613
99613
|
function ToggleSwitchEntry(props) {
|
|
99614
99614
|
const {
|
|
@@ -99934,84 +99934,84 @@
|
|
|
99934
99934
|
const DEFAULT_DESCRIPTION = {};
|
|
99935
99935
|
const DEFAULT_TOOLTIP = {};
|
|
99936
99936
|
|
|
99937
|
-
/**
|
|
99938
|
-
* @typedef { {
|
|
99939
|
-
* component: import('preact').Component,
|
|
99940
|
-
* id: String,
|
|
99941
|
-
* isEdited?: Function
|
|
99942
|
-
* } } EntryDefinition
|
|
99943
|
-
*
|
|
99944
|
-
* @typedef { {
|
|
99945
|
-
* autoFocusEntry: String,
|
|
99946
|
-
* autoOpen?: Boolean,
|
|
99947
|
-
* entries: Array<EntryDefinition>,
|
|
99948
|
-
* id: String,
|
|
99949
|
-
* label: String,
|
|
99950
|
-
* remove: (event: MouseEvent) => void
|
|
99951
|
-
* } } ListItemDefinition
|
|
99952
|
-
*
|
|
99953
|
-
* @typedef { {
|
|
99954
|
-
* add: (event: MouseEvent) => void,
|
|
99955
|
-
* component: import('preact').Component,
|
|
99956
|
-
* element: Object,
|
|
99957
|
-
* id: String,
|
|
99958
|
-
* items: Array<ListItemDefinition>,
|
|
99959
|
-
* label: String,
|
|
99960
|
-
* shouldOpen?: Boolean
|
|
99961
|
-
* } } ListGroupDefinition
|
|
99962
|
-
*
|
|
99963
|
-
* @typedef { {
|
|
99964
|
-
* component?: import('preact').Component,
|
|
99965
|
-
* entries: Array<EntryDefinition>,
|
|
99966
|
-
* id: String,
|
|
99967
|
-
* label: String,
|
|
99968
|
-
* shouldOpen?: Boolean
|
|
99969
|
-
* } } GroupDefinition
|
|
99970
|
-
*
|
|
99971
|
-
* @typedef { {
|
|
99972
|
-
* [id: String]: GetDescriptionFunction
|
|
99973
|
-
* } } DescriptionConfig
|
|
99974
|
-
*
|
|
99975
|
-
* @typedef { {
|
|
99976
|
-
* [id: String]: GetTooltipFunction
|
|
99977
|
-
* } } TooltipConfig
|
|
99978
|
-
*
|
|
99979
|
-
* @callback { {
|
|
99980
|
-
* @param {string} id
|
|
99981
|
-
* @param {Object} element
|
|
99982
|
-
* @returns {string}
|
|
99983
|
-
* } } GetDescriptionFunction
|
|
99984
|
-
*
|
|
99985
|
-
* @callback { {
|
|
99986
|
-
* @param {string} id
|
|
99987
|
-
* @param {Object} element
|
|
99988
|
-
* @returns {string}
|
|
99989
|
-
* } } GetTooltipFunction
|
|
99990
|
-
*
|
|
99991
|
-
* @typedef { {
|
|
99992
|
-
* getEmpty: (element: object) => import('./components/Placeholder').PlaceholderDefinition,
|
|
99993
|
-
* getMultiple: (element: Object) => import('./components/Placeholder').PlaceholderDefinition
|
|
99994
|
-
* } } PlaceholderProvider
|
|
99995
|
-
*
|
|
99937
|
+
/**
|
|
99938
|
+
* @typedef { {
|
|
99939
|
+
* component: import('preact').Component,
|
|
99940
|
+
* id: String,
|
|
99941
|
+
* isEdited?: Function
|
|
99942
|
+
* } } EntryDefinition
|
|
99943
|
+
*
|
|
99944
|
+
* @typedef { {
|
|
99945
|
+
* autoFocusEntry: String,
|
|
99946
|
+
* autoOpen?: Boolean,
|
|
99947
|
+
* entries: Array<EntryDefinition>,
|
|
99948
|
+
* id: String,
|
|
99949
|
+
* label: String,
|
|
99950
|
+
* remove: (event: MouseEvent) => void
|
|
99951
|
+
* } } ListItemDefinition
|
|
99952
|
+
*
|
|
99953
|
+
* @typedef { {
|
|
99954
|
+
* add: (event: MouseEvent) => void,
|
|
99955
|
+
* component: import('preact').Component,
|
|
99956
|
+
* element: Object,
|
|
99957
|
+
* id: String,
|
|
99958
|
+
* items: Array<ListItemDefinition>,
|
|
99959
|
+
* label: String,
|
|
99960
|
+
* shouldOpen?: Boolean
|
|
99961
|
+
* } } ListGroupDefinition
|
|
99962
|
+
*
|
|
99963
|
+
* @typedef { {
|
|
99964
|
+
* component?: import('preact').Component,
|
|
99965
|
+
* entries: Array<EntryDefinition>,
|
|
99966
|
+
* id: String,
|
|
99967
|
+
* label: String,
|
|
99968
|
+
* shouldOpen?: Boolean
|
|
99969
|
+
* } } GroupDefinition
|
|
99970
|
+
*
|
|
99971
|
+
* @typedef { {
|
|
99972
|
+
* [id: String]: GetDescriptionFunction
|
|
99973
|
+
* } } DescriptionConfig
|
|
99974
|
+
*
|
|
99975
|
+
* @typedef { {
|
|
99976
|
+
* [id: String]: GetTooltipFunction
|
|
99977
|
+
* } } TooltipConfig
|
|
99978
|
+
*
|
|
99979
|
+
* @callback { {
|
|
99980
|
+
* @param {string} id
|
|
99981
|
+
* @param {Object} element
|
|
99982
|
+
* @returns {string}
|
|
99983
|
+
* } } GetDescriptionFunction
|
|
99984
|
+
*
|
|
99985
|
+
* @callback { {
|
|
99986
|
+
* @param {string} id
|
|
99987
|
+
* @param {Object} element
|
|
99988
|
+
* @returns {string}
|
|
99989
|
+
* } } GetTooltipFunction
|
|
99990
|
+
*
|
|
99991
|
+
* @typedef { {
|
|
99992
|
+
* getEmpty: (element: object) => import('./components/Placeholder').PlaceholderDefinition,
|
|
99993
|
+
* getMultiple: (element: Object) => import('./components/Placeholder').PlaceholderDefinition
|
|
99994
|
+
* } } PlaceholderProvider
|
|
99995
|
+
*
|
|
99996
99996
|
*/
|
|
99997
99997
|
|
|
99998
|
-
/**
|
|
99999
|
-
* A basic properties panel component. Describes *how* content will be rendered, accepts
|
|
100000
|
-
* data from implementor to describe *what* will be rendered.
|
|
100001
|
-
*
|
|
100002
|
-
* @param {Object} props
|
|
100003
|
-
* @param {Object|Array} props.element
|
|
100004
|
-
* @param {import('./components/Header').HeaderProvider} props.headerProvider
|
|
100005
|
-
* @param {PlaceholderProvider} [props.placeholderProvider]
|
|
100006
|
-
* @param {Array<GroupDefinition|ListGroupDefinition>} props.groups
|
|
100007
|
-
* @param {Object} [props.layoutConfig]
|
|
100008
|
-
* @param {Function} [props.layoutChanged]
|
|
100009
|
-
* @param {DescriptionConfig} [props.descriptionConfig]
|
|
100010
|
-
* @param {Function} [props.descriptionLoaded]
|
|
100011
|
-
* @param {TooltipConfig} [props.tooltipConfig]
|
|
100012
|
-
* @param {Function} [props.tooltipLoaded]
|
|
100013
|
-
* @param {HTMLElement} [props.feelPopupContainer]
|
|
100014
|
-
* @param {Object} [props.eventBus]
|
|
99998
|
+
/**
|
|
99999
|
+
* A basic properties panel component. Describes *how* content will be rendered, accepts
|
|
100000
|
+
* data from implementor to describe *what* will be rendered.
|
|
100001
|
+
*
|
|
100002
|
+
* @param {Object} props
|
|
100003
|
+
* @param {Object|Array} props.element
|
|
100004
|
+
* @param {import('./components/Header').HeaderProvider} props.headerProvider
|
|
100005
|
+
* @param {PlaceholderProvider} [props.placeholderProvider]
|
|
100006
|
+
* @param {Array<GroupDefinition|ListGroupDefinition>} props.groups
|
|
100007
|
+
* @param {Object} [props.layoutConfig]
|
|
100008
|
+
* @param {Function} [props.layoutChanged]
|
|
100009
|
+
* @param {DescriptionConfig} [props.descriptionConfig]
|
|
100010
|
+
* @param {Function} [props.descriptionLoaded]
|
|
100011
|
+
* @param {TooltipConfig} [props.tooltipConfig]
|
|
100012
|
+
* @param {Function} [props.tooltipLoaded]
|
|
100013
|
+
* @param {HTMLElement} [props.feelPopupContainer]
|
|
100014
|
+
* @param {Object} [props.eventBus]
|
|
100015
100015
|
*/
|
|
100016
100016
|
function PropertiesPanel(props) {
|
|
100017
100017
|
const {
|
|
@@ -100182,11 +100182,11 @@
|
|
|
100182
100182
|
|
|
100183
100183
|
// hooks //////////////////
|
|
100184
100184
|
|
|
100185
|
-
/**
|
|
100186
|
-
* This hook behaves like useLayoutEffect, but does not trigger on the first render.
|
|
100187
|
-
*
|
|
100188
|
-
* @param {Function} effect
|
|
100189
|
-
* @param {Array} deps
|
|
100185
|
+
/**
|
|
100186
|
+
* This hook behaves like useLayoutEffect, but does not trigger on the first render.
|
|
100187
|
+
*
|
|
100188
|
+
* @param {Function} effect
|
|
100189
|
+
* @param {Array} deps
|
|
100190
100190
|
*/
|
|
100191
100191
|
function useUpdateLayoutEffect(effect, deps) {
|
|
100192
100192
|
const isMounted = _(false);
|
|
@@ -100261,15 +100261,15 @@
|
|
|
100261
100261
|
});
|
|
100262
100262
|
}
|
|
100263
100263
|
|
|
100264
|
-
/**
|
|
100265
|
-
*
|
|
100266
|
-
* @param {Array<null | Element>} ignoredElements
|
|
100267
|
-
* @param {Function} callback
|
|
100264
|
+
/**
|
|
100265
|
+
*
|
|
100266
|
+
* @param {Array<null | Element>} ignoredElements
|
|
100267
|
+
* @param {Function} callback
|
|
100268
100268
|
*/
|
|
100269
100269
|
function useGlobalClick(ignoredElements, callback) {
|
|
100270
100270
|
p$1(() => {
|
|
100271
|
-
/**
|
|
100272
|
-
* @param {MouseEvent} event
|
|
100271
|
+
/**
|
|
100272
|
+
* @param {MouseEvent} event
|
|
100273
100273
|
*/
|
|
100274
100274
|
function listener(event) {
|
|
100275
100275
|
if (ignoredElements.some(element => element && element.contains(event.target))) {
|
|
@@ -100302,20 +100302,20 @@
|
|
|
100302
100302
|
});
|
|
100303
100303
|
}
|
|
100304
100304
|
|
|
100305
|
-
/**
|
|
100306
|
-
* @typedef { {
|
|
100307
|
-
* [key: string]: string;
|
|
100308
|
-
* } } TranslateReplacements
|
|
100305
|
+
/**
|
|
100306
|
+
* @typedef { {
|
|
100307
|
+
* [key: string]: string;
|
|
100308
|
+
* } } TranslateReplacements
|
|
100309
100309
|
*/
|
|
100310
100310
|
|
|
100311
|
-
/**
|
|
100312
|
-
* A simple translation stub to be used for multi-language support.
|
|
100313
|
-
* Can be easily replaced with a more sophisticated solution.
|
|
100314
|
-
*
|
|
100315
|
-
* @param {string} template to interpolate
|
|
100316
|
-
* @param {TranslateReplacements} [replacements] a map with substitutes
|
|
100317
|
-
*
|
|
100318
|
-
* @return {string} the translated string
|
|
100311
|
+
/**
|
|
100312
|
+
* A simple translation stub to be used for multi-language support.
|
|
100313
|
+
* Can be easily replaced with a more sophisticated solution.
|
|
100314
|
+
*
|
|
100315
|
+
* @param {string} template to interpolate
|
|
100316
|
+
* @param {TranslateReplacements} [replacements] a map with substitutes
|
|
100317
|
+
*
|
|
100318
|
+
* @return {string} the translated string
|
|
100319
100319
|
*/
|
|
100320
100320
|
function translateFallback(template, replacements) {
|
|
100321
100321
|
replacements = replacements || {};
|
|
@@ -100427,8 +100427,8 @@
|
|
|
100427
100427
|
|
|
100428
100428
|
const noop$1 = () => {};
|
|
100429
100429
|
|
|
100430
|
-
/**
|
|
100431
|
-
* @param {import('../PropertiesPanel').ListGroupDefinition} props
|
|
100430
|
+
/**
|
|
100431
|
+
* @param {import('../PropertiesPanel').ListGroupDefinition} props
|
|
100432
100432
|
*/
|
|
100433
100433
|
function ListGroup(props) {
|
|
100434
100434
|
const {
|
|
@@ -100620,18 +100620,18 @@
|
|
|
100620
100620
|
});
|
|
100621
100621
|
}
|
|
100622
100622
|
|
|
100623
|
-
/**
|
|
100624
|
-
* @param {Object} props
|
|
100625
|
-
* @param {Object} props.element
|
|
100626
|
-
* @param {String} props.id
|
|
100627
|
-
* @param {String} props.description
|
|
100628
|
-
* @param {String} props.label
|
|
100629
|
-
* @param {Function} props.getValue
|
|
100630
|
-
* @param {Function} props.setValue
|
|
100631
|
-
* @param {Function} props.onFocus
|
|
100632
|
-
* @param {Function} props.onBlur
|
|
100633
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
100634
|
-
* @param {boolean} [props.disabled]
|
|
100623
|
+
/**
|
|
100624
|
+
* @param {Object} props
|
|
100625
|
+
* @param {Object} props.element
|
|
100626
|
+
* @param {String} props.id
|
|
100627
|
+
* @param {String} props.description
|
|
100628
|
+
* @param {String} props.label
|
|
100629
|
+
* @param {Function} props.getValue
|
|
100630
|
+
* @param {Function} props.setValue
|
|
100631
|
+
* @param {Function} props.onFocus
|
|
100632
|
+
* @param {Function} props.onBlur
|
|
100633
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
100634
|
+
* @param {boolean} [props.disabled]
|
|
100635
100635
|
*/
|
|
100636
100636
|
function CheckboxEntry(props) {
|
|
100637
100637
|
const {
|
|
@@ -100705,8 +100705,8 @@
|
|
|
100705
100705
|
}
|
|
100706
100706
|
}, [open, hasItems]);
|
|
100707
100707
|
|
|
100708
|
-
/**
|
|
100709
|
-
* @param {MouseEvent} event
|
|
100708
|
+
/**
|
|
100709
|
+
* @param {MouseEvent} event
|
|
100710
100710
|
*/
|
|
100711
100711
|
function addItem(event) {
|
|
100712
100712
|
event.stopPropagation();
|
|
@@ -100898,20 +100898,20 @@
|
|
|
100898
100898
|
});
|
|
100899
100899
|
}
|
|
100900
100900
|
|
|
100901
|
-
/**
|
|
100902
|
-
* @param {object} props
|
|
100903
|
-
* @param {object} props.element
|
|
100904
|
-
* @param {string} props.id
|
|
100905
|
-
* @param {string} [props.description]
|
|
100906
|
-
* @param {string} props.label
|
|
100907
|
-
* @param {Function} props.getValue
|
|
100908
|
-
* @param {Function} props.setValue
|
|
100909
|
-
* @param {Function} props.onFocus
|
|
100910
|
-
* @param {Function} props.onBlur
|
|
100911
|
-
* @param {Function} props.getOptions
|
|
100912
|
-
* @param {boolean} [props.disabled]
|
|
100913
|
-
* @param {Function} [props.validate]
|
|
100914
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
100901
|
+
/**
|
|
100902
|
+
* @param {object} props
|
|
100903
|
+
* @param {object} props.element
|
|
100904
|
+
* @param {string} props.id
|
|
100905
|
+
* @param {string} [props.description]
|
|
100906
|
+
* @param {string} props.label
|
|
100907
|
+
* @param {Function} props.getValue
|
|
100908
|
+
* @param {Function} props.setValue
|
|
100909
|
+
* @param {Function} props.onFocus
|
|
100910
|
+
* @param {Function} props.onBlur
|
|
100911
|
+
* @param {Function} props.getOptions
|
|
100912
|
+
* @param {boolean} [props.disabled]
|
|
100913
|
+
* @param {Function} [props.validate]
|
|
100914
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
100915
100915
|
*/
|
|
100916
100916
|
function SelectEntry(props) {
|
|
100917
100917
|
const {
|
|
@@ -101107,21 +101107,21 @@
|
|
|
101107
101107
|
});
|
|
101108
101108
|
}
|
|
101109
101109
|
|
|
101110
|
-
/**
|
|
101111
|
-
* @param {object} props
|
|
101112
|
-
* @param {object} props.element
|
|
101113
|
-
* @param {string} props.id
|
|
101114
|
-
* @param {string} props.description
|
|
101115
|
-
* @param {boolean} props.debounce
|
|
101116
|
-
* @param {string} props.label
|
|
101117
|
-
* @param {Function} props.getValue
|
|
101118
|
-
* @param {Function} props.setValue
|
|
101119
|
-
* @param {Function} props.onFocus
|
|
101120
|
-
* @param {Function} props.onBlur
|
|
101121
|
-
* @param {number} props.rows
|
|
101122
|
-
* @param {boolean} props.monospace
|
|
101123
|
-
* @param {Function} [props.validate]
|
|
101124
|
-
* @param {boolean} [props.disabled]
|
|
101110
|
+
/**
|
|
101111
|
+
* @param {object} props
|
|
101112
|
+
* @param {object} props.element
|
|
101113
|
+
* @param {string} props.id
|
|
101114
|
+
* @param {string} props.description
|
|
101115
|
+
* @param {boolean} props.debounce
|
|
101116
|
+
* @param {string} props.label
|
|
101117
|
+
* @param {Function} props.getValue
|
|
101118
|
+
* @param {Function} props.setValue
|
|
101119
|
+
* @param {Function} props.onFocus
|
|
101120
|
+
* @param {Function} props.onBlur
|
|
101121
|
+
* @param {number} props.rows
|
|
101122
|
+
* @param {boolean} props.monospace
|
|
101123
|
+
* @param {Function} [props.validate]
|
|
101124
|
+
* @param {boolean} [props.disabled]
|
|
101125
101125
|
*/
|
|
101126
101126
|
function TextAreaEntry(props) {
|
|
101127
101127
|
const {
|
|
@@ -101255,20 +101255,20 @@
|
|
|
101255
101255
|
});
|
|
101256
101256
|
}
|
|
101257
101257
|
|
|
101258
|
-
/**
|
|
101259
|
-
* @param {Object} props
|
|
101260
|
-
* @param {Object} props.element
|
|
101261
|
-
* @param {String} props.id
|
|
101262
|
-
* @param {String} props.description
|
|
101263
|
-
* @param {Boolean} props.debounce
|
|
101264
|
-
* @param {Boolean} props.disabled
|
|
101265
|
-
* @param {String} props.label
|
|
101266
|
-
* @param {Function} props.getValue
|
|
101267
|
-
* @param {Function} props.setValue
|
|
101268
|
-
* @param {Function} props.onFocus
|
|
101269
|
-
* @param {Function} props.onBlur
|
|
101270
|
-
* @param {string|import('preact').Component} props.tooltip
|
|
101271
|
-
* @param {Function} props.validate
|
|
101258
|
+
/**
|
|
101259
|
+
* @param {Object} props
|
|
101260
|
+
* @param {Object} props.element
|
|
101261
|
+
* @param {String} props.id
|
|
101262
|
+
* @param {String} props.description
|
|
101263
|
+
* @param {Boolean} props.debounce
|
|
101264
|
+
* @param {Boolean} props.disabled
|
|
101265
|
+
* @param {String} props.label
|
|
101266
|
+
* @param {Function} props.getValue
|
|
101267
|
+
* @param {Function} props.setValue
|
|
101268
|
+
* @param {Function} props.onFocus
|
|
101269
|
+
* @param {Function} props.onBlur
|
|
101270
|
+
* @param {string|import('preact').Component} props.tooltip
|
|
101271
|
+
* @param {Function} props.validate
|
|
101272
101272
|
*/
|
|
101273
101273
|
function TextfieldEntry(props) {
|
|
101274
101274
|
const {
|
|
@@ -101361,20 +101361,20 @@
|
|
|
101361
101361
|
this._eventBus = eventBus;
|
|
101362
101362
|
}
|
|
101363
101363
|
|
|
101364
|
-
/**
|
|
101365
|
-
* Check if the FEEL popup is open.
|
|
101366
|
-
* @return {Boolean}
|
|
101364
|
+
/**
|
|
101365
|
+
* Check if the FEEL popup is open.
|
|
101366
|
+
* @return {Boolean}
|
|
101367
101367
|
*/
|
|
101368
101368
|
isOpen() {
|
|
101369
101369
|
return this._eventBus.fire('feelPopup._isOpen');
|
|
101370
101370
|
}
|
|
101371
101371
|
|
|
101372
|
-
/**
|
|
101373
|
-
* Open the FEEL popup.
|
|
101374
|
-
*
|
|
101375
|
-
* @param {String} entryId
|
|
101376
|
-
* @param {Object} popupConfig
|
|
101377
|
-
* @param {HTMLElement} sourceElement
|
|
101372
|
+
/**
|
|
101373
|
+
* Open the FEEL popup.
|
|
101374
|
+
*
|
|
101375
|
+
* @param {String} entryId
|
|
101376
|
+
* @param {Object} popupConfig
|
|
101377
|
+
* @param {HTMLElement} sourceElement
|
|
101378
101378
|
*/
|
|
101379
101379
|
open(entryId, popupConfig, sourceElement) {
|
|
101380
101380
|
return this._eventBus.fire('feelPopup._open', {
|
|
@@ -101384,8 +101384,8 @@
|
|
|
101384
101384
|
});
|
|
101385
101385
|
}
|
|
101386
101386
|
|
|
101387
|
-
/**
|
|
101388
|
-
* Close the FEEL popup.
|
|
101387
|
+
/**
|
|
101388
|
+
* Close the FEEL popup.
|
|
101389
101389
|
*/
|
|
101390
101390
|
close() {
|
|
101391
101391
|
return this._eventBus.fire('feelPopup._close');
|
|
@@ -105193,8 +105193,8 @@
|
|
|
105193
105193
|
});
|
|
105194
105194
|
const selectedElement = state.selectedElement;
|
|
105195
105195
|
|
|
105196
|
-
/**
|
|
105197
|
-
* @param {djs.model.Base | Array<djs.model.Base>} element
|
|
105196
|
+
/**
|
|
105197
|
+
* @param {djs.model.Base | Array<djs.model.Base>} element
|
|
105198
105198
|
*/
|
|
105199
105199
|
const _update = element => {
|
|
105200
105200
|
if (!element) {
|
|
@@ -105379,10 +105379,10 @@
|
|
|
105379
105379
|
|
|
105380
105380
|
const DEFAULT_PRIORITY$1 = 1000;
|
|
105381
105381
|
|
|
105382
|
-
/**
|
|
105383
|
-
* @typedef { import('@bpmn-io/properties-panel').GroupDefinition } GroupDefinition
|
|
105384
|
-
* @typedef { import('@bpmn-io/properties-panel').ListGroupDefinition } ListGroupDefinition
|
|
105385
|
-
* @typedef { { getGroups: (ModdleElement) => (Array{GroupDefinition|ListGroupDefinition}) => Array{GroupDefinition|ListGroupDefinition}) } PropertiesProvider
|
|
105382
|
+
/**
|
|
105383
|
+
* @typedef { import('@bpmn-io/properties-panel').GroupDefinition } GroupDefinition
|
|
105384
|
+
* @typedef { import('@bpmn-io/properties-panel').ListGroupDefinition } ListGroupDefinition
|
|
105385
|
+
* @typedef { { getGroups: (ModdleElement) => (Array{GroupDefinition|ListGroupDefinition}) => Array{GroupDefinition|ListGroupDefinition}) } PropertiesProvider
|
|
105386
105386
|
*/
|
|
105387
105387
|
|
|
105388
105388
|
class BpmnPropertiesPanelRenderer {
|
|
@@ -105419,10 +105419,10 @@
|
|
|
105419
105419
|
});
|
|
105420
105420
|
}
|
|
105421
105421
|
|
|
105422
|
-
/**
|
|
105423
|
-
* Attach the properties panel to a parent node.
|
|
105424
|
-
*
|
|
105425
|
-
* @param {HTMLElement} container
|
|
105422
|
+
/**
|
|
105423
|
+
* Attach the properties panel to a parent node.
|
|
105424
|
+
*
|
|
105425
|
+
* @param {HTMLElement} container
|
|
105426
105426
|
*/
|
|
105427
105427
|
attachTo(container) {
|
|
105428
105428
|
if (!container) {
|
|
@@ -105447,8 +105447,8 @@
|
|
|
105447
105447
|
this._eventBus.fire('propertiesPanel.attach');
|
|
105448
105448
|
}
|
|
105449
105449
|
|
|
105450
|
-
/**
|
|
105451
|
-
* Detach the properties panel from its parent node.
|
|
105450
|
+
/**
|
|
105451
|
+
* Detach the properties panel from its parent node.
|
|
105452
105452
|
*/
|
|
105453
105453
|
detach() {
|
|
105454
105454
|
const parentNode = this._container.parentNode;
|
|
@@ -105458,11 +105458,11 @@
|
|
|
105458
105458
|
}
|
|
105459
105459
|
}
|
|
105460
105460
|
|
|
105461
|
-
/**
|
|
105462
|
-
* Register a new properties provider to the properties panel.
|
|
105463
|
-
*
|
|
105464
|
-
* @param {Number} [priority]
|
|
105465
|
-
* @param {PropertiesProvider} provider
|
|
105461
|
+
/**
|
|
105462
|
+
* Register a new properties provider to the properties panel.
|
|
105463
|
+
*
|
|
105464
|
+
* @param {Number} [priority]
|
|
105465
|
+
* @param {PropertiesProvider} provider
|
|
105466
105466
|
*/
|
|
105467
105467
|
registerProvider(priority, provider) {
|
|
105468
105468
|
if (!provider) {
|
|
@@ -105479,9 +105479,9 @@
|
|
|
105479
105479
|
this._eventBus.fire('propertiesPanel.providersChanged');
|
|
105480
105480
|
}
|
|
105481
105481
|
|
|
105482
|
-
/**
|
|
105483
|
-
* Updates the layout of the properties panel.
|
|
105484
|
-
* @param {Object} layout
|
|
105482
|
+
/**
|
|
105483
|
+
* Updates the layout of the properties panel.
|
|
105484
|
+
* @param {Object} layout
|
|
105485
105485
|
*/
|
|
105486
105486
|
setLayout(layout) {
|
|
105487
105487
|
this._eventBus.fire('propertiesPanel.setLayout', {
|
|
@@ -105531,12 +105531,12 @@
|
|
|
105531
105531
|
return element && (element.isImplicit || element.id === '__implicitroot');
|
|
105532
105532
|
}
|
|
105533
105533
|
|
|
105534
|
-
/**
|
|
105535
|
-
* Setup keyboard bindings (undo, redo) on the given container.
|
|
105536
|
-
*
|
|
105537
|
-
* @param {Element} container
|
|
105538
|
-
* @param {EventBus} eventBus
|
|
105539
|
-
* @param {CommandStack} commandStack
|
|
105534
|
+
/**
|
|
105535
|
+
* Setup keyboard bindings (undo, redo) on the given container.
|
|
105536
|
+
*
|
|
105537
|
+
* @param {Element} container
|
|
105538
|
+
* @param {EventBus} eventBus
|
|
105539
|
+
* @param {CommandStack} commandStack
|
|
105540
105540
|
*/
|
|
105541
105541
|
function setupKeyboard(container, eventBus, commandStack) {
|
|
105542
105542
|
function cancel(event) {
|
|
@@ -105561,14 +105561,14 @@
|
|
|
105561
105561
|
});
|
|
105562
105562
|
}
|
|
105563
105563
|
|
|
105564
|
-
/**
|
|
105565
|
-
* A handler that combines and executes multiple commands.
|
|
105566
|
-
*
|
|
105567
|
-
* All updates are bundled on the command stack and executed in one step.
|
|
105568
|
-
* This also makes it possible to revert the changes in one step.
|
|
105569
|
-
*
|
|
105570
|
-
* Example use case: remove the camunda:formKey attribute and in addition
|
|
105571
|
-
* add all form fields needed for the camunda:formData property.
|
|
105564
|
+
/**
|
|
105565
|
+
* A handler that combines and executes multiple commands.
|
|
105566
|
+
*
|
|
105567
|
+
* All updates are bundled on the command stack and executed in one step.
|
|
105568
|
+
* This also makes it possible to revert the changes in one step.
|
|
105569
|
+
*
|
|
105570
|
+
* Example use case: remove the camunda:formKey attribute and in addition
|
|
105571
|
+
* add all form fields needed for the camunda:formData property.
|
|
105572
105572
|
*/
|
|
105573
105573
|
let MultiCommandHandler$1 = class MultiCommandHandler {
|
|
105574
105574
|
constructor(commandStack) {
|
|
@@ -105698,12 +105698,12 @@
|
|
|
105698
105698
|
return compensateEventDefinition && compensateEventDefinition.get('activityRef');
|
|
105699
105699
|
}
|
|
105700
105700
|
|
|
105701
|
-
/**
|
|
105702
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
105701
|
+
/**
|
|
105702
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
105703
105703
|
*/
|
|
105704
105704
|
|
|
105705
|
-
/**
|
|
105706
|
-
* @returns {Array<Entry>} entries
|
|
105705
|
+
/**
|
|
105706
|
+
* @returns {Array<Entry>} entries
|
|
105707
105707
|
*/
|
|
105708
105708
|
function CompensationProps(props) {
|
|
105709
105709
|
const {
|
|
@@ -105813,12 +105813,12 @@
|
|
|
105813
105813
|
return getFlowElements(element, 'bpmn:BoundaryEvent');
|
|
105814
105814
|
}
|
|
105815
105815
|
|
|
105816
|
-
/**
|
|
105817
|
-
* Checks whether an Activity is attaching a CompensateEvent of the parent container.
|
|
105818
|
-
*
|
|
105819
|
-
* @param {ModdleElement} activity
|
|
105820
|
-
* @param {Array<ModdleElement>} boundaryEvents
|
|
105821
|
-
* @returns {Boolean}
|
|
105816
|
+
/**
|
|
105817
|
+
* Checks whether an Activity is attaching a CompensateEvent of the parent container.
|
|
105818
|
+
*
|
|
105819
|
+
* @param {ModdleElement} activity
|
|
105820
|
+
* @param {Array<ModdleElement>} boundaryEvents
|
|
105821
|
+
* @returns {Boolean}
|
|
105822
105822
|
*/
|
|
105823
105823
|
function hasCompensationEventAttached(activity, boundaryEvents) {
|
|
105824
105824
|
const {
|
|
@@ -105833,15 +105833,15 @@
|
|
|
105833
105833
|
});
|
|
105834
105834
|
}
|
|
105835
105835
|
|
|
105836
|
-
/**
|
|
105837
|
-
* Checks whether an Activity can be compensated. That's the case when it is
|
|
105838
|
-
* a) a CallActivity
|
|
105839
|
-
* b) a SubProcess, when it is not event based and not a compensation
|
|
105840
|
-
* c) any other Activity, when it is attaching a CompensateEvent of the parent container
|
|
105841
|
-
*
|
|
105842
|
-
* @param {ModdleElement} activity
|
|
105843
|
-
* @param {Array<ModdleElement>} boundaryEvents
|
|
105844
|
-
* @returns {Boolean}
|
|
105836
|
+
/**
|
|
105837
|
+
* Checks whether an Activity can be compensated. That's the case when it is
|
|
105838
|
+
* a) a CallActivity
|
|
105839
|
+
* b) a SubProcess, when it is not event based and not a compensation
|
|
105840
|
+
* c) any other Activity, when it is attaching a CompensateEvent of the parent container
|
|
105841
|
+
*
|
|
105842
|
+
* @param {ModdleElement} activity
|
|
105843
|
+
* @param {Array<ModdleElement>} boundaryEvents
|
|
105844
|
+
* @returns {Boolean}
|
|
105845
105845
|
*/
|
|
105846
105846
|
function canBeCompensated(activity, boundaryEvents) {
|
|
105847
105847
|
return is$6(activity, 'bpmn:CallActivity') || is$6(activity, 'bpmn:SubProcess') && !activity.triggeredByEvent && !activity.isForCompensation || hasCompensationEventAttached(activity, boundaryEvents);
|
|
@@ -105854,11 +105854,11 @@
|
|
|
105854
105854
|
});
|
|
105855
105855
|
}
|
|
105856
105856
|
|
|
105857
|
-
/**
|
|
105858
|
-
* Retrieves all possible activities to reference for a Compensation.
|
|
105859
|
-
*
|
|
105860
|
-
* @param {djs.model.Base} element
|
|
105861
|
-
* @returns {Array<ModdleElement>}
|
|
105857
|
+
/**
|
|
105858
|
+
* Retrieves all possible activities to reference for a Compensation.
|
|
105859
|
+
*
|
|
105860
|
+
* @param {djs.model.Base} element
|
|
105861
|
+
* @returns {Array<ModdleElement>}
|
|
105862
105862
|
*/
|
|
105863
105863
|
function findActivityRefs(element) {
|
|
105864
105864
|
const businessObject = getBusinessObject$2(element);
|
|
@@ -105878,13 +105878,13 @@
|
|
|
105878
105878
|
return activities;
|
|
105879
105879
|
}
|
|
105880
105880
|
|
|
105881
|
-
/**
|
|
105882
|
-
* Retrieves an option label in the form
|
|
105883
|
-
* a) with name: "my Task (id=Task_1)"
|
|
105884
|
-
* b) without name: "(id=Task_1)"
|
|
105885
|
-
*
|
|
105886
|
-
* @param {ModdleElement} activity
|
|
105887
|
-
* @returns {String}
|
|
105881
|
+
/**
|
|
105882
|
+
* Retrieves an option label in the form
|
|
105883
|
+
* a) with name: "my Task (id=Task_1)"
|
|
105884
|
+
* b) without name: "(id=Task_1)"
|
|
105885
|
+
*
|
|
105886
|
+
* @param {ModdleElement} activity
|
|
105887
|
+
* @returns {String}
|
|
105888
105888
|
*/
|
|
105889
105889
|
function createOptionLabel(activity) {
|
|
105890
105890
|
const {
|
|
@@ -105899,12 +105899,12 @@
|
|
|
105899
105899
|
|
|
105900
105900
|
const DOCUMENTATION_TEXT_FORMAT = 'text/plain';
|
|
105901
105901
|
|
|
105902
|
-
/**
|
|
105903
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
105902
|
+
/**
|
|
105903
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
105904
105904
|
*/
|
|
105905
105905
|
|
|
105906
|
-
/**
|
|
105907
|
-
* @returns {Array<Entry>} entries
|
|
105906
|
+
/**
|
|
105907
|
+
* @returns {Array<Entry>} entries
|
|
105908
105908
|
*/
|
|
105909
105909
|
function DocumentationProps(props) {
|
|
105910
105910
|
const {
|
|
@@ -105975,12 +105975,12 @@
|
|
|
105975
105975
|
});
|
|
105976
105976
|
}
|
|
105977
105977
|
|
|
105978
|
-
/**
|
|
105979
|
-
* Retrieves a documentation element from a given moddle element.
|
|
105980
|
-
*
|
|
105981
|
-
* @param {ModdleElement} businessObject
|
|
105982
|
-
*
|
|
105983
|
-
* @returns {ModdleElement} documentation element inside the given moddle element.
|
|
105978
|
+
/**
|
|
105979
|
+
* Retrieves a documentation element from a given moddle element.
|
|
105980
|
+
*
|
|
105981
|
+
* @param {ModdleElement} businessObject
|
|
105982
|
+
*
|
|
105983
|
+
* @returns {ModdleElement} documentation element inside the given moddle element.
|
|
105984
105984
|
*/
|
|
105985
105985
|
function getDocumentation(businessObject) {
|
|
105986
105986
|
return function () {
|
|
@@ -105989,10 +105989,10 @@
|
|
|
105989
105989
|
};
|
|
105990
105990
|
}
|
|
105991
105991
|
|
|
105992
|
-
/**
|
|
105993
|
-
* Sets a documentation element for a given moddle element.
|
|
105994
|
-
*
|
|
105995
|
-
* @param {ModdleElement} businessObject
|
|
105992
|
+
/**
|
|
105993
|
+
* Sets a documentation element for a given moddle element.
|
|
105994
|
+
*
|
|
105995
|
+
* @param {ModdleElement} businessObject
|
|
105996
105996
|
*/
|
|
105997
105997
|
function setDocumentation(element, businessObject, bpmnFactory, commandStack) {
|
|
105998
105998
|
return function (value) {
|
|
@@ -106035,15 +106035,15 @@
|
|
|
106035
106035
|
};
|
|
106036
106036
|
}
|
|
106037
106037
|
|
|
106038
|
-
/**
|
|
106039
|
-
* Create a new element and (optionally) set its parent.
|
|
106040
|
-
*
|
|
106041
|
-
* @param {string} type
|
|
106042
|
-
* @param {Object} properties
|
|
106043
|
-
* @param {import('bpmn-js/lib/model/Types').ModdleElement} parent
|
|
106044
|
-
* @param {import('bpmn-js/lib/features/modeling/BpmnFactory').default} bpmnFactory
|
|
106045
|
-
*
|
|
106046
|
-
* @returns {import('bpmn-js/lib/model/Types').ModdleElement}
|
|
106038
|
+
/**
|
|
106039
|
+
* Create a new element and (optionally) set its parent.
|
|
106040
|
+
*
|
|
106041
|
+
* @param {string} type
|
|
106042
|
+
* @param {Object} properties
|
|
106043
|
+
* @param {import('bpmn-js/lib/model/Types').ModdleElement} parent
|
|
106044
|
+
* @param {import('bpmn-js/lib/features/modeling/BpmnFactory').default} bpmnFactory
|
|
106045
|
+
*
|
|
106046
|
+
* @returns {import('bpmn-js/lib/model/Types').ModdleElement}
|
|
106047
106047
|
*/
|
|
106048
106048
|
function createElement$1(type, properties, parent, bpmnFactory) {
|
|
106049
106049
|
const element = bpmnFactory.create(type, properties);
|
|
@@ -106053,8 +106053,8 @@
|
|
|
106053
106053
|
return element;
|
|
106054
106054
|
}
|
|
106055
106055
|
|
|
106056
|
-
/**
|
|
106057
|
-
* generate a semantic id with given prefix
|
|
106056
|
+
/**
|
|
106057
|
+
* generate a semantic id with given prefix
|
|
106058
106058
|
*/
|
|
106059
106059
|
function nextId$1(prefix) {
|
|
106060
106060
|
const ids = new Ids$1([32, 32, 1]);
|
|
@@ -106083,12 +106083,12 @@
|
|
|
106083
106083
|
const EMPTY_OPTION$4 = '';
|
|
106084
106084
|
const CREATE_NEW_OPTION$4 = 'create-new';
|
|
106085
106085
|
|
|
106086
|
-
/**
|
|
106087
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
106086
|
+
/**
|
|
106087
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
106088
106088
|
*/
|
|
106089
106089
|
|
|
106090
|
-
/**
|
|
106091
|
-
* @returns {Array<Entry>} entries
|
|
106090
|
+
/**
|
|
106091
|
+
* @returns {Array<Entry>} entries
|
|
106092
106092
|
*/
|
|
106093
106093
|
function ErrorProps$2(props) {
|
|
106094
106094
|
const {
|
|
@@ -106264,12 +106264,12 @@
|
|
|
106264
106264
|
|
|
106265
106265
|
const CREATE_NEW_OPTION$3 = 'create-new';
|
|
106266
106266
|
|
|
106267
|
-
/**
|
|
106268
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
106267
|
+
/**
|
|
106268
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
106269
106269
|
*/
|
|
106270
106270
|
|
|
106271
|
-
/**
|
|
106272
|
-
* @returns {Array<Entry>} entries
|
|
106271
|
+
/**
|
|
106272
|
+
* @returns {Array<Entry>} entries
|
|
106273
106273
|
*/
|
|
106274
106274
|
function EscalationProps$2(props) {
|
|
106275
106275
|
const {
|
|
@@ -106442,12 +106442,12 @@
|
|
|
106442
106442
|
return sortBy$1(elements, e => (e.name || '').toLowerCase());
|
|
106443
106443
|
}
|
|
106444
106444
|
|
|
106445
|
-
/**
|
|
106446
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
106445
|
+
/**
|
|
106446
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
106447
106447
|
*/
|
|
106448
106448
|
|
|
106449
|
-
/**
|
|
106450
|
-
* @returns {Array<Entry>} entries
|
|
106449
|
+
/**
|
|
106450
|
+
* @returns {Array<Entry>} entries
|
|
106451
106451
|
*/
|
|
106452
106452
|
function ExecutableProps(props) {
|
|
106453
106453
|
const {
|
|
@@ -106518,14 +106518,14 @@
|
|
|
106518
106518
|
// for ID validation as per BPMN Schema (QName - Namespace)
|
|
106519
106519
|
const ID_REGEX = /^[a-z_][\w-.]*$/i;
|
|
106520
106520
|
|
|
106521
|
-
/**
|
|
106522
|
-
* checks whether the id value is valid
|
|
106523
|
-
*
|
|
106524
|
-
* @param {ModdleElement} element
|
|
106525
|
-
* @param {String} idValue
|
|
106526
|
-
* @param {Function} translate
|
|
106527
|
-
*
|
|
106528
|
-
* @return {String} error message
|
|
106521
|
+
/**
|
|
106522
|
+
* checks whether the id value is valid
|
|
106523
|
+
*
|
|
106524
|
+
* @param {ModdleElement} element
|
|
106525
|
+
* @param {String} idValue
|
|
106526
|
+
* @param {Function} translate
|
|
106527
|
+
*
|
|
106528
|
+
* @return {String} error message
|
|
106529
106529
|
*/
|
|
106530
106530
|
function isIdValid(element, idValue, translate) {
|
|
106531
106531
|
const assigned = element.$model.ids.assigned(idValue);
|
|
@@ -106553,12 +106553,12 @@
|
|
|
106553
106553
|
return SPACE_REGEX$1.test(value);
|
|
106554
106554
|
}
|
|
106555
106555
|
|
|
106556
|
-
/**
|
|
106557
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
106556
|
+
/**
|
|
106557
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
106558
106558
|
*/
|
|
106559
106559
|
|
|
106560
|
-
/**
|
|
106561
|
-
* @returns {Array<Entry>} entries
|
|
106560
|
+
/**
|
|
106561
|
+
* @returns {Array<Entry>} entries
|
|
106562
106562
|
*/
|
|
106563
106563
|
function IdProps$1() {
|
|
106564
106564
|
return [{
|
|
@@ -106600,12 +106600,12 @@
|
|
|
106600
106600
|
});
|
|
106601
106601
|
}
|
|
106602
106602
|
|
|
106603
|
-
/**
|
|
106604
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
106603
|
+
/**
|
|
106604
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
106605
106605
|
*/
|
|
106606
106606
|
|
|
106607
|
-
/**
|
|
106608
|
-
* @returns {Array<Entry>} entries
|
|
106607
|
+
/**
|
|
106608
|
+
* @returns {Array<Entry>} entries
|
|
106609
106609
|
*/
|
|
106610
106610
|
function LinkProps(props) {
|
|
106611
106611
|
const {
|
|
@@ -106653,12 +106653,12 @@
|
|
|
106653
106653
|
const EMPTY_OPTION$3 = '';
|
|
106654
106654
|
const CREATE_NEW_OPTION$2 = 'create-new';
|
|
106655
106655
|
|
|
106656
|
-
/**
|
|
106657
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
106656
|
+
/**
|
|
106657
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
106658
106658
|
*/
|
|
106659
106659
|
|
|
106660
|
-
/**
|
|
106661
|
-
* @returns {Array<Entry>} entries
|
|
106660
|
+
/**
|
|
106661
|
+
* @returns {Array<Entry>} entries
|
|
106662
106662
|
*/
|
|
106663
106663
|
function MessageProps$1(props) {
|
|
106664
106664
|
const {
|
|
@@ -106801,12 +106801,12 @@
|
|
|
106801
106801
|
return sortBy$1(elements, e => (e.name || '').toLowerCase());
|
|
106802
106802
|
}
|
|
106803
106803
|
|
|
106804
|
-
/**
|
|
106805
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
106804
|
+
/**
|
|
106805
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
106806
106806
|
*/
|
|
106807
106807
|
|
|
106808
|
-
/**
|
|
106809
|
-
* @returns {Array<Entry>} entries
|
|
106808
|
+
/**
|
|
106809
|
+
* @returns {Array<Entry>} entries
|
|
106810
106810
|
*/
|
|
106811
106811
|
function MultiInstanceProps$2(props) {
|
|
106812
106812
|
const {
|
|
@@ -106877,59 +106877,59 @@
|
|
|
106877
106877
|
|
|
106878
106878
|
// generic ///////////////////////////
|
|
106879
106879
|
|
|
106880
|
-
/**
|
|
106881
|
-
* isMultiInstanceSupported - check whether given element supports MultiInstanceLoopCharacteristics.
|
|
106882
|
-
*
|
|
106883
|
-
* @param {djs.model.Base} element
|
|
106884
|
-
* @return {boolean}
|
|
106880
|
+
/**
|
|
106881
|
+
* isMultiInstanceSupported - check whether given element supports MultiInstanceLoopCharacteristics.
|
|
106882
|
+
*
|
|
106883
|
+
* @param {djs.model.Base} element
|
|
106884
|
+
* @return {boolean}
|
|
106885
106885
|
*/
|
|
106886
106886
|
function isMultiInstanceSupported$1(element) {
|
|
106887
106887
|
const loopCharacteristics = getLoopCharacteristics$2(element);
|
|
106888
106888
|
return !!loopCharacteristics && is$6(loopCharacteristics, 'bpmn:MultiInstanceLoopCharacteristics');
|
|
106889
106889
|
}
|
|
106890
106890
|
|
|
106891
|
-
/**
|
|
106892
|
-
* getBody - get the body of a given expression.
|
|
106893
|
-
*
|
|
106894
|
-
* @param {ModdleElement<bpmn:FormalExpression>} expression
|
|
106895
|
-
* @return {string} the body (value) of the expression
|
|
106891
|
+
/**
|
|
106892
|
+
* getBody - get the body of a given expression.
|
|
106893
|
+
*
|
|
106894
|
+
* @param {ModdleElement<bpmn:FormalExpression>} expression
|
|
106895
|
+
* @return {string} the body (value) of the expression
|
|
106896
106896
|
*/
|
|
106897
106897
|
function getBody(expression) {
|
|
106898
106898
|
return expression && expression.get('body');
|
|
106899
106899
|
}
|
|
106900
106900
|
|
|
106901
|
-
/**
|
|
106902
|
-
* getProperty - get a property value of the loop characteristics.
|
|
106903
|
-
*
|
|
106904
|
-
* @param {djs.model.Base} element
|
|
106905
|
-
* @param {string} propertyName
|
|
106906
|
-
*
|
|
106907
|
-
* @return {any} the property value
|
|
106901
|
+
/**
|
|
106902
|
+
* getProperty - get a property value of the loop characteristics.
|
|
106903
|
+
*
|
|
106904
|
+
* @param {djs.model.Base} element
|
|
106905
|
+
* @param {string} propertyName
|
|
106906
|
+
*
|
|
106907
|
+
* @return {any} the property value
|
|
106908
106908
|
*/
|
|
106909
106909
|
function getProperty$2(element, propertyName) {
|
|
106910
106910
|
const loopCharacteristics = getLoopCharacteristics$2(element);
|
|
106911
106911
|
return loopCharacteristics && loopCharacteristics.get(propertyName);
|
|
106912
106912
|
}
|
|
106913
106913
|
|
|
106914
|
-
/**
|
|
106915
|
-
* getLoopCharacteristics - get loopCharacteristics of a given element.
|
|
106916
|
-
*
|
|
106917
|
-
* @param {djs.model.Base} element
|
|
106918
|
-
* @return {ModdleElement<bpmn:MultiInstanceLoopCharacteristics> | undefined}
|
|
106914
|
+
/**
|
|
106915
|
+
* getLoopCharacteristics - get loopCharacteristics of a given element.
|
|
106916
|
+
*
|
|
106917
|
+
* @param {djs.model.Base} element
|
|
106918
|
+
* @return {ModdleElement<bpmn:MultiInstanceLoopCharacteristics> | undefined}
|
|
106919
106919
|
*/
|
|
106920
106920
|
function getLoopCharacteristics$2(element) {
|
|
106921
106921
|
const bo = getBusinessObject$2(element);
|
|
106922
106922
|
return bo.loopCharacteristics;
|
|
106923
106923
|
}
|
|
106924
106924
|
|
|
106925
|
-
/**
|
|
106926
|
-
* createFormalExpression - creates a 'bpmn:FormalExpression' element.
|
|
106927
|
-
*
|
|
106928
|
-
* @param {ModdleElement} parent
|
|
106929
|
-
* @param {string} body
|
|
106930
|
-
* @param {BpmnFactory} bpmnFactory
|
|
106931
|
-
*
|
|
106932
|
-
* @result {ModdleElement<bpmn:FormalExpression>} a formal expression
|
|
106925
|
+
/**
|
|
106926
|
+
* createFormalExpression - creates a 'bpmn:FormalExpression' element.
|
|
106927
|
+
*
|
|
106928
|
+
* @param {ModdleElement} parent
|
|
106929
|
+
* @param {string} body
|
|
106930
|
+
* @param {BpmnFactory} bpmnFactory
|
|
106931
|
+
*
|
|
106932
|
+
* @result {ModdleElement<bpmn:FormalExpression>} a formal expression
|
|
106933
106933
|
*/
|
|
106934
106934
|
function createFormalExpression$1(parent, body, bpmnFactory) {
|
|
106935
106935
|
return createElement$1('bpmn:FormalExpression', {
|
|
@@ -106937,13 +106937,13 @@
|
|
|
106937
106937
|
}, parent, bpmnFactory);
|
|
106938
106938
|
}
|
|
106939
106939
|
|
|
106940
|
-
/**
|
|
106941
|
-
* updateFormalExpression - updates a specific formal expression of the loop characteristics.
|
|
106942
|
-
*
|
|
106943
|
-
* @param {djs.model.Base} element
|
|
106944
|
-
* @param {string} propertyName
|
|
106945
|
-
* @param {string} newValue
|
|
106946
|
-
* @param {BpmnFactory} bpmnFactory
|
|
106940
|
+
/**
|
|
106941
|
+
* updateFormalExpression - updates a specific formal expression of the loop characteristics.
|
|
106942
|
+
*
|
|
106943
|
+
* @param {djs.model.Base} element
|
|
106944
|
+
* @param {string} propertyName
|
|
106945
|
+
* @param {string} newValue
|
|
106946
|
+
* @param {BpmnFactory} bpmnFactory
|
|
106947
106947
|
*/
|
|
106948
106948
|
function updateFormalExpression(element, propertyName, newValue, bpmnFactory) {
|
|
106949
106949
|
const loopCharacteristics = getLoopCharacteristics$2(element);
|
|
@@ -106980,23 +106980,23 @@
|
|
|
106980
106980
|
|
|
106981
106981
|
// loopCardinality
|
|
106982
106982
|
|
|
106983
|
-
/**
|
|
106984
|
-
* getLoopCardinality - get the loop cardinality of the loop characteristics.
|
|
106985
|
-
*
|
|
106986
|
-
* @param {djs.model.Base} element
|
|
106987
|
-
*
|
|
106988
|
-
* @return {ModdleElement<bpmn:FormalExpression>} an expression representing the loop cardinality
|
|
106983
|
+
/**
|
|
106984
|
+
* getLoopCardinality - get the loop cardinality of the loop characteristics.
|
|
106985
|
+
*
|
|
106986
|
+
* @param {djs.model.Base} element
|
|
106987
|
+
*
|
|
106988
|
+
* @return {ModdleElement<bpmn:FormalExpression>} an expression representing the loop cardinality
|
|
106989
106989
|
*/
|
|
106990
106990
|
function getLoopCardinality(element) {
|
|
106991
106991
|
return getProperty$2(element, 'loopCardinality');
|
|
106992
106992
|
}
|
|
106993
106993
|
|
|
106994
|
-
/**
|
|
106995
|
-
* getLoopCardinalityValue - get the loop cardinality value of the loop characteristics.
|
|
106996
|
-
*
|
|
106997
|
-
* @param {djs.model.Base} element
|
|
106998
|
-
*
|
|
106999
|
-
* @return {string} the loop cardinality value
|
|
106994
|
+
/**
|
|
106995
|
+
* getLoopCardinalityValue - get the loop cardinality value of the loop characteristics.
|
|
106996
|
+
*
|
|
106997
|
+
* @param {djs.model.Base} element
|
|
106998
|
+
*
|
|
106999
|
+
* @return {string} the loop cardinality value
|
|
107000
107000
|
*/
|
|
107001
107001
|
function getLoopCardinalityValue(element) {
|
|
107002
107002
|
const loopCardinality = getLoopCardinality(element);
|
|
@@ -107005,35 +107005,35 @@
|
|
|
107005
107005
|
|
|
107006
107006
|
// completionCondition /////////////////////
|
|
107007
107007
|
|
|
107008
|
-
/**
|
|
107009
|
-
* getCompletionCondition - get the completion condition of the loop characteristics.
|
|
107010
|
-
*
|
|
107011
|
-
* @param {djs.model.Base} element
|
|
107012
|
-
*
|
|
107013
|
-
* @return {ModdleElement<bpmn:FormalExpression>} an expression representing the completion condition
|
|
107008
|
+
/**
|
|
107009
|
+
* getCompletionCondition - get the completion condition of the loop characteristics.
|
|
107010
|
+
*
|
|
107011
|
+
* @param {djs.model.Base} element
|
|
107012
|
+
*
|
|
107013
|
+
* @return {ModdleElement<bpmn:FormalExpression>} an expression representing the completion condition
|
|
107014
107014
|
*/
|
|
107015
107015
|
function getCompletionCondition$1(element) {
|
|
107016
107016
|
return getProperty$2(element, 'completionCondition');
|
|
107017
107017
|
}
|
|
107018
107018
|
|
|
107019
|
-
/**
|
|
107020
|
-
* getCompletionConditionValue - get the completion condition value of the loop characteristics.
|
|
107021
|
-
*
|
|
107022
|
-
* @param {djs.model.Base} element
|
|
107023
|
-
*
|
|
107024
|
-
* @return {string} the completion condition value
|
|
107019
|
+
/**
|
|
107020
|
+
* getCompletionConditionValue - get the completion condition value of the loop characteristics.
|
|
107021
|
+
*
|
|
107022
|
+
* @param {djs.model.Base} element
|
|
107023
|
+
*
|
|
107024
|
+
* @return {string} the completion condition value
|
|
107025
107025
|
*/
|
|
107026
107026
|
function getCompletionConditionValue(element) {
|
|
107027
107027
|
const completionCondition = getCompletionCondition$1(element);
|
|
107028
107028
|
return getBody(completionCondition);
|
|
107029
107029
|
}
|
|
107030
107030
|
|
|
107031
|
-
/**
|
|
107032
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
107031
|
+
/**
|
|
107032
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
107033
107033
|
*/
|
|
107034
107034
|
|
|
107035
|
-
/**
|
|
107036
|
-
* @returns {Array<Entry>} entries
|
|
107035
|
+
/**
|
|
107036
|
+
* @returns {Array<Entry>} entries
|
|
107037
107037
|
*/
|
|
107038
107038
|
function NameProps(props) {
|
|
107039
107039
|
const {
|
|
@@ -107137,12 +107137,12 @@
|
|
|
107137
107137
|
return categoryValue;
|
|
107138
107138
|
}
|
|
107139
107139
|
|
|
107140
|
-
/**
|
|
107141
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
107140
|
+
/**
|
|
107141
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
107142
107142
|
*/
|
|
107143
107143
|
|
|
107144
|
-
/**
|
|
107145
|
-
* @returns {Array<Entry>} entries
|
|
107144
|
+
/**
|
|
107145
|
+
* @returns {Array<Entry>} entries
|
|
107146
107146
|
*/
|
|
107147
107147
|
function ProcessProps$1(props) {
|
|
107148
107148
|
const {
|
|
@@ -107233,15 +107233,15 @@
|
|
|
107233
107233
|
return is$6(element, 'bpmn:Participant') && element.businessObject.get('processRef');
|
|
107234
107234
|
}
|
|
107235
107235
|
|
|
107236
|
-
/**
|
|
107237
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
107236
|
+
/**
|
|
107237
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
107238
107238
|
*/
|
|
107239
107239
|
|
|
107240
107240
|
const EMPTY_OPTION$2 = '';
|
|
107241
107241
|
const CREATE_NEW_OPTION$1 = 'create-new';
|
|
107242
107242
|
|
|
107243
|
-
/**
|
|
107244
|
-
* @returns {Entry[]}
|
|
107243
|
+
/**
|
|
107244
|
+
* @returns {Entry[]}
|
|
107245
107245
|
*/
|
|
107246
107246
|
function SignalProps$1(props) {
|
|
107247
107247
|
const {
|
|
@@ -107387,12 +107387,12 @@
|
|
|
107387
107387
|
return isAny$1(element, ['bpmn:StartEvent', 'bpmn:IntermediateCatchEvent', 'bpmn:BoundaryEvent']) && !!getTimerEventDefinition$2(element);
|
|
107388
107388
|
}
|
|
107389
107389
|
|
|
107390
|
-
/**
|
|
107391
|
-
* Get the timer definition type for a given timer event definition.
|
|
107392
|
-
*
|
|
107393
|
-
* @param {ModdleElement<bpmn:TimerEventDefinition>} timer
|
|
107394
|
-
*
|
|
107395
|
-
* @return {string|undefined} the timer definition type
|
|
107390
|
+
/**
|
|
107391
|
+
* Get the timer definition type for a given timer event definition.
|
|
107392
|
+
*
|
|
107393
|
+
* @param {ModdleElement<bpmn:TimerEventDefinition>} timer
|
|
107394
|
+
*
|
|
107395
|
+
* @return {string|undefined} the timer definition type
|
|
107396
107396
|
*/
|
|
107397
107397
|
function getTimerDefinitionType(timer) {
|
|
107398
107398
|
if (!timer) {
|
|
@@ -107462,12 +107462,12 @@
|
|
|
107462
107462
|
return entries;
|
|
107463
107463
|
}
|
|
107464
107464
|
|
|
107465
|
-
/**
|
|
107466
|
-
* TimerEventDefinitionType - Generic select entry allowing to select a specific
|
|
107467
|
-
* timerEventDefintionType. To be used together with timerEventDefinitionValue.
|
|
107468
|
-
*
|
|
107469
|
-
* @param {type} props
|
|
107470
|
-
* @return {SelectEntry}
|
|
107465
|
+
/**
|
|
107466
|
+
* TimerEventDefinitionType - Generic select entry allowing to select a specific
|
|
107467
|
+
* timerEventDefintionType. To be used together with timerEventDefinitionValue.
|
|
107468
|
+
*
|
|
107469
|
+
* @param {type} props
|
|
107470
|
+
* @return {SelectEntry}
|
|
107471
107471
|
*/
|
|
107472
107472
|
function TimerEventDefinitionType$2(props) {
|
|
107473
107473
|
const {
|
|
@@ -107535,13 +107535,13 @@
|
|
|
107535
107535
|
});
|
|
107536
107536
|
}
|
|
107537
107537
|
|
|
107538
|
-
/**
|
|
107539
|
-
* TimerEventDefinitionValue - Generic textField entry allowing to specify the
|
|
107540
|
-
* timerEventDefintionValue based on the set timerEventDefintionType. To be used
|
|
107541
|
-
* together with timerEventDefinitionType.
|
|
107542
|
-
*
|
|
107543
|
-
* @param {type} props
|
|
107544
|
-
* @return {TextFieldEntry}
|
|
107538
|
+
/**
|
|
107539
|
+
* TimerEventDefinitionValue - Generic textField entry allowing to specify the
|
|
107540
|
+
* timerEventDefintionValue based on the set timerEventDefintionType. To be used
|
|
107541
|
+
* together with timerEventDefinitionType.
|
|
107542
|
+
*
|
|
107543
|
+
* @param {type} props
|
|
107544
|
+
* @return {TextFieldEntry}
|
|
107545
107545
|
*/
|
|
107546
107546
|
function TimerEventDefinitionValue$2(props) {
|
|
107547
107547
|
const {
|
|
@@ -107826,12 +107826,12 @@
|
|
|
107826
107826
|
bpmnPropertiesProvider: ['type', BpmnPropertiesProvider]
|
|
107827
107827
|
};
|
|
107828
107828
|
|
|
107829
|
-
/**
|
|
107830
|
-
* Get extension elements of business object. Optionally filter by type.
|
|
107831
|
-
*
|
|
107832
|
-
* @param {ModdleElement} businessObject
|
|
107833
|
-
* @param {string} [type=undefined]
|
|
107834
|
-
* @returns {Array<ModdleElement>}
|
|
107829
|
+
/**
|
|
107830
|
+
* Get extension elements of business object. Optionally filter by type.
|
|
107831
|
+
*
|
|
107832
|
+
* @param {ModdleElement} businessObject
|
|
107833
|
+
* @param {string} [type=undefined]
|
|
107834
|
+
* @returns {Array<ModdleElement>}
|
|
107835
107835
|
*/
|
|
107836
107836
|
function getExtensionElementsList$1(businessObject, type = undefined) {
|
|
107837
107837
|
const extensionElements = businessObject.get('extensionElements');
|
|
@@ -107848,13 +107848,13 @@
|
|
|
107848
107848
|
return values;
|
|
107849
107849
|
}
|
|
107850
107850
|
|
|
107851
|
-
/**
|
|
107852
|
-
* Add one or more extension elements. Create bpmn:ExtensionElements if it doesn't exist.
|
|
107853
|
-
*
|
|
107854
|
-
* @param {ModdleElement} element
|
|
107855
|
-
* @param {ModdleElement} businessObject
|
|
107856
|
-
* @param {ModdleElement|Array<ModdleElement>} extensionElementsToAdd
|
|
107857
|
-
* @param {CommandStack} commandStack
|
|
107851
|
+
/**
|
|
107852
|
+
* Add one or more extension elements. Create bpmn:ExtensionElements if it doesn't exist.
|
|
107853
|
+
*
|
|
107854
|
+
* @param {ModdleElement} element
|
|
107855
|
+
* @param {ModdleElement} businessObject
|
|
107856
|
+
* @param {ModdleElement|Array<ModdleElement>} extensionElementsToAdd
|
|
107857
|
+
* @param {CommandStack} commandStack
|
|
107858
107858
|
*/
|
|
107859
107859
|
function addExtensionElements(element, businessObject, extensionElementToAdd, bpmnFactory, commandStack) {
|
|
107860
107860
|
const commands = [];
|
|
@@ -107892,13 +107892,13 @@
|
|
|
107892
107892
|
commandStack.execute('properties-panel.multi-command-executor', commands);
|
|
107893
107893
|
}
|
|
107894
107894
|
|
|
107895
|
-
/**
|
|
107896
|
-
* Remove one or more extension elements. Remove bpmn:ExtensionElements afterwards if it's empty.
|
|
107897
|
-
*
|
|
107898
|
-
* @param {ModdleElement} element
|
|
107899
|
-
* @param {ModdleElement} businessObject
|
|
107900
|
-
* @param {ModdleElement|Array<ModdleElement>} extensionElementsToRemove
|
|
107901
|
-
* @param {CommandStack} commandStack
|
|
107895
|
+
/**
|
|
107896
|
+
* Remove one or more extension elements. Remove bpmn:ExtensionElements afterwards if it's empty.
|
|
107897
|
+
*
|
|
107898
|
+
* @param {ModdleElement} element
|
|
107899
|
+
* @param {ModdleElement} businessObject
|
|
107900
|
+
* @param {ModdleElement|Array<ModdleElement>} extensionElementsToRemove
|
|
107901
|
+
* @param {CommandStack} commandStack
|
|
107902
107902
|
*/
|
|
107903
107903
|
function removeExtensionElements$1(element, businessObject, extensionElementsToRemove, commandStack) {
|
|
107904
107904
|
if (!isArray$5(extensionElementsToRemove)) {
|
|
@@ -108291,37 +108291,37 @@
|
|
|
108291
108291
|
|
|
108292
108292
|
// helper //////////////////
|
|
108293
108293
|
|
|
108294
|
-
/**
|
|
108295
|
-
* Returns true if the attribute 'camunda:asyncBefore' is set
|
|
108296
|
-
* to true.
|
|
108297
|
-
*
|
|
108298
|
-
* @param {ModdleElement} bo
|
|
108299
|
-
*
|
|
108300
|
-
* @return {boolean} a boolean value
|
|
108294
|
+
/**
|
|
108295
|
+
* Returns true if the attribute 'camunda:asyncBefore' is set
|
|
108296
|
+
* to true.
|
|
108297
|
+
*
|
|
108298
|
+
* @param {ModdleElement} bo
|
|
108299
|
+
*
|
|
108300
|
+
* @return {boolean} a boolean value
|
|
108301
108301
|
*/
|
|
108302
108302
|
function isAsyncBefore$2(bo) {
|
|
108303
108303
|
return !!(bo.get('camunda:asyncBefore') || bo.get('camunda:async'));
|
|
108304
108304
|
}
|
|
108305
108305
|
|
|
108306
|
-
/**
|
|
108307
|
-
* Returns true if the attribute 'camunda:asyncAfter' is set
|
|
108308
|
-
* to true.
|
|
108309
|
-
*
|
|
108310
|
-
* @param {ModdleElement} bo
|
|
108311
|
-
*
|
|
108312
|
-
* @return {boolean} a boolean value
|
|
108306
|
+
/**
|
|
108307
|
+
* Returns true if the attribute 'camunda:asyncAfter' is set
|
|
108308
|
+
* to true.
|
|
108309
|
+
*
|
|
108310
|
+
* @param {ModdleElement} bo
|
|
108311
|
+
*
|
|
108312
|
+
* @return {boolean} a boolean value
|
|
108313
108313
|
*/
|
|
108314
108314
|
function isAsyncAfter$2(bo) {
|
|
108315
108315
|
return !!bo.get('camunda:asyncAfter');
|
|
108316
108316
|
}
|
|
108317
108317
|
|
|
108318
|
-
/**
|
|
108319
|
-
* Returns true if the attribute 'camunda:exclusive' is set
|
|
108320
|
-
* to true.
|
|
108321
|
-
*
|
|
108322
|
-
* @param {ModdleElement} bo
|
|
108323
|
-
*
|
|
108324
|
-
* @return {boolean} a boolean value
|
|
108318
|
+
/**
|
|
108319
|
+
* Returns true if the attribute 'camunda:exclusive' is set
|
|
108320
|
+
* to true.
|
|
108321
|
+
*
|
|
108322
|
+
* @param {ModdleElement} bo
|
|
108323
|
+
*
|
|
108324
|
+
* @return {boolean} a boolean value
|
|
108325
108325
|
*/
|
|
108326
108326
|
function isExclusive$1(bo) {
|
|
108327
108327
|
return !!bo.get('camunda:exclusive');
|
|
@@ -109137,12 +109137,12 @@
|
|
|
109137
109137
|
|
|
109138
109138
|
// helper //////////////////
|
|
109139
109139
|
|
|
109140
|
-
/**
|
|
109141
|
-
* getProcess - get the businessObject of the process referred to by a bpmn:Process
|
|
109142
|
-
* or by a bpmn:Participant
|
|
109143
|
-
*
|
|
109144
|
-
* @param {ModdleElement} element either a bpmn:Process or a bpmn:Participant
|
|
109145
|
-
* @return {BusinessObject}
|
|
109140
|
+
/**
|
|
109141
|
+
* getProcess - get the businessObject of the process referred to by a bpmn:Process
|
|
109142
|
+
* or by a bpmn:Participant
|
|
109143
|
+
*
|
|
109144
|
+
* @param {ModdleElement} element either a bpmn:Process or a bpmn:Participant
|
|
109145
|
+
* @return {BusinessObject}
|
|
109146
109146
|
*/
|
|
109147
109147
|
function getProcess$3(element) {
|
|
109148
109148
|
return is$6(element, 'bpmn:Process') ? getBusinessObject$2(element) : getBusinessObject$2(element).get('processRef');
|
|
@@ -109534,12 +109534,12 @@
|
|
|
109534
109534
|
}
|
|
109535
109535
|
}
|
|
109536
109536
|
|
|
109537
|
-
/**
|
|
109538
|
-
* getConditionExpression - get the body value of a condition expression for a given element
|
|
109539
|
-
*
|
|
109540
|
-
* @param {ModdleElement} element
|
|
109541
|
-
*
|
|
109542
|
-
* @return {string|undefined}
|
|
109537
|
+
/**
|
|
109538
|
+
* getConditionExpression - get the body value of a condition expression for a given element
|
|
109539
|
+
*
|
|
109540
|
+
* @param {ModdleElement} element
|
|
109541
|
+
*
|
|
109542
|
+
* @return {string|undefined}
|
|
109543
109543
|
*/
|
|
109544
109544
|
function getConditionExpression(element) {
|
|
109545
109545
|
const businessObject = getBusinessObject$2(element);
|
|
@@ -109585,8 +109585,8 @@
|
|
|
109585
109585
|
return is$6(parent, 'bpmn:SubProcess') && parent.triggeredByEvent;
|
|
109586
109586
|
}
|
|
109587
109587
|
|
|
109588
|
-
/**
|
|
109589
|
-
* Cf. https://docs.camunda.org/manual/latest/user-guide/process-engine/scripting/
|
|
109588
|
+
/**
|
|
109589
|
+
* Cf. https://docs.camunda.org/manual/latest/user-guide/process-engine/scripting/
|
|
109590
109590
|
*/
|
|
109591
109591
|
function ScriptProps(props) {
|
|
109592
109592
|
const {
|
|
@@ -109814,12 +109814,12 @@
|
|
|
109814
109814
|
return inputOutput && inputOutput.get(prop) || [];
|
|
109815
109815
|
}
|
|
109816
109816
|
|
|
109817
|
-
/**
|
|
109818
|
-
* Get a camunda:inputOutput from the business object
|
|
109819
|
-
*
|
|
109820
|
-
* @param {djs.model.Base | ModdleElement} element
|
|
109821
|
-
*
|
|
109822
|
-
* @return {ModdleElement} the inputOutput object
|
|
109817
|
+
/**
|
|
109818
|
+
* Get a camunda:inputOutput from the business object
|
|
109819
|
+
*
|
|
109820
|
+
* @param {djs.model.Base | ModdleElement} element
|
|
109821
|
+
*
|
|
109822
|
+
* @return {ModdleElement} the inputOutput object
|
|
109823
109823
|
*/
|
|
109824
109824
|
function getInputOutput$1(element) {
|
|
109825
109825
|
if (is$6(element, 'camunda:Connector')) {
|
|
@@ -109829,25 +109829,25 @@
|
|
|
109829
109829
|
return (getElements(businessObject, 'camunda:InputOutput') || [])[0];
|
|
109830
109830
|
}
|
|
109831
109831
|
|
|
109832
|
-
/**
|
|
109833
|
-
* Return all input parameters existing in the business object, and
|
|
109834
|
-
* an empty array if none exist.
|
|
109835
|
-
*
|
|
109836
|
-
* @param {djs.model.Base} element
|
|
109837
|
-
*
|
|
109838
|
-
* @return {Array} a list of input parameter objects
|
|
109832
|
+
/**
|
|
109833
|
+
* Return all input parameters existing in the business object, and
|
|
109834
|
+
* an empty array if none exist.
|
|
109835
|
+
*
|
|
109836
|
+
* @param {djs.model.Base} element
|
|
109837
|
+
*
|
|
109838
|
+
* @return {Array} a list of input parameter objects
|
|
109839
109839
|
*/
|
|
109840
109840
|
function getInputParameters$2(element) {
|
|
109841
109841
|
return getParameters$1(element, 'inputParameters');
|
|
109842
109842
|
}
|
|
109843
109843
|
|
|
109844
|
-
/**
|
|
109845
|
-
* Return all output parameters existing in the business object, and
|
|
109846
|
-
* an empty array if none exist.
|
|
109847
|
-
*
|
|
109848
|
-
* @param {djs.model.Base} element
|
|
109849
|
-
*
|
|
109850
|
-
* @return {Array} a list of output parameter objects
|
|
109844
|
+
/**
|
|
109845
|
+
* Return all output parameters existing in the business object, and
|
|
109846
|
+
* an empty array if none exist.
|
|
109847
|
+
*
|
|
109848
|
+
* @param {djs.model.Base} element
|
|
109849
|
+
*
|
|
109850
|
+
* @return {Array} a list of output parameter objects
|
|
109851
109851
|
*/
|
|
109852
109852
|
function getOutputParameters$2(element) {
|
|
109853
109853
|
return getParameters$1(element, 'outputParameters');
|
|
@@ -110423,47 +110423,47 @@
|
|
|
110423
110423
|
return is$6(parameter, 'camunda:InputParameter');
|
|
110424
110424
|
}
|
|
110425
110425
|
|
|
110426
|
-
/**
|
|
110427
|
-
* Check whether an element is camunda:ServiceTaskLike
|
|
110428
|
-
*
|
|
110429
|
-
* @param {djs.model.Base} element
|
|
110430
|
-
*
|
|
110431
|
-
* @return {boolean} a boolean value
|
|
110426
|
+
/**
|
|
110427
|
+
* Check whether an element is camunda:ServiceTaskLike
|
|
110428
|
+
*
|
|
110429
|
+
* @param {djs.model.Base} element
|
|
110430
|
+
*
|
|
110431
|
+
* @return {boolean} a boolean value
|
|
110432
110432
|
*/
|
|
110433
110433
|
function isServiceTaskLike(element) {
|
|
110434
110434
|
return is$6(element, 'camunda:ServiceTaskLike');
|
|
110435
110435
|
}
|
|
110436
110436
|
|
|
110437
|
-
/**
|
|
110438
|
-
* Returns 'true' if the given element is 'camunda:DmnCapable'
|
|
110439
|
-
*
|
|
110440
|
-
* @param {djs.model.Base} element
|
|
110441
|
-
*
|
|
110442
|
-
* @return {boolean} a boolean value
|
|
110437
|
+
/**
|
|
110438
|
+
* Returns 'true' if the given element is 'camunda:DmnCapable'
|
|
110439
|
+
*
|
|
110440
|
+
* @param {djs.model.Base} element
|
|
110441
|
+
*
|
|
110442
|
+
* @return {boolean} a boolean value
|
|
110443
110443
|
*/
|
|
110444
110444
|
function isDmnCapable(element) {
|
|
110445
110445
|
return is$6(element, 'camunda:DmnCapable');
|
|
110446
110446
|
}
|
|
110447
110447
|
|
|
110448
|
-
/**
|
|
110449
|
-
* Returns 'true' if the given element is 'camunda:ExternalCapable'
|
|
110450
|
-
*
|
|
110451
|
-
* @param {djs.model.Base} element
|
|
110452
|
-
*
|
|
110453
|
-
* @return {boolean} a boolean value
|
|
110448
|
+
/**
|
|
110449
|
+
* Returns 'true' if the given element is 'camunda:ExternalCapable'
|
|
110450
|
+
*
|
|
110451
|
+
* @param {djs.model.Base} element
|
|
110452
|
+
*
|
|
110453
|
+
* @return {boolean} a boolean value
|
|
110454
110454
|
*/
|
|
110455
110455
|
function isExternalCapable(element) {
|
|
110456
110456
|
return is$6(element, 'camunda:ExternalCapable');
|
|
110457
110457
|
}
|
|
110458
110458
|
|
|
110459
|
-
/**
|
|
110460
|
-
* getServiceTaskLikeBusinessObject - Get a 'camunda:ServiceTaskLike' business object.
|
|
110461
|
-
*
|
|
110462
|
-
* If the given element is not a 'camunda:ServiceTaskLike', then 'false'
|
|
110463
|
-
* is returned.
|
|
110464
|
-
*
|
|
110465
|
-
* @param {djs.model.Base} element
|
|
110466
|
-
* @return {ModdleElement} the 'camunda:ServiceTaskLike' business object
|
|
110459
|
+
/**
|
|
110460
|
+
* getServiceTaskLikeBusinessObject - Get a 'camunda:ServiceTaskLike' business object.
|
|
110461
|
+
*
|
|
110462
|
+
* If the given element is not a 'camunda:ServiceTaskLike', then 'false'
|
|
110463
|
+
* is returned.
|
|
110464
|
+
*
|
|
110465
|
+
* @param {djs.model.Base} element
|
|
110466
|
+
* @return {ModdleElement} the 'camunda:ServiceTaskLike' business object
|
|
110467
110467
|
*/
|
|
110468
110468
|
function getServiceTaskLikeBusinessObject(element) {
|
|
110469
110469
|
if (is$6(element, 'bpmn:IntermediateThrowEvent') || is$6(element, 'bpmn:EndEvent')) {
|
|
@@ -110479,22 +110479,22 @@
|
|
|
110479
110479
|
return isServiceTaskLike(element) && getBusinessObject$2(element);
|
|
110480
110480
|
}
|
|
110481
110481
|
|
|
110482
|
-
/**
|
|
110483
|
-
* Returns the implementation type of the given element.
|
|
110484
|
-
*
|
|
110485
|
-
* Possible implementation types are:
|
|
110486
|
-
* - dmn
|
|
110487
|
-
* - connector
|
|
110488
|
-
* - external
|
|
110489
|
-
* - class
|
|
110490
|
-
* - expression
|
|
110491
|
-
* - delegateExpression
|
|
110492
|
-
* - script
|
|
110493
|
-
* - or undefined, when no matching implementation type is found
|
|
110494
|
-
*
|
|
110495
|
-
* @param {djs.model.Base} element
|
|
110496
|
-
*
|
|
110497
|
-
* @return {String} the implementation type
|
|
110482
|
+
/**
|
|
110483
|
+
* Returns the implementation type of the given element.
|
|
110484
|
+
*
|
|
110485
|
+
* Possible implementation types are:
|
|
110486
|
+
* - dmn
|
|
110487
|
+
* - connector
|
|
110488
|
+
* - external
|
|
110489
|
+
* - class
|
|
110490
|
+
* - expression
|
|
110491
|
+
* - delegateExpression
|
|
110492
|
+
* - script
|
|
110493
|
+
* - or undefined, when no matching implementation type is found
|
|
110494
|
+
*
|
|
110495
|
+
* @param {djs.model.Base} element
|
|
110496
|
+
*
|
|
110497
|
+
* @return {String} the implementation type
|
|
110498
110498
|
*/
|
|
110499
110499
|
function getImplementationType(element) {
|
|
110500
110500
|
const businessObject = getListenerBusinessObject(element) || getServiceTaskLikeBusinessObject(element);
|
|
@@ -111202,12 +111202,12 @@
|
|
|
111202
111202
|
return name;
|
|
111203
111203
|
}
|
|
111204
111204
|
|
|
111205
|
-
/**
|
|
111206
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
111205
|
+
/**
|
|
111206
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
111207
111207
|
*/
|
|
111208
111208
|
|
|
111209
|
-
/**
|
|
111210
|
-
* @returns {Array<Entry>} entries
|
|
111209
|
+
/**
|
|
111210
|
+
* @returns {Array<Entry>} entries
|
|
111211
111211
|
*/
|
|
111212
111212
|
function EscalationProps(props) {
|
|
111213
111213
|
const {
|
|
@@ -111461,12 +111461,12 @@
|
|
|
111461
111461
|
|
|
111462
111462
|
// helper ///////////////////
|
|
111463
111463
|
|
|
111464
|
-
/**
|
|
111465
|
-
* determineType - get the type of a fieldInjection based on the attributes
|
|
111466
|
-
* set on it
|
|
111467
|
-
*
|
|
111468
|
-
* @param {ModdleElement} field
|
|
111469
|
-
* @return {('string'|'expression')}
|
|
111464
|
+
/**
|
|
111465
|
+
* determineType - get the type of a fieldInjection based on the attributes
|
|
111466
|
+
* set on it
|
|
111467
|
+
*
|
|
111468
|
+
* @param {ModdleElement} field
|
|
111469
|
+
* @return {('string'|'expression')}
|
|
111470
111470
|
*/
|
|
111471
111471
|
function determineType(field) {
|
|
111472
111472
|
// string is the default type
|
|
@@ -113598,8 +113598,8 @@
|
|
|
113598
113598
|
return is$6(element, 'camunda:Initiator') && !is$6(element.parent, 'bpmn:SubProcess');
|
|
113599
113599
|
}
|
|
113600
113600
|
|
|
113601
|
-
/**
|
|
113602
|
-
* Cf. https://docs.camunda.org/manual/7.15/reference/bpmn20/subprocesses/call-activity/#passing-variables
|
|
113601
|
+
/**
|
|
113602
|
+
* Cf. https://docs.camunda.org/manual/7.15/reference/bpmn20/subprocesses/call-activity/#passing-variables
|
|
113603
113603
|
*/
|
|
113604
113604
|
function InMappingPropagationProps(props) {
|
|
113605
113605
|
const {
|
|
@@ -113941,8 +113941,8 @@
|
|
|
113941
113941
|
return inOutType;
|
|
113942
113942
|
}
|
|
113943
113943
|
|
|
113944
|
-
/**
|
|
113945
|
-
* Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-elements/#in
|
|
113944
|
+
/**
|
|
113945
|
+
* Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-elements/#in
|
|
113946
113946
|
*/
|
|
113947
113947
|
function InMappingProps({
|
|
113948
113948
|
element,
|
|
@@ -114225,49 +114225,49 @@
|
|
|
114225
114225
|
|
|
114226
114226
|
// helper //////////////////
|
|
114227
114227
|
|
|
114228
|
-
/**
|
|
114229
|
-
* @param {ModdleElement} bo
|
|
114230
|
-
* @return {boolean} a boolean value
|
|
114228
|
+
/**
|
|
114229
|
+
* @param {ModdleElement} bo
|
|
114230
|
+
* @return {boolean} a boolean value
|
|
114231
114231
|
*/
|
|
114232
114232
|
function isAsyncBefore$1$1(bo) {
|
|
114233
114233
|
return !!(bo.get('camunda:asyncBefore') || bo.get('camunda:async'));
|
|
114234
114234
|
}
|
|
114235
114235
|
|
|
114236
|
-
/**
|
|
114237
|
-
* @param {ModdleElement} bo
|
|
114238
|
-
* @return {boolean}
|
|
114236
|
+
/**
|
|
114237
|
+
* @param {ModdleElement} bo
|
|
114238
|
+
* @return {boolean}
|
|
114239
114239
|
*/
|
|
114240
114240
|
function isAsyncAfter$1$1(bo) {
|
|
114241
114241
|
return !!bo.get('camunda:asyncAfter');
|
|
114242
114242
|
}
|
|
114243
114243
|
|
|
114244
|
-
/**
|
|
114245
|
-
* isAsync - returns true if the attribute 'camunda:asyncAfter' or 'camunda:asyncBefore'
|
|
114246
|
-
* is set to true.
|
|
114247
|
-
*
|
|
114248
|
-
* @param {ModdleElement} bo
|
|
114249
|
-
* @return {boolean}
|
|
114244
|
+
/**
|
|
114245
|
+
* isAsync - returns true if the attribute 'camunda:asyncAfter' or 'camunda:asyncBefore'
|
|
114246
|
+
* is set to true.
|
|
114247
|
+
*
|
|
114248
|
+
* @param {ModdleElement} bo
|
|
114249
|
+
* @return {boolean}
|
|
114250
114250
|
*/
|
|
114251
114251
|
function isAsync$1(bo) {
|
|
114252
114252
|
return isAsyncAfter$1$1(bo) || isAsyncBefore$1$1(bo);
|
|
114253
114253
|
}
|
|
114254
114254
|
|
|
114255
|
-
/**
|
|
114256
|
-
* isTimerEvent - returns true if the element is a bpmn:Event with a timerEventDefinition
|
|
114257
|
-
*
|
|
114258
|
-
* @param {ModdleElement} element
|
|
114259
|
-
* @return {boolean}
|
|
114255
|
+
/**
|
|
114256
|
+
* isTimerEvent - returns true if the element is a bpmn:Event with a timerEventDefinition
|
|
114257
|
+
*
|
|
114258
|
+
* @param {ModdleElement} element
|
|
114259
|
+
* @return {boolean}
|
|
114260
114260
|
*/
|
|
114261
114261
|
function isTimerEvent(element) {
|
|
114262
114262
|
return is$6(element, 'bpmn:Event') && getTimerEventDefinition$1(element);
|
|
114263
114263
|
}
|
|
114264
114264
|
|
|
114265
|
-
/**
|
|
114266
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
114265
|
+
/**
|
|
114266
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
114267
114267
|
*/
|
|
114268
114268
|
|
|
114269
|
-
/**
|
|
114270
|
-
* @returns {Array<Entry>} entries
|
|
114269
|
+
/**
|
|
114270
|
+
* @returns {Array<Entry>} entries
|
|
114271
114271
|
*/
|
|
114272
114272
|
function MultiInstanceProps(props) {
|
|
114273
114273
|
const {
|
|
@@ -114529,36 +114529,36 @@
|
|
|
114529
114529
|
|
|
114530
114530
|
// generic ///////////////////////////
|
|
114531
114531
|
|
|
114532
|
-
/**
|
|
114533
|
-
* isMultiInstanceSupported - check whether given element supports camunda specific props
|
|
114534
|
-
* for multiInstance (ref. <camunda:Cllectable>).
|
|
114535
|
-
*
|
|
114536
|
-
* @param {djs.model.Base} element
|
|
114537
|
-
* @return {boolean}
|
|
114532
|
+
/**
|
|
114533
|
+
* isMultiInstanceSupported - check whether given element supports camunda specific props
|
|
114534
|
+
* for multiInstance (ref. <camunda:Cllectable>).
|
|
114535
|
+
*
|
|
114536
|
+
* @param {djs.model.Base} element
|
|
114537
|
+
* @return {boolean}
|
|
114538
114538
|
*/
|
|
114539
114539
|
function isMultiInstanceSupported(element) {
|
|
114540
114540
|
const loopCharacteristics = getLoopCharacteristics(element);
|
|
114541
114541
|
return !!loopCharacteristics && is$6(loopCharacteristics, 'camunda:Collectable');
|
|
114542
114542
|
}
|
|
114543
114543
|
|
|
114544
|
-
/**
|
|
114545
|
-
* getProperty - get a property value of the loop characteristics.
|
|
114546
|
-
*
|
|
114547
|
-
* @param {djs.model.Base} element
|
|
114548
|
-
* @param {string} propertyName
|
|
114549
|
-
*
|
|
114550
|
-
* @return {any} the property value
|
|
114544
|
+
/**
|
|
114545
|
+
* getProperty - get a property value of the loop characteristics.
|
|
114546
|
+
*
|
|
114547
|
+
* @param {djs.model.Base} element
|
|
114548
|
+
* @param {string} propertyName
|
|
114549
|
+
*
|
|
114550
|
+
* @return {any} the property value
|
|
114551
114551
|
*/
|
|
114552
114552
|
function getProperty(element, propertyName) {
|
|
114553
114553
|
var loopCharacteristics = getLoopCharacteristics(element);
|
|
114554
114554
|
return loopCharacteristics && loopCharacteristics.get(propertyName);
|
|
114555
114555
|
}
|
|
114556
114556
|
|
|
114557
|
-
/**
|
|
114558
|
-
* getLoopCharacteristics - get loopCharacteristics of a given element.
|
|
114559
|
-
*
|
|
114560
|
-
* @param {djs.model.Base} element
|
|
114561
|
-
* @return {ModdleElement<bpmn:MultiInstanceLoopCharacteristics> | undefined}
|
|
114557
|
+
/**
|
|
114558
|
+
* getLoopCharacteristics - get loopCharacteristics of a given element.
|
|
114559
|
+
*
|
|
114560
|
+
* @param {djs.model.Base} element
|
|
114561
|
+
* @return {ModdleElement<bpmn:MultiInstanceLoopCharacteristics> | undefined}
|
|
114562
114562
|
*/
|
|
114563
114563
|
function getLoopCharacteristics(element) {
|
|
114564
114564
|
const bo = getBusinessObject$2(element);
|
|
@@ -114567,12 +114567,12 @@
|
|
|
114567
114567
|
|
|
114568
114568
|
// collection
|
|
114569
114569
|
|
|
114570
|
-
/**
|
|
114571
|
-
* getCollection - get the 'camunda:collection' attribute value of the loop characteristics.
|
|
114572
|
-
*
|
|
114573
|
-
* @param {djs.model.Base} element
|
|
114574
|
-
*
|
|
114575
|
-
* @return {string} the 'camunda:collection' value
|
|
114570
|
+
/**
|
|
114571
|
+
* getCollection - get the 'camunda:collection' attribute value of the loop characteristics.
|
|
114572
|
+
*
|
|
114573
|
+
* @param {djs.model.Base} element
|
|
114574
|
+
*
|
|
114575
|
+
* @return {string} the 'camunda:collection' value
|
|
114576
114576
|
*/
|
|
114577
114577
|
function getCollection(element) {
|
|
114578
114578
|
return getProperty(element, 'camunda:collection');
|
|
@@ -114580,12 +114580,12 @@
|
|
|
114580
114580
|
|
|
114581
114581
|
// elementVariable
|
|
114582
114582
|
|
|
114583
|
-
/**
|
|
114584
|
-
* getElementVariable - get the 'camunda:elementVariable' attribute value of the loop characteristics.
|
|
114585
|
-
*
|
|
114586
|
-
* @param {djs.model.Base} element
|
|
114587
|
-
*
|
|
114588
|
-
* @return {string} the 'camunda:elementVariable' value
|
|
114583
|
+
/**
|
|
114584
|
+
* getElementVariable - get the 'camunda:elementVariable' attribute value of the loop characteristics.
|
|
114585
|
+
*
|
|
114586
|
+
* @param {djs.model.Base} element
|
|
114587
|
+
*
|
|
114588
|
+
* @return {string} the 'camunda:elementVariable' value
|
|
114589
114589
|
*/
|
|
114590
114590
|
function getElementVariable(element) {
|
|
114591
114591
|
return getProperty(element, 'camunda:elementVariable');
|
|
@@ -114593,48 +114593,48 @@
|
|
|
114593
114593
|
|
|
114594
114594
|
// asyncBefore asyncAfter
|
|
114595
114595
|
|
|
114596
|
-
/**
|
|
114597
|
-
* Returns true if the attribute 'camunda:asyncBefore' is set
|
|
114598
|
-
* to true.
|
|
114599
|
-
*
|
|
114600
|
-
* @param {ModdleElement} bo
|
|
114601
|
-
*
|
|
114602
|
-
* @return {boolean} a boolean value
|
|
114596
|
+
/**
|
|
114597
|
+
* Returns true if the attribute 'camunda:asyncBefore' is set
|
|
114598
|
+
* to true.
|
|
114599
|
+
*
|
|
114600
|
+
* @param {ModdleElement} bo
|
|
114601
|
+
*
|
|
114602
|
+
* @return {boolean} a boolean value
|
|
114603
114603
|
*/
|
|
114604
114604
|
function isAsyncBefore$3(bo) {
|
|
114605
114605
|
return !!(bo.get('camunda:asyncBefore') || bo.get('camunda:async'));
|
|
114606
114606
|
}
|
|
114607
114607
|
|
|
114608
|
-
/**
|
|
114609
|
-
* Returns true if the attribute 'camunda:asyncAfter' is set
|
|
114610
|
-
* to true.
|
|
114611
|
-
*
|
|
114612
|
-
* @param {ModdleElement} bo
|
|
114613
|
-
*
|
|
114614
|
-
* @return {boolean} a boolean value
|
|
114608
|
+
/**
|
|
114609
|
+
* Returns true if the attribute 'camunda:asyncAfter' is set
|
|
114610
|
+
* to true.
|
|
114611
|
+
*
|
|
114612
|
+
* @param {ModdleElement} bo
|
|
114613
|
+
*
|
|
114614
|
+
* @return {boolean} a boolean value
|
|
114615
114615
|
*/
|
|
114616
114616
|
function isAsyncAfter$3(bo) {
|
|
114617
114617
|
return !!bo.get('camunda:asyncAfter');
|
|
114618
114618
|
}
|
|
114619
114619
|
|
|
114620
|
-
/**
|
|
114621
|
-
* Returns true if the attribute 'camunda:exclusive' is set
|
|
114622
|
-
* to true.
|
|
114623
|
-
*
|
|
114624
|
-
* @param {ModdleElement} bo
|
|
114625
|
-
*
|
|
114626
|
-
* @return {boolean} a boolean value
|
|
114620
|
+
/**
|
|
114621
|
+
* Returns true if the attribute 'camunda:exclusive' is set
|
|
114622
|
+
* to true.
|
|
114623
|
+
*
|
|
114624
|
+
* @param {ModdleElement} bo
|
|
114625
|
+
*
|
|
114626
|
+
* @return {boolean} a boolean value
|
|
114627
114627
|
*/
|
|
114628
114628
|
function isExclusive$2(bo) {
|
|
114629
114629
|
return !!bo.get('camunda:exclusive');
|
|
114630
114630
|
}
|
|
114631
114631
|
|
|
114632
|
-
/**
|
|
114633
|
-
* isAsync - returns true if the attribute 'camunda:asyncAfter' or 'camunda:asyncBefore'
|
|
114634
|
-
* is set to true.
|
|
114635
|
-
*
|
|
114636
|
-
* @param {ModdleElement} bo
|
|
114637
|
-
* @return {boolean}
|
|
114632
|
+
/**
|
|
114633
|
+
* isAsync - returns true if the attribute 'camunda:asyncAfter' or 'camunda:asyncBefore'
|
|
114634
|
+
* is set to true.
|
|
114635
|
+
*
|
|
114636
|
+
* @param {ModdleElement} bo
|
|
114637
|
+
* @return {boolean}
|
|
114638
114638
|
*/
|
|
114639
114639
|
function isAsync(bo) {
|
|
114640
114640
|
return isAsyncAfter$3(bo) || isAsyncBefore$3(bo);
|
|
@@ -114646,8 +114646,8 @@
|
|
|
114646
114646
|
return node && !node.checked;
|
|
114647
114647
|
}
|
|
114648
114648
|
|
|
114649
|
-
/**
|
|
114650
|
-
* Cf. https://docs.camunda.org/manual/7.15/reference/bpmn20/subprocesses/call-activity/#passing-variables
|
|
114649
|
+
/**
|
|
114650
|
+
* Cf. https://docs.camunda.org/manual/7.15/reference/bpmn20/subprocesses/call-activity/#passing-variables
|
|
114651
114651
|
*/
|
|
114652
114652
|
function OutMappingPropagationProps(props) {
|
|
114653
114653
|
const {
|
|
@@ -114755,8 +114755,8 @@
|
|
|
114755
114755
|
return !!mappings.length;
|
|
114756
114756
|
}
|
|
114757
114757
|
|
|
114758
|
-
/**
|
|
114759
|
-
* Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-elements/#out
|
|
114758
|
+
/**
|
|
114759
|
+
* Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/custom-extensions/extension-elements/#out
|
|
114760
114760
|
*/
|
|
114761
114761
|
function OutMappingProps({
|
|
114762
114762
|
element,
|
|
@@ -114947,12 +114947,12 @@
|
|
|
114947
114947
|
return entries;
|
|
114948
114948
|
}
|
|
114949
114949
|
|
|
114950
|
-
/**
|
|
114951
|
-
* TimerEventDefinitionType - Generic select entry allowing to select a specific
|
|
114952
|
-
* timerEventDefintionType. To be used together with timerEventDefinitionValue.
|
|
114953
|
-
*
|
|
114954
|
-
* @param {type} props
|
|
114955
|
-
* @return {SelectEntry}
|
|
114950
|
+
/**
|
|
114951
|
+
* TimerEventDefinitionType - Generic select entry allowing to select a specific
|
|
114952
|
+
* timerEventDefintionType. To be used together with timerEventDefinitionValue.
|
|
114953
|
+
*
|
|
114954
|
+
* @param {type} props
|
|
114955
|
+
* @return {SelectEntry}
|
|
114956
114956
|
*/
|
|
114957
114957
|
function TimerEventDefinitionType(props) {
|
|
114958
114958
|
const {
|
|
@@ -115020,13 +115020,13 @@
|
|
|
115020
115020
|
});
|
|
115021
115021
|
}
|
|
115022
115022
|
|
|
115023
|
-
/**
|
|
115024
|
-
* TimerEventDefinitionValue - Generic textField entry allowing to specify the
|
|
115025
|
-
* timerEventDefintionValue based on the set timerEventDefintionType. To be used
|
|
115026
|
-
* together with timerEventDefinitionType.
|
|
115027
|
-
*
|
|
115028
|
-
* @param {type} props
|
|
115029
|
-
* @return {TextFieldEntry}
|
|
115023
|
+
/**
|
|
115024
|
+
* TimerEventDefinitionValue - Generic textField entry allowing to specify the
|
|
115025
|
+
* timerEventDefintionValue based on the set timerEventDefintionType. To be used
|
|
115026
|
+
* together with timerEventDefinitionType.
|
|
115027
|
+
*
|
|
115028
|
+
* @param {type} props
|
|
115029
|
+
* @return {TextFieldEntry}
|
|
115030
115030
|
*/
|
|
115031
115031
|
function TimerEventDefinitionValue(props) {
|
|
115032
115032
|
const {
|
|
@@ -115188,8 +115188,8 @@
|
|
|
115188
115188
|
timeout: 'Timeout'
|
|
115189
115189
|
};
|
|
115190
115190
|
|
|
115191
|
-
/**
|
|
115192
|
-
* Cf. https://docs.camunda.org/manual/latest/user-guide/process-engine/delegation-code/#execution-listener
|
|
115191
|
+
/**
|
|
115192
|
+
* Cf. https://docs.camunda.org/manual/latest/user-guide/process-engine/delegation-code/#execution-listener
|
|
115193
115193
|
*/
|
|
115194
115194
|
function ExecutionListenerProps({
|
|
115195
115195
|
element,
|
|
@@ -115601,11 +115601,11 @@
|
|
|
115601
115601
|
|
|
115602
115602
|
// helper
|
|
115603
115603
|
|
|
115604
|
-
/**
|
|
115605
|
-
* Get a readable label for a listener.
|
|
115606
|
-
*
|
|
115607
|
-
* @param {ModdleElement} listener
|
|
115608
|
-
* @param {string => string} [translate]
|
|
115604
|
+
/**
|
|
115605
|
+
* Get a readable label for a listener.
|
|
115606
|
+
*
|
|
115607
|
+
* @param {ModdleElement} listener
|
|
115608
|
+
* @param {string => string} [translate]
|
|
115609
115609
|
*/
|
|
115610
115610
|
function getListenerLabel(listener, translate = value => value) {
|
|
115611
115611
|
const event = listener.get('event');
|
|
@@ -115952,8 +115952,8 @@
|
|
|
115952
115952
|
return is$6(element, 'bpmn:Process') ? getBusinessObject$2(element) : getBusinessObject$2(element).get('processRef');
|
|
115953
115953
|
}
|
|
115954
115954
|
|
|
115955
|
-
/**
|
|
115956
|
-
* Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/tasks/user-task/
|
|
115955
|
+
/**
|
|
115956
|
+
* Cf. https://docs.camunda.org/manual/latest/reference/bpmn20/tasks/user-task/
|
|
115957
115957
|
*/
|
|
115958
115958
|
function UserAssignmentProps(props) {
|
|
115959
115959
|
const {
|
|
@@ -116215,12 +116215,12 @@
|
|
|
116215
116215
|
return is$6(element, 'bpmn:Process') ? getBusinessObject$2(element) : getBusinessObject$2(element).get('processRef');
|
|
116216
116216
|
}
|
|
116217
116217
|
|
|
116218
|
-
/**
|
|
116219
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
116218
|
+
/**
|
|
116219
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
116220
116220
|
*/
|
|
116221
116221
|
|
|
116222
|
-
/**
|
|
116223
|
-
* @returns {Array<Entry>} entries
|
|
116222
|
+
/**
|
|
116223
|
+
* @returns {Array<Entry>} entries
|
|
116224
116224
|
*/
|
|
116225
116225
|
function IdProps() {
|
|
116226
116226
|
return [{
|
|
@@ -116264,12 +116264,12 @@
|
|
|
116264
116264
|
});
|
|
116265
116265
|
}
|
|
116266
116266
|
|
|
116267
|
-
/**
|
|
116268
|
-
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
116267
|
+
/**
|
|
116268
|
+
* @typedef { import('@bpmn-io/properties-panel').EntryDefinition } Entry
|
|
116269
116269
|
*/
|
|
116270
116270
|
|
|
116271
|
-
/**
|
|
116272
|
-
* @returns {Array<Entry>} entries
|
|
116271
|
+
/**
|
|
116272
|
+
* @returns {Array<Entry>} entries
|
|
116273
116273
|
*/
|
|
116274
116274
|
function ProcessProps(props) {
|
|
116275
116275
|
const {
|
|
@@ -116332,30 +116332,30 @@
|
|
|
116332
116332
|
const LOW_PRIORITY$4 = 500;
|
|
116333
116333
|
const CAMUNDA_PLATFORM_GROUPS = [HistoryCleanupGroup, TasklistGroup, CandidateStarterGroup, ImplementationGroup, ExternalTaskGroup, ProcessVariablesGroup, ErrorsGroup, UserAssignmentGroup, FormGroup, FormDataGroup, TaskListenerGroup, StartInitiatorGroup, ScriptGroup, ConditionGroup, CallActivityGroup, AsynchronousContinuationsGroup, JobExecutionGroup, InMappingPropagationGroup, InMappingGroup, InputGroup, ConnectorInputGroup, OutMappingPropagationGroup, OutMappingGroup, OutputGroup, ConnectorOutputGroup, ExecutionListenerGroup, ExtensionPropertiesGroup, FieldInjectionGroup, BusinessKeyGroup];
|
|
116334
116334
|
|
|
116335
|
-
/**
|
|
116336
|
-
* Provides `camunda` namespace properties.
|
|
116337
|
-
*
|
|
116338
|
-
* @example
|
|
116339
|
-
* ```javascript
|
|
116340
|
-
* import BpmnModeler from 'bpmn-js/lib/Modeler';
|
|
116341
|
-
* import {
|
|
116342
|
-
* BpmnPropertiesPanelModule,
|
|
116343
|
-
* BpmnPropertiesProviderModule,
|
|
116344
|
-
* CamundaPlatformPropertiesProviderModule
|
|
116345
|
-
* } from 'bpmn-js-properties-panel';
|
|
116346
|
-
*
|
|
116347
|
-
* const modeler = new BpmnModeler({
|
|
116348
|
-
* container: '#canvas',
|
|
116349
|
-
* propertiesPanel: {
|
|
116350
|
-
* parent: '#properties'
|
|
116351
|
-
* },
|
|
116352
|
-
* additionalModules: [
|
|
116353
|
-
* BpmnPropertiesPanelModule,
|
|
116354
|
-
* BpmnPropertiesProviderModule,
|
|
116355
|
-
* CamundaPlatformPropertiesProviderModule
|
|
116356
|
-
* ]
|
|
116357
|
-
* });
|
|
116358
|
-
* ```
|
|
116335
|
+
/**
|
|
116336
|
+
* Provides `camunda` namespace properties.
|
|
116337
|
+
*
|
|
116338
|
+
* @example
|
|
116339
|
+
* ```javascript
|
|
116340
|
+
* import BpmnModeler from 'bpmn-js/lib/Modeler';
|
|
116341
|
+
* import {
|
|
116342
|
+
* BpmnPropertiesPanelModule,
|
|
116343
|
+
* BpmnPropertiesProviderModule,
|
|
116344
|
+
* CamundaPlatformPropertiesProviderModule
|
|
116345
|
+
* } from 'bpmn-js-properties-panel';
|
|
116346
|
+
*
|
|
116347
|
+
* const modeler = new BpmnModeler({
|
|
116348
|
+
* container: '#canvas',
|
|
116349
|
+
* propertiesPanel: {
|
|
116350
|
+
* parent: '#properties'
|
|
116351
|
+
* },
|
|
116352
|
+
* additionalModules: [
|
|
116353
|
+
* BpmnPropertiesPanelModule,
|
|
116354
|
+
* BpmnPropertiesProviderModule,
|
|
116355
|
+
* CamundaPlatformPropertiesProviderModule
|
|
116356
|
+
* ]
|
|
116357
|
+
* });
|
|
116358
|
+
* ```
|
|
116359
116359
|
*/
|
|
116360
116360
|
class CamundaPlatformPropertiesProvider {
|
|
116361
116361
|
constructor(propertiesPanel, injector) {
|
|
@@ -116388,8 +116388,8 @@
|
|
|
116388
116388
|
}
|
|
116389
116389
|
CamundaPlatformPropertiesProvider.$inject = ['propertiesPanel', 'injector'];
|
|
116390
116390
|
|
|
116391
|
-
/**
|
|
116392
|
-
* This ensures the <Implementation> group always locates after <Documentation>
|
|
116391
|
+
/**
|
|
116392
|
+
* This ensures the <Implementation> group always locates after <Documentation>
|
|
116393
116393
|
*/
|
|
116394
116394
|
function moveImplementationGroup(groups) {
|
|
116395
116395
|
const documentationGroupIdx = findGroupIndex(groups, 'documentation');
|
|
@@ -116962,1085 +116962,1085 @@
|
|
|
116962
116962
|
}
|
|
116963
116963
|
};
|
|
116964
116964
|
|
|
116965
|
-
/**
|
|
116966
|
-
* @typedef {import('bpmn-js/lib/BaseViewer').BaseViewerOptions} BaseViewerOptions
|
|
116967
|
-
*
|
|
116968
|
-
* @typedef {import('didi').ModuleDeclaration} ModuleDeclaration
|
|
116969
|
-
*/
|
|
116970
|
-
|
|
116971
|
-
/**
|
|
116972
|
-
*
|
|
116973
|
-
* @param {BaseViewerOptions} options
|
|
116974
|
-
*/
|
|
116975
|
-
function Modeler$1(options = {}) {
|
|
116976
|
-
Modeler$2.call(this, options);
|
|
116977
|
-
}
|
|
116978
|
-
|
|
116979
|
-
e$7(Modeler$1, Modeler$2);
|
|
116980
|
-
|
|
116981
|
-
/**
|
|
116982
|
-
* @param { {
|
|
116983
|
-
* disableAdjustOrigin?: boolean;
|
|
116984
|
-
* disableGrid?: boolean;
|
|
116985
|
-
* } } [options]
|
|
116986
|
-
*
|
|
116987
|
-
* @returns {ModuleDeclaration[]}
|
|
116988
|
-
*/
|
|
116989
|
-
Modeler$1.prototype.getModules = function(options = {}) {
|
|
116990
|
-
const modules = Modeler$2.prototype.getModules.call(this, options);
|
|
116991
|
-
|
|
116992
|
-
return [
|
|
116993
|
-
...modules,
|
|
116994
|
-
options.disableAdjustOrigin
|
|
116995
|
-
? diagramOriginModule
|
|
116996
|
-
: alignToOriginModule,
|
|
116997
|
-
options.disableGrid
|
|
116998
|
-
? {}
|
|
116999
|
-
: index$6
|
|
117000
|
-
];
|
|
117001
|
-
};
|
|
117002
|
-
|
|
117003
|
-
Modeler$1.prototype._extensionModules = [
|
|
117004
|
-
index$7,
|
|
117005
|
-
ExecutableFixModule,
|
|
117006
|
-
index$3,
|
|
117007
|
-
index$2
|
|
117008
|
-
];
|
|
117009
|
-
|
|
117010
|
-
Modeler$1.prototype._modules = [].concat(
|
|
117011
|
-
Modeler$2.prototype._modules,
|
|
117012
|
-
Modeler$1.prototype._extensionModules
|
|
116965
|
+
/**
|
|
116966
|
+
* @typedef {import('bpmn-js/lib/BaseViewer').BaseViewerOptions} BaseViewerOptions
|
|
116967
|
+
*
|
|
116968
|
+
* @typedef {import('didi').ModuleDeclaration} ModuleDeclaration
|
|
116969
|
+
*/
|
|
116970
|
+
|
|
116971
|
+
/**
|
|
116972
|
+
*
|
|
116973
|
+
* @param {BaseViewerOptions} options
|
|
116974
|
+
*/
|
|
116975
|
+
function Modeler$1(options = {}) {
|
|
116976
|
+
Modeler$2.call(this, options);
|
|
116977
|
+
}
|
|
116978
|
+
|
|
116979
|
+
e$7(Modeler$1, Modeler$2);
|
|
116980
|
+
|
|
116981
|
+
/**
|
|
116982
|
+
* @param { {
|
|
116983
|
+
* disableAdjustOrigin?: boolean;
|
|
116984
|
+
* disableGrid?: boolean;
|
|
116985
|
+
* } } [options]
|
|
116986
|
+
*
|
|
116987
|
+
* @returns {ModuleDeclaration[]}
|
|
116988
|
+
*/
|
|
116989
|
+
Modeler$1.prototype.getModules = function(options = {}) {
|
|
116990
|
+
const modules = Modeler$2.prototype.getModules.call(this, options);
|
|
116991
|
+
|
|
116992
|
+
return [
|
|
116993
|
+
...modules,
|
|
116994
|
+
options.disableAdjustOrigin
|
|
116995
|
+
? diagramOriginModule
|
|
116996
|
+
: alignToOriginModule,
|
|
116997
|
+
options.disableGrid
|
|
116998
|
+
? {}
|
|
116999
|
+
: index$6
|
|
117000
|
+
];
|
|
117001
|
+
};
|
|
117002
|
+
|
|
117003
|
+
Modeler$1.prototype._extensionModules = [
|
|
117004
|
+
index$7,
|
|
117005
|
+
ExecutableFixModule,
|
|
117006
|
+
index$3,
|
|
117007
|
+
index$2
|
|
117008
|
+
];
|
|
117009
|
+
|
|
117010
|
+
Modeler$1.prototype._modules = [].concat(
|
|
117011
|
+
Modeler$2.prototype._modules,
|
|
117012
|
+
Modeler$1.prototype._extensionModules
|
|
117013
117013
|
);
|
|
117014
117014
|
|
|
117015
|
-
const WILDCARD = '*';
|
|
117016
|
-
|
|
117017
|
-
|
|
117018
|
-
class CopyPasteBehavior {
|
|
117019
|
-
constructor(eventBus) {
|
|
117020
|
-
eventBus.on('moddleCopy.canCopyProperty', (context) => {
|
|
117021
|
-
const {
|
|
117022
|
-
parent,
|
|
117023
|
-
property
|
|
117024
|
-
} = context;
|
|
117025
|
-
|
|
117026
|
-
return this.canCopyProperty(property, parent);
|
|
117027
|
-
});
|
|
117028
|
-
}
|
|
117029
|
-
|
|
117030
|
-
/**
|
|
117031
|
-
* Check wether to disallow copying property.
|
|
117032
|
-
*/
|
|
117033
|
-
canCopyProperty(property, parent) {
|
|
117034
|
-
|
|
117035
|
-
// (1) check wether property is allowed in parent
|
|
117036
|
-
if (isObject$2(property) && !isAllowedInParent(property, parent)) {
|
|
117037
|
-
|
|
117038
|
-
return false;
|
|
117039
|
-
}
|
|
117040
|
-
|
|
117041
|
-
// (2) check more complex scenarios
|
|
117042
|
-
if (is$6(property, 'camunda:InputOutput') && !this.canHostInputOutput(parent)) {
|
|
117043
|
-
return false;
|
|
117044
|
-
}
|
|
117045
|
-
|
|
117046
|
-
if (isAny$1(property, [ 'camunda:Connector', 'camunda:Field' ]) && !this.canHostConnector(parent)) {
|
|
117047
|
-
return false;
|
|
117048
|
-
}
|
|
117049
|
-
|
|
117050
|
-
if (is$6(property, 'camunda:In') && !this.canHostIn(parent)) {
|
|
117051
|
-
return false;
|
|
117052
|
-
}
|
|
117053
|
-
}
|
|
117054
|
-
|
|
117055
|
-
canHostInputOutput(parent) {
|
|
117056
|
-
|
|
117057
|
-
// allowed in camunda:Connector
|
|
117058
|
-
const connector = getParent(parent, 'camunda:Connector');
|
|
117059
|
-
|
|
117060
|
-
if (connector) {
|
|
117061
|
-
return true;
|
|
117062
|
-
}
|
|
117063
|
-
|
|
117064
|
-
// special rules inside bpmn:FlowNode
|
|
117065
|
-
const flowNode = getParent(parent, 'bpmn:FlowNode');
|
|
117066
|
-
|
|
117067
|
-
if (!flowNode) {
|
|
117068
|
-
return false;
|
|
117069
|
-
}
|
|
117070
|
-
|
|
117071
|
-
if (isAny$1(flowNode, [ 'bpmn:StartEvent', 'bpmn:Gateway', 'bpmn:BoundaryEvent' ])) {
|
|
117072
|
-
return false;
|
|
117073
|
-
}
|
|
117074
|
-
|
|
117075
|
-
if (is$6(flowNode, 'bpmn:SubProcess') && flowNode.get('triggeredByEvent')) {
|
|
117076
|
-
return false;
|
|
117077
|
-
}
|
|
117078
|
-
|
|
117079
|
-
return true;
|
|
117080
|
-
}
|
|
117081
|
-
|
|
117082
|
-
canHostConnector(parent) {
|
|
117083
|
-
const serviceTaskLike = getParent(parent, 'camunda:ServiceTaskLike');
|
|
117084
|
-
|
|
117085
|
-
if (is$6(serviceTaskLike, 'bpmn:MessageEventDefinition')) {
|
|
117086
|
-
|
|
117087
|
-
// only allow on throw and end events
|
|
117088
|
-
return (
|
|
117089
|
-
getParent(parent, 'bpmn:IntermediateThrowEvent')
|
|
117090
|
-
|| getParent(parent, 'bpmn:EndEvent')
|
|
117091
|
-
);
|
|
117092
|
-
}
|
|
117093
|
-
|
|
117094
|
-
return true;
|
|
117095
|
-
}
|
|
117096
|
-
|
|
117097
|
-
canHostIn(parent) {
|
|
117098
|
-
const callActivity = getParent(parent, 'bpmn:CallActivity');
|
|
117099
|
-
|
|
117100
|
-
if (callActivity) {
|
|
117101
|
-
return true;
|
|
117102
|
-
}
|
|
117103
|
-
|
|
117104
|
-
const signalEventDefinition = getParent(parent, 'bpmn:SignalEventDefinition');
|
|
117105
|
-
|
|
117106
|
-
if (signalEventDefinition) {
|
|
117107
|
-
|
|
117108
|
-
// only allow on throw and end events
|
|
117109
|
-
return (
|
|
117110
|
-
getParent(parent, 'bpmn:IntermediateThrowEvent')
|
|
117111
|
-
|| getParent(parent, 'bpmn:EndEvent')
|
|
117112
|
-
);
|
|
117113
|
-
}
|
|
117114
|
-
|
|
117115
|
-
return true;
|
|
117116
|
-
}
|
|
117117
|
-
}
|
|
117118
|
-
|
|
117119
|
-
CopyPasteBehavior.$inject = [ 'eventBus' ];
|
|
117120
|
-
|
|
117121
|
-
|
|
117122
|
-
// helpers //////////
|
|
117123
|
-
|
|
117124
|
-
function getParent(element, type) {
|
|
117125
|
-
if (!type) {
|
|
117126
|
-
return element.$parent;
|
|
117127
|
-
}
|
|
117128
|
-
|
|
117129
|
-
if (is$6(element, type)) {
|
|
117130
|
-
return element;
|
|
117131
|
-
}
|
|
117132
|
-
|
|
117133
|
-
if (!element.$parent) {
|
|
117134
|
-
return;
|
|
117135
|
-
}
|
|
117136
|
-
|
|
117137
|
-
return getParent(element.$parent, type);
|
|
117138
|
-
}
|
|
117139
|
-
|
|
117140
|
-
function isAllowedInParent(property, parent) {
|
|
117141
|
-
|
|
117142
|
-
// (1) find property descriptor
|
|
117143
|
-
var descriptor = property.$type && property.$model.getTypeDescriptor(property.$type);
|
|
117144
|
-
|
|
117145
|
-
var allowedIn = descriptor && descriptor.meta && descriptor.meta.allowedIn;
|
|
117146
|
-
|
|
117147
|
-
if (!allowedIn || isWildcard(allowedIn)) {
|
|
117148
|
-
return true;
|
|
117149
|
-
}
|
|
117150
|
-
|
|
117151
|
-
// (2) check wether property has parent of allowed type
|
|
117152
|
-
return some$2(allowedIn, function(type) {
|
|
117153
|
-
return getParent(parent, type);
|
|
117154
|
-
});
|
|
117155
|
-
}
|
|
117156
|
-
|
|
117157
|
-
function isWildcard(allowedIn) {
|
|
117158
|
-
return allowedIn.includes(WILDCARD);
|
|
117159
|
-
}
|
|
117160
|
-
|
|
117161
|
-
const LOW_PRIORITY$3 = 500;
|
|
117162
|
-
|
|
117163
|
-
|
|
117164
|
-
/**
|
|
117165
|
-
* Add referenced root elements (bpmn:Error) if they don't exist.
|
|
117166
|
-
* Copy referenced root elements on copy & paste.
|
|
117167
|
-
*/
|
|
117168
|
-
class CopyPasteRootElementBehavior extends CommandInterceptor$1 {
|
|
117169
|
-
constructor(bpmnFactory, bpmnjs, eventBus, moddleCopy) {
|
|
117170
|
-
super(eventBus);
|
|
117171
|
-
|
|
117172
|
-
function hasRootElement(rootElement) {
|
|
117173
|
-
const definitions = bpmnjs.getDefinitions(),
|
|
117174
|
-
rootElements = definitions.get('rootElements');
|
|
117175
|
-
|
|
117176
|
-
return !!find$3(rootElements, matchPattern$1({ id: rootElement.get('id') }));
|
|
117177
|
-
}
|
|
117178
|
-
|
|
117179
|
-
// create shape
|
|
117180
|
-
this.executed('shape.create', (context) => {
|
|
117181
|
-
const { shape } = context;
|
|
117182
|
-
|
|
117183
|
-
const businessObject = getBusinessObject$2(shape);
|
|
117184
|
-
|
|
117185
|
-
if (!canHaveNestedRootElementReference(businessObject)) {
|
|
117186
|
-
return;
|
|
117187
|
-
}
|
|
117188
|
-
|
|
117189
|
-
const referencedRootElements = getRootElements(businessObject, getReferencingElement(shape)),
|
|
117190
|
-
rootElements = bpmnjs.getDefinitions().get('rootElements');
|
|
117191
|
-
|
|
117192
|
-
context.addedRootElements = [];
|
|
117193
|
-
|
|
117194
|
-
referencedRootElements.forEach((reference) => {
|
|
117195
|
-
const { referencedElement } = reference;
|
|
117196
|
-
|
|
117197
|
-
if (referencedElement && !hasRootElement(referencedElement)) {
|
|
117198
|
-
|
|
117199
|
-
// add root element
|
|
117200
|
-
add$3(rootElements, referencedElement);
|
|
117201
|
-
|
|
117202
|
-
context.addedRootElements.push(referencedElement);
|
|
117203
|
-
}
|
|
117204
|
-
});
|
|
117205
|
-
}, true);
|
|
117206
|
-
|
|
117207
|
-
this.reverted('shape.create', (context) => {
|
|
117208
|
-
const { addedRootElements } = context;
|
|
117209
|
-
|
|
117210
|
-
if (!addedRootElements) {
|
|
117211
|
-
return;
|
|
117212
|
-
}
|
|
117213
|
-
|
|
117214
|
-
const rootElements = bpmnjs.getDefinitions().get('rootElements');
|
|
117215
|
-
|
|
117216
|
-
// remove root elements
|
|
117217
|
-
addedRootElements.forEach((addedRootElement) => {
|
|
117218
|
-
remove$2(rootElements, addedRootElement);
|
|
117219
|
-
});
|
|
117220
|
-
}, true);
|
|
117221
|
-
|
|
117222
|
-
eventBus.on('copyPaste.copyElement', function(context) {
|
|
117223
|
-
const {
|
|
117224
|
-
descriptor,
|
|
117225
|
-
element
|
|
117226
|
-
} = context;
|
|
117227
|
-
|
|
117228
|
-
const businessObject = getBusinessObject$2(element);
|
|
117229
|
-
|
|
117230
|
-
if (element.labelTarget || !canHaveNestedRootElementReference(businessObject)) {
|
|
117231
|
-
return;
|
|
117232
|
-
}
|
|
117233
|
-
|
|
117234
|
-
const rootElements = getRootElements(businessObject, getReferencingElement(element));
|
|
117235
|
-
|
|
117236
|
-
if (rootElements) {
|
|
117237
|
-
descriptor.referencedRootElements = rootElements;
|
|
117238
|
-
}
|
|
117239
|
-
});
|
|
117240
|
-
|
|
117241
|
-
eventBus.on('copyPaste.pasteElement', LOW_PRIORITY$3, (context) => {
|
|
117242
|
-
const { descriptor } = context;
|
|
117243
|
-
|
|
117244
|
-
const {
|
|
117245
|
-
businessObject,
|
|
117246
|
-
referencedRootElements
|
|
117247
|
-
} = descriptor;
|
|
117248
|
-
|
|
117249
|
-
if (!referencedRootElements) {
|
|
117250
|
-
return;
|
|
117251
|
-
}
|
|
117252
|
-
|
|
117253
|
-
referencedRootElements.forEach((reference) => {
|
|
117254
|
-
let {
|
|
117255
|
-
idx,
|
|
117256
|
-
referencedElement
|
|
117257
|
-
} = reference;
|
|
117258
|
-
|
|
117259
|
-
if (!referencedElement) {
|
|
117260
|
-
return;
|
|
117261
|
-
}
|
|
117262
|
-
|
|
117263
|
-
if (!hasRootElement(referencedElement)) {
|
|
117264
|
-
referencedElement = moddleCopy.copyElement(
|
|
117265
|
-
referencedElement,
|
|
117266
|
-
bpmnFactory.create(referencedElement.$type)
|
|
117267
|
-
);
|
|
117268
|
-
}
|
|
117269
|
-
|
|
117270
|
-
setRootElement(businessObject, referencedElement, idx);
|
|
117271
|
-
});
|
|
117272
|
-
|
|
117273
|
-
delete descriptor.referencedRootElements;
|
|
117274
|
-
});
|
|
117275
|
-
}
|
|
117276
|
-
}
|
|
117277
|
-
|
|
117278
|
-
CopyPasteRootElementBehavior.$inject = [
|
|
117279
|
-
'bpmnFactory',
|
|
117280
|
-
'bpmnjs',
|
|
117281
|
-
'eventBus',
|
|
117282
|
-
'moddleCopy'
|
|
117283
|
-
];
|
|
117284
|
-
|
|
117285
|
-
|
|
117286
|
-
// helpers //////////
|
|
117287
|
-
|
|
117288
|
-
function getReferencingElement(element) {
|
|
117289
|
-
if (is$6(element, 'bpmn:ServiceTask')) {
|
|
117290
|
-
return 'camunda:ErrorEventDefinition';
|
|
117291
|
-
}
|
|
117292
|
-
}
|
|
117293
|
-
|
|
117294
|
-
function getRootElementReferencePropertyName(bo) {
|
|
117295
|
-
if (is$6(bo, 'camunda:ErrorEventDefinition')) {
|
|
117296
|
-
return 'errorRef';
|
|
117297
|
-
}
|
|
117298
|
-
}
|
|
117299
|
-
|
|
117300
|
-
function canHaveNestedRootElementReference(businessObject) {
|
|
117301
|
-
return is$6(businessObject, 'bpmn:ServiceTask') && businessObject.get('type') === 'external';
|
|
117302
|
-
}
|
|
117303
|
-
|
|
117304
|
-
/**
|
|
117305
|
-
* Retrieves a list of to-be copied references for the extension elements
|
|
117306
|
-
* of a given element in the following form.
|
|
117307
|
-
*
|
|
117308
|
-
* [
|
|
117309
|
-
* {
|
|
117310
|
-
* idx: 0, // position of extension in the list of extension elements
|
|
117311
|
-
* referencedElement: {ModdleElement} // reference to root element
|
|
117312
|
-
* }
|
|
117313
|
-
* ]
|
|
117314
|
-
*
|
|
117315
|
-
*
|
|
117316
|
-
* @param {ModdleElement} businessObject
|
|
117317
|
-
* @param {String} extensionElementType
|
|
117318
|
-
*
|
|
117319
|
-
* @returns {Array}
|
|
117320
|
-
*/
|
|
117321
|
-
function getRootElements(businessObject, extensionElementType) {
|
|
117322
|
-
const extensionElements = businessObject.get('extensionElements');
|
|
117323
|
-
|
|
117324
|
-
if (!extensionElements) {
|
|
117325
|
-
return [];
|
|
117326
|
-
}
|
|
117327
|
-
|
|
117328
|
-
return extensionElements
|
|
117329
|
-
.get('values')
|
|
117330
|
-
.filter((element) => is$6(element, extensionElementType))
|
|
117331
|
-
.reduce((result, element) => {
|
|
117332
|
-
const referencedElement = element.get(getRootElementReferencePropertyName(element));
|
|
117333
|
-
|
|
117334
|
-
if (referencedElement) {
|
|
117335
|
-
result.push({
|
|
117336
|
-
idx: getExtensionElementId(businessObject, element),
|
|
117337
|
-
referencedElement
|
|
117338
|
-
});
|
|
117339
|
-
}
|
|
117340
|
-
|
|
117341
|
-
return result;
|
|
117342
|
-
}, []);
|
|
117343
|
-
}
|
|
117344
|
-
|
|
117345
|
-
function setRootElement(businessObject, rootElement, index) {
|
|
117346
|
-
const extensionElement = businessObject.get('extensionElements').get('values')[ index ];
|
|
117347
|
-
|
|
117348
|
-
extensionElement.set(getRootElementReferencePropertyName(extensionElement), rootElement);
|
|
117349
|
-
}
|
|
117350
|
-
|
|
117351
|
-
function getExtensionElementId(businessObject, extensionElement) {
|
|
117352
|
-
const extensionElements = businessObject.get('extensionElements');
|
|
117353
|
-
|
|
117354
|
-
if (!extensionElements) {
|
|
117355
|
-
return -1;
|
|
117356
|
-
}
|
|
117357
|
-
|
|
117358
|
-
return extensionElements.get('values').indexOf(extensionElement);
|
|
117359
|
-
}
|
|
117360
|
-
|
|
117361
|
-
/**
|
|
117362
|
-
* Get extension elements of business object. Optionally filter by type.
|
|
117363
|
-
*
|
|
117364
|
-
* @param {djs.model.Base|ModdleElement} element
|
|
117365
|
-
* @param {String} [type=undefined]
|
|
117366
|
-
* @returns {Array<ModdleElement>}
|
|
117367
|
-
*/
|
|
117368
|
-
function getExtensionElementsList(element, type = undefined) {
|
|
117369
|
-
const businessObject = getBusinessObject$2(element),
|
|
117370
|
-
extensionElements = businessObject.get('extensionElements');
|
|
117371
|
-
|
|
117372
|
-
if (!extensionElements) {
|
|
117373
|
-
return [];
|
|
117374
|
-
}
|
|
117375
|
-
|
|
117376
|
-
const values = extensionElements.get('values');
|
|
117377
|
-
|
|
117378
|
-
if (!values || !values.length) {
|
|
117379
|
-
return [];
|
|
117380
|
-
}
|
|
117381
|
-
|
|
117382
|
-
if (type) {
|
|
117383
|
-
return values.filter(value => is$6(value, type));
|
|
117384
|
-
}
|
|
117385
|
-
|
|
117386
|
-
return values;
|
|
117387
|
-
}
|
|
117388
|
-
|
|
117389
|
-
/**
|
|
117390
|
-
* Remove one or more extension elements. Remove bpmn:ExtensionElements afterwards if it's empty.
|
|
117391
|
-
*
|
|
117392
|
-
* @param {ModdleElement} element
|
|
117393
|
-
* @param {ModdleElement} businessObject
|
|
117394
|
-
* @param {ModdleElement|Array<ModdleElement>} extensionElementsToRemove
|
|
117395
|
-
* @param {CommandStack} commandStack
|
|
117396
|
-
*/
|
|
117397
|
-
function removeExtensionElements(element, businessObject, extensionElementsToRemove, commandStack) {
|
|
117398
|
-
if (!isArray$5(extensionElementsToRemove)) {
|
|
117399
|
-
extensionElementsToRemove = [ extensionElementsToRemove ];
|
|
117400
|
-
}
|
|
117401
|
-
|
|
117402
|
-
const extensionElements = businessObject.get('extensionElements'),
|
|
117403
|
-
values = extensionElements.get('values').filter(value => !extensionElementsToRemove.includes(value));
|
|
117404
|
-
|
|
117405
|
-
commandStack.execute('element.updateModdleProperties', {
|
|
117406
|
-
element,
|
|
117407
|
-
moddleElement: extensionElements,
|
|
117408
|
-
properties: {
|
|
117409
|
-
values
|
|
117410
|
-
}
|
|
117411
|
-
});
|
|
117412
|
-
}
|
|
117413
|
-
|
|
117414
|
-
const HIGH_PRIORITY$3 = 5000;
|
|
117415
|
-
|
|
117416
|
-
|
|
117417
|
-
/**
|
|
117418
|
-
* Camunda BPMN specific behavior ensuring camunda:ErrorEventDefinition extension elements are removed
|
|
117419
|
-
* if type of e.g. bpmn:ServiceTask is set to something other than external.
|
|
117420
|
-
*/
|
|
117421
|
-
class DeleteErrorEventDefinitionBehavior extends CommandInterceptor$1 {
|
|
117422
|
-
constructor(commandStack, eventBus) {
|
|
117423
|
-
super(eventBus);
|
|
117424
|
-
|
|
117425
|
-
this.postExecute([
|
|
117426
|
-
'element.updateProperties',
|
|
117427
|
-
'element.updateModdleProperties'
|
|
117428
|
-
], HIGH_PRIORITY$3, function(context) {
|
|
117429
|
-
const {
|
|
117430
|
-
element,
|
|
117431
|
-
moddleElement,
|
|
117432
|
-
properties
|
|
117433
|
-
} = context;
|
|
117434
|
-
|
|
117435
|
-
const businessObject = moddleElement || getBusinessObject$2(element);
|
|
117436
|
-
|
|
117437
|
-
if (is$6(element, 'camunda:ExternalCapable')
|
|
117438
|
-
&& is$6(businessObject, 'camunda:ExternalCapable')
|
|
117439
|
-
&& properties[ 'camunda:type' ] !== 'external'
|
|
117440
|
-
) {
|
|
117441
|
-
const errorEventDefinitions = getExtensionElementsList(businessObject, 'camunda:ErrorEventDefinition');
|
|
117442
|
-
|
|
117443
|
-
if (errorEventDefinitions.length) {
|
|
117444
|
-
removeExtensionElements(element, businessObject, errorEventDefinitions, commandStack);
|
|
117445
|
-
}
|
|
117446
|
-
}
|
|
117447
|
-
}, true);
|
|
117448
|
-
|
|
117449
|
-
}
|
|
117450
|
-
}
|
|
117451
|
-
|
|
117452
|
-
DeleteErrorEventDefinitionBehavior.$inject = [
|
|
117453
|
-
'commandStack',
|
|
117454
|
-
'eventBus'
|
|
117455
|
-
];
|
|
117456
|
-
|
|
117457
|
-
const LOW_PRIORITY$2 = 250;
|
|
117458
|
-
|
|
117459
|
-
/**
|
|
117460
|
-
* Camunda-specific behavior ensuring `isExecutable` is kept after deleting
|
|
117461
|
-
* the last participant.
|
|
117462
|
-
*/
|
|
117463
|
-
class DeleteParticipantBehaviour extends CommandInterceptor$1 {
|
|
117464
|
-
constructor(eventBus, canvas, modeling) {
|
|
117465
|
-
super(eventBus);
|
|
117466
|
-
|
|
117467
|
-
this.postExecuted('shape.delete', LOW_PRIORITY$2, function(context) {
|
|
117468
|
-
const {
|
|
117469
|
-
collaborationRoot,
|
|
117470
|
-
shape
|
|
117471
|
-
} = context;
|
|
117472
|
-
|
|
117473
|
-
const newRoot = canvas.getRootElement();
|
|
117474
|
-
|
|
117475
|
-
if (is$6(shape, 'bpmn:Participant') &&
|
|
117476
|
-
collaborationRoot &&
|
|
117477
|
-
!collaborationRoot.businessObject.get('participants').length &&
|
|
117478
|
-
is$6(newRoot, 'bpmn:Process')) {
|
|
117479
|
-
|
|
117480
|
-
const oldProcessBusinessObject = shape.businessObject.get('processRef');
|
|
117481
|
-
|
|
117482
|
-
if (!oldProcessBusinessObject) {
|
|
117483
|
-
return;
|
|
117484
|
-
}
|
|
117485
|
-
|
|
117486
|
-
modeling.updateProperties(newRoot, { isExecutable: oldProcessBusinessObject.get('isExecutable') });
|
|
117487
|
-
}
|
|
117488
|
-
|
|
117489
|
-
}, true);
|
|
117490
|
-
}
|
|
117491
|
-
}
|
|
117492
|
-
|
|
117493
|
-
DeleteParticipantBehaviour.$inject = [
|
|
117494
|
-
'eventBus',
|
|
117495
|
-
'canvas',
|
|
117496
|
-
'modeling'
|
|
117497
|
-
];
|
|
117498
|
-
|
|
117499
|
-
const HIGH_PRIORITY$2 = 5000;
|
|
117500
|
-
|
|
117501
|
-
|
|
117502
|
-
/**
|
|
117503
|
-
* Camunda BPMN specific behavior ensuring camunda:FailedJobRetryTimeCycle is
|
|
117504
|
-
* removed when both camunda:asyncAfter and camunda:asyncBefore set to false.
|
|
117505
|
-
* Doesn't apply if element has bpmn:TimerEventDefinition.
|
|
117506
|
-
*/
|
|
117507
|
-
class DeleteRetryTimeCycleBehavior extends CommandInterceptor$1 {
|
|
117508
|
-
constructor(commandStack, eventBus) {
|
|
117509
|
-
super(eventBus);
|
|
117510
|
-
|
|
117511
|
-
this.postExecute([
|
|
117512
|
-
'element.updateProperties',
|
|
117513
|
-
'element.updateModdleProperties'
|
|
117514
|
-
], HIGH_PRIORITY$2, function(context) {
|
|
117515
|
-
const {
|
|
117516
|
-
element,
|
|
117517
|
-
moddleElement,
|
|
117518
|
-
properties = {}
|
|
117519
|
-
} = context;
|
|
117520
|
-
|
|
117521
|
-
const asyncAfter = properties[ 'camunda:asyncAfter' ],
|
|
117522
|
-
asyncBefore = properties[ 'camunda:asyncBefore' ];
|
|
117523
|
-
|
|
117524
|
-
const businessObject = moddleElement || getBusinessObject$2(element);
|
|
117525
|
-
|
|
117526
|
-
const failedJobRetryTimeCycle = getFailedJobRetryTimeCycle(element);
|
|
117527
|
-
|
|
117528
|
-
if (
|
|
117529
|
-
!is$6(element, 'camunda:AsyncCapable')
|
|
117530
|
-
|| !is$6(businessObject, 'camunda:AsyncCapable')
|
|
117531
|
-
|| (asyncAfter !== false && asyncBefore !== false)
|
|
117532
|
-
|| !failedJobRetryTimeCycle
|
|
117533
|
-
|| getTimerEventDefinition(element)
|
|
117534
|
-
|| isAsyncBefore$1(businessObject)
|
|
117535
|
-
|| isAsyncAfter$1(businessObject)
|
|
117536
|
-
) {
|
|
117537
|
-
return;
|
|
117538
|
-
}
|
|
117539
|
-
|
|
117540
|
-
removeExtensionElements(element, businessObject, failedJobRetryTimeCycle, commandStack);
|
|
117541
|
-
}, true);
|
|
117542
|
-
|
|
117543
|
-
}
|
|
117544
|
-
}
|
|
117545
|
-
|
|
117546
|
-
DeleteRetryTimeCycleBehavior.$inject = [
|
|
117547
|
-
'commandStack',
|
|
117548
|
-
'eventBus'
|
|
117549
|
-
];
|
|
117550
|
-
|
|
117551
|
-
|
|
117552
|
-
// helpers //////////
|
|
117553
|
-
|
|
117554
|
-
function isAsyncBefore$1(businessObject) {
|
|
117555
|
-
return !!(businessObject.get('camunda:asyncBefore') || businessObject.get('camunda:async'));
|
|
117556
|
-
}
|
|
117557
|
-
|
|
117558
|
-
function isAsyncAfter$1(businessObject) {
|
|
117559
|
-
return !!businessObject.get('camunda:asyncAfter');
|
|
117560
|
-
}
|
|
117561
|
-
|
|
117562
|
-
function getFailedJobRetryTimeCycle(element) {
|
|
117563
|
-
return getExtensionElementsList(element, 'camunda:FailedJobRetryTimeCycle')[ 0 ];
|
|
117564
|
-
}
|
|
117565
|
-
|
|
117566
|
-
function getTimerEventDefinition(element) {
|
|
117567
|
-
return getEventDefinition$1(element, 'bpmn:TimerEventDefinition');
|
|
117568
|
-
}
|
|
117569
|
-
|
|
117570
|
-
function getEventDefinition$1(element, type) {
|
|
117571
|
-
const businessObject = getBusinessObject$2(element);
|
|
117572
|
-
|
|
117573
|
-
const eventDefinitions = businessObject.get('eventDefinitions');
|
|
117574
|
-
|
|
117575
|
-
if (!eventDefinitions || !eventDefinitions.length) {
|
|
117576
|
-
return;
|
|
117577
|
-
}
|
|
117578
|
-
|
|
117579
|
-
return eventDefinitions.find((eventDefinition) => {
|
|
117580
|
-
return is$6(eventDefinition, type);
|
|
117581
|
-
});
|
|
117015
|
+
const WILDCARD = '*';
|
|
117016
|
+
|
|
117017
|
+
|
|
117018
|
+
class CopyPasteBehavior {
|
|
117019
|
+
constructor(eventBus) {
|
|
117020
|
+
eventBus.on('moddleCopy.canCopyProperty', (context) => {
|
|
117021
|
+
const {
|
|
117022
|
+
parent,
|
|
117023
|
+
property
|
|
117024
|
+
} = context;
|
|
117025
|
+
|
|
117026
|
+
return this.canCopyProperty(property, parent);
|
|
117027
|
+
});
|
|
117028
|
+
}
|
|
117029
|
+
|
|
117030
|
+
/**
|
|
117031
|
+
* Check wether to disallow copying property.
|
|
117032
|
+
*/
|
|
117033
|
+
canCopyProperty(property, parent) {
|
|
117034
|
+
|
|
117035
|
+
// (1) check wether property is allowed in parent
|
|
117036
|
+
if (isObject$2(property) && !isAllowedInParent(property, parent)) {
|
|
117037
|
+
|
|
117038
|
+
return false;
|
|
117039
|
+
}
|
|
117040
|
+
|
|
117041
|
+
// (2) check more complex scenarios
|
|
117042
|
+
if (is$6(property, 'camunda:InputOutput') && !this.canHostInputOutput(parent)) {
|
|
117043
|
+
return false;
|
|
117044
|
+
}
|
|
117045
|
+
|
|
117046
|
+
if (isAny$1(property, [ 'camunda:Connector', 'camunda:Field' ]) && !this.canHostConnector(parent)) {
|
|
117047
|
+
return false;
|
|
117048
|
+
}
|
|
117049
|
+
|
|
117050
|
+
if (is$6(property, 'camunda:In') && !this.canHostIn(parent)) {
|
|
117051
|
+
return false;
|
|
117052
|
+
}
|
|
117053
|
+
}
|
|
117054
|
+
|
|
117055
|
+
canHostInputOutput(parent) {
|
|
117056
|
+
|
|
117057
|
+
// allowed in camunda:Connector
|
|
117058
|
+
const connector = getParent(parent, 'camunda:Connector');
|
|
117059
|
+
|
|
117060
|
+
if (connector) {
|
|
117061
|
+
return true;
|
|
117062
|
+
}
|
|
117063
|
+
|
|
117064
|
+
// special rules inside bpmn:FlowNode
|
|
117065
|
+
const flowNode = getParent(parent, 'bpmn:FlowNode');
|
|
117066
|
+
|
|
117067
|
+
if (!flowNode) {
|
|
117068
|
+
return false;
|
|
117069
|
+
}
|
|
117070
|
+
|
|
117071
|
+
if (isAny$1(flowNode, [ 'bpmn:StartEvent', 'bpmn:Gateway', 'bpmn:BoundaryEvent' ])) {
|
|
117072
|
+
return false;
|
|
117073
|
+
}
|
|
117074
|
+
|
|
117075
|
+
if (is$6(flowNode, 'bpmn:SubProcess') && flowNode.get('triggeredByEvent')) {
|
|
117076
|
+
return false;
|
|
117077
|
+
}
|
|
117078
|
+
|
|
117079
|
+
return true;
|
|
117080
|
+
}
|
|
117081
|
+
|
|
117082
|
+
canHostConnector(parent) {
|
|
117083
|
+
const serviceTaskLike = getParent(parent, 'camunda:ServiceTaskLike');
|
|
117084
|
+
|
|
117085
|
+
if (is$6(serviceTaskLike, 'bpmn:MessageEventDefinition')) {
|
|
117086
|
+
|
|
117087
|
+
// only allow on throw and end events
|
|
117088
|
+
return (
|
|
117089
|
+
getParent(parent, 'bpmn:IntermediateThrowEvent')
|
|
117090
|
+
|| getParent(parent, 'bpmn:EndEvent')
|
|
117091
|
+
);
|
|
117092
|
+
}
|
|
117093
|
+
|
|
117094
|
+
return true;
|
|
117095
|
+
}
|
|
117096
|
+
|
|
117097
|
+
canHostIn(parent) {
|
|
117098
|
+
const callActivity = getParent(parent, 'bpmn:CallActivity');
|
|
117099
|
+
|
|
117100
|
+
if (callActivity) {
|
|
117101
|
+
return true;
|
|
117102
|
+
}
|
|
117103
|
+
|
|
117104
|
+
const signalEventDefinition = getParent(parent, 'bpmn:SignalEventDefinition');
|
|
117105
|
+
|
|
117106
|
+
if (signalEventDefinition) {
|
|
117107
|
+
|
|
117108
|
+
// only allow on throw and end events
|
|
117109
|
+
return (
|
|
117110
|
+
getParent(parent, 'bpmn:IntermediateThrowEvent')
|
|
117111
|
+
|| getParent(parent, 'bpmn:EndEvent')
|
|
117112
|
+
);
|
|
117113
|
+
}
|
|
117114
|
+
|
|
117115
|
+
return true;
|
|
117116
|
+
}
|
|
117117
|
+
}
|
|
117118
|
+
|
|
117119
|
+
CopyPasteBehavior.$inject = [ 'eventBus' ];
|
|
117120
|
+
|
|
117121
|
+
|
|
117122
|
+
// helpers //////////
|
|
117123
|
+
|
|
117124
|
+
function getParent(element, type) {
|
|
117125
|
+
if (!type) {
|
|
117126
|
+
return element.$parent;
|
|
117127
|
+
}
|
|
117128
|
+
|
|
117129
|
+
if (is$6(element, type)) {
|
|
117130
|
+
return element;
|
|
117131
|
+
}
|
|
117132
|
+
|
|
117133
|
+
if (!element.$parent) {
|
|
117134
|
+
return;
|
|
117135
|
+
}
|
|
117136
|
+
|
|
117137
|
+
return getParent(element.$parent, type);
|
|
117138
|
+
}
|
|
117139
|
+
|
|
117140
|
+
function isAllowedInParent(property, parent) {
|
|
117141
|
+
|
|
117142
|
+
// (1) find property descriptor
|
|
117143
|
+
var descriptor = property.$type && property.$model.getTypeDescriptor(property.$type);
|
|
117144
|
+
|
|
117145
|
+
var allowedIn = descriptor && descriptor.meta && descriptor.meta.allowedIn;
|
|
117146
|
+
|
|
117147
|
+
if (!allowedIn || isWildcard(allowedIn)) {
|
|
117148
|
+
return true;
|
|
117149
|
+
}
|
|
117150
|
+
|
|
117151
|
+
// (2) check wether property has parent of allowed type
|
|
117152
|
+
return some$2(allowedIn, function(type) {
|
|
117153
|
+
return getParent(parent, type);
|
|
117154
|
+
});
|
|
117155
|
+
}
|
|
117156
|
+
|
|
117157
|
+
function isWildcard(allowedIn) {
|
|
117158
|
+
return allowedIn.includes(WILDCARD);
|
|
117582
117159
|
}
|
|
117583
117160
|
|
|
117584
|
-
|
|
117585
|
-
|
|
117586
|
-
|
|
117587
|
-
|
|
117588
|
-
|
|
117589
|
-
|
|
117590
|
-
|
|
117591
|
-
|
|
117592
|
-
|
|
117593
|
-
|
|
117594
|
-
|
|
117595
|
-
|
|
117596
|
-
|
|
117597
|
-
|
|
117598
|
-
|
|
117599
|
-
|
|
117600
|
-
|
|
117601
|
-
|
|
117602
|
-
|
|
117603
|
-
|
|
117604
|
-
|
|
117605
|
-
|
|
117606
|
-
|
|
117607
|
-
|
|
117161
|
+
const LOW_PRIORITY$3 = 500;
|
|
117162
|
+
|
|
117163
|
+
|
|
117164
|
+
/**
|
|
117165
|
+
* Add referenced root elements (bpmn:Error) if they don't exist.
|
|
117166
|
+
* Copy referenced root elements on copy & paste.
|
|
117167
|
+
*/
|
|
117168
|
+
class CopyPasteRootElementBehavior extends CommandInterceptor$1 {
|
|
117169
|
+
constructor(bpmnFactory, bpmnjs, eventBus, moddleCopy) {
|
|
117170
|
+
super(eventBus);
|
|
117171
|
+
|
|
117172
|
+
function hasRootElement(rootElement) {
|
|
117173
|
+
const definitions = bpmnjs.getDefinitions(),
|
|
117174
|
+
rootElements = definitions.get('rootElements');
|
|
117175
|
+
|
|
117176
|
+
return !!find$3(rootElements, matchPattern$1({ id: rootElement.get('id') }));
|
|
117177
|
+
}
|
|
117178
|
+
|
|
117179
|
+
// create shape
|
|
117180
|
+
this.executed('shape.create', (context) => {
|
|
117181
|
+
const { shape } = context;
|
|
117182
|
+
|
|
117183
|
+
const businessObject = getBusinessObject$2(shape);
|
|
117184
|
+
|
|
117185
|
+
if (!canHaveNestedRootElementReference(businessObject)) {
|
|
117186
|
+
return;
|
|
117187
|
+
}
|
|
117188
|
+
|
|
117189
|
+
const referencedRootElements = getRootElements(businessObject, getReferencingElement(shape)),
|
|
117190
|
+
rootElements = bpmnjs.getDefinitions().get('rootElements');
|
|
117191
|
+
|
|
117192
|
+
context.addedRootElements = [];
|
|
117193
|
+
|
|
117194
|
+
referencedRootElements.forEach((reference) => {
|
|
117195
|
+
const { referencedElement } = reference;
|
|
117196
|
+
|
|
117197
|
+
if (referencedElement && !hasRootElement(referencedElement)) {
|
|
117198
|
+
|
|
117199
|
+
// add root element
|
|
117200
|
+
add$3(rootElements, referencedElement);
|
|
117201
|
+
|
|
117202
|
+
context.addedRootElements.push(referencedElement);
|
|
117203
|
+
}
|
|
117204
|
+
});
|
|
117205
|
+
}, true);
|
|
117206
|
+
|
|
117207
|
+
this.reverted('shape.create', (context) => {
|
|
117208
|
+
const { addedRootElements } = context;
|
|
117209
|
+
|
|
117210
|
+
if (!addedRootElements) {
|
|
117211
|
+
return;
|
|
117212
|
+
}
|
|
117213
|
+
|
|
117214
|
+
const rootElements = bpmnjs.getDefinitions().get('rootElements');
|
|
117215
|
+
|
|
117216
|
+
// remove root elements
|
|
117217
|
+
addedRootElements.forEach((addedRootElement) => {
|
|
117218
|
+
remove$2(rootElements, addedRootElement);
|
|
117219
|
+
});
|
|
117220
|
+
}, true);
|
|
117221
|
+
|
|
117222
|
+
eventBus.on('copyPaste.copyElement', function(context) {
|
|
117223
|
+
const {
|
|
117224
|
+
descriptor,
|
|
117225
|
+
element
|
|
117226
|
+
} = context;
|
|
117227
|
+
|
|
117228
|
+
const businessObject = getBusinessObject$2(element);
|
|
117229
|
+
|
|
117230
|
+
if (element.labelTarget || !canHaveNestedRootElementReference(businessObject)) {
|
|
117231
|
+
return;
|
|
117232
|
+
}
|
|
117233
|
+
|
|
117234
|
+
const rootElements = getRootElements(businessObject, getReferencingElement(element));
|
|
117235
|
+
|
|
117236
|
+
if (rootElements) {
|
|
117237
|
+
descriptor.referencedRootElements = rootElements;
|
|
117238
|
+
}
|
|
117239
|
+
});
|
|
117240
|
+
|
|
117241
|
+
eventBus.on('copyPaste.pasteElement', LOW_PRIORITY$3, (context) => {
|
|
117242
|
+
const { descriptor } = context;
|
|
117243
|
+
|
|
117244
|
+
const {
|
|
117245
|
+
businessObject,
|
|
117246
|
+
referencedRootElements
|
|
117247
|
+
} = descriptor;
|
|
117248
|
+
|
|
117249
|
+
if (!referencedRootElements) {
|
|
117250
|
+
return;
|
|
117251
|
+
}
|
|
117252
|
+
|
|
117253
|
+
referencedRootElements.forEach((reference) => {
|
|
117254
|
+
let {
|
|
117255
|
+
idx,
|
|
117256
|
+
referencedElement
|
|
117257
|
+
} = reference;
|
|
117258
|
+
|
|
117259
|
+
if (!referencedElement) {
|
|
117260
|
+
return;
|
|
117261
|
+
}
|
|
117262
|
+
|
|
117263
|
+
if (!hasRootElement(referencedElement)) {
|
|
117264
|
+
referencedElement = moddleCopy.copyElement(
|
|
117265
|
+
referencedElement,
|
|
117266
|
+
bpmnFactory.create(referencedElement.$type)
|
|
117267
|
+
);
|
|
117268
|
+
}
|
|
117269
|
+
|
|
117270
|
+
setRootElement(businessObject, referencedElement, idx);
|
|
117271
|
+
});
|
|
117272
|
+
|
|
117273
|
+
delete descriptor.referencedRootElements;
|
|
117274
|
+
});
|
|
117275
|
+
}
|
|
117276
|
+
}
|
|
117277
|
+
|
|
117278
|
+
CopyPasteRootElementBehavior.$inject = [
|
|
117279
|
+
'bpmnFactory',
|
|
117280
|
+
'bpmnjs',
|
|
117281
|
+
'eventBus',
|
|
117282
|
+
'moddleCopy'
|
|
117283
|
+
];
|
|
117284
|
+
|
|
117285
|
+
|
|
117286
|
+
// helpers //////////
|
|
117287
|
+
|
|
117288
|
+
function getReferencingElement(element) {
|
|
117289
|
+
if (is$6(element, 'bpmn:ServiceTask')) {
|
|
117290
|
+
return 'camunda:ErrorEventDefinition';
|
|
117291
|
+
}
|
|
117292
|
+
}
|
|
117293
|
+
|
|
117294
|
+
function getRootElementReferencePropertyName(bo) {
|
|
117295
|
+
if (is$6(bo, 'camunda:ErrorEventDefinition')) {
|
|
117296
|
+
return 'errorRef';
|
|
117297
|
+
}
|
|
117298
|
+
}
|
|
117299
|
+
|
|
117300
|
+
function canHaveNestedRootElementReference(businessObject) {
|
|
117301
|
+
return is$6(businessObject, 'bpmn:ServiceTask') && businessObject.get('type') === 'external';
|
|
117302
|
+
}
|
|
117303
|
+
|
|
117304
|
+
/**
|
|
117305
|
+
* Retrieves a list of to-be copied references for the extension elements
|
|
117306
|
+
* of a given element in the following form.
|
|
117307
|
+
*
|
|
117308
|
+
* [
|
|
117309
|
+
* {
|
|
117310
|
+
* idx: 0, // position of extension in the list of extension elements
|
|
117311
|
+
* referencedElement: {ModdleElement} // reference to root element
|
|
117312
|
+
* }
|
|
117313
|
+
* ]
|
|
117314
|
+
*
|
|
117315
|
+
*
|
|
117316
|
+
* @param {ModdleElement} businessObject
|
|
117317
|
+
* @param {String} extensionElementType
|
|
117318
|
+
*
|
|
117319
|
+
* @returns {Array}
|
|
117320
|
+
*/
|
|
117321
|
+
function getRootElements(businessObject, extensionElementType) {
|
|
117322
|
+
const extensionElements = businessObject.get('extensionElements');
|
|
117323
|
+
|
|
117324
|
+
if (!extensionElements) {
|
|
117325
|
+
return [];
|
|
117326
|
+
}
|
|
117327
|
+
|
|
117328
|
+
return extensionElements
|
|
117329
|
+
.get('values')
|
|
117330
|
+
.filter((element) => is$6(element, extensionElementType))
|
|
117331
|
+
.reduce((result, element) => {
|
|
117332
|
+
const referencedElement = element.get(getRootElementReferencePropertyName(element));
|
|
117333
|
+
|
|
117334
|
+
if (referencedElement) {
|
|
117335
|
+
result.push({
|
|
117336
|
+
idx: getExtensionElementId(businessObject, element),
|
|
117337
|
+
referencedElement
|
|
117338
|
+
});
|
|
117339
|
+
}
|
|
117340
|
+
|
|
117341
|
+
return result;
|
|
117342
|
+
}, []);
|
|
117343
|
+
}
|
|
117344
|
+
|
|
117345
|
+
function setRootElement(businessObject, rootElement, index) {
|
|
117346
|
+
const extensionElement = businessObject.get('extensionElements').get('values')[ index ];
|
|
117347
|
+
|
|
117348
|
+
extensionElement.set(getRootElementReferencePropertyName(extensionElement), rootElement);
|
|
117349
|
+
}
|
|
117350
|
+
|
|
117351
|
+
function getExtensionElementId(businessObject, extensionElement) {
|
|
117352
|
+
const extensionElements = businessObject.get('extensionElements');
|
|
117353
|
+
|
|
117354
|
+
if (!extensionElements) {
|
|
117355
|
+
return -1;
|
|
117356
|
+
}
|
|
117357
|
+
|
|
117358
|
+
return extensionElements.get('values').indexOf(extensionElement);
|
|
117608
117359
|
}
|
|
117609
117360
|
|
|
117610
|
-
|
|
117611
|
-
|
|
117612
|
-
|
|
117613
|
-
|
|
117614
|
-
|
|
117615
|
-
|
|
117616
|
-
|
|
117617
|
-
|
|
117618
|
-
|
|
117619
|
-
|
|
117620
|
-
|
|
117621
|
-
|
|
117622
|
-
|
|
117623
|
-
|
|
117624
|
-
|
|
117625
|
-
|
|
117626
|
-
|
|
117627
|
-
|
|
117628
|
-
|
|
117629
|
-
|
|
117630
|
-
|
|
117631
|
-
|
|
117632
|
-
|
|
117633
|
-
|
|
117634
|
-
|
|
117635
|
-
|
|
117636
|
-
|
|
117637
|
-
|
|
117638
|
-
|
|
117639
|
-
|
|
117640
|
-
|
|
117641
|
-
|
|
117642
|
-
|
|
117643
|
-
|
|
117644
|
-
|
|
117645
|
-
|
|
117646
|
-
|
|
117647
|
-
|
|
117648
|
-
|
|
117649
|
-
|
|
117650
|
-
|
|
117651
|
-
|
|
117652
|
-
|
|
117653
|
-
|
|
117654
|
-
|
|
117655
|
-
|
|
117656
|
-
|
|
117657
|
-
|
|
117658
|
-
|
|
117659
|
-
|
|
117660
|
-
|
|
117661
|
-
if (update) {
|
|
117662
|
-
modeling.updateProperties(shape, {
|
|
117663
|
-
eventDefinitions: eventDefinitions
|
|
117664
|
-
});
|
|
117665
|
-
}
|
|
117666
|
-
}
|
|
117667
|
-
}
|
|
117668
|
-
}, true);
|
|
117669
|
-
}
|
|
117361
|
+
/**
|
|
117362
|
+
* Get extension elements of business object. Optionally filter by type.
|
|
117363
|
+
*
|
|
117364
|
+
* @param {djs.model.Base|ModdleElement} element
|
|
117365
|
+
* @param {String} [type=undefined]
|
|
117366
|
+
* @returns {Array<ModdleElement>}
|
|
117367
|
+
*/
|
|
117368
|
+
function getExtensionElementsList(element, type = undefined) {
|
|
117369
|
+
const businessObject = getBusinessObject$2(element),
|
|
117370
|
+
extensionElements = businessObject.get('extensionElements');
|
|
117371
|
+
|
|
117372
|
+
if (!extensionElements) {
|
|
117373
|
+
return [];
|
|
117374
|
+
}
|
|
117375
|
+
|
|
117376
|
+
const values = extensionElements.get('values');
|
|
117377
|
+
|
|
117378
|
+
if (!values || !values.length) {
|
|
117379
|
+
return [];
|
|
117380
|
+
}
|
|
117381
|
+
|
|
117382
|
+
if (type) {
|
|
117383
|
+
return values.filter(value => is$6(value, type));
|
|
117384
|
+
}
|
|
117385
|
+
|
|
117386
|
+
return values;
|
|
117387
|
+
}
|
|
117388
|
+
|
|
117389
|
+
/**
|
|
117390
|
+
* Remove one or more extension elements. Remove bpmn:ExtensionElements afterwards if it's empty.
|
|
117391
|
+
*
|
|
117392
|
+
* @param {ModdleElement} element
|
|
117393
|
+
* @param {ModdleElement} businessObject
|
|
117394
|
+
* @param {ModdleElement|Array<ModdleElement>} extensionElementsToRemove
|
|
117395
|
+
* @param {CommandStack} commandStack
|
|
117396
|
+
*/
|
|
117397
|
+
function removeExtensionElements(element, businessObject, extensionElementsToRemove, commandStack) {
|
|
117398
|
+
if (!isArray$5(extensionElementsToRemove)) {
|
|
117399
|
+
extensionElementsToRemove = [ extensionElementsToRemove ];
|
|
117400
|
+
}
|
|
117401
|
+
|
|
117402
|
+
const extensionElements = businessObject.get('extensionElements'),
|
|
117403
|
+
values = extensionElements.get('values').filter(value => !extensionElementsToRemove.includes(value));
|
|
117404
|
+
|
|
117405
|
+
commandStack.execute('element.updateModdleProperties', {
|
|
117406
|
+
element,
|
|
117407
|
+
moddleElement: extensionElements,
|
|
117408
|
+
properties: {
|
|
117409
|
+
values
|
|
117410
|
+
}
|
|
117411
|
+
});
|
|
117670
117412
|
}
|
|
117671
117413
|
|
|
117672
|
-
|
|
117673
|
-
|
|
117674
|
-
|
|
117675
|
-
|
|
117676
|
-
|
|
117414
|
+
const HIGH_PRIORITY$3 = 5000;
|
|
117415
|
+
|
|
117416
|
+
|
|
117417
|
+
/**
|
|
117418
|
+
* Camunda BPMN specific behavior ensuring camunda:ErrorEventDefinition extension elements are removed
|
|
117419
|
+
* if type of e.g. bpmn:ServiceTask is set to something other than external.
|
|
117420
|
+
*/
|
|
117421
|
+
class DeleteErrorEventDefinitionBehavior extends CommandInterceptor$1 {
|
|
117422
|
+
constructor(commandStack, eventBus) {
|
|
117423
|
+
super(eventBus);
|
|
117424
|
+
|
|
117425
|
+
this.postExecute([
|
|
117426
|
+
'element.updateProperties',
|
|
117427
|
+
'element.updateModdleProperties'
|
|
117428
|
+
], HIGH_PRIORITY$3, function(context) {
|
|
117429
|
+
const {
|
|
117430
|
+
element,
|
|
117431
|
+
moddleElement,
|
|
117432
|
+
properties
|
|
117433
|
+
} = context;
|
|
117434
|
+
|
|
117435
|
+
const businessObject = moddleElement || getBusinessObject$2(element);
|
|
117436
|
+
|
|
117437
|
+
if (is$6(element, 'camunda:ExternalCapable')
|
|
117438
|
+
&& is$6(businessObject, 'camunda:ExternalCapable')
|
|
117439
|
+
&& properties[ 'camunda:type' ] !== 'external'
|
|
117440
|
+
) {
|
|
117441
|
+
const errorEventDefinitions = getExtensionElementsList(businessObject, 'camunda:ErrorEventDefinition');
|
|
117442
|
+
|
|
117443
|
+
if (errorEventDefinitions.length) {
|
|
117444
|
+
removeExtensionElements(element, businessObject, errorEventDefinitions, commandStack);
|
|
117445
|
+
}
|
|
117446
|
+
}
|
|
117447
|
+
}, true);
|
|
117448
|
+
|
|
117449
|
+
}
|
|
117450
|
+
}
|
|
117451
|
+
|
|
117452
|
+
DeleteErrorEventDefinitionBehavior.$inject = [
|
|
117453
|
+
'commandStack',
|
|
117454
|
+
'eventBus'
|
|
117677
117455
|
];
|
|
117678
117456
|
|
|
117679
|
-
const
|
|
117680
|
-
|
|
117681
|
-
|
|
117682
|
-
|
|
117683
|
-
*
|
|
117684
|
-
|
|
117685
|
-
|
|
117686
|
-
|
|
117687
|
-
|
|
117688
|
-
|
|
117689
|
-
|
|
117690
|
-
|
|
117691
|
-
|
|
117692
|
-
|
|
117693
|
-
|
|
117694
|
-
|
|
117695
|
-
|
|
117696
|
-
|
|
117697
|
-
|
|
117698
|
-
|
|
117699
|
-
|
|
117700
|
-
|
|
117701
|
-
|
|
117702
|
-
|
|
117703
|
-
|
|
117704
|
-
|
|
117705
|
-
|
|
117706
|
-
|
|
117707
|
-
|
|
117708
|
-
|
|
117709
|
-
|
|
117710
|
-
|
|
117711
|
-
|
|
117712
|
-
|
|
117713
|
-
|
|
117714
|
-
|
|
117715
|
-
|
|
117716
|
-
|
|
117717
|
-
|
|
117718
|
-
|
|
117719
|
-
}
|
|
117720
|
-
}
|
|
117721
|
-
|
|
117722
|
-
UpdateCamundaExclusiveBehavior.$inject = [
|
|
117723
|
-
'eventBus'
|
|
117457
|
+
const LOW_PRIORITY$2 = 250;
|
|
117458
|
+
|
|
117459
|
+
/**
|
|
117460
|
+
* Camunda-specific behavior ensuring `isExecutable` is kept after deleting
|
|
117461
|
+
* the last participant.
|
|
117462
|
+
*/
|
|
117463
|
+
class DeleteParticipantBehaviour extends CommandInterceptor$1 {
|
|
117464
|
+
constructor(eventBus, canvas, modeling) {
|
|
117465
|
+
super(eventBus);
|
|
117466
|
+
|
|
117467
|
+
this.postExecuted('shape.delete', LOW_PRIORITY$2, function(context) {
|
|
117468
|
+
const {
|
|
117469
|
+
collaborationRoot,
|
|
117470
|
+
shape
|
|
117471
|
+
} = context;
|
|
117472
|
+
|
|
117473
|
+
const newRoot = canvas.getRootElement();
|
|
117474
|
+
|
|
117475
|
+
if (is$6(shape, 'bpmn:Participant') &&
|
|
117476
|
+
collaborationRoot &&
|
|
117477
|
+
!collaborationRoot.businessObject.get('participants').length &&
|
|
117478
|
+
is$6(newRoot, 'bpmn:Process')) {
|
|
117479
|
+
|
|
117480
|
+
const oldProcessBusinessObject = shape.businessObject.get('processRef');
|
|
117481
|
+
|
|
117482
|
+
if (!oldProcessBusinessObject) {
|
|
117483
|
+
return;
|
|
117484
|
+
}
|
|
117485
|
+
|
|
117486
|
+
modeling.updateProperties(newRoot, { isExecutable: oldProcessBusinessObject.get('isExecutable') });
|
|
117487
|
+
}
|
|
117488
|
+
|
|
117489
|
+
}, true);
|
|
117490
|
+
}
|
|
117491
|
+
}
|
|
117492
|
+
|
|
117493
|
+
DeleteParticipantBehaviour.$inject = [
|
|
117494
|
+
'eventBus',
|
|
117495
|
+
'canvas',
|
|
117496
|
+
'modeling'
|
|
117724
117497
|
];
|
|
117725
117498
|
|
|
117726
|
-
|
|
117727
|
-
|
|
117728
|
-
|
|
117729
|
-
|
|
117730
|
-
|
|
117731
|
-
|
|
117732
|
-
|
|
117733
|
-
|
|
117734
|
-
|
|
117735
|
-
|
|
117736
|
-
|
|
117737
|
-
|
|
117738
|
-
|
|
117739
|
-
|
|
117740
|
-
|
|
117741
|
-
|
|
117742
|
-
|
|
117743
|
-
|
|
117744
|
-
|
|
117745
|
-
|
|
117746
|
-
|
|
117747
|
-
|
|
117748
|
-
|
|
117749
|
-
|
|
117750
|
-
|
|
117751
|
-
|
|
117752
|
-
|
|
117753
|
-
|
|
117754
|
-
|
|
117755
|
-
|
|
117756
|
-
|
|
117757
|
-
|
|
117758
|
-
|
|
117759
|
-
|
|
117760
|
-
|
|
117761
|
-
|
|
117762
|
-
|
|
117763
|
-
|
|
117764
|
-
|
|
117765
|
-
|
|
117766
|
-
|
|
117767
|
-
|
|
117768
|
-
|
|
117769
|
-
|
|
117770
|
-
|
|
117771
|
-
|
|
117772
|
-
|
|
117773
|
-
|
|
117774
|
-
|
|
117775
|
-
|
|
117776
|
-
|
|
117777
|
-
|
|
117778
|
-
|
|
117779
|
-
|
|
117780
|
-
|
|
117499
|
+
const HIGH_PRIORITY$2 = 5000;
|
|
117500
|
+
|
|
117501
|
+
|
|
117502
|
+
/**
|
|
117503
|
+
* Camunda BPMN specific behavior ensuring camunda:FailedJobRetryTimeCycle is
|
|
117504
|
+
* removed when both camunda:asyncAfter and camunda:asyncBefore set to false.
|
|
117505
|
+
* Doesn't apply if element has bpmn:TimerEventDefinition.
|
|
117506
|
+
*/
|
|
117507
|
+
class DeleteRetryTimeCycleBehavior extends CommandInterceptor$1 {
|
|
117508
|
+
constructor(commandStack, eventBus) {
|
|
117509
|
+
super(eventBus);
|
|
117510
|
+
|
|
117511
|
+
this.postExecute([
|
|
117512
|
+
'element.updateProperties',
|
|
117513
|
+
'element.updateModdleProperties'
|
|
117514
|
+
], HIGH_PRIORITY$2, function(context) {
|
|
117515
|
+
const {
|
|
117516
|
+
element,
|
|
117517
|
+
moddleElement,
|
|
117518
|
+
properties = {}
|
|
117519
|
+
} = context;
|
|
117520
|
+
|
|
117521
|
+
const asyncAfter = properties[ 'camunda:asyncAfter' ],
|
|
117522
|
+
asyncBefore = properties[ 'camunda:asyncBefore' ];
|
|
117523
|
+
|
|
117524
|
+
const businessObject = moddleElement || getBusinessObject$2(element);
|
|
117525
|
+
|
|
117526
|
+
const failedJobRetryTimeCycle = getFailedJobRetryTimeCycle(element);
|
|
117527
|
+
|
|
117528
|
+
if (
|
|
117529
|
+
!is$6(element, 'camunda:AsyncCapable')
|
|
117530
|
+
|| !is$6(businessObject, 'camunda:AsyncCapable')
|
|
117531
|
+
|| (asyncAfter !== false && asyncBefore !== false)
|
|
117532
|
+
|| !failedJobRetryTimeCycle
|
|
117533
|
+
|| getTimerEventDefinition(element)
|
|
117534
|
+
|| isAsyncBefore$1(businessObject)
|
|
117535
|
+
|| isAsyncAfter$1(businessObject)
|
|
117536
|
+
) {
|
|
117537
|
+
return;
|
|
117538
|
+
}
|
|
117539
|
+
|
|
117540
|
+
removeExtensionElements(element, businessObject, failedJobRetryTimeCycle, commandStack);
|
|
117541
|
+
}, true);
|
|
117542
|
+
|
|
117543
|
+
}
|
|
117544
|
+
}
|
|
117545
|
+
|
|
117546
|
+
DeleteRetryTimeCycleBehavior.$inject = [
|
|
117547
|
+
'commandStack',
|
|
117548
|
+
'eventBus'
|
|
117549
|
+
];
|
|
117550
|
+
|
|
117551
|
+
|
|
117552
|
+
// helpers //////////
|
|
117553
|
+
|
|
117554
|
+
function isAsyncBefore$1(businessObject) {
|
|
117555
|
+
return !!(businessObject.get('camunda:asyncBefore') || businessObject.get('camunda:async'));
|
|
117556
|
+
}
|
|
117557
|
+
|
|
117558
|
+
function isAsyncAfter$1(businessObject) {
|
|
117559
|
+
return !!businessObject.get('camunda:asyncAfter');
|
|
117560
|
+
}
|
|
117561
|
+
|
|
117562
|
+
function getFailedJobRetryTimeCycle(element) {
|
|
117563
|
+
return getExtensionElementsList(element, 'camunda:FailedJobRetryTimeCycle')[ 0 ];
|
|
117564
|
+
}
|
|
117565
|
+
|
|
117566
|
+
function getTimerEventDefinition(element) {
|
|
117567
|
+
return getEventDefinition$1(element, 'bpmn:TimerEventDefinition');
|
|
117568
|
+
}
|
|
117569
|
+
|
|
117570
|
+
function getEventDefinition$1(element, type) {
|
|
117571
|
+
const businessObject = getBusinessObject$2(element);
|
|
117572
|
+
|
|
117573
|
+
const eventDefinitions = businessObject.get('eventDefinitions');
|
|
117574
|
+
|
|
117575
|
+
if (!eventDefinitions || !eventDefinitions.length) {
|
|
117576
|
+
return;
|
|
117577
|
+
}
|
|
117578
|
+
|
|
117579
|
+
return eventDefinitions.find((eventDefinition) => {
|
|
117580
|
+
return is$6(eventDefinition, type);
|
|
117581
|
+
});
|
|
117781
117582
|
}
|
|
117782
117583
|
|
|
117783
|
-
|
|
117784
|
-
|
|
117785
|
-
|
|
117584
|
+
/**
|
|
117585
|
+
* Camunda BPMN specific behavior ensuring camunda:initiator property is removed
|
|
117586
|
+
* when start event is created in or moved to sub process.
|
|
117587
|
+
*/
|
|
117588
|
+
class RemoveInitiatorBehaviour extends CommandInterceptor$1 {
|
|
117589
|
+
constructor(eventBus, modeling) {
|
|
117590
|
+
super(eventBus);
|
|
117591
|
+
|
|
117592
|
+
this.postExecuted([ 'shape.create','shape.move' ], (context) => {
|
|
117593
|
+
const {
|
|
117594
|
+
shape,
|
|
117595
|
+
parent,
|
|
117596
|
+
newParent = parent
|
|
117597
|
+
} = context;
|
|
117598
|
+
|
|
117599
|
+
const businessObject = getBusinessObject$2(shape);
|
|
117600
|
+
|
|
117601
|
+
if (is$6(shape, 'bpmn:StartEvent') && isDefined$1(businessObject.get('camunda:initiator'))) {
|
|
117602
|
+
if ((is$6(newParent || parent, 'bpmn:SubProcess'))) {
|
|
117603
|
+
modeling.updateProperties(shape, { 'camunda:initiator': undefined });
|
|
117604
|
+
}
|
|
117605
|
+
}
|
|
117606
|
+
}, true);
|
|
117607
|
+
}
|
|
117608
|
+
}
|
|
117609
|
+
|
|
117610
|
+
RemoveInitiatorBehaviour.$inject = [
|
|
117611
|
+
'eventBus',
|
|
117612
|
+
'modeling'
|
|
117786
117613
|
];
|
|
117787
117614
|
|
|
117788
|
-
|
|
117789
|
-
|
|
117790
|
-
|
|
117791
|
-
|
|
117792
|
-
|
|
117793
|
-
|
|
117794
|
-
|
|
117795
|
-
|
|
117796
|
-
|
|
117797
|
-
|
|
117798
|
-
|
|
117799
|
-
|
|
117800
|
-
|
|
117801
|
-
|
|
117802
|
-
|
|
117803
|
-
const
|
|
117804
|
-
|
|
117805
|
-
|
|
117806
|
-
|
|
117807
|
-
|
|
117808
|
-
|
|
117809
|
-
|
|
117810
|
-
|
|
117811
|
-
|
|
117812
|
-
|
|
117813
|
-
|
|
117814
|
-
|
|
117815
|
-
|
|
117816
|
-
|
|
117817
|
-
|
|
117818
|
-
|
|
117819
|
-
|
|
117820
|
-
|
|
117821
|
-
|
|
117822
|
-
|
|
117823
|
-
|
|
117824
|
-
|
|
117825
|
-
|
|
117615
|
+
/**
|
|
117616
|
+
* Camunda BPMN specific behavior ensuring camunda:variableEvents property is
|
|
117617
|
+
* removed when start event is moved out of event sub process.
|
|
117618
|
+
*/
|
|
117619
|
+
class RemoveVariableEventBehaviour extends CommandInterceptor$1 {
|
|
117620
|
+
constructor(bpmnFactory, eventBus, moddleCopy, modeling) {
|
|
117621
|
+
super(eventBus);
|
|
117622
|
+
|
|
117623
|
+
this.postExecuted([ 'shape.create', 'shape.move' ], (context) => {
|
|
117624
|
+
const {
|
|
117625
|
+
parent,
|
|
117626
|
+
newParent = parent,
|
|
117627
|
+
shape
|
|
117628
|
+
} = context;
|
|
117629
|
+
|
|
117630
|
+
const newParentBusinessObject = getBusinessObject$2(newParent),
|
|
117631
|
+
shapeBusinessObject = getBusinessObject$2(shape);
|
|
117632
|
+
|
|
117633
|
+
if (is$6(shape, 'bpmn:StartEvent')) {
|
|
117634
|
+
|
|
117635
|
+
if (!(is$6(newParent, 'bpmn:SubProcess') && newParentBusinessObject.get('triggeredByEvent'))) {
|
|
117636
|
+
const eventDefinitions = shapeBusinessObject.get('eventDefinitions').slice();
|
|
117637
|
+
|
|
117638
|
+
const update = eventDefinitions.reduce((update, eventDefinition, index) => {
|
|
117639
|
+
if (!is$6(eventDefinition, 'bpmn:ConditionalEventDefinition')) {
|
|
117640
|
+
return;
|
|
117641
|
+
}
|
|
117642
|
+
|
|
117643
|
+
if (eventDefinition.get('camunda:variableEvents')) {
|
|
117644
|
+
const conditionalEventDefinition = bpmnFactory.create('bpmn:ConditionalEventDefinition');
|
|
117645
|
+
|
|
117646
|
+
moddleCopy.copyElement(eventDefinition, conditionalEventDefinition);
|
|
117647
|
+
|
|
117648
|
+
conditionalEventDefinition.$parent = eventDefinition.$parent;
|
|
117649
|
+
|
|
117650
|
+
// remove camunda:variableEvents property
|
|
117651
|
+
conditionalEventDefinition.variableEvents = undefined;
|
|
117652
|
+
|
|
117653
|
+
eventDefinitions[ index ] = conditionalEventDefinition;
|
|
117654
|
+
|
|
117655
|
+
return true;
|
|
117656
|
+
}
|
|
117657
|
+
|
|
117658
|
+
return update;
|
|
117659
|
+
}, false);
|
|
117660
|
+
|
|
117661
|
+
if (update) {
|
|
117662
|
+
modeling.updateProperties(shape, {
|
|
117663
|
+
eventDefinitions: eventDefinitions
|
|
117664
|
+
});
|
|
117665
|
+
}
|
|
117666
|
+
}
|
|
117667
|
+
}
|
|
117668
|
+
}, true);
|
|
117669
|
+
}
|
|
117670
|
+
}
|
|
117671
|
+
|
|
117672
|
+
RemoveVariableEventBehaviour.$inject = [
|
|
117673
|
+
'bpmnFactory',
|
|
117674
|
+
'eventBus',
|
|
117675
|
+
'moddleCopy',
|
|
117676
|
+
'modeling'
|
|
117826
117677
|
];
|
|
117827
117678
|
|
|
117828
|
-
|
|
117829
|
-
|
|
117830
|
-
|
|
117831
|
-
|
|
117679
|
+
const HIGH_PRIORITY$1 = 5000;
|
|
117680
|
+
|
|
117681
|
+
|
|
117682
|
+
/**
|
|
117683
|
+
* Camunda BPMN specific behavior ensuring camunda:exclusive is set to true if
|
|
117684
|
+
* camunda:asyncBefore or camunda:asyncAfter is set to false.
|
|
117685
|
+
*/
|
|
117686
|
+
class UpdateCamundaExclusiveBehavior extends CommandInterceptor$1 {
|
|
117687
|
+
constructor(eventBus) {
|
|
117688
|
+
super(eventBus);
|
|
117689
|
+
|
|
117690
|
+
this.preExecute([
|
|
117691
|
+
'element.updateProperties',
|
|
117692
|
+
'element.updateModdleProperties',
|
|
117693
|
+
], HIGH_PRIORITY$1, function(context) {
|
|
117694
|
+
const {
|
|
117695
|
+
element,
|
|
117696
|
+
moddleElement,
|
|
117697
|
+
properties = {}
|
|
117698
|
+
} = context;
|
|
117699
|
+
|
|
117700
|
+
const businessObject = moddleElement || getBusinessObject$2(element);
|
|
117701
|
+
|
|
117702
|
+
const asyncAfter = properties[ 'camunda:asyncAfter' ],
|
|
117703
|
+
asyncBefore = properties[ 'camunda:asyncBefore' ];
|
|
117704
|
+
|
|
117705
|
+
if (!is$6(element, 'camunda:AsyncCapable')
|
|
117706
|
+
|| !is$6(businessObject, 'camunda:AsyncCapable')
|
|
117707
|
+
|| (asyncAfter !== false && asyncBefore !== false)
|
|
117708
|
+
|| isExclusive(businessObject)
|
|
117709
|
+
|| (isAsyncAfter(businessObject) && asyncAfter !== false)
|
|
117710
|
+
|| (isAsyncBefore(businessObject) && asyncBefore !== false)
|
|
117711
|
+
|| (asyncAfter === true || asyncBefore === true)
|
|
117712
|
+
) {
|
|
117713
|
+
return;
|
|
117714
|
+
}
|
|
117715
|
+
|
|
117716
|
+
properties[ 'camunda:exclusive' ] = true;
|
|
117717
|
+
}, true);
|
|
117718
|
+
|
|
117719
|
+
}
|
|
117720
|
+
}
|
|
117721
|
+
|
|
117722
|
+
UpdateCamundaExclusiveBehavior.$inject = [
|
|
117723
|
+
'eventBus'
|
|
117724
|
+
];
|
|
117725
|
+
|
|
117726
|
+
|
|
117727
|
+
// helpers //////////
|
|
117728
|
+
|
|
117729
|
+
function isAsyncBefore(businessObject) {
|
|
117730
|
+
return !!(businessObject.get('camunda:asyncBefore') || businessObject.get('camunda:async'));
|
|
117731
|
+
}
|
|
117732
|
+
|
|
117733
|
+
function isAsyncAfter(businessObject) {
|
|
117734
|
+
return !!businessObject.get('camunda:asyncAfter');
|
|
117735
|
+
}
|
|
117736
|
+
|
|
117737
|
+
function isExclusive(businessObject) {
|
|
117738
|
+
return !!businessObject.get('camunda:exclusive');
|
|
117832
117739
|
}
|
|
117833
117740
|
|
|
117834
|
-
|
|
117835
|
-
|
|
117836
|
-
|
|
117837
|
-
|
|
117838
|
-
|
|
117839
|
-
|
|
117840
|
-
|
|
117841
|
-
|
|
117842
|
-
|
|
117843
|
-
|
|
117844
|
-
|
|
117845
|
-
|
|
117846
|
-
|
|
117847
|
-
this.preExecute([
|
|
117848
|
-
'element.updateProperties',
|
|
117849
|
-
'element.updateModdleProperties'
|
|
117850
|
-
], function(context) {
|
|
117851
|
-
const {
|
|
117852
|
-
element,
|
|
117853
|
-
moddleElement,
|
|
117854
|
-
properties
|
|
117855
|
-
} = context;
|
|
117856
|
-
|
|
117857
|
-
const businessObject = moddleElement || getBusinessObject$2(element);
|
|
117858
|
-
|
|
117859
|
-
if (has$3(properties, 'camunda:formKey')) {
|
|
117860
|
-
Object.assign(properties, {
|
|
117861
|
-
'camunda:formRef': undefined,
|
|
117862
|
-
'camunda:formRefBinding': undefined,
|
|
117863
|
-
'camunda:formRefVersion': undefined
|
|
117864
|
-
});
|
|
117865
|
-
} else if (has$3(properties, 'camunda:formRef')) {
|
|
117866
|
-
Object.assign(properties, {
|
|
117867
|
-
'camunda:formKey': undefined
|
|
117868
|
-
});
|
|
117869
|
-
|
|
117870
|
-
if (isUndefined$5(properties[ 'camunda:formRef' ])) {
|
|
117871
|
-
Object.assign(properties, {
|
|
117872
|
-
'camunda:formRefBinding': undefined,
|
|
117873
|
-
'camunda:formRefVersion': undefined
|
|
117874
|
-
});
|
|
117875
|
-
}
|
|
117876
|
-
|
|
117877
|
-
if (!has$3(properties, 'camunda:formRefBinding') && isUndefined$5(businessObject.get('camunda:formRefBinding'))) {
|
|
117878
|
-
Object.assign(properties, {
|
|
117879
|
-
'camunda:formRefBinding': 'latest'
|
|
117880
|
-
});
|
|
117881
|
-
}
|
|
117882
|
-
}
|
|
117883
|
-
|
|
117884
|
-
if (has$3(properties, 'camunda:formRefBinding') && properties[ 'camunda:formRefBinding' ] !== 'version') {
|
|
117885
|
-
Object.assign(properties, {
|
|
117886
|
-
'camunda:formRefVersion': undefined
|
|
117887
|
-
});
|
|
117888
|
-
}
|
|
117889
|
-
}, true);
|
|
117890
|
-
|
|
117891
|
-
}
|
|
117892
|
-
};
|
|
117893
|
-
|
|
117894
|
-
UserTaskFormsBehavior$1.$inject = [ 'eventBus' ];
|
|
117895
|
-
|
|
117896
|
-
/**
|
|
117897
|
-
* Camunda BPMN specific user task generated forms behavior.
|
|
117898
|
-
*
|
|
117899
|
-
* 1. Removes camunda:FormField#values if camunda:FormField#type is changed to something other than enum.
|
|
117900
|
-
* 2. Updates camunda:FormData#businessKey if camunda:FormField#id is changed.
|
|
117901
|
-
* 3. Removes camunda:FormData#businessKey if camunda:FormField is removed.
|
|
117902
|
-
*/
|
|
117903
|
-
class UserTaskFormsBehavior extends CommandInterceptor$1 {
|
|
117904
|
-
constructor(eventBus, modeling) {
|
|
117905
|
-
super(eventBus);
|
|
117906
|
-
|
|
117907
|
-
/**
|
|
117908
|
-
* Remove camunda:FormField#values if camunda:FormField#type is changed to
|
|
117909
|
-
* something other than enum.
|
|
117910
|
-
*/
|
|
117911
|
-
this.preExecute('element.updateModdleProperties', function(context) {
|
|
117912
|
-
const {
|
|
117913
|
-
moddleElement,
|
|
117914
|
-
properties
|
|
117915
|
-
} = context;
|
|
117916
|
-
|
|
117917
|
-
if (!is$6(moddleElement, 'camunda:FormField')) {
|
|
117918
|
-
return;
|
|
117919
|
-
}
|
|
117920
|
-
|
|
117921
|
-
if (
|
|
117922
|
-
('type' in properties && properties[ 'type' ] !== 'enum')
|
|
117923
|
-
|| 'camunda:type' in properties && properties[ 'camunda:type' ] !== 'enum'
|
|
117924
|
-
) {
|
|
117925
|
-
properties[ 'camunda:values' ] = undefined;
|
|
117926
|
-
}
|
|
117927
|
-
}, true);
|
|
117928
|
-
|
|
117929
|
-
/**
|
|
117930
|
-
* Update camunda:FormData#businessKey if camunda:FormField#id is changed.
|
|
117931
|
-
*/
|
|
117932
|
-
this.preExecute('element.updateModdleProperties', function(context) {
|
|
117933
|
-
const {
|
|
117934
|
-
element,
|
|
117935
|
-
moddleElement,
|
|
117936
|
-
properties
|
|
117937
|
-
} = context;
|
|
117938
|
-
|
|
117939
|
-
if (!is$6(moddleElement, 'camunda:FormField')
|
|
117940
|
-
|| (!has$3(properties, 'id') && !has$3(properties, 'camunda:id'))
|
|
117941
|
-
) {
|
|
117942
|
-
return;
|
|
117943
|
-
}
|
|
117944
|
-
|
|
117945
|
-
const formData = getFormData(element);
|
|
117946
|
-
|
|
117947
|
-
const businessKey = formData.get('camunda:businessKey');
|
|
117948
|
-
|
|
117949
|
-
if (!businessKey) {
|
|
117950
|
-
return;
|
|
117951
|
-
}
|
|
117952
|
-
|
|
117953
|
-
if (isBusinessKey(moddleElement, formData)) {
|
|
117954
|
-
modeling.updateModdleProperties(element, formData, {
|
|
117955
|
-
'camunda:businessKey': has$3(properties, 'id') ? properties.id : properties[ 'camunda:id' ]
|
|
117956
|
-
});
|
|
117957
|
-
}
|
|
117958
|
-
}, true);
|
|
117959
|
-
|
|
117960
|
-
/**
|
|
117961
|
-
* Remove camunda:FormData#businessKey if camunda:FormField is removed.
|
|
117962
|
-
*/
|
|
117963
|
-
this.postExecute('element.updateModdleProperties', function(context) {
|
|
117964
|
-
const {
|
|
117965
|
-
element,
|
|
117966
|
-
moddleElement,
|
|
117967
|
-
properties
|
|
117968
|
-
} = context;
|
|
117969
|
-
|
|
117970
|
-
if (!is$6(moddleElement, 'camunda:FormData') || !has$3(properties, 'fields')) {
|
|
117971
|
-
return;
|
|
117972
|
-
}
|
|
117973
|
-
|
|
117974
|
-
const businessKey = moddleElement.get('camunda:businessKey');
|
|
117975
|
-
|
|
117976
|
-
if (!businessKey) {
|
|
117977
|
-
return;
|
|
117978
|
-
}
|
|
117979
|
-
|
|
117980
|
-
const fieldWithBusinessKey = moddleElement.get('fields').find(field => {
|
|
117981
|
-
return field.get('camunda:id') === businessKey;
|
|
117982
|
-
});
|
|
117983
|
-
|
|
117984
|
-
if (!fieldWithBusinessKey) {
|
|
117985
|
-
modeling.updateModdleProperties(element, moddleElement, {
|
|
117986
|
-
'camunda:businessKey': undefined
|
|
117987
|
-
});
|
|
117988
|
-
}
|
|
117989
|
-
}, true);
|
|
117990
|
-
}
|
|
117741
|
+
function getInputParameters$1(inputOutput) {
|
|
117742
|
+
return inputOutput.get('inputParameters');
|
|
117743
|
+
}
|
|
117744
|
+
|
|
117745
|
+
function getOutputParameters$1(inputOutput) {
|
|
117746
|
+
return inputOutput.get('outputParameters');
|
|
117747
|
+
}
|
|
117748
|
+
|
|
117749
|
+
function isInputOutputEmpty(inputOutput) {
|
|
117750
|
+
const inputParameters = getInputParameters$1(inputOutput);
|
|
117751
|
+
const outputParameters = getOutputParameters$1(inputOutput);
|
|
117752
|
+
|
|
117753
|
+
return !inputParameters.length && !outputParameters.length;
|
|
117991
117754
|
}
|
|
117992
117755
|
|
|
117756
|
+
const LOW_PRIORITY$1 = 250;
|
|
117757
|
+
|
|
117758
|
+
|
|
117759
|
+
/**
|
|
117760
|
+
* Camunda BPMN specific behavior ensuring empty camunda:InputOutput is removed.
|
|
117761
|
+
*/
|
|
117762
|
+
class UpdateInputOutputBehavior extends CommandInterceptor$1 {
|
|
117763
|
+
constructor(commandStack, eventBus) {
|
|
117764
|
+
super(eventBus);
|
|
117765
|
+
|
|
117766
|
+
this.postExecuted('element.updateModdleProperties', LOW_PRIORITY$1, function(context) {
|
|
117767
|
+
const {
|
|
117768
|
+
element,
|
|
117769
|
+
moddleElement
|
|
117770
|
+
} = context;
|
|
117771
|
+
|
|
117772
|
+
if (!is$6(moddleElement, 'camunda:InputOutput')) {
|
|
117773
|
+
return;
|
|
117774
|
+
}
|
|
117775
|
+
|
|
117776
|
+
if (isInputOutputEmpty(moddleElement)) {
|
|
117777
|
+
removeExtensionElements(element, getBusinessObject$2(element), moddleElement, commandStack);
|
|
117778
|
+
}
|
|
117779
|
+
}, true);
|
|
117780
|
+
}
|
|
117781
|
+
}
|
|
117782
|
+
|
|
117783
|
+
UpdateInputOutputBehavior.$inject = [
|
|
117784
|
+
'commandStack',
|
|
117785
|
+
'eventBus'
|
|
117786
|
+
];
|
|
117993
117787
|
|
|
117994
|
-
|
|
117995
|
-
|
|
117996
|
-
|
|
117997
|
-
|
|
117998
|
-
|
|
117999
|
-
|
|
117788
|
+
const HIGH_PRIORITY = 5000;
|
|
117789
|
+
|
|
117790
|
+
|
|
117791
|
+
/**
|
|
117792
|
+
* Camunda BPMN specific camunda:resultVariable behavior ensuring
|
|
117793
|
+
* camunda:mapDecisionResult is removed when camunda:resultVariable is removed.
|
|
117794
|
+
*/
|
|
117795
|
+
class UpdateResultVariableBehavior extends CommandInterceptor$1 {
|
|
117796
|
+
constructor(eventBus) {
|
|
117797
|
+
super(eventBus);
|
|
117798
|
+
|
|
117799
|
+
this.preExecute([
|
|
117800
|
+
'element.updateProperties',
|
|
117801
|
+
'element.updateModdleProperties'
|
|
117802
|
+
], HIGH_PRIORITY, function(context) {
|
|
117803
|
+
const {
|
|
117804
|
+
element,
|
|
117805
|
+
moddleElement,
|
|
117806
|
+
properties
|
|
117807
|
+
} = context;
|
|
117808
|
+
|
|
117809
|
+
const businessObject = moddleElement || getBusinessObject$2(element);
|
|
117810
|
+
|
|
117811
|
+
if (
|
|
117812
|
+
is$6(element, 'camunda:DmnCapable')
|
|
117813
|
+
&& is$6(businessObject, 'camunda:DmnCapable')
|
|
117814
|
+
&& has$3(properties, 'camunda:resultVariable')
|
|
117815
|
+
&& isEmpty(properties[ 'camunda:resultVariable' ])
|
|
117816
|
+
) {
|
|
117817
|
+
properties[ 'camunda:mapDecisionResult' ] = undefined;
|
|
117818
|
+
}
|
|
117819
|
+
}, true);
|
|
117820
|
+
|
|
117821
|
+
}
|
|
117822
|
+
}
|
|
117823
|
+
|
|
117824
|
+
UpdateResultVariableBehavior.$inject = [
|
|
117825
|
+
'eventBus'
|
|
117826
|
+
];
|
|
117827
|
+
|
|
117828
|
+
// helpers //////////
|
|
117829
|
+
|
|
117830
|
+
function isEmpty(value) {
|
|
117831
|
+
return value == undefined || value === '';
|
|
118000
117832
|
}
|
|
118001
117833
|
|
|
118002
|
-
|
|
118003
|
-
|
|
118004
|
-
|
|
118005
|
-
|
|
118006
|
-
|
|
118007
|
-
|
|
118008
|
-
|
|
118009
|
-
|
|
118010
|
-
|
|
117834
|
+
/**
|
|
117835
|
+
* Camunda BPMN specific user task forms behavior.
|
|
117836
|
+
*/
|
|
117837
|
+
let UserTaskFormsBehavior$1 = class UserTaskFormsBehavior extends CommandInterceptor$1 {
|
|
117838
|
+
constructor(eventBus) {
|
|
117839
|
+
super(eventBus);
|
|
117840
|
+
|
|
117841
|
+
/**
|
|
117842
|
+
* Ensure that only one of the following options is configured:
|
|
117843
|
+
*
|
|
117844
|
+
* 1. embedded, external or Camunda forms using camunda:formKey
|
|
117845
|
+
* 2. Camunda forms using camunda:formRef
|
|
117846
|
+
*/
|
|
117847
|
+
this.preExecute([
|
|
117848
|
+
'element.updateProperties',
|
|
117849
|
+
'element.updateModdleProperties'
|
|
117850
|
+
], function(context) {
|
|
117851
|
+
const {
|
|
117852
|
+
element,
|
|
117853
|
+
moddleElement,
|
|
117854
|
+
properties
|
|
117855
|
+
} = context;
|
|
117856
|
+
|
|
117857
|
+
const businessObject = moddleElement || getBusinessObject$2(element);
|
|
117858
|
+
|
|
117859
|
+
if (has$3(properties, 'camunda:formKey')) {
|
|
117860
|
+
Object.assign(properties, {
|
|
117861
|
+
'camunda:formRef': undefined,
|
|
117862
|
+
'camunda:formRefBinding': undefined,
|
|
117863
|
+
'camunda:formRefVersion': undefined
|
|
117864
|
+
});
|
|
117865
|
+
} else if (has$3(properties, 'camunda:formRef')) {
|
|
117866
|
+
Object.assign(properties, {
|
|
117867
|
+
'camunda:formKey': undefined
|
|
117868
|
+
});
|
|
117869
|
+
|
|
117870
|
+
if (isUndefined$5(properties[ 'camunda:formRef' ])) {
|
|
117871
|
+
Object.assign(properties, {
|
|
117872
|
+
'camunda:formRefBinding': undefined,
|
|
117873
|
+
'camunda:formRefVersion': undefined
|
|
117874
|
+
});
|
|
117875
|
+
}
|
|
117876
|
+
|
|
117877
|
+
if (!has$3(properties, 'camunda:formRefBinding') && isUndefined$5(businessObject.get('camunda:formRefBinding'))) {
|
|
117878
|
+
Object.assign(properties, {
|
|
117879
|
+
'camunda:formRefBinding': 'latest'
|
|
117880
|
+
});
|
|
117881
|
+
}
|
|
117882
|
+
}
|
|
117883
|
+
|
|
117884
|
+
if (has$3(properties, 'camunda:formRefBinding') && properties[ 'camunda:formRefBinding' ] !== 'version') {
|
|
117885
|
+
Object.assign(properties, {
|
|
117886
|
+
'camunda:formRefVersion': undefined
|
|
117887
|
+
});
|
|
117888
|
+
}
|
|
117889
|
+
}, true);
|
|
117890
|
+
|
|
117891
|
+
}
|
|
117892
|
+
};
|
|
117893
|
+
|
|
117894
|
+
UserTaskFormsBehavior$1.$inject = [ 'eventBus' ];
|
|
118011
117895
|
|
|
118012
|
-
|
|
118013
|
-
|
|
118014
|
-
|
|
117896
|
+
/**
|
|
117897
|
+
* Camunda BPMN specific user task generated forms behavior.
|
|
117898
|
+
*
|
|
117899
|
+
* 1. Removes camunda:FormField#values if camunda:FormField#type is changed to something other than enum.
|
|
117900
|
+
* 2. Updates camunda:FormData#businessKey if camunda:FormField#id is changed.
|
|
117901
|
+
* 3. Removes camunda:FormData#businessKey if camunda:FormField is removed.
|
|
117902
|
+
*/
|
|
117903
|
+
class UserTaskFormsBehavior extends CommandInterceptor$1 {
|
|
117904
|
+
constructor(eventBus, modeling) {
|
|
117905
|
+
super(eventBus);
|
|
117906
|
+
|
|
117907
|
+
/**
|
|
117908
|
+
* Remove camunda:FormField#values if camunda:FormField#type is changed to
|
|
117909
|
+
* something other than enum.
|
|
117910
|
+
*/
|
|
117911
|
+
this.preExecute('element.updateModdleProperties', function(context) {
|
|
117912
|
+
const {
|
|
117913
|
+
moddleElement,
|
|
117914
|
+
properties
|
|
117915
|
+
} = context;
|
|
117916
|
+
|
|
117917
|
+
if (!is$6(moddleElement, 'camunda:FormField')) {
|
|
117918
|
+
return;
|
|
117919
|
+
}
|
|
117920
|
+
|
|
117921
|
+
if (
|
|
117922
|
+
('type' in properties && properties[ 'type' ] !== 'enum')
|
|
117923
|
+
|| 'camunda:type' in properties && properties[ 'camunda:type' ] !== 'enum'
|
|
117924
|
+
) {
|
|
117925
|
+
properties[ 'camunda:values' ] = undefined;
|
|
117926
|
+
}
|
|
117927
|
+
}, true);
|
|
117928
|
+
|
|
117929
|
+
/**
|
|
117930
|
+
* Update camunda:FormData#businessKey if camunda:FormField#id is changed.
|
|
117931
|
+
*/
|
|
117932
|
+
this.preExecute('element.updateModdleProperties', function(context) {
|
|
117933
|
+
const {
|
|
117934
|
+
element,
|
|
117935
|
+
moddleElement,
|
|
117936
|
+
properties
|
|
117937
|
+
} = context;
|
|
117938
|
+
|
|
117939
|
+
if (!is$6(moddleElement, 'camunda:FormField')
|
|
117940
|
+
|| (!has$3(properties, 'id') && !has$3(properties, 'camunda:id'))
|
|
117941
|
+
) {
|
|
117942
|
+
return;
|
|
117943
|
+
}
|
|
117944
|
+
|
|
117945
|
+
const formData = getFormData(element);
|
|
117946
|
+
|
|
117947
|
+
const businessKey = formData.get('camunda:businessKey');
|
|
117948
|
+
|
|
117949
|
+
if (!businessKey) {
|
|
117950
|
+
return;
|
|
117951
|
+
}
|
|
117952
|
+
|
|
117953
|
+
if (isBusinessKey(moddleElement, formData)) {
|
|
117954
|
+
modeling.updateModdleProperties(element, formData, {
|
|
117955
|
+
'camunda:businessKey': has$3(properties, 'id') ? properties.id : properties[ 'camunda:id' ]
|
|
117956
|
+
});
|
|
117957
|
+
}
|
|
117958
|
+
}, true);
|
|
117959
|
+
|
|
117960
|
+
/**
|
|
117961
|
+
* Remove camunda:FormData#businessKey if camunda:FormField is removed.
|
|
117962
|
+
*/
|
|
117963
|
+
this.postExecute('element.updateModdleProperties', function(context) {
|
|
117964
|
+
const {
|
|
117965
|
+
element,
|
|
117966
|
+
moddleElement,
|
|
117967
|
+
properties
|
|
117968
|
+
} = context;
|
|
117969
|
+
|
|
117970
|
+
if (!is$6(moddleElement, 'camunda:FormData') || !has$3(properties, 'fields')) {
|
|
117971
|
+
return;
|
|
117972
|
+
}
|
|
117973
|
+
|
|
117974
|
+
const businessKey = moddleElement.get('camunda:businessKey');
|
|
117975
|
+
|
|
117976
|
+
if (!businessKey) {
|
|
117977
|
+
return;
|
|
117978
|
+
}
|
|
117979
|
+
|
|
117980
|
+
const fieldWithBusinessKey = moddleElement.get('fields').find(field => {
|
|
117981
|
+
return field.get('camunda:id') === businessKey;
|
|
117982
|
+
});
|
|
117983
|
+
|
|
117984
|
+
if (!fieldWithBusinessKey) {
|
|
117985
|
+
modeling.updateModdleProperties(element, moddleElement, {
|
|
117986
|
+
'camunda:businessKey': undefined
|
|
117987
|
+
});
|
|
117988
|
+
}
|
|
117989
|
+
}, true);
|
|
117990
|
+
}
|
|
117991
|
+
}
|
|
117992
|
+
|
|
117993
|
+
|
|
117994
|
+
UserTaskFormsBehavior.$inject = [ 'eventBus', 'modeling' ];
|
|
117995
|
+
|
|
117996
|
+
// helpers //////////
|
|
117997
|
+
|
|
117998
|
+
function isBusinessKey(formField, formData) {
|
|
117999
|
+
return formField.get('camunda:id') === formData.get('camunda:businessKey');
|
|
118000
|
+
}
|
|
118001
|
+
|
|
118002
|
+
function getFormData(element) {
|
|
118003
|
+
const businessObject = getBusinessObject$2(element),
|
|
118004
|
+
extensionElements = businessObject.get('extensionElements');
|
|
118005
|
+
|
|
118006
|
+
if (!extensionElements) {
|
|
118007
|
+
return;
|
|
118008
|
+
}
|
|
118009
|
+
|
|
118010
|
+
const values = extensionElements.get('values');
|
|
118011
|
+
|
|
118012
|
+
return values.find((value) => {
|
|
118013
|
+
return is$6(value, 'camunda:FormData');
|
|
118014
|
+
});
|
|
118015
118015
|
}
|
|
118016
118016
|
|
|
118017
|
-
var behaviorsModule = {
|
|
118018
|
-
__init__: [
|
|
118019
|
-
'copyPasteBehavior',
|
|
118020
|
-
'copyPasteRootElementBehavior',
|
|
118021
|
-
'deleteErrorEventDefinitionBehavior',
|
|
118022
|
-
'deleteParticipantBehaviour',
|
|
118023
|
-
'deleteRetryTimeCycleBehavior',
|
|
118024
|
-
'removeInitiatorBehaviour',
|
|
118025
|
-
'removeVariableEventBehaviour',
|
|
118026
|
-
'updateCamundaExclusiveBehavior',
|
|
118027
|
-
'updateResultVariableBehavior',
|
|
118028
|
-
'updateInputOutputBehavior',
|
|
118029
|
-
'userTaskFormsBehavior',
|
|
118030
|
-
'userTaskGeneratedFormsBehavior'
|
|
118031
|
-
],
|
|
118032
|
-
copyPasteBehavior: [ 'type', CopyPasteBehavior ],
|
|
118033
|
-
copyPasteRootElementBehavior: [ 'type', CopyPasteRootElementBehavior ],
|
|
118034
|
-
deleteErrorEventDefinitionBehavior: [ 'type', DeleteErrorEventDefinitionBehavior ],
|
|
118035
|
-
deleteParticipantBehaviour: [ 'type', DeleteParticipantBehaviour ],
|
|
118036
|
-
deleteRetryTimeCycleBehavior: [ 'type', DeleteRetryTimeCycleBehavior ],
|
|
118037
|
-
removeInitiatorBehaviour: [ 'type', RemoveInitiatorBehaviour ],
|
|
118038
|
-
removeVariableEventBehaviour: [ 'type', RemoveVariableEventBehaviour ],
|
|
118039
|
-
updateCamundaExclusiveBehavior: [ 'type', UpdateCamundaExclusiveBehavior ],
|
|
118040
|
-
updateResultVariableBehavior: [ 'type', UpdateResultVariableBehavior ],
|
|
118041
|
-
updateInputOutputBehavior: [ 'type', UpdateInputOutputBehavior ],
|
|
118042
|
-
userTaskFormsBehavior: [ 'type', UserTaskFormsBehavior$1 ],
|
|
118043
|
-
userTaskGeneratedFormsBehavior: [ 'type', UserTaskFormsBehavior ]
|
|
118017
|
+
var behaviorsModule = {
|
|
118018
|
+
__init__: [
|
|
118019
|
+
'copyPasteBehavior',
|
|
118020
|
+
'copyPasteRootElementBehavior',
|
|
118021
|
+
'deleteErrorEventDefinitionBehavior',
|
|
118022
|
+
'deleteParticipantBehaviour',
|
|
118023
|
+
'deleteRetryTimeCycleBehavior',
|
|
118024
|
+
'removeInitiatorBehaviour',
|
|
118025
|
+
'removeVariableEventBehaviour',
|
|
118026
|
+
'updateCamundaExclusiveBehavior',
|
|
118027
|
+
'updateResultVariableBehavior',
|
|
118028
|
+
'updateInputOutputBehavior',
|
|
118029
|
+
'userTaskFormsBehavior',
|
|
118030
|
+
'userTaskGeneratedFormsBehavior'
|
|
118031
|
+
],
|
|
118032
|
+
copyPasteBehavior: [ 'type', CopyPasteBehavior ],
|
|
118033
|
+
copyPasteRootElementBehavior: [ 'type', CopyPasteRootElementBehavior ],
|
|
118034
|
+
deleteErrorEventDefinitionBehavior: [ 'type', DeleteErrorEventDefinitionBehavior ],
|
|
118035
|
+
deleteParticipantBehaviour: [ 'type', DeleteParticipantBehaviour ],
|
|
118036
|
+
deleteRetryTimeCycleBehavior: [ 'type', DeleteRetryTimeCycleBehavior ],
|
|
118037
|
+
removeInitiatorBehaviour: [ 'type', RemoveInitiatorBehaviour ],
|
|
118038
|
+
removeVariableEventBehaviour: [ 'type', RemoveVariableEventBehaviour ],
|
|
118039
|
+
updateCamundaExclusiveBehavior: [ 'type', UpdateCamundaExclusiveBehavior ],
|
|
118040
|
+
updateResultVariableBehavior: [ 'type', UpdateResultVariableBehavior ],
|
|
118041
|
+
updateInputOutputBehavior: [ 'type', UpdateInputOutputBehavior ],
|
|
118042
|
+
userTaskFormsBehavior: [ 'type', UserTaskFormsBehavior$1 ],
|
|
118043
|
+
userTaskGeneratedFormsBehavior: [ 'type', UserTaskFormsBehavior ]
|
|
118044
118044
|
};
|
|
118045
118045
|
|
|
118046
118046
|
/**
|
|
@@ -129999,13 +129999,13 @@
|
|
|
129999
129999
|
emumerations: emumerations
|
|
130000
130000
|
};
|
|
130001
130001
|
|
|
130002
|
-
/**
|
|
130003
|
-
* @type { {
|
|
130004
|
-
* camunda: any
|
|
130005
|
-
* } }
|
|
130006
|
-
*/
|
|
130007
|
-
const commonModdleExtensions = {
|
|
130008
|
-
camunda: camundaModdle
|
|
130002
|
+
/**
|
|
130003
|
+
* @type { {
|
|
130004
|
+
* camunda: any
|
|
130005
|
+
* } }
|
|
130006
|
+
*/
|
|
130007
|
+
const commonModdleExtensions = {
|
|
130008
|
+
camunda: camundaModdle
|
|
130009
130009
|
};
|
|
130010
130010
|
|
|
130011
130011
|
const colorImageSvg = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" fill="currentColor">
|
|
@@ -133617,45 +133617,45 @@
|
|
|
133617
133617
|
removeTemplateReplaceProvider: [ 'type', RemoveTemplateReplaceProvider ]
|
|
133618
133618
|
};
|
|
133619
133619
|
|
|
133620
|
-
/**
|
|
133621
|
-
* @typedef {import('bpmn-js/lib/BaseViewer').BaseViewerOptions} BaseViewerOptions
|
|
133622
|
-
*/
|
|
133623
|
-
|
|
133624
|
-
/**
|
|
133625
|
-
* @param {BaseViewerOptions} options
|
|
133626
|
-
*/
|
|
133627
|
-
function Modeler(options = {}) {
|
|
133628
|
-
|
|
133629
|
-
options = {
|
|
133630
|
-
...options,
|
|
133631
|
-
moddleExtensions: {
|
|
133632
|
-
...commonModdleExtensions,
|
|
133633
|
-
...options.moddleExtensions
|
|
133634
|
-
},
|
|
133635
|
-
propertiesPanel: {
|
|
133636
|
-
tooltip: TooltipProvider,
|
|
133637
|
-
...options.propertiesPanel
|
|
133638
|
-
}
|
|
133639
|
-
};
|
|
133640
|
-
|
|
133641
|
-
Modeler$1.call(this, options);
|
|
133642
|
-
}
|
|
133643
|
-
|
|
133644
|
-
e$7(Modeler, Modeler$1);
|
|
133645
|
-
|
|
133646
|
-
Modeler.prototype._camundaPlatformModules = [
|
|
133647
|
-
behaviorsModule,
|
|
133648
|
-
index$4,
|
|
133649
|
-
index,
|
|
133650
|
-
colorPickerModule,
|
|
133651
|
-
index$1,
|
|
133652
|
-
CamundaVariableResolverModule,
|
|
133653
|
-
RemoveTemplatesModule
|
|
133654
|
-
];
|
|
133655
|
-
|
|
133656
|
-
Modeler.prototype._modules = [].concat(
|
|
133657
|
-
Modeler$1.prototype._modules,
|
|
133658
|
-
Modeler.prototype._camundaPlatformModules
|
|
133620
|
+
/**
|
|
133621
|
+
* @typedef {import('bpmn-js/lib/BaseViewer').BaseViewerOptions} BaseViewerOptions
|
|
133622
|
+
*/
|
|
133623
|
+
|
|
133624
|
+
/**
|
|
133625
|
+
* @param {BaseViewerOptions} options
|
|
133626
|
+
*/
|
|
133627
|
+
function Modeler(options = {}) {
|
|
133628
|
+
|
|
133629
|
+
options = {
|
|
133630
|
+
...options,
|
|
133631
|
+
moddleExtensions: {
|
|
133632
|
+
...commonModdleExtensions,
|
|
133633
|
+
...options.moddleExtensions
|
|
133634
|
+
},
|
|
133635
|
+
propertiesPanel: {
|
|
133636
|
+
tooltip: TooltipProvider,
|
|
133637
|
+
...options.propertiesPanel
|
|
133638
|
+
}
|
|
133639
|
+
};
|
|
133640
|
+
|
|
133641
|
+
Modeler$1.call(this, options);
|
|
133642
|
+
}
|
|
133643
|
+
|
|
133644
|
+
e$7(Modeler, Modeler$1);
|
|
133645
|
+
|
|
133646
|
+
Modeler.prototype._camundaPlatformModules = [
|
|
133647
|
+
behaviorsModule,
|
|
133648
|
+
index$4,
|
|
133649
|
+
index,
|
|
133650
|
+
colorPickerModule,
|
|
133651
|
+
index$1,
|
|
133652
|
+
CamundaVariableResolverModule,
|
|
133653
|
+
RemoveTemplatesModule
|
|
133654
|
+
];
|
|
133655
|
+
|
|
133656
|
+
Modeler.prototype._modules = [].concat(
|
|
133657
|
+
Modeler$1.prototype._modules,
|
|
133658
|
+
Modeler.prototype._camundaPlatformModules
|
|
133659
133659
|
);
|
|
133660
133660
|
|
|
133661
133661
|
return Modeler;
|