@operato/scene-integration 10.0.0-beta.22 → 10.0.0-beta.65
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/connection-control.d.ts +42 -37
- package/dist/connection-control.js.map +1 -1
- package/dist/connection-state-subscription.d.ts +83 -73
- package/dist/connection-state-subscription.js.map +1 -1
- package/dist/data-subscription.d.ts +83 -73
- package/dist/data-subscription.js.map +1 -1
- package/dist/scenario-control.d.ts +83 -73
- package/dist/scenario-control.js.map +1 -1
- package/dist/scenario-instance-subscription.d.ts +83 -73
- package/dist/scenario-instance-subscription.js.map +1 -1
- package/dist/scenario-queue-subscription.d.ts +83 -73
- package/dist/scenario-queue-subscription.js.map +1 -1
- package/dist/scenario-run.d.ts +83 -73
- package/dist/scenario-run.js.map +1 -1
- package/dist/scenario-start.d.ts +83 -73
- package/dist/scenario-start.js.map +1 -1
- package/dist/scenario-stop.d.ts +83 -73
- package/dist/scenario-stop.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentNature, Shape } from '@hatiolab/things-scene';
|
|
2
2
|
declare const DataSubscription_base: (new (...args: any[]) => {
|
|
3
3
|
_convertDataFormat(data: any, format: any): any;
|
|
4
4
|
isDataSource(): boolean;
|
|
@@ -32,7 +32,7 @@ declare const DataSubscription_base: (new (...args: any[]) => {
|
|
|
32
32
|
get disposed(): boolean;
|
|
33
33
|
isLayer(): boolean;
|
|
34
34
|
isGroup(): boolean;
|
|
35
|
-
isContainer(): this is import("@hatiolab/things-scene
|
|
35
|
+
isContainer(): this is import("@hatiolab/things-scene").Container;
|
|
36
36
|
isLine(): boolean;
|
|
37
37
|
isRoot(): boolean;
|
|
38
38
|
isRootModel(): boolean;
|
|
@@ -48,9 +48,10 @@ declare const DataSubscription_base: (new (...args: any[]) => {
|
|
|
48
48
|
get(property: any): any;
|
|
49
49
|
set(props: any, propval?: any): any;
|
|
50
50
|
getState(property: any): any;
|
|
51
|
-
setState(props:
|
|
51
|
+
setState(props: Partial<import("@hatiolab/things-scene").State> | string, propval?: any): any;
|
|
52
52
|
get model(): any;
|
|
53
|
-
get state():
|
|
53
|
+
get state(): import("@hatiolab/things-scene").State;
|
|
54
|
+
get refid(): any;
|
|
54
55
|
get hierarchy(): any;
|
|
55
56
|
get volatile(): never[];
|
|
56
57
|
_applyProps(target: any, props: any, options: any): any;
|
|
@@ -92,7 +93,7 @@ declare const DataSubscription_base: (new (...args: any[]) => {
|
|
|
92
93
|
prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
93
94
|
render(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
94
95
|
postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
95
|
-
prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
|
|
96
|
+
prepare(resolve: (component: import("@hatiolab/things-scene").Component) => void, reject: (reason: any) => void): void;
|
|
96
97
|
prepareIf(condition: boolean): void;
|
|
97
98
|
drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
98
99
|
drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
@@ -143,16 +144,16 @@ declare const DataSubscription_base: (new (...args: any[]) => {
|
|
|
143
144
|
get started(): boolean;
|
|
144
145
|
set started(v: boolean): any;
|
|
145
146
|
get controls(): import("@hatiolab/things-scene").Control[] | undefined;
|
|
146
|
-
findFirst(finder: string | ((c: Component) => boolean), ...others: any[]): Component | undefined;
|
|
147
|
-
findAll(s: string | ((c: Component) => boolean), ...others: any[]): any[] | undefined;
|
|
148
|
-
capture(x: number, y: number, except?: (c: Component) => boolean): any;
|
|
147
|
+
findFirst(finder: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): import("@hatiolab/things-scene").Component | undefined;
|
|
148
|
+
findAll(s: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): any[] | undefined;
|
|
149
|
+
capture(x: number, y: number, except?: (c: import("@hatiolab/things-scene").Component) => boolean): any;
|
|
149
150
|
findAnchor(name: string): any;
|
|
150
|
-
isDescendible(container: Component): boolean;
|
|
151
|
+
isDescendible(container: import("@hatiolab/things-scene").Component | any): boolean;
|
|
151
152
|
getContext(component?: unknown): any;
|
|
152
|
-
get root(): Component;
|
|
153
|
-
get rootModel(): Component;
|
|
154
|
-
get parent(): Component;
|
|
155
|
-
set parent(v: Component): any;
|
|
153
|
+
get root(): import("@hatiolab/things-scene").Component;
|
|
154
|
+
get rootModel(): import("@hatiolab/things-scene").Component;
|
|
155
|
+
get parent(): import("@hatiolab/things-scene").Component;
|
|
156
|
+
set parent(v: import("@hatiolab/things-scene").Component): any;
|
|
156
157
|
get anchors(): import("@hatiolab/things-scene").Anchor[];
|
|
157
158
|
get scalable(): boolean;
|
|
158
159
|
get stuck(): boolean;
|
|
@@ -178,47 +179,51 @@ declare const DataSubscription_base: (new (...args: any[]) => {
|
|
|
178
179
|
ondropfile(transfered: FileList, files: string[]): void;
|
|
179
180
|
transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
180
181
|
transcoordP2S(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
181
|
-
transcoordS2T(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
182
|
-
transcoordT2P(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
183
|
-
transcoordT2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
184
|
-
transcoordS2TR(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
185
|
-
transcoordS2O(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
186
|
-
transcoordC2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
187
|
-
transcoordS2C(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
182
|
+
transcoordS2T(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
183
|
+
transcoordT2P(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
184
|
+
transcoordT2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
185
|
+
transcoordS2TR(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
186
|
+
transcoordS2O(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
187
|
+
transcoordC2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
188
|
+
transcoordS2C(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
188
189
|
toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
189
190
|
fromParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
190
|
-
toScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
191
|
-
fromScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
192
|
-
toLocal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
193
|
-
toGlobal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
194
|
-
toOther(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
191
|
+
toScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
192
|
+
fromScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
193
|
+
toLocal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
194
|
+
toGlobal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
195
|
+
toOther(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
196
|
+
on<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback: (...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void, context?: any): any;
|
|
195
197
|
on(name: string | object, callback: Function, context?: any): any;
|
|
198
|
+
off<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback?: ((...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void) | undefined, context?: any): any;
|
|
196
199
|
off(name?: string | object, callback?: Function, context?: any): any;
|
|
200
|
+
once<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback: (...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void, context?: any): any;
|
|
197
201
|
once(name: string | object, callback: Function, context?: any): any;
|
|
202
|
+
trigger<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, ...args: import("@hatiolab/things-scene").ComponentEventMap[K]): any;
|
|
198
203
|
trigger(name: string, ...args: any[]): any;
|
|
199
204
|
delegate_on(delegator: any): any;
|
|
200
205
|
delegate_off(delegator: any): any;
|
|
201
206
|
onchange(after: Record<string, any>, before: Record<string, any>): void;
|
|
202
207
|
calculateBounds?(): void;
|
|
203
208
|
oncreate_element?(element: HTMLElement): void;
|
|
204
|
-
removeComponent(component: Component, ghost?: boolean): void;
|
|
205
|
-
addComponent(component: Component, ghost?: boolean): void;
|
|
206
|
-
insertComponentAt(component: Component, index: number, ghost?: boolean): void;
|
|
207
|
-
getOverlay(component: Component): HTMLElement | undefined;
|
|
208
|
-
findById(id: string): Component | undefined;
|
|
209
|
-
findByRefid(ref: string | number): Component | undefined;
|
|
210
|
-
findAllById(id: string): Component[];
|
|
209
|
+
removeComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
210
|
+
addComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
211
|
+
insertComponentAt(component: import("@hatiolab/things-scene").Component, index: number, ghost?: boolean): void;
|
|
212
|
+
getOverlay(component: import("@hatiolab/things-scene").Component): HTMLElement | undefined;
|
|
213
|
+
findById(id: string): import("@hatiolab/things-scene").Component | undefined;
|
|
214
|
+
findByRefid(ref: string | number): import("@hatiolab/things-scene").Component | undefined;
|
|
215
|
+
findAllById(id: string): import("@hatiolab/things-scene").Component[];
|
|
211
216
|
resize(): void;
|
|
212
217
|
fit(type?: string): void;
|
|
213
|
-
get components(): Component[] | undefined;
|
|
218
|
+
get components(): import("@hatiolab/things-scene").Component[] | undefined;
|
|
214
219
|
get layout(): any;
|
|
215
220
|
get auxOverlay(): HTMLElement | undefined;
|
|
216
221
|
get isReady(): boolean;
|
|
217
222
|
get unitScale(): number;
|
|
218
|
-
get selected(): Component[];
|
|
219
|
-
set selected(_v: Component[]): any;
|
|
220
|
-
get focused(): Component | null;
|
|
221
|
-
set focused(_v: Component | null): any;
|
|
223
|
+
get selected(): import("@hatiolab/things-scene").Component[];
|
|
224
|
+
set selected(_v: import("@hatiolab/things-scene").Component[]): any;
|
|
225
|
+
get focused(): import("@hatiolab/things-scene").Component | null;
|
|
226
|
+
set focused(_v: import("@hatiolab/things-scene").Component | null): any;
|
|
222
227
|
get hasSameParentForAllSelected(): boolean;
|
|
223
228
|
set hasSameParentForAllSelected(_v: boolean): any;
|
|
224
229
|
get fitMode(): string | undefined;
|
|
@@ -275,7 +280,7 @@ declare const DataSubscription_base: (new (...args: any[]) => {
|
|
|
275
280
|
get disposed(): boolean;
|
|
276
281
|
isLayer(): boolean;
|
|
277
282
|
isGroup(): boolean;
|
|
278
|
-
isContainer(): this is import("@hatiolab/things-scene
|
|
283
|
+
isContainer(): this is import("@hatiolab/things-scene").Container;
|
|
279
284
|
isLine(): boolean;
|
|
280
285
|
isRoot(): boolean;
|
|
281
286
|
isRootModel(): boolean;
|
|
@@ -291,9 +296,10 @@ declare const DataSubscription_base: (new (...args: any[]) => {
|
|
|
291
296
|
get(property: any): any;
|
|
292
297
|
set(props: any, propval?: any): any;
|
|
293
298
|
getState(property: any): any;
|
|
294
|
-
setState(props:
|
|
299
|
+
setState(props: Partial<import("@hatiolab/things-scene").State> | string, propval?: any): any;
|
|
295
300
|
get model(): any;
|
|
296
|
-
get state():
|
|
301
|
+
get state(): import("@hatiolab/things-scene").State;
|
|
302
|
+
get refid(): any;
|
|
297
303
|
get hierarchy(): any;
|
|
298
304
|
get volatile(): never[];
|
|
299
305
|
_applyProps(target: any, props: any, options: any): any;
|
|
@@ -329,7 +335,7 @@ declare const DataSubscription_base: (new (...args: any[]) => {
|
|
|
329
335
|
draw(context?: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
330
336
|
prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
331
337
|
postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
332
|
-
prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
|
|
338
|
+
prepare(resolve: (component: import("@hatiolab/things-scene").Component) => void, reject: (reason: any) => void): void;
|
|
333
339
|
prepareIf(condition: boolean): void;
|
|
334
340
|
drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
335
341
|
drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
@@ -380,16 +386,16 @@ declare const DataSubscription_base: (new (...args: any[]) => {
|
|
|
380
386
|
get started(): boolean;
|
|
381
387
|
set started(v: boolean): any;
|
|
382
388
|
get controls(): import("@hatiolab/things-scene").Control[] | undefined;
|
|
383
|
-
findFirst(finder: string | ((c: Component) => boolean), ...others: any[]): Component | undefined;
|
|
384
|
-
findAll(s: string | ((c: Component) => boolean), ...others: any[]): any[] | undefined;
|
|
385
|
-
capture(x: number, y: number, except?: (c: Component) => boolean): any;
|
|
389
|
+
findFirst(finder: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): import("@hatiolab/things-scene").Component | undefined;
|
|
390
|
+
findAll(s: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): any[] | undefined;
|
|
391
|
+
capture(x: number, y: number, except?: (c: import("@hatiolab/things-scene").Component) => boolean): any;
|
|
386
392
|
findAnchor(name: string): any;
|
|
387
|
-
isDescendible(container: Component): boolean;
|
|
393
|
+
isDescendible(container: import("@hatiolab/things-scene").Component | any): boolean;
|
|
388
394
|
getContext(component?: unknown): any;
|
|
389
|
-
get root(): Component;
|
|
390
|
-
get rootModel(): Component;
|
|
391
|
-
get parent(): Component;
|
|
392
|
-
set parent(v: Component): any;
|
|
395
|
+
get root(): import("@hatiolab/things-scene").Component;
|
|
396
|
+
get rootModel(): import("@hatiolab/things-scene").Component;
|
|
397
|
+
get parent(): import("@hatiolab/things-scene").Component;
|
|
398
|
+
set parent(v: import("@hatiolab/things-scene").Component): any;
|
|
393
399
|
get scalable(): boolean;
|
|
394
400
|
get stuck(): boolean;
|
|
395
401
|
get capturable(): boolean;
|
|
@@ -414,47 +420,51 @@ declare const DataSubscription_base: (new (...args: any[]) => {
|
|
|
414
420
|
ondropfile(transfered: FileList, files: string[]): void;
|
|
415
421
|
transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
416
422
|
transcoordP2S(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
417
|
-
transcoordS2T(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
418
|
-
transcoordT2P(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
419
|
-
transcoordT2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
420
|
-
transcoordS2TR(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
421
|
-
transcoordS2O(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
422
|
-
transcoordC2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
423
|
-
transcoordS2C(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
423
|
+
transcoordS2T(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
424
|
+
transcoordT2P(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
425
|
+
transcoordT2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
426
|
+
transcoordS2TR(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
427
|
+
transcoordS2O(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
428
|
+
transcoordC2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
429
|
+
transcoordS2C(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
424
430
|
toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
425
431
|
fromParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
426
|
-
toScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
427
|
-
fromScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
428
|
-
toLocal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
429
|
-
toGlobal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
430
|
-
toOther(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
432
|
+
toScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
433
|
+
fromScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
434
|
+
toLocal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
435
|
+
toGlobal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
436
|
+
toOther(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
437
|
+
on<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback: (...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void, context?: any): any;
|
|
431
438
|
on(name: string | object, callback: Function, context?: any): any;
|
|
439
|
+
off<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback?: ((...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void) | undefined, context?: any): any;
|
|
432
440
|
off(name?: string | object, callback?: Function, context?: any): any;
|
|
441
|
+
once<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback: (...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void, context?: any): any;
|
|
433
442
|
once(name: string | object, callback: Function, context?: any): any;
|
|
443
|
+
trigger<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, ...args: import("@hatiolab/things-scene").ComponentEventMap[K]): any;
|
|
434
444
|
trigger(name: string, ...args: any[]): any;
|
|
435
445
|
delegate_on(delegator: any): any;
|
|
436
446
|
delegate_off(delegator: any): any;
|
|
437
447
|
onchange(after: Record<string, any>, before: Record<string, any>): void;
|
|
438
448
|
calculateBounds?(): void;
|
|
439
449
|
oncreate_element?(element: HTMLElement): void;
|
|
440
|
-
removeComponent(component: Component, ghost?: boolean): void;
|
|
441
|
-
addComponent(component: Component, ghost?: boolean): void;
|
|
442
|
-
insertComponentAt(component: Component, index: number, ghost?: boolean): void;
|
|
443
|
-
getOverlay(component: Component): HTMLElement | undefined;
|
|
444
|
-
findById(id: string): Component | undefined;
|
|
445
|
-
findByRefid(ref: string | number): Component | undefined;
|
|
446
|
-
findAllById(id: string): Component[];
|
|
450
|
+
removeComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
451
|
+
addComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
452
|
+
insertComponentAt(component: import("@hatiolab/things-scene").Component, index: number, ghost?: boolean): void;
|
|
453
|
+
getOverlay(component: import("@hatiolab/things-scene").Component): HTMLElement | undefined;
|
|
454
|
+
findById(id: string): import("@hatiolab/things-scene").Component | undefined;
|
|
455
|
+
findByRefid(ref: string | number): import("@hatiolab/things-scene").Component | undefined;
|
|
456
|
+
findAllById(id: string): import("@hatiolab/things-scene").Component[];
|
|
447
457
|
resize(): void;
|
|
448
458
|
fit(type?: string): void;
|
|
449
|
-
get components(): Component[] | undefined;
|
|
459
|
+
get components(): import("@hatiolab/things-scene").Component[] | undefined;
|
|
450
460
|
get layout(): any;
|
|
451
461
|
get auxOverlay(): HTMLElement | undefined;
|
|
452
462
|
get isReady(): boolean;
|
|
453
463
|
get unitScale(): number;
|
|
454
|
-
get selected(): Component[];
|
|
455
|
-
set selected(_v: Component[]): any;
|
|
456
|
-
get focused(): Component | null;
|
|
457
|
-
set focused(_v: Component | null): any;
|
|
464
|
+
get selected(): import("@hatiolab/things-scene").Component[];
|
|
465
|
+
set selected(_v: import("@hatiolab/things-scene").Component[]): any;
|
|
466
|
+
get focused(): import("@hatiolab/things-scene").Component | null;
|
|
467
|
+
set focused(_v: import("@hatiolab/things-scene").Component | null): any;
|
|
458
468
|
get hasSameParentForAllSelected(): boolean;
|
|
459
469
|
set hasSameParentForAllSelected(_v: boolean): any;
|
|
460
470
|
get fitMode(): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-subscription.js","sourceRoot":"","sources":["../src/data-subscription.ts"],"names":[],"mappings":";;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"data-subscription.js","sourceRoot":"","sources":["../src/data-subscription.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAmB,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,cA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'@hatiolab/things-scene'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'string',\n label: 'tag',\n name: 'tag'\n }\n ],\n 'value-property': 'tag',\n help: 'scene/component/data-subscription'\n}\n\n@sceneComponent('data-subscription')\nexport default class DataSubscription extends DataSource(RectPath(Shape)) {\n static _image: HTMLImageElement\n static get image() {\n if (!DataSubscription._image) {\n DataSubscription._image = new Image()\n DataSubscription._image.src = new URL('../icons/symbol-data-subscription.png', import.meta.url).href\n }\n\n return DataSubscription._image\n }\n\n render(context: CanvasRenderingContext2D) {\n var { left, top, width, height } = this.bounds\n\n context.beginPath()\n this.drawImage(context, DataSubscription.image, left, top, width, height)\n }\n\n get nature() {\n return NATURE\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentNature, Properties, Shape } from '@hatiolab/things-scene';
|
|
2
2
|
declare const ScenarioControl_base: (new (...args: any[]) => {
|
|
3
3
|
_convertDataFormat(data: any, format: any): any;
|
|
4
4
|
isDataSource(): boolean;
|
|
@@ -32,7 +32,7 @@ declare const ScenarioControl_base: (new (...args: any[]) => {
|
|
|
32
32
|
get disposed(): boolean;
|
|
33
33
|
isLayer(): boolean;
|
|
34
34
|
isGroup(): boolean;
|
|
35
|
-
isContainer(): this is import("@hatiolab/things-scene
|
|
35
|
+
isContainer(): this is import("@hatiolab/things-scene").Container;
|
|
36
36
|
isLine(): boolean;
|
|
37
37
|
isRoot(): boolean;
|
|
38
38
|
isRootModel(): boolean;
|
|
@@ -48,9 +48,10 @@ declare const ScenarioControl_base: (new (...args: any[]) => {
|
|
|
48
48
|
get(property: any): any;
|
|
49
49
|
set(props: any, propval?: any): any;
|
|
50
50
|
getState(property: any): any;
|
|
51
|
-
setState(props:
|
|
51
|
+
setState(props: Partial<import("@hatiolab/things-scene").State> | string, propval?: any): any;
|
|
52
52
|
get model(): any;
|
|
53
|
-
get state():
|
|
53
|
+
get state(): import("@hatiolab/things-scene").State;
|
|
54
|
+
get refid(): any;
|
|
54
55
|
get hierarchy(): any;
|
|
55
56
|
get volatile(): never[];
|
|
56
57
|
_applyProps(target: any, props: any, options: any): any;
|
|
@@ -92,7 +93,7 @@ declare const ScenarioControl_base: (new (...args: any[]) => {
|
|
|
92
93
|
prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
93
94
|
render(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
94
95
|
postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
95
|
-
prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
|
|
96
|
+
prepare(resolve: (component: import("@hatiolab/things-scene").Component) => void, reject: (reason: any) => void): void;
|
|
96
97
|
prepareIf(condition: boolean): void;
|
|
97
98
|
drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
98
99
|
drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
@@ -143,16 +144,16 @@ declare const ScenarioControl_base: (new (...args: any[]) => {
|
|
|
143
144
|
get started(): boolean;
|
|
144
145
|
set started(v: boolean): any;
|
|
145
146
|
get controls(): import("@hatiolab/things-scene").Control[] | undefined;
|
|
146
|
-
findFirst(finder: string | ((c: Component) => boolean), ...others: any[]): Component | undefined;
|
|
147
|
-
findAll(s: string | ((c: Component) => boolean), ...others: any[]): any[] | undefined;
|
|
148
|
-
capture(x: number, y: number, except?: (c: Component) => boolean): any;
|
|
147
|
+
findFirst(finder: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): import("@hatiolab/things-scene").Component | undefined;
|
|
148
|
+
findAll(s: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): any[] | undefined;
|
|
149
|
+
capture(x: number, y: number, except?: (c: import("@hatiolab/things-scene").Component) => boolean): any;
|
|
149
150
|
findAnchor(name: string): any;
|
|
150
|
-
isDescendible(container: Component): boolean;
|
|
151
|
+
isDescendible(container: import("@hatiolab/things-scene").Component | any): boolean;
|
|
151
152
|
getContext(component?: unknown): any;
|
|
152
|
-
get root(): Component;
|
|
153
|
-
get rootModel(): Component;
|
|
154
|
-
get parent(): Component;
|
|
155
|
-
set parent(v: Component): any;
|
|
153
|
+
get root(): import("@hatiolab/things-scene").Component;
|
|
154
|
+
get rootModel(): import("@hatiolab/things-scene").Component;
|
|
155
|
+
get parent(): import("@hatiolab/things-scene").Component;
|
|
156
|
+
set parent(v: import("@hatiolab/things-scene").Component): any;
|
|
156
157
|
get anchors(): import("@hatiolab/things-scene").Anchor[];
|
|
157
158
|
get scalable(): boolean;
|
|
158
159
|
get stuck(): boolean;
|
|
@@ -178,47 +179,51 @@ declare const ScenarioControl_base: (new (...args: any[]) => {
|
|
|
178
179
|
ondropfile(transfered: FileList, files: string[]): void;
|
|
179
180
|
transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
180
181
|
transcoordP2S(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
181
|
-
transcoordS2T(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
182
|
-
transcoordT2P(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
183
|
-
transcoordT2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
184
|
-
transcoordS2TR(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
185
|
-
transcoordS2O(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
186
|
-
transcoordC2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
187
|
-
transcoordS2C(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
182
|
+
transcoordS2T(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
183
|
+
transcoordT2P(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
184
|
+
transcoordT2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
185
|
+
transcoordS2TR(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
186
|
+
transcoordS2O(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
187
|
+
transcoordC2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
188
|
+
transcoordS2C(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
188
189
|
toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
189
190
|
fromParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
190
|
-
toScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
191
|
-
fromScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
192
|
-
toLocal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
193
|
-
toGlobal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
194
|
-
toOther(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
191
|
+
toScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
192
|
+
fromScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
193
|
+
toLocal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
194
|
+
toGlobal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
195
|
+
toOther(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
196
|
+
on<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback: (...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void, context?: any): any;
|
|
195
197
|
on(name: string | object, callback: Function, context?: any): any;
|
|
198
|
+
off<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback?: ((...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void) | undefined, context?: any): any;
|
|
196
199
|
off(name?: string | object, callback?: Function, context?: any): any;
|
|
200
|
+
once<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback: (...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void, context?: any): any;
|
|
197
201
|
once(name: string | object, callback: Function, context?: any): any;
|
|
202
|
+
trigger<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, ...args: import("@hatiolab/things-scene").ComponentEventMap[K]): any;
|
|
198
203
|
trigger(name: string, ...args: any[]): any;
|
|
199
204
|
delegate_on(delegator: any): any;
|
|
200
205
|
delegate_off(delegator: any): any;
|
|
201
206
|
onchange(after: Record<string, any>, before: Record<string, any>): void;
|
|
202
207
|
calculateBounds?(): void;
|
|
203
208
|
oncreate_element?(element: HTMLElement): void;
|
|
204
|
-
removeComponent(component: Component, ghost?: boolean): void;
|
|
205
|
-
addComponent(component: Component, ghost?: boolean): void;
|
|
206
|
-
insertComponentAt(component: Component, index: number, ghost?: boolean): void;
|
|
207
|
-
getOverlay(component: Component): HTMLElement | undefined;
|
|
208
|
-
findById(id: string): Component | undefined;
|
|
209
|
-
findByRefid(ref: string | number): Component | undefined;
|
|
210
|
-
findAllById(id: string): Component[];
|
|
209
|
+
removeComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
210
|
+
addComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
211
|
+
insertComponentAt(component: import("@hatiolab/things-scene").Component, index: number, ghost?: boolean): void;
|
|
212
|
+
getOverlay(component: import("@hatiolab/things-scene").Component): HTMLElement | undefined;
|
|
213
|
+
findById(id: string): import("@hatiolab/things-scene").Component | undefined;
|
|
214
|
+
findByRefid(ref: string | number): import("@hatiolab/things-scene").Component | undefined;
|
|
215
|
+
findAllById(id: string): import("@hatiolab/things-scene").Component[];
|
|
211
216
|
resize(): void;
|
|
212
217
|
fit(type?: string): void;
|
|
213
|
-
get components(): Component[] | undefined;
|
|
218
|
+
get components(): import("@hatiolab/things-scene").Component[] | undefined;
|
|
214
219
|
get layout(): any;
|
|
215
220
|
get auxOverlay(): HTMLElement | undefined;
|
|
216
221
|
get isReady(): boolean;
|
|
217
222
|
get unitScale(): number;
|
|
218
|
-
get selected(): Component[];
|
|
219
|
-
set selected(_v: Component[]): any;
|
|
220
|
-
get focused(): Component | null;
|
|
221
|
-
set focused(_v: Component | null): any;
|
|
223
|
+
get selected(): import("@hatiolab/things-scene").Component[];
|
|
224
|
+
set selected(_v: import("@hatiolab/things-scene").Component[]): any;
|
|
225
|
+
get focused(): import("@hatiolab/things-scene").Component | null;
|
|
226
|
+
set focused(_v: import("@hatiolab/things-scene").Component | null): any;
|
|
222
227
|
get hasSameParentForAllSelected(): boolean;
|
|
223
228
|
set hasSameParentForAllSelected(_v: boolean): any;
|
|
224
229
|
get fitMode(): string | undefined;
|
|
@@ -275,7 +280,7 @@ declare const ScenarioControl_base: (new (...args: any[]) => {
|
|
|
275
280
|
get disposed(): boolean;
|
|
276
281
|
isLayer(): boolean;
|
|
277
282
|
isGroup(): boolean;
|
|
278
|
-
isContainer(): this is import("@hatiolab/things-scene
|
|
283
|
+
isContainer(): this is import("@hatiolab/things-scene").Container;
|
|
279
284
|
isLine(): boolean;
|
|
280
285
|
isRoot(): boolean;
|
|
281
286
|
isRootModel(): boolean;
|
|
@@ -291,9 +296,10 @@ declare const ScenarioControl_base: (new (...args: any[]) => {
|
|
|
291
296
|
get(property: any): any;
|
|
292
297
|
set(props: any, propval?: any): any;
|
|
293
298
|
getState(property: any): any;
|
|
294
|
-
setState(props:
|
|
299
|
+
setState(props: Partial<import("@hatiolab/things-scene").State> | string, propval?: any): any;
|
|
295
300
|
get model(): any;
|
|
296
|
-
get state():
|
|
301
|
+
get state(): import("@hatiolab/things-scene").State;
|
|
302
|
+
get refid(): any;
|
|
297
303
|
get hierarchy(): any;
|
|
298
304
|
get volatile(): never[];
|
|
299
305
|
_applyProps(target: any, props: any, options: any): any;
|
|
@@ -329,7 +335,7 @@ declare const ScenarioControl_base: (new (...args: any[]) => {
|
|
|
329
335
|
draw(context?: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
330
336
|
prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
331
337
|
postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
332
|
-
prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
|
|
338
|
+
prepare(resolve: (component: import("@hatiolab/things-scene").Component) => void, reject: (reason: any) => void): void;
|
|
333
339
|
prepareIf(condition: boolean): void;
|
|
334
340
|
drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
335
341
|
drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
@@ -380,16 +386,16 @@ declare const ScenarioControl_base: (new (...args: any[]) => {
|
|
|
380
386
|
get started(): boolean;
|
|
381
387
|
set started(v: boolean): any;
|
|
382
388
|
get controls(): import("@hatiolab/things-scene").Control[] | undefined;
|
|
383
|
-
findFirst(finder: string | ((c: Component) => boolean), ...others: any[]): Component | undefined;
|
|
384
|
-
findAll(s: string | ((c: Component) => boolean), ...others: any[]): any[] | undefined;
|
|
385
|
-
capture(x: number, y: number, except?: (c: Component) => boolean): any;
|
|
389
|
+
findFirst(finder: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): import("@hatiolab/things-scene").Component | undefined;
|
|
390
|
+
findAll(s: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): any[] | undefined;
|
|
391
|
+
capture(x: number, y: number, except?: (c: import("@hatiolab/things-scene").Component) => boolean): any;
|
|
386
392
|
findAnchor(name: string): any;
|
|
387
|
-
isDescendible(container: Component): boolean;
|
|
393
|
+
isDescendible(container: import("@hatiolab/things-scene").Component | any): boolean;
|
|
388
394
|
getContext(component?: unknown): any;
|
|
389
|
-
get root(): Component;
|
|
390
|
-
get rootModel(): Component;
|
|
391
|
-
get parent(): Component;
|
|
392
|
-
set parent(v: Component): any;
|
|
395
|
+
get root(): import("@hatiolab/things-scene").Component;
|
|
396
|
+
get rootModel(): import("@hatiolab/things-scene").Component;
|
|
397
|
+
get parent(): import("@hatiolab/things-scene").Component;
|
|
398
|
+
set parent(v: import("@hatiolab/things-scene").Component): any;
|
|
393
399
|
get scalable(): boolean;
|
|
394
400
|
get stuck(): boolean;
|
|
395
401
|
get capturable(): boolean;
|
|
@@ -414,47 +420,51 @@ declare const ScenarioControl_base: (new (...args: any[]) => {
|
|
|
414
420
|
ondropfile(transfered: FileList, files: string[]): void;
|
|
415
421
|
transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
416
422
|
transcoordP2S(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
417
|
-
transcoordS2T(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
418
|
-
transcoordT2P(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
419
|
-
transcoordT2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
420
|
-
transcoordS2TR(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
421
|
-
transcoordS2O(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
422
|
-
transcoordC2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
423
|
-
transcoordS2C(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
423
|
+
transcoordS2T(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
424
|
+
transcoordT2P(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
425
|
+
transcoordT2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
426
|
+
transcoordS2TR(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
427
|
+
transcoordS2O(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
428
|
+
transcoordC2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
429
|
+
transcoordS2C(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
424
430
|
toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
425
431
|
fromParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
426
|
-
toScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
427
|
-
fromScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
428
|
-
toLocal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
429
|
-
toGlobal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
430
|
-
toOther(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
432
|
+
toScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
433
|
+
fromScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
434
|
+
toLocal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
435
|
+
toGlobal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
436
|
+
toOther(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
437
|
+
on<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback: (...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void, context?: any): any;
|
|
431
438
|
on(name: string | object, callback: Function, context?: any): any;
|
|
439
|
+
off<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback?: ((...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void) | undefined, context?: any): any;
|
|
432
440
|
off(name?: string | object, callback?: Function, context?: any): any;
|
|
441
|
+
once<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback: (...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void, context?: any): any;
|
|
433
442
|
once(name: string | object, callback: Function, context?: any): any;
|
|
443
|
+
trigger<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, ...args: import("@hatiolab/things-scene").ComponentEventMap[K]): any;
|
|
434
444
|
trigger(name: string, ...args: any[]): any;
|
|
435
445
|
delegate_on(delegator: any): any;
|
|
436
446
|
delegate_off(delegator: any): any;
|
|
437
447
|
onchange(after: Record<string, any>, before: Record<string, any>): void;
|
|
438
448
|
calculateBounds?(): void;
|
|
439
449
|
oncreate_element?(element: HTMLElement): void;
|
|
440
|
-
removeComponent(component: Component, ghost?: boolean): void;
|
|
441
|
-
addComponent(component: Component, ghost?: boolean): void;
|
|
442
|
-
insertComponentAt(component: Component, index: number, ghost?: boolean): void;
|
|
443
|
-
getOverlay(component: Component): HTMLElement | undefined;
|
|
444
|
-
findById(id: string): Component | undefined;
|
|
445
|
-
findByRefid(ref: string | number): Component | undefined;
|
|
446
|
-
findAllById(id: string): Component[];
|
|
450
|
+
removeComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
451
|
+
addComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
452
|
+
insertComponentAt(component: import("@hatiolab/things-scene").Component, index: number, ghost?: boolean): void;
|
|
453
|
+
getOverlay(component: import("@hatiolab/things-scene").Component): HTMLElement | undefined;
|
|
454
|
+
findById(id: string): import("@hatiolab/things-scene").Component | undefined;
|
|
455
|
+
findByRefid(ref: string | number): import("@hatiolab/things-scene").Component | undefined;
|
|
456
|
+
findAllById(id: string): import("@hatiolab/things-scene").Component[];
|
|
447
457
|
resize(): void;
|
|
448
458
|
fit(type?: string): void;
|
|
449
|
-
get components(): Component[] | undefined;
|
|
459
|
+
get components(): import("@hatiolab/things-scene").Component[] | undefined;
|
|
450
460
|
get layout(): any;
|
|
451
461
|
get auxOverlay(): HTMLElement | undefined;
|
|
452
462
|
get isReady(): boolean;
|
|
453
463
|
get unitScale(): number;
|
|
454
|
-
get selected(): Component[];
|
|
455
|
-
set selected(_v: Component[]): any;
|
|
456
|
-
get focused(): Component | null;
|
|
457
|
-
set focused(_v: Component | null): any;
|
|
464
|
+
get selected(): import("@hatiolab/things-scene").Component[];
|
|
465
|
+
set selected(_v: import("@hatiolab/things-scene").Component[]): any;
|
|
466
|
+
get focused(): import("@hatiolab/things-scene").Component | null;
|
|
467
|
+
set focused(_v: import("@hatiolab/things-scene").Component | null): any;
|
|
458
468
|
get hasSameParentForAllSelected(): boolean;
|
|
459
469
|
set hasSameParentForAllSelected(_v: boolean): any;
|
|
460
470
|
get fitMode(): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scenario-control.js","sourceRoot":"","sources":["../src/scenario-control.ts"],"names":[],"mappings":";;AAAA,OAAO,GAAG,MAAM,aAAa,CAAA;AAE7B,OAAO,
|
|
1
|
+
{"version":3,"file":"scenario-control.js","sourceRoot":"","sources":["../src/scenario-control.ts"],"names":[],"mappings":";;AAAA,OAAO,GAAG,MAAM,aAAa,CAAA;AAE7B,OAAO,EAEL,UAAU,EAEV,QAAQ,EACR,KAAK,EACL,cAAc,EACf,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,MAAM,EAAE,M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MAAM,CAAC,KAAK,CAAC;YAChC,KAAK,EAAE,GAAG,CAAA;UACN,KAAK;OACR;SACF,CAAC,CAAA;QAEF,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAA;IACtB,CAAC;CACF,CAAA;AAxEoB,eAAe;IADnC,cAAc,CAAC,kBAAkB,CAAC;GACd,eAAe,CAwEnC;eAxEoB,eAAe","sourcesContent":["import gql from 'graphql-tag'\n\nimport {\n ComponentNature,\n DataSource,\n Properties,\n RectPath,\n Shape,\n sceneComponent\n} from '@hatiolab/things-scene'\nimport { client } from '@operato/graphql'\n\nimport { scenarios } from './client-api.js'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'select',\n label: 'scenario-name',\n name: 'scenarioName',\n property: {\n options: scenarios\n }\n },\n {\n type: 'select',\n label: 'control-type',\n name: 'controlType',\n property: {\n options: [\n {\n display: '',\n value: ''\n },\n {\n display: 'start',\n value: 'start'\n },\n {\n display: 'stop',\n value: 'stop'\n }\n ]\n }\n }\n ],\n 'value-property': 'controlType',\n help: 'scene/component/scenario-control'\n}\n\n@sceneComponent('scenario-control')\nexport default class ScenarioControl extends DataSource(RectPath(Shape)) {\n static _image: HTMLImageElement\n\n static get image() {\n if (!ScenarioControl._image) {\n ScenarioControl._image = new Image()\n ScenarioControl._image.src = new URL('../icons/symbol-scenario-control.png', import.meta.url).href\n }\n return ScenarioControl._image\n }\n\n render(context: CanvasRenderingContext2D) {\n var { left, top, width, height } = this.bounds\n context.beginPath()\n this.drawImage(context, ScenarioControl.image, left, top, width, height)\n }\n\n async ready() {\n await super.ready()\n\n if (this.app.isViewMode) {\n this.requestData()\n }\n }\n\n get nature() {\n return NATURE\n }\n\n onchange(after: Properties) {\n if ('controlType' in after) {\n this.requestData()\n }\n }\n\n get controlType() {\n return this.getState('controlType')\n }\n\n set controlType(controlType) {\n this.setState('controlType', controlType)\n }\n\n async requestData() {\n let { controlType, scenarioName } = this.state\n if (!controlType || !scenarioName || !this.app.isViewMode) {\n return\n }\n\n var query = ''\n if (controlType == 'start') {\n query = `mutation{\n ${controlType}Scenario(instanceName: \"${scenarioName}\", scenarioName: \"${scenarioName}\", variables: {}) {\n state\n }\n }`\n } else {\n query = `mutation{\n ${controlType}Scenario(instanceName: \"${scenarioName}\") {\n state\n }\n }`\n }\n\n var response = await client.query({\n query: gql`\n ${query}\n `\n })\n\n this.data = response\n }\n}\n"]}
|