bpmn-js 16.3.2 → 16.5.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 (28) hide show
  1. package/dist/bpmn-modeler.development.js +686 -378
  2. package/dist/bpmn-modeler.production.min.js +26 -26
  3. package/dist/bpmn-navigated-viewer.development.js +3 -3
  4. package/dist/bpmn-navigated-viewer.production.min.js +2 -2
  5. package/dist/bpmn-viewer.development.js +3 -3
  6. package/dist/bpmn-viewer.production.min.js +2 -2
  7. package/lib/draw/BpmnRenderer.js +1 -1
  8. package/lib/features/context-pad/ContextPadProvider.js +7 -13
  9. package/lib/features/modeling/BpmnUpdater.js +3 -1
  10. package/lib/features/modeling/ElementFactory.js +14 -1
  11. package/lib/features/modeling/behavior/DeleteLaneBehavior.js +52 -7
  12. package/lib/features/modeling/behavior/FixHoverBehavior.js +2 -4
  13. package/lib/features/modeling/behavior/ResizeBehavior.d.ts +10 -0
  14. package/lib/features/modeling/behavior/ResizeBehavior.js +262 -210
  15. package/lib/features/modeling/behavior/SpaceToolBehavior.js +207 -139
  16. package/lib/features/modeling/behavior/TextAnnotationBehavior.d.ts +6 -0
  17. package/lib/features/modeling/behavior/TextAnnotationBehavior.js +43 -0
  18. package/lib/features/modeling/behavior/index.js +3 -0
  19. package/lib/features/modeling/cmd/AddLaneHandler.js +93 -10
  20. package/lib/features/modeling/util/LaneUtil.js +30 -4
  21. package/lib/features/ordering/BpmnOrderingProvider.js +9 -2
  22. package/lib/features/palette/PaletteProvider.js +2 -9
  23. package/lib/features/replace/BpmnReplace.js +4 -0
  24. package/lib/features/rules/BpmnRules.js +2 -2
  25. package/lib/features/space-tool/BpmnSpaceTool.js +8 -3
  26. package/lib/model/Types.d.ts +1 -0
  27. package/lib/model/Types.ts +1 -0
  28. package/package.json +2 -2
@@ -2,8 +2,6 @@ import {
2
2
  assign
3
3
  } from 'min-dash';
4
4
 
5
- import { getDi } from '../../util/ModelUtil';
6
-
7
5
  /**
8
6
  * @typedef {import('diagram-js/lib/features/palette/Palette').default} Palette
9
7
  * @typedef {import('diagram-js/lib/features/create/Create').default} Create
@@ -75,12 +73,6 @@ PaletteProvider.prototype.getPaletteEntries = function() {
75
73
 
76
74
  function createListener(event) {
77
75
  var shape = elementFactory.createShape(assign({ type: type }, options));
78
-
79
- if (options) {
80
- var di = getDi(shape);
81
- di.isExpanded = options.isExpanded;
82
- }
83
-
84
76
  create.start(event, shape);
85
77
  }
86
78
 
@@ -180,7 +172,8 @@ PaletteProvider.prototype.getPaletteEntries = function() {
180
172
  ),
181
173
  'create.exclusive-gateway': createAction(
182
174
  'bpmn:ExclusiveGateway', 'gateway', 'bpmn-icon-gateway-none',
183
- translate('Create gateway')
175
+ translate('Create gateway'),
176
+ { isMarkerVisible: true }
184
177
  ),
185
178
  'create.task': createAction(
186
179
  'bpmn:Task', 'activity', 'bpmn-icon-task',
@@ -162,6 +162,10 @@ export default function BpmnReplace(
162
162
 
163
163
  newElement.di = {};
164
164
 
165
+ if (type === 'bpmn:ExclusiveGateway') {
166
+ newElement.di.isMarkerVisible = true;
167
+ }
168
+
165
169
  // colors will be set to DI
166
170
  copyProperties(element.di, newElement.di, [
167
171
  'fill',
@@ -984,11 +984,11 @@ function canResize(shape, newBounds) {
984
984
  }
985
985
 
986
986
  if (is(shape, 'bpmn:Lane')) {
987
- return !newBounds || (newBounds.width >= 130 && newBounds.height >= 60);
987
+ return true;
988
988
  }
989
989
 
990
990
  if (is(shape, 'bpmn:Participant')) {
991
- return !newBounds || (newBounds.width >= 250 && newBounds.height >= 50);
991
+ return true;
992
992
  }
993
993
 
994
994
  if (isTextAnnotation(shape)) {
@@ -4,6 +4,8 @@ import SpaceTool from 'diagram-js/lib/features/space-tool/SpaceTool';
4
4
 
5
5
  import { getBusinessObject, is } from '../../util/ModelUtil';
6
6
 
7
+ import { isHorizontal } from '../../util/DiUtil';
8
+
7
9
  /**
8
10
  * @typedef {import('didi').Injector} Injector
9
11
  *
@@ -40,15 +42,18 @@ BpmnSpaceTool.prototype.calculateAdjustments = function(elements, axis, delta, s
40
42
  // do not resize:
41
43
  //
42
44
  // * text annotations (horizontally/vertically)
43
- // * empty pools (vertically)
45
+ // * empty horizontal pools (vertically)
46
+ // * empty vertical pools (horizontally)
44
47
  adjustments.resizingShapes = adjustments.resizingShapes.filter(function(shape) {
45
48
 
46
49
  if (is(shape, 'bpmn:TextAnnotation')) {
47
50
  return false;
48
51
  }
49
52
 
50
- if (axis === 'y' && isCollapsedPool(shape)) {
51
- return false;
53
+ if (isCollapsedPool(shape)) {
54
+ if (axis === 'y' && isHorizontal(shape) || axis === 'x' && !isHorizontal(shape)) {
55
+ return false;
56
+ }
52
57
  }
53
58
 
54
59
  return true;
@@ -7,6 +7,7 @@ export type BpmnAttributes = {
7
7
  cancelActivity: boolean;
8
8
  eventDefinitionType: string;
9
9
  isExpanded: boolean;
10
+ isHorizontal: boolean;
10
11
  isForCompensation: boolean;
11
12
  isInterrupting: boolean;
12
13
  processRef: ModdleElement;
@@ -17,6 +17,7 @@ export type BpmnAttributes = {
17
17
  cancelActivity: boolean;
18
18
  eventDefinitionType: string;
19
19
  isExpanded: boolean;
20
+ isHorizontal: boolean;
20
21
  isForCompensation: boolean;
21
22
  isInterrupting: boolean;
22
23
  processRef: ModdleElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpmn-js",
3
- "version": "16.3.2",
3
+ "version": "16.5.0",
4
4
  "description": "A bpmn 2.0 toolkit and web modeler",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -97,7 +97,7 @@
97
97
  "karma-webpack": "^5.0.0",
98
98
  "mocha": "^10.1.0",
99
99
  "mocha-test-container-support": "0.2.0",
100
- "npm-run-all": "^4.1.2",
100
+ "npm-run-all2": "^5.0.0",
101
101
  "puppeteer": "^21.3.8",
102
102
  "remark-cli": "^12.0.0",
103
103
  "remark-preset-bpmn-io": "^0.2.1",