camunda-bpmn-js 0.13.0-drilldown.0 → 0.13.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/CHANGELOG.md +73 -0
- package/dist/assets/base-navigated-viewer.css +2 -0
- package/dist/assets/base-viewer.css +2 -0
- package/dist/assets/camunda-cloud-modeler.css +2 -1
- package/dist/assets/camunda-cloud-navigated-viewer.css +1 -0
- package/dist/assets/camunda-cloud-viewer.css +1 -0
- package/dist/assets/camunda-platform-navigated-viewer.css +1 -0
- package/dist/assets/camunda-platform-viewer.css +1 -0
- package/dist/base-modeler.development.js +1837 -3769
- package/dist/base-modeler.production.min.js +4 -4
- package/dist/base-navigated-viewer.development.js +22218 -0
- package/dist/base-navigated-viewer.production.min.js +2 -0
- package/dist/base-viewer.development.js +21227 -0
- package/dist/base-viewer.production.min.js +2 -0
- package/dist/camunda-cloud-modeler.development.js +8416 -5340
- package/dist/camunda-cloud-modeler.production.min.js +4 -4
- package/dist/camunda-cloud-navigated-viewer.development.js +23041 -0
- package/dist/camunda-cloud-navigated-viewer.production.min.js +2 -0
- package/dist/camunda-cloud-viewer.development.js +22050 -0
- package/dist/camunda-cloud-viewer.production.min.js +2 -0
- package/dist/camunda-platform-modeler.development.js +6616 -8556
- package/dist/camunda-platform-modeler.production.min.js +4 -4
- package/dist/camunda-platform-navigated-viewer.development.js +23413 -0
- package/dist/camunda-platform-navigated-viewer.production.min.js +2 -0
- package/dist/camunda-platform-viewer.development.js +22422 -0
- package/dist/camunda-platform-viewer.production.min.js +2 -0
- package/lib/base/NavigatedViewer.js +3 -0
- package/lib/base/Viewer.js +3 -0
- package/lib/camunda-cloud/ElementTemplatesValidator.js +1 -0
- package/lib/camunda-cloud/Modeler.js +8 -7
- package/lib/camunda-cloud/NavigatedViewer.js +34 -0
- package/lib/camunda-cloud/Viewer.js +34 -0
- package/lib/camunda-cloud/util/commonModules.js +14 -0
- package/lib/camunda-platform/Modeler.js +5 -5
- package/lib/camunda-platform/NavigatedViewer.js +25 -0
- package/lib/camunda-platform/Viewer.js +24 -0
- package/lib/camunda-platform/util/commonModules.js +7 -0
- package/lib/util/ExtensionElementsUtil.js +59 -0
- package/package.json +26 -14
- package/styles/base-navigated-viewer.css +2 -0
- package/styles/base-viewer.css +2 -0
- package/styles/camunda-cloud-modeler.css +2 -1
- package/styles/camunda-cloud-navigated-viewer.css +1 -0
- package/styles/camunda-cloud-viewer.css +1 -0
- package/styles/camunda-platform-navigated-viewer.css +1 -0
- package/styles/camunda-platform-viewer.css +1 -0
- package/util/index.js +39 -0
- package/dist/assets/bpmn-font/bpmn-codes.css +0 -108
- package/dist/assets/bpmn-font/bpmn-embedded.css +0 -161
- package/dist/assets/bpmn-font/bpmn.css +0 -164
- package/dist/assets/bpmn-font/bpmn.eot +0 -0
- package/dist/assets/bpmn-font/bpmn.svg +0 -224
- package/dist/assets/bpmn-font/bpmn.ttf +0 -0
- package/dist/assets/bpmn-font/bpmn.woff +0 -0
- package/dist/assets/bpmn-font/bpmn.woff2 +0 -0
- package/dist/assets/bpmn-font/css/bpmn-codes.css +0 -108
- package/dist/assets/bpmn-font/css/bpmn-embedded.css +0 -161
- package/dist/assets/bpmn-font/css/bpmn.css +0 -164
- package/dist/assets/bpmn-font/font/bpmn.eot +0 -0
- package/dist/assets/bpmn-font/font/bpmn.svg +0 -224
- package/dist/assets/bpmn-font/font/bpmn.ttf +0 -0
- package/dist/assets/bpmn-font/font/bpmn.woff +0 -0
- package/dist/assets/bpmn-font/font/bpmn.woff2 +0 -0
- package/dist/assets/bpmn-js-properties-panel.css +0 -778
- package/dist/assets/bpmn-js.css +0 -113
- package/dist/assets/diagram-js-minimap.css +0 -87
- package/dist/assets/diagram-js.css +0 -819
- package/dist/assets/element-templates.css +0 -75
- package/dist/assets/properties-panel.css +0 -877
- package/lib/camunda-cloud/features/modeling/behavior/CleanUpAssignmentDefinitionBehavior.js +0 -78
- package/lib/camunda-cloud/features/modeling/behavior/CleanUpBusinessRuleTaskBehavior.js +0 -112
- package/lib/camunda-cloud/features/modeling/behavior/CreateZeebeBoundaryEventBehavior.js +0 -76
- package/lib/camunda-cloud/features/modeling/behavior/CreateZeebeCallActivityBehavior.js +0 -74
- package/lib/camunda-cloud/features/modeling/behavior/FormDefinitionBehavior.js +0 -138
- package/lib/camunda-cloud/features/modeling/behavior/UpdatePropagateAllChildVariablesBehavior.js +0 -109
- package/lib/camunda-cloud/features/modeling/behavior/index.js +0 -24
- package/lib/camunda-cloud/features/modeling/index.js +0 -7
- package/lib/camunda-cloud/helper/CalledElementHelper.js +0 -72
- package/lib/camunda-cloud/helper/ElementHelper.js +0 -18
- package/lib/camunda-cloud/helper/ExtensionElementsHelper.js +0 -17
- package/lib/camunda-cloud/helper/FormsHelper.js +0 -84
- package/lib/camunda-cloud/helper/InputOutputHelper.js +0 -138
- package/lib/camunda-cloud/helper/Utils.js +0 -10
- package/lib/camunda-cloud/helper/ZeebeServiceTaskHelper.js +0 -41
- package/lib/camunda-platform/features/modeling/behavior/DeleteErrorEventDefinitionBehavior.js +0 -67
- package/lib/camunda-platform/features/modeling/behavior/DeleteRetryTimeCycleBehavior.js +0 -84
- package/lib/camunda-platform/features/modeling/behavior/UpdateCamundaExclusiveBehavior.js +0 -65
- package/lib/camunda-platform/features/modeling/behavior/UpdateInputOutputBehavior.js +0 -54
- package/lib/camunda-platform/features/modeling/behavior/UpdateResultVariableBehavior.js +0 -51
- package/lib/camunda-platform/features/modeling/behavior/UserTaskFormsBehavior.js +0 -70
- package/lib/camunda-platform/features/modeling/behavior/UserTaskGeneratedFormsBehavior.js +0 -117
- package/lib/camunda-platform/features/modeling/behavior/index.js +0 -26
- package/lib/camunda-platform/features/modeling/index.js +0 -7
- package/lib/camunda-platform/helper/InputOutputHelper.js +0 -29
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
has,
|
|
5
|
-
isUndefined
|
|
6
|
-
} from 'min-dash';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Camunda BPMN specific user task forms behavior.
|
|
11
|
-
*/
|
|
12
|
-
export default class UserTaskFormsBehavior extends CommandInterceptor {
|
|
13
|
-
constructor(eventBus) {
|
|
14
|
-
super(eventBus);
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Ensure that only one of the following options is configured:
|
|
18
|
-
*
|
|
19
|
-
* 1. embedded, external or Camunda forms using camunda:formKey
|
|
20
|
-
* 2. Camunda forms using camunda:formRef
|
|
21
|
-
*/
|
|
22
|
-
this.preExecute([
|
|
23
|
-
'element.updateProperties',
|
|
24
|
-
'element.updateModdleProperties',
|
|
25
|
-
'properties-panel.update-businessobject'
|
|
26
|
-
], function(context) {
|
|
27
|
-
const { properties } = context;
|
|
28
|
-
|
|
29
|
-
const businessObject = (
|
|
30
|
-
context.moddleElement ||
|
|
31
|
-
context.businessObject ||
|
|
32
|
-
context.element.businessObject
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
if (has(properties, 'camunda:formKey')) {
|
|
36
|
-
Object.assign(properties, {
|
|
37
|
-
'camunda:formRef': undefined,
|
|
38
|
-
'camunda:formRefBinding': undefined,
|
|
39
|
-
'camunda:formRefVersion': undefined
|
|
40
|
-
});
|
|
41
|
-
} else if (has(properties, 'camunda:formRef')) {
|
|
42
|
-
Object.assign(properties, {
|
|
43
|
-
'camunda:formKey': undefined
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
if (isUndefined(properties[ 'camunda:formRef' ])) {
|
|
47
|
-
Object.assign(properties, {
|
|
48
|
-
'camunda:formRefBinding': undefined,
|
|
49
|
-
'camunda:formRefVersion': undefined
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if (!has(properties, 'camunda:formRefBinding') && isUndefined(businessObject.get('camunda:formRefBinding'))) {
|
|
54
|
-
Object.assign(properties, {
|
|
55
|
-
'camunda:formRefBinding': 'latest'
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (has(properties, 'camunda:formRefBinding') && properties[ 'camunda:formRefBinding' ] !== 'version') {
|
|
61
|
-
Object.assign(properties, {
|
|
62
|
-
'camunda:formRefVersion': undefined
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
}, true);
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
UserTaskFormsBehavior.$inject = [ 'eventBus' ];
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor';
|
|
2
|
-
|
|
3
|
-
import { getBusinessObject, is } from 'bpmn-js/lib/util/ModelUtil';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Camunda BPMN specific user task generated forms behavior.
|
|
8
|
-
*
|
|
9
|
-
* 1. Removes camunda:FormField#values if camunda:FormField#type is changed to something other than enum.
|
|
10
|
-
* 2. Updates camunda:FormData#businessKey if camunda:FormField#id is changed.
|
|
11
|
-
* 3. Removes camunda:FormData#businessKey if camunda:FormField is removed.
|
|
12
|
-
*/
|
|
13
|
-
export default class UserTaskFormsBehavior extends CommandInterceptor {
|
|
14
|
-
constructor(eventBus, modeling) {
|
|
15
|
-
super(eventBus);
|
|
16
|
-
|
|
17
|
-
this.preExecute([
|
|
18
|
-
'element.updateModdleProperties',
|
|
19
|
-
'properties-panel.update-businessobject'
|
|
20
|
-
], function(context) {
|
|
21
|
-
let {
|
|
22
|
-
businessObject,
|
|
23
|
-
moddleElement,
|
|
24
|
-
properties
|
|
25
|
-
} = context;
|
|
26
|
-
|
|
27
|
-
businessObject = businessObject || moddleElement;
|
|
28
|
-
|
|
29
|
-
if (!is(businessObject, 'camunda:FormField')) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if ('camunda:type' in properties && properties[ 'camunda:type' ] !== 'enum') {
|
|
34
|
-
properties[ 'camunda:values' ] = undefined;
|
|
35
|
-
}
|
|
36
|
-
}, true);
|
|
37
|
-
|
|
38
|
-
this.preExecute([
|
|
39
|
-
'element.updateModdleProperties',
|
|
40
|
-
'properties-panel.update-businessobject'
|
|
41
|
-
], function(context) {
|
|
42
|
-
let {
|
|
43
|
-
businessObject,
|
|
44
|
-
element,
|
|
45
|
-
moddleElement,
|
|
46
|
-
properties
|
|
47
|
-
} = context;
|
|
48
|
-
|
|
49
|
-
businessObject = businessObject || moddleElement;
|
|
50
|
-
|
|
51
|
-
if (!is(businessObject, 'camunda:FormField')) {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const formData = getFormData(element);
|
|
56
|
-
|
|
57
|
-
if ('camunda:id' in properties && isBusinessKey(businessObject, formData)) {
|
|
58
|
-
modeling.updateModdleProperties(element, formData, {
|
|
59
|
-
'camunda:businessKey': properties[ 'camunda:id' ]
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
}, true);
|
|
63
|
-
|
|
64
|
-
this.postExecute('properties-panel.update-businessobject-list', function(context) {
|
|
65
|
-
const {
|
|
66
|
-
currentObject: businessObject,
|
|
67
|
-
element,
|
|
68
|
-
propertyName,
|
|
69
|
-
objectsToRemove = []
|
|
70
|
-
} = context;
|
|
71
|
-
|
|
72
|
-
if (!is(businessObject, 'camunda:FormData')
|
|
73
|
-
|| propertyName !== 'fields'
|
|
74
|
-
|| !objectsToRemove.length) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
const businessKey = businessObject.get('camunda:businessKey');
|
|
79
|
-
|
|
80
|
-
if (!businessKey) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
objectsToRemove.forEach((object) => {
|
|
85
|
-
if (is(object, 'camunda:FormField') && object.get('camunda:id') === businessKey) {
|
|
86
|
-
modeling.updateModdleProperties(element, businessObject, {
|
|
87
|
-
'camunda:businessKey': undefined
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
}, true);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
UserTaskFormsBehavior.$inject = [ 'eventBus', 'modeling' ];
|
|
97
|
-
|
|
98
|
-
// helpers //////////
|
|
99
|
-
|
|
100
|
-
function isBusinessKey(formField, formData) {
|
|
101
|
-
return formField.get('camunda:id') === formData.get('camunda:businessKey');
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function getFormData(element) {
|
|
105
|
-
const businessObject = getBusinessObject(element),
|
|
106
|
-
extensionElements = businessObject.get('extensionElements');
|
|
107
|
-
|
|
108
|
-
if (!extensionElements) {
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
const values = extensionElements.get('values');
|
|
113
|
-
|
|
114
|
-
return values.find((value) => {
|
|
115
|
-
return is(value, 'camunda:FormData');
|
|
116
|
-
});
|
|
117
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import DeleteErrorEventDefinitionBehavior from './DeleteErrorEventDefinitionBehavior';
|
|
2
|
-
import DeleteRetryTimeCycleBehavior from './DeleteRetryTimeCycleBehavior';
|
|
3
|
-
import UpdateCamundaExclusiveBehavior from './UpdateCamundaExclusiveBehavior';
|
|
4
|
-
import UpdateInputOutputBehavior from './UpdateInputOutputBehavior';
|
|
5
|
-
import UpdateResultVariableBehavior from './UpdateResultVariableBehavior';
|
|
6
|
-
import UserTaskFormsBehavior from './UserTaskFormsBehavior';
|
|
7
|
-
import UserTaskGeneratedFormsBehavior from './UserTaskGeneratedFormsBehavior';
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
__init__: [
|
|
11
|
-
'deleteErrorEventDefinitionBehavior',
|
|
12
|
-
'deleteRetryTimeCycleBehavior',
|
|
13
|
-
'updateCamundaExclusiveBehavior',
|
|
14
|
-
'updateResultVariableBehavior',
|
|
15
|
-
'updateInputOutputBehavior',
|
|
16
|
-
'userTaskFormsBehavior',
|
|
17
|
-
'userTaskGeneratedFormsBehavior'
|
|
18
|
-
],
|
|
19
|
-
deleteErrorEventDefinitionBehavior: [ 'type', DeleteErrorEventDefinitionBehavior ],
|
|
20
|
-
deleteRetryTimeCycleBehavior: [ 'type', DeleteRetryTimeCycleBehavior ],
|
|
21
|
-
updateCamundaExclusiveBehavior: [ 'type', UpdateCamundaExclusiveBehavior ],
|
|
22
|
-
updateResultVariableBehavior: [ 'type', UpdateResultVariableBehavior ],
|
|
23
|
-
updateInputOutputBehavior: [ 'type', UpdateInputOutputBehavior ],
|
|
24
|
-
userTaskFormsBehavior: [ 'type', UserTaskFormsBehavior ],
|
|
25
|
-
userTaskGeneratedFormsBehavior: [ 'type', UserTaskGeneratedFormsBehavior ]
|
|
26
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { is } from 'bpmn-js/lib/util/ModelUtil';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export function getInputOutput(businessObject) {
|
|
5
|
-
const extensionElements = businessObject.get('extensionElements');
|
|
6
|
-
|
|
7
|
-
if (!extensionElements) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
return extensionElements.get('values').find((value) => {
|
|
12
|
-
return is(value, 'camunda:InputOutput');
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function getInputParameters(inputOutput) {
|
|
17
|
-
return inputOutput.get('inputParameters');
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export function getOutputParameters(inputOutput) {
|
|
21
|
-
return inputOutput.get('outputParameters');
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export function isInputOutputEmpty(inputOutput) {
|
|
25
|
-
const inputParameters = getInputParameters(inputOutput);
|
|
26
|
-
const outputParameters = getOutputParameters(inputOutput);
|
|
27
|
-
|
|
28
|
-
return !inputParameters.length && !outputParameters.length;
|
|
29
|
-
}
|