bpmn-js 13.0.5 → 13.0.7

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.
@@ -13,6 +13,8 @@ import {
13
13
  getConnectedDistance
14
14
  } from 'diagram-js/lib/features/auto-place/AutoPlaceUtil';
15
15
 
16
+ import { isConnection } from 'diagram-js/lib/util/ModelUtil';
17
+
16
18
  /**
17
19
  * @typedef {import('../../model/Types').Shape} Shape
18
20
  *
@@ -169,8 +171,4 @@ export function getDataElementPosition(source, element) {
169
171
  };
170
172
 
171
173
  return findFreePosition(source, element, position, generateGetNextPosition(nextPositionDirection));
172
- }
173
-
174
- function isConnection(element) {
175
- return !!element.waypoints;
176
174
  }
@@ -190,4 +190,4 @@ BpmnCopyPaste.$inject = [
190
190
  'bpmnFactory',
191
191
  'eventBus',
192
192
  'moddleCopy'
193
- ];
193
+ ];
@@ -15,6 +15,8 @@ import {
15
15
 
16
16
  import { asTRBL } from 'diagram-js/lib/layout/LayoutUtil';
17
17
 
18
+ import { isConnection } from 'diagram-js/lib/util/ModelUtil';
19
+
18
20
  /**
19
21
  * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
20
22
  * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
@@ -229,10 +231,6 @@ function getParticipantCreateConstraints(shape, childrenBBox) {
229
231
  };
230
232
  }
231
233
 
232
- function isConnection(element) {
233
- return !!element.waypoints;
234
- }
235
-
236
234
  function findParticipant(elements) {
237
235
  return find(elements, function(element) {
238
236
  return is(element, 'bpmn:Participant');
@@ -14,6 +14,8 @@ import {
14
14
  isLabel
15
15
  } from '../../../util/LabelUtil';
16
16
 
17
+ import { isConnection } from 'diagram-js/lib/util/ModelUtil';
18
+
17
19
  /**
18
20
  * @typedef {import('diagram-js/lib/command/CommandHandler').default} CommandHandler
19
21
  *
@@ -144,10 +146,6 @@ function colorToHex(color) {
144
146
  return /^#[0-9a-fA-F]{6}$/.test(context.fillStyle) ? context.fillStyle : null;
145
147
  }
146
148
 
147
- function isConnection(element) {
148
- return !!element.waypoints;
149
- }
150
-
151
149
  /**
152
150
  * Add legacy properties if required.
153
151
  *
@@ -36,6 +36,8 @@ import {
36
36
  getBoundaryAttachment as isBoundaryAttachment
37
37
  } from '../snapping/BpmnSnappingUtil';
38
38
 
39
+ import { isConnection } from 'diagram-js/lib/util/ModelUtil';
40
+
39
41
  /**
40
42
  * @typedef {import('diagram-js/lib/core/EventBus').default} EventBus
41
43
  *
@@ -486,15 +488,6 @@ function isEventBasedTarget(element) {
486
488
  );
487
489
  }
488
490
 
489
- /**
490
- * @param {Element} element
491
- *
492
- * @return {boolean}
493
- */
494
- function isConnection(element) {
495
- return element.waypoints;
496
- }
497
-
498
491
  /**
499
492
  * @param {Element} element
500
493
  *
@@ -54,13 +54,6 @@ export function getExternalLabelMid(element: Element): Point;
54
54
  */
55
55
  export function getExternalLabelBounds(di: ModdleElement, element: Element): Rect;
56
56
 
57
- /**
58
- * @param element
59
- *
60
- * @return
61
- */
62
- export function isLabel(element: Element): boolean;
63
-
64
57
  /**
65
58
  * @param element
66
59
  *
@@ -76,6 +69,8 @@ export function getLabel(element: Element): string;
76
69
  */
77
70
  export function setLabel(element: Element, text: string): Element;
78
71
 
