@ibyar/core 0.8.6 → 1.0.0
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/annotation/context.d.ts +41 -0
- package/annotation/context.d.ts.map +1 -0
- package/annotation/context.js +79 -0
- package/annotation/context.js.map +1 -0
- package/annotation/decorators.d.ts +20 -285
- package/annotation/decorators.d.ts.map +1 -0
- package/annotation/decorators.js +92 -84
- package/annotation/decorators.js.map +1 -1
- package/annotation/options.d.ts +275 -0
- package/annotation/options.d.ts.map +1 -0
- package/annotation/options.js +2 -0
- package/annotation/options.js.map +1 -0
- package/binding/binding.expressions.d.ts +1 -0
- package/binding/binding.expressions.d.ts.map +1 -0
- package/binding/binding.expressions.js +138 -125
- package/binding/binding.expressions.js.map +1 -1
- package/component/component.d.ts +12 -11
- package/component/component.d.ts.map +1 -0
- package/component/component.js +37 -44
- package/component/component.js.map +1 -1
- package/component/custom-element.d.ts +1 -0
- package/component/custom-element.d.ts.map +1 -0
- package/component/events.d.ts +1 -0
- package/component/events.d.ts.map +1 -0
- package/component/events.js +4 -3
- package/component/events.js.map +1 -1
- package/component/lifecycle.d.ts +1 -0
- package/component/lifecycle.d.ts.map +1 -0
- package/component/reflect.d.ts +12 -15
- package/component/reflect.d.ts.map +1 -0
- package/component/reflect.js +27 -47
- package/component/reflect.js.map +1 -1
- package/context/stack.d.ts +1 -0
- package/context/stack.d.ts.map +1 -0
- package/context/subscription.d.ts +1 -0
- package/context/subscription.d.ts.map +1 -0
- package/directive/directive.d.ts +1 -0
- package/directive/directive.d.ts.map +1 -0
- package/directive/directive.js +8 -0
- package/directive/directive.js.map +1 -1
- package/directive/parser.d.ts +1 -0
- package/directive/parser.d.ts.map +1 -0
- package/directive/parser.js +9 -7
- package/directive/parser.js.map +1 -1
- package/directive/providers.d.ts +1 -0
- package/directive/providers.d.ts.map +1 -0
- package/directive/providers.js +2 -1
- package/directive/providers.js.map +1 -1
- package/html/deserialize.d.ts +1 -0
- package/html/deserialize.d.ts.map +1 -0
- package/html/expression.d.ts +1 -0
- package/html/expression.d.ts.map +1 -0
- package/html/expression.js +2 -2
- package/html/expression.js.map +1 -1
- package/html/types.d.ts +1 -0
- package/html/types.d.ts.map +1 -0
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -0
- package/index.js +1 -2
- package/index.js.map +1 -1
- package/linker/change-detector-ref.d.ts +1 -0
- package/linker/change-detector-ref.d.ts.map +1 -0
- package/linker/template-ref.d.ts +1 -0
- package/linker/template-ref.d.ts.map +1 -0
- package/linker/template-ref.js +5 -0
- package/linker/template-ref.js.map +1 -1
- package/linker/view-container-ref.d.ts +4 -2
- package/linker/view-container-ref.d.ts.map +1 -0
- package/linker/view-container-ref.js +8 -7
- package/linker/view-container-ref.js.map +1 -1
- package/linker/view-ref.d.ts +1 -0
- package/linker/view-ref.d.ts.map +1 -0
- package/linker/view-ref.js +5 -2
- package/linker/view-ref.js.map +1 -1
- package/node.d.ts +1 -0
- package/node.d.ts.map +1 -0
- package/package.json +6 -7
- package/pipe/pipe.d.ts +1 -0
- package/pipe/pipe.d.ts.map +1 -0
- package/pipe/pipe.js +2 -1
- package/pipe/pipe.js.map +1 -1
- package/providers/provider.d.ts +15 -13
- package/providers/provider.d.ts.map +1 -0
- package/providers/provider.js +13 -16
- package/providers/provider.js.map +1 -1
- package/utils/elements-util.d.ts +1 -0
- package/utils/elements-util.d.ts.map +1 -0
- package/utils/path.d.ts +1 -0
- package/utils/path.d.ts.map +1 -0
- package/utils/typeof.d.ts +3 -0
- package/utils/typeof.d.ts.map +1 -0
- package/utils/typeof.js.map +1 -1
- package/utils/utils.d.ts +1 -0
- package/utils/utils.d.ts.map +1 -0
- package/view/base-view.d.ts +1 -0
- package/view/base-view.d.ts.map +1 -0
- package/view/base-view.js +30 -16
- package/view/base-view.js.map +1 -1
- package/view/form-view.d.ts +1 -0
- package/view/form-view.d.ts.map +1 -0
- package/view/form-view.js +70 -67
- package/view/form-view.js.map +1 -1
- package/view/mutation.d.ts +1 -0
- package/view/mutation.d.ts.map +1 -0
- package/view/mutation.js +37 -36
- package/view/mutation.js.map +1 -1
- package/view/render.d.ts +1 -0
- package/view/render.d.ts.map +1 -0
- package/view/render.js +9 -8
- package/view/render.js.map +1 -1
- package/view/utils.d.ts +4 -3
- package/view/utils.d.ts.map +1 -0
- package/view/utils.js.map +1 -1
- package/view/view.d.ts +5 -4
- package/view/view.d.ts.map +1 -0
- package/view/view.js +19 -3
- package/view/view.js.map +1 -1
- package/zone/bootstrap.d.ts +1 -0
- package/zone/bootstrap.d.ts.map +1 -0
- package/zone/proxy.d.ts +1 -0
- package/zone/proxy.d.ts.map +1 -0
- package/zone/proxy.js +1 -0
- package/zone/proxy.js.map +1 -1
- package/zone/task.d.ts +1 -0
- package/zone/task.d.ts.map +1 -0
- package/zone/task.js +11 -3
- package/zone/task.js.map +1 -1
- package/zone/zone.d.ts +1 -0
- package/zone/zone.d.ts.map +1 -0
- package/zone/zone.js +8 -6
- package/zone/zone.js.map +1 -1
- package/providers/injector.d.ts +0 -10
- package/providers/injector.js +0 -27
- package/providers/injector.js.map +0 -1
package/pipe/pipe.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipe.js","sourceRoot":"","sources":["../../../src/core/pipe/pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAqB,MAAM,oBAAoB,CAAC;AAE5F,OAAO,EAAqB,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAcjE,MAAM,OAAgB,kBAAkB;
|
|
1
|
+
{"version":3,"file":"pipe.js","sourceRoot":"","sources":["../../../src/core/pipe/pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAqB,MAAM,oBAAoB,CAAC;AAE5F,OAAO,EAAqB,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;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AC,SAAS,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,CAAA;YACtC,CAAC,CAAC;SACF;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IACQ,GAAG,CAAC,WAAoB;QAChC,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAC/C,CAAC;IACQ,WAAW,CAAC,WAAoB,EAAE,YAAmC;QAC7E,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;QAC7C,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACpC,IAAI,CAAC,SAAS,EAAE,CAAC;IAClB,CAAC;IACD,QAAQ;QACP,OAAO,cAAc,CAAC;IACvB,CAAC;CACD","sourcesContent":["import { ReactiveScopeControl, ReadOnlyScope, ScopeSubscription } from '@ibyar/expressions';\nimport { OnDestroy } from '../component/lifecycle.js';\nimport { ChangeDetectorRef, createChangeDetectorRef } from '../linker/change-detector-ref.js';\nimport { ClassRegistryProvider } from '../providers/provider.js';\nimport { TypeOf } from '../utils/typeof.js';\n\n/**\n * Pipes are used as singleton\n * it will be created if it needed, had no life cycle\n * \n * * no dependency injection applied on filters for now,\n * TODO: add support of dependency injection\n */\nexport interface PipeTransform<T, U> {\n\ttransform(value: T, ...args: any[]): U;\n}\n\nexport abstract class AsyncPipeTransform<T, U> implements PipeTransform<T, U>, OnDestroy {\n\tconstructor(protected changeDetectorRef: ChangeDetectorRef) { }\n\tabstract transform(value: T, ...args: any[]): U;\n\tabstract onDestroy(): void;\n}\n\nexport function isPipeTransform<T extends any, U extends any>(pipe: any): pipe is PipeTransform<T, U> {\n\treturn Reflect.has(Object.getPrototypeOf(pipe), 'transform');\n}\n\nexport class PipeProvider extends ReadOnlyScope<{ [pipeName: string]: Function }> {\n\tconstructor() {\n\t\tsuper({});\n\t}\n\thas(pipeName: string): boolean {\n\t\tif (pipeName in this._ctx) {\n\t\t\treturn true;\n\t\t}\n\t\tconst pipeRef = ClassRegistryProvider.getPipe<PipeTransform<any, any>>(pipeName);\n\t\treturn pipeRef !== undefined && !pipeRef.asynchronous;\n\t}\n\tget(pipeName: string): any {\n\t\tlet transformFunc: Function | undefined;\n\t\tif (transformFunc = this._ctx[pipeName]) {\n\t\t\treturn transformFunc;\n\t\t}\n\t\tconst pipeRef = ClassRegistryProvider.getPipe<PipeTransform<any, any>>(pipeName);\n\t\tif (pipeRef !== undefined && !pipeRef.asynchronous) {\n\t\t\tconst pipe = new pipeRef.modelClass();\n\t\t\ttransformFunc = (value: any, ...args: any[]) => pipe.transform(value, ...args);\n\t\t\tthis._ctx[pipeRef.name] = transformFunc;\n\t\t\treturn transformFunc;\n\t\t}\n\t\treturn void 0;\n\t}\n\tgetClass(): TypeOf<PipeProvider> {\n\t\treturn PipeProvider;\n\t}\n}\n\nexport class AsyncPipeProvider extends ReadOnlyScope<object> {\n\tconstructor() {\n\t\tsuper({});\n\t}\n\thas(pipeName: string): boolean {\n\t\tconst pipeRef = ClassRegistryProvider.getPipe<AsyncPipeTransform<any, any>>(pipeName);\n\t\treturn pipeRef?.asynchronous ? true : false;\n\t}\n\tget(pipeName: string): TypeOf<AsyncPipeTransform<any, any>> | undefined {\n\t\tconst pipeRef = ClassRegistryProvider.getPipe<AsyncPipeTransform<any, any>>(pipeName);\n\t\tif (pipeRef?.asynchronous) {\n\t\t\treturn pipeRef.modelClass;\n\t\t}\n\t\treturn;\n\t}\n\tgetClass(): TypeOf<AsyncPipeProvider> {\n\t\treturn AsyncPipeProvider;\n\t}\n}\n\nexport class AsyncPipeScope<T extends { [key: string]: AsyncPipeTransform<any, any> }> extends ReactiveScopeControl<T> {\n\tstatic blockScope<P extends { [key: string]: AsyncPipeTransform<any, any> }>(): AsyncPipeScope<P> {\n\t\treturn new AsyncPipeScope();\n\t}\n\tprivate wrapper: { [key: string]: Function } = {};\n\tconstructor() {\n\t\tsuper({} as T);\n\t}\n\toverride set(propertyKey: keyof T, pipeClass: TypeOf<AsyncPipeTransform<any, any>>, receiver?: any): boolean {\n\t\tconst detector = createChangeDetectorRef(this, propertyKey);\n\t\tconst pipe = new pipeClass(detector);\n\t\tconst result = super.set(propertyKey, pipe, receiver);\n\t\tif (result) {\n\t\t\tthis.wrapper[propertyKey as string] = (value: any, ...args: any[]) => {\n\t\t\t\treturn pipe.transform(value, ...args)\n\t\t\t};\n\t\t}\n\t\treturn result;\n\t}\n\toverride get(propertyKey: keyof T): any {\n\t\treturn Reflect.get(this.wrapper, propertyKey);\n\t}\n\toverride unsubscribe(propertyKey: keyof T, subscription?: ScopeSubscription<T>) {\n\t\tsuper.unsubscribe(propertyKey, subscription);\n\t\tconst pipe = this._ctx[propertyKey];\n\t\tpipe.onDestroy();\n\t}\n\tgetClass(): TypeOf<AsyncPipeScope<T>> {\n\t\treturn AsyncPipeScope;\n\t}\n}\n"]}
|
package/providers/provider.d.ts
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
+
import type { MetadataClass } from '@ibyar/decorators';
|
|
1
2
|
import type { ComponentRef, DirectiveRef, PipeRef, ServiceRef } from '../component/component.js';
|
|
2
|
-
import { PropertyRef } from '../component/reflect.js';
|
|
3
|
+
import type { PropertyRef } from '../component/reflect.js';
|
|
3
4
|
export type ProviderType = 'component' | 'service' | 'directive' | 'pipe' | 'self';
|
|
4
5
|
export declare class ClassRegistry {
|
|
5
|
-
viewSet: Set<
|
|
6
|
-
componentSet: Set<
|
|
7
|
-
serviceSet: Set<
|
|
8
|
-
directiveSet: Set<
|
|
9
|
-
pipeSet: Set<
|
|
10
|
-
registerView(classRef:
|
|
11
|
-
registerComponent(classRef:
|
|
12
|
-
registerService(classRef:
|
|
13
|
-
registerDirective(classRef:
|
|
14
|
-
registerPipe(classRef:
|
|
6
|
+
viewSet: Set<MetadataClass>;
|
|
7
|
+
componentSet: Set<MetadataClass>;
|
|
8
|
+
serviceSet: Set<MetadataClass>;
|
|
9
|
+
directiveSet: Set<MetadataClass>;
|
|
10
|
+
pipeSet: Set<MetadataClass>;
|
|
11
|
+
registerView(classRef: MetadataClass): void;
|
|
12
|
+
registerComponent(classRef: MetadataClass): void;
|
|
13
|
+
registerService(classRef: MetadataClass): void;
|
|
14
|
+
registerDirective(classRef: MetadataClass): void;
|
|
15
|
+
registerPipe(classRef: MetadataClass): void;
|
|
15
16
|
hasComponent<T>(selector: string): boolean;
|
|
16
17
|
getComponentRef<T>(selector: string): ComponentRef<T> | undefined;
|
|
17
|
-
getComponent<T>(selector: string):
|
|
18
|
-
getComponentView(selector: string): (
|
|
18
|
+
getComponent<T>(selector: string): MetadataClass | undefined;
|
|
19
|
+
getComponentView(selector: string): (MetadataClass<import("../index.js").HTMLComponent<unknown>> & CustomElementConstructor) | undefined;
|
|
19
20
|
hasOutput<T>(model: Object, eventName: string): PropertyRef | false;
|
|
20
21
|
hasInput<T>(model: Object, eventName: string): PropertyRef | false;
|
|
21
22
|
hasDirective<T>(selector: string): boolean;
|
|
@@ -25,3 +26,4 @@ export declare class ClassRegistry {
|
|
|
25
26
|
getService<T>(serviceName: string): ServiceRef<T> | undefined;
|
|
26
27
|
}
|
|
27
28
|
export declare const ClassRegistryProvider: ClassRegistry;
|
|
29
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../src/core/providers/provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EACX,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,EAC/C,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC;AAEnF,qBAAa,aAAa;IACzB,OAAO,EAAE,GAAG,CAAC,a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,CAAC,CAAC,GAAG,SAAS;IAUpD,UAAU,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS;CAS7D;AAED,eAAO,MAAM,qBAAqB,eAAsB,CAAC"}
|
package/providers/provider.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { ReflectComponents } from '../component/reflect.js';
|
|
2
1
|
export class ClassRegistry {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
this.pipeSet = new Set();
|
|
9
|
-
}
|
|
2
|
+
viewSet = new Set();
|
|
3
|
+
componentSet = new Set();
|
|
4
|
+
serviceSet = new Set();
|
|
5
|
+
directiveSet = new Set();
|
|
6
|
+
pipeSet = new Set();
|
|
10
7
|
registerView(classRef) {
|
|
11
8
|
this.viewSet.add(classRef);
|
|
12
9
|
}
|
|
@@ -24,7 +21,7 @@ export class ClassRegistry {
|
|
|
24
21
|
}
|
|
25
22
|
hasComponent(selector) {
|
|
26
23
|
for (const modelClass of this.componentSet) {
|
|
27
|
-
const componentRef =
|
|
24
|
+
const componentRef = modelClass[Symbol.metadata];
|
|
28
25
|
if (componentRef.selector === selector) {
|
|
29
26
|
return true;
|
|
30
27
|
}
|
|
@@ -33,7 +30,7 @@ export class ClassRegistry {
|
|
|
33
30
|
}
|
|
34
31
|
getComponentRef(selector) {
|
|
35
32
|
for (const modelClass of this.componentSet) {
|
|
36
|
-
const componentRef =
|
|
33
|
+
const componentRef = modelClass[Symbol.metadata];
|
|
37
34
|
if (componentRef.selector === selector) {
|
|
38
35
|
return componentRef;
|
|
39
36
|
}
|
|
@@ -42,7 +39,7 @@ export class ClassRegistry {
|
|
|
42
39
|
}
|
|
43
40
|
getComponent(selector) {
|
|
44
41
|
for (const modelClass of this.componentSet) {
|
|
45
|
-
const componentRef =
|
|
42
|
+
const componentRef = modelClass[Symbol.metadata];
|
|
46
43
|
if (componentRef.selector === selector) {
|
|
47
44
|
return modelClass;
|
|
48
45
|
}
|
|
@@ -80,7 +77,7 @@ export class ClassRegistry {
|
|
|
80
77
|
}
|
|
81
78
|
hasDirective(selector) {
|
|
82
79
|
for (const directiveClass of this.directiveSet) {
|
|
83
|
-
const directiveRef =
|
|
80
|
+
const directiveRef = directiveClass[Symbol.metadata];
|
|
84
81
|
if (directiveRef.selector === selector) {
|
|
85
82
|
return true;
|
|
86
83
|
}
|
|
@@ -89,7 +86,7 @@ export class ClassRegistry {
|
|
|
89
86
|
}
|
|
90
87
|
directiveHasInput(input, directiveType = 'attributes') {
|
|
91
88
|
for (const directiveClass of this.directiveSet) {
|
|
92
|
-
const directiveRef =
|
|
89
|
+
const directiveRef = directiveClass[Symbol.metadata];
|
|
93
90
|
if ((directiveType === 'attributes' && !directiveRef.selector.startsWith('*'))
|
|
94
91
|
|| (directiveType === 'structural' && directiveRef.selector.startsWith('*'))) {
|
|
95
92
|
if (directiveRef.inputs?.filter(ref => ref.viewAttribute === input).length > 0) {
|
|
@@ -101,7 +98,7 @@ export class ClassRegistry {
|
|
|
101
98
|
}
|
|
102
99
|
getDirectiveRef(selector) {
|
|
103
100
|
for (const directiveClass of this.directiveSet) {
|
|
104
|
-
const directiveRef =
|
|
101
|
+
const directiveRef = directiveClass[Symbol.metadata];
|
|
105
102
|
if (directiveRef.selector === selector) {
|
|
106
103
|
return directiveRef;
|
|
107
104
|
}
|
|
@@ -110,7 +107,7 @@ export class ClassRegistry {
|
|
|
110
107
|
}
|
|
111
108
|
getPipe(pipeName) {
|
|
112
109
|
for (const pipeClass of this.pipeSet) {
|
|
113
|
-
const pipeRef =
|
|
110
|
+
const pipeRef = pipeClass[Symbol.metadata];
|
|
114
111
|
if (pipeRef.name === pipeName) {
|
|
115
112
|
return pipeRef;
|
|
116
113
|
}
|
|
@@ -119,7 +116,7 @@ export class ClassRegistry {
|
|
|
119
116
|
}
|
|
120
117
|
getService(serviceName) {
|
|
121
118
|
for (const serviceClass of this.serviceSet) {
|
|
122
|
-
const serviceRef =
|
|
119
|
+
const serviceRef = serviceClass[Symbol.metadata];
|
|
123
120
|
if (serviceRef.name === serviceName) {
|
|
124
121
|
return serviceRef;
|
|
125
122
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../src/core/providers/provider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../src/core/providers/provider.ts"],"names":[],"mappings":"AAOA,MAAM,OAAO,aAAa;IACzB,OAAO,GAAuB,IAAI,GAAG,EAAE,CAAC;IACxC,YAAY,GAAuB,IAAI,GAAG,EAAE,CAAC;IAC7C,UAAU,GAAuB,IAAI,GAAG,EAAE,CAAC;IAC3C,YAAY,GAAuB,IAAI,GAAG,EAAE,CAAC;IAC7C,OAAO,GAAuB,IAAI,GAAG,EAAE,CAAC;IAExC,YAAY,CAAC,QAAuB;QACnC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC5B,CAAC;IACD,iBAAiB,CAAC,QAAuB;QACxC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC;IACD,eAAe,CAAC,QAAuB;QACtC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC;IACD,iBAAiB,CAAC,QAAuB;QACxC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC;IACD,YAAY,CAAC,QAAuB;QACnC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC5B,CAAC;IAED,YAAY,CAAI,QAAgB;QAC/B,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,YAAY,EAAE;YAC3C,MAAM,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAoB,CAAC;YACpE,IAAI,YAAY,CAAC,QAAQ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/C,MAAM,YAAY,GAAG,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAoB,CAAC;YACxE,IAAI,YAAY,CAAC,QAAQ,KAAK,QAAQ,EAAE;gBACvC,OAAO,YAAY,CAAC;aACpB;SACD;QACD,OAAO,SAAS,CAAC;IAClB,CAAC;IAGD,OAAO,CAAI,QAAgB;QAC1B,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,OAAO,EAAE;YACrC,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAe,CAAC;YACzD,IAAI,OAAO,CAAC,IAAI,KAAK,QAAQ,EAAE;gBAC9B,OAAO,OAAO,CAAC;aACf;SACD;QACD,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,UAAU,CAAI,WAAmB;QAChC,KAAK,MAAM,YAAY,IAAI,IAAI,CAAC,UAAU,EAAE;YAC3C,MAAM,UAAU,GAAG,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAkB,CAAC;YAClE,IAAI,UAAU,CAAC,IAAI,KAAK,WAAW,EAAE;gBACpC,OAAO,UAAU,CAAC;aAClB;SACD;QACD,OAAO,SAAS,CAAC;IAClB,CAAC;CACD;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,aAAa,EAAE,CAAC","sourcesContent":["import type { MetadataClass } from '@ibyar/decorators';\nimport type {\n\tComponentRef, DirectiveRef, PipeRef, ServiceRef\n} from '../component/component.js';\nimport type { PropertyRef } from '../component/reflect.js';\nexport type ProviderType = 'component' | 'service' | 'directive' | 'pipe' | 'self';\n\nexport class ClassRegistry {\n\tviewSet: Set<MetadataClass> = new Set();\n\tcomponentSet: Set<MetadataClass> = new Set();\n\tserviceSet: Set<MetadataClass> = new Set();\n\tdirectiveSet: Set<MetadataClass> = new Set();\n\tpipeSet: Set<MetadataClass> = new Set();\n\n\tregisterView(classRef: MetadataClass): void {\n\t\tthis.viewSet.add(classRef);\n\t}\n\tregisterComponent(classRef: MetadataClass): void {\n\t\tthis.componentSet.add(classRef);\n\t}\n\tregisterService(classRef: MetadataClass): void {\n\t\tthis.serviceSet.add(classRef);\n\t}\n\tregisterDirective(classRef: MetadataClass): void {\n\t\tthis.directiveSet.add(classRef);\n\t}\n\tregisterPipe(classRef: MetadataClass): void {\n\t\tthis.pipeSet.add(classRef);\n\t}\n\n\thasComponent<T>(selector: string): boolean {\n\t\tfor (const modelClass of this.componentSet) {\n\t\t\tconst componentRef = modelClass[Symbol.metadata] as ComponentRef<T>;\n\t\t\tif (componentRef.selector === selector) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\tgetComponentRef<T>(selector: string): ComponentRef<T> | undefined {\n\t\tfor (const modelClass of this.componentSet) {\n\t\t\tconst componentRef = modelClass[Symbol.metadata] as ComponentRef<T>;\n\t\t\tif (componentRef.selector === selector) {\n\t\t\t\treturn componentRef;\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\n\tgetComponent<T>(selector: string) {\n\t\tfor (const modelClass of this.componentSet) {\n\t\t\tconst componentRef = modelClass[Symbol.metadata] as ComponentRef<T>;\n\t\t\tif (componentRef.selector === selector) {\n\t\t\t\treturn modelClass;\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\n\tgetComponentView(selector: string) {\n\t\treturn this.getComponentRef(selector)?.viewClass;\n\t}\n\n\thasOutput<T>(model: Object, eventName: string): PropertyRef | false {\n\t\tif (Reflect.has(model, 'bootstrap')) {\n\t\t\tconst componentRef: ComponentRef<T> = Reflect.get(model, 'bootstrap');\n\t\t\tif (componentRef.outputs) {\n\t\t\t\tfor (const out of componentRef.outputs) {\n\t\t\t\t\tif (out.viewAttribute === eventName) {\n\t\t\t\t\t\treturn out;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\thasInput<T>(model: Object, eventName: string): PropertyRef | false {\n\t\tif (Reflect.has(model, 'bootstrap')) {\n\t\t\tconst componentRef: ComponentRef<T> = Reflect.get(model, 'bootstrap');\n\t\t\tif (componentRef.inputs) {\n\t\t\t\tfor (const input of componentRef.inputs) {\n\t\t\t\t\tif (input.viewAttribute === eventName) {\n\t\t\t\t\t\treturn input;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\thasDirective<T>(selector: string): boolean {\n\t\tfor (const directiveClass of this.directiveSet) {\n\t\t\tconst directiveRef = directiveClass[Symbol.metadata] as DirectiveRef<T>;\n\t\t\tif (directiveRef.selector === selector) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tdirectiveHasInput<T>(input: string, directiveType: 'attributes' | 'structural' = 'attributes'): boolean {\n\t\tfor (const directiveClass of this.directiveSet) {\n\t\t\tconst directiveRef = directiveClass[Symbol.metadata] as DirectiveRef<T>;\n\t\t\tif ((directiveType === 'attributes' && !directiveRef.selector.startsWith('*'))\n\t\t\t\t|| (directiveType === 'structural' && directiveRef.selector.startsWith('*'))) {\n\t\t\t\tif (directiveRef.inputs?.filter(ref => ref.viewAttribute === input).length > 0) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tgetDirectiveRef<T>(selector: string): DirectiveRef<T> | undefined {\n\t\tfor (const directiveClass of this.directiveSet) {\n\t\t\tconst directiveRef = directiveClass[Symbol.metadata] as DirectiveRef<T>;\n\t\t\tif (directiveRef.selector === selector) {\n\t\t\t\treturn directiveRef;\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\n\tgetPipe<T>(pipeName: string): PipeRef<T> | undefined {\n\t\tfor (const pipeClass of this.pipeSet) {\n\t\t\tconst pipeRef = pipeClass[Symbol.metadata] as PipeRef<T>;\n\t\t\tif (pipeRef.name === pipeName) {\n\t\t\t\treturn pipeRef;\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tgetService<T>(serviceName: string): ServiceRef<T> | undefined {\n\t\tfor (const serviceClass of this.serviceSet) {\n\t\t\tconst serviceRef = serviceClass[Symbol.metadata] as ServiceRef<T>;\n\t\t\tif (serviceRef.name === serviceName) {\n\t\t\t\treturn serviceRef;\n\t\t\t}\n\t\t}\n\t\treturn undefined;\n\t}\n}\n\nexport const ClassRegistryProvider = new ClassRegistry();\n"]}
|
package/utils/elements-util.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export declare function hasComponentAttr(element: HTMLElement, attr: string): bo
|
|
|
2
2
|
export declare function hasAttrCustomElement(element: HTMLElement, attr: string): boolean;
|
|
3
3
|
export declare function isDataAttributes(attr: string): boolean;
|
|
4
4
|
export declare function hasAttr(element: HTMLElement, attr: string): boolean;
|
|
5
|
+
//# sourceMappingURL=elements-util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elements-util.d.ts","sourceRoot":"","sources":["../../../src/core/utils/elements-util.ts"],"names":[],"mappings":"AAIA,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAM5E;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAQhF;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,WAE5C;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAKnE"}
|
package/utils/path.d.ts
CHANGED
|
@@ -8,3 +8,4 @@ export type TemplateUrl = {
|
|
|
8
8
|
export declare function fetchHtmlFromModule(fileNameResolver: TemplateUrl): Promise<string>;
|
|
9
9
|
export declare function htmlFullPath(fileFullPath: string): Promise<string>;
|
|
10
10
|
export declare function fetchHtml(fileNameResolver: TemplateUrl | string): Promise<string>;
|
|
11
|
+
//# sourceMappingURL=path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../../src/core/utils/path.ts"],"names":[],"mappings":"AAQA,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQjE;AAED,MAAM,MAAM,WAAW,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAEvE,wBAAgB,mBAAmB,CAAC,gBAAgB,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAGlF;AAED,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAMlE;AAED,wBAAgB,SAAS,CAAC,gBAAgB,EAAE,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CASjF"}
|
package/utils/typeof.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeof.d.ts","sourceRoot":"","sources":["../../../src/core/utils/typeof.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,MAAM,CAAC,CAAC,CAAE,SAAQ,QAAQ;IAC1C,KAAI,GAAG,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC;IACvB,CAAC,GAAG,EAAE,WAAW,GAAG,GAAG,CAAC;CACxB;AAED,MAAM,MAAM,KAAK,CAAC,CAAC,GAAG,GAAG,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC,CAAC"}
|
package/utils/typeof.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeof.js","sourceRoot":"","sources":["../../../src/core/utils/typeof.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * send the class itself, not instance\n */\nexport interface TypeOf<T> extends Function {\n\tnew(...values: any): T;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"typeof.js","sourceRoot":"","sources":["../../../src/core/utils/typeof.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * send the class itself, not instance\n */\nexport interface TypeOf<T> extends Function {\n\tnew(...values: any): T;\n\t[key: PropertyKey]: any;\n}\n\nexport type Class<T = any> = new (...args: any) => T;\n"]}
|
package/utils/utils.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/core/utils/utils.ts"],"names":[],"mappings":"AACA,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,UAKtC"}
|
package/view/base-view.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { TypeOf } from '../utils/typeof.js';
|
|
2
2
|
import { HTMLComponent } from '../component/custom-element.js';
|
|
3
3
|
export declare function baseFactoryView<T extends object>(htmlElementType: TypeOf<HTMLElement>): TypeOf<HTMLComponent<T>>;
|
|
4
|
+
//# sourceMappingURL=base-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-view.d.ts","sourceRoot":"","sources":["../../../src/core/view/base-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAOjD,OAAO,EAAgC,aAAa,EAAa,MAAM,gCAAgC,CAAC;AASxG,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,EAAE,eAAe,EAAE,MAAM,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CA0VhH"}
|
package/view/base-view.js
CHANGED
|
@@ -7,21 +7,22 @@ import { createModelChangeDetectorRef } from '../linker/change-detector-ref.js';
|
|
|
7
7
|
import { createProxyZone } from '../zone/proxy.js';
|
|
8
8
|
export function baseFactoryView(htmlElementType) {
|
|
9
9
|
return class CustomView extends htmlElementType {
|
|
10
|
+
_model;
|
|
11
|
+
_parentComponent;
|
|
12
|
+
_render;
|
|
13
|
+
_shadowRoot;
|
|
14
|
+
_componentRef;
|
|
15
|
+
_modelScope;
|
|
16
|
+
_viewScope;
|
|
17
|
+
_zone;
|
|
18
|
+
subscriptions = [];
|
|
19
|
+
onDestroyCalls = [];
|
|
20
|
+
needRendering = true;
|
|
10
21
|
constructor(componentRef, modelClass) {
|
|
11
22
|
super();
|
|
12
|
-
this.subscriptions = [];
|
|
13
|
-
this.onDestroyCalls = [];
|
|
14
|
-
this.doBlockCallback = () => {
|
|
15
|
-
if (isDoCheck(this._model)) {
|
|
16
|
-
this._zone.run(this._model.doCheck, this._modelScope.getContextProxy());
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
23
|
this._componentRef = componentRef;
|
|
20
24
|
if (componentRef.isShadowDom) {
|
|
21
|
-
this._shadowRoot = this.attachShadow(
|
|
22
|
-
mode: componentRef.shadowDomMode,
|
|
23
|
-
delegatesFocus: componentRef.shadowDomDelegatesFocus
|
|
24
|
-
});
|
|
25
|
+
this._shadowRoot = this.attachShadow(componentRef.shadowRootInit);
|
|
25
26
|
}
|
|
26
27
|
const args = []; /* resolve dependency injection*/
|
|
27
28
|
const detector = createModelChangeDetectorRef(() => this._modelScope);
|
|
@@ -67,10 +68,19 @@ export function baseFactoryView(htmlElementType) {
|
|
|
67
68
|
Reflect.set(this._model, this._componentRef.view, this);
|
|
68
69
|
}
|
|
69
70
|
this._render = new ComponentRender(this, this.subscriptions);
|
|
71
|
+
if (this._componentRef.encapsulation === 'shadow-slot') {
|
|
72
|
+
// render view before inserting any slot element as child
|
|
73
|
+
this.initView();
|
|
74
|
+
}
|
|
70
75
|
}
|
|
71
76
|
detectChanges() {
|
|
72
77
|
this._modelScope.detectChanges();
|
|
73
78
|
}
|
|
79
|
+
doBlockCallback = () => {
|
|
80
|
+
if (isDoCheck(this._model)) {
|
|
81
|
+
this._zone.run(this._model.doCheck, this._modelScope.getContextProxy());
|
|
82
|
+
}
|
|
83
|
+
};
|
|
74
84
|
getComponentRef() {
|
|
75
85
|
return this._componentRef;
|
|
76
86
|
}
|
|
@@ -167,6 +177,13 @@ export function baseFactoryView(htmlElementType) {
|
|
|
167
177
|
}
|
|
168
178
|
this.doBlockCallback();
|
|
169
179
|
}
|
|
180
|
+
initView() {
|
|
181
|
+
// setup ui view
|
|
182
|
+
this._render.initView();
|
|
183
|
+
// init view binding
|
|
184
|
+
this._render.initViewBinding();
|
|
185
|
+
this.needRendering = false;
|
|
186
|
+
}
|
|
170
187
|
connectedCallback() {
|
|
171
188
|
if (this.subscriptions.length) {
|
|
172
189
|
this.subscriptions.forEach(sub => sub.unsubscribe());
|
|
@@ -200,11 +217,8 @@ export function baseFactoryView(htmlElementType) {
|
|
|
200
217
|
this._zone.run(this._model.afterContentChecked, this._modelScope.getContextProxy());
|
|
201
218
|
}
|
|
202
219
|
// do once
|
|
203
|
-
if (this.
|
|
204
|
-
|
|
205
|
-
this._render.initView();
|
|
206
|
-
// init view binding
|
|
207
|
-
this._render.initViewBinding();
|
|
220
|
+
if (this.needRendering) {
|
|
221
|
+
this.initView();
|
|
208
222
|
}
|
|
209
223
|
if (isAfterViewInit(this._model)) {
|
|
210
224
|
this._zone.run(this._model.afterViewInit, this._modelScope.getContextProxy());
|
package/view/base-view.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-view.js","sourceRoot":"","sources":["../../../src/core/view/base-view.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAA8B,MAAM,oBAAoB,CAAC;AACrG,OAAO,EACN,qBAAqB,EAAE,kBAAkB,EAAE,kBAAkB,EAC7D,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAC9D,MAAM,2BAA2B,CAAC;AAInC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAc,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAChF,OA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AAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,eAAgB,EAAE,CAAC,CAAC;aAC3E;YACD,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;YACrD,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;YACxD,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;gBACtC,IAAI;oBACH,QAAQ,EAAE,CAAC;iBACX;gBAAC,OAAO,KAAK,EAAE;oBACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;iBACrB;YACF,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;YAC1D,MAAM,KAAK,GAAG,IAAI,WAAW,CAAC,cAAc,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;YACrG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;QAED,aAAa,CAAC,SAAiB,EAAE,KAAW;YAC3C,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CAAM,SAAS,CAAC,CAAC;YACxD,IAAI,UAAU,EAAE;gBACf,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,OAAO;aACP;QACF,CAAC;KACD,CAAC;AACH,CAAC","sourcesContent":["import type { TypeOf } from '../utils/typeof.js';\nimport { ReactiveScope, ReactiveScopeControl, Context, ScopeSubscription } from '@ibyar/expressions';\nimport {\n\tisAfterContentChecked, isAfterContentInit, isAfterViewChecked,\n\tisAfterViewInit, isDoCheck, isOnChanges, isOnDestroy, isOnInit\n} from '../component/lifecycle.js';\nimport { ComponentRef } from '../component/component.js';\nimport { BaseComponent, CustomElement, HTMLComponent, ModelType } from '../component/custom-element.js';\nimport { EventEmitter } from '../component/events.js';\nimport { ComponentRender } from './render.js';\nimport { getRootZone } from '../zone/bootstrap.js';\nimport { AuroraZone, ProxyAuroraZone } from '../zone/zone.js';\nimport { createModelChangeDetectorRef } from '../linker/change-detector-ref.js';\nimport { createProxyZone } from '../zone/proxy.js';\nimport { PropertyRef } from '../component/reflect.js';\n\nexport function baseFactoryView<T extends object>(htmlElementType: TypeOf<HTMLElement>): TypeOf<HTMLComponent<T>> {\n\treturn class CustomView extends htmlElementType implements BaseComponent<T>, CustomElement {\n\t\t_model: ModelType<T>;\n\t\t_parentComponent: HTMLComponent<object>;\n\t\t_render: ComponentRender<T>;\n\t\t_shadowRoot: ShadowRoot;\n\n\t\t_componentRef: ComponentRef<T>;\n\n\t\t_modelScope: ReactiveScopeControl<T>;\n\t\t_viewScope: ReactiveScope<{ 'this': BaseComponent<T> }>;\n\t\t_zone: AuroraZone;\n\n\t\tprivate subscriptions: ScopeSubscription<Context>[] = [];\n\t\tprivate onDestroyCalls: (() => void)[] = [];\n\n\t\tconstructor(componentRef: ComponentRef<T>, modelClass: TypeOf<T>) {\n\t\t\tsuper();\n\t\t\tthis._componentRef = componentRef;\n\t\t\tif (componentRef.isShadowDom) {\n\t\t\t\tthis._shadowRoot = this.attachShadow({\n\t\t\t\t\tmode: componentRef.shadowDomMode,\n\t\t\t\t\tdelegatesFocus: componentRef.shadowDomDelegatesFocus\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst args = []; /* resolve dependency injection*/\n\t\t\tconst detector = createModelChangeDetectorRef(() => this._modelScope);\n\t\t\targs.push(detector)\n\t\t\tthis._zone = getRootZone().fork(componentRef.zone);\n\t\t\targs.push(this._zone);\n\t\t\tconst model = new modelClass(...args);\n\t\t\tthis._model = model;\n\n\t\t\tconst modelScope = ReactiveScopeControl.for(model);\n\t\t\tconst modelProxyRef = this._zone instanceof ProxyAuroraZone\n\t\t\t\t? createProxyZone(model, this._zone)\n\t\t\t\t: model;\n\t\t\tmodelScope.getContextProxy = () => modelProxyRef;\n\t\t\tthis._modelScope = modelScope;\n\n\t\t\tthis._viewScope = ReactiveScope.for<{ 'this': BaseComponent<T> }>({ 'this': this });\n\t\t\tconst elementScope = this._viewScope.getInnerScope<ReactiveScope<BaseComponent<T>>>('this')!;\n\t\t\tcomponentRef.inputs.forEach(input => {\n\t\t\t\telementScope.subscribe(input.viewAttribute as any, (newValue, oldValue) => {\n\t\t\t\t\tif (newValue === oldValue) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis._modelScope.set(input.modelProperty as any, newValue);\n\t\t\t\t});\n\t\t\t\tthis._modelScope.subscribe(input.modelProperty as any, (newValue, oldValue) => {\n\t\t\t\t\tif (newValue === oldValue) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\telementScope.emit(input.viewAttribute as any, newValue, oldValue);\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tcomponentRef.outputs.forEach(output =>\n\t\t\t\t(model[output.modelProperty as keyof T] as any as EventEmitter<any>)\n\t\t\t\t\t.subscribe((value: any) => {\n\t\t\t\t\t\tconst event = new CustomEvent(\n\t\t\t\t\t\t\toutput.viewAttribute,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdetail: value,\n\t\t\t\t\t\t\t\tcancelable: false,\n\t\t\t\t\t\t\t\tbubbles: output.options?.bubbles,\n\t\t\t\t\t\t\t\tcomposed: output.options?.bubbles,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthis.dispatchEvent(event);\n\t\t\t\t\t})\n\t\t\t);\n\t\t\t// if property of the model has view decorator\n\t\t\tif (this._componentRef.view) {\n\t\t\t\tReflect.set(this._model, this._componentRef.view, this);\n\t\t\t}\n\t\t\tthis._render = new ComponentRender(this, this.subscriptions);\n\t\t}\n\n\t\tdetectChanges(): void {\n\t\t\tthis._modelScope.detectChanges();\n\t\t}\n\n\t\tdoBlockCallback = (): void => {\n\t\t\tif (isDoCheck(this._model)) {\n\t\t\t\tthis._zone.run(this._model.doCheck, this._modelScope.getContextProxy!());\n\t\t\t}\n\t\t};\n\n\t\tgetComponentRef(): ComponentRef<T> {\n\t\t\treturn this._componentRef;\n\t\t}\n\n\t\tsetParentComponent(parent: HTMLComponent<any>): void {\n\t\t\tthis._parentComponent = parent;\n\t\t}\n\n\t\tgetParentComponent(): HTMLComponent<any> {\n\t\t\treturn this._parentComponent;\n\t\t}\n\n\t\thasParentComponent(): boolean {\n\t\t\treturn this._parentComponent ? true : false;\n\t\t}\n\n\t\thasInputStartWith(viewProp: string): boolean {\n\t\t\tlet dotIndex = viewProp.indexOf('.');\n\t\t\tif (dotIndex > 0) {\n\t\t\t\tviewProp = viewProp.substring(0, dotIndex);\n\t\t\t}\n\t\t\treturn this.hasInput(viewProp);\n\t\t}\n\n\t\tgetInputStartWith(viewProp: string): PropertyRef | undefined {\n\t\t\tlet index = viewProp.indexOf('.');\n\t\t\tif (index > 0) {\n\t\t\t\tviewProp = viewProp.substring(0, index);\n\t\t\t}\n\t\t\tindex = viewProp.indexOf('[');\n\t\t\tif (index > 0) {\n\t\t\t\tviewProp = viewProp.substring(0, index);\n\t\t\t}\n\t\t\treturn this.getInput(viewProp);\n\t\t}\n\n\t\thasInput(viewProp: string): boolean {\n\t\t\treturn this._componentRef.inputs.some(input => input.viewAttribute === viewProp);\n\t\t}\n\n\t\tgetInput(viewProp: string): PropertyRef | undefined {\n\t\t\treturn this._componentRef.inputs.find(input => input.viewAttribute === viewProp);\n\t\t}\n\n\t\tgetInputValue(viewProp: string): any {\n\t\t\tconst inputRef = this.getInput(viewProp);\n\t\t\tif (inputRef) {\n\t\t\t\treturn this._model[inputRef.modelProperty];\n\t\t\t}\n\t\t}\n\n\t\tsetInputValue(viewProp: PropertyKey, value: any): void {\n\t\t\tconst inputRef = this.getInput(viewProp as string);\n\t\t\tif (inputRef) {\n\t\t\t\tthis._modelScope.set(inputRef.modelProperty as never, value);\n\t\t\t}\n\t\t}\n\n\t\thasOutput(viewProp: string): boolean {\n\t\t\treturn this._componentRef.outputs.some(output => output.viewAttribute === viewProp);\n\t\t}\n\n\t\tgetOutput(viewProp: string): PropertyRef | undefined {\n\t\t\treturn this._componentRef.outputs.find(output => output.viewAttribute === viewProp);\n\t\t}\n\n\t\tgetEventEmitter<V>(viewProp: string): EventEmitter<V> | undefined {\n\t\t\tconst outputRef = this.getOutput(viewProp);\n\t\t\tif (outputRef) {\n\t\t\t\treturn this._model[outputRef.modelProperty] as EventEmitter<V>;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\thasProp(propName: string): boolean {\n\t\t\treturn Reflect.has(this._model, propName);\n\t\t}\n\n\t\tprivate setAttributeHelper(attrViewName: string, value: any): void {\n\t\t\tif (value === null || value === undefined) {\n\t\t\t\tthis.removeAttribute(attrViewName);\n\t\t\t}\n\t\t\telse if (typeof value === 'boolean') {\n\t\t\t\tif (value) {\n\t\t\t\t\tsuper.setAttribute(attrViewName, '');\n\t\t\t\t} else {\n\t\t\t\t\tthis.removeAttribute(attrViewName);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsuper.setAttribute(attrViewName, value);\n\t\t\t}\n\t\t}\n\n\t\tsetAttribute(attrViewName: string, value: any): void {\n\t\t\tthis.setInputValue(attrViewName, value);\n\t\t\tthis.setAttributeHelper(attrViewName, value);\n\t\t}\n\n\t\tgetAttribute(attrViewName: string): string | null {\n\t\t\treturn this.getInputValue(attrViewName) ?? super.getAttribute(attrViewName);\n\t\t}\n\n\t\tattributeChangedCallback(name: string, oldValue: string, newValue: string) {\n\t\t\tif (newValue === oldValue) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (isOnChanges(this._model)) {\n\t\t\t\tthis._zone.run(this._model.onChanges, this._modelScope.getContextProxy!());\n\t\t\t}\n\t\t\tthis.doBlockCallback();\n\t\t}\n\n\t\tconnectedCallback() {\n\t\t\tif (this.subscriptions.length) {\n\t\t\t\tthis.subscriptions.forEach(sub => sub.unsubscribe());\n\t\t\t}\n\t\t\tthis.subscriptions.splice(0, this.subscriptions.length);\n\t\t\tconst cds = this._zone.onEmpty.subscribe(() => this._modelScope.detectChanges());\n\t\t\tthis.onDestroy(() => cds.unsubscribe());\n\t\t\tthis._componentRef.inputs.forEach(input => {\n\t\t\t\tconst inputDefaultValue = this._model[input.modelProperty];\n\t\t\t\tif (inputDefaultValue !== null && inputDefaultValue !== undefined) {\n\t\t\t\t\tthis.setAttributeHelper(input.viewAttribute, inputDefaultValue);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (!this.hasParentComponent() && this.attributes.length > 0) {\n\t\t\t\tlet attrs: Attr[] = Array.prototype.slice.call(this.attributes);\n\t\t\t\tattrs.forEach(attr => this.initOuterAttribute(attr));\n\t\t\t}\n\n\t\t\tif (isOnChanges(this._model)) {\n\t\t\t\tthis._zone.run(this._model.onChanges, this._modelScope.getContextProxy!());\n\t\t\t}\n\t\t\tif (isOnInit(this._model)) {\n\t\t\t\tthis._zone.run(this._model.onInit, this._modelScope.getContextProxy!());\n\t\t\t}\n\t\t\tif (isDoCheck(this._model)) {\n\t\t\t\tthis._zone.run(this._model.doCheck, this._modelScope.getContextProxy!());\n\t\t\t}\n\t\t\tif (isAfterContentInit(this._model)) {\n\t\t\t\tthis._zone.run(this._model.afterContentInit, this._modelScope.getContextProxy!());\n\t\t\t}\n\t\t\tif (isAfterContentChecked(this._model)) {\n\t\t\t\tthis._zone.run(this._model.afterContentChecked, this._modelScope.getContextProxy!());\n\t\t\t}\n\n\t\t\t// do once\n\t\t\tif (this.childNodes.length === 0) {\n\t\t\t\t// setup ui view\n\t\t\t\tthis._render.initView();\n\n\t\t\t\t// init view binding\n\t\t\t\tthis._render.initViewBinding();\n\t\t\t}\n\n\t\t\tif (isAfterViewInit(this._model)) {\n\t\t\t\tthis._zone.run(this._model.afterViewInit, this._modelScope.getContextProxy!());\n\t\t\t}\n\t\t\tif (isAfterViewChecked(this._model)) {\n\t\t\t\tthis._zone.run(this._model.afterViewChecked, this._modelScope.getContextProxy!());\n\t\t\t}\n\t\t\tthis.doBlockCallback = () => {\n\t\t\t\tif (isDoCheck(this._model)) {\n\t\t\t\t\tthis._zone.run(this._model.doCheck, this._modelScope.getContextProxy!());\n\t\t\t\t}\n\t\t\t\tif (isAfterContentChecked(this._model)) {\n\t\t\t\t\tthis._zone.run(this._model.afterContentChecked, this._modelScope.getContextProxy!());\n\t\t\t\t}\n\t\t\t\tif (isAfterViewChecked(this._model)) {\n\t\t\t\t\tthis._zone.run(this._model.afterViewChecked, this._modelScope.getContextProxy!());\n\t\t\t\t}\n\t\t\t};\n\t\t\tconst event = new CustomEvent('connected', { cancelable: true, bubbles: false, composed: false });\n\t\t\tthis.dispatchEvent(event);\n\t\t}\n\n\n\t\tinitOuterAttribute(attr: Attr) {\n\t\t\t// [window, this] scop\n\t\t\tlet elementAttr = attr.name;\n\t\t\tlet modelProperty = attr.value;\n\t\t\tif (elementAttr.startsWith('[')) {\n\t\t\t\telementAttr = elementAttr.substring(1, elementAttr.length - 1);\n\t\t\t\tif (Reflect.has(window, modelProperty)) {\n\t\t\t\t\tthis.setInputValue(elementAttr, Reflect.get(window, modelProperty));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (elementAttr.startsWith('(')) {\n\t\t\t\t// (elementAttr)=\"modelProperty()\"\n\t\t\t\telementAttr = elementAttr.substring(1, elementAttr.length - 1);\n\t\t\t\t// this.handleEvent(element, elementAttr, viewProperty);\n\t\t\t\tmodelProperty = modelProperty.endsWith('()') ?\n\t\t\t\t\tmodelProperty.substring(0, modelProperty.length - 2) : modelProperty;\n\t\t\t\tlet callback: Function = Reflect.get(window, modelProperty);\n\t\t\t\tthis.addEventListener(elementAttr, event => {\n\t\t\t\t\tcallback(event);\n\t\t\t\t});\n\t\t\t} else if (elementAttr.startsWith('on')) {\n\t\t\t\tconst modelEvent = this.getEventEmitter<any>(elementAttr.substring(2));\n\t\t\t\tif (modelEvent) {\n\t\t\t\t\t// modelEvent.subscribe(listener);\n\t\t\t\t\tmodelProperty = modelProperty.endsWith('()') ?\n\t\t\t\t\t\tmodelProperty.substring(0, modelProperty.length - 2) : modelProperty;\n\t\t\t\t\tlet listener: Function = Reflect.get(window, modelProperty);\n\t\t\t\t\tmodelEvent.subscribe((data: any) => {\n\t\t\t\t\t\t(listener as Function)(data);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.setInputValue(attr.name, attr.value);\n\t\t\t}\n\t\t}\n\t\tonDestroy(callback: () => void) {\n\t\t\tthis.onDestroyCalls.push(callback);\n\t\t}\n\t\tadoptedCallback() {\n\t\t\t// restart the process\n\t\t\tthis.innerHTML = '';\n\t\t\tthis.connectedCallback();\n\t\t}\n\t\tdisconnectedCallback() {\n\t\t\t// notify first, then call model.onDestroy func\n\t\t\tif (isOnDestroy(this._model)) {\n\t\t\t\tthis._zone.run(this._model.onDestroy, this._modelScope.getContextProxy!());\n\t\t\t}\n\t\t\tthis.subscriptions.forEach(sub => sub.unsubscribe());\n\t\t\tthis.subscriptions.splice(0, this.subscriptions.length);\n\t\t\tthis.onDestroyCalls.forEach(callback => {\n\t\t\t\ttry {\n\t\t\t\t\tcallback();\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error(error);\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.onDestroyCalls.splice(0, this.onDestroyCalls.length);\n\t\t\tconst event = new CustomEvent('disconnected', { cancelable: true, bubbles: false, composed: false });\n\t\t\tthis.dispatchEvent(event);\n\t\t}\n\n\t\ttriggerOutput(eventName: string, value?: any): void {\n\t\t\tconst modelEvent = this.getEventEmitter<any>(eventName);\n\t\t\tif (modelEvent) {\n\t\t\t\tmodelEvent.emit(value);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"base-view.js","s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C,KAAK,CAAC,CAAC;iBACrB;YACF,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;YAC1D,MAAM,KAAK,GAAG,IAAI,WAAW,CAAC,cAAc,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;YACrG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;QAED,aAAa,CAAC,SAAiB,EAAE,KAAW;YAC3C,MAAM,UAAU,GAAG,IAAI,CAAC,eAAe,CAAM,SAAS,CAAC,CAAC;YACxD,IAAI,UAAU,EAAE;gBACf,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,OAAO;aACP;QACF,CAAC;KACD,CAAC;AACH,CAAC","sourcesContent":["import type { TypeOf } from '../utils/typeof.js';\nimport { ReactiveScope, ReactiveScopeControl, Context, ScopeSubscription } from '@ibyar/expressions';\nimport {\n\tisAfterContentChecked, isAfterContentInit, isAfterViewChecked,\n\tisAfterViewInit, isDoCheck, isOnChanges, isOnDestroy, isOnInit\n} from '../component/lifecycle.js';\nimport { ComponentRef } from '../component/component.js';\nimport { BaseComponent, CustomElement, HTMLComponent, ModelType } from '../component/custom-element.js';\nimport { EventEmitter } from '../component/events.js';\nimport { ComponentRender } from './render.js';\nimport { getRootZone } from '../zone/bootstrap.js';\nimport { AuroraZone, ProxyAuroraZone } from '../zone/zone.js';\nimport { createModelChangeDetectorRef } from '../linker/change-detector-ref.js';\nimport { createProxyZone } from '../zone/proxy.js';\nimport { PropertyRef } from '../component/reflect.js';\n\nexport function baseFactoryView<T extends object>(htmlElementType: TypeOf<HTMLElement>): TypeOf<HTMLComponent<T>> {\n\treturn class CustomView extends htmlElementType implements BaseComponent<T>, CustomElement {\n\t\t_model: ModelType<T>;\n\t\t_parentComponent: HTMLComponent<object>;\n\t\t_render: ComponentRender<T>;\n\t\t_shadowRoot: ShadowRoot;\n\n\t\t_componentRef: ComponentRef<T>;\n\n\t\t_modelScope: ReactiveScopeControl<T>;\n\t\t_viewScope: ReactiveScope<{ 'this': BaseComponent<T> }>;\n\t\t_zone: AuroraZone;\n\n\t\tprivate subscriptions: ScopeSubscription<Context>[] = [];\n\t\tprivate onDestroyCalls: (() => void)[] = [];\n\t\tprivate needRendering = true;\n\n\t\tconstructor(componentRef: ComponentRef<T>, modelClass: TypeOf<T>) {\n\t\t\tsuper();\n\t\t\tthis._componentRef = componentRef;\n\t\t\tif (componentRef.isShadowDom) {\n\t\t\t\tthis._shadowRoot = this.attachShadow(componentRef.shadowRootInit);\n\t\t\t}\n\t\t\tconst args = []; /* resolve dependency injection*/\n\t\t\tconst detector = createModelChangeDetectorRef(() => this._modelScope);\n\t\t\targs.push(detector)\n\t\t\tthis._zone = getRootZone().fork(componentRef.zone);\n\t\t\targs.push(this._zone);\n\t\t\tconst model = new modelClass(...args);\n\t\t\tthis._model = model;\n\n\t\t\tconst modelScope = ReactiveScopeControl.for(model);\n\t\t\tconst modelProxyRef = this._zone instanceof ProxyAuroraZone\n\t\t\t\t? createProxyZone(model, this._zone)\n\t\t\t\t: model;\n\t\t\tmodelScope.getContextProxy = () => modelProxyRef;\n\t\t\tthis._modelScope = modelScope;\n\n\t\t\tthis._viewScope = ReactiveScope.for<{ 'this': BaseComponent<T> }>({ 'this': this });\n\t\t\tconst elementScope = this._viewScope.getInnerScope<ReactiveScope<BaseComponent<T>>>('this')!;\n\t\t\tcomponentRef.inputs.forEach(input => {\n\t\t\t\telementScope.subscribe(input.viewAttribute as any, (newValue, oldValue) => {\n\t\t\t\t\tif (newValue === oldValue) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis._modelScope.set(input.modelProperty as any, newValue);\n\t\t\t\t});\n\t\t\t\tthis._modelScope.subscribe(input.modelProperty as any, (newValue, oldValue) => {\n\t\t\t\t\tif (newValue === oldValue) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\telementScope.emit(input.viewAttribute as any, newValue, oldValue);\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tcomponentRef.outputs.forEach(output =>\n\t\t\t\t(model[output.modelProperty as keyof T] as any as EventEmitter<any>)\n\t\t\t\t\t.subscribe((value: any) => {\n\t\t\t\t\t\tconst event = new CustomEvent(\n\t\t\t\t\t\t\toutput.viewAttribute,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdetail: value,\n\t\t\t\t\t\t\t\tcancelable: false,\n\t\t\t\t\t\t\t\tbubbles: output.options?.bubbles,\n\t\t\t\t\t\t\t\tcomposed: output.options?.bubbles,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthis.dispatchEvent(event);\n\t\t\t\t\t})\n\t\t\t);\n\t\t\t// if property of the model has view decorator\n\t\t\tif (this._componentRef.view) {\n\t\t\t\tReflect.set(this._model, this._componentRef.view, this);\n\t\t\t}\n\n\t\t\tthis._render = new ComponentRender(this, this.subscriptions);\n\n\t\t\tif (this._componentRef.encapsulation === 'shadow-slot') {\n\t\t\t\t// render view before inserting any slot element as child\n\t\t\t\tthis.initView();\n\t\t\t}\n\t\t}\n\n\t\tdetectChanges(): void {\n\t\t\tthis._modelScope.detectChanges();\n\t\t}\n\n\t\tdoBlockCallback = (): void => {\n\t\t\tif (isDoCheck(this._model)) {\n\t\t\t\tthis._zone.run(this._model.doCheck, this._modelScope.getContextProxy!());\n\t\t\t}\n\t\t};\n\n\t\tgetComponentRef(): ComponentRef<T> {\n\t\t\treturn this._componentRef;\n\t\t}\n\n\t\tsetParentComponent(parent: HTMLComponent<any>): void {\n\t\t\tthis._parentComponent = parent;\n\t\t}\n\n\t\tgetParentComponent(): HTMLComponent<any> {\n\t\t\treturn this._parentComponent;\n\t\t}\n\n\t\thasParentComponent(): boolean {\n\t\t\treturn this._parentComponent ? true : false;\n\t\t}\n\n\t\thasInputStartWith(viewProp: string): boolean {\n\t\t\tlet dotIndex = viewProp.indexOf('.');\n\t\t\tif (dotIndex > 0) {\n\t\t\t\tviewProp = viewProp.substring(0, dotIndex);\n\t\t\t}\n\t\t\treturn this.hasInput(viewProp);\n\t\t}\n\n\t\tgetInputStartWith(viewProp: string): PropertyRef | undefined {\n\t\t\tlet index = viewProp.indexOf('.');\n\t\t\tif (index > 0) {\n\t\t\t\tviewProp = viewProp.substring(0, index);\n\t\t\t}\n\t\t\tindex = viewProp.indexOf('[');\n\t\t\tif (index > 0) {\n\t\t\t\tviewProp = viewProp.substring(0, index);\n\t\t\t}\n\t\t\treturn this.getInput(viewProp);\n\t\t}\n\n\t\thasInput(viewProp: string): boolean {\n\t\t\treturn this._componentRef.inputs.some(input => input.viewAttribute === viewProp);\n\t\t}\n\n\t\tgetInput(viewProp: string): PropertyRef | undefined {\n\t\t\treturn this._componentRef.inputs.find(input => input.viewAttribute === viewProp);\n\t\t}\n\n\t\tgetInputValue(viewProp: string): any {\n\t\t\tconst inputRef = this.getInput(viewProp);\n\t\t\tif (inputRef) {\n\t\t\t\treturn this._model[inputRef.modelProperty];\n\t\t\t}\n\t\t}\n\n\t\tsetInputValue(viewProp: PropertyKey, value: any): void {\n\t\t\tconst inputRef = this.getInput(viewProp as string);\n\t\t\tif (inputRef) {\n\t\t\t\tthis._modelScope.set(inputRef.modelProperty as never, value);\n\t\t\t}\n\t\t}\n\n\t\thasOutput(viewProp: string): boolean {\n\t\t\treturn this._componentRef.outputs.some(output => output.viewAttribute === viewProp);\n\t\t}\n\n\t\tgetOutput(viewProp: string): PropertyRef | undefined {\n\t\t\treturn this._componentRef.outputs.find(output => output.viewAttribute === viewProp);\n\t\t}\n\n\t\tgetEventEmitter<V>(viewProp: string): EventEmitter<V> | undefined {\n\t\t\tconst outputRef = this.getOutput(viewProp);\n\t\t\tif (outputRef) {\n\t\t\t\treturn this._model[outputRef.modelProperty] as EventEmitter<V>;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\thasProp(propName: string): boolean {\n\t\t\treturn Reflect.has(this._model, propName);\n\t\t}\n\n\t\tprivate setAttributeHelper(attrViewName: string, value: any): void {\n\t\t\tif (value === null || value === undefined) {\n\t\t\t\tthis.removeAttribute(attrViewName);\n\t\t\t}\n\t\t\telse if (typeof value === 'boolean') {\n\t\t\t\tif (value) {\n\t\t\t\t\tsuper.setAttribute(attrViewName, '');\n\t\t\t\t} else {\n\t\t\t\t\tthis.removeAttribute(attrViewName);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsuper.setAttribute(attrViewName, value);\n\t\t\t}\n\t\t}\n\n\t\tsetAttribute(attrViewName: string, value: any): void {\n\t\t\tthis.setInputValue(attrViewName, value);\n\t\t\tthis.setAttributeHelper(attrViewName, value);\n\t\t}\n\n\t\tgetAttribute(attrViewName: string): string | null {\n\t\t\treturn this.getInputValue(attrViewName) ?? super.getAttribute(attrViewName);\n\t\t}\n\n\t\tattributeChangedCallback(name: string, oldValue: string, newValue: string) {\n\t\t\tif (newValue === oldValue) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (isOnChanges(this._model)) {\n\t\t\t\tthis._zone.run(this._model.onChanges, this._modelScope.getContextProxy!());\n\t\t\t}\n\t\t\tthis.doBlockCallback();\n\t\t}\n\n\t\tprivate initView() {\n\t\t\t// setup ui view\n\t\t\tthis._render.initView();\n\n\t\t\t// init view binding\n\t\t\tthis._render.initViewBinding();\n\t\t\tthis.needRendering = false;\n\t\t}\n\n\t\tconnectedCallback() {\n\t\t\tif (this.subscriptions.length) {\n\t\t\t\tthis.subscriptions.forEach(sub => sub.unsubscribe());\n\t\t\t}\n\t\t\tthis.subscriptions.splice(0, this.subscriptions.length);\n\t\t\tconst cds = this._zone.onEmpty.subscribe(() => this._modelScope.detectChanges());\n\t\t\tthis.onDestroy(() => cds.unsubscribe());\n\t\t\tthis._componentRef.inputs.forEach(input => {\n\t\t\t\tconst inputDefaultValue = this._model[input.modelProperty];\n\t\t\t\tif (inputDefaultValue !== null && inputDefaultValue !== undefined) {\n\t\t\t\t\tthis.setAttributeHelper(input.viewAttribute, inputDefaultValue);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (!this.hasParentComponent() && this.attributes.length > 0) {\n\t\t\t\tlet attrs: Attr[] = Array.prototype.slice.call(this.attributes);\n\t\t\t\tattrs.forEach(attr => this.initOuterAttribute(attr));\n\t\t\t}\n\n\t\t\tif (isOnChanges(this._model)) {\n\t\t\t\tthis._zone.run(this._model.onChanges, this._modelScope.getContextProxy!());\n\t\t\t}\n\t\t\tif (isOnInit(this._model)) {\n\t\t\t\tthis._zone.run(this._model.onInit, this._modelScope.getContextProxy!());\n\t\t\t}\n\t\t\tif (isDoCheck(this._model)) {\n\t\t\t\tthis._zone.run(this._model.doCheck, this._modelScope.getContextProxy!());\n\t\t\t}\n\t\t\tif (isAfterContentInit(this._model)) {\n\t\t\t\tthis._zone.run(this._model.afterContentInit, this._modelScope.getContextProxy!());\n\t\t\t}\n\t\t\tif (isAfterContentChecked(this._model)) {\n\t\t\t\tthis._zone.run(this._model.afterContentChecked, this._modelScope.getContextProxy!());\n\t\t\t}\n\n\t\t\t// do once\n\t\t\tif (this.needRendering) {\n\t\t\t\tthis.initView();\n\t\t\t}\n\n\t\t\tif (isAfterViewInit(this._model)) {\n\t\t\t\tthis._zone.run(this._model.afterViewInit, this._modelScope.getContextProxy!());\n\t\t\t}\n\t\t\tif (isAfterViewChecked(this._model)) {\n\t\t\t\tthis._zone.run(this._model.afterViewChecked, this._modelScope.getContextProxy!());\n\t\t\t}\n\t\t\tthis.doBlockCallback = () => {\n\t\t\t\tif (isDoCheck(this._model)) {\n\t\t\t\t\tthis._zone.run(this._model.doCheck, this._modelScope.getContextProxy!());\n\t\t\t\t}\n\t\t\t\tif (isAfterContentChecked(this._model)) {\n\t\t\t\t\tthis._zone.run(this._model.afterContentChecked, this._modelScope.getContextProxy!());\n\t\t\t\t}\n\t\t\t\tif (isAfterViewChecked(this._model)) {\n\t\t\t\t\tthis._zone.run(this._model.afterViewChecked, this._modelScope.getContextProxy!());\n\t\t\t\t}\n\t\t\t};\n\t\t\tconst event = new CustomEvent('connected', { cancelable: true, bubbles: false, composed: false });\n\t\t\tthis.dispatchEvent(event);\n\t\t}\n\n\n\t\tinitOuterAttribute(attr: Attr) {\n\t\t\t// [window, this] scop\n\t\t\tlet elementAttr = attr.name;\n\t\t\tlet modelProperty = attr.value;\n\t\t\tif (elementAttr.startsWith('[')) {\n\t\t\t\telementAttr = elementAttr.substring(1, elementAttr.length - 1);\n\t\t\t\tif (Reflect.has(window, modelProperty)) {\n\t\t\t\t\tthis.setInputValue(elementAttr, Reflect.get(window, modelProperty));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (elementAttr.startsWith('(')) {\n\t\t\t\t// (elementAttr)=\"modelProperty()\"\n\t\t\t\telementAttr = elementAttr.substring(1, elementAttr.length - 1);\n\t\t\t\t// this.handleEvent(element, elementAttr, viewProperty);\n\t\t\t\tmodelProperty = modelProperty.endsWith('()') ?\n\t\t\t\t\tmodelProperty.substring(0, modelProperty.length - 2) : modelProperty;\n\t\t\t\tlet callback: Function = Reflect.get(window, modelProperty);\n\t\t\t\tthis.addEventListener(elementAttr, event => {\n\t\t\t\t\tcallback(event);\n\t\t\t\t});\n\t\t\t} else if (elementAttr.startsWith('on')) {\n\t\t\t\tconst modelEvent = this.getEventEmitter<any>(elementAttr.substring(2));\n\t\t\t\tif (modelEvent) {\n\t\t\t\t\t// modelEvent.subscribe(listener);\n\t\t\t\t\tmodelProperty = modelProperty.endsWith('()') ?\n\t\t\t\t\t\tmodelProperty.substring(0, modelProperty.length - 2) : modelProperty;\n\t\t\t\t\tlet listener: Function = Reflect.get(window, modelProperty);\n\t\t\t\t\tmodelEvent.subscribe((data: any) => {\n\t\t\t\t\t\t(listener as Function)(data);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.setInputValue(attr.name, attr.value);\n\t\t\t}\n\t\t}\n\t\tonDestroy(callback: () => void) {\n\t\t\tthis.onDestroyCalls.push(callback);\n\t\t}\n\t\tadoptedCallback() {\n\t\t\t// restart the process\n\t\t\tthis.innerHTML = '';\n\t\t\tthis.connectedCallback();\n\t\t}\n\t\tdisconnectedCallback() {\n\t\t\t// notify first, then call model.onDestroy func\n\t\t\tif (isOnDestroy(this._model)) {\n\t\t\t\tthis._zone.run(this._model.onDestroy, this._modelScope.getContextProxy!());\n\t\t\t}\n\t\t\tthis.subscriptions.forEach(sub => sub.unsubscribe());\n\t\t\tthis.subscriptions.splice(0, this.subscriptions.length);\n\t\t\tthis.onDestroyCalls.forEach(callback => {\n\t\t\t\ttry {\n\t\t\t\t\tcallback();\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error(error);\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.onDestroyCalls.splice(0, this.onDestroyCalls.length);\n\t\t\tconst event = new CustomEvent('disconnected', { cancelable: true, bubbles: false, composed: false });\n\t\t\tthis.dispatchEvent(event);\n\t\t}\n\n\t\ttriggerOutput(eventName: string, value?: any): void {\n\t\t\tconst modelEvent = this.getEventEmitter<any>(eventName);\n\t\t\tif (modelEvent) {\n\t\t\t\tmodelEvent.emit(value);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t};\n}\n"]}
|
package/view/form-view.d.ts
CHANGED
|
@@ -13,3 +13,4 @@ export declare class NativeElementInternals implements ElementInternals {
|
|
|
13
13
|
setFormValue(value: any | null, state?: File | string | FormData | null): void;
|
|
14
14
|
}
|
|
15
15
|
export declare function baseFormFactoryView<T extends Object>(htmlElementType: TypeOf<HTMLElement>): TypeOf<FormAssociatedComponent<T, any>>;
|
|
16
|
+
//# sourceMappingURL=form-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-view.d.ts","sourceRoot":"","sources":["../../../src/core/view/form-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAEN,uBAAuB,EAGvB,MAAM,gCAAgC,CAAC;AAIxC,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAE7C,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;CAE/D;AAED,qBAAa,sBAAuB,YAAW,gBAAgB;IAC9D,OAAO,CAAC,EAAE,CAAmB;gBACjB,KAAK,EAAE,uBAAuB,CAAC,GAAG,EAAE,GAAG,CAAC;IAIpD,IAAI,IAAI,sCAEP;IACD,IAAI,MAAM,iCAET;IAED,IAAI,UAAU,sBAEb;IAED,IAAI,YAAY,YAEf;IAED,YAAY,CAAC,KAAK,EAAE,GAAG,GAAG,IAAI,EAAE,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,IAAI,GAAG,IAAI;CAI9E;AAeD,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,EAAE,eAAe,EAAE,MAAM,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC,uBAAuB,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CA+EnI"}
|