@hatiolab/things-scene 3.0.0-beta.7 → 3.0.1
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/assets/images/spinner.png +0 -0
- package/db.sqlite +0 -0
- package/logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json +15 -4
- package/logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json +15 -4
- package/logs/application-2022-04-15-10.log +17 -0
- package/logs/application-2022-04-15-17.log +4 -0
- package/logs/application-2022-04-15-19.log +4 -0
- package/logs/connections-2022-04-15-10.log +105 -0
- package/logs/connections-2022-04-15-17.log +35 -0
- package/logs/connections-2022-04-15-19.log +35 -0
- package/package.json +30 -26
- package/things-scene-ie.js +1 -1
- package/things-scene-min.js +1 -1
- package/things-scene.d.ts +38 -5
- package/things-scene.mjs +1 -1
- package/logs/application-2021-11-10-16.log +0 -6
- package/logs/connections-2021-11-10-16.log +0 -32
package/things-scene.d.ts
CHANGED
|
@@ -49,6 +49,17 @@ declare module '@hatiolab/things-scene' {
|
|
|
49
49
|
help?: string
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
type ReferenceProvider = {
|
|
53
|
+
get ids(): string[]
|
|
54
|
+
add(id: string, target?: any): Promise<Scene & { release: () => void }>
|
|
55
|
+
get(id: string, createIf?: boolean): Promise<Scene & { release: () => void }>
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
type DataSubscriptionProvider = {
|
|
59
|
+
subscribe(tag: string, component: Component): Promise<{ unsubscribe: () => void }>
|
|
60
|
+
dispose(): void
|
|
61
|
+
}
|
|
62
|
+
|
|
52
63
|
interface LAYOUT {
|
|
53
64
|
reflow: (container: Container) => void
|
|
54
65
|
capturables?: (container: Container) => Component[]
|
|
@@ -102,6 +113,7 @@ declare module '@hatiolab/things-scene' {
|
|
|
102
113
|
handlers,
|
|
103
114
|
mode,
|
|
104
115
|
refProvider,
|
|
116
|
+
dataSubscriptionProvider,
|
|
105
117
|
baseUrl,
|
|
106
118
|
fitMode
|
|
107
119
|
}: {
|
|
@@ -111,7 +123,8 @@ declare module '@hatiolab/things-scene' {
|
|
|
111
123
|
layers?: Array<any>
|
|
112
124
|
handlers?: Array<any>
|
|
113
125
|
mode?: SCENE_MODE
|
|
114
|
-
refProvider?:
|
|
126
|
+
refProvider?: ReferenceProvider
|
|
127
|
+
dataSubscriptionProvider?: DataSubscriptionProvider
|
|
115
128
|
baseUrl?: string | undefined
|
|
116
129
|
fitMode?: FITMODE
|
|
117
130
|
}): Scene
|
|
@@ -138,7 +151,8 @@ declare module '@hatiolab/things-scene' {
|
|
|
138
151
|
}
|
|
139
152
|
|
|
140
153
|
class ApplicationContext {
|
|
141
|
-
readonly refProvider:
|
|
154
|
+
readonly refProvider: ReferenceProvider
|
|
155
|
+
readonly dataSubscriptionProvider: DataSubscriptionProvider
|
|
142
156
|
readonly isViewMode: boolean
|
|
143
157
|
readonly isEditMode: boolean
|
|
144
158
|
|
|
@@ -167,6 +181,7 @@ declare module '@hatiolab/things-scene' {
|
|
|
167
181
|
): {
|
|
168
182
|
new (...args: any[]): {
|
|
169
183
|
isDataSource(): boolean
|
|
184
|
+
_convertDataFormat(data: any, format: 'json' | 'text' | 'jsonp' | string): any
|
|
170
185
|
}
|
|
171
186
|
} & TBase
|
|
172
187
|
|
|
@@ -203,6 +218,12 @@ declare module '@hatiolab/things-scene' {
|
|
|
203
218
|
static register(type: string, Clazz: typeof Component): void
|
|
204
219
|
static memoize(base: any, property: string, needClone: boolean): void
|
|
205
220
|
static drawStroke(context: CanvasRenderingContext2D, style: Style): void
|
|
221
|
+
static buildSubstitutor(
|
|
222
|
+
expression: string,
|
|
223
|
+
component: Component,
|
|
224
|
+
customObjToVal?: (obj: any) => any
|
|
225
|
+
): () => string | undefined
|
|
226
|
+
static reposition(component: Component): void
|
|
206
227
|
|
|
207
228
|
state: Properties
|
|
208
229
|
bounds: BOUNDS
|
|
@@ -210,7 +231,7 @@ declare module '@hatiolab/things-scene' {
|
|
|
210
231
|
root: RootContainer
|
|
211
232
|
rootModel: ModelLayer
|
|
212
233
|
parent: Container
|
|
213
|
-
app: ApplicationContext
|
|
234
|
+
app: ApplicationContext
|
|
214
235
|
model: Model
|
|
215
236
|
hierarchy: Model
|
|
216
237
|
path: Array<DIMENSION>
|
|
@@ -219,20 +240,27 @@ declare module '@hatiolab/things-scene' {
|
|
|
219
240
|
|
|
220
241
|
get nature(): ComponentNature
|
|
221
242
|
|
|
243
|
+
get font(): string
|
|
244
|
+
|
|
222
245
|
get data(): any
|
|
223
246
|
set data(data: any)
|
|
224
247
|
|
|
248
|
+
get text(): string
|
|
249
|
+
set text(text: string)
|
|
250
|
+
|
|
225
251
|
get center(): POINT
|
|
226
252
|
set center(point: POINT)
|
|
227
253
|
|
|
228
254
|
get controls(): Array<Control> | undefined
|
|
229
255
|
get hasTextProperty(): boolean
|
|
256
|
+
get textSubstitutor(): () => string
|
|
230
257
|
|
|
231
258
|
isRootModel(): boolean
|
|
232
259
|
isContainer(): boolean
|
|
233
260
|
isLine(): boolean
|
|
234
261
|
isLayer(): boolean
|
|
235
262
|
is3dish(): boolean
|
|
263
|
+
isHTMLElement(): boolean
|
|
236
264
|
|
|
237
265
|
ready(): void
|
|
238
266
|
dispose(): void
|
|
@@ -254,11 +282,16 @@ declare module '@hatiolab/things-scene' {
|
|
|
254
282
|
executeMappings(force?: boolean): void
|
|
255
283
|
invalidate(): void
|
|
256
284
|
animate(config: AnimationConfig): {
|
|
257
|
-
start: Function
|
|
258
|
-
stop: Function
|
|
285
|
+
start: Function
|
|
286
|
+
stop: Function
|
|
259
287
|
}
|
|
260
288
|
|
|
289
|
+
access(expression: string): any
|
|
290
|
+
substitute(expression: string, customObjToVal?: (obj: any) => any): string
|
|
291
|
+
|
|
261
292
|
onchange(after: Properties, before: Properties): void
|
|
293
|
+
onchangeData(after: Properties, before: Properties): void
|
|
294
|
+
onchangeMappings(after: Properties, before: Properties): void
|
|
262
295
|
|
|
263
296
|
drawImage(
|
|
264
297
|
context: CanvasRenderingContext2D,
|