camunda-bpmn-js 4.0.0-0 → 4.1.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 (26) hide show
  1. package/dist/assets/diagram-js.css +7 -19
  2. package/dist/assets/properties-panel.css +57 -23
  3. package/dist/base-modeler.development.js +44323 -41580
  4. package/dist/base-modeler.production.min.js +52 -53
  5. package/dist/base-navigated-viewer.development.js +1695 -1148
  6. package/dist/base-navigated-viewer.production.min.js +1 -1
  7. package/dist/base-viewer.development.js +1694 -1151
  8. package/dist/base-viewer.production.min.js +1 -1
  9. package/dist/camunda-cloud-modeler.development.js +53952 -41021
  10. package/dist/camunda-cloud-modeler.production.min.js +61 -61
  11. package/dist/camunda-cloud-navigated-viewer.development.js +1695 -1148
  12. package/dist/camunda-cloud-navigated-viewer.production.min.js +1 -1
  13. package/dist/camunda-cloud-viewer.development.js +1694 -1151
  14. package/dist/camunda-cloud-viewer.production.min.js +1 -1
  15. package/dist/camunda-platform-modeler.development.js +45914 -43112
  16. package/dist/camunda-platform-modeler.production.min.js +52 -53
  17. package/dist/camunda-platform-navigated-viewer.development.js +1695 -1148
  18. package/dist/camunda-platform-navigated-viewer.production.min.js +1 -1
  19. package/dist/camunda-platform-viewer.development.js +1694 -1151
  20. package/dist/camunda-platform-viewer.production.min.js +1 -1
  21. package/lib/camunda-cloud/Modeler.js +0 -3
  22. package/package.json +33 -33
  23. package/lib/camunda-cloud/features/rules/BpmnRules.d.ts +0 -32
  24. package/lib/camunda-cloud/features/rules/BpmnRules.js +0 -161
  25. package/lib/camunda-cloud/features/rules/index.d.ts +0 -6
  26. package/lib/camunda-cloud/features/rules/index.js +0 -6
@@ -4,8 +4,6 @@ import BaseModeler from '../base/Modeler';
4
4
 
5
5
  import behaviorsModule from 'camunda-bpmn-js-behaviors/lib/camunda-cloud';
6
6
 
7
- import rulesModule from './features/rules';
8
-
9
7
  import {
10
8
  ZeebePropertiesProviderModule as zeebePropertiesProviderModule,
11
9
  ZeebeTooltipProvider
@@ -70,7 +68,6 @@ Modeler.prototype._addElementTemplateChooserModule = function(options) {
70
68
  Modeler.prototype._camundaCloudModules = [
71
69
  ...commonModules,
72
70
  behaviorsModule,
73
- rulesModule,
74
71
  zeebePropertiesProviderModule,
75
72
  cloudElementTemplatesPropertiesProvider,
76
73
  createAppendAnythingModule,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camunda-bpmn-js",
3
- "version": "4.0.0-0",
3
+ "version": "4.1.0",
4
4
  "description": "Embeddable Camunda modeling distributions based on bpmn-js",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -32,9 +32,6 @@
32
32
  "type": "git",
33
33
  "url": "https://github.com/camunda/camunda-bpmn-js"
34
34
  },
35
- "engines": {
36
- "node": "*"
37
- },
38
35
  "keywords": [
39
36
  "bpmn",
40
37
  "bpmn20",
@@ -58,43 +55,42 @@
58
55
  "@bpmn-io/align-to-origin": "^0.7.0",
59
56
  "@bpmn-io/element-template-chooser": "^1.0.0",
60
57
  "@bpmn-io/element-template-icon-renderer": "^0.5.1",
61
- "@bpmn-io/form-variable-provider": "^1.1.0",
62
- "@bpmn-io/properties-panel": "^4.0.0-2",
63
- "@bpmn-io/variable-resolver": "^1.2.0",
64
- "@camunda/example-data-properties-provider": "^2.0.0-0",
65
- "bpmn-js": "^14.0.0",
66
- "bpmn-js-color-picker": "^0.6.1",
67
- "bpmn-js-create-append-anything": "^0.4.0",
68
- "bpmn-js-element-templates": "^2.0.0-1",
58
+ "@bpmn-io/form-variable-provider": "^1.3.0",
59
+ "@bpmn-io/properties-panel": "^3.18.1",
60
+ "@bpmn-io/variable-resolver": "^1.2.1",
61
+ "@camunda/example-data-properties-provider": "^1.2.0",
62
+ "bpmn-js": "^17.0.2",
63
+ "bpmn-js-color-picker": "^0.7.0",
64
+ "bpmn-js-create-append-anything": "^0.5.0",
65
+ "bpmn-js-element-templates": "^1.14.0",
69
66
  "bpmn-js-executable-fix": "^0.2.1",
70
- "bpmn-js-properties-panel": "^6.0.0-2",
71
- "camunda-bpmn-js-behaviors": "^1.0.0",
67
+ "camunda-bpmn-js-behaviors": "^1.2.3",
72
68
  "camunda-bpmn-moddle": "^7.0.1",
73
- "diagram-js": "^12.2.0",
74
- "diagram-js-grid": "^0.2.0",
69
+ "diagram-js": "^14.1.0",
70
+ "diagram-js-grid": "^1.0.0",
75
71
  "diagram-js-minimap": "^4.1.0",
76
72
  "diagram-js-origin": "^1.4.0",
77
73
  "inherits-browser": "^0.1.0",
78
- "min-dash": "^4.1.1",
79
- "typescript": "^5.0.4",
74
+ "min-dash": "^4.2.1",
80
75
  "zeebe-bpmn-moddle": "^1.0.0"
81
76
  },
82
77
  "devDependencies": {
83
- "@babel/core": "^7.23.0",
84
- "@rollup/plugin-commonjs": "^25.0.4",
85
- "@rollup/plugin-json": "^6.0.0",
86
- "@rollup/plugin-node-resolve": "^15.2.1",
87
- "@rollup/plugin-terser": "^0.4.3",
78
+ "@babel/core": "^7.23.7",
79
+ "@rollup/plugin-commonjs": "^25.0.7",
80
+ "@rollup/plugin-json": "^6.1.0",
81
+ "@rollup/plugin-node-resolve": "^15.2.3",
82
+ "@rollup/plugin-terser": "^0.4.4",
88
83
  "babel-loader": "^9.1.3",
89
84
  "babel-plugin-istanbul": "^6.1.1",
90
85
  "bio-dts": "^0.8.1",
91
- "chai": "^4.3.8",
86
+ "bpmn-js-properties-panel": "^5.11.1",
87
+ "chai": "^4.4.1",
92
88
  "cross-env": "^7.0.3",
93
- "del-cli": "^5.0.0",
89
+ "del-cli": "^5.1.0",
94
90
  "downloadjs": "^1.4.7",
95
- "eslint": "^8.44.0",
91
+ "eslint": "^8.56.0",
96
92
  "eslint-plugin-bpmn-io": "^1.0.0",
97
- "execa": "^8.0.0",
93
+ "execa": "^8.0.1",
98
94
  "file-drops": "^0.5.0",
99
95
  "karma": "^6.4.2",
100
96
  "karma-chai": "^0.1.0",
@@ -110,16 +106,20 @@
110
106
  "min-dom": "^4.1.0",
111
107
  "mocha": "^10.2.0",
112
108
  "mocha-test-container-support": "^0.2.0",
113
- "npm-run-all": "^4.1.5",
114
- "puppeteer": "^21.3.8",
109
+ "npm-run-all2": "^6.0.0",
110
+ "puppeteer": "^22.0.0",
115
111
  "raw-loader": "^4.0.2",
116
- "remark-cli": "^11.0.0",
112
+ "remark-cli": "^12.0.0",
117
113
  "remark-preset-bpmn-io": "^0.2.1",
118
- "rollup": "^3.29.3",
114
+ "rollup": "^4.9.6",
119
115
  "rollup-plugin-copy": "^3.5.0",
120
- "sinon": "^16.0.0",
116
+ "sinon": "^17.0.1",
121
117
  "sinon-chai": "^3.7.0",
122
- "webpack": "^5.88.2"
118
+ "typescript": "^5.3.3",
119
+ "webpack": "^5.89.0"
120
+ },
121
+ "peerDependencies": {
122
+ "bpmn-js-properties-panel": ">= 3.0.0"
123
123
  },
124
124
  "files": [
125
125
  "dist",
@@ -1,32 +0,0 @@
1
- /**
2
- * Zeebe rule provider that allows to create boundary events with catch events
3
- *
4
- * See {@link CustomRules} for the default implementation
5
- * of BPMN 2.0 modeling rules provided by bpmn-js.
6
- */
7
- declare class CustomRules extends BpmnRules {
8
- }
9
-
10
- declare namespace CustomRules {
11
- export const $inject: string[];
12
- export { canAttach };
13
- }
14
-
15
- export default CustomRules;
16
- type EventBus = import('diagram-js/lib/core/EventBus').default;
17
- type Element = import('bpmn-js/lib/model/Types').Element;
18
- type Shape = import('bpmn-js/lib/model/Types').Shape;
19
- type Point = import('diagram-js/lib/util/Types').Point;
20
- import BpmnRules from 'bpmn-js/lib/features/rules/BpmnRules';
21
-
22
- /**
23
- * Zeebe-specific rule that allows attaching intermediate events.
24
- *
25
- * @param elements
26
- * @param target
27
- * @param source
28
- * @param position
29
- *
30
- * @return
31
- */
32
- declare function canAttach(elements: Element, target: Shape, source: Element, position: Point): boolean | 'attach';
@@ -1,161 +0,0 @@
1
- import BpmnRules from 'bpmn-js/lib/features/rules/BpmnRules';
2
-
3
- import {
4
- find
5
- } from 'min-dash';
6
-
7
- import {
8
- isLabel
9
- } from 'bpmn-js/lib/util/LabelUtil';
10
-
11
- import {
12
- is,
13
- getBusinessObject
14
- } from 'bpmn-js/lib/util/ModelUtil';
15
-
16
-
17
- import {
18
- isEventSubProcess
19
- } from 'bpmn-js/lib/util/DiUtil';
20
-
21
- import {
22
- getBoundaryAttachment as isBoundaryAttachment
23
- } from 'bpmn-js/lib/features/snapping/BpmnSnappingUtil';
24
-
25
- /**
26
- * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
27
- *
28
- * @typedef {import('bpmn-js/lib/model/Types').Element} Element
29
- * @typedef {import('bpmn-js/lib/model/Types').Shape} Shape
30
- *
31
- * @typedef {import('diagram-js/lib/util/Types').Point} Point
32
- */
33
-
34
- const HIGH_PRIORITY = 5000;
35
-
36
- /**
37
- * Zeebe rule provider that allows to create boundary events with catch events
38
- *
39
- * See {@link CustomRules} for the default implementation
40
- * of BPMN 2.0 modeling rules provided by bpmn-js.
41
- */
42
- export default class CustomRules extends BpmnRules {
43
-
44
- /**
45
- * @param {EventBus} eventBus
46
- */
47
- constructor(eventBus) {
48
- super(eventBus);
49
- }
50
-
51
- init() {
52
- super.init();
53
-
54
- this.addRule('shape.attach', HIGH_PRIORITY,(context) => {
55
- return canAttach(
56
- context.shape,
57
- context.target,
58
- null,
59
- context.position);
60
- });
61
- }
62
- }
63
-
64
- CustomRules.$inject = [ 'eventBus' ];
65
-
66
- /**
67
- * Zeebe-specific rule that allows attaching intermediate events.
68
- *
69
- * @param {Element} elements
70
- * @param {Shape} target
71
- * @param {Element} source
72
- * @param {Point} position
73
- *
74
- * @return {boolean|'attach'}
75
- */
76
- function canAttach(elements, target, source, position) {
77
- function isBoundaryEvent(element) {
78
- return !isLabel(element) && is(element, 'bpmn:BoundaryEvent');
79
- }
80
-
81
- /**
82
- * In Zeebe we treat IntermediateCatchEvents as boundary events too,
83
- * this must be reflected in the rules.
84
- */
85
- function isBoundaryCandidate(element) {
86
- return isBoundaryEvent(element) || (
87
- (
88
- is(element, 'bpmn:IntermediateCatchEvent') ||
89
- is(element, 'bpmn:IntermediateThrowEvent')
90
- ) && !element.parent
91
- );
92
- }
93
-
94
- function isForCompensation(e) {
95
- return getBusinessObject(e).isForCompensation;
96
- }
97
-
98
- function isReceiveTaskAfterEventBasedGateway(element) {
99
- return (
100
- is(element, 'bpmn:ReceiveTask') &&
101
- find(element.incoming, function(incoming) {
102
- return is(incoming.source, 'bpmn:EventBasedGateway');
103
- })
104
- );
105
- }
106
-
107
- if (!Array.isArray(elements)) {
108
- elements = [ elements ];
109
- }
110
-
111
- // disallow appending as boundary event
112
- if (source) {
113
- return false;
114
- }
115
-
116
- // only (re-)attach one element at a time
117
- if (elements.length !== 1) {
118
- return false;
119
- }
120
-
121
- const element = elements[0];
122
-
123
- // do not attach labels
124
- if (isLabel(element)) {
125
- return false;
126
- }
127
-
128
- // only handle boundary events
129
- if (!isBoundaryCandidate(element)) {
130
- return false;
131
- }
132
-
133
- // allow default move operation
134
- if (!target) {
135
- return true;
136
- }
137
-
138
- // disallow drop on event sub processes
139
- if (isEventSubProcess(target)) {
140
- return false;
141
- }
142
-
143
- // only allow drop on non compensation activities
144
- if (!is(target, 'bpmn:Activity') || isForCompensation(target)) {
145
- return false;
146
- }
147
-
148
- // only attach to subprocess border
149
- if (position && !isBoundaryAttachment(position, target)) {
150
- return false;
151
- }
152
-
153
- // do not attach on receive tasks after event based gateways
154
- if (isReceiveTaskAfterEventBasedGateway(target)) {
155
- return false;
156
- }
157
-
158
- return 'attach';
159
- }
160
-
161
- CustomRules.canAttach = canAttach;
@@ -1,6 +0,0 @@
1
- declare namespace _default {
2
- const __init__: string[];
3
- const bpmnRules: (string | typeof BpmnRules)[];
4
- }
5
- export default _default;
6
- import BpmnRules from './BpmnRules';
@@ -1,6 +0,0 @@
1
- import BpmnRules from './BpmnRules';
2
-
3
- export default {
4
- __init__: [ 'bpmnRules' ],
5
- bpmnRules: [ 'type', BpmnRules ]
6
- };