@operato/scene-graphql 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/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,9 @@ 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
55
|
get hierarchy(): any;
|
|
56
56
|
get volatile(): never[];
|
|
57
57
|
_applyProps(target: any, props: any, options: any): any;
|
|
@@ -93,7 +93,7 @@ declare const GraphqlClient_base: (new (...args: any[]) => {
|
|
|
93
93
|
prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
94
94
|
render(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
95
95
|
postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
96
|
-
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;
|
|
97
97
|
prepareIf(condition: boolean): void;
|
|
98
98
|
drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
99
99
|
drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
@@ -144,16 +144,16 @@ declare const GraphqlClient_base: (new (...args: any[]) => {
|
|
|
144
144
|
get started(): boolean;
|
|
145
145
|
set started(v: boolean): any;
|
|
146
146
|
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;
|
|
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;
|
|
150
150
|
findAnchor(name: string): any;
|
|
151
|
-
isDescendible(container: Component): boolean;
|
|
151
|
+
isDescendible(container: import("@hatiolab/things-scene").Component): boolean;
|
|
152
152
|
getContext(component?: unknown): any;
|
|
153
|
-
get root(): Component;
|
|
154
|
-
get rootModel(): Component;
|
|
155
|
-
get parent(): Component;
|
|
156
|
-
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;
|
|
157
157
|
get anchors(): import("@hatiolab/things-scene").Anchor[];
|
|
158
158
|
get scalable(): boolean;
|
|
159
159
|
get stuck(): boolean;
|
|
@@ -179,20 +179,20 @@ declare const GraphqlClient_base: (new (...args: any[]) => {
|
|
|
179
179
|
ondropfile(transfered: FileList, files: string[]): void;
|
|
180
180
|
transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
181
181
|
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;
|
|
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;
|
|
189
189
|
toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
190
190
|
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;
|
|
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
196
|
on(name: string | object, callback: Function, context?: any): any;
|
|
197
197
|
off(name?: string | object, callback?: Function, context?: any): any;
|
|
198
198
|
once(name: string | object, callback: Function, context?: any): any;
|
|
@@ -202,24 +202,24 @@ declare const GraphqlClient_base: (new (...args: any[]) => {
|
|
|
202
202
|
onchange(after: Record<string, any>, before: Record<string, any>): void;
|
|
203
203
|
calculateBounds?(): void;
|
|
204
204
|
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[];
|
|
205
|
+
removeComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
206
|
+
addComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
207
|
+
insertComponentAt(component: import("@hatiolab/things-scene").Component, index: number, ghost?: boolean): void;
|
|
208
|
+
getOverlay(component: import("@hatiolab/things-scene").Component): HTMLElement | undefined;
|
|
209
|
+
findById(id: string): import("@hatiolab/things-scene").Component | undefined;
|
|
210
|
+
findByRefid(ref: string | number): import("@hatiolab/things-scene").Component | undefined;
|
|
211
|
+
findAllById(id: string): import("@hatiolab/things-scene").Component[];
|
|
212
212
|
resize(): void;
|
|
213
213
|
fit(type?: string): void;
|
|
214
|
-
get components(): Component[] | undefined;
|
|
214
|
+
get components(): import("@hatiolab/things-scene").Component[] | undefined;
|
|
215
215
|
get layout(): any;
|
|
216
216
|
get auxOverlay(): HTMLElement | undefined;
|
|
217
217
|
get isReady(): boolean;
|
|
218
218
|
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;
|
|
219
|
+
get selected(): import("@hatiolab/things-scene").Component[];
|
|
220
|
+
set selected(_v: import("@hatiolab/things-scene").Component[]): any;
|
|
221
|
+
get focused(): import("@hatiolab/things-scene").Component | null;
|
|
222
|
+
set focused(_v: import("@hatiolab/things-scene").Component | null): any;
|
|
223
223
|
get hasSameParentForAllSelected(): boolean;
|
|
224
224
|
set hasSameParentForAllSelected(_v: boolean): any;
|
|
225
225
|
get fitMode(): string | undefined;
|
|
@@ -276,7 +276,7 @@ declare const GraphqlClient_base: (new (...args: any[]) => {
|
|
|
276
276
|
get disposed(): boolean;
|
|
277
277
|
isLayer(): boolean;
|
|
278
278
|
isGroup(): boolean;
|
|
279
|
-
isContainer(): this is import("@hatiolab/things-scene
|
|
279
|
+
isContainer(): this is import("@hatiolab/things-scene").Container;
|
|
280
280
|
isLine(): boolean;
|
|
281
281
|
isRoot(): boolean;
|
|
282
282
|
isRootModel(): boolean;
|
|
@@ -292,9 +292,9 @@ declare const GraphqlClient_base: (new (...args: any[]) => {
|
|
|
292
292
|
get(property: any): any;
|
|
293
293
|
set(props: any, propval?: any): any;
|
|
294
294
|
getState(property: any): any;
|
|
295
|
-
setState(props:
|
|
295
|
+
setState(props: Partial<import("@hatiolab/things-scene").State> | string, propval?: any): any;
|
|
296
296
|
get model(): any;
|
|
297
|
-
get state():
|
|
297
|
+
get state(): import("@hatiolab/things-scene").State;
|
|
298
298
|
get hierarchy(): any;
|
|
299
299
|
get volatile(): never[];
|
|
300
300
|
_applyProps(target: any, props: any, options: any): any;
|
|
@@ -330,7 +330,7 @@ declare const GraphqlClient_base: (new (...args: any[]) => {
|
|
|
330
330
|
draw(context?: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
331
331
|
prerender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
332
332
|
postrender(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
333
|
-
prepare(resolve: (component: Component) => void, reject: (reason: any) => void): void;
|
|
333
|
+
prepare(resolve: (component: import("@hatiolab/things-scene").Component) => void, reject: (reason: any) => void): void;
|
|
334
334
|
prepareIf(condition: boolean): void;
|
|
335
335
|
drawText(context: import("@hatiolab/things-scene").SceneRenderContext): void;
|
|
336
336
|
drawStroke(context: import("@hatiolab/things-scene").SceneRenderContext, override?: Record<string, unknown>): void;
|
|
@@ -381,16 +381,16 @@ declare const GraphqlClient_base: (new (...args: any[]) => {
|
|
|
381
381
|
get started(): boolean;
|
|
382
382
|
set started(v: boolean): any;
|
|
383
383
|
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;
|
|
384
|
+
findFirst(finder: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): import("@hatiolab/things-scene").Component | undefined;
|
|
385
|
+
findAll(s: string | ((c: import("@hatiolab/things-scene").Component) => boolean), ...others: any[]): any[] | undefined;
|
|
386
|
+
capture(x: number, y: number, except?: (c: import("@hatiolab/things-scene").Component) => boolean): any;
|
|
387
387
|
findAnchor(name: string): any;
|
|
388
|
-
isDescendible(container: Component): boolean;
|
|
388
|
+
isDescendible(container: import("@hatiolab/things-scene").Component): boolean;
|
|
389
389
|
getContext(component?: unknown): any;
|
|
390
|
-
get root(): Component;
|
|
391
|
-
get rootModel(): Component;
|
|
392
|
-
get parent(): Component;
|
|
393
|
-
set parent(v: Component): any;
|
|
390
|
+
get root(): import("@hatiolab/things-scene").Component;
|
|
391
|
+
get rootModel(): import("@hatiolab/things-scene").Component;
|
|
392
|
+
get parent(): import("@hatiolab/things-scene").Component;
|
|
393
|
+
set parent(v: import("@hatiolab/things-scene").Component): any;
|
|
394
394
|
get scalable(): boolean;
|
|
395
395
|
get stuck(): boolean;
|
|
396
396
|
get capturable(): boolean;
|
|
@@ -415,20 +415,20 @@ declare const GraphqlClient_base: (new (...args: any[]) => {
|
|
|
415
415
|
ondropfile(transfered: FileList, files: string[]): void;
|
|
416
416
|
transcoordS2P(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
417
417
|
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;
|
|
418
|
+
transcoordS2T(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
419
|
+
transcoordT2P(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
420
|
+
transcoordT2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
421
|
+
transcoordS2TR(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
422
|
+
transcoordS2O(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
423
|
+
transcoordC2S(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
424
|
+
transcoordS2C(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
425
425
|
toParent(x: number, y: number, rp?: import("@hatiolab/things-scene").POINT): import("@hatiolab/things-scene").POINT;
|
|
426
426
|
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;
|
|
427
|
+
toScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
428
|
+
fromScene(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
429
|
+
toLocal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
430
|
+
toGlobal(x: number, y: number, top?: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
431
|
+
toOther(x: number, y: number, target: import("@hatiolab/things-scene").Component): import("@hatiolab/things-scene").POINT;
|
|
432
432
|
on(name: string | object, callback: Function, context?: any): any;
|
|
433
433
|
off(name?: string | object, callback?: Function, context?: any): any;
|
|
434
434
|
once(name: string | object, callback: Function, context?: any): any;
|
|
@@ -438,24 +438,24 @@ declare const GraphqlClient_base: (new (...args: any[]) => {
|
|
|
438
438
|
onchange(after: Record<string, any>, before: Record<string, any>): void;
|
|
439
439
|
calculateBounds?(): void;
|
|
440
440
|
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[];
|
|
441
|
+
removeComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
442
|
+
addComponent(component: import("@hatiolab/things-scene").Component, ghost?: boolean): void;
|
|
443
|
+
insertComponentAt(component: import("@hatiolab/things-scene").Component, index: number, ghost?: boolean): void;
|
|
444
|
+
getOverlay(component: import("@hatiolab/things-scene").Component): HTMLElement | undefined;
|
|
445
|
+
findById(id: string): import("@hatiolab/things-scene").Component | undefined;
|
|
446
|
+
findByRefid(ref: string | number): import("@hatiolab/things-scene").Component | undefined;
|
|
447
|
+
findAllById(id: string): import("@hatiolab/things-scene").Component[];
|
|
448
448
|
resize(): void;
|
|
449
449
|
fit(type?: string): void;
|
|
450
|
-
get components(): Component[] | undefined;
|
|
450
|
+
get components(): import("@hatiolab/things-scene").Component[] | undefined;
|
|
451
451
|
get layout(): any;
|
|
452
452
|
get auxOverlay(): HTMLElement | undefined;
|
|
453
453
|
get isReady(): boolean;
|
|
454
454
|
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;
|
|
455
|
+
get selected(): import("@hatiolab/things-scene").Component[];
|
|
456
|
+
set selected(_v: import("@hatiolab/things-scene").Component[]): any;
|
|
457
|
+
get focused(): import("@hatiolab/things-scene").Component | null;
|
|
458
|
+
set focused(_v: import("@hatiolab/things-scene").Component | null): any;
|
|
459
459
|
get hasSameParentForAllSelected(): boolean;
|
|
460
460
|
set hasSameParentForAllSelected(_v: boolean): any;
|
|
461
461
|
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,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tC;;WAEG;QAEH,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,CAAA;QAE9C,OAAO,CAAC,SAAS,EAAE,CAAA;QACnB,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,eAAa,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,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,9 @@ 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
54
|
get hierarchy(): any;
|
|
55
55
|
get volatile(): never[];
|
|
56
56
|
_applyProps(target: any, props: any, options: any): any;
|
|
@@ -275,7 +275,7 @@ declare const GraphQLQuery_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 GraphQLQuery_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;
|
|
@@ -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,9 @@ 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
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 GraphqlSubscription_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 GraphqlSubscription_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 GraphqlSubscription_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 GraphqlSubscription_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 GraphqlSubscription_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 GraphqlSubscription_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 GraphqlSubscription_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 GraphqlSubscription_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 GraphqlSubscription_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 GraphqlSubscription_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":"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,UAAU,EAAE;QACV;YACE,oDAAoD;YACpD,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,UAAU;SACjB;QACD;YACE,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,OAAO;SACd;KACF;IACD,IAAI,EAAE,sCAAsC;CAC7C,CAAA;AAGc,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;;IAClE,MAAM,CAAC,MAAM,CAAkB;IAC/B,WAAW,CAAa;IAEhC,MAAM,KAAK,KAAK;QACd,IAAI,CAAC,qBAAmB,CAAC,MAAM,EAAE,CAAC;YAChC,qBAAmB,CAAC,MAAM,GAAG,IAAI,KAAK,EAAE,CAAA;YACxC,qBAAmB,CAAC,MAAM,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,0CAA0C,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;QAC5G,CAAC;QAED,OAAO,qBAAmB,CAAC,MAAM,CAAA;IACnC,CAAC;IAED,OAAO;QACL,IAAI,I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port { 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.30",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"prettier --write"
|
|
62
62
|
]
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "06b35b1726ec4f27ee76657ce341c6c6f3ba1b3a"
|
|
65
65
|
}
|