@operato/scene-bpmn 9.1.1 → 10.0.0-beta.2
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/base/bpmn-container-base.d.ts +229 -4
- package/dist/base/bpmn-container-base.js +1 -1
- package/dist/base/bpmn-container-base.js.map +1 -1
- package/dist/base/bpmn-control-base.d.ts +466 -5
- package/dist/base/bpmn-control-base.js +1 -1
- package/dist/base/bpmn-control-base.js.map +1 -1
- package/dist/bpmn-data-object.js +5 -3
- package/dist/bpmn-data-object.js.map +1 -1
- package/dist/bpmn-data-store.js +3 -3
- package/dist/bpmn-data-store.js.map +1 -1
- package/dist/bpmn-event.js +4 -3
- package/dist/bpmn-event.js.map +1 -1
- package/dist/bpmn-flow.js.map +1 -1
- package/dist/bpmn-gateway.js +4 -3
- package/dist/bpmn-gateway.js.map +1 -1
- package/dist/bpmn-lane.js +5 -4
- package/dist/bpmn-lane.js.map +1 -1
- package/dist/bpmn-message.js +3 -3
- package/dist/bpmn-message.js.map +1 -1
- package/dist/bpmn-subprocess.js +1 -0
- package/dist/bpmn-subprocess.js.map +1 -1
- package/dist/bpmn-task.js +2 -0
- package/dist/bpmn-task.js.map +1 -1
- package/package.json +12 -12
|
@@ -24,10 +24,235 @@ export type NODE = {
|
|
|
24
24
|
multiplicity?: number;
|
|
25
25
|
};
|
|
26
26
|
declare const BPMNContainerBase_base: (new (...args: any[]) => {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
isConnectable(): boolean;
|
|
28
|
+
postrender(context: any): void;
|
|
29
|
+
_draw_anchors(context: any): void;
|
|
30
|
+
contains(x: number, y: number): boolean;
|
|
31
|
+
findInOutLines(anchorName: string): any;
|
|
32
|
+
findOutletLines(anchorName: string): any;
|
|
33
|
+
findOutletEnds(anchorName: string): any;
|
|
34
|
+
findInletLines(anchorName: string): any;
|
|
35
|
+
findInletEnds(anchorName: string): any;
|
|
36
|
+
_app: any;
|
|
37
|
+
_model: any;
|
|
38
|
+
_state: any;
|
|
39
|
+
_delta: any;
|
|
40
|
+
_animation: any;
|
|
41
|
+
_animate: any;
|
|
42
|
+
_parent: any;
|
|
43
|
+
_disposed: any;
|
|
44
|
+
_textHidden: any;
|
|
45
|
+
_text_substitutor: any;
|
|
46
|
+
_value_substitutor: any;
|
|
47
|
+
_mappings: any;
|
|
48
|
+
_realObject: import("@hatiolab/things-scene").IRealObject | undefined;
|
|
49
|
+
_cachedState: any;
|
|
50
|
+
updatedAt: any;
|
|
51
|
+
fontSize: any;
|
|
52
|
+
__cache__: any;
|
|
53
|
+
created(): void;
|
|
54
|
+
added(parent: any): void;
|
|
55
|
+
removed(parent: any): void;
|
|
56
|
+
ready(): Promise<void>;
|
|
57
|
+
touch(): void;
|
|
58
|
+
clearCache(...attrs: any[]): void;
|
|
59
|
+
removeSelf(completely: any): void;
|
|
60
|
+
resetAnimation(): void;
|
|
61
|
+
dispose(): void;
|
|
62
|
+
get nature(): import("@hatiolab/things-scene").ComponentNature;
|
|
63
|
+
get disposed(): boolean;
|
|
64
|
+
isLayer(): boolean;
|
|
65
|
+
isGroup(): boolean;
|
|
66
|
+
isContainer(): this is import("@hatiolab/things-scene/dist-types/types/component").Container;
|
|
67
|
+
isLine(): boolean;
|
|
68
|
+
isRoot(): boolean;
|
|
69
|
+
isRootModel(): boolean;
|
|
70
|
+
is3dish(): boolean;
|
|
71
|
+
get is3dMode(): boolean;
|
|
72
|
+
isIn3DSpace(): boolean;
|
|
73
|
+
isTemplate(): boolean;
|
|
74
|
+
isHTMLElement(): boolean;
|
|
75
|
+
isIdentifiable(): boolean;
|
|
76
|
+
isPositionable(): boolean;
|
|
77
|
+
replaceRefids(replaceMap: any): void;
|
|
78
|
+
get(property: any): any;
|
|
79
|
+
set(props: any, propval?: any): any;
|
|
80
|
+
getState(property: any): any;
|
|
81
|
+
setState(props: any, propval?: any): any;
|
|
82
|
+
get model(): any;
|
|
83
|
+
get state(): any;
|
|
84
|
+
get hierarchy(): any;
|
|
85
|
+
get volatile(): never[];
|
|
86
|
+
_applyProps(target: any, props: any, options: any): any;
|
|
87
|
+
move(offset: {
|
|
88
|
+
x: number;
|
|
89
|
+
y: number;
|
|
90
|
+
}, ...args: boolean[]): void;
|
|
91
|
+
symmetryX(x?: number): void;
|
|
92
|
+
symmetryY(y: number): void;
|
|
93
|
+
adjustResize(bounds: import("@hatiolab/things-scene").BOUNDS, origin_bounds: import("@hatiolab/things-scene").BOUNDS, diagonal: boolean): {
|
|
94
|
+
left: any;
|
|
95
|
+
top: any;
|
|
96
|
+
width: any;
|
|
97
|
+
height: any;
|
|
98
|
+
};
|
|
99
|
+
adjustRotation(rotation: number, step: boolean): number;
|
|
100
|
+
outline(progress: number): any;
|
|
101
|
+
get bounds(): import("@hatiolab/things-scene").BOUNDS;
|
|
102
|
+
set bounds(b: import("@hatiolab/things-scene").BOUNDS): any;
|
|
103
|
+
get center(): import("@hatiolab/things-scene").POINT;
|
|
104
|
+
set center(p: import("@hatiolab/things-scene").POINT): any;
|
|
105
|
+
get location(): import("@hatiolab/things-scene").POINT;
|
|
106
|
+
set location(l: import("@hatiolab/things-scene").POINT): any;
|
|
107
|
+
get rotate(): import("@hatiolab/things-scene").POINT;
|
|
108
|
+
set rotate(r: import("@hatiolab/things-scene").POINT): any;
|
|
109
|
+
get dimension(): import("@hatiolab/things-scene").DIMENSION;
|
|
110
|
+
set dimension(d: import("@hatiolab/things-scene").DIMENSION): any;
|
|
111
|
+
get path(): import("@hatiolab/things-scene").POINT[];
|
|
112
|
+
set path(p: import("@hatiolab/things-scene").POINT[]): any;
|
|
113
|
+
get drawPath(): import("@hatiolab/things-scene").POINT[];
|
|
114
|
+
get rotatePoint(): import("@hatiolab/things-scene").POINT;
|
|
115
|
+
get mutable(): boolean;
|
|
116
|
+
get resizable(): boolean;
|
|
117
|
+
get rotatable(): boolean;
|
|
118
|
+
buildRealObject(): import("@hatiolab/things-scene").IRealObject | undefined;
|
|
119
|
+
get realObject(): import("@hatiolab/things-scene").IRealObject | undefined;
|
|
120
|
+
draw(context?: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
121
|
+
prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
122
|
+
render(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
123
|
+
prepare(resolve: (component: import("@hatiolab/things-scene").Component) => void, reject: (reason: any) => void): void;
|
|
124
|
+
prepareIf(condition: boolean): void;
|
|
125
|
+
drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
126
|
+
drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
127
|
+
drawFill(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
128
|
+
get strokeStyle(): any;
|
|
129
|
+
set strokeStyle(v: any): any;
|
|
130
|
+
get fillStyle(): any;
|
|
131
|
+
set fillStyle(v: any): any;
|
|
132
|
+
get fontColor(): string;
|
|
133
|
+
set fontColor(v: string): any;
|
|
134
|
+
get rotation(): number;
|
|
135
|
+
set rotation(v: number): any;
|
|
136
|
+
get decorators(): string[];
|
|
137
|
+
get decotag(): string;
|
|
138
|
+
get hidden(): boolean;
|
|
139
|
+
set hidden(v: boolean): any;
|
|
140
|
+
get tag(): string;
|
|
141
|
+
set tag(v: string): any;
|
|
142
|
+
get appendum(): any;
|
|
143
|
+
set appendum(v: any): any;
|
|
144
|
+
defaultTextSubstitutor(): string;
|
|
145
|
+
textLines(context?: import("@hatiolab/things-scene").SceneRenderContext): any[][];
|
|
146
|
+
get font(): string;
|
|
147
|
+
get lineHeight(): number;
|
|
148
|
+
get textSubstitutor(): () => string;
|
|
149
|
+
get text(): string;
|
|
150
|
+
set text(v: string): any;
|
|
151
|
+
get textBounds(): import("@hatiolab/things-scene").BOUNDS;
|
|
152
|
+
get textRotation(): number;
|
|
153
|
+
get textHidden(): boolean;
|
|
154
|
+
set textHidden(v: boolean): any;
|
|
155
|
+
get hasTextProperty(): boolean;
|
|
156
|
+
animate(opts: import("@hatiolab/things-scene").AnimationConfig): any;
|
|
157
|
+
effect(context: import("@hatiolab/things-scene").SceneRenderContext, model: any): void;
|
|
158
|
+
serialize(...others: any[]): string;
|
|
159
|
+
trim(): void;
|
|
160
|
+
closeScene(data: any): void;
|
|
161
|
+
delta(attr?: string | object, value?: any): any;
|
|
162
|
+
invalidate(): void;
|
|
163
|
+
get value(): any;
|
|
164
|
+
set value(v: any): any;
|
|
165
|
+
get data(): any;
|
|
166
|
+
set data(v: any): any;
|
|
167
|
+
set tap(v: any): any;
|
|
168
|
+
get mappings(): any[];
|
|
169
|
+
get retention(): number;
|
|
170
|
+
get animation(): import("@hatiolab/things-scene").AnimationController | undefined;
|
|
171
|
+
get started(): boolean;
|
|
172
|
+
set started(v: boolean): any;
|
|
173
|
+
get controls(): import("@hatiolab/things-scene").Control[] | undefined;
|
|
174
|
+
findFirst(finder: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): import("@hatiolab/things-scene").Component | undefined;
|
|
175
|
+
findAll(s: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): any[] | undefined;
|
|
176
|
+
capture(x: number, y: number, except?: (c: import("@hatiolab/things-scene").Component) => boolean): any;
|
|
177
|
+
findAnchor(name: string): any;
|
|
178
|
+
isDescendible(container: import("@hatiolab/things-scene").Component): boolean;
|
|
179
|
+
getContext(component?: unknown): any;
|
|
180
|
+
get root(): import("@hatiolab/things-scene").Component;
|
|
181
|
+
get rootModel(): import("@hatiolab/things-scene").Component;
|
|
182
|
+
get parent(): import("@hatiolab/things-scene").Component;
|
|
183
|
+
set parent(v: import("@hatiolab/things-scene").Component): any;
|
|
184
|
+
get anchors(): import("@hatiolab/things-scene").Anchor[];
|
|
185
|
+
get scalable(): boolean;
|
|
186
|
+
get stuck(): boolean;
|
|
187
|
+
get capturable(): boolean;
|
|
188
|
+
get position(): string;
|
|
189
|
+
get origin(): string;
|
|
190
|
+
get offset(): import("@hatiolab/things-scene").POINT;
|
|
191
|
+
get app(): import("@hatiolab/things-scene").ApplicationContext;
|
|
192
|
+
drawEffect(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
193
|
+
prepareFill(resolve: Function, reject: Function): void;
|
|
194
|
+
prepareFillIf(condition: boolean): void;
|
|
195
|
+
onchangeFill(after: Record<string, any>, before: Record<string, any>): void;
|
|
196
|
+
drawImage(context: import("@hatiolab/things-scene").SceneRenderContext, image: HTMLImageElement, left: number, top: number, width: number, height: number): void;
|
|
197
|
+
mutateBounds(logic: ((bounds: import("@hatiolab/things-scene").BOUNDS) => import("@hatiolab/things-scene").BOUNDS | void) | null, context?: any): void;
|
|
198
|
+
mutatePath(beforeLogic: ((path: import("@hatiolab/things-scene").POINT[]) => import("@hatiolab/things-scene").POINT[] | void) | null, afterLogic: ((path: import("@hatiolab/things-scene").POINT[]) => import("@hatiolab/things-scene").POINT[] | void) | null, context?: any): void;
|
|
199
|
+
access(accessor: string): any;
|
|
200
|
+
substitute(template: string, data: any): string | undefined;
|
|
201
|
+
onchangeMappings(after: Record<string, any>, before: Record<string, any>): void;
|
|
202
|
+
onchangeData(after: Record<string, any>, before: Record<string, any>): void;
|
|
203
|
+
buildMappings(): void;
|
|
204
|
+
executeMappings(force?: boolean): void;
|
|
205
|
+
disposeMappings(): void;
|
|
206
|
+
ondropfile(transfered: FileList, files: string[]): void;
|
|
207
|
+
transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
208
|
+
transcoordP2S(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
209
|
+
transcoordS2T(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
210
|
+
transcoordT2P(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
211
|
+
transcoordT2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
212
|
+
transcoordS2TR(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
213
|
+
transcoordS2O(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
214
|
+
transcoordC2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
215
|
+
transcoordS2C(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
216
|
+
toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
217
|
+
fromParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
218
|
+
toScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
219
|
+
fromScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
220
|
+
toLocal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
221
|
+
toGlobal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
222
|
+
toOther(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
223
|
+
on(name: string | object, callback: Function, context?: any): any;
|
|
224
|
+
off(name?: string | object, callback?: Function, context?: any): any;
|
|
225
|
+
once(name: string | object, callback: Function, context?: any): any;
|
|
226
|
+
trigger(name: string, ...args: any[]): any;
|
|
227
|
+
delegate_on(delegator: any): any;
|
|
228
|
+
delegate_off(delegator: any): any;
|
|
229
|
+
onchange(after: Record<string, any>, before: Record<string, any>): void;
|
|
230
|
+
calculateBounds?(): void;
|
|
231
|
+
oncreate_element?(element: HTMLElement): void;
|
|
232
|
+
removeComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
233
|
+
addComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
234
|
+
insertComponentAt(component: import("@hatiolab/things-scene").Component, index: number, ghost?: boolean): void;
|
|
235
|
+
getOverlay(component: import("@hatiolab/things-scene").Component): HTMLElement | undefined;
|
|
236
|
+
findById(id: string): import("@hatiolab/things-scene").Component | undefined;
|
|
237
|
+
findByRefid(ref: string | number): import("@hatiolab/things-scene").Component | undefined;
|
|
238
|
+
findAllById(id: string): import("@hatiolab/things-scene").Component[];
|
|
239
|
+
resize(): void;
|
|
240
|
+
fit(type?: string): void;
|
|
241
|
+
get components(): import("@hatiolab/things-scene").Component[] | undefined;
|
|
242
|
+
get layout(): any;
|
|
243
|
+
get auxOverlay(): HTMLElement | undefined;
|
|
244
|
+
get isReady(): boolean;
|
|
245
|
+
get unitScale(): number;
|
|
246
|
+
get selected(): import("@hatiolab/things-scene").Component[];
|
|
247
|
+
set selected(_v: import("@hatiolab/things-scene").Component[]): any;
|
|
248
|
+
get focused(): import("@hatiolab/things-scene").Component | null;
|
|
249
|
+
set focused(_v: import("@hatiolab/things-scene").Component | null): any;
|
|
250
|
+
get hasSameParentForAllSelected(): boolean;
|
|
251
|
+
set hasSameParentForAllSelected(_v: boolean): any;
|
|
252
|
+
get fitMode(): string | undefined;
|
|
253
|
+
set fitMode(_v: string | undefined): any;
|
|
254
|
+
get element(): HTMLElement | null;
|
|
255
|
+
set element(_v: HTMLElement | null): any;
|
|
31
256
|
}) & typeof Container;
|
|
32
257
|
export default abstract class BPMNContainerBase extends BPMNContainerBase_base {
|
|
33
258
|
get anchors(): Array<Anchor>;
|
|
@@ -55,7 +55,7 @@ function linkFilter(counterEnd) {
|
|
|
55
55
|
}
|
|
56
56
|
const { component, anchor } = counterEnd || {};
|
|
57
57
|
/* FIXME remove !anchor.type condition */
|
|
58
|
-
return !
|
|
58
|
+
return !anchor?.type || anchor.type === this.type;
|
|
59
59
|
}
|
|
60
60
|
export default class BPMNContainerBase extends Connectable(Container) {
|
|
61
61
|
get anchors() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bpmn-container-base.js","sourceRoot":"","sources":["../../src/base/bpmn-container-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,SAAS,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"bpmn-container-base.js","sourceRoot":"","sources":["../../src/base/bpmn-container-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,SAAS,EAAE,WAAW,EAAc,MAAM,wBAAwB,CAAA;AAGnF,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,uBAAU,CAAA;IACV,wBAAW,CAAA;IACX,uBAAU,CAAA;AACZ,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB;AAED,MAAM,CAAN,IAAY,KAIX;AAJD,WAAY,KAAK;IACf,kBAAS,CAAA;IACT,oBAAW,CAAA;IACX,wBAAe,CAAA;AACjB,CAAC,EAJW,KAAK,KAAL,KAAK,QAIhB;AAED,MAAM,CAAN,IAAY,IAIX;AAJD,WAAY,IAAI;IACd,2BAAmB,CAAA;IACnB,6BAAqB,CAAA;IACrB,mCAA2B,CAAA;AAC7B,CAAC,EAJW,IAAI,KAAJ,IAAI,QAIf;AAWD,MAAM,SAAS,GAAG;IAChB,OAAO,EAAE;QACP,WAAW,EAAE,OAAO;QACpB,SAAS,EAAE,OAAO;KACnB;IACD,QAAQ,EAAE;QACR,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,KAAK;QAChB,QAAQ,EAAE,eAAe;KAC1B;IACD,WAAW,EAAE;QACX,WAAW,EAAE,QAAQ;QACrB,SAAS,EAAE,QAAQ;QACnB,QAAQ,EAAE,MAAM;QAChB,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,OAAO;QAClB,GAAG,EAAE,MAAM;QACX,OAAO,EAAE,OAAO;KACjB;CACF,CAAA;AAID,MAAM,aAAa,GAAG,CAAC,CAAA;AAEvB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;gBACvC,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,IAAI,EAAE,IAAI,CAAC,OAAO;gBAClB,SAAS,EAAE,SAAS,CAAC,IAAI;gBACzB,YAAY,EAAE,CAAC;aAChB;YACD;gBACE,IAAI,EAAE,MAAM;gBACZ,WAAW,EAAE,yBAAyB;gBACtC,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,IAAI,EAAE,IAAI,CAAC,OAAO;gBAClB,SAAS,EAAE,SAAS,CAAC,KAAK;gBAC1B,YAAY,EAAE,CAAC;aAChB;SACF,CAAA;IACH,CAAC;CACF","sourcesContent":["import { Anchor, Container, Connectable, Properties } from '@hatiolab/things-scene'\ntype LinkEnd = any\n\nexport enum DIRECTION {\n NORTH = 'N',\n EAST = 'E',\n SOUTH = 'S',\n WEST = 'W'\n}\n\nexport enum INOUT {\n IN = 'in',\n OUT = 'out',\n INOUT = 'inout'\n}\n\nexport enum FLOW {\n MESSAGE = 'message',\n SEQUENCE = 'sequence',\n ASSOCIATION = 'association'\n}\n\nexport type NODE = {\n name: string\n description: string\n inout: INOUT\n type: FLOW\n direction: DIRECTION\n multiplicity?: number\n}\n\nconst STYLE_MAP = {\n message: {\n strokeStyle: 'black',\n fillStyle: 'black'\n },\n sequence: {\n strokeStyle: 'red',\n fillStyle: 'red',\n lineDash: 'long-dash-dot'\n },\n association: {\n strokeStyle: 'yellow',\n fillStyle: 'yellow',\n lineDash: 'dash',\n begin: 'none',\n beginSize: 'size1',\n end: 'none',\n endSize: 'size1'\n }\n}\n\ntype FILTER_FUNCTION = (this: Anchor, counterEnd?: LinkEnd) => boolean\n\nconst ANCHOR_LENGTH = 8\n\nconst TEMPLATE = {\n type: 'bpmn-flow',\n lineWidth: 2,\n strokeStyle: 'black',\n begin: 'none',\n beginSize: 'size1',\n end: 'arrow',\n endSize: 'size9',\n round: 10\n}\n\nfunction linkFilter(this: Anchor, counterEnd?: LinkEnd) {\n if (!counterEnd) {\n return this.inout !== 'in'\n }\n\n const { component, anchor } = counterEnd || {}\n /* FIXME remove !anchor.type condition */\n return !anchor?.type || anchor.type === this.type\n}\n\nexport default abstract class BPMNContainerBase extends Connectable(Container) {\n get anchors(): Array<Anchor> {\n var allNodes = this.nodes\n var { left, top, width, height } = this.bounds\n\n var right = left + width\n var bottom = top + height\n\n const dirs: Array<Array<Anchor>> = [DIRECTION.NORTH, DIRECTION.EAST, DIRECTION.SOUTH, DIRECTION.WEST].map(\n direction => {\n const nodes = allNodes.filter(node => node.direction === direction)\n if (nodes.length === 0) {\n return []\n }\n\n var dx = 0\n var dy = 0\n var sx = 0\n var sy = 0\n\n switch (direction) {\n case DIRECTION.NORTH:\n sx = left\n sy = top\n dx = width / (nodes.length + 1)\n dy = 0\n\n break\n\n case DIRECTION.EAST:\n sx = right\n sy = top\n dx = 0\n dy = height / (nodes.length + 1)\n\n break\n\n case DIRECTION.SOUTH:\n sx = left\n sy = bottom\n dx = width / (nodes.length + 1)\n dy = 0\n\n break\n\n case DIRECTION.WEST:\n sx = left\n sy = top\n dx = 0\n dy = height / (nodes.length + 1)\n\n break\n\n default:\n }\n\n return nodes.map((node, idx) => {\n const x = sx + dx * (idx + 1)\n const y = sy + dy * (idx + 1)\n\n return {\n type: node.type as string,\n name: node.name,\n inout: node.inout,\n position: {\n x,\n y\n },\n bounds: {\n left: x - ANCHOR_LENGTH / 2,\n top: y - ANCHOR_LENGTH / 2,\n width: ANCHOR_LENGTH,\n height: ANCHOR_LENGTH\n },\n filter: linkFilter,\n template: {\n ...TEMPLATE,\n ...(STYLE_MAP[node.type || 'message'] || STYLE_MAP['message'])\n },\n multiplicity: node.multiplicity\n }\n })\n }\n )\n\n return dirs.flat()\n }\n\n get nodes(): NODE[] {\n return [\n {\n name: 'Left',\n description: 'Left side message inout',\n inout: INOUT.INOUT,\n type: FLOW.MESSAGE,\n direction: DIRECTION.WEST,\n multiplicity: 1\n },\n {\n name: 'Top',\n description: 'Top side message inout',\n inout: INOUT.INOUT,\n type: FLOW.MESSAGE,\n direction: DIRECTION.NORTH,\n multiplicity: 1\n },\n {\n name: 'Right',\n description: 'Right side message inout',\n inout: INOUT.INOUT,\n type: FLOW.MESSAGE,\n direction: DIRECTION.EAST,\n multiplicity: 1\n },\n {\n name: 'Down',\n description: 'Down side message inout',\n inout: INOUT.INOUT,\n type: FLOW.MESSAGE,\n direction: DIRECTION.SOUTH,\n multiplicity: 1\n }\n ]\n }\n}\n"]}
|