72
+ export { isLabel } from "diagram-js/lib/util/ModelUtil";
73
+
79
74
  export namespace DEFAULT_LABEL_SIZE {
80
75
  const width: number;
81
76
  const height: number;
@@ -4,6 +4,10 @@ import {
4
4
 
5
5
  import { is } from './ModelUtil';
6
6
 
7
+ import { isLabel } from 'diagram-js/lib/util/ModelUtil';
8
+
9
+ export { isLabel } from 'diagram-js/lib/util/ModelUtil';
10
+
7
11
  /**
8
12
  * @typedef {import('diagram-js/lib/util/Types').Point} Point
9
13
  * @typedef {import('diagram-js/lib/util/Types').Rect} Rect
@@ -170,15 +174,6 @@ export function getExternalLabelBounds(di, element) {
170
174
  }, size);
171
175
  }
172
176
 
173
- /**
174
- * @param {Element} element
175
- *
176
- * @return {boolean}
177
- */
178
- export function isLabel(element) {
179
- return element && !!element.labelTarget;
180
- }
181
-
182
177
  /**
183
178
  * @param {ModdleElement} semantic
184
179
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpmn-js",
3
- "version": "13.0.5",
3
+ "version": "13.0.7",
4
4
  "description": "A bpmn 2.0 toolkit and web modeler",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -61,7 +61,7 @@
61
61
  ],
62
62
  "devDependencies": {
63
63
  "@babel/core": "^7.20.2",
64
- "@rollup/plugin-commonjs": "^24.0.1",
64
+ "@rollup/plugin-commonjs": "^25.0.0",
65
65
  "@rollup/plugin-json": "^6.0.0",
66
66
  "@rollup/plugin-node-resolve": "^15.0.1",
67
67
  "@rollup/plugin-replace": "^5.0.2",
@@ -95,7 +95,7 @@
95
95
  "mocha": "^10.1.0",
96
96
  "mocha-test-container-support": "0.2.0",
97
97
  "npm-run-all": "^4.1.2",
98
- "puppeteer": "^19.4.1",
98
+ "puppeteer": "^20.0.0",
99
99
  "remark-cli": "^11.0.0",
100
100
  "remark-preset-bpmn-io": "^0.2.1",
101
101
  "rollup": "^3.19.1",
@@ -1 +0,0 @@
1
- data:image/svg+xml,data%3Aimage%2Fsvg%2Bxml%2C%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520viewBox%253D%25220%25200%25201800%25201800%2522%253E%253Cpath%2520d%253D%2522M150%25201650h1500%2522%2520style%253D%2522stroke%253AcurrentColor%253Bstroke-width%253A100%253Bstroke-linecap%253Around%2522%252F%253E%253Crect%2520width%253D%2522600%2522%2520height%253D%25221300%2522%2520x%253D%2522150%2522%2520y%253D%2522350%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253Anone%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%2522%252F%253E%253Crect%2520width%253D%2522600%2522%2520height%253D%2522800%2522%2520x%253D%25221050%2522%2520y%253D%2522850%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253AcurrentColor%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%253Bopacity%253A.5%2522%252F%253E%253C%252Fsvg%253E
@@ -1 +0,0 @@
1
- data:image/svg+xml,data%3Aimage%2Fsvg%2Bxml%2C%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520viewBox%253D%25220%25200%25201800%25201800%2522%253E%253Cpath%2520d%253D%2522M900%2520150v1500%2522%2520style%253D%2522stroke%253AcurrentColor%253Bstroke-width%253A100%253Bstroke-linecap%253Around%2522%252F%253E%253Crect%2520width%253D%25221300%2522%2520height%253D%2522600%2522%2520x%253D%2522250%2522%2520y%253D%2522150%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253Anone%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%2522%252F%253E%253Crect%2520width%253D%2522800%2522%2520height%253D%2522600%2522%2520x%253D%2522500%2522%2520y%253D%25221050%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253AcurrentColor%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%253Bopacity%253A.5%2522%252F%253E%253C%252Fsvg%253E
@@ -1 +0,0 @@
1
- data:image/svg+xml,data%3Aimage%2Fsvg%2Bxml%2C%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520viewBox%253D%25220%25200%25201800%25201800%2522%253E%253Cpath%2520d%253D%2522M100%2520150v1500%2522%2520style%253D%2522stroke%253AcurrentColor%253Bstroke-width%253A100%253Bstroke-linecap%253Around%2522%252F%253E%253Crect%2520width%253D%25221300%2522%2520height%253D%2522600%2522%2520x%253D%2522100%2522%2520y%253D%2522150%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253Anone%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%2522%252F%253E%253Crect%2520width%253D%2522800%2522%2520height%253D%2522600%2522%2520x%253D%2522100%2522%2520y%253D%25221050%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253AcurrentColor%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%253Bopacity%253A.5%2522%252F%253E%253C%252Fsvg%253E
@@ -1 +0,0 @@
1
- data:image/svg+xml,data%3Aimage%2Fsvg%2Bxml%2C%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520viewBox%253D%25220%25200%25201800%25201800%2522%253E%253Cpath%2520d%253D%2522M1650%2520150v1500%2522%2520style%253D%2522stroke%253AcurrentColor%253Bstroke-width%253A100%253Bstroke-linecap%253Around%2522%252F%253E%253Crect%2520width%253D%25221300%2522%2520height%253D%2522600%2522%2520x%253D%2522350%2522%2520y%253D%2522150%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253Anone%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%2522%252F%253E%253Crect%2520width%253D%2522800%2522%2520height%253D%2522600%2522%2520x%253D%2522850%2522%2520y%253D%25221050%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253AcurrentColor%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%253Bopacity%253A.5%2522%252F%253E%253C%252Fsvg%253E
@@ -1 +0,0 @@
1
- data:image/svg+xml,data%3Aimage%2Fsvg%2Bxml%2C%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520viewBox%253D%25220%25200%25202000%25202000%2522%253E%253Cpath%2520d%253D%2522M200%2520150v1700%2522%2520style%253D%2522stroke%253AcurrentColor%253Bstroke-width%253A100%253Bstroke-linecap%253Around%2522%252F%253E%253Crect%2520width%253D%25221300%2522%2520height%253D%2522700%2522%2520x%253D%2522500%2522%2520y%253D%2522150%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253Anone%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%2522%252F%253E%253Crect%2520width%253D%2522700%2522%2520height%253D%2522700%2522%2520x%253D%2522500%2522%2520y%253D%25221150%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253AcurrentColor%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%253Bopacity%253A.5%2522%252F%253E%253C%252Fsvg%253E
@@ -1 +0,0 @@
1
- data:image/svg+xml,data%3Aimage%2Fsvg%2Bxml%2C%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520viewBox%253D%25220%25200%25201800%25201800%2522%253E%253Cpath%2520d%253D%2522M150%2520150h1500%2522%2520style%253D%2522stroke%253AcurrentColor%253Bstroke-width%253A100%253Bstroke-linecap%253Around%2522%252F%253E%253Crect%2520width%253D%2522600%2522%2520height%253D%25221300%2522%2520x%253D%2522150%2522%2520y%253D%2522150%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253Anone%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%2522%252F%253E%253Crect%2520width%253D%2522600%2522%2520height%253D%2522800%2522%2520x%253D%25221050%2522%2520y%253D%2522150%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253AcurrentColor%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%253Bopacity%253A.5%2522%252F%253E%253C%252Fsvg%253E
@@ -1 +0,0 @@
1
- data:image/svg+xml,data%3Aimage%2Fsvg%2Bxml%2C%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520viewBox%253D%25220%25200%25201800%25201800%2522%253E%253Cpath%2520d%253D%2522M150%2520900h1500%2522%2520style%253D%2522stroke%253AcurrentColor%253Bstroke-width%253A100%253Bstroke-linecap%253Around%2522%252F%253E%253Crect%2520width%253D%2522600%2522%2520height%253D%25221300%2522%2520x%253D%2522150%2522%2520y%253D%2522250%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253Anone%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%2522%252F%253E%253Crect%2520width%253D%2522600%2522%2520height%253D%2522800%2522%2520x%253D%25221050%2522%2520y%253D%2522500%2522%2520rx%253D%25221%2522%2520style%253D%2522fill%253AcurrentColor%253Bstroke%253AcurrentColor%253Bstroke-width%253A100%253Bopacity%253A.5%2522%252F%253E%253C%252Fsvg%253E
@@ -1 +0,0 @@
1
- data:image/svg+xml,data%3Aimage%2Fsvg%2Bxml%2C%253Csvg%2520xmlns%253D%2522http%253A%252F%252Fwww.w3.org%252F2000%252Fsvg%2522%2520width%253D%252246%2522%2520height%253D%252246%2522%2520viewBox%253D%2522-2%2520-2%25209.82%25209.82%2522%253E%253Cpath%2520d%253D%2522M1.3%25203.4c.3%25200%2520.5-.2.5-.5s-.2-.4-.5-.4c-.2%25200-.4.1-.4.4%25200%2520.3.2.5.4.5zm1.7%25200c.2%25200%2520.4-.2.4-.5s-.2-.4-.4-.4c-.3%25200-.5.1-.5.4%25200%2520.3.2.5.5.5zm1.6%25200c.2%25200%2520.4-.2.4-.5s-.2-.4-.4-.4c-.3%25200-.5.1-.5.4%25200%2520.3.2.5.5.5z%2522%252F%253E%253C%252Fsvg%253E