@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Anchor, Component, Shape } from '@hatiolab/things-scene';
|
|
1
|
+
import { Anchor, BOUNDS, Component, Shape } from '@hatiolab/things-scene';
|
|
2
2
|
export declare enum DIRECTION {
|
|
3
3
|
NORTH = "N",
|
|
4
4
|
EAST = "E",
|
|
@@ -24,10 +24,471 @@ export type NODE = {
|
|
|
24
24
|
multiplicity?: number;
|
|
25
25
|
};
|
|
26
26
|
declare const BPMNControlBase_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: 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: Component) => boolean), ...others: any[]): Component | undefined;
|
|
175
|
+
findAll(s: string | ((c: Component) => boolean), ...others: any[]): any[] | undefined;
|
|
176
|
+
capture(x: number, y: number, except?: (c: Component) => boolean): any;
|
|
177
|
+
findAnchor(name: string): any;
|
|
178
|
+
isDescendible(container: Component): boolean;
|
|
179
|
+
getContext(component?: unknown): any;
|
|
180
|
+
get root(): Component;
|
|
181
|
+
get rootModel(): Component;
|
|
182
|
+
get parent(): Component;
|
|
183
|
+
set parent(v: 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?: Component): import("@hatiolab/things-scene").POINT;
|
|
210
|
+
transcoordT2P(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
211
|
+
transcoordT2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
212
|
+
transcoordS2TR(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
213
|
+
transcoordS2O(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
214
|
+
transcoordC2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
215
|
+
transcoordS2C(x: number, y: number, top?: 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?: Component): import("@hatiolab/things-scene").POINT;
|
|
219
|
+
fromScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
220
|
+
toLocal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
221
|
+
toGlobal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
222
|
+
toOther(x: number, y: number, target: 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: Component, ghost?: boolean): void;
|
|
233
|
+
addComponent(component: Component, ghost?: boolean): void;
|
|
234
|
+
insertComponentAt(component: Component, index: number, ghost?: boolean): void;
|
|
235
|
+
getOverlay(component: Component): HTMLElement | undefined;
|
|
236
|
+
findById(id: string): Component | undefined;
|
|
237
|
+
findByRefid(ref: string | number): Component | undefined;
|
|
238
|
+
findAllById(id: string): Component[];
|
|
239
|
+
resize(): void;
|
|
240
|
+
fit(type?: string): void;
|
|
241
|
+
get components(): Component[] | undefined;
|
|
242
|
+
get layout(): any;
|
|
243
|
+
get auxOverlay(): HTMLElement | undefined;
|
|
244
|
+
get isReady(): boolean;
|
|
245
|
+
get unitScale(): number;
|
|
246
|
+
get selected(): Component[];
|
|
247
|
+
set selected(_v: Component[]): any;
|
|
248
|
+
get focused(): Component | null;
|
|
249
|
+
set focused(_v: 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;
|
|
256
|
+
}) & (new (...args: any[]) => {
|
|
257
|
+
contains(x: number, y: number): boolean;
|
|
258
|
+
get path(): {
|
|
259
|
+
x: any;
|
|
260
|
+
y: any;
|
|
261
|
+
}[];
|
|
262
|
+
set path(path: {
|
|
263
|
+
x: any;
|
|
264
|
+
y: any;
|
|
265
|
+
}[]): any;
|
|
266
|
+
get anchors(): {
|
|
267
|
+
name: string;
|
|
268
|
+
position: {
|
|
269
|
+
x: any;
|
|
270
|
+
y: any;
|
|
271
|
+
};
|
|
272
|
+
}[];
|
|
273
|
+
get bounds(): any;
|
|
274
|
+
set bounds(bounds: any): any;
|
|
275
|
+
render(ctx: CanvasRenderingContext2D): void;
|
|
276
|
+
_app: any;
|
|
277
|
+
_model: any;
|
|
278
|
+
_state: any;
|
|
279
|
+
_delta: any;
|
|
280
|
+
_animation: any;
|
|
281
|
+
_animate: any;
|
|
282
|
+
_parent: any;
|
|
283
|
+
_disposed: any;
|
|
284
|
+
_textHidden: any;
|
|
285
|
+
_text_substitutor: any;
|
|
286
|
+
_value_substitutor: any;
|
|
287
|
+
_mappings: any;
|
|
288
|
+
_realObject: import("@hatiolab/things-scene").IRealObject | undefined;
|
|
289
|
+
_cachedState: any;
|
|
290
|
+
updatedAt: any;
|
|
291
|
+
fontSize: any;
|
|
292
|
+
__cache__: any;
|
|
293
|
+
created(): void;
|
|
294
|
+
added(parent: any): void;
|
|
295
|
+
removed(parent: any): void;
|
|
296
|
+
ready(): Promise<void>;
|
|
297
|
+
touch(): void;
|
|
298
|
+
clearCache(...attrs: any[]): void;
|
|
299
|
+
removeSelf(completely: any): void;
|
|
300
|
+
resetAnimation(): void;
|
|
301
|
+
dispose(): void;
|
|
302
|
+
get nature(): import("@hatiolab/things-scene").ComponentNature;
|
|
303
|
+
get disposed(): boolean;
|
|
304
|
+
isLayer(): boolean;
|
|
305
|
+
isGroup(): boolean;
|
|
306
|
+
isContainer(): this is import("@hatiolab/things-scene/dist-types/types/component").Container;
|
|
307
|
+
isLine(): boolean;
|
|
308
|
+
isRoot(): boolean;
|
|
309
|
+
isRootModel(): boolean;
|
|
310
|
+
is3dish(): boolean;
|
|
311
|
+
get is3dMode(): boolean;
|
|
312
|
+
isIn3DSpace(): boolean;
|
|
313
|
+
isTemplate(): boolean;
|
|
314
|
+
isHTMLElement(): boolean;
|
|
315
|
+
isConnectable(): boolean;
|
|
316
|
+
isIdentifiable(): boolean;
|
|
317
|
+
isPositionable(): boolean;
|
|
318
|
+
replaceRefids(replaceMap: any): void;
|
|
319
|
+
get(property: any): any;
|
|
320
|
+
set(props: any, propval?: any): any;
|
|
321
|
+
getState(property: any): any;
|
|
322
|
+
setState(props: any, propval?: any): any;
|
|
323
|
+
get model(): any;
|
|
324
|
+
get state(): any;
|
|
325
|
+
get hierarchy(): any;
|
|
326
|
+
get volatile(): never[];
|
|
327
|
+
_applyProps(target: any, props: any, options: any): any;
|
|
328
|
+
move(offset: {
|
|
329
|
+
x: number;
|
|
330
|
+
y: number;
|
|
331
|
+
}, ...args: boolean[]): void;
|
|
332
|
+
symmetryX(x?: number): void;
|
|
333
|
+
symmetryY(y: number): void;
|
|
334
|
+
adjustResize(bounds: import("@hatiolab/things-scene").BOUNDS, origin_bounds: import("@hatiolab/things-scene").BOUNDS, diagonal: boolean): {
|
|
335
|
+
left: any;
|
|
336
|
+
top: any;
|
|
337
|
+
width: any;
|
|
338
|
+
height: any;
|
|
339
|
+
};
|
|
340
|
+
adjustRotation(rotation: number, step: boolean): number;
|
|
341
|
+
outline(progress: number): any;
|
|
342
|
+
get center(): import("@hatiolab/things-scene").POINT;
|
|
343
|
+
set center(p: import("@hatiolab/things-scene").POINT): any;
|
|
344
|
+
get location(): import("@hatiolab/things-scene").POINT;
|
|
345
|
+
set location(l: import("@hatiolab/things-scene").POINT): any;
|
|
346
|
+
get rotate(): import("@hatiolab/things-scene").POINT;
|
|
347
|
+
set rotate(r: import("@hatiolab/things-scene").POINT): any;
|
|
348
|
+
get dimension(): import("@hatiolab/things-scene").DIMENSION;
|
|
349
|
+
set dimension(d: import("@hatiolab/things-scene").DIMENSION): any;
|
|
350
|
+
get drawPath(): import("@hatiolab/things-scene").POINT[];
|
|
351
|
+
get rotatePoint(): import("@hatiolab/things-scene").POINT;
|
|
352
|
+
get mutable(): boolean;
|
|
353
|
+
get resizable(): boolean;
|
|
354
|
+
get rotatable(): boolean;
|
|
355
|
+
buildRealObject(): import("@hatiolab/things-scene").IRealObject | undefined;
|
|
356
|
+
get realObject(): import("@hatiolab/things-scene").IRealObject | undefined;
|
|
357
|
+
draw(context?: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
358
|
+
prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
359
|
+
postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
360
|
+
prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
|
|
361
|
+
prepareIf(condition: boolean): void;
|
|
362
|
+
drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
363
|
+
drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
364
|
+
drawFill(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
365
|
+
get strokeStyle(): any;
|
|
366
|
+
set strokeStyle(v: any): any;
|
|
367
|
+
get fillStyle(): any;
|
|
368
|
+
set fillStyle(v: any): any;
|
|
369
|
+
get fontColor(): string;
|
|
370
|
+
set fontColor(v: string): any;
|
|
371
|
+
get rotation(): number;
|
|
372
|
+
set rotation(v: number): any;
|
|
373
|
+
get decorators(): string[];
|
|
374
|
+
get decotag(): string;
|
|
375
|
+
get hidden(): boolean;
|
|
376
|
+
set hidden(v: boolean): any;
|
|
377
|
+
get tag(): string;
|
|
378
|
+
set tag(v: string): any;
|
|
379
|
+
get appendum(): any;
|
|
380
|
+
set appendum(v: any): any;
|
|
381
|
+
defaultTextSubstitutor(): string;
|
|
382
|
+
textLines(context?: import("@hatiolab/things-scene").SceneRenderContext): any[][];
|
|
383
|
+
get font(): string;
|
|
384
|
+
get lineHeight(): number;
|
|
385
|
+
get textSubstitutor(): () => string;
|
|
386
|
+
get text(): string;
|
|
387
|
+
set text(v: string): any;
|
|
388
|
+
get textBounds(): import("@hatiolab/things-scene").BOUNDS;
|
|
389
|
+
get textRotation(): number;
|
|
390
|
+
get textHidden(): boolean;
|
|
391
|
+
set textHidden(v: boolean): any;
|
|
392
|
+
get hasTextProperty(): boolean;
|
|
393
|
+
animate(opts: import("@hatiolab/things-scene").AnimationConfig): any;
|
|
394
|
+
effect(context: import("@hatiolab/things-scene").SceneRenderContext, model: any): void;
|
|
395
|
+
serialize(...others: any[]): string;
|
|
396
|
+
trim(): void;
|
|
397
|
+
closeScene(data: any): void;
|
|
398
|
+
delta(attr?: string | object, value?: any): any;
|
|
399
|
+
invalidate(): void;
|
|
400
|
+
get value(): any;
|
|
401
|
+
set value(v: any): any;
|
|
402
|
+
get data(): any;
|
|
403
|
+
set data(v: any): any;
|
|
404
|
+
set tap(v: any): any;
|
|
405
|
+
get mappings(): any[];
|
|
406
|
+
get retention(): number;
|
|
407
|
+
get animation(): import("@hatiolab/things-scene").AnimationController | undefined;
|
|
408
|
+
get started(): boolean;
|
|
409
|
+
set started(v: boolean): any;
|
|
410
|
+
get controls(): import("@hatiolab/things-scene").Control[] | undefined;
|
|
411
|
+
findFirst(finder: string | ((c: Component) => boolean), ...others: any[]): Component | undefined;
|
|
412
|
+
findAll(s: string | ((c: Component) => boolean), ...others: any[]): any[] | undefined;
|
|
413
|
+
capture(x: number, y: number, except?: (c: Component) => boolean): any;
|
|
414
|
+
findAnchor(name: string): any;
|
|
415
|
+
isDescendible(container: Component): boolean;
|
|
416
|
+
getContext(component?: unknown): any;
|
|
417
|
+
get root(): Component;
|
|
418
|
+
get rootModel(): Component;
|
|
419
|
+
get parent(): Component;
|
|
420
|
+
set parent(v: Component): any;
|
|
421
|
+
get scalable(): boolean;
|
|
422
|
+
get stuck(): boolean;
|
|
423
|
+
get capturable(): boolean;
|
|
424
|
+
get position(): string;
|
|
425
|
+
get origin(): string;
|
|
426
|
+
get offset(): import("@hatiolab/things-scene").POINT;
|
|
427
|
+
get app(): import("@hatiolab/things-scene").ApplicationContext;
|
|
428
|
+
drawEffect(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
429
|
+
prepareFill(resolve: Function, reject: Function): void;
|
|
430
|
+
prepareFillIf(condition: boolean): void;
|
|
431
|
+
onchangeFill(after: Record<string, any>, before: Record<string, any>): void;
|
|
432
|
+
drawImage(context: import("@hatiolab/things-scene").SceneRenderContext, image: HTMLImageElement, left: number, top: number, width: number, height: number): void;
|
|
433
|
+
mutateBounds(logic: ((bounds: import("@hatiolab/things-scene").BOUNDS) => import("@hatiolab/things-scene").BOUNDS | void) | null, context?: any): void;
|
|
434
|
+
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;
|
|
435
|
+
access(accessor: string): any;
|
|
436
|
+
substitute(template: string, data: any): string | undefined;
|
|
437
|
+
onchangeMappings(after: Record<string, any>, before: Record<string, any>): void;
|
|
438
|
+
onchangeData(after: Record<string, any>, before: Record<string, any>): void;
|
|
439
|
+
buildMappings(): void;
|
|
440
|
+
executeMappings(force?: boolean): void;
|
|
441
|
+
disposeMappings(): void;
|
|
442
|
+
ondropfile(transfered: FileList, files: string[]): void;
|
|
443
|
+
transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
444
|
+
transcoordP2S(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
445
|
+
transcoordS2T(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
446
|
+
transcoordT2P(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
447
|
+
transcoordT2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
448
|
+
transcoordS2TR(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
449
|
+
transcoordS2O(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
450
|
+
transcoordC2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
451
|
+
transcoordS2C(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
452
|
+
toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
453
|
+
fromParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
454
|
+
toScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
455
|
+
fromScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
456
|
+
toLocal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
457
|
+
toGlobal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
458
|
+
toOther(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
459
|
+
on(name: string | object, callback: Function, context?: any): any;
|
|
460
|
+
off(name?: string | object, callback?: Function, context?: any): any;
|
|
461
|
+
once(name: string | object, callback: Function, context?: any): any;
|
|
462
|
+
trigger(name: string, ...args: any[]): any;
|
|
463
|
+
delegate_on(delegator: any): any;
|
|
464
|
+
delegate_off(delegator: any): any;
|
|
465
|
+
onchange(after: Record<string, any>, before: Record<string, any>): void;
|
|
466
|
+
calculateBounds?(): void;
|
|
467
|
+
oncreate_element?(element: HTMLElement): void;
|
|
468
|
+
removeComponent(component: Component, ghost?: boolean): void;
|
|
469
|
+
addComponent(component: Component, ghost?: boolean): void;
|
|
470
|
+
insertComponentAt(component: Component, index: number, ghost?: boolean): void;
|
|
471
|
+
getOverlay(component: Component): HTMLElement | undefined;
|
|
472
|
+
findById(id: string): Component | undefined;
|
|
473
|
+
findByRefid(ref: string | number): Component | undefined;
|
|
474
|
+
findAllById(id: string): Component[];
|
|
475
|
+
resize(): void;
|
|
476
|
+
fit(type?: string): void;
|
|
477
|
+
get components(): Component[] | undefined;
|
|
478
|
+
get layout(): any;
|
|
479
|
+
get auxOverlay(): HTMLElement | undefined;
|
|
480
|
+
get isReady(): boolean;
|
|
481
|
+
get unitScale(): number;
|
|
482
|
+
get selected(): Component[];
|
|
483
|
+
set selected(_v: Component[]): any;
|
|
484
|
+
get focused(): Component | null;
|
|
485
|
+
set focused(_v: Component | null): any;
|
|
486
|
+
get hasSameParentForAllSelected(): boolean;
|
|
487
|
+
set hasSameParentForAllSelected(_v: boolean): any;
|
|
488
|
+
get fitMode(): string | undefined;
|
|
489
|
+
set fitMode(_v: string | undefined): any;
|
|
490
|
+
get element(): HTMLElement | null;
|
|
491
|
+
set element(_v: HTMLElement | null): any;
|
|
31
492
|
}) & typeof Shape;
|
|
32
493
|
export default abstract class BPMNControlBase extends BPMNControlBase_base {
|
|
33
494
|
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 BPMNControlBase extends Connectable(RectPath(Shape)) {
|
|
61
61
|
get anchors() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bpmn-control-base.js","sourceRoot":"","sources":["../../src/base/bpmn-control-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,WAAW,
|
|
1
|
+
{"version":3,"file":"bpmn-control-base.js","sourceRoot":"","sources":["../../src/base/bpmn-control-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,WAAW,EAAc,QAAQ,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAG5G,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,WA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AAE,KAAK;gBACX,WAAW,EAAE,wBAAwB;gBACrC,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,IAAI,EAAE,IAAI,CAAC,OAAO;gBAClB,SAAS,EAAE,SAAS,CAAC,KAAK;gBAC1B,YAAY,EAAE,CAAC;aAChB;YACD;gBACE,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,0BAA0B;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, BOUNDS, Component, Connectable, Properties, RectPath, Shape } 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 BPMNControlBase extends Connectable(RectPath(Shape)) {\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"]}
|
package/dist/bpmn-data-object.js
CHANGED
|
@@ -36,15 +36,17 @@ const NATURE = {
|
|
|
36
36
|
help: '/bpmn/data-object/data-object'
|
|
37
37
|
};
|
|
38
38
|
let BPMNDataObject = class BPMNDataObject extends BPMNControlBase {
|
|
39
|
+
imageElement;
|
|
40
|
+
collectionImageElement;
|
|
39
41
|
static get nature() {
|
|
40
42
|
return NATURE;
|
|
41
43
|
}
|
|
42
44
|
get textBounds() {
|
|
43
45
|
var { left, top, width, height } = this.bounds;
|
|
44
46
|
var { paddingTop, paddingLeft, paddingRight } = this.state;
|
|
45
|
-
paddingTop
|
|
46
|
-
paddingLeft
|
|
47
|
-
paddingRight
|
|
47
|
+
paddingTop ||= 0;
|
|
48
|
+
paddingLeft ||= 0;
|
|
49
|
+
paddingRight ||= 0;
|
|
48
50
|
return {
|
|
49
51
|
left: left + paddingLeft,
|
|
50
52
|
top: top + paddingTop + height + 10,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bpmn-data-object.js","sourceRoot":"","sources":["../src/bpmn-data-object.ts"],"names":[],"mappings":";AAAA,OAAO,EAAmB,cAAc,EAAsB,MAAM,wBAAwB,CAAA;AAE5F,OAAO,eAAe,MAAM,6BAA6B,CAAA;AAEzD,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE;QACV;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,OAAO;YACd,QAAQ,EAAE;gBACR,OAAO,EAAE;oBACP;wBACE,OAAO,EAAE,EAAE;wBACX,KAAK,EAAE,EAAE;qBACV;oBACD;wBACE,OAAO,EAAE,OAAO;wBAChB,KAAK,EAAE,OAAO;qBACf;oBACD;wBACE,OAAO,EAAE,QAAQ;wBACjB,KAAK,EAAE,QAAQ;qBAChB;iBACF;aACF;SACF;QACD;YACE,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,YAAY;SACpB;KACF;IACD,IAAI,EAAE,+BAA+B;CACtC,CAAA;AAGc,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,eAAe;
|
|
1
|
+
{"version":3,"file":"bpmn-data-object.js","sourceRoot":"","sources":["../src/bpmn-data-object.ts"],"names":[],"mappings":";AAAA,OAAO,EAAmB,cAAc,EAAsB,MAAM,wBAAwB,CAAA;AAE5F,OAAO,eAAe,MAAM,6BAA6B,CAAA;AAEzD,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE;QACV;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,OAAO;YACd,QAAQ,EAAE;gBACR,OAAO,EAAE;oBACP;wBACE,OAAO,EAAE,EAAE;wBACX,KAAK,EAAE,EAAE;qBACV;oBACD;wBACE,OAAO,EAAE,OAAO;wBAChB,KAAK,EAAE,OAAO;qBACf;oBACD;wBACE,OAAO,EAAE,QAAQ;wBACjB,K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,CAAC,sBAAsB,CAAC,GAAG;gBAC7B,0CAA0C,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,kBAAkB,EAAE,WAAW,CAAC,CAAC,CAAA;QAC1G,CAAC;QAED,OAAO,IAAI,CAAC,sBAAsB,CAAA;IACpC,CAAC;CACF,CAAA;AAxGoB,cAAc;IADlC,cAAc,CAAC,kBAAkB,CAAC;GACd,cAAc,CAwGlC;eAxGoB,cAAc;AA0GnC,MAAM,MAAM,GAA+B;IACzC,KAAK,EAAE;;;;;;;;GAQN;IACD,MAAM,EAAE;;;;;;;;GAQP;CACF,CAAA;AAED,MAAM,UAAU,GAAW;;;;;;;;;;;;GAYxB,CAAA","sourcesContent":["import { ComponentNature, sceneComponent, BOUNDS, Properties } from '@hatiolab/things-scene'\n\nimport BPMNControlBase from './base/bpmn-control-base.js'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: false,\n properties: [\n {\n type: 'select',\n name: 'inout',\n label: 'inout',\n property: {\n options: [\n {\n display: '',\n value: ''\n },\n {\n display: 'input',\n value: 'input'\n },\n {\n display: 'output',\n value: 'output'\n }\n ]\n }\n },\n {\n type: 'checkbox',\n name: 'collection',\n label: 'collection'\n }\n ],\n help: '/bpmn/data-object/data-object'\n}\n\n@sceneComponent('bpmn-data-object')\nexport default class BPMNDataObject extends BPMNControlBase {\n private imageElement?: HTMLImageElement\n private collectionImageElement?: HTMLImageElement\n\n static get nature() {\n return NATURE\n }\n\n get textBounds(): BOUNDS {\n var { left, top, width, height } = this.bounds\n var { paddingTop, paddingLeft, paddingRight } = this.state\n\n paddingTop ||= 0\n paddingLeft ||= 0\n paddingRight ||= 0\n\n return {\n left: left + paddingLeft,\n top: top + paddingTop + height + 10,\n width: Math.max(width - paddingLeft - paddingRight, 0),\n height: 0\n }\n }\n\n render(ctx: CanvasRenderingContext2D) {\n const { left, top, width, height } = this.bounds\n const { collection = false } = this.state\n\n const corner = (Math.min(width, height) * 2) / 5\n\n ctx.translate(left, top)\n ctx.beginPath()\n\n ctx.moveTo(width - corner, 0)\n ctx.lineTo(width - corner, corner)\n ctx.lineTo(width, corner)\n ctx.lineTo(width - corner, 0)\n this.drawStroke(ctx)\n\n ctx.beginPath()\n ctx.moveTo(0, 0)\n ctx.lineTo(width - corner, 0)\n ctx.lineTo(width - corner, corner)\n ctx.lineTo(width, corner)\n ctx.lineTo(width, height)\n ctx.lineTo(0, height)\n ctx.lineTo(0, 0)\n\n ctx.translate(-left, -top)\n\n this.drawFill(ctx)\n this.drawStroke(ctx)\n\n ctx.beginPath()\n\n const image = this.getImageElement()\n if (image) {\n this.drawImage(ctx, image, left, top, corner, corner)\n }\n\n if (collection) {\n this.drawImage(ctx, this.getCollectionImageElement()!, left + (width - 16) / 2, top + height - 16, 16, 16)\n }\n }\n\n onchange(after: Properties, before: Properties) {\n if ('inout' in after || 'collection' in after || 'strokeStyle' in after) {\n delete this.imageElement\n delete this.collectionImageElement\n }\n }\n\n getImageElement(): HTMLImageElement | undefined {\n if (!this.imageElement) {\n const { inout, strokeStyle } = this.state\n\n if (!inout) {\n return\n }\n\n const src: string = IMAGES[inout]\n if (!src) {\n return\n }\n\n this.imageElement = new Image()\n this.imageElement.src =\n 'data:image/svg+xml;charset=UTF-8;base64,' + btoa(src.replace(/{{strokeColor}}/g, strokeStyle))\n }\n\n return this.imageElement\n }\n\n getCollectionImageElement(): HTMLImageElement | undefined {\n if (!this.collectionImageElement) {\n const { strokeStyle } = this.state\n\n this.collectionImageElement = new Image()\n this.collectionImageElement.src =\n 'data:image/svg+xml;charset=UTF-8;base64,' + btoa(COLLECTION.replace(/{{strokeColor}}/g, strokeStyle))\n }\n\n return this.collectionImageElement\n }\n}\n\nconst IMAGES: { [type: string]: string } = {\n input: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:none;stroke:{{strokeColor}};stroke-miterlimit:10;}\n </style>\n <path class=\"st0\" d=\"M19,13.8V8l9.5,9.5L19,27v-5.8H6.5v-7.5H19z\"/>\n </svg>\n `,\n output: `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <path class=\"st0\" d=\"M19,13.8V8l9.5,9.5L19,27v-5.8H6.5v-7.5H19z\"/>\n </svg>\n `\n}\n\nconst COLLECTION: string = `\n <svg version=\"1.1\" id=\"Layer_3\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n viewBox=\"0 0 35 35\" style=\"enable-background:new 0 0 35 35;\" xml:space=\"preserve\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n </style>\n <g>\n <rect x=\"5.5\" y=\"1.9\" class=\"st0\" width=\"3.3\" height=\"25.3\"/>\n <rect x=\"15.9\" y=\"1.9\" class=\"st0\" width=\"3.3\" height=\"25.3\"/>\n <rect x=\"26.2\" y=\"1.9\" class=\"st0\" width=\"3.3\" height=\"25.3\"/>\n </g>\n </svg>\n `\n"]}
|
package/dist/bpmn-data-store.js
CHANGED
|
@@ -15,9 +15,9 @@ let BPMNDataStore = class BPMNDataStore extends BPMNControlBase {
|
|
|
15
15
|
get textBounds() {
|
|
16
16
|
var { left, top, width, height } = this.bounds;
|
|
17
17
|
var { paddingTop, paddingLeft, paddingRight } = this.state;
|
|
18
|
-
paddingTop
|
|
19
|
-
paddingLeft
|
|
20
|
-
paddingRight
|
|
18
|
+
paddingTop ||= 0;
|
|
19
|
+
paddingLeft ||= 0;
|
|
20
|
+
paddingRight ||= 0;
|
|
21
21
|
return {
|
|
22
22
|
left: left + paddingLeft,
|
|
23
23
|
top: top + paddingTop + height + 10,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bpmn-data-store.js","sourceRoot":"","sources":["../src/bpmn-data-store.ts"],"names":[],"mappings":";AAAA,OAAO,EAAmB,cAAc,EAAU,MAAM,wBAAwB,CAAA;AAEhF,OAAO,eAAe,MAAM,6BAA6B,CAAA;AAEzD,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE,EAAE;IACd,IAAI,EAAE,6BAA6B;CACpC,CAAA;AAGc,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,eAAe;IACxD,MAAM,KAAK,MAAM;QACf,OAAO,MAAM,CAAA;IACf,CAAC;IAED,IAAI,UAAU;QACZ,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,CAAA;QAC9C,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;QAE1D,UAAU,
|
|
1
|
+
{"version":3,"file":"bpmn-data-store.js","sourceRoot":"","sources":["../src/bpmn-data-store.ts"],"names":[],"mappings":";AAAA,OAAO,EAAmB,cAAc,EAAU,MAAM,wBAAwB,CAAA;AAEhF,OAAO,eAAe,MAAM,6BAA6B,CAAA;AAEzD,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE,EAAE;IACd,IAAI,EAAE,6BAA6B;CACpC,CAAA;AAGc,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,eAAe;IACxD,MAAM,KAAK,MAAM;QACf,OAAO,MAAM,CAAA;IACf,CAAC;IAED,IA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C,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAA;QAEjF,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;QACtB,GAAG,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAA;QAE7E,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QACjB,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC,CAAA;QAC1B,GAAG,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,EAAE,EAAE,KAAK,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAA;QACjF,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;QAErB,GAAG,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAA;QAE1B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;QAClB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;IACtB,CAAC;CACF,CAAA;AAhDoB,aAAa;IADjC,cAAc,CAAC,iBAAiB,CAAC;GACb,aAAa,CAgDjC;eAhDoB,aAAa","sourcesContent":["import { ComponentNature, sceneComponent, BOUNDS } from '@hatiolab/things-scene'\n\nimport BPMNControlBase from './base/bpmn-control-base.js'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: false,\n properties: [],\n help: '/bpmn/data-store/data-store'\n}\n\n@sceneComponent('bpmn-data-store')\nexport default class BPMNDataStore extends BPMNControlBase {\n static get nature() {\n return NATURE\n }\n\n get textBounds(): BOUNDS {\n var { left, top, width, height } = this.bounds\n var { paddingTop, paddingLeft, paddingRight } = this.state\n\n paddingTop ||= 0\n paddingLeft ||= 0\n paddingRight ||= 0\n\n return {\n left: left + paddingLeft,\n top: top + paddingTop + height + 10,\n width: Math.max(width - paddingLeft - paddingRight, 0),\n height: 0\n }\n }\n\n render(ctx: CanvasRenderingContext2D) {\n const { left, top, width, height } = this.bounds\n const ry = Math.abs(height / 6)\n const startAngle = Math.PI\n const endAngle = 0\n\n ctx.translate(left, top)\n ctx.beginPath()\n\n ctx.ellipse(width / 2, ry, width / 2, ry, 0, startAngle, startAngle - Math.PI * 2, true)\n\n ctx.moveTo(0, ry + ry / 2)\n ctx.ellipse(width / 2, ry + ry / 2, width / 2, ry, 0, startAngle, endAngle, true)\n\n ctx.moveTo(0, ry + ry)\n ctx.ellipse(width / 2, ry + ry, width / 2, ry, 0, startAngle, endAngle, true)\n\n ctx.moveTo(0, ry)\n ctx.lineTo(0, height - ry)\n ctx.ellipse(width / 2, height - ry, width / 2, ry, 0, startAngle, endAngle, true)\n ctx.lineTo(width, ry)\n\n ctx.translate(-left, -top)\n\n this.drawFill(ctx)\n this.drawStroke(ctx)\n }\n}\n"]}
|