@operato/scene-integration 10.0.0-beta.22 → 10.0.0-beta.30
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 +37 -37
- package/dist/connection-control.js.map +1 -1
- package/dist/connection-state-subscription.d.ts +73 -73
- package/dist/connection-state-subscription.js.map +1 -1
- package/dist/data-subscription.d.ts +73 -73
- package/dist/data-subscription.js.map +1 -1
- package/dist/scenario-control.d.ts +73 -73
- package/dist/scenario-control.js.map +1 -1
- package/dist/scenario-instance-subscription.d.ts +73 -73
- package/dist/scenario-instance-subscription.js.map +1 -1
- package/dist/scenario-queue-subscription.d.ts +73 -73
- package/dist/scenario-queue-subscription.js.map +1 -1
- package/dist/scenario-run.d.ts +73 -73
- package/dist/scenario-run.js.map +1 -1
- package/dist/scenario-start.d.ts +73 -73
- package/dist/scenario-start.js.map +1 -1
- package/dist/scenario-stop.d.ts +73 -73
- package/dist/scenario-stop.js.map +1 -1
- package/package.json +2 -2
package/dist/scenario-run.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentNature, Properties, Shape } from '@hatiolab/things-scene';
|
|
2
2
|
declare const ScenarioRun_base: (new (...args: any[]) => {
|
|
3
3
|
_convertDataFormat(data: any, format: any): any;
|
|
4
4
|
isDataSource(): boolean;
|
|
@@ -32,7 +32,7 @@ declare const ScenarioRun_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,9 @@ declare const ScenarioRun_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
54
|
get hierarchy(): any;
|
|
55
55
|
get volatile(): never[];
|
|
56
56
|
_applyProps(target: any, props: any, options: any): any;
|
|
@@ -92,7 +92,7 @@ declare const ScenarioRun_base: (new (...args: any[]) => {
|
|
|
92
92
|
prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
93
93
|
render(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
94
94
|
postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
95
|
-
prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
|
|
95
|
+
prepare(resolve: (component: import("@hatiolab/things-scene").Component) => void, reject: (reason: any) => void): void;
|
|
96
96
|
prepareIf(condition: boolean): void;
|
|
97
97
|
drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
98
98
|
drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
@@ -143,16 +143,16 @@ declare const ScenarioRun_base: (new (...args: any[]) => {
|
|
|
143
143
|
get started(): boolean;
|
|
144
144
|
set started(v: boolean): any;
|
|
145
145
|
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;
|
|
146
|
+
findFirst(finder: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): import("@hatiolab/things-scene").Component | undefined;
|
|
147
|
+
findAll(s: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): any[] | undefined;
|
|
148
|
+
capture(x: number, y: number, except?: (c: import("@hatiolab/things-scene").Component) => boolean): any;
|
|
149
149
|
findAnchor(name: string): any;
|
|
150
|
-
isDescendible(container: Component): boolean;
|
|
150
|
+
isDescendible(container: import("@hatiolab/things-scene").Component): boolean;
|
|
151
151
|
getContext(component?: unknown): any;
|
|
152
|
-
get root(): Component;
|
|
153
|
-
get rootModel(): Component;
|
|
154
|
-
get parent(): Component;
|
|
155
|
-
set parent(v: Component): any;
|
|
152
|
+
get root(): import("@hatiolab/things-scene").Component;
|
|
153
|
+
get rootModel(): import("@hatiolab/things-scene").Component;
|
|
154
|
+
get parent(): import("@hatiolab/things-scene").Component;
|
|
155
|
+
set parent(v: import("@hatiolab/things-scene").Component): any;
|
|
156
156
|
get anchors(): import("@hatiolab/things-scene").Anchor[];
|
|
157
157
|
get scalable(): boolean;
|
|
158
158
|
get stuck(): boolean;
|
|
@@ -178,20 +178,20 @@ declare const ScenarioRun_base: (new (...args: any[]) => {
|
|
|
178
178
|
ondropfile(transfered: FileList, files: string[]): void;
|
|
179
179
|
transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
180
180
|
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;
|
|
181
|
+
transcoordS2T(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
182
|
+
transcoordT2P(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
183
|
+
transcoordT2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
184
|
+
transcoordS2TR(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
185
|
+
transcoordS2O(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
186
|
+
transcoordC2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
187
|
+
transcoordS2C(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
188
188
|
toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
189
189
|
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;
|
|
190
|
+
toScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
191
|
+
fromScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
192
|
+
toLocal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
193
|
+
toGlobal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
194
|
+
toOther(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
195
195
|
on(name: string | object, callback: Function, context?: any): any;
|
|
196
196
|
off(name?: string | object, callback?: Function, context?: any): any;
|
|
197
197
|
once(name: string | object, callback: Function, context?: any): any;
|
|
@@ -201,24 +201,24 @@ declare const ScenarioRun_base: (new (...args: any[]) => {
|
|
|
201
201
|
onchange(after: Record<string, any>, before: Record<string, any>): void;
|
|
202
202
|
calculateBounds?(): void;
|
|
203
203
|
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[];
|
|
204
|
+
removeComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
205
|
+
addComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
206
|
+
insertComponentAt(component: import("@hatiolab/things-scene").Component, index: number, ghost?: boolean): void;
|
|
207
|
+
getOverlay(component: import("@hatiolab/things-scene").Component): HTMLElement | undefined;
|
|
208
|
+
findById(id: string): import("@hatiolab/things-scene").Component | undefined;
|
|
209
|
+
findByRefid(ref: string | number): import("@hatiolab/things-scene").Component | undefined;
|
|
210
|
+
findAllById(id: string): import("@hatiolab/things-scene").Component[];
|
|
211
211
|
resize(): void;
|
|
212
212
|
fit(type?: string): void;
|
|
213
|
-
get components(): Component[] | undefined;
|
|
213
|
+
get components(): import("@hatiolab/things-scene").Component[] | undefined;
|
|
214
214
|
get layout(): any;
|
|
215
215
|
get auxOverlay(): HTMLElement | undefined;
|
|
216
216
|
get isReady(): boolean;
|
|
217
217
|
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;
|
|
218
|
+
get selected(): import("@hatiolab/things-scene").Component[];
|
|
219
|
+
set selected(_v: import("@hatiolab/things-scene").Component[]): any;
|
|
220
|
+
get focused(): import("@hatiolab/things-scene").Component | null;
|
|
221
|
+
set focused(_v: import("@hatiolab/things-scene").Component | null): any;
|
|
222
222
|
get hasSameParentForAllSelected(): boolean;
|
|
223
223
|
set hasSameParentForAllSelected(_v: boolean): any;
|
|
224
224
|
get fitMode(): string | undefined;
|
|
@@ -275,7 +275,7 @@ declare const ScenarioRun_base: (new (...args: any[]) => {
|
|
|
275
275
|
get disposed(): boolean;
|
|
276
276
|
isLayer(): boolean;
|
|
277
277
|
isGroup(): boolean;
|
|
278
|
-
isContainer(): this is import("@hatiolab/things-scene
|
|
278
|
+
isContainer(): this is import("@hatiolab/things-scene").Container;
|
|
279
279
|
isLine(): boolean;
|
|
280
280
|
isRoot(): boolean;
|
|
281
281
|
isRootModel(): boolean;
|
|
@@ -291,9 +291,9 @@ declare const ScenarioRun_base: (new (...args: any[]) => {
|
|
|
291
291
|
get(property: any): any;
|
|
292
292
|
set(props: any, propval?: any): any;
|
|
293
293
|
getState(property: any): any;
|
|
294
|
-
setState(props:
|
|
294
|
+
setState(props: Partial<import("@hatiolab/things-scene").State> | string, propval?: any): any;
|
|
295
295
|
get model(): any;
|
|
296
|
-
get state():
|
|
296
|
+
get state(): import("@hatiolab/things-scene").State;
|
|
297
297
|
get hierarchy(): any;
|
|
298
298
|
get volatile(): never[];
|
|
299
299
|
_applyProps(target: any, props: any, options: any): any;
|
|
@@ -329,7 +329,7 @@ declare const ScenarioRun_base: (new (...args: any[]) => {
|
|
|
329
329
|
draw(context?: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
330
330
|
prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
331
331
|
postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
332
|
-
prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
|
|
332
|
+
prepare(resolve: (component: import("@hatiolab/things-scene").Component) => void, reject: (reason: any) => void): void;
|
|
333
333
|
prepareIf(condition: boolean): void;
|
|
334
334
|
drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
335
335
|
drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
@@ -380,16 +380,16 @@ declare const ScenarioRun_base: (new (...args: any[]) => {
|
|
|
380
380
|
get started(): boolean;
|
|
381
381
|
set started(v: boolean): any;
|
|
382
382
|
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;
|
|
383
|
+
findFirst(finder: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): import("@hatiolab/things-scene").Component | undefined;
|
|
384
|
+
findAll(s: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): any[] | undefined;
|
|
385
|
+
capture(x: number, y: number, except?: (c: import("@hatiolab/things-scene").Component) => boolean): any;
|
|
386
386
|
findAnchor(name: string): any;
|
|
387
|
-
isDescendible(container: Component): boolean;
|
|
387
|
+
isDescendible(container: import("@hatiolab/things-scene").Component): boolean;
|
|
388
388
|
getContext(component?: unknown): any;
|
|
389
|
-
get root(): Component;
|
|
390
|
-
get rootModel(): Component;
|
|
391
|
-
get parent(): Component;
|
|
392
|
-
set parent(v: Component): any;
|
|
389
|
+
get root(): import("@hatiolab/things-scene").Component;
|
|
390
|
+
get rootModel(): import("@hatiolab/things-scene").Component;
|
|
391
|
+
get parent(): import("@hatiolab/things-scene").Component;
|
|
392
|
+
set parent(v: import("@hatiolab/things-scene").Component): any;
|
|
393
393
|
get scalable(): boolean;
|
|
394
394
|
get stuck(): boolean;
|
|
395
395
|
get capturable(): boolean;
|
|
@@ -414,20 +414,20 @@ declare const ScenarioRun_base: (new (...args: any[]) => {
|
|
|
414
414
|
ondropfile(transfered: FileList, files: string[]): void;
|
|
415
415
|
transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
416
416
|
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;
|
|
417
|
+
transcoordS2T(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
418
|
+
transcoordT2P(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
419
|
+
transcoordT2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
420
|
+
transcoordS2TR(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
421
|
+
transcoordS2O(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
422
|
+
transcoordC2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
423
|
+
transcoordS2C(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
424
424
|
toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
425
425
|
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;
|
|
426
|
+
toScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
427
|
+
fromScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
428
|
+
toLocal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
429
|
+
toGlobal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
430
|
+
toOther(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
431
431
|
on(name: string | object, callback: Function, context?: any): any;
|
|
432
432
|
off(name?: string | object, callback?: Function, context?: any): any;
|
|
433
433
|
once(name: string | object, callback: Function, context?: any): any;
|
|
@@ -437,24 +437,24 @@ declare const ScenarioRun_base: (new (...args: any[]) => {
|
|
|
437
437
|
onchange(after: Record<string, any>, before: Record<string, any>): void;
|
|
438
438
|
calculateBounds?(): void;
|
|
439
439
|
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[];
|
|
440
|
+
removeComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
441
|
+
addComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
442
|
+
insertComponentAt(component: import("@hatiolab/things-scene").Component, index: number, ghost?: boolean): void;
|
|
443
|
+
getOverlay(component: import("@hatiolab/things-scene").Component): HTMLElement | undefined;
|
|
444
|
+
findById(id: string): import("@hatiolab/things-scene").Component | undefined;
|
|
445
|
+
findByRefid(ref: string | number): import("@hatiolab/things-scene").Component | undefined;
|
|
446
|
+
findAllById(id: string): import("@hatiolab/things-scene").Component[];
|
|
447
447
|
resize(): void;
|
|
448
448
|
fit(type?: string): void;
|
|
449
|
-
get components(): Component[] | undefined;
|
|
449
|
+
get components(): import("@hatiolab/things-scene").Component[] | undefined;
|
|
450
450
|
get layout(): any;
|
|
451
451
|
get auxOverlay(): HTMLElement | undefined;
|
|
452
452
|
get isReady(): boolean;
|
|
453
453
|
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;
|
|
454
|
+
get selected(): import("@hatiolab/things-scene").Component[];
|
|
455
|
+
set selected(_v: import("@hatiolab/things-scene").Component[]): any;
|
|
456
|
+
get focused(): import("@hatiolab/things-scene").Component | null;
|
|
457
|
+
set focused(_v: import("@hatiolab/things-scene").Component | null): any;
|
|
458
458
|
get hasSameParentForAllSelected(): boolean;
|
|
459
459
|
set hasSameParentForAllSelected(_v: boolean): any;
|
|
460
460
|
get fitMode(): string | undefined;
|
package/dist/scenario-run.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scenario-run.js","sourceRoot":"","sources":["../src/scenario-run.ts"],"names":[],"mappings":";;AAAA,OAAO,GAAG,MAAM,aAAa,CAAA;AAE7B,OAAO,
|
|
1
|
+
{"version":3,"file":"scenario-run.js","sourceRoot":"","sources":["../src/scenario-run.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,MAAM,kBAAkB,CAAA;AAEzC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,cAAc;YACpB,QAAQ,EAAE;gBACR,OAAO,EAAE,SAAS;aACnB;SACF;QACD;YACE,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,WAAW;SAClB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,eAAe;SAC7B;QACD;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,cAAc;YACrB,IAAI,EAAE,YAAY;SACnB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,aAAa;YACnB,QAAQ,EAAE;gBACR,OAAO,EAAE;oBACP;wBACE,OAAO,EAAE,MAAM;wBACf,KAAK,EAAE,EAAE;qBACV;oBACD;wBACE,OAAO,EA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CAAA;gBACvE,IAAI,CAAC,IAAI,EAAE,CAAA;YACb,CAAC;oBAAS,CAAC;gBACT,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,EAAE,CAAC;oBAC7C,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;gBAC3E,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,IAAI;QACF,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;QAClC,IAAI,WAAW,EAAE,CAAC;YAChB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAW,CAAA;YAC7B,IAAI,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC;gBAChC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,GAAG,WAAW,CAAA;YAChD,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM;QACJ,MAAM,IAAI,GAAG,IAAI,CAAC,IAAW,CAAA;QAC7B,IAAI,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC;YAChC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAA;QAC3C,CAAC;IACH,CAAC;CACF,CAAA;AA1JoB,WAAW;IAD/B,cAAc,CAAC,cAAc,CAAC;GACV,WAAW,CA0J/B;eA1JoB,WAAW","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: 'data',\n label: 'variables',\n name: 'variables'\n },\n {\n type: 'number',\n label: 'repeat-interval',\n name: 'interval',\n placeholder: 'milli-seconds'\n },\n {\n type: 'checkbox',\n label: 'run-on-start',\n name: 'runOnStart'\n },\n {\n type: 'select',\n label: 'mask-on-error',\n name: 'maskOnError',\n property: {\n options: [\n {\n display: 'none',\n value: ''\n },\n {\n display: 'strong-blur',\n value: 'blur(4px)'\n },\n {\n display: 'weak-blur',\n value: 'blur(2px)'\n },\n {\n display: 'grayscale',\n value: 'grayscale(1)'\n }\n ]\n }\n }\n ],\n 'value-property': 'variables',\n help: 'scene/component/scenario-run'\n}\n\n@sceneComponent('scenario-run')\nexport default class ScenarioRun extends DataSource(RectPath(Shape)) {\n static _image: HTMLImageElement\n\n static get image() {\n if (!ScenarioRun._image) {\n ScenarioRun._image = new Image()\n ScenarioRun._image.src = new URL('../icons/symbol-scenario-run.png', import.meta.url).href\n }\n return ScenarioRun._image\n }\n\n private _started: boolean = false\n private _raf: number = 0\n private _timeout: NodeJS.Timeout | null = null\n\n render(context: CanvasRenderingContext2D) {\n var { left, top, width, height } = this.bounds\n context.beginPath()\n this.drawImage(context, ScenarioRun.image, left, top, width, height)\n }\n\n async ready() {\n await super.ready()\n\n if (this.app.isViewMode) {\n if (this.state.runOnStart) {\n this.started = true\n }\n }\n }\n\n dispose(): void {\n this.stop()\n super.dispose()\n }\n\n get nature() {\n return NATURE\n }\n\n onchange(after: Properties) {\n if ('variables' in after) {\n this.stop()\n this.start()\n }\n }\n\n set started(started: boolean) {\n this.setState('started')\n\n if (started) {\n this.start()\n } else {\n this.stop()\n }\n }\n\n get started() {\n return this.state.started\n }\n\n start() {\n if (this._started) {\n return\n }\n\n this._started = true\n\n this._raf = requestAnimationFrame(() => this.requestData())\n }\n\n stop() {\n if (!this._started) {\n return\n }\n\n this._started = false\n\n if (this._raf) {\n cancelAnimationFrame(this._raf)\n this._raf = 0\n }\n if (this._timeout) {\n clearTimeout(this._timeout)\n this._timeout = null\n }\n }\n\n get variables() {\n return this.state.variables\n }\n\n set variables(variables) {\n this.setState('variables', variables)\n }\n\n async requestData() {\n let { scenarioName, variables, maskOnError } = this.state\n if (!scenarioName || !this.app.isViewMode) {\n return\n }\n\n try {\n variables = typeof variables == 'string' ? JSON.parse(variables) : variables\n } catch (e) {\n console.warn('runScenario mutation variable is not an object')\n }\n\n if (client) {\n try {\n var response = await client.query({\n query: gql`\n mutation ($scenarioName: String!, $variables: Object) {\n runScenario(scenarioName: $scenarioName, variables: $variables) {\n message\n result\n }\n }\n `,\n variables: {\n scenarioName: scenarioName,\n variables\n }\n })\n\n this.data = response?.data?.runScenario?.result\n this.demask()\n } catch (e: any) {\n console.error(`calling runScenario mutation error: ${e?.message ?? e}`)\n this.mask()\n } finally {\n if (this._started && this.state.interval > 0) {\n this._timeout = setTimeout(() => this.requestData(), this.state.interval)\n }\n }\n }\n }\n\n mask() {\n const { maskOnError } = this.state\n if (maskOnError) {\n const root = this.root as any\n if (root?.target_element?.style) {\n root.target_element.style.filter = maskOnError\n }\n }\n }\n\n demask() {\n const root = this.root as any\n if (root?.target_element?.style) {\n root.target_element.style.filter = 'none'\n }\n }\n}\n"]}
|
package/dist/scenario-start.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentNature, Properties, Shape } from '@hatiolab/things-scene';
|
|
2
2
|
declare const ScenarioStart_base: (new (...args: any[]) => {
|
|
3
3
|
_convertDataFormat(data: any, format: any): any;
|
|
4
4
|
isDataSource(): boolean;
|
|
@@ -32,7 +32,7 @@ declare const ScenarioStart_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,9 @@ declare const ScenarioStart_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
54
|
get hierarchy(): any;
|
|
55
55
|
get volatile(): never[];
|
|
56
56
|
_applyProps(target: any, props: any, options: any): any;
|
|
@@ -92,7 +92,7 @@ declare const ScenarioStart_base: (new (...args: any[]) => {
|
|
|
92
92
|
prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
93
93
|
render(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
94
94
|
postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
95
|
-
prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
|
|
95
|
+
prepare(resolve: (component: import("@hatiolab/things-scene").Component) => void, reject: (reason: any) => void): void;
|
|
96
96
|
prepareIf(condition: boolean): void;
|
|
97
97
|
drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
98
98
|
drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
@@ -143,16 +143,16 @@ declare const ScenarioStart_base: (new (...args: any[]) => {
|
|
|
143
143
|
get started(): boolean;
|
|
144
144
|
set started(v: boolean): any;
|
|
145
145
|
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;
|
|
146
|
+
findFirst(finder: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): import("@hatiolab/things-scene").Component | undefined;
|
|
147
|
+
findAll(s: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): any[] | undefined;
|
|
148
|
+
capture(x: number, y: number, except?: (c: import("@hatiolab/things-scene").Component) => boolean): any;
|
|
149
149
|
findAnchor(name: string): any;
|
|
150
|
-
isDescendible(container: Component): boolean;
|
|
150
|
+
isDescendible(container: import("@hatiolab/things-scene").Component): boolean;
|
|
151
151
|
getContext(component?: unknown): any;
|
|
152
|
-
get root(): Component;
|
|
153
|
-
get rootModel(): Component;
|
|
154
|
-
get parent(): Component;
|
|
155
|
-
set parent(v: Component): any;
|
|
152
|
+
get root(): import("@hatiolab/things-scene").Component;
|
|
153
|
+
get rootModel(): import("@hatiolab/things-scene").Component;
|
|
154
|
+
get parent(): import("@hatiolab/things-scene").Component;
|
|
155
|
+
set parent(v: import("@hatiolab/things-scene").Component): any;
|
|
156
156
|
get anchors(): import("@hatiolab/things-scene").Anchor[];
|
|
157
157
|
get scalable(): boolean;
|
|
158
158
|
get stuck(): boolean;
|
|
@@ -178,20 +178,20 @@ declare const ScenarioStart_base: (new (...args: any[]) => {
|
|
|
178
178
|
ondropfile(transfered: FileList, files: string[]): void;
|
|
179
179
|
transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
180
180
|
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;
|
|
181
|
+
transcoordS2T(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
182
|
+
transcoordT2P(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
183
|
+
transcoordT2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
184
|
+
transcoordS2TR(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
185
|
+
transcoordS2O(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
186
|
+
transcoordC2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
187
|
+
transcoordS2C(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
188
188
|
toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
189
189
|
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;
|
|
190
|
+
toScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
191
|
+
fromScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
192
|
+
toLocal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
193
|
+
toGlobal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
194
|
+
toOther(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
195
195
|
on(name: string | object, callback: Function, context?: any): any;
|
|
196
196
|
off(name?: string | object, callback?: Function, context?: any): any;
|
|
197
197
|
once(name: string | object, callback: Function, context?: any): any;
|
|
@@ -201,24 +201,24 @@ declare const ScenarioStart_base: (new (...args: any[]) => {
|
|
|
201
201
|
onchange(after: Record<string, any>, before: Record<string, any>): void;
|
|
202
202
|
calculateBounds?(): void;
|
|
203
203
|
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[];
|
|
204
|
+
removeComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
205
|
+
addComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
206
|
+
insertComponentAt(component: import("@hatiolab/things-scene").Component, index: number, ghost?: boolean): void;
|
|
207
|
+
getOverlay(component: import("@hatiolab/things-scene").Component): HTMLElement | undefined;
|
|
208
|
+
findById(id: string): import("@hatiolab/things-scene").Component | undefined;
|
|
209
|
+
findByRefid(ref: string | number): import("@hatiolab/things-scene").Component | undefined;
|
|
210
|
+
findAllById(id: string): import("@hatiolab/things-scene").Component[];
|
|
211
211
|
resize(): void;
|
|
212
212
|
fit(type?: string): void;
|
|
213
|
-
get components(): Component[] | undefined;
|
|
213
|
+
get components(): import("@hatiolab/things-scene").Component[] | undefined;
|
|
214
214
|
get layout(): any;
|
|
215
215
|
get auxOverlay(): HTMLElement | undefined;
|
|
216
216
|
get isReady(): boolean;
|
|
217
217
|
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;
|
|
218
|
+
get selected(): import("@hatiolab/things-scene").Component[];
|
|
219
|
+
set selected(_v: import("@hatiolab/things-scene").Component[]): any;
|
|
220
|
+
get focused(): import("@hatiolab/things-scene").Component | null;
|
|
221
|
+
set focused(_v: import("@hatiolab/things-scene").Component | null): any;
|
|
222
222
|
get hasSameParentForAllSelected(): boolean;
|
|
223
223
|
set hasSameParentForAllSelected(_v: boolean): any;
|
|
224
224
|
get fitMode(): string | undefined;
|
|
@@ -275,7 +275,7 @@ declare const ScenarioStart_base: (new (...args: any[]) => {
|
|
|
275
275
|
get disposed(): boolean;
|
|
276
276
|
isLayer(): boolean;
|
|
277
277
|
isGroup(): boolean;
|
|
278
|
-
isContainer(): this is import("@hatiolab/things-scene
|
|
278
|
+
isContainer(): this is import("@hatiolab/things-scene").Container;
|
|
279
279
|
isLine(): boolean;
|
|
280
280
|
isRoot(): boolean;
|
|
281
281
|
isRootModel(): boolean;
|
|
@@ -291,9 +291,9 @@ declare const ScenarioStart_base: (new (...args: any[]) => {
|
|
|
291
291
|
get(property: any): any;
|
|
292
292
|
set(props: any, propval?: any): any;
|
|
293
293
|
getState(property: any): any;
|
|
294
|
-
setState(props:
|
|
294
|
+
setState(props: Partial<import("@hatiolab/things-scene").State> | string, propval?: any): any;
|
|
295
295
|
get model(): any;
|
|
296
|
-
get state():
|
|
296
|
+
get state(): import("@hatiolab/things-scene").State;
|
|
297
297
|
get hierarchy(): any;
|
|
298
298
|
get volatile(): never[];
|
|
299
299
|
_applyProps(target: any, props: any, options: any): any;
|
|
@@ -329,7 +329,7 @@ declare const ScenarioStart_base: (new (...args: any[]) => {
|
|
|
329
329
|
draw(context?: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
330
330
|
prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
331
331
|
postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
332
|
-
prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
|
|
332
|
+
prepare(resolve: (component: import("@hatiolab/things-scene").Component) => void, reject: (reason: any) => void): void;
|
|
333
333
|
prepareIf(condition: boolean): void;
|
|
334
334
|
drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
335
335
|
drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
@@ -380,16 +380,16 @@ declare const ScenarioStart_base: (new (...args: any[]) => {
|
|
|
380
380
|
get started(): boolean;
|
|
381
381
|
set started(v: boolean): any;
|
|
382
382
|
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;
|
|
383
|
+
findFirst(finder: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): import("@hatiolab/things-scene").Component | undefined;
|
|
384
|
+
findAll(s: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): any[] | undefined;
|
|
385
|
+
capture(x: number, y: number, except?: (c: import("@hatiolab/things-scene").Component) => boolean): any;
|
|
386
386
|
findAnchor(name: string): any;
|
|
387
|
-
isDescendible(container: Component): boolean;
|
|
387
|
+
isDescendible(container: import("@hatiolab/things-scene").Component): boolean;
|
|
388
388
|
getContext(component?: unknown): any;
|
|
389
|
-
get root(): Component;
|
|
390
|
-
get rootModel(): Component;
|
|
391
|
-
get parent(): Component;
|
|
392
|
-
set parent(v: Component): any;
|
|
389
|
+
get root(): import("@hatiolab/things-scene").Component;
|
|
390
|
+
get rootModel(): import("@hatiolab/things-scene").Component;
|
|
391
|
+
get parent(): import("@hatiolab/things-scene").Component;
|
|
392
|
+
set parent(v: import("@hatiolab/things-scene").Component): any;
|
|
393
393
|
get scalable(): boolean;
|
|
394
394
|
get stuck(): boolean;
|
|
395
395
|
get capturable(): boolean;
|
|
@@ -414,20 +414,20 @@ declare const ScenarioStart_base: (new (...args: any[]) => {
|
|
|
414
414
|
ondropfile(transfered: FileList, files: string[]): void;
|
|
415
415
|
transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
416
416
|
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;
|
|
417
|
+
transcoordS2T(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
418
|
+
transcoordT2P(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
419
|
+
transcoordT2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
420
|
+
transcoordS2TR(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
421
|
+
transcoordS2O(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
422
|
+
transcoordC2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
423
|
+
transcoordS2C(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
424
424
|
toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
425
425
|
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;
|
|
426
|
+
toScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
427
|
+
fromScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
428
|
+
toLocal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
429
|
+
toGlobal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
430
|
+
toOther(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
431
431
|
on(name: string | object, callback: Function, context?: any): any;
|
|
432
432
|
off(name?: string | object, callback?: Function, context?: any): any;
|
|
433
433
|
once(name: string | object, callback: Function, context?: any): any;
|
|
@@ -437,24 +437,24 @@ declare const ScenarioStart_base: (new (...args: any[]) => {
|
|
|
437
437
|
onchange(after: Record<string, any>, before: Record<string, any>): void;
|
|
438
438
|
calculateBounds?(): void;
|
|
439
439
|
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[];
|
|
440
|
+
removeComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
441
|
+
addComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
442
|
+
insertComponentAt(component: import("@hatiolab/things-scene").Component, index: number, ghost?: boolean): void;
|
|
443
|
+
getOverlay(component: import("@hatiolab/things-scene").Component): HTMLElement | undefined;
|
|
444
|
+
findById(id: string): import("@hatiolab/things-scene").Component | undefined;
|
|
445
|
+
findByRefid(ref: string | number): import("@hatiolab/things-scene").Component | undefined;
|
|
446
|
+
findAllById(id: string): import("@hatiolab/things-scene").Component[];
|
|
447
447
|
resize(): void;
|
|
448
448
|
fit(type?: string): void;
|
|
449
|
-
get components(): Component[] | undefined;
|
|
449
|
+
get components(): import("@hatiolab/things-scene").Component[] | undefined;
|
|
450
450
|
get layout(): any;
|
|
451
451
|
get auxOverlay(): HTMLElement | undefined;
|
|
452
452
|
get isReady(): boolean;
|
|
453
453
|
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;
|
|
454
|
+
get selected(): import("@hatiolab/things-scene").Component[];
|
|
455
|
+
set selected(_v: import("@hatiolab/things-scene").Component[]): any;
|
|
456
|
+
get focused(): import("@hatiolab/things-scene").Component | null;
|
|
457
|
+
set focused(_v: import("@hatiolab/things-scene").Component | null): any;
|
|
458
458
|
get hasSameParentForAllSelected(): boolean;
|
|
459
459
|
set hasSameParentForAllSelected(_v: boolean): any;
|
|
460
460
|
get fitMode(): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scenario-start.js","sourceRoot":"","sources":["../src/scenario-start.ts"],"names":[],"mappings":";;AAAA,OAAO,GAAG,MAAM,aAAa,CAAA;AAE7B,OAAO,
|
|
1
|
+
{"version":3,"file":"scenario-start.js","sourceRoot":"","sources":["../src/scenario-start.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,MAAM,kBAAkB,CAAA;AAEzC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,cAAc;SACrB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,cAAc;YACpB,QAAQ,EAAE;gBACR,OAAO,EAAE,SAAS;aACnB;SACF;QACD;YACE,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,WAAW;SAClB;KACF;IACD,gBAAgB,EAAE,WAAW;IAC7B,IAAI,EAAE,gCAAgC;CACvC,CAAA;AAGc,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;;IACpE,MAAM,CAAC,MAAM,CAAkB;IAE/B,MAAM,KAAK,KAAK;QACd,IAAI,CAAC,eAAa,C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,CAAC,CAAC,SAAS,CAAA;QAC9E,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;QAClB,CAAC;QAED,IAAI,MAAM,EAAE,CAAC;YACX,IAAI,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;gBAChC,KAAK,EAAE,GAAG,CAAA;;;;;;SAMT;gBACD,SAAS,EAAE;oBACT,YAAY,EAAE,YAAY;oBAC1B,YAAY,EAAE,YAAY;oBAC1B,SAAS;iBACV;aACF,CAAC,CAAA;YAEF,IAAI,CAAC,IAAI,GAAG,QAAQ,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,CAAA;QAClD,CAAC;IACH,CAAC;CACF,CAAA;AAhEoB,aAAa;IADjC,cAAc,CAAC,gBAAgB,CAAC;GACZ,aAAa,CAgEjC;eAhEoB,aAAa","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: 'string',\n label: 'instance-name',\n name: 'instanceName'\n },\n {\n type: 'select',\n label: 'scenario-name',\n name: 'scenarioName',\n property: {\n options: scenarios\n }\n },\n {\n type: 'data',\n label: 'variables',\n name: 'variables'\n }\n ],\n 'value-property': 'variables',\n help: 'scene/component/scenario-start'\n}\n\n@sceneComponent('scenario-start')\nexport default class ScenarioStart extends DataSource(RectPath(Shape)) {\n static _image: HTMLImageElement\n\n static get image() {\n if (!ScenarioStart._image) {\n ScenarioStart._image = new Image()\n ScenarioStart._image.src = new URL('../icons/symbol-scenario-start.png', import.meta.url).href\n }\n return ScenarioStart._image\n }\n\n render(context: CanvasRenderingContext2D) {\n var { left, top, width, height } = this.bounds\n context.beginPath()\n this.drawImage(context, ScenarioStart.image, left, top, width, height)\n }\n\n get nature() {\n return NATURE\n }\n\n async onchange(after: Properties) {\n if ('variables' in after) {\n this.requestData()\n }\n }\n\n get variables() {\n return this.state.variables\n }\n\n set variables(variables) {\n this.setState('variables', variables)\n }\n\n async requestData() {\n let { instanceName, scenarioName, variables } = this.state\n if (!scenarioName || !this.app.isViewMode) return\n\n try {\n variables = typeof variables == 'string' ? JSON.parse(variables) : variables\n } catch (e) {\n console.error(e)\n }\n\n if (client) {\n var response = await client.query({\n query: gql`\n mutation ($instanceName: String, $scenarioName: String!, $variables: Object) {\n startScenario(instanceName: $instanceName, scenarioName: $scenarioName, variables: $variables) {\n state\n }\n }\n `,\n variables: {\n instanceName: instanceName,\n scenarioName: scenarioName,\n variables\n }\n })\n\n this.data = response?.data?.startScenario?.state\n }\n }\n}\n"]}
|