@zcomponent/core 0.0.1 → 0.0.4
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/lib/actionbehavior.d.ts +10 -13
- package/lib/actionbehavior.js +17 -27
- package/lib/behavior.d.ts +22 -25
- package/lib/behavior.js +33 -5
- package/lib/behaviors/LaunchURL.d.ts +18 -7
- package/lib/behaviors/LaunchURL.js +14 -9
- package/lib/behaviors/LogAnalyticsEvent.d.ts +11 -5
- package/lib/behaviors/LogAnalyticsEvent.js +12 -7
- package/lib/behaviors/PlaySound.d.ts +15 -3
- package/lib/behaviors/PlaySound.js +35 -15
- package/lib/component.d.ts +28 -20
- package/lib/component.js +55 -3
- package/lib/components/DefaultLoader.d.ts +23 -16
- package/lib/components/DefaultLoader.js +63 -94
- package/lib/contexts/canvascontext.d.ts +1 -1
- package/lib/contexts/cookieconsentcontext.d.ts +5 -5
- package/lib/contexts/loadcontext.d.ts +4 -4
- package/lib/event.d.ts +1 -1
- package/lib/observable.d.ts +9 -6
- package/lib/observable.js +5 -2
- package/lib/selectors.js +10 -10
- package/lib/types.d.ts +2 -1
- package/lib/types.js +6 -1
- package/lib/zcomponent.d.ts +10 -12
- package/lib/zcomponent.js +135 -116
- package/package.json +1 -1
- package/lib/props.d.ts +0 -0
- package/lib/props.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Component, useCanvas, Observable, isDesignTime, useIsLoaded, useLoadPercent } from "..";
|
|
2
2
|
/**
|
|
3
3
|
* The DefaultLoader shows a customizable loading bar while the assets of your experience are being downloaded and parsed by the browser.
|
|
4
4
|
*
|
|
@@ -6,101 +6,70 @@ import { defineComponent, useCanvas, Observable, isDesignTime, useIsLoaded, useL
|
|
|
6
6
|
* @zicon loader
|
|
7
7
|
* @zgroup Advanced
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const canvas = useCanvas(mgr);
|
|
14
|
-
const div = document.createElement('div');
|
|
15
|
-
div.innerHTML = loaderHTML;
|
|
16
|
-
div.className = "zcomponent-defaultloader";
|
|
17
|
-
if (props.backgroundImage) {
|
|
18
|
-
div.style.backgroundImage = `url(${props.backgroundImage})`;
|
|
19
|
-
}
|
|
20
|
-
const titleElement = div.querySelector("#zcomponent-defaultloader-title") || document.createElement("h1");
|
|
21
|
-
const subtitleElement = div.querySelector("#zcomponent-defaultloader-subtitle") || document.createElement("h1");
|
|
22
|
-
const percentageElement = div.querySelector("#zcomponent-defaultloader-progress-percentage") || document.createElement("div");
|
|
23
|
-
const title = new Observable('', t => titleElement.innerText = t);
|
|
24
|
-
const subtitle = new Observable('', t => subtitleElement.innerText = t);
|
|
25
|
-
const textColor = new Observable('white', t => div.style.color = t ?? 'white');
|
|
26
|
-
const backgroundColor = new Observable('black', t => div.style.backgroundColor = t ?? 'black');
|
|
27
|
-
const zIndex = new Observable(1000, t => div.style.zIndex = t.toString());
|
|
28
|
-
const update = () => {
|
|
29
|
-
if (disposed)
|
|
30
|
-
return;
|
|
31
|
-
const rect = canvas.getBoundingClientRect();
|
|
32
|
-
div.style.left = rect.left.toString() + "px";
|
|
33
|
-
div.style.top = rect.top.toString() + "px";
|
|
34
|
-
div.style.width = rect.width.toString() + "px";
|
|
35
|
-
div.style.height = rect.height.toString() + "px";
|
|
36
|
-
requestAnimationFrame(update);
|
|
37
|
-
};
|
|
38
|
-
const updatePercentage = () => {
|
|
39
|
-
const p = (isDesignTime(mgr) && preview.value) ? 30 : useLoadPercent(mgr).value;
|
|
40
|
-
percentageElement.style.width = p.toString() + "%";
|
|
41
|
-
};
|
|
42
|
-
const updateVisibility = () => {
|
|
43
|
-
let shouldBeAttached = false;
|
|
44
|
-
if (!isDesignTime(mgr) && !useIsLoaded(mgr).value)
|
|
45
|
-
shouldBeAttached = true;
|
|
46
|
-
if (isDesignTime(mgr) && preview.value)
|
|
47
|
-
shouldBeAttached = true;
|
|
48
|
-
if (!attached && shouldBeAttached) {
|
|
49
|
-
document.body.appendChild(div);
|
|
50
|
-
attached = true;
|
|
51
|
-
}
|
|
52
|
-
else if (attached && !shouldBeAttached) {
|
|
53
|
-
div.remove();
|
|
54
|
-
attached = false;
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
preview.withValue(updateVisibility);
|
|
58
|
-
preview.withValue(updatePercentage);
|
|
59
|
-
useIsLoaded(mgr).withValue(updateVisibility);
|
|
60
|
-
useLoadPercent(mgr).withValue(updatePercentage);
|
|
61
|
-
update();
|
|
62
|
-
return {
|
|
63
|
-
dispose: () => {
|
|
64
|
-
disposed = true;
|
|
65
|
-
useIsLoaded(mgr).removeWithValue(updateVisibility);
|
|
66
|
-
useLoadPercent(mgr).removeWithValue(updatePercentage);
|
|
67
|
-
},
|
|
68
|
-
/** @zprop
|
|
69
|
-
* @zdefault false
|
|
70
|
-
* @zgroup Design Time
|
|
71
|
-
* @zgrouppriority 30
|
|
72
|
-
*/
|
|
73
|
-
preview,
|
|
74
|
-
/** @zprop
|
|
75
|
-
* @zgroup Text
|
|
76
|
-
* @zgrouppriority 20
|
|
77
|
-
*/
|
|
78
|
-
title,
|
|
9
|
+
export class DefaultLoader extends Component {
|
|
10
|
+
constructor(props, contextManager) {
|
|
11
|
+
super(props, contextManager);
|
|
12
|
+
this.root = document.createElement('div');
|
|
79
13
|
/** @zprop
|
|
80
|
-
|
|
81
|
-
|
|
14
|
+
* @zdefault false
|
|
15
|
+
* @zgroup Design Time
|
|
16
|
+
* @zgrouppriority 30
|
|
82
17
|
*/
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
18
|
+
this.preview = new Observable(false);
|
|
19
|
+
this._attached = false;
|
|
20
|
+
this._updatePercentage = () => {
|
|
21
|
+
const p = (isDesignTime(this.contextManager) && this.preview.value) ? 30 : useLoadPercent(this.contextManager).value;
|
|
22
|
+
this._percentageElement.style.width = p.toString() + "%";
|
|
23
|
+
};
|
|
24
|
+
this._updateVisibility = () => {
|
|
25
|
+
let shouldBeAttached = false;
|
|
26
|
+
if (!isDesignTime(this.contextManager) && !useIsLoaded(this.contextManager).value)
|
|
27
|
+
shouldBeAttached = true;
|
|
28
|
+
if (isDesignTime(this.contextManager) && this.preview.value)
|
|
29
|
+
shouldBeAttached = true;
|
|
30
|
+
if (!this._attached && shouldBeAttached) {
|
|
31
|
+
document.body.appendChild(this.root);
|
|
32
|
+
this._attached = true;
|
|
33
|
+
}
|
|
34
|
+
else if (this._attached && !shouldBeAttached) {
|
|
35
|
+
this.root.remove();
|
|
36
|
+
this._attached = false;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
this._update = () => {
|
|
40
|
+
if (this.disposed)
|
|
41
|
+
return;
|
|
42
|
+
const rect = useCanvas(this.contextManager).getBoundingClientRect();
|
|
43
|
+
this.root.style.left = rect.left.toString() + "px";
|
|
44
|
+
this.root.style.top = rect.top.toString() + "px";
|
|
45
|
+
this.root.style.width = rect.width.toString() + "px";
|
|
46
|
+
this.root.style.height = rect.height.toString() + "px";
|
|
47
|
+
requestAnimationFrame(this._update);
|
|
48
|
+
};
|
|
49
|
+
this.root.innerHTML = loaderHTML;
|
|
50
|
+
this.root.className = "zcomponent-defaultloader";
|
|
51
|
+
if (props.backgroundImage) {
|
|
52
|
+
this.root.style.backgroundImage = `url(${props.backgroundImage})`;
|
|
53
|
+
}
|
|
54
|
+
const titleElement = this.root.querySelector("#zcomponent-defaultloader-title") || document.createElement("h1");
|
|
55
|
+
const subtitleElement = this.root.querySelector("#zcomponent-defaultloader-subtitle") || document.createElement("h1");
|
|
56
|
+
this._percentageElement = this.root.querySelector("#zcomponent-defaultloader-progress-percentage") || document.createElement("div");
|
|
57
|
+
this.title = new Observable('', t => titleElement.innerText = t);
|
|
58
|
+
this.subtitle = new Observable('', t => subtitleElement.innerText = t);
|
|
59
|
+
this.textColor = new Observable('white', t => this.root.style.color = t ?? 'white');
|
|
60
|
+
this.backgroundColor = new Observable('black', t => this.root.style.backgroundColor = t ?? 'black');
|
|
61
|
+
this.zIndex = new Observable(1000, t => this.root.style.zIndex = t.toString());
|
|
62
|
+
this.register(this.preview, this._updatePercentage);
|
|
63
|
+
this.register(this.preview, this._updateVisibility);
|
|
64
|
+
this.register(useIsLoaded(contextManager), this._updateVisibility);
|
|
65
|
+
this.register(useLoadPercent(contextManager), this._updatePercentage);
|
|
66
|
+
this._update();
|
|
67
|
+
}
|
|
68
|
+
dispose() {
|
|
69
|
+
this.root.remove();
|
|
70
|
+
return super.dispose();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
104
73
|
const loaderHTML = `
|
|
105
74
|
<div id="zcomponent-defaultloader-container">
|
|
106
75
|
<h1 id="zcomponent-defaultloader-title"></h1>
|
|
@@ -10,6 +10,6 @@ export interface CanvasContext {
|
|
|
10
10
|
}
|
|
11
11
|
export declare const CanvasContext: import("../context").ContextTypeWithDefault<CanvasContext, [canvas?: HTMLCanvasElement | undefined]>;
|
|
12
12
|
export declare function useCanvas(mgr: ContextManager): HTMLCanvasElement;
|
|
13
|
-
export declare function useCanvasSize(mgr: ContextManager): Observable<[number, number]>;
|
|
13
|
+
export declare function useCanvasSize(mgr: ContextManager): Observable<[number, number], never>;
|
|
14
14
|
export declare function useOnBeforeRender(mgr: ContextManager): Event<[number]>;
|
|
15
15
|
export declare function useOnAfterRender(mgr: ContextManager): Event<[number]>;
|
|
@@ -27,12 +27,12 @@ export interface CookieConsentContext {
|
|
|
27
27
|
showSettings: Observable<(() => void) | undefined>;
|
|
28
28
|
}
|
|
29
29
|
export declare const CookieConsentContext: import("../context").ContextTypeWithDefault<CookieConsentContext, []>;
|
|
30
|
-
export declare function useCookieConsentFunctional(mgr: ContextManager): Observable<ConsentStatus>;
|
|
31
|
-
export declare function useCookieConsentPerformance(mgr: ContextManager): Observable<ConsentStatus>;
|
|
32
|
-
export declare function useCookieConsentMarketing(mgr: ContextManager): Observable<ConsentStatus>;
|
|
33
|
-
export declare function useCookieConsentStatus(mgr: ContextManager): Observable<Status>;
|
|
30
|
+
export declare function useCookieConsentFunctional(mgr: ContextManager): Observable<ConsentStatus, never>;
|
|
31
|
+
export declare function useCookieConsentPerformance(mgr: ContextManager): Observable<ConsentStatus, never>;
|
|
32
|
+
export declare function useCookieConsentMarketing(mgr: ContextManager): Observable<ConsentStatus, never>;
|
|
33
|
+
export declare function useCookieConsentStatus(mgr: ContextManager): Observable<Status, never>;
|
|
34
34
|
export declare function registerPerformanceVendor(mgr: ContextManager, vendor: Vendor): void;
|
|
35
35
|
export declare function registerMarketingVendor(mgr: ContextManager, vendor: Vendor): void;
|
|
36
36
|
export declare function usePerformanceVendors(mgr: ContextManager): Vendor[];
|
|
37
37
|
export declare function useMarketingVendors(mgr: ContextManager): Vendor[];
|
|
38
|
-
export declare function useShowCookieSettings(mgr: ContextManager): Observable<(() => void) | undefined>;
|
|
38
|
+
export declare function useShowCookieSettings(mgr: ContextManager): Observable<(() => void) | undefined, never>;
|
|
@@ -11,13 +11,13 @@ export interface LoadContext {
|
|
|
11
11
|
startWhenLoaded: () => void;
|
|
12
12
|
}
|
|
13
13
|
export declare const LoadContext: import("../context").ContextTypeWithDefault<LoadContext, []>;
|
|
14
|
-
export declare function useIsLoaded(mgr: ContextManager): Observable<boolean>;
|
|
14
|
+
export declare function useIsLoaded(mgr: ContextManager): Observable<boolean, never>;
|
|
15
15
|
export declare function isLoaded(mgr: ContextManager): boolean;
|
|
16
|
-
export declare function useIsStarted(mgr: ContextManager): Observable<boolean>;
|
|
16
|
+
export declare function useIsStarted(mgr: ContextManager): Observable<boolean, never>;
|
|
17
17
|
export declare function isStarted(mgr: ContextManager): boolean;
|
|
18
|
-
export declare function useIsConstructed(mgr: ContextManager): Observable<boolean>;
|
|
18
|
+
export declare function useIsConstructed(mgr: ContextManager): Observable<boolean, never>;
|
|
19
19
|
export declare function isConstructed(mgr: ContextManager): boolean;
|
|
20
|
-
export declare function useLoadPercent(mgr: ContextManager): Observable<number>;
|
|
20
|
+
export declare function useLoadPercent(mgr: ContextManager): Observable<number, never>;
|
|
21
21
|
export declare function registerLoadable(mgr: ContextManager, p: Promise<any>): void;
|
|
22
22
|
export declare function start(mgr: ContextManager): void;
|
|
23
23
|
export declare function startWhenLoaded(mgr: ContextManager): void;
|
package/lib/event.d.ts
CHANGED
package/lib/observable.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
declare type Resolved<T, M> = [T] extends [never] ? M : T;
|
|
2
|
+
export declare class Observable<T = never, M extends any[] | [] | never = never> {
|
|
2
3
|
private _default;
|
|
3
4
|
private _deep;
|
|
4
5
|
private _proxies;
|
|
@@ -6,11 +7,13 @@ export declare class Observable<T> {
|
|
|
6
7
|
private _nextToken;
|
|
7
8
|
private _handlersByToken;
|
|
8
9
|
private _tokenByHandler;
|
|
9
|
-
constructor(
|
|
10
|
-
|
|
10
|
+
constructor(def: M, withHandler?: ((v: M) => void), deep?: boolean);
|
|
11
|
+
constructor(def: T, withHandler?: ((v: T) => void), deep?: boolean);
|
|
12
|
+
get value(): Resolved<T, M>;
|
|
11
13
|
private _wrap;
|
|
12
|
-
set value(v: T | undefined);
|
|
13
|
-
withValue(fn: (v: T) => void): number;
|
|
14
|
-
removeWithValue(fnOrToken: number | ((v: T) => void)): void;
|
|
14
|
+
set value(v: Resolved<T, M> | undefined);
|
|
15
|
+
withValue(fn: (v: Resolved<T, M>) => void): number;
|
|
16
|
+
removeWithValue(fnOrToken: number | ((v: Resolved<T, M>) => void)): void;
|
|
15
17
|
private _emitValue;
|
|
16
18
|
}
|
|
19
|
+
export {};
|
package/lib/observable.js
CHANGED
|
@@ -7,11 +7,11 @@ export class Observable {
|
|
|
7
7
|
this._handlersByToken = new Map();
|
|
8
8
|
this._tokenByHandler = new Map();
|
|
9
9
|
let initial = this._default;
|
|
10
|
-
if (Array.isArray(this._default)) {
|
|
10
|
+
if (Array.isArray(this._default) && this._deep) {
|
|
11
11
|
initial = this._default.slice();
|
|
12
12
|
this._default = this._default.slice();
|
|
13
13
|
}
|
|
14
|
-
else if (typeof this._default === 'object') {
|
|
14
|
+
else if (typeof this._default === 'object' && this._deep && this._default !== null && Object.getPrototypeOf(this._default) !== Object.prototype) {
|
|
15
15
|
initial = { ...this._default };
|
|
16
16
|
this._default = { ...this._default };
|
|
17
17
|
}
|
|
@@ -25,6 +25,7 @@ export class Observable {
|
|
|
25
25
|
_wrap(v) {
|
|
26
26
|
if (!Array.isArray(v) || this._deep === false) {
|
|
27
27
|
if (typeof v !== 'object' ||
|
|
28
|
+
v === null ||
|
|
28
29
|
Object.getPrototypeOf(v) !== Object.prototype ||
|
|
29
30
|
this._deep === false ||
|
|
30
31
|
typeof v === 'function') {
|
|
@@ -43,6 +44,8 @@ export class Observable {
|
|
|
43
44
|
if (!Array.isArray(val)) {
|
|
44
45
|
if (typeof val !== 'object')
|
|
45
46
|
return val;
|
|
47
|
+
if (val === null)
|
|
48
|
+
return val;
|
|
46
49
|
if (Object.getPrototypeOf(val) !== Object.prototype)
|
|
47
50
|
return val;
|
|
48
51
|
if (typeof val === 'function')
|
package/lib/selectors.js
CHANGED
|
@@ -135,22 +135,22 @@ export const typeDefinitionForComponent = (nodes, props, scriptNames, url) => {
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
return `import { ZComponent, ContextManager,
|
|
138
|
+
return `import { ZComponent, ContextManager, Observable } from "@zcomponent/core";
|
|
139
139
|
|
|
140
140
|
${importStrings.join('\n')}
|
|
141
141
|
|
|
142
142
|
declare class Comp extends ZComponent {
|
|
143
143
|
|
|
144
|
-
|
|
144
|
+
constructor(constructorProps: {}, ctx: ContextManager);
|
|
145
145
|
|
|
146
146
|
nodes: {
|
|
147
147
|
${Object.entries(scriptNames).map(entry => {
|
|
148
148
|
const values = Object.keys(entry[1]);
|
|
149
149
|
if (values.length > 1) {
|
|
150
|
-
return `\t\t${entry[0]}: {${values.map(e => `${JSON.stringify(e)}:
|
|
150
|
+
return `\t\t${entry[0]}: {${values.map(e => `${JSON.stringify(e)}: ${importMapping.get(nodes[e].type)}`).join(', ')}},`;
|
|
151
151
|
}
|
|
152
152
|
else {
|
|
153
|
-
return `\t\t${entry[0]}:
|
|
153
|
+
return `\t\t${entry[0]}: ${importMapping.get(nodes[values[0]].type)},`;
|
|
154
154
|
}
|
|
155
155
|
}).join("\n")}
|
|
156
156
|
};
|
|
@@ -161,13 +161,13 @@ ${Object.values(props).map(typeOutputForProp).join('\n')}
|
|
|
161
161
|
/**
|
|
162
162
|
* @zcomponent
|
|
163
163
|
*/
|
|
164
|
-
export default
|
|
164
|
+
export default Comp;
|
|
165
165
|
`;
|
|
166
166
|
};
|
|
167
167
|
function typeOutputForProp(prop) {
|
|
168
|
-
return `
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
168
|
+
return ` /**
|
|
169
|
+
* @zprop
|
|
170
|
+
* ${prop.default && `@zdefault ${JSON.stringify(prop.default)}`}
|
|
171
|
+
*/
|
|
172
|
+
public ${prop.name}: Observable<${outputForType(prop.type, true)}>;`;
|
|
173
173
|
}
|
package/lib/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export interface BaseType {
|
|
2
2
|
comments?: string[];
|
|
3
3
|
typeHint?: TypeHint;
|
|
4
|
+
isObservable?: boolean;
|
|
4
5
|
}
|
|
5
6
|
export interface StringPrimitiveType extends BaseType {
|
|
6
7
|
name: 'string';
|
|
@@ -102,4 +103,4 @@ export interface TemplateInfo {
|
|
|
102
103
|
}
|
|
103
104
|
export declare function symbolPathFromFilename(f: string): string;
|
|
104
105
|
export declare function isValidValueForType(def: any, t: Type, allowUndefined?: boolean): boolean;
|
|
105
|
-
export declare function outputForType(t: Type): string;
|
|
106
|
+
export declare function outputForType(t: Type, alwaysBasic?: boolean): string;
|
package/lib/types.js
CHANGED
|
@@ -269,7 +269,12 @@ export function isValidValueForType(def, t, allowUndefined) {
|
|
|
269
269
|
}
|
|
270
270
|
return false;
|
|
271
271
|
}
|
|
272
|
-
export function outputForType(t) {
|
|
272
|
+
export function outputForType(t, alwaysBasic = false) {
|
|
273
|
+
if (t.isObservable && !alwaysBasic)
|
|
274
|
+
return `Observable<${getBasicType(t)}>`;
|
|
275
|
+
return getBasicType(t);
|
|
276
|
+
}
|
|
277
|
+
function getBasicType(t) {
|
|
273
278
|
switch (t.name) {
|
|
274
279
|
case 'array':
|
|
275
280
|
return outputForType(t.child) + '[]';
|
package/lib/zcomponent.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Component, ComponentConstructor, ConstructorProps } from './component';
|
|
2
2
|
import { ContextManager } from './context';
|
|
3
3
|
import { ZComponentData } from './interfaces';
|
|
4
4
|
export interface ZComponentOptions {
|
|
@@ -22,34 +22,32 @@ export interface ZComponentContext {
|
|
|
22
22
|
zcomponent: ZComponent;
|
|
23
23
|
}
|
|
24
24
|
export declare const ZComponentContext: import("./context").ContextTypeWithDefault<ZComponentContext, [zcomponent: ZComponent<any>]>;
|
|
25
|
-
export declare function useZComponentInstance<T extends ZComponent
|
|
25
|
+
export declare function useZComponentInstance<T extends ZComponent>(ctx: ContextManager, comp?: ComponentConstructor<T>): T;
|
|
26
26
|
export declare function useConstructed(ctx: ContextManager): Promise<void>;
|
|
27
|
-
export declare class ZComponent<RootType = any>
|
|
27
|
+
export declare class ZComponent<RootType = any> extends Component<ConstructorProps, RootType> {
|
|
28
28
|
private _opts;
|
|
29
29
|
id: string;
|
|
30
|
-
root: RootType;
|
|
31
30
|
idByRoot: Map<any, string>;
|
|
32
31
|
nodes: {
|
|
33
|
-
[id: string]:
|
|
32
|
+
[id: string]: Component | Component[];
|
|
34
33
|
};
|
|
35
34
|
entityByID: Map<string, any>;
|
|
36
35
|
private _constructedResolve;
|
|
37
36
|
constructed: Promise<void>;
|
|
38
37
|
isConstructed: boolean;
|
|
39
38
|
private _nodesById;
|
|
40
|
-
private
|
|
41
|
-
private _contextManager;
|
|
39
|
+
private _rootComponent;
|
|
42
40
|
private _behaviorsToInitialize;
|
|
43
41
|
constructor(constructorProps: {
|
|
44
42
|
[id: string]: any;
|
|
45
|
-
},
|
|
46
|
-
private
|
|
43
|
+
}, contextManager: ContextManager, _opts: ZComponentOptions);
|
|
44
|
+
private _constructorForNode;
|
|
45
|
+
private _constructorForBehavior;
|
|
47
46
|
private _inflateBehaviors;
|
|
48
47
|
private _wrapBehaviors;
|
|
49
48
|
notifyPropsChanged(entries: Map<string, Set<string>>): void;
|
|
50
49
|
private _initializeComponentProps;
|
|
51
50
|
private _setEntityProp;
|
|
52
|
-
_getNodeById(id: string):
|
|
53
|
-
|
|
54
|
-
dispose(): void;
|
|
51
|
+
_getNodeById(id: string): Component | undefined;
|
|
52
|
+
dispose(): never;
|
|
55
53
|
}
|