bpmn-js 13.0.3 → 13.0.5
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/dist/bpmn-modeler.development.js +475 -272
- package/dist/bpmn-modeler.production.min.js +34 -34
- package/dist/bpmn-navigated-viewer.development.js +226 -55
- package/dist/bpmn-navigated-viewer.production.min.js +2 -2
- package/dist/bpmn-viewer.development.js +147 -47
- package/dist/bpmn-viewer.production.min.js +2 -2
- package/lib/draw/BpmnRenderUtil.d.ts +2 -2
- package/lib/draw/BpmnRenderUtil.js +6 -6
- package/lib/draw/BpmnRenderer.d.ts +7 -5
- package/lib/draw/BpmnRenderer.js +5 -5
- package/lib/features/align-elements/dist/align-bottom-tool.svg +1 -0
- package/lib/features/align-elements/dist/align-horizontal-center-tool.svg +1 -0
- package/lib/features/align-elements/dist/align-left-tool.svg +1 -0
- package/lib/features/align-elements/dist/align-right-tool.svg +1 -0
- package/lib/features/align-elements/dist/align-tool.svg +1 -0
- package/lib/features/align-elements/dist/align-top-tool.svg +1 -0
- package/lib/features/align-elements/dist/align-vertical-center-tool.svg +1 -0
- package/lib/features/palette/dist/create.svg +1 -0
- package/lib/util/LabelUtil.d.ts +4 -5
- package/lib/util/LabelUtil.js +12 -7
- package/package.json +2 -2
|
@@ -44,7 +44,7 @@ export function getStrokeColor(element: any, defaultColor?: string): string;
|
|
|
44
44
|
*
|
|
45
45
|
* @return
|
|
46
46
|
*/
|
|
47
|
-
export function getLabelColor(element: any, defaultColor
|
|
47
|
+
export function getLabelColor(element: any, defaultColor?: string, defaultStrokeColor?: string): string;
|
|
48
48
|
/**
|
|
49
49
|
* @param shape
|
|
50
50
|
*
|
|
@@ -72,6 +72,6 @@ export function getDiamondPath(shape: any): string;
|
|
|
72
72
|
export function getRectPath(shape: any): string;
|
|
73
73
|
export const black: string;
|
|
74
74
|
export type ModdleElement = any;
|
|
75
|
-
export type
|
|
75
|
+
export type Element = any;
|
|
76
76
|
export type ShapeLike = any;
|
|
77
77
|
export { getDi, getBusinessObject as getSemantic } from "../util/ModelUtil";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @typedef {import('../model').ModdleElement} ModdleElement
|
|
16
|
-
* @typedef {import('../model').
|
|
16
|
+
* @typedef {import('../model').Element} Element
|
|
17
17
|
*
|
|
18
18
|
* @typedef {import('../model').ShapeLike} ShapeLike
|
|
19
19
|
*/
|
|
@@ -71,7 +71,7 @@ export function isCollection(element) {
|
|
|
71
71
|
// color access //////////////////////
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
|
-
* @param {
|
|
74
|
+
* @param {Element} element
|
|
75
75
|
* @param {string} [defaultColor]
|
|
76
76
|
*
|
|
77
77
|
* @return {string}
|
|
@@ -83,7 +83,7 @@ export function getFillColor(element, defaultColor) {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
|
-
* @param {
|
|
86
|
+
* @param {Element} element
|
|
87
87
|
* @param {string} [defaultColor]
|
|
88
88
|
*
|
|
89
89
|
* @return {string}
|
|
@@ -95,9 +95,9 @@ export function getStrokeColor(element, defaultColor) {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
|
-
* @param {
|
|
99
|
-
* @param {string} defaultColor
|
|
100
|
-
* @param {string} defaultStrokeColor
|
|
98
|
+
* @param {Element} element
|
|
99
|
+
* @param {string} [defaultColor]
|
|
100
|
+
* @param {string} [defaultStrokeColor]
|
|
101
101
|
*
|
|
102
102
|
* @return {string}
|
|
103
103
|
*/
|
|
@@ -84,7 +84,7 @@ export default class BpmnRenderer extends BaseRenderer {
|
|
|
84
84
|
*
|
|
85
85
|
* @return
|
|
86
86
|
*/
|
|
87
|
-
canRender(element:
|
|
87
|
+
canRender(element: Element): boolean;
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
90
|
* Draw shape into parentGfx.
|
|
@@ -94,7 +94,7 @@ export default class BpmnRenderer extends BaseRenderer {
|
|
|
94
94
|
*
|
|
95
95
|
* @return mainGfx
|
|
96
96
|
*/
|
|
97
|
-
drawShape(parentGfx: SVGElement, element:
|
|
97
|
+
drawShape(parentGfx: SVGElement, element: Element): SVGElement;
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
100
|
* Draw connection into parentGfx.
|
|
@@ -104,7 +104,7 @@ export default class BpmnRenderer extends BaseRenderer {
|
|
|
104
104
|
*
|
|
105
105
|
* @return mainGfx
|
|
106
106
|
*/
|
|
107
|
-
drawConnection(parentGfx: SVGElement, element:
|
|
107
|
+
drawConnection(parentGfx: SVGElement, element: Element): SVGElement;
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
110
|
* Get shape path.
|
|
@@ -113,12 +113,14 @@ export default class BpmnRenderer extends BaseRenderer {
|
|
|
113
113
|
*
|
|
114
114
|
* @return path
|
|
115
115
|
*/
|
|
116
|
-
getShapePath(element:
|
|
116
|
+
getShapePath(element: Element): string;
|
|
117
117
|
}
|
|
118
|
+
|
|
118
119
|
export type BpmnRendererConfig = Partial<{
|
|
119
120
|
defaultFillColor: string;
|
|
120
121
|
defaultStrokeColor: string;
|
|
121
122
|
defaultLabelColor: string;
|
|
122
123
|
}>;
|
|
123
|
-
|
|
124
|
+
|
|
125
|
+
type Element = import('../model/Types').Element;
|
|
124
126
|
import BaseRenderer from 'diagram-js/lib/draw/BaseRenderer';
|
package/lib/draw/BpmnRenderer.js
CHANGED
|
@@ -78,7 +78,7 @@ var ELEMENT_LABEL_DISTANCE = 10;
|
|
|
78
78
|
*/
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
|
-
* @typedef { import('../model').
|
|
81
|
+
* @typedef { import('../model/Types').Element } Element
|
|
82
82
|
*/
|
|
83
83
|
|
|
84
84
|
/**
|
|
@@ -1919,7 +1919,7 @@ BpmnRenderer.$inject = [
|
|
|
1919
1919
|
|
|
1920
1920
|
|
|
1921
1921
|
/**
|
|
1922
|
-
* @param {
|
|
1922
|
+
* @param {Element} element
|
|
1923
1923
|
*
|
|
1924
1924
|
* @return {boolean}
|
|
1925
1925
|
*/
|
|
@@ -1931,7 +1931,7 @@ BpmnRenderer.prototype.canRender = function(element) {
|
|
|
1931
1931
|
* Draw shape into parentGfx.
|
|
1932
1932
|
*
|
|
1933
1933
|
* @param {SVGElement} parentGfx
|
|
1934
|
-
* @param {
|
|
1934
|
+
* @param {Element} element
|
|
1935
1935
|
*
|
|
1936
1936
|
* @return {SVGElement} mainGfx
|
|
1937
1937
|
*/
|
|
@@ -1947,7 +1947,7 @@ BpmnRenderer.prototype.drawShape = function(parentGfx, element) {
|
|
|
1947
1947
|
* Draw connection into parentGfx.
|
|
1948
1948
|
*
|
|
1949
1949
|
* @param {SVGElement} parentGfx
|
|
1950
|
-
* @param {
|
|
1950
|
+
* @param {Element} element
|
|
1951
1951
|
*
|
|
1952
1952
|
* @return {SVGElement} mainGfx
|
|
1953
1953
|
*/
|
|
@@ -1962,7 +1962,7 @@ BpmnRenderer.prototype.drawConnection = function(parentGfx, element) {
|
|
|
1962
1962
|
/**
|
|
1963
1963
|
* Get shape path.
|
|
1964
1964
|
*
|
|
1965
|
-
* @param {
|
|
1965
|
+
* @param {Element} element
|
|
1966
1966
|
*
|
|
1967
1967
|
* @return {string} path
|
|
1968
1968
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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
|
package/lib/util/LabelUtil.d.ts
CHANGED
|
@@ -64,17 +64,17 @@ export function isLabel(element: Element): boolean;
|
|
|
64
64
|
/**
|
|
65
65
|
* @param element
|
|
66
66
|
*
|
|
67
|
-
* @return
|
|
67
|
+
* @return
|
|
68
68
|
*/
|
|
69
|
-
export function getLabel(element:
|
|
69
|
+
export function getLabel(element: Element): string;
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
* @param element
|
|
73
73
|
* @param text
|
|
74
74
|
*
|
|
75
|
-
* @return
|
|
75
|
+
* @return
|
|
76
76
|
*/
|
|
77
|
-
export function setLabel(element:
|
|
77
|
+
export function setLabel(element: Element, text: string): Element;
|
|
78
78
|
|
|
79
79
|
export namespace DEFAULT_LABEL_SIZE {
|
|
80
80
|
const width: number;
|
|
@@ -82,7 +82,6 @@ export namespace DEFAULT_LABEL_SIZE {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
export const FLOW_LABEL_INDENT: number;
|
|
85
|
-
export type DiagramElement = any;
|
|
86
85
|
type Point = import('diagram-js/lib/util/Types').Point;
|
|
87
86
|
type Rect = import('diagram-js/lib/util/Types').Rect;
|
|
88
87
|
type Element = import('../model/Types').Element;
|
package/lib/util/LabelUtil.js
CHANGED
|
@@ -179,11 +179,11 @@ export function isLabel(element) {
|
|
|
179
179
|
return element && !!element.labelTarget;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
|
|
183
182
|
/**
|
|
184
|
-
* @
|
|
183
|
+
* @param {ModdleElement} semantic
|
|
184
|
+
*
|
|
185
|
+
* @returns {string}
|
|
185
186
|
*/
|
|
186
|
-
|
|
187
187
|
function getLabelAttr(semantic) {
|
|
188
188
|
if (
|
|
189
189
|
is(semantic, 'bpmn:FlowElement') ||
|
|
@@ -206,6 +206,11 @@ function getLabelAttr(semantic) {
|
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
+
/**
|
|
210
|
+
* @param {ModdleElement} semantic
|
|
211
|
+
*
|
|
212
|
+
* @returns {string}
|
|
213
|
+
*/
|
|
209
214
|
function getCategoryValue(semantic) {
|
|
210
215
|
var categoryValueRef = semantic['categoryValueRef'];
|
|
211
216
|
|
|
@@ -218,9 +223,9 @@ function getCategoryValue(semantic) {
|
|
|
218
223
|
}
|
|
219
224
|
|
|
220
225
|
/**
|
|
221
|
-
* @param {
|
|
226
|
+
* @param {Element} element
|
|
222
227
|
*
|
|
223
|
-
* @return {string}
|
|
228
|
+
* @return {string}
|
|
224
229
|
*/
|
|
225
230
|
export function getLabel(element) {
|
|
226
231
|
var semantic = element.businessObject,
|
|
@@ -239,10 +244,10 @@ export function getLabel(element) {
|
|
|
239
244
|
|
|
240
245
|
|
|
241
246
|
/**
|
|
242
|
-
* @param {
|
|
247
|
+
* @param {Element} element
|
|
243
248
|
* @param {string} text
|
|
244
249
|
*
|
|
245
|
-
* @return {
|
|
250
|
+
* @return {Element}
|
|
246
251
|
*/
|
|
247
252
|
export function setLabel(element, text) {
|
|
248
253
|
var semantic = element.businessObject,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpmn-js",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.5",
|
|
4
4
|
"description": "A bpmn 2.0 toolkit and web modeler",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
},
|
|
109
109
|
"dependencies": {
|
|
110
110
|
"bpmn-moddle": "^8.0.0",
|
|
111
|
-
"diagram-js": "^12.0
|
|
111
|
+
"diagram-js": "^12.1.0",
|
|
112
112
|
"diagram-js-direct-editing": "^2.0.0",
|
|
113
113
|
"ids": "^1.0.0",
|
|
114
114
|
"inherits-browser": "^0.1.0",
|