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.
Files changed (94) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/dist/assets/base-navigated-viewer.css +2 -0
  3. package/dist/assets/base-viewer.css +2 -0
  4. package/dist/assets/camunda-cloud-modeler.css +2 -1
  5. package/dist/assets/camunda-cloud-navigated-viewer.css +1 -0
  6. package/dist/assets/camunda-cloud-viewer.css +1 -0
  7. package/dist/assets/camunda-platform-navigated-viewer.css +1 -0
  8. package/dist/assets/camunda-platform-viewer.css +1 -0
  9. package/dist/base-modeler.development.js +1837 -3769
  10. package/dist/base-modeler.production.min.js +4 -4
  11. package/dist/base-navigated-viewer.development.js +22218 -0
  12. package/dist/base-navigated-viewer.production.min.js +2 -0
  13. package/dist/base-viewer.development.js +21227 -0
  14. package/dist/base-viewer.production.min.js +2 -0
  15. package/dist/camunda-cloud-modeler.development.js +8416 -5340
  16. package/dist/camunda-cloud-modeler.production.min.js +4 -4
  17. package/dist/camunda-cloud-navigated-viewer.development.js +23041 -0
  18. package/dist/camunda-cloud-navigated-viewer.production.min.js +2 -0
  19. package/dist/camunda-cloud-viewer.development.js +22050 -0
  20. package/dist/camunda-cloud-viewer.production.min.js +2 -0
  21. package/dist/camunda-platform-modeler.development.js +6616 -8556
  22. package/dist/camunda-platform-modeler.production.min.js +4 -4
  23. package/dist/camunda-platform-navigated-viewer.development.js +23413 -0
  24. package/dist/camunda-platform-navigated-viewer.production.min.js +2 -0
  25. package/dist/camunda-platform-viewer.development.js +22422 -0
  26. package/dist/camunda-platform-viewer.production.min.js +2 -0
  27. package/lib/base/NavigatedViewer.js +3 -0
  28. package/lib/base/Viewer.js +3 -0
  29. package/lib/camunda-cloud/ElementTemplatesValidator.js +1 -0
  30. package/lib/camunda-cloud/Modeler.js +8 -7
  31. package/lib/camunda-cloud/NavigatedViewer.js +34 -0
  32. package/lib/camunda-cloud/Viewer.js +34 -0
  33. package/lib/camunda-cloud/util/commonModules.js +14 -0
  34. package/lib/camunda-platform/Modeler.js +5 -5
  35. package/lib/camunda-platform/NavigatedViewer.js +25 -0
  36. package/lib/camunda-platform/Viewer.js +24 -0
  37. package/lib/camunda-platform/util/commonModules.js +7 -0
  38. package/lib/util/ExtensionElementsUtil.js +59 -0
  39. package/package.json +26 -14
  40. package/styles/base-navigated-viewer.css +2 -0
  41. package/styles/base-viewer.css +2 -0
  42. package/styles/camunda-cloud-modeler.css +2 -1
  43. package/styles/camunda-cloud-navigated-viewer.css +1 -0
  44. package/styles/camunda-cloud-viewer.css +1 -0
  45. package/styles/camunda-platform-navigated-viewer.css +1 -0
  46. package/styles/camunda-platform-viewer.css +1 -0
  47. package/util/index.js +39 -0
  48. package/dist/assets/bpmn-font/bpmn-codes.css +0 -108
  49. package/dist/assets/bpmn-font/bpmn-embedded.css +0 -161
  50. package/dist/assets/bpmn-font/bpmn.css +0 -164
  51. package/dist/assets/bpmn-font/bpmn.eot +0 -0
  52. package/dist/assets/bpmn-font/bpmn.svg +0 -224
  53. package/dist/assets/bpmn-font/bpmn.ttf +0 -0
  54. package/dist/assets/bpmn-font/bpmn.woff +0 -0
  55. package/dist/assets/bpmn-font/bpmn.woff2 +0 -0
  56. package/dist/assets/bpmn-font/css/bpmn-codes.css +0 -108
  57. package/dist/assets/bpmn-font/css/bpmn-embedded.css +0 -161
  58. package/dist/assets/bpmn-font/css/bpmn.css +0 -164
  59. package/dist/assets/bpmn-font/font/bpmn.eot +0 -0
  60. package/dist/assets/bpmn-font/font/bpmn.svg +0 -224
  61. package/dist/assets/bpmn-font/font/bpmn.ttf +0 -0
  62. package/dist/assets/bpmn-font/font/bpmn.woff +0 -0
  63. package/dist/assets/bpmn-font/font/bpmn.woff2 +0 -0
  64. package/dist/assets/bpmn-js-properties-panel.css +0 -778
  65. package/dist/assets/bpmn-js.css +0 -113
  66. package/dist/assets/diagram-js-minimap.css +0 -87
  67. package/dist/assets/diagram-js.css +0 -819
  68. package/dist/assets/element-templates.css +0 -75
  69. package/dist/assets/properties-panel.css +0 -877
  70. package/lib/camunda-cloud/features/modeling/behavior/CleanUpAssignmentDefinitionBehavior.js +0 -78
  71. package/lib/camunda-cloud/features/modeling/behavior/CleanUpBusinessRuleTaskBehavior.js +0 -112
  72. package/lib/camunda-cloud/features/modeling/behavior/CreateZeebeBoundaryEventBehavior.js +0 -76
  73. package/lib/camunda-cloud/features/modeling/behavior/CreateZeebeCallActivityBehavior.js +0 -74
  74. package/lib/camunda-cloud/features/modeling/behavior/FormDefinitionBehavior.js +0 -138
  75. package/lib/camunda-cloud/features/modeling/behavior/UpdatePropagateAllChildVariablesBehavior.js +0 -109
  76. package/lib/camunda-cloud/features/modeling/behavior/index.js +0 -24
  77. package/lib/camunda-cloud/features/modeling/index.js +0 -7
  78. package/lib/camunda-cloud/helper/CalledElementHelper.js +0 -72
  79. package/lib/camunda-cloud/helper/ElementHelper.js +0 -18
  80. package/lib/camunda-cloud/helper/ExtensionElementsHelper.js +0 -17
  81. package/lib/camunda-cloud/helper/FormsHelper.js +0 -84
  82. package/lib/camunda-cloud/helper/InputOutputHelper.js +0 -138
  83. package/lib/camunda-cloud/helper/Utils.js +0 -10
  84. package/lib/camunda-cloud/helper/ZeebeServiceTaskHelper.js +0 -41
  85. package/lib/camunda-platform/features/modeling/behavior/DeleteErrorEventDefinitionBehavior.js +0 -67
  86. package/lib/camunda-platform/features/modeling/behavior/DeleteRetryTimeCycleBehavior.js +0 -84
  87. package/lib/camunda-platform/features/modeling/behavior/UpdateCamundaExclusiveBehavior.js +0 -65
  88. package/lib/camunda-platform/features/modeling/behavior/UpdateInputOutputBehavior.js +0 -54
  89. package/lib/camunda-platform/features/modeling/behavior/UpdateResultVariableBehavior.js +0 -51
  90. package/lib/camunda-platform/features/modeling/behavior/UserTaskFormsBehavior.js +0 -70
  91. package/lib/camunda-platform/features/modeling/behavior/UserTaskGeneratedFormsBehavior.js +0 -117
  92. package/lib/camunda-platform/features/modeling/behavior/index.js +0 -26
  93. package/lib/camunda-platform/features/modeling/index.js +0 -7
  94. 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,7 +0,0 @@
1
- import camundaPlatformModelingBehaviors from './behavior';
2
-
3
- export default {
4
- __depends__: [
5
- camundaPlatformModelingBehaviors
6
- ]
7
- };
@@ -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
- }