@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/annotation/decorators.js
CHANGED
|
@@ -1,77 +1,111 @@
|
|
|
1
|
+
import { makeClassDecorator, makeClassMemberDecorator } from '@ibyar/decorators';
|
|
1
2
|
import { Components } from '../component/component.js';
|
|
2
3
|
import { ReflectComponents } from '../component/reflect.js';
|
|
3
4
|
import { fetchHtml } from '../utils/path.js';
|
|
4
5
|
export function Input(name) {
|
|
5
|
-
return (
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
return makeClassMemberDecorator((value, context) => {
|
|
7
|
+
if (!name && typeof context.name !== 'string') {
|
|
8
|
+
throw new TypeError(`type ${typeof context.name} of '${context.name.toString()}' is not supported`);
|
|
9
|
+
}
|
|
10
|
+
if (context.private) {
|
|
11
|
+
throw new SyntaxError(`private members '${context.name.toString()}' is not supported.`);
|
|
12
|
+
}
|
|
13
|
+
ReflectComponents.addInput(context.metadata, context.name, name || context.name);
|
|
14
|
+
});
|
|
8
15
|
}
|
|
9
16
|
export function FormValue() {
|
|
10
|
-
return (
|
|
11
|
-
|
|
12
|
-
|
|
17
|
+
return makeClassMemberDecorator((value, context) => {
|
|
18
|
+
if (typeof context.name !== 'string') {
|
|
19
|
+
throw new TypeError(`type ${typeof context.name} of '${context.name.toString()}' is not supported`);
|
|
20
|
+
}
|
|
21
|
+
if (context.private) {
|
|
22
|
+
throw new SyntaxError(`private members '${context.name.toString()}' is not supported.`);
|
|
23
|
+
}
|
|
24
|
+
ReflectComponents.addInput(context.metadata, context.name, 'value');
|
|
25
|
+
});
|
|
13
26
|
}
|
|
14
27
|
export function Output(name, options) {
|
|
15
28
|
const eventType = typeof name === 'object' ? name.name : name;
|
|
16
29
|
const eventOpts = typeof name === 'object' ? name : options;
|
|
17
|
-
return (
|
|
18
|
-
|
|
30
|
+
return makeClassMemberDecorator((value, context) => {
|
|
31
|
+
if (typeof context.name !== 'string') {
|
|
32
|
+
throw new TypeError(`type ${typeof context.name} of '${context.name.toString()}' is not supported`);
|
|
33
|
+
}
|
|
34
|
+
if (context.private) {
|
|
35
|
+
throw new SyntaxError(`private members '${context.name.toString()}' is not supported.`);
|
|
36
|
+
}
|
|
37
|
+
ReflectComponents.addOutput(context.metadata, context.name, eventType || context.name, {
|
|
19
38
|
bubbles: eventOpts?.bubbles ?? false,
|
|
20
39
|
composed: eventOpts?.composed ?? false
|
|
21
40
|
});
|
|
22
|
-
};
|
|
41
|
+
});
|
|
23
42
|
}
|
|
24
43
|
export function View() {
|
|
25
|
-
return (
|
|
26
|
-
|
|
27
|
-
|
|
44
|
+
return makeClassMemberDecorator((value, context) => {
|
|
45
|
+
if (typeof context.name !== 'string') {
|
|
46
|
+
throw new TypeError(`type ${typeof context.name} of '${context.name.toString()}' is not supported`);
|
|
47
|
+
}
|
|
48
|
+
if (context.private) {
|
|
49
|
+
throw new SyntaxError(`private members '${context.name.toString()}' is not supported.`);
|
|
50
|
+
}
|
|
51
|
+
ReflectComponents.setComponentView(context.metadata, context.name);
|
|
52
|
+
});
|
|
28
53
|
}
|
|
29
54
|
export function ViewChild(selector, childOptions) {
|
|
30
|
-
return (
|
|
31
|
-
|
|
32
|
-
|
|
55
|
+
return makeClassMemberDecorator((value, context) => {
|
|
56
|
+
if (typeof context.name !== 'string') {
|
|
57
|
+
throw new TypeError(`type ${typeof context.name} of '${context.name.toString()}' is not supported`);
|
|
58
|
+
}
|
|
59
|
+
if (context.private) {
|
|
60
|
+
throw new SyntaxError(`private members '${context.name.toString()}' is not supported.`);
|
|
61
|
+
}
|
|
62
|
+
ReflectComponents.addViewChild(context.metadata, context.name, selector, childOptions);
|
|
63
|
+
});
|
|
33
64
|
}
|
|
34
65
|
export function ViewChildren(selector) {
|
|
35
|
-
return (
|
|
36
|
-
|
|
37
|
-
|
|
66
|
+
return makeClassMemberDecorator((value, context) => {
|
|
67
|
+
if (typeof context.name !== 'string') {
|
|
68
|
+
throw new TypeError(`type ${typeof context.name} of '${context.name.toString()}' is not supported`);
|
|
69
|
+
}
|
|
70
|
+
if (context.private) {
|
|
71
|
+
throw new SyntaxError(`private members '${context.name.toString()}' is not supported.`);
|
|
72
|
+
}
|
|
73
|
+
ReflectComponents.addViewChildren(context.metadata, context.name, selector);
|
|
74
|
+
});
|
|
38
75
|
}
|
|
39
76
|
export function HostListener(eventName, args) {
|
|
40
|
-
return (
|
|
77
|
+
return makeClassMemberDecorator((value, context) => {
|
|
78
|
+
if (typeof context.name !== 'string') {
|
|
79
|
+
throw new TypeError(`type ${typeof context.name} of '${context.name.toString()}' is not supported`);
|
|
80
|
+
}
|
|
41
81
|
args = typeof args === 'string' ? [args] : args;
|
|
42
|
-
ReflectComponents.addHostListener(
|
|
43
|
-
};
|
|
82
|
+
ReflectComponents.addHostListener(context.metadata, context.name, eventName, args || []);
|
|
83
|
+
});
|
|
44
84
|
}
|
|
45
85
|
export function HostBinding(hostPropertyName) {
|
|
46
|
-
return (
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
export
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return (target) => {
|
|
64
|
-
Components.defineDirective(target, opt);
|
|
65
|
-
return target;
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
function generateComponent(target, opt) {
|
|
86
|
+
return makeClassMemberDecorator((value, context) => {
|
|
87
|
+
if (typeof context.name !== 'string') {
|
|
88
|
+
throw new TypeError(`type ${typeof context.name} of '${context.name.toString()}' is not supported`);
|
|
89
|
+
}
|
|
90
|
+
if (context.private) {
|
|
91
|
+
throw new SyntaxError(`private members '${context.name.toString()}' is not supported.`);
|
|
92
|
+
}
|
|
93
|
+
ReflectComponents.addHostBinding(context.metadata, context.name, hostPropertyName);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
export const Pipe = makeClassDecorator((opt, constructor, context) => {
|
|
97
|
+
Components.definePipe(constructor, opt, context.metadata);
|
|
98
|
+
});
|
|
99
|
+
export const Directive = makeClassDecorator((opt, constructor, context) => {
|
|
100
|
+
Components.defineDirective(constructor, opt, context.metadata);
|
|
101
|
+
});
|
|
102
|
+
function generateComponent(target, opt, metadata) {
|
|
69
103
|
if (opt.templateUrl) {
|
|
70
104
|
fetchHtml(opt.templateUrl)
|
|
71
105
|
.then(htmlTemplate => {
|
|
72
106
|
if (htmlTemplate) {
|
|
73
107
|
opt.template = htmlTemplate;
|
|
74
|
-
Components.defineComponent(target, opt);
|
|
108
|
+
Components.defineComponent(target, opt, metadata);
|
|
75
109
|
}
|
|
76
110
|
})
|
|
77
111
|
.catch(reason => {
|
|
@@ -79,46 +113,20 @@ function generateComponent(target, opt) {
|
|
|
79
113
|
});
|
|
80
114
|
}
|
|
81
115
|
else {
|
|
82
|
-
Components.defineComponent(target, opt);
|
|
116
|
+
Components.defineComponent(target, opt, metadata);
|
|
83
117
|
}
|
|
84
118
|
}
|
|
85
|
-
export
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
generateComponent(target, comp);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
else if (typeof opt === 'object') {
|
|
93
|
-
generateComponent(target, opt);
|
|
119
|
+
export const Component = makeClassDecorator((opt, constructor, context) => {
|
|
120
|
+
if (Array.isArray(opt)) {
|
|
121
|
+
for (const comp of opt) {
|
|
122
|
+
generateComponent(constructor, comp, context.metadata);
|
|
94
123
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
Reflect.defineMetadata('selfskip', metadata, target, propertyKey);
|
|
104
|
-
}
|
|
105
|
-
metadata[index] = name;
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
export function Optional() {
|
|
109
|
-
return (target, propertyKey, index) => {
|
|
110
|
-
let metadata = Reflect.getMetadata('optional', target, propertyKey);
|
|
111
|
-
if (!metadata) {
|
|
112
|
-
metadata = {};
|
|
113
|
-
Reflect.defineMetadata('optional', metadata, target, propertyKey);
|
|
114
|
-
}
|
|
115
|
-
metadata[index] = true;
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
export function customElement(opt) {
|
|
119
|
-
return (target) => {
|
|
120
|
-
Components.defineView(target, opt);
|
|
121
|
-
return target;
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
+
}
|
|
125
|
+
else if (typeof opt === 'object') {
|
|
126
|
+
generateComponent(constructor, opt, context.metadata);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
export const customElement = makeClassDecorator((opt, constructor, context) => {
|
|
130
|
+
Components.defineView(constructor, opt);
|
|
131
|
+
});
|
|
124
132
|
//# sourceMappingURL=decorators.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dec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G,CAAC,CAAC;SAC/B;QACD,OAAO,MAAM,CAAC;IACf,CAAC,CAAC;AACH,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAAa;IACrC,OAAO,CAAC,MAAgB,EAAE,WAAmB,EAAE,KAAa,EAAE,EAAE;QAC/D,IAAI,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;QACpE,IAAI,CAAC,QAAQ,EAAE;YACd,QAAQ,GAAG,EAAE,CAAC;YACd,OAAO,CAAC,cAAc,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;SAClE;QACD,QAAQ,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IACxB,CAAC,CAAC;AACH,CAAC;AAED,MAAM,UAAU,QAAQ;IACvB,OAAO,CAAC,MAAgB,EAAE,WAAmB,EAAE,KAAa,EAAE,EAAE;QAC/D,IAAI,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;QACpE,IAAI,CAAC,QAAQ,EAAE;YACd,QAAQ,GAAG,EAAE,CAAC;YACd,OAAO,CAAC,cAAc,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;SAClE;QACD,QAAQ,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IACxB,CAAC,CAAC;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAAwB,GAAoD;IACxG,OAAO,CAAC,MAAiB,EAAE,EAAE;QAC5B,UAAU,CAAC,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACnC,OAAO,MAAM,CAAC;IACf,CAAC,CAAC;AACH,CAAC","sourcesContent":["import type { TypeOf } from '../utils/typeof.js';\nimport { DomNode } from '@ibyar/elements';\nimport { Components } from '../component/component.js';\nimport { ReflectComponents } from '../component/reflect.js';\nimport { fetchHtml, TemplateUrl } from '../utils/path.js';\nimport { ZoneType } from '../zone/bootstrap.js';\nimport { ValueControl } from '../component/custom-element.js';\n\n\nexport interface DirectiveOptions {\n\n\t/**\n\t * the name of the directive which is used in the template\n\t * \n\t * a structural directive name should start with `*`,\n\t * and an attributes directive should not.\n\t */\n\tselector: string;\n\n\t/**\n\t * - use `manual` for no zone.js patch effect applied,\n\t * and used for manual change detection for heavily process components.\n\t * \n\t * - use `proxy` zone for automatic detect changes without use of `zone.js`\n\t * \n\t * - use `aurora` for detection events like `rxjs` observables, `setTimeout`,\n\t * `setInterval` and `fetch` and `XMLHttpRequest`, etc...\n\t * make sure that `zone.js` is imported in the polyfills module. \n\t * \n\t * if no value specified, the value will be initialized by the custom element `web component` zone,\n\t * - if the web component zone is `manual`, the directive zone also will be `manual`, expect weird behavior.\n\t * - if the web component zone is `proxy`, the directive zone also will be `proxy`.\n\t * - if the web component zone is `aurora`, the directive zone also will be `aurora` and will get the benefit of `zone.js`.\n\t */\n\tzone?: ZoneType;\n}\n\nexport interface ServiceOptions {\n\tprovideIn?: TypeOf<CustomElementConstructor> | 'root' | 'platform' | 'any';\n}\n\nexport interface PipeOptions {\n\tname: string;\n\tasynchronous?: boolean;\n}\n\nexport interface ComponentOptions<T = Function> {\n\t/**\n\t * a tag name for the component,\n\t * if the tag name is valid custom element name, the view class will be a custom element,\n\t * otherwise an HTMLUnknownElement will be created\n\t */\n\tselector: string;\n\n\t/**\n\t * add html file url path to fetch,\n\t * templateUrl had propriety than template, and will override it.\n\t *\n\t * Can provide file name as \"person-view.html\" will resolved \n\t * as 'http://site-address.org/persin-view.html',\n\t * \n\t * OR as an object { moduleMeta: import.meta, filename: 'person-edit.html' }\n\t * let (import.meta = '/person/person.js') will resolved \n\t * as 'http://site-address.org/person/person-edit.html',\n\t * \n\t * OR as an object { moduleMeta: import.meta }\n\t * let (import.meta = '/person/person.js') will resolved as 'http://site-address.org/person/person.html'.\n\t * \n\t * if url not found, component will not be defined,\n\t * \n\t * if you didn't use webpack or rollup.js or any bundler, \n\t * you should copy the html files to its folder by yourself. \n\t */\n\ttemplateUrl?: TemplateUrl | string;\n\t/**\n\t * template: typeof 'string' ==> html string,\n\t * \t\t\t TypeOf 'DomRootRenderNode<T>' ==> JSX, create factory\n\t * \tif template === null || undefined ==> it had nothing to render, \n\t * and may be inherit from an html element\n\t * \n\t * 2 possible way to write a template, as inline string, represent a a valid html, \n\t * or us aurora jsx factory \n\t * \t\t\t\t\n\t */\n\ttemplate?: string | DomNode;\n\t/**\n\t * style for this element\n\t */\n\tstyles?: string | { [key: string]: string }[];\n\t/**\n\t * what basic element should the new component inherit from,\n\t * the tag name to inherit from as 'a', 'div', 'table', 'td', 'th', 'tr', etc ...\n\t */\n\textend?: keyof HTMLElementTagNameMap;\n\n\t/**\n\t * An encapsulation policy for the template and CSS styles. One of:\n\t * 'custom': Use global CSS without any encapsulation.\n\t * 'shadow-dom': Use Shadow DOM v1 to encapsulate styles.\n\t * \n\t * 'template': like 'custom', with load the template from the document ('index.html' file)\n\t * \t \t\t\tthat had the same id as the component \"selector\".\n\t * 'shadow-dom-template': like 'shadowDom', and load template by selector id.\n\t * \n\t * Both 'template' & 'shadow-dom-template' encapsulation type:\n\t * should had attributes name like lowercase,\n\t * \tthe browser itself, will convert all attributes to lowercase\n\t * \n\t * ```typescript\n\t *\t\t@Input('personage') personAge: number;\n\t *\t\t@Input('propname') propName: string;\n\t *\t\t@Output('savebuttonclick') saveButtonClick = new EventEmitter<Persons>();\n\t *\t\t@View('personform') personForm: HTMLFormElement;\n\t * ```\n\t * \n\t * any root element as \n\t * \n\t * ```html\n\t * <root-app></root-app>\n\t * ```\n\t * \n\t * the supported bind options is 'One way binding *(as passing data only)'\n\t * and 'template parsing' and 'event binding' syntax, HTML (angular) like.\n\t * it load its attributes from 'window object'\n\t * \n\t * so to pass date to A root element, \n\t * \n\t * ```html\n\t * <script>\n\t * \tlet appVersion = '0.1.504';\n\t * \tfunction onRootAppClick() {\n\t *\t\tconsole.log('root app clicked');\n\t * \t}\n\t * \tfunction onSave(data){\n\t *\t\tconsole.log('root app save', data);\n\t * \t}\n\t * </script>\n\t * <root-app [version]=\"appVersion\" \n\t * \t\tonclick=\"onRootAppClick()\"\n\t * \t\t(save)=\"onSave()\" ></root-app>\n\t * ```\n\t * \n\t * default is 'custom'\n\t * @type {'custom' | 'shadowDom' | 'template' | 'shadowDom-template'}\n\t */\n\tencapsulation?: 'custom' | 'shadow-dom' | 'template' | 'shadow-dom-template';\n\n\t/**\n\t * default: 'open'\n\t */\n\tshadowDomMode?: ShadowRootMode;\n\n\t/**\n\t * default: false\n\t */\n\tshadowDomDelegatesFocus?: boolean;\n\n\t/**\n\t * Create a custom form-associated element with HTMLElement.attachInternals\n\t * default: false\n\t * \n\t * if the value is `true` it is expected from the model class to implement `ValueControl<T>` interface\n\t * \n\t * otherwise you can register another class that implement `ValueControl<T>`,\n\t * in case if you want split the model and the value controller.\n\t * \n\t * #### Usage Notes:\n\t * \n\t * ```ts\n\t * \n\t * @Component({\n\t * \tselector: 'custom-message',\n\t * \ttemplate: `\n\t * \t\t<label for=\"message\">Message</label>\n\t * \t\t<textarea id=\"message\" [(value)]=\"message\" [disabled]=\"disabled\" (change)=\"onMessageChange($event.target.value)\"></textarea>\n\t * \t`,\n\t * \tformAssociated: true,\n\t * \t// formAssociated: CustomMessage,\n\t * })\n\t * export class CustomMessage implements ValueControl<string> {\n\t * \n\t * \tprivate message: string | null = '';\n\t * \tprivate disabled: boolean = false;\n\t * \tprivate _onChange: (_: any) => void = () => {};\n\t * \n\t * \twriteValue({ value, mode }: WriteValueOptions<string>) {\n\t * \t\tthis.message = mode !== 'reset' ? value : '';\n\t * \t}\n\t * \n\t * \tregisterOnChange(fn: (_: any) => void): void {\n\t * \t\tthis._onChange = fn;\n\t * \t}\n\t * \n\t * \tsetDisabledState(isDisabled: boolean) {\n\t * \t\tthis.disabled = isDisabled;\n\t * \t}\n\t * \n\t * \tonMessageChange(message: string) {\n\t * \t\tthis._onChange(message);\n\t * \t}\n\t * \t\n\t * }\n\t * \n\t * \n\t * export class CustomInputValueControl implements ValueControl<number> {\n\t * \n\t * \tprivate _value: number | null = null;\n\t * \tprivate _disabled: boolean = false;\n\t * \tprivate _onChange: (_: any) => void = () => {};\n\t * \n\t * \twriteValue({ value, mode }: WriteValueOptions<number>) {\n\t * \t\tthis._value = mode !== 'reset' ? value : null;\n\t * \t}\n\t * \n\t * \tregisterOnChange(fn: (_: any) => void): void {\n\t * \t\tthis._onChange = fn;\n\t * \t}\n\t * \n\t * \tsetDisabledState(isDisabled: boolean) {\n\t * \t\tthis._disabled = isDisabled;\n\t * \t}\n\t * \t\n\t * }\n\t * \n\t * @Component({\n\t * \tselector: 'custom-input',\n\t * \textend: 'input',\n\t * \tformAssociated: CustomInputValueControl,\n\t * })\n\t * export class CustomInputElement {\n\t * \t@View()\n\t * \tview: HTMLInputElement;\n\t * \n\t * \tonInit() {\n\t * \t\tthis.view.type = 'number';\n\t * \t}\n\t * }\n\t * \n\t * ```\n\t */\n\tformAssociated?: boolean | TypeOf<ValueControl<any>>;\n\n\t/**\n\t * - use `manual` for no zone.js patch effect applied,\n\t * and used for manual change detection for heavily process components.\n\t * \n\t * - use `proxy` zone for automatic detect changes without use of `zone.js`\n\t * \n\t * - use `aurora` for detection events like `rxjs` observables, `setTimeout`,\n\t * `setInterval` and `fetch` and `XMLHttpRequest`, etc...\n\t * make sure that `zone.js` is imported in the polyfills module. \n\t * \n\t * the default value is the platform zone type which can be changed by:\n\t * \n\t * ```js\n\t * bootstrapZone('manual')\n\t * bootstrapZone('proxy')\n\t * bootstrapZone('aurora')\n\t * ```\n\t * \n\t * if `bootstrapZone` never been called, then the default zone is a `manual`.\n\t */\n\tzone?: ZoneType;\n\n\t/**\n\t * The imports property specifies the component's template dependencies — those directives, components, and pipes that can be used within its template.\n\t */\n\timports?: (TypeOf<any> | ReadonlyArray<any>)[];\n}\n\nexport interface ChildOptions {\n\t[key: string]: any;\n}\n\nexport interface ViewChildOpt {\n\tselector: string | typeof HTMLElement | CustomElementConstructor;\n\tchildOptions?: ChildOptions;\n}\n\nexport function Input(name?: string): Function {\n\treturn (target: Object, propertyKey: string) => {\n\t\tReflectComponents.addInput(target, propertyKey, name || propertyKey);\n\t};\n}\n\nexport function FormValue(): Function {\n\treturn (target: Object, propertyKey: string) => {\n\t\tReflectComponents.addInput(target, propertyKey, 'value');\n\t};\n}\n\nexport type OutputEventInit = Omit<EventInit, 'cancelable'>;\nexport type OutputOptions = { name?: string } & OutputEventInit;\n\nexport function Output(options?: OutputOptions): Function;\nexport function Output(name?: string, options?: OutputEventInit): Function;\nexport function Output(name?: string | OutputOptions, options?: OutputEventInit): Function {\n\tconst eventType = typeof name === 'object' ? name.name : name;\n\tconst eventOpts = typeof name === 'object' ? name : options;\n\treturn (target: Object, propertyKey: string) => {\n\t\tReflectComponents.addOutput(\n\t\t\ttarget,\n\t\t\tpropertyKey, eventType || propertyKey,\n\t\t\t{\n\t\t\t\tbubbles: eventOpts?.bubbles ?? false,\n\t\t\t\tcomposed: eventOpts?.composed ?? false\n\t\t\t}\n\t\t);\n\t};\n}\n\nexport function View(): Function {\n\treturn (target: Object, propertyKey: string) => {\n\t\tReflectComponents.setComponentView(target, propertyKey);\n\t};\n}\n\nexport function ViewChild(selector: string | typeof HTMLElement | CustomElementConstructor,\n\tchildOptions?: ChildOptions): Function {\n\treturn (target: Object, propertyKey: string) => {\n\t\tReflectComponents.addViewChild(target, propertyKey, selector, childOptions);\n\t};\n}\n\nexport function ViewChildren(selector: string | typeof HTMLElement | CustomElementConstructor): Function {\n\treturn (target: Object, propertyKey: string) => {\n\t\tReflectComponents.addViewChildren(target, propertyKey, selector);\n\t};\n}\n\nexport function HostListener(eventName: string, args?: string | string[]): Function {\n\treturn (target: Object, propertyKey: string) => {\n\t\targs = typeof args === 'string' ? [args] : args;\n\t\tReflectComponents.addHostListener(\n\t\t\ttarget,\n\t\t\tpropertyKey,\n\t\t\teventName,\n\t\t\targs || []\n\t\t);\n\t};\n}\n\nexport function HostBinding(hostPropertyName: string): Function {\n\treturn (target: Object, propertyKey: string) => {\n\t\tReflectComponents.addHostBinding(target, propertyKey, hostPropertyName);\n\t};\n}\n\nexport function Pipe(opt: PipeOptions): Function {\n\treturn (target: Function) => {\n\t\tComponents.definePipe(target, opt);\n\t\treturn target;\n\t};\n}\n\nexport function Service(opt: ServiceOptions): Function {\n\treturn (target: Function) => {\n\t\tComponents.defineService(target, opt);\n\t\treturn target;\n\t};\n}\n\nexport function Directive(opt: DirectiveOptions): Function {\n\treturn (target: Function) => {\n\t\tComponents.defineDirective(target, opt);\n\t\treturn target;\n\t};\n}\n\nfunction generateComponent<T extends { new(...args: any[]): {} }>(target: TypeOf<T>, opt: ComponentOptions<T>) {\n\tif (opt.templateUrl) {\n\t\tfetchHtml(opt.templateUrl)\n\t\t\t.then(htmlTemplate => {\n\t\t\t\tif (htmlTemplate) {\n\t\t\t\t\topt.template = htmlTemplate;\n\t\t\t\t\tComponents.defineComponent(target, opt);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(reason => {\n\t\t\t\tconsole.error(`Error @URL: ${opt.templateUrl}, for model Class: ${target.name},\\n Reason: ${reason}.`);\n\t\t\t});\n\t} else {\n\t\tComponents.defineComponent(target, opt);\n\t}\n}\n\nexport function Component<T extends { new(...args: any[]): {} }>(opt: ComponentOptions<T> | ComponentOptions<T>[]): Function {\n\treturn (target: TypeOf<T>) => {\n\t\tif (Array.isArray(opt)) {\n\t\t\tfor (const comp of opt) {\n\t\t\t\tgenerateComponent(target, comp);\n\t\t\t}\n\t\t} else if (typeof opt === 'object') {\n\t\t\tgenerateComponent(target, opt);\n\t\t}\n\t\treturn target;\n\t};\n}\n\nexport function SelfSkip(name?: string): Function {\n\treturn (target: Function, propertyKey: string, index: number) => {\n\t\tlet metadata = Reflect.getMetadata('selfskip', target, propertyKey);\n\t\tif (!metadata) {\n\t\t\tmetadata = {};\n\t\t\tReflect.defineMetadata('selfskip', metadata, target, propertyKey);\n\t\t}\n\t\tmetadata[index] = name;\n\t};\n}\n\nexport function Optional(): Function {\n\treturn (target: Function, propertyKey: string, index: number) => {\n\t\tlet metadata = Reflect.getMetadata('optional', target, propertyKey);\n\t\tif (!metadata) {\n\t\t\tmetadata = {};\n\t\t\tReflect.defineMetadata('optional', metadata, target, propertyKey);\n\t\t}\n\t\tmetadata[index] = true;\n\t};\n}\n\nexport function customElement<T extends HTMLElement>(opt: { selector: string } & ElementDefinitionOptions): Function {\n\treturn (target: TypeOf<T>) => {\n\t\tComponents.defineView(target, opt);\n\t\treturn target;\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../../src/core/annotation/decorators.ts"],"names":[],"mappings":"AACA,OAAO,EAEN,kBAAkB,EAAE,wBAAwB,EAC5C,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAW7C,MAAM,UAAU,KAAK,CAAc,IAAa;IAC/C,OAAO,wBAAwB,CAC9B,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QAClB,IAAI,CAAC,IAAI,IAAI,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ,EAAE;YAC9C,MAAM,IAAI,SAAS,CAAC,QAAQ,OAAO,OAAO,CAAC,IAAI,QAAQ,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAC;SACpG;QACD,IAAI,OAAO,CAAC,OAAO,EAAE;YACpB,MAAM,IAAI,WAAW,CAAC,oBAAoB,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,qBAAqB,CAAC,CAAC;SACxF;QACD,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAc,EAAE,IAAI,IAAI,OAAO,CAAC,IAAc,CAAC,C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AAE;gBACjB,GAAG,CAAC,QAAQ,GAAG,YAAY,CAAC;gBAC5B,UAAU,CAAC,eAAe,CAAC,MAAM,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;aAClD;QACF,CAAC,CAAC;aACD,KAAK,CAAC,MAAM,CAAC,EAAE;YACf,OAAO,CAAC,KAAK,CAAC,eAAe,GAAG,CAAC,WAAW,sBAAsB,MAAM,CAAC,IAAI,eAAe,MAAM,GAAG,CAAC,CAAC;QACxG,CAAC,CAAC,CAAC;KACJ;SAAM;QACN,UAAU,CAAC,eAAe,CAAC,MAAM,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;KAClD;AACF,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAC1C,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE;IAC7B,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QACvB,KAAK,MAAM,IAAI,IAAI,GAAG,EAAE;YACvB,iBAAiB,CAAC,WAAkB,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;SAC9D;KACD;SAAM,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QACnC,iBAAiB,CAAC,WAAkB,EAAE,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;KAC7D;AACF,CAAC,CACD,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,kBAAkB,CAC9C,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE;IAC7B,UAAU,CAAC,UAAU,CAAC,WAAkB,EAAE,GAAG,CAAC,CAAC;AAChD,CAAC,CACD,CAAC","sourcesContent":["import type { Class } from '../utils/typeof.js';\nimport {\n\tMetadataClass, MetadataContext,\n\tmakeClassDecorator, makeClassMemberDecorator\n} from '@ibyar/decorators';\nimport { Components } from '../component/component.js';\nimport { ReflectComponents } from '../component/reflect.js';\nimport { fetchHtml } from '../utils/path.js';\nimport {\n\tChildOptions, ComponentOptions, DirectiveOptions,\n\tOutputEventInit, OutputOptions, PipeOptions, ServiceOptions\n} from './options.js';\n\n\n\ntype PropertyValue<T> = T | ((value: T) => void) | undefined;\n\n\nexport function Input<This, Value>(name?: string) {\n\treturn makeClassMemberDecorator<PropertyValue<Value>, ClassFieldDecoratorContext<This, Value> | ClassSetterDecoratorContext<This, Value>>(\n\t\t(value, context) => {\n\t\t\tif (!name && typeof context.name !== 'string') {\n\t\t\t\tthrow new TypeError(`type ${typeof context.name} of '${context.name.toString()}' is not supported`);\n\t\t\t}\n\t\t\tif (context.private) {\n\t\t\t\tthrow new SyntaxError(`private members '${context.name.toString()}' is not supported.`);\n\t\t\t}\n\t\t\tReflectComponents.addInput(context.metadata, context.name as string, name || context.name as string);\n\t\t}\n\t);\n}\n\nexport function FormValue<This, Value>() {\n\treturn makeClassMemberDecorator<PropertyValue<Value>, ClassFieldDecoratorContext<This, Value> | ClassSetterDecoratorContext<This, Value>>(\n\t\t(value, context) => {\n\t\t\tif (typeof context.name !== 'string') {\n\t\t\t\tthrow new TypeError(`type ${typeof context.name} of '${context.name.toString()}' is not supported`);\n\t\t\t}\n\t\t\tif (context.private) {\n\t\t\t\tthrow new SyntaxError(`private members '${context.name.toString()}' is not supported.`);\n\t\t\t}\n\t\t\tReflectComponents.addInput(context.metadata, context.name, 'value');\n\t\t}\n\t);\n}\n\nexport function Output<This, Value>(options?: OutputOptions): (value: undefined, context: ClassFieldDecoratorContext<This, Value>) => void;\nexport function Output<This, Value>(name?: string, options?: OutputEventInit): (value: undefined, context: ClassFieldDecoratorContext<This, Value>) => void;\nexport function Output<This, Value>(name?: string | OutputOptions, options?: OutputEventInit): (value: undefined, context: ClassFieldDecoratorContext<This, Value>) => void {\n\tconst eventType = typeof name === 'object' ? name.name : name;\n\tconst eventOpts = typeof name === 'object' ? name : options;\n\treturn makeClassMemberDecorator<undefined, ClassFieldDecoratorContext<This, Value>>(\n\t\t(value, context) => {\n\t\t\tif (typeof context.name !== 'string') {\n\t\t\t\tthrow new TypeError(`type ${typeof context.name} of '${context.name.toString()}' is not supported`);\n\t\t\t}\n\t\t\tif (context.private) {\n\t\t\t\tthrow new SyntaxError(`private members '${context.name.toString()}' is not supported.`);\n\t\t\t}\n\t\t\tReflectComponents.addOutput(\n\t\t\t\tcontext.metadata,\n\t\t\t\tcontext.name,\n\t\t\t\teventType || context.name,\n\t\t\t\t{\n\t\t\t\t\tbubbles: eventOpts?.bubbles ?? false,\n\t\t\t\t\tcomposed: eventOpts?.composed ?? false\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t);\n}\n\nexport function View<This, Value>() {\n\treturn makeClassMemberDecorator<PropertyValue<Value>, ClassFieldDecoratorContext<This, Value> | ClassSetterDecoratorContext<This, Value>>(\n\t\t(value, context) => {\n\t\t\tif (typeof context.name !== 'string') {\n\t\t\t\tthrow new TypeError(`type ${typeof context.name} of '${context.name.toString()}' is not supported`);\n\t\t\t}\n\t\t\tif (context.private) {\n\t\t\t\tthrow new SyntaxError(`private members '${context.name.toString()}' is not supported.`);\n\t\t\t}\n\t\t\tReflectComponents.setComponentView(context.metadata, context.name);\n\t\t}\n\t);\n}\n\nexport function ViewChild<This, Value>(selector: string | typeof HTMLElement | CustomElementConstructor, childOptions?: ChildOptions) {\n\treturn makeClassMemberDecorator<PropertyValue<Value>, ClassFieldDecoratorContext<This, Value> | ClassSetterDecoratorContext<This, Value>>(\n\t\t(value, context) => {\n\t\t\tif (typeof context.name !== 'string') {\n\t\t\t\tthrow new TypeError(`type ${typeof context.name} of '${context.name.toString()}' is not supported`);\n\t\t\t}\n\t\t\tif (context.private) {\n\t\t\t\tthrow new SyntaxError(`private members '${context.name.toString()}' is not supported.`);\n\t\t\t}\n\t\t\tReflectComponents.addViewChild(context.metadata, context.name, selector, childOptions);\n\t\t}\n\t);\n}\n\nexport function ViewChildren<This, Value>(selector: string | typeof HTMLElement | CustomElementConstructor) {\n\treturn makeClassMemberDecorator<PropertyValue<Value>, ClassFieldDecoratorContext<This, Value> | ClassSetterDecoratorContext<This, Value>>(\n\t\t(value, context) => {\n\t\t\tif (typeof context.name !== 'string') {\n\t\t\t\tthrow new TypeError(`type ${typeof context.name} of '${context.name.toString()}' is not supported`);\n\t\t\t}\n\t\t\tif (context.private) {\n\t\t\t\tthrow new SyntaxError(`private members '${context.name.toString()}' is not supported.`);\n\t\t\t}\n\t\t\tReflectComponents.addViewChildren(context.metadata, context.name, selector);\n\t\t}\n\t);\n}\n\n\nexport function HostListener<This, Value extends (this: This, ...args: any) => any>(eventName: string, args?: string | string[]) {\n\treturn makeClassMemberDecorator<Value, ClassMethodDecoratorContext>(\n\t\t(value, context) => {\n\t\t\tif (typeof context.name !== 'string') {\n\t\t\t\tthrow new TypeError(`type ${typeof context.name} of '${context.name.toString()}' is not supported`);\n\t\t\t}\n\t\t\targs = typeof args === 'string' ? [args] : args;\n\t\t\tReflectComponents.addHostListener(\n\t\t\t\tcontext.metadata,\n\t\t\t\tcontext.name,\n\t\t\t\teventName,\n\t\t\t\targs || []\n\t\t\t);\n\t\t}\n\t);\n}\n\n\ntype ValueGetter<T> = T | (() => T) | undefined;\n\nexport function HostBinding<This, Value>(hostPropertyName: string) {\n\treturn makeClassMemberDecorator<ValueGetter<Value>, ClassFieldDecoratorContext<This, Value> | ClassMethodDecoratorContext<This, any> | ClassGetterDecoratorContext<This, Value>>(\n\t\t(value, context) => {\n\t\t\tif (typeof context.name !== 'string') {\n\t\t\t\tthrow new TypeError(`type ${typeof context.name} of '${context.name.toString()}' is not supported`);\n\t\t\t}\n\t\t\tif (context.private) {\n\t\t\t\tthrow new SyntaxError(`private members '${context.name.toString()}' is not supported.`);\n\t\t\t}\n\t\t\tReflectComponents.addHostBinding(context.metadata, context.name, hostPropertyName);\n\t\t}\n\t);\n}\n\nexport const Pipe = makeClassDecorator<PipeOptions>(\n\t(opt, constructor, context) => {\n\t\tComponents.definePipe(constructor as any, opt, context.metadata);\n\t}\n);\n\n\nexport const Directive = makeClassDecorator<DirectiveOptions>(\n\t(opt, constructor, context) => {\n\t\tComponents.defineDirective(constructor as any, opt, context.metadata);\n\t}\n);\n\n\nfunction generateComponent<T extends Class>(target: MetadataClass<T>, opt: ComponentOptions<T>, metadata: MetadataContext) {\n\tif (opt.templateUrl) {\n\t\tfetchHtml(opt.templateUrl)\n\t\t\t.then(htmlTemplate => {\n\t\t\t\tif (htmlTemplate) {\n\t\t\t\t\topt.template = htmlTemplate;\n\t\t\t\t\tComponents.defineComponent(target, opt, metadata);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(reason => {\n\t\t\t\tconsole.error(`Error @URL: ${opt.templateUrl}, for model Class: ${target.name},\\n Reason: ${reason}.`);\n\t\t\t});\n\t} else {\n\t\tComponents.defineComponent(target, opt, metadata);\n\t}\n}\n\nexport const Component = makeClassDecorator<ComponentOptions | ComponentOptions[]>(\n\t(opt, constructor, context) => {\n\t\tif (Array.isArray(opt)) {\n\t\t\tfor (const comp of opt) {\n\t\t\t\tgenerateComponent(constructor as any, comp, context.metadata);\n\t\t\t}\n\t\t} else if (typeof opt === 'object') {\n\t\t\tgenerateComponent(constructor as any, opt, context.metadata);\n\t\t}\n\t}\n);\n\nexport const customElement = makeClassDecorator<{ selector: string } & ElementDefinitionOptions, Class<HTMLElement>>(\n\t(opt, constructor, context) => {\n\t\tComponents.defineView(constructor as any, opt);\n\t}\n);\n"]}
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import type { Class, TypeOf } from '../utils/typeof.js';
|
|
2
|
+
import { DomNode } from '@ibyar/elements';
|
|
3
|
+
import { TemplateUrl } from '../utils/path.js';
|
|
4
|
+
import { ZoneType } from '../zone/bootstrap.js';
|
|
5
|
+
import { ValueControl } from '../component/custom-element.js';
|
|
6
|
+
export interface DirectiveOptions {
|
|
7
|
+
/**
|
|
8
|
+
* the name of the directive which is used in the template
|
|
9
|
+
*
|
|
10
|
+
* a structural directive name should start with `*`,
|
|
11
|
+
* and an attributes directive should not.
|
|
12
|
+
*/
|
|
13
|
+
selector: string;
|
|
14
|
+
/**
|
|
15
|
+
* - use `manual` for no zone.js patch effect applied,
|
|
16
|
+
* and used for manual change detection for heavily process components.
|
|
17
|
+
*
|
|
18
|
+
* - use `proxy` zone for automatic detect changes without use of `zone.js`
|
|
19
|
+
*
|
|
20
|
+
* - use `aurora` for detection events like `rxjs` observables, `setTimeout`,
|
|
21
|
+
* `setInterval` and `fetch` and `XMLHttpRequest`, etc...
|
|
22
|
+
* make sure that `zone.js` is imported in the polyfills module.
|
|
23
|
+
*
|
|
24
|
+
* if no value specified, the value will be initialized by the custom element `web component` zone,
|
|
25
|
+
* - if the web component zone is `manual`, the directive zone also will be `manual`, expect weird behavior.
|
|
26
|
+
* - if the web component zone is `proxy`, the directive zone also will be `proxy`.
|
|
27
|
+
* - if the web component zone is `aurora`, the directive zone also will be `aurora` and will get the benefit of `zone.js`.
|
|
28
|
+
*/
|
|
29
|
+
zone?: ZoneType;
|
|
30
|
+
}
|
|
31
|
+
export interface ServiceOptions {
|
|
32
|
+
provideIn?: TypeOf<CustomElementConstructor> | 'root' | 'platform' | 'any';
|
|
33
|
+
}
|
|
34
|
+
export interface PipeOptions {
|
|
35
|
+
name: string;
|
|
36
|
+
asynchronous?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface ComponentOptions<T = Class> {
|
|
39
|
+
/**
|
|
40
|
+
* a tag name for the component,
|
|
41
|
+
* if the tag name is valid custom element name, the view class will be a custom element,
|
|
42
|
+
* otherwise an HTMLUnknownElement will be created
|
|
43
|
+
*/
|
|
44
|
+
selector: string;
|
|
45
|
+
/**
|
|
46
|
+
* add html file url path to fetch,
|
|
47
|
+
* templateUrl had propriety than template, and will override it.
|
|
48
|
+
*
|
|
49
|
+
* Can provide file name as "person-view.html" will resolved
|
|
50
|
+
* as 'http://site-address.org/persin-view.html',
|
|
51
|
+
*
|
|
52
|
+
* OR as an object { moduleMeta: import.meta, filename: 'person-edit.html' }
|
|
53
|
+
* let (import.meta = '/person/person.js') will resolved
|
|
54
|
+
* as 'http://site-address.org/person/person-edit.html',
|
|
55
|
+
*
|
|
56
|
+
* OR as an object { moduleMeta: import.meta }
|
|
57
|
+
* let (import.meta = '/person/person.js') will resolved as 'http://site-address.org/person/person.html'.
|
|
58
|
+
*
|
|
59
|
+
* if url not found, component will not be defined,
|
|
60
|
+
*
|
|
61
|
+
* if you didn't use webpack or rollup.js or any bundler,
|
|
62
|
+
* you should copy the html files to its folder by yourself.
|
|
63
|
+
*/
|
|
64
|
+
templateUrl?: TemplateUrl | string;
|
|
65
|
+
/**
|
|
66
|
+
* template: typeof 'string' ==> html string,
|
|
67
|
+
* TypeOf 'DomRootRenderNode<T>' ==> JSX, create factory
|
|
68
|
+
* if template === null || undefined ==> it had nothing to render,
|
|
69
|
+
* and may be inherit from an html element
|
|
70
|
+
*
|
|
71
|
+
* 2 possible way to write a template, as inline string, represent a a valid html,
|
|
72
|
+
* or us aurora jsx factory
|
|
73
|
+
*
|
|
74
|
+
*/
|
|
75
|
+
template?: string | DomNode;
|
|
76
|
+
/**
|
|
77
|
+
* style for this element
|
|
78
|
+
*/
|
|
79
|
+
styles?: string | {
|
|
80
|
+
[key: string]: string;
|
|
81
|
+
}[];
|
|
82
|
+
/**
|
|
83
|
+
* what basic element should the new component inherit from,
|
|
84
|
+
* the tag name to inherit from as 'a', 'div', 'table', 'td', 'th', 'tr', etc ...
|
|
85
|
+
*/
|
|
86
|
+
extend?: keyof HTMLElementTagNameMap;
|
|
87
|
+
/**
|
|
88
|
+
* An encapsulation policy for the template and CSS styles. One of:
|
|
89
|
+
* 'custom': Use global CSS without any encapsulation.
|
|
90
|
+
* 'shadow-dom': Use Shadow DOM v1 to encapsulate styles.
|
|
91
|
+
*
|
|
92
|
+
* 'template': like 'custom', with load the template from the document ('index.html' file)
|
|
93
|
+
* that had the same id as the component "selector".
|
|
94
|
+
* 'shadow-dom-template': like 'shadowDom', and load template by selector id.
|
|
95
|
+
*
|
|
96
|
+
* Both 'template' & 'shadow-dom-template' encapsulation type:
|
|
97
|
+
* should had attributes name like lowercase,
|
|
98
|
+
* the browser itself, will convert all attributes to lowercase
|
|
99
|
+
*
|
|
100
|
+
* ```typescript
|
|
101
|
+
* @Input('personage') personAge: number;
|
|
102
|
+
* @Input('propname') propName: string;
|
|
103
|
+
* @Output('savebuttonclick') saveButtonClick = new EventEmitter<Persons>();
|
|
104
|
+
* @View('personform') personForm: HTMLFormElement;
|
|
105
|
+
* ```
|
|
106
|
+
*
|
|
107
|
+
* any app root element as
|
|
108
|
+
*
|
|
109
|
+
* ```html
|
|
110
|
+
* <app-root></app-root>
|
|
111
|
+
* ```
|
|
112
|
+
*
|
|
113
|
+
* the supported bind options is 'One way binding *(as passing data only)'
|
|
114
|
+
* and 'template parsing' and 'event binding' syntax, HTML (angular) like.
|
|
115
|
+
* it load its attributes from 'window object'
|
|
116
|
+
*
|
|
117
|
+
* so to pass date to A root element,
|
|
118
|
+
*
|
|
119
|
+
* ```html
|
|
120
|
+
* <script>
|
|
121
|
+
* const appVersion = '0.1.504';
|
|
122
|
+
* function onRootAppClick() {
|
|
123
|
+
* console.log('root app clicked');
|
|
124
|
+
* }
|
|
125
|
+
* function onSave(data){
|
|
126
|
+
* console.log('root app save', data);
|
|
127
|
+
* }
|
|
128
|
+
* </script>
|
|
129
|
+
* <app-root [version]="appVersion"
|
|
130
|
+
* onclick="onRootAppClick()"
|
|
131
|
+
* (save)="onSave()" >
|
|
132
|
+
* </app-root>
|
|
133
|
+
* ```
|
|
134
|
+
*
|
|
135
|
+
* default is 'custom'
|
|
136
|
+
* @type {'custom' | 'shadowDom' | 'template' | 'shadowDom-template'}
|
|
137
|
+
*/
|
|
138
|
+
encapsulation?: 'custom' | 'shadow-dom' | 'template' | 'shadow-dom-template';
|
|
139
|
+
/**
|
|
140
|
+
* default: 'open' when encapsulation used,
|
|
141
|
+
* otherwise it is undefined and will not attach shadow root element.
|
|
142
|
+
*/
|
|
143
|
+
shadowDomMode?: ShadowRootMode;
|
|
144
|
+
/**
|
|
145
|
+
* default: false
|
|
146
|
+
*/
|
|
147
|
+
shadowDomDelegatesFocus?: boolean;
|
|
148
|
+
/**
|
|
149
|
+
* shadow root initialization options,
|
|
150
|
+
* default mode: `open`, delegatesFocus: `false` and slotAssignment: `manual`
|
|
151
|
+
*/
|
|
152
|
+
shadowRootInit?: Partial<ShadowRootInit>;
|
|
153
|
+
/**
|
|
154
|
+
* Create a custom form-associated element with HTMLElement.attachInternals
|
|
155
|
+
* default: false
|
|
156
|
+
*
|
|
157
|
+
* if the value is `true` it is expected from the model class to implement `ValueControl<T>` interface
|
|
158
|
+
*
|
|
159
|
+
* otherwise you can register another class that implement `ValueControl<T>`,
|
|
160
|
+
* in case if you want split the model and the value controller.
|
|
161
|
+
*
|
|
162
|
+
* #### Usage Notes:
|
|
163
|
+
*
|
|
164
|
+
* ```ts
|
|
165
|
+
*
|
|
166
|
+
* @Component({
|
|
167
|
+
* selector: 'custom-message',
|
|
168
|
+
* template: `
|
|
169
|
+
* <label for="message">Message</label>
|
|
170
|
+
* <textarea id="message" [(value)]="message" [disabled]="disabled" (change)="onMessageChange($event.target.value)"></textarea>
|
|
171
|
+
* `,
|
|
172
|
+
* formAssociated: true,
|
|
173
|
+
* // formAssociated: CustomMessage,
|
|
174
|
+
* })
|
|
175
|
+
* export class CustomMessage implements ValueControl<string> {
|
|
176
|
+
*
|
|
177
|
+
* private message: string | null = '';
|
|
178
|
+
* private disabled: boolean = false;
|
|
179
|
+
* private _onChange: (_: any) => void = () => {};
|
|
180
|
+
*
|
|
181
|
+
* writeValue({ value, mode }: WriteValueOptions<string>) {
|
|
182
|
+
* this.message = mode !== 'reset' ? value : '';
|
|
183
|
+
* }
|
|
184
|
+
*
|
|
185
|
+
* registerOnChange(fn: (_: any) => void): void {
|
|
186
|
+
* this._onChange = fn;
|
|
187
|
+
* }
|
|
188
|
+
*
|
|
189
|
+
* setDisabledState(isDisabled: boolean) {
|
|
190
|
+
* this.disabled = isDisabled;
|
|
191
|
+
* }
|
|
192
|
+
*
|
|
193
|
+
* onMessageChange(message: string) {
|
|
194
|
+
* this._onChange(message);
|
|
195
|
+
* }
|
|
196
|
+
*
|
|
197
|
+
* }
|
|
198
|
+
*
|
|
199
|
+
*
|
|
200
|
+
* export class CustomInputValueControl implements ValueControl<number> {
|
|
201
|
+
*
|
|
202
|
+
* private _value: number | null = null;
|
|
203
|
+
* private _disabled: boolean = false;
|
|
204
|
+
* private _onChange: (_: any) => void = () => {};
|
|
205
|
+
*
|
|
206
|
+
* writeValue({ value, mode }: WriteValueOptions<number>) {
|
|
207
|
+
* this._value = mode !== 'reset' ? value : null;
|
|
208
|
+
* }
|
|
209
|
+
*
|
|
210
|
+
* registerOnChange(fn: (_: any) => void): void {
|
|
211
|
+
* this._onChange = fn;
|
|
212
|
+
* }
|
|
213
|
+
*
|
|
214
|
+
* setDisabledState(isDisabled: boolean) {
|
|
215
|
+
* this._disabled = isDisabled;
|
|
216
|
+
* }
|
|
217
|
+
*
|
|
218
|
+
* }
|
|
219
|
+
*
|
|
220
|
+
* @Component({
|
|
221
|
+
* selector: 'custom-input',
|
|
222
|
+
* extend: 'input',
|
|
223
|
+
* formAssociated: CustomInputValueControl,
|
|
224
|
+
* })
|
|
225
|
+
* export class CustomInputElement {
|
|
226
|
+
*
|
|
227
|
+
* @View()
|
|
228
|
+
* view: HTMLInputElement;
|
|
229
|
+
*
|
|
230
|
+
* onInit() {
|
|
231
|
+
* this.view.type = 'number';
|
|
232
|
+
* }
|
|
233
|
+
* }
|
|
234
|
+
*
|
|
235
|
+
* ```
|
|
236
|
+
*/
|
|
237
|
+
formAssociated?: boolean | TypeOf<ValueControl<any>>;
|
|
238
|
+
/**
|
|
239
|
+
* - use `manual` for no zone.js patch effect applied,
|
|
240
|
+
* and used for manual change detection for heavily process components.
|
|
241
|
+
*
|
|
242
|
+
* - use `proxy` zone for automatic detect changes without use of `zone.js`
|
|
243
|
+
*
|
|
244
|
+
* - use `aurora` for detection events like `rxjs` observables, `setTimeout`,
|
|
245
|
+
* `setInterval` and `fetch` and `XMLHttpRequest`, etc...
|
|
246
|
+
* make sure that `zone.js` is imported in the polyfills module.
|
|
247
|
+
*
|
|
248
|
+
* the default value is the platform zone type which can be changed by:
|
|
249
|
+
*
|
|
250
|
+
* ```js
|
|
251
|
+
* bootstrapZone('manual')
|
|
252
|
+
* bootstrapZone('proxy')
|
|
253
|
+
* bootstrapZone('aurora')
|
|
254
|
+
* ```
|
|
255
|
+
*
|
|
256
|
+
* if `bootstrapZone` never been called, then the default zone is a `manual`.
|
|
257
|
+
*/
|
|
258
|
+
zone?: ZoneType;
|
|
259
|
+
/**
|
|
260
|
+
* The imports property specifies the component's template dependencies — those directives, components, and pipes that can be used within its template.
|
|
261
|
+
*/
|
|
262
|
+
imports?: (TypeOf<any> | ReadonlyArray<any>)[];
|
|
263
|
+
}
|
|
264
|
+
export interface ChildOptions {
|
|
265
|
+
[key: string]: any;
|
|
266
|
+
}
|
|
267
|
+
export interface ViewChildOpt {
|
|
268
|
+
selector: string | typeof HTMLElement | CustomElementConstructor;
|
|
269
|
+
childOptions?: ChildOptions;
|
|
270
|
+
}
|
|
271
|
+
export type OutputEventInit = Omit<EventInit, 'cancelable'>;
|
|
272
|
+
export type OutputOptions = {
|
|
273
|
+
name?: string;
|
|
274
|
+
} & OutputEventInit;
|
|
275
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/core/annotation/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;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C,EAAE,OAAO,GAAG,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IAErD;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;CAC/C;AAED,MAAM,WAAW,YAAY;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC5B,QAAQ,EAAE,MAAM,GAAG,OAAO,WAAW,GAAG,wBAAwB,CAAC;IACjE,YAAY,CAAC,EAAE,YAAY,CAAC;CAC5B;AAED,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AAC5D,MAAM,MAAM,aAAa,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/core/annotation/options.ts"],"names":[],"mappings":"","sourcesContent":["import type { Class, TypeOf } from '../utils/typeof.js';\nimport { DomNode } from '@ibyar/elements';\nimport { TemplateUrl } from '../utils/path.js';\nimport { ZoneType } from '../zone/bootstrap.js';\nimport { ValueControl } from '../component/custom-element.js';\n\n\nexport interface DirectiveOptions {\n\n\t/**\n\t * the name of the directive which is used in the template\n\t * \n\t * a structural directive name should start with `*`,\n\t * and an attributes directive should not.\n\t */\n\tselector: string;\n\n\t/**\n\t * - use `manual` for no zone.js patch effect applied,\n\t * and used for manual change detection for heavily process components.\n\t * \n\t * - use `proxy` zone for automatic detect changes without use of `zone.js`\n\t * \n\t * - use `aurora` for detection events like `rxjs` observables, `setTimeout`,\n\t * `setInterval` and `fetch` and `XMLHttpRequest`, etc...\n\t * make sure that `zone.js` is imported in the polyfills module. \n\t * \n\t * if no value specified, the value will be initialized by the custom element `web component` zone,\n\t * - if the web component zone is `manual`, the directive zone also will be `manual`, expect weird behavior.\n\t * - if the web component zone is `proxy`, the directive zone also will be `proxy`.\n\t * - if the web component zone is `aurora`, the directive zone also will be `aurora` and will get the benefit of `zone.js`.\n\t */\n\tzone?: ZoneType;\n}\n\nexport interface ServiceOptions {\n\tprovideIn?: TypeOf<CustomElementConstructor> | 'root' | 'platform' | 'any';\n}\n\nexport interface PipeOptions {\n\tname: string;\n\tasynchronous?: boolean;\n}\n\nexport interface ComponentOptions<T = Class> {\n\n\t/**\n\t * a tag name for the component,\n\t * if the tag name is valid custom element name, the view class will be a custom element,\n\t * otherwise an HTMLUnknownElement will be created\n\t */\n\tselector: string;\n\n\t/**\n\t * add html file url path to fetch,\n\t * templateUrl had propriety than template, and will override it.\n\t *\n\t * Can provide file name as \"person-view.html\" will resolved \n\t * as 'http://site-address.org/persin-view.html',\n\t * \n\t * OR as an object { moduleMeta: import.meta, filename: 'person-edit.html' }\n\t * let (import.meta = '/person/person.js') will resolved \n\t * as 'http://site-address.org/person/person-edit.html',\n\t * \n\t * OR as an object { moduleMeta: import.meta }\n\t * let (import.meta = '/person/person.js') will resolved as 'http://site-address.org/person/person.html'.\n\t * \n\t * if url not found, component will not be defined,\n\t * \n\t * if you didn't use webpack or rollup.js or any bundler, \n\t * you should copy the html files to its folder by yourself. \n\t */\n\ttemplateUrl?: TemplateUrl | string;\n\n\t/**\n\t * template: typeof 'string' ==> html string,\n\t * \t\t\t TypeOf 'DomRootRenderNode<T>' ==> JSX, create factory\n\t * \tif template === null || undefined ==> it had nothing to render, \n\t * and may be inherit from an html element\n\t * \n\t * 2 possible way to write a template, as inline string, represent a a valid html, \n\t * or us aurora jsx factory \n\t * \t\t\t\t\n\t */\n\ttemplate?: string | DomNode;\n\n\t/**\n\t * style for this element\n\t */\n\tstyles?: string | { [key: string]: string }[];\n\n\t/**\n\t * what basic element should the new component inherit from,\n\t * the tag name to inherit from as 'a', 'div', 'table', 'td', 'th', 'tr', etc ...\n\t */\n\textend?: keyof HTMLElementTagNameMap;\n\n\t/**\n\t * An encapsulation policy for the template and CSS styles. One of:\n\t * 'custom': Use global CSS without any encapsulation.\n\t * 'shadow-dom': Use Shadow DOM v1 to encapsulate styles.\n\t * \n\t * 'template': like 'custom', with load the template from the document ('index.html' file)\n\t * \t \t\t\tthat had the same id as the component \"selector\".\n\t * 'shadow-dom-template': like 'shadowDom', and load template by selector id.\n\t * \n\t * Both 'template' & 'shadow-dom-template' encapsulation type:\n\t * should had attributes name like lowercase,\n\t * \tthe browser itself, will convert all attributes to lowercase\n\t * \n\t * ```typescript\n\t *\t\t@Input('personage') personAge: number;\n\t *\t\t@Input('propname') propName: string;\n\t *\t\t@Output('savebuttonclick') saveButtonClick = new EventEmitter<Persons>();\n\t *\t\t@View('personform') personForm: HTMLFormElement;\n\t * ```\n\t * \n\t * any app root element as \n\t * \n\t * ```html\n\t * <app-root></app-root>\n\t * ```\n\t * \n\t * the supported bind options is 'One way binding *(as passing data only)'\n\t * and 'template parsing' and 'event binding' syntax, HTML (angular) like.\n\t * it load its attributes from 'window object'\n\t * \n\t * so to pass date to A root element, \n\t * \n\t * ```html\n\t * <script>\n\t * \tconst appVersion = '0.1.504';\n\t * \tfunction onRootAppClick() {\n\t *\t\tconsole.log('root app clicked');\n\t * \t}\n\t * \tfunction onSave(data){\n\t *\t\tconsole.log('root app save', data);\n\t * \t}\n\t * </script>\n\t * <app-root [version]=\"appVersion\" \n\t * \t\tonclick=\"onRootAppClick()\"\n\t * \t\t(save)=\"onSave()\" >\n\t * </app-root>\n\t * ```\n\t * \n\t * default is 'custom'\n\t * @type {'custom' | 'shadowDom' | 'template' | 'shadowDom-template'}\n\t */\n\tencapsulation?: 'custom' | 'shadow-dom' | 'template' | 'shadow-dom-template';\n\n\t/**\n\t * default: 'open' when encapsulation used,\n\t * otherwise it is undefined and will not attach shadow root element.\n\t */\n\tshadowDomMode?: ShadowRootMode;\n\n\t/**\n\t * default: false\n\t */\n\tshadowDomDelegatesFocus?: boolean;\n\n\t/**\n\t * shadow root initialization options,\n\t * default mode: `open`, delegatesFocus: `false` and slotAssignment: `manual`\n\t */\n\tshadowRootInit?: Partial<ShadowRootInit>;\n\n\t/**\n\t * Create a custom form-associated element with HTMLElement.attachInternals\n\t * default: false\n\t * \n\t * if the value is `true` it is expected from the model class to implement `ValueControl<T>` interface\n\t * \n\t * otherwise you can register another class that implement `ValueControl<T>`,\n\t * in case if you want split the model and the value controller.\n\t * \n\t * #### Usage Notes:\n\t * \n\t * ```ts\n\t * \n\t * @Component({\n\t * \tselector: 'custom-message',\n\t * \ttemplate: `\n\t * \t\t<label for=\"message\">Message</label>\n\t * \t\t<textarea id=\"message\" [(value)]=\"message\" [disabled]=\"disabled\" (change)=\"onMessageChange($event.target.value)\"></textarea>\n\t * \t`,\n\t * \tformAssociated: true,\n\t * \t// formAssociated: CustomMessage,\n\t * })\n\t * export class CustomMessage implements ValueControl<string> {\n\t * \n\t * \tprivate message: string | null = '';\n\t * \tprivate disabled: boolean = false;\n\t * \tprivate _onChange: (_: any) => void = () => {};\n\t * \n\t * \twriteValue({ value, mode }: WriteValueOptions<string>) {\n\t * \t\tthis.message = mode !== 'reset' ? value : '';\n\t * \t}\n\t * \n\t * \tregisterOnChange(fn: (_: any) => void): void {\n\t * \t\tthis._onChange = fn;\n\t * \t}\n\t * \n\t * \tsetDisabledState(isDisabled: boolean) {\n\t * \t\tthis.disabled = isDisabled;\n\t * \t}\n\t * \n\t * \tonMessageChange(message: string) {\n\t * \t\tthis._onChange(message);\n\t * \t}\n\t * \t\n\t * }\n\t * \n\t * \n\t * export class CustomInputValueControl implements ValueControl<number> {\n\t * \n\t * \tprivate _value: number | null = null;\n\t * \tprivate _disabled: boolean = false;\n\t * \tprivate _onChange: (_: any) => void = () => {};\n\t * \n\t * \twriteValue({ value, mode }: WriteValueOptions<number>) {\n\t * \t\tthis._value = mode !== 'reset' ? value : null;\n\t * \t}\n\t * \n\t * \tregisterOnChange(fn: (_: any) => void): void {\n\t * \t\tthis._onChange = fn;\n\t * \t}\n\t * \n\t * \tsetDisabledState(isDisabled: boolean) {\n\t * \t\tthis._disabled = isDisabled;\n\t * \t}\n\t * \t\n\t * }\n\t * \n\t * @Component({\n\t * \tselector: 'custom-input',\n\t * \textend: 'input',\n\t * \tformAssociated: CustomInputValueControl,\n\t * })\n\t * export class CustomInputElement {\n\t * \t\n\t * @View()\n\t * \tview: HTMLInputElement;\n\t * \n\t * \tonInit() {\n\t * \t\tthis.view.type = 'number';\n\t * \t}\n\t * }\n\t * \n\t * ```\n\t */\n\tformAssociated?: boolean | TypeOf<ValueControl<any>>;\n\n\t/**\n\t * - use `manual` for no zone.js patch effect applied,\n\t * and used for manual change detection for heavily process components.\n\t * \n\t * - use `proxy` zone for automatic detect changes without use of `zone.js`\n\t * \n\t * - use `aurora` for detection events like `rxjs` observables, `setTimeout`,\n\t * `setInterval` and `fetch` and `XMLHttpRequest`, etc...\n\t * make sure that `zone.js` is imported in the polyfills module. \n\t * \n\t * the default value is the platform zone type which can be changed by:\n\t * \n\t * ```js\n\t * bootstrapZone('manual')\n\t * bootstrapZone('proxy')\n\t * bootstrapZone('aurora')\n\t * ```\n\t * \n\t * if `bootstrapZone` never been called, then the default zone is a `manual`.\n\t */\n\tzone?: ZoneType;\n\n\t/**\n\t * The imports property specifies the component's template dependencies — those directives, components, and pipes that can be used within its template.\n\t */\n\timports?: (TypeOf<any> | ReadonlyArray<any>)[];\n}\n\nexport interface ChildOptions {\n\t[key: string]: any;\n}\n\nexport interface ViewChildOpt {\n\tselector: string | typeof HTMLElement | CustomElementConstructor;\n\tchildOptions?: ChildOptions;\n}\n\nexport type OutputEventInit = Omit<EventInit, 'cancelable'>;\nexport type OutputOptions = { name?: string } & OutputEventInit;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binding.expressions.d.ts","sourceRoot":"","sources":["../../../src/core/binding/binding.expressions.ts"],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