@operato/scene-graphql 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/graphql-client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApolloClient, NormalizedCacheObject } from '@apollo/client/core/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentNature, Shape } from '@hatiolab/things-scene';
|
|
3
3
|
declare const GraphqlClient_base: (new (...args: any[]) => {
|
|
4
4
|
_convertDataFormat(data: any, format: any): any;
|
|
5
5
|
isDataSource(): boolean;
|
|
@@ -33,7 +33,7 @@ declare const GraphqlClient_base: (new (...args: any[]) => {
|
|
|
33
33
|
get disposed(): boolean;
|
|
34
34
|
isLayer(): boolean;
|
|
35
35
|
isGroup(): boolean;
|
|
36
|
-
isContainer(): this is import("@hatiolab/things-scene
|
|
36
|
+
isContainer(): this is import("@hatiolab/things-scene").Container;
|
|
37
37
|
isLine(): boolean;
|
|
38
38
|
isRoot(): boolean;
|
|
39
39
|
isRootModel(): boolean;
|
|
@@ -49,9 +49,10 @@ declare const GraphqlClient_base: (new (...args: any[]) => {
|
|
|
49
49
|
get(property: any): any;
|
|
50
50
|
set(props: any, propval?: any): any;
|
|
51
51
|
getState(property: any): any;
|
|
52
|
-
setState(props:
|
|
52
|
+
setState(props: Partial<import("@hatiolab/things-scene").State> | string, propval?: any): any;
|
|
53
53
|
get model(): any;
|
|
54
|
-
get state():
|
|
54
|
+
get state(): import("@hatiolab/things-scene").State;
|
|
55
|
+
get refid(): any;
|
|
55
56
|
get hierarchy(): any;
|
|
56
57
|
get volatile(): never[];
|
|
57
58
|
_applyProps(target: any, props: any, options: any): any;
|
|
@@ -93,7 +94,7 @@ declare const GraphqlClient_base: (new (...args: any[]) => {
|
|
|
93
94
|
prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
94
95
|
render(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
95
96
|
postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
96
|
-
prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
|
|
97
|
+
prepare(resolve: (component: import("@hatiolab/things-scene").Component) => void, reject: (reason: any) => void): void;
|
|
97
98
|
prepareIf(condition: boolean): void;
|
|
98
99
|
drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
99
100
|
drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
@@ -144,16 +145,16 @@ declare const GraphqlClient_base: (new (...args: any[]) => {
|
|
|
144
145
|
get started(): boolean;
|
|
145
146
|
set started(v: boolean): any;
|
|
146
147
|
get controls(): import("@hatiolab/things-scene").Control[] | undefined;
|
|
147
|
-
findFirst(finder: string | ((c: Component) => boolean), ...others: any[]): Component | undefined;
|
|
148
|
-
findAll(s: string | ((c: Component) => boolean), ...others: any[]): any[] | undefined;
|
|
149
|
-
capture(x: number, y: number, except?: (c: Component) => boolean): any;
|
|
148
|
+
findFirst(finder: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): import("@hatiolab/things-scene").Component | undefined;
|
|
149
|
+
findAll(s: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): any[] | undefined;
|
|
150
|
+
capture(x: number, y: number, except?: (c: import("@hatiolab/things-scene").Component) => boolean): any;
|
|
150
151
|
findAnchor(name: string): any;
|
|
151
|
-
isDescendible(container: Component): boolean;
|
|
152
|
+
isDescendible(container: import("@hatiolab/things-scene").Component | any): boolean;
|
|
152
153
|
getContext(component?: unknown): any;
|
|
153
|
-
get root(): Component;
|
|
154
|
-
get rootModel(): Component;
|
|
155
|
-
get parent(): Component;
|
|
156
|
-
set parent(v: Component): any;
|
|
154
|
+
get root(): import("@hatiolab/things-scene").Component;
|
|
155
|
+
get rootModel(): import("@hatiolab/things-scene").Component;
|
|
156
|
+
get parent(): import("@hatiolab/things-scene").Component;
|
|
157
|
+
set parent(v: import("@hatiolab/things-scene").Component): any;
|
|
157
158
|
get anchors(): import("@hatiolab/things-scene").Anchor[];
|
|
158
159
|
get scalable(): boolean;
|
|
159
160
|
get stuck(): boolean;
|
|
@@ -179,47 +180,51 @@ declare const GraphqlClient_base: (new (...args: any[]) => {
|
|
|
179
180
|
ondropfile(transfered: FileList, files: string[]): void;
|
|
180
181
|
transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
181
182
|
transcoordP2S(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
182
|
-
transcoordS2T(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
183
|
-
transcoordT2P(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
184
|
-
transcoordT2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
185
|
-
transcoordS2TR(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
186
|
-
transcoordS2O(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
187
|
-
transcoordC2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
188
|
-
transcoordS2C(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
183
|
+
transcoordS2T(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
184
|
+
transcoordT2P(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
185
|
+
transcoordT2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
186
|
+
transcoordS2TR(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
187
|
+
transcoordS2O(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
188
|
+
transcoordC2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
189
|
+
transcoordS2C(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
189
190
|
toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
190
191
|
fromParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
191
|
-
toScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
192
|
-
fromScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
193
|
-
toLocal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
194
|
-
toGlobal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
195
|
-
toOther(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
192
|
+
toScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
193
|
+
fromScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
194
|
+
toLocal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
195
|
+
toGlobal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
196
|
+
toOther(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
197
|
+
on<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback: (...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void, context?: any): any;
|
|
196
198
|
on(name: string | object, callback: Function, context?: any): any;
|
|
199
|
+
off<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback?: ((...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void) | undefined, context?: any): any;
|
|
197
200
|
off(name?: string | object, callback?: Function, context?: any): any;
|
|
201
|
+
once<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback: (...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void, context?: any): any;
|
|
198
202
|
once(name: string | object, callback: Function, context?: any): any;
|
|
203
|
+
trigger<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, ...args: import("@hatiolab/things-scene").ComponentEventMap[K]): any;
|
|
199
204
|
trigger(name: string, ...args: any[]): any;
|
|
200
205
|
delegate_on(delegator: any): any;
|
|
201
206
|
delegate_off(delegator: any): any;
|
|
202
207
|
onchange(after: Record<string, any>, before: Record<string, any>): void;
|
|
203
208
|
calculateBounds?(): void;
|
|
204
209
|
oncreate_element?(element: HTMLElement): void;
|
|
205
|
-
removeComponent(component: Component, ghost?: boolean): void;
|
|
206
|
-
addComponent(component: Component, ghost?: boolean): void;
|
|
207
|
-
insertComponentAt(component: Component, index: number, ghost?: boolean): void;
|
|
208
|
-
getOverlay(component: Component): HTMLElement | undefined;
|
|
209
|
-
findById(id: string): Component | undefined;
|
|
210
|
-
findByRefid(ref: string | number): Component | undefined;
|
|
211
|
-
findAllById(id: string): Component[];
|
|
210
|
+
removeComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
211
|
+
addComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
212
|
+
insertComponentAt(component: import("@hatiolab/things-scene").Component, index: number, ghost?: boolean): void;
|
|
213
|
+
getOverlay(component: import("@hatiolab/things-scene").Component): HTMLElement | undefined;
|
|
214
|
+
findById(id: string): import("@hatiolab/things-scene").Component | undefined;
|
|
215
|
+
findByRefid(ref: string | number): import("@hatiolab/things-scene").Component | undefined;
|
|
216
|
+
findAllById(id: string): import("@hatiolab/things-scene").Component[];
|
|
212
217
|
resize(): void;
|
|
213
218
|
fit(type?: string): void;
|
|
214
|
-
get components(): Component[] | undefined;
|
|
219
|
+
get components(): import("@hatiolab/things-scene").Component[] | undefined;
|
|
215
220
|
get layout(): any;
|
|
216
221
|
get auxOverlay(): HTMLElement | undefined;
|
|
217
222
|
get isReady(): boolean;
|
|
218
223
|
get unitScale(): number;
|
|
219
|
-
get selected(): Component[];
|
|
220
|
-
set selected(_v: Component[]): any;
|
|
221
|
-
get focused(): Component | null;
|
|
222
|
-
set focused(_v: Component | null): any;
|
|
224
|
+
get selected(): import("@hatiolab/things-scene").Component[];
|
|
225
|
+
set selected(_v: import("@hatiolab/things-scene").Component[]): any;
|
|
226
|
+
get focused(): import("@hatiolab/things-scene").Component | null;
|
|
227
|
+
set focused(_v: import("@hatiolab/things-scene").Component | null): any;
|
|
223
228
|
get hasSameParentForAllSelected(): boolean;
|
|
224
229
|
set hasSameParentForAllSelected(_v: boolean): any;
|
|
225
230
|
get fitMode(): string | undefined;
|
|
@@ -276,7 +281,7 @@ declare const GraphqlClient_base: (new (...args: any[]) => {
|
|
|
276
281
|
get disposed(): boolean;
|
|
277
282
|
isLayer(): boolean;
|
|
278
283
|
isGroup(): boolean;
|
|
279
|
-
isContainer(): this is import("@hatiolab/things-scene
|
|
284
|
+
isContainer(): this is import("@hatiolab/things-scene").Container;
|
|
280
285
|
isLine(): boolean;
|
|
281
286
|
isRoot(): boolean;
|
|
282
287
|
isRootModel(): boolean;
|
|
@@ -292,9 +297,10 @@ declare const GraphqlClient_base: (new (...args: any[]) => {
|
|
|
292
297
|
get(property: any): any;
|
|
293
298
|
set(props: any, propval?: any): any;
|
|
294
299
|
getState(property: any): any;
|
|
295
|
-
setState(props:
|
|
300
|
+
setState(props: Partial<import("@hatiolab/things-scene").State> | string, propval?: any): any;
|
|
296
301
|
get model(): any;
|
|
297
|
-
get state():
|
|
302
|
+
get state(): import("@hatiolab/things-scene").State;
|
|
303
|
+
get refid(): any;
|
|
298
304
|
get hierarchy(): any;
|
|
299
305
|
get volatile(): never[];
|
|
300
306
|
_applyProps(target: any, props: any, options: any): any;
|
|
@@ -330,7 +336,7 @@ declare const GraphqlClient_base: (new (...args: any[]) => {
|
|
|
330
336
|
draw(context?: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
331
337
|
prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
332
338
|
postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
333
|
-
prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
|
|
339
|
+
prepare(resolve: (component: import("@hatiolab/things-scene").Component) => void, reject: (reason: any) => void): void;
|
|
334
340
|
prepareIf(condition: boolean): void;
|
|
335
341
|
drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
336
342
|
drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
@@ -381,16 +387,16 @@ declare const GraphqlClient_base: (new (...args: any[]) => {
|
|
|
381
387
|
get started(): boolean;
|
|
382
388
|
set started(v: boolean): any;
|
|
383
389
|
get controls(): import("@hatiolab/things-scene").Control[] | undefined;
|
|
384
|
-
findFirst(finder: string | ((c: Component) => boolean), ...others: any[]): Component | undefined;
|
|
385
|
-
findAll(s: string | ((c: Component) => boolean), ...others: any[]): any[] | undefined;
|
|
386
|
-
capture(x: number, y: number, except?: (c: Component) => boolean): any;
|
|
390
|
+
findFirst(finder: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): import("@hatiolab/things-scene").Component | undefined;
|
|
391
|
+
findAll(s: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): any[] | undefined;
|
|
392
|
+
capture(x: number, y: number, except?: (c: import("@hatiolab/things-scene").Component) => boolean): any;
|
|
387
393
|
findAnchor(name: string): any;
|
|
388
|
-
isDescendible(container: Component): boolean;
|
|
394
|
+
isDescendible(container: import("@hatiolab/things-scene").Component | any): boolean;
|
|
389
395
|
getContext(component?: unknown): any;
|
|
390
|
-
get root(): Component;
|
|
391
|
-
get rootModel(): Component;
|
|
392
|
-
get parent(): Component;
|
|
393
|
-
set parent(v: Component): any;
|
|
396
|
+
get root(): import("@hatiolab/things-scene").Component;
|
|
397
|
+
get rootModel(): import("@hatiolab/things-scene").Component;
|
|
398
|
+
get parent(): import("@hatiolab/things-scene").Component;
|
|
399
|
+
set parent(v: import("@hatiolab/things-scene").Component): any;
|
|
394
400
|
get scalable(): boolean;
|
|
395
401
|
get stuck(): boolean;
|
|
396
402
|
get capturable(): boolean;
|
|
@@ -415,47 +421,51 @@ declare const GraphqlClient_base: (new (...args: any[]) => {
|
|
|
415
421
|
ondropfile(transfered: FileList, files: string[]): void;
|
|
416
422
|
transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
417
423
|
transcoordP2S(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
418
|
-
transcoordS2T(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
419
|
-
transcoordT2P(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
420
|
-
transcoordT2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
421
|
-
transcoordS2TR(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
422
|
-
transcoordS2O(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
423
|
-
transcoordC2S(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
424
|
-
transcoordS2C(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
424
|
+
transcoordS2T(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
425
|
+
transcoordT2P(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
426
|
+
transcoordT2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
427
|
+
transcoordS2TR(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
428
|
+
transcoordS2O(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
429
|
+
transcoordC2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
430
|
+
transcoordS2C(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
425
431
|
toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
426
432
|
fromParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
427
|
-
toScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
428
|
-
fromScene(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
429
|
-
toLocal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
430
|
-
toGlobal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
431
|
-
toOther(x: number, y: number, target: Component): import("@hatiolab/things-scene").POINT;
|
|
433
|
+
toScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
434
|
+
fromScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
435
|
+
toLocal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
436
|
+
toGlobal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
437
|
+
toOther(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
438
|
+
on<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback: (...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void, context?: any): any;
|
|
432
439
|
on(name: string | object, callback: Function, context?: any): any;
|
|
440
|
+
off<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback?: ((...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void) | undefined, context?: any): any;
|
|
433
441
|
off(name?: string | object, callback?: Function, context?: any): any;
|
|
442
|
+
once<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, callback: (...args: import("@hatiolab/things-scene").ComponentEventMap[K]) => void, context?: any): any;
|
|
434
443
|
once(name: string | object, callback: Function, context?: any): any;
|
|
444
|
+
trigger<K extends keyof import("@hatiolab/things-scene").ComponentEventMap>(name: K, ...args: import("@hatiolab/things-scene").ComponentEventMap[K]): any;
|
|
435
445
|
trigger(name: string, ...args: any[]): any;
|
|
436
446
|
delegate_on(delegator: any): any;
|
|
437
447
|
delegate_off(delegator: any): any;
|
|
438
448
|
onchange(after: Record<string, any>, before: Record<string, any>): void;
|
|
439
449
|
calculateBounds?(): void;
|
|
440
450
|
oncreate_element?(element: HTMLElement): void;
|
|
441
|
-
removeComponent(component: Component, ghost?: boolean): void;
|
|
442
|
-
addComponent(component: Component, ghost?: boolean): void;
|
|
443
|
-
insertComponentAt(component: Component, index: number, ghost?: boolean): void;
|
|
444
|
-
getOverlay(component: Component): HTMLElement | undefined;
|
|
445
|
-
findById(id: string): Component | undefined;
|
|
446
|
-
findByRefid(ref: string | number): Component | undefined;
|
|
447
|
-
findAllById(id: string): Component[];
|
|
451
|
+
removeComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
452
|
+
addComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
453
|
+
insertComponentAt(component: import("@hatiolab/things-scene").Component, index: number, ghost?: boolean): void;
|
|
454
|
+
getOverlay(component: import("@hatiolab/things-scene").Component): HTMLElement | undefined;
|
|
455
|
+
findById(id: string): import("@hatiolab/things-scene").Component | undefined;
|
|
456
|
+
findByRefid(ref: string | number): import("@hatiolab/things-scene").Component | undefined;
|
|
457
|
+
findAllById(id: string): import("@hatiolab/things-scene").Component[];
|
|
448
458
|
resize(): void;
|
|
449
459
|
fit(type?: string): void;
|
|
450
|
-
get components(): Component[] | undefined;
|
|
460
|
+
get components(): import("@hatiolab/things-scene").Component[] | undefined;
|
|
451
461
|
get layout(): any;
|
|
452
462
|
get auxOverlay(): HTMLElement | undefined;
|
|
453
463
|
get isReady(): boolean;
|
|
454
464
|
get unitScale(): number;
|
|
455
|
-
get selected(): Component[];
|
|
456
|
-
set selected(_v: Component[]): any;
|
|
457
|
-
get focused(): Component | null;
|
|
458
|
-
set focused(_v: Component | null): any;
|
|
465
|
+
get selected(): import("@hatiolab/things-scene").Component[];
|
|
466
|
+
set selected(_v: import("@hatiolab/things-scene").Component[]): any;
|
|
467
|
+
get focused(): import("@hatiolab/things-scene").Component | null;
|
|
468
|
+
set focused(_v: import("@hatiolab/things-scene").Component | null): any;
|
|
459
469
|
get hasSameParentForAllSelected(): boolean;
|
|
460
470
|
set hasSameParentForAllSelected(_v: boolean): any;
|
|
461
471
|
get fitMode(): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-client.js","sourceRoot":"","sources":["../src/graphql-client.ts"],"names":[],"mappings":"AAAA;;GAEG;;;AAEH,OAAO,EACL,YAAY,EAEZ,IAAI,EACJ,QAAQ,EAER,aAAa,EAGd,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAa,OAAO,EAAE,MAAM,oCAAoC,CAAA;AACvE,OAAO,
|
|
1
|
+
{"version":3,"file":"graphql-client.js","sourceRoot":"","sources":["../src/graphql-client.ts"],"names":[],"mappings":"AAAA;;GAEG;;;AAEH,OAAO,EACL,YAAY,EAEZ,IAAI,EACJ,QAAQ,EAER,aAAa,EAGd,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAa,OAAO,EAAE,MAAM,oCAAoC,CAAA;AACvE,OAAO,EAAmB,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAErG,MAAM,cAAc,GAAmB;IACrC,UAAU,EAAE;QACV,WAAW,EAAE,UAAU;QACvB,WAAW,EAA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AAM,CAAC,CAAA;IACxE,CAAC;IAED,YAAY,CAAC,IAAS,EAAE,MAAW;QACjC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IAClC,CAAC;IAED,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA;AA7EoB,aAAa;IADjC,cAAc,CAAC,gBAAgB,CAAC;GACZ,aAAa,CA6EjC;eA7EoB,aAAa","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport {\n ApolloClient,\n DefaultOptions,\n from,\n HttpLink,\n HttpOptions,\n InMemoryCache,\n NormalizedCacheObject,\n ServerParseError\n} from '@apollo/client/core/index.js'\nimport { ErrorLink, onError } from '@apollo/client/link/error/index.js'\nimport { ComponentNature, DataSource, RectPath, Shape, sceneComponent } from '@hatiolab/things-scene'\n\nconst defaultOptions: DefaultOptions = {\n watchQuery: {\n fetchPolicy: 'no-cache',\n errorPolicy: 'ignore'\n },\n query: {\n fetchPolicy: 'no-cache', //'network-only'\n errorPolicy: 'all'\n },\n mutate: {\n errorPolicy: 'all'\n }\n}\n\nconst ERROR_HANDLER: ErrorLink.ErrorHandler = ({ operation, graphQLErrors, networkError }) => {\n if (graphQLErrors) {\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level: 'error',\n message: graphQLErrors[0].message,\n ex: graphQLErrors\n }\n })\n )\n }\n\n if (networkError) {\n /* networkError가 ServerParseError 이거나 ServerError 인 경우에만 statusCode를 갖는다. */\n switch ((networkError as ServerParseError).statusCode) {\n case undefined /* in case this error is not a server side error */:\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level: 'error',\n message: networkError.message,\n ex: networkError\n }\n })\n )\n break\n\n case 401:\n /* 401 에러가 리턴되면, 인증이 필요하다는 메시지를 dispatch 한다. 이 auth 모듈 등에서 이 메시지를 받아서 signin 프로세스를 진행할 수 있다. */\n document.dispatchEvent(new CustomEvent('auth-required'))\n break\n\n case 403:\n /* 403 에러가 리턴되면, 도메인 정보가 필요하다는 메시지를 dispatch 한다. 이 auth 모듈 등에서 이 메시지를 받아서 domain-register 프로세스 등을 진행할 수 있다. */\n document.dispatchEvent(new CustomEvent('domain-required'))\n break\n\n default:\n var { name, response, statusCode, bodyText, message } = networkError as ServerParseError\n if (name == 'ServerParseError') {\n message = `[ ${statusCode || ''} : ${response.statusText} ] ${bodyText}`\n } else {\n /* in case this error is instanceof ServerError */\n message = `[ ${statusCode || ''} : ${response.statusText} ] ${message}`\n }\n\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level: 'error',\n message,\n ex: networkError\n }\n })\n )\n }\n }\n}\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'string',\n label: 'endpoint',\n name: 'endpoint'\n }\n ],\n help: 'scene/component/graphql'\n}\n\n@sceneComponent('graphql-client')\nexport default class GraphqlClient extends DataSource(RectPath(Shape)) {\n private static _image: HTMLImageElement\n private _client?: ApolloClient<NormalizedCacheObject>\n\n static get image() {\n if (!GraphqlClient._image) {\n GraphqlClient._image = new Image()\n GraphqlClient._image.src = new URL('../icons/symbol-graphql-client.png', import.meta.url).href\n }\n\n return GraphqlClient._image\n }\n\n async ready() {\n await super.ready()\n\n this.init()\n }\n\n init() {\n var { endpoint } = this.state\n\n if (!endpoint) {\n console.warn('endpoint not defined')\n return\n }\n\n var cache = new InMemoryCache()\n const httpOptions: HttpOptions = {\n uri: endpoint,\n credentials: 'include'\n }\n\n const client = new ApolloClient({\n defaultOptions,\n cache,\n link: from([onError(ERROR_HANDLER), new HttpLink(httpOptions)])\n })\n\n this._client = client\n }\n\n get client(): ApolloClient<NormalizedCacheObject> | undefined {\n return this._client\n }\n\n dispose() {\n super.dispose()\n\n try {\n if (this._client) {\n this._client.stop()\n }\n } catch (e) {\n console.error(e)\n }\n delete this._client\n }\n\n render(context: CanvasRenderingContext2D) {\n /*\n * TODO role이 publisher 인지 subscriber 인지에 따라서 구분할 수 있는 표시를 추가할 것.\n */\n\n var { left, top, width, height } = this.bounds\n\n context.beginPath()\n this.drawImage(context, GraphqlClient.image, left, top, width, height)\n }\n\n onchangeData(data: any, before: any) {\n super.onchangeData(data, before)\n }\n\n get nature() {\n return NATURE\n }\n}\n"]}
|
|
@@ -32,7 +32,7 @@ declare const GraphQLQuery_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 GraphQLQuery_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;
|
|
@@ -147,7 +148,7 @@ declare const GraphQLQuery_base: (new (...args: any[]) => {
|
|
|
147
148
|
findAll(s: string | ((c: Component) => boolean), ...others: any[]): any[] | undefined;
|
|
148
149
|
capture(x: number, y: number, except?: (c: Component) => boolean): any;
|
|
149
150
|
findAnchor(name: string): any;
|
|
150
|
-
isDescendible(container: Component): boolean;
|
|
151
|
+
isDescendible(container: Component | any): boolean;
|
|
151
152
|
getContext(component?: unknown): any;
|
|
152
153
|
get root(): Component;
|
|
153
154
|
get rootModel(): Component;
|
|
@@ -192,9 +193,13 @@ declare const GraphQLQuery_base: (new (...args: any[]) => {
|
|
|
192
193
|
toLocal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
193
194
|
toGlobal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
194
195
|
toOther(x: number, y: number, target: 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;
|
|
@@ -275,7 +280,7 @@ declare const GraphQLQuery_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 GraphQLQuery_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;
|
|
@@ -384,7 +390,7 @@ declare const GraphQLQuery_base: (new (...args: any[]) => {
|
|
|
384
390
|
findAll(s: string | ((c: Component) => boolean), ...others: any[]): any[] | undefined;
|
|
385
391
|
capture(x: number, y: number, except?: (c: Component) => boolean): any;
|
|
386
392
|
findAnchor(name: string): any;
|
|
387
|
-
isDescendible(container: Component): boolean;
|
|
393
|
+
isDescendible(container: Component | any): boolean;
|
|
388
394
|
getContext(component?: unknown): any;
|
|
389
395
|
get root(): Component;
|
|
390
396
|
get rootModel(): Component;
|
|
@@ -428,9 +434,13 @@ declare const GraphQLQuery_base: (new (...args: any[]) => {
|
|
|
428
434
|
toLocal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
429
435
|
toGlobal(x: number, y: number, top?: Component): import("@hatiolab/things-scene").POINT;
|
|
430
436
|
toOther(x: number, y: number, target: 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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentNature, Shape } from '@hatiolab/things-scene';
|
|
2
2
|
declare const GraphqlSubscription_base: (new (...args: any[]) => {
|
|
3
3
|
_convertDataFormat(data: any, format: any): any;
|
|
4
4
|
isDataSource(): boolean;
|
|
@@ -32,7 +32,7 @@ declare const GraphqlSubscription_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 GraphqlSubscription_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 GraphqlSubscription_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 GraphqlSubscription_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 GraphqlSubscription_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 GraphqlSubscription_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 GraphqlSubscription_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 GraphqlSubscription_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 GraphqlSubscription_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 GraphqlSubscription_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":"graphql-subscription.js","sourceRoot":"","sources":["../src/graphql-subscription.ts"],"names":[],"mappings":"AAAA;;GAEG;;;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AAEjC,OAAO,
|
|
1
|
+
{"version":3,"file":"graphql-subscription.js","sourceRoot":"","sources":["../src/graphql-subscription.ts"],"names":[],"mappings":"AAAA;;GAEG;;;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AAEjC,OAAO,EAAmB,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AACrG,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAE5C,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UA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CAAC,UAAU,EAAE,CAAC;YACxB,IAAI,CAAC,WAAW,EAAE,CAAA;QACpB,CAAC;IACH,CAAC;IAED,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;IAED,KAAK,CAAC,WAAW;QACf,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;QAE1B,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,SAAS,CACrC;YACE,KAAK,EAAE,GAAG,CAAA;YACN,KAAK;SACR;SACF,EACD;YACE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAiB,EAAE,EAAE;gBAChC,IAAI,IAAI,EAAE,CAAC;oBACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;gBAClB,CAAC;YACH,CAAC;SACF,CACF,CAAA;QAED,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;IAChC,CAAC;CACF,CAAA;AA5DoB,mBAAmB;IADvC,cAAc,CAAC,sBAAsB,CAAC;GAClB,mBAAmB,CA4DvC;eA5DoB,mBAAmB","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { gql } from 'graphql-tag'\n\nimport { ComponentNature, DataSource, RectPath, Shape, sceneComponent } from '@hatiolab/things-scene'\nimport { subscribe } from '@operato/graphql'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n /* origin의 subscription 만을 허용하므로, 엔드포인트 속성은 무시한다. */\n type: 'string',\n label: 'endpoint',\n name: 'endpoint'\n },\n {\n type: 'graphql',\n label: 'query',\n name: 'query'\n }\n ],\n help: 'scene/component/graphql-subscription'\n}\n\n@sceneComponent('graphql-subscription')\nexport default class GraphqlSubscription extends DataSource(RectPath(Shape)) {\n private static _image: HTMLImageElement\n private unsubscribe?: () => void\n\n static get image() {\n if (!GraphqlSubscription._image) {\n GraphqlSubscription._image = new Image()\n GraphqlSubscription._image.src = new URL('../icons/symbol-graphql-subscription.png', import.meta.url).href\n }\n\n return GraphqlSubscription._image\n }\n\n dispose() {\n if (this.unsubscribe) {\n this.unsubscribe()\n }\n\n super.dispose()\n }\n\n render(context: CanvasRenderingContext2D) {\n var { left, top, width, height } = this.bounds\n\n context.beginPath()\n this.drawImage(context, GraphqlSubscription.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 async requestData() {\n var { query } = this.state\n\n const { unsubscribe } = await subscribe(\n {\n query: gql`\n ${query}\n `\n },\n {\n next: ({ data }: { data: any }) => {\n if (data) {\n this.data = data\n }\n }\n }\n )\n\n this.unsubscribe = unsubscribe\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@operato/scene-graphql",
|
|
3
3
|
"description": "Graphql datasource component for things-scene",
|
|
4
|
-
"version": "10.0.0-beta.
|
|
4
|
+
"version": "10.0.0-beta.65",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@hatiolab/prettier-config": "^1.0.0",
|
|
37
|
-
"@things-factory/builder": "^10.0.0-
|
|
38
|
-
"@things-factory/operato-board": "^10.0.0-
|
|
37
|
+
"@things-factory/builder": "^10.0.0-zeta.1",
|
|
38
|
+
"@things-factory/operato-board": "^10.0.0-zeta.1",
|
|
39
39
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
40
40
|
"@typescript-eslint/parser": "^8.0.0",
|
|
41
41
|
"@web/dev-server": "^0.1.28",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"prettier --write"
|
|
62
62
|
]
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "99733bf39e2d279630d68844f19d9687272a4992"
|
|
65
65
|
}
|