1 | /**
|
---|
2 | * @license
|
---|
3 | * Copyright Google LLC All Rights Reserved.
|
---|
4 | *
|
---|
5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
6 | * found in the LICENSE file at https://angular.io/license
|
---|
7 | */
|
---|
8 | import { ChangeDetectionStrategy } from '../change_detection/constants';
|
---|
9 | import { ViewEncapsulation } from '../metadata/view';
|
---|
10 | import { noSideEffects } from '../util/closure';
|
---|
11 | import { EMPTY_ARRAY, EMPTY_OBJ } from '../util/empty';
|
---|
12 | import { initNgDevMode } from '../util/ng_dev_mode';
|
---|
13 | import { stringify } from '../util/stringify';
|
---|
14 | import { NG_COMP_DEF, NG_DIR_DEF, NG_LOC_ID_DEF, NG_MOD_DEF, NG_PIPE_DEF } from './fields';
|
---|
15 | let _renderCompCount = 0;
|
---|
16 | /**
|
---|
17 | * Create a component definition object.
|
---|
18 | *
|
---|
19 | *
|
---|
20 | * # Example
|
---|
21 | * ```
|
---|
22 | * class MyDirective {
|
---|
23 | * // Generated by Angular Template Compiler
|
---|
24 | * // [Symbol] syntax will not be supported by TypeScript until v2.7
|
---|
25 | * static ɵcmp = defineComponent({
|
---|
26 | * ...
|
---|
27 | * });
|
---|
28 | * }
|
---|
29 | * ```
|
---|
30 | * @codeGenApi
|
---|
31 | */
|
---|
32 | export function ɵɵdefineComponent(componentDefinition) {
|
---|
33 | return noSideEffects(() => {
|
---|
34 | // Initialize ngDevMode. This must be the first statement in ɵɵdefineComponent.
|
---|
35 | // See the `initNgDevMode` docstring for more information.
|
---|
36 | (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();
|
---|
37 | const type = componentDefinition.type;
|
---|
38 | const declaredInputs = {};
|
---|
39 | const def = {
|
---|
40 | type: type,
|
---|
41 | providersResolver: null,
|
---|
42 | decls: componentDefinition.decls,
|
---|
43 | vars: componentDefinition.vars,
|
---|
44 | factory: null,
|
---|
45 | template: componentDefinition.template || null,
|
---|
46 | consts: componentDefinition.consts || null,
|
---|
47 | ngContentSelectors: componentDefinition.ngContentSelectors,
|
---|
48 | hostBindings: componentDefinition.hostBindings || null,
|
---|
49 | hostVars: componentDefinition.hostVars || 0,
|
---|
50 | hostAttrs: componentDefinition.hostAttrs || null,
|
---|
51 | contentQueries: componentDefinition.contentQueries || null,
|
---|
52 | declaredInputs: declaredInputs,
|
---|
53 | inputs: null,
|
---|
54 | outputs: null,
|
---|
55 | exportAs: componentDefinition.exportAs || null,
|
---|
56 | onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,
|
---|
57 | directiveDefs: null,
|
---|
58 | pipeDefs: null,
|
---|
59 | selectors: componentDefinition.selectors || EMPTY_ARRAY,
|
---|
60 | viewQuery: componentDefinition.viewQuery || null,
|
---|
61 | features: componentDefinition.features || null,
|
---|
62 | data: componentDefinition.data || {},
|
---|
63 | // TODO(misko): convert ViewEncapsulation into const enum so that it can be used
|
---|
64 | // directly in the next line. Also `None` should be 0 not 2.
|
---|
65 | encapsulation: componentDefinition.encapsulation || ViewEncapsulation.Emulated,
|
---|
66 | id: 'c',
|
---|
67 | styles: componentDefinition.styles || EMPTY_ARRAY,
|
---|
68 | _: null,
|
---|
69 | setInput: null,
|
---|
70 | schemas: componentDefinition.schemas || null,
|
---|
71 | tView: null,
|
---|
72 | };
|
---|
73 | const directiveTypes = componentDefinition.directives;
|
---|
74 | const feature = componentDefinition.features;
|
---|
75 | const pipeTypes = componentDefinition.pipes;
|
---|
76 | def.id += _renderCompCount++;
|
---|
77 | def.inputs = invertObject(componentDefinition.inputs, declaredInputs),
|
---|
78 | def.outputs = invertObject(componentDefinition.outputs),
|
---|
79 | feature && feature.forEach((fn) => fn(def));
|
---|
80 | def.directiveDefs = directiveTypes ?
|
---|
81 | () => (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes)
|
---|
82 | .map(extractDirectiveDef) :
|
---|
83 | null;
|
---|
84 | def.pipeDefs = pipeTypes ?
|
---|
85 | () => (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef) :
|
---|
86 | null;
|
---|
87 | return def;
|
---|
88 | });
|
---|
89 | }
|
---|
90 | /**
|
---|
91 | * Generated next to NgModules to monkey-patch directive and pipe references onto a component's
|
---|
92 | * definition, when generating a direct reference in the component file would otherwise create an
|
---|
93 | * import cycle.
|
---|
94 | *
|
---|
95 | * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details.
|
---|
96 | *
|
---|
97 | * @codeGenApi
|
---|
98 | */
|
---|
99 | export function ɵɵsetComponentScope(type, directives, pipes) {
|
---|
100 | const def = type.ɵcmp;
|
---|
101 | def.directiveDefs = () => directives.map(extractDirectiveDef);
|
---|
102 | def.pipeDefs = () => pipes.map(extractPipeDef);
|
---|
103 | }
|
---|
104 | export function extractDirectiveDef(type) {
|
---|
105 | const def = getComponentDef(type) || getDirectiveDef(type);
|
---|
106 | if (ngDevMode && !def) {
|
---|
107 | throw new Error(`'${type.name}' is neither 'ComponentType' or 'DirectiveType'.`);
|
---|
108 | }
|
---|
109 | return def;
|
---|
110 | }
|
---|
111 | export function extractPipeDef(type) {
|
---|
112 | const def = getPipeDef(type);
|
---|
113 | if (ngDevMode && !def) {
|
---|
114 | throw new Error(`'${type.name}' is not a 'PipeType'.`);
|
---|
115 | }
|
---|
116 | return def;
|
---|
117 | }
|
---|
118 | export const autoRegisterModuleById = {};
|
---|
119 | /**
|
---|
120 | * @codeGenApi
|
---|
121 | */
|
---|
122 | export function ɵɵdefineNgModule(def) {
|
---|
123 | return noSideEffects(() => {
|
---|
124 | const res = {
|
---|
125 | type: def.type,
|
---|
126 | bootstrap: def.bootstrap || EMPTY_ARRAY,
|
---|
127 | declarations: def.declarations || EMPTY_ARRAY,
|
---|
128 | imports: def.imports || EMPTY_ARRAY,
|
---|
129 | exports: def.exports || EMPTY_ARRAY,
|
---|
130 | transitiveCompileScopes: null,
|
---|
131 | schemas: def.schemas || null,
|
---|
132 | id: def.id || null,
|
---|
133 | };
|
---|
134 | if (def.id != null) {
|
---|
135 | autoRegisterModuleById[def.id] = def.type;
|
---|
136 | }
|
---|
137 | return res;
|
---|
138 | });
|
---|
139 | }
|
---|
140 | /**
|
---|
141 | * Adds the module metadata that is necessary to compute the module's transitive scope to an
|
---|
142 | * existing module definition.
|
---|
143 | *
|
---|
144 | * Scope metadata of modules is not used in production builds, so calls to this function can be
|
---|
145 | * marked pure to tree-shake it from the bundle, allowing for all referenced declarations
|
---|
146 | * to become eligible for tree-shaking as well.
|
---|
147 | *
|
---|
148 | * @codeGenApi
|
---|
149 | */
|
---|
150 | export function ɵɵsetNgModuleScope(type, scope) {
|
---|
151 | return noSideEffects(() => {
|
---|
152 | const ngModuleDef = getNgModuleDef(type, true);
|
---|
153 | ngModuleDef.declarations = scope.declarations || EMPTY_ARRAY;
|
---|
154 | ngModuleDef.imports = scope.imports || EMPTY_ARRAY;
|
---|
155 | ngModuleDef.exports = scope.exports || EMPTY_ARRAY;
|
---|
156 | });
|
---|
157 | }
|
---|
158 | /**
|
---|
159 | * Inverts an inputs or outputs lookup such that the keys, which were the
|
---|
160 | * minified keys, are part of the values, and the values are parsed so that
|
---|
161 | * the publicName of the property is the new key
|
---|
162 | *
|
---|
163 | * e.g. for
|
---|
164 | *
|
---|
165 | * ```
|
---|
166 | * class Comp {
|
---|
167 | * @Input()
|
---|
168 | * propName1: string;
|
---|
169 | *
|
---|
170 | * @Input('publicName2')
|
---|
171 | * declaredPropName2: number;
|
---|
172 | * }
|
---|
173 | * ```
|
---|
174 | *
|
---|
175 | * will be serialized as
|
---|
176 | *
|
---|
177 | * ```
|
---|
178 | * {
|
---|
179 | * propName1: 'propName1',
|
---|
180 | * declaredPropName2: ['publicName2', 'declaredPropName2'],
|
---|
181 | * }
|
---|
182 | * ```
|
---|
183 | *
|
---|
184 | * which is than translated by the minifier as:
|
---|
185 | *
|
---|
186 | * ```
|
---|
187 | * {
|
---|
188 | * minifiedPropName1: 'propName1',
|
---|
189 | * minifiedPropName2: ['publicName2', 'declaredPropName2'],
|
---|
190 | * }
|
---|
191 | * ```
|
---|
192 | *
|
---|
193 | * becomes: (public name => minifiedName)
|
---|
194 | *
|
---|
195 | * ```
|
---|
196 | * {
|
---|
197 | * 'propName1': 'minifiedPropName1',
|
---|
198 | * 'publicName2': 'minifiedPropName2',
|
---|
199 | * }
|
---|
200 | * ```
|
---|
201 | *
|
---|
202 | * Optionally the function can take `secondary` which will result in: (public name => declared name)
|
---|
203 | *
|
---|
204 | * ```
|
---|
205 | * {
|
---|
206 | * 'propName1': 'propName1',
|
---|
207 | * 'publicName2': 'declaredPropName2',
|
---|
208 | * }
|
---|
209 | * ```
|
---|
210 | *
|
---|
211 |
|
---|
212 | */
|
---|
213 | function invertObject(obj, secondary) {
|
---|
214 | if (obj == null)
|
---|
215 | return EMPTY_OBJ;
|
---|
216 | const newLookup = {};
|
---|
217 | for (const minifiedKey in obj) {
|
---|
218 | if (obj.hasOwnProperty(minifiedKey)) {
|
---|
219 | let publicName = obj[minifiedKey];
|
---|
220 | let declaredName = publicName;
|
---|
221 | if (Array.isArray(publicName)) {
|
---|
222 | declaredName = publicName[1];
|
---|
223 | publicName = publicName[0];
|
---|
224 | }
|
---|
225 | newLookup[publicName] = minifiedKey;
|
---|
226 | if (secondary) {
|
---|
227 | (secondary[publicName] = declaredName);
|
---|
228 | }
|
---|
229 | }
|
---|
230 | }
|
---|
231 | return newLookup;
|
---|
232 | }
|
---|
233 | /**
|
---|
234 | * Create a directive definition object.
|
---|
235 | *
|
---|
236 | * # Example
|
---|
237 | * ```ts
|
---|
238 | * class MyDirective {
|
---|
239 | * // Generated by Angular Template Compiler
|
---|
240 | * // [Symbol] syntax will not be supported by TypeScript until v2.7
|
---|
241 | * static ɵdir = ɵɵdefineDirective({
|
---|
242 | * ...
|
---|
243 | * });
|
---|
244 | * }
|
---|
245 | * ```
|
---|
246 | *
|
---|
247 | * @codeGenApi
|
---|
248 | */
|
---|
249 | export const ɵɵdefineDirective = ɵɵdefineComponent;
|
---|
250 | /**
|
---|
251 | * Create a pipe definition object.
|
---|
252 | *
|
---|
253 | * # Example
|
---|
254 | * ```
|
---|
255 | * class MyPipe implements PipeTransform {
|
---|
256 | * // Generated by Angular Template Compiler
|
---|
257 | * static ɵpipe = definePipe({
|
---|
258 | * ...
|
---|
259 | * });
|
---|
260 | * }
|
---|
261 | * ```
|
---|
262 | * @param pipeDef Pipe definition generated by the compiler
|
---|
263 | *
|
---|
264 | * @codeGenApi
|
---|
265 | */
|
---|
266 | export function ɵɵdefinePipe(pipeDef) {
|
---|
267 | return {
|
---|
268 | type: pipeDef.type,
|
---|
269 | name: pipeDef.name,
|
---|
270 | factory: null,
|
---|
271 | pure: pipeDef.pure !== false,
|
---|
272 | onDestroy: pipeDef.type.prototype.ngOnDestroy || null
|
---|
273 | };
|
---|
274 | }
|
---|
275 | /**
|
---|
276 | * The following getter methods retrieve the definition from the type. Currently the retrieval
|
---|
277 | * honors inheritance, but in the future we may change the rule to require that definitions are
|
---|
278 | * explicit. This would require some sort of migration strategy.
|
---|
279 | */
|
---|
280 | export function getComponentDef(type) {
|
---|
281 | return type[NG_COMP_DEF] || null;
|
---|
282 | }
|
---|
283 | export function getDirectiveDef(type) {
|
---|
284 | return type[NG_DIR_DEF] || null;
|
---|
285 | }
|
---|
286 | export function getPipeDef(type) {
|
---|
287 | return type[NG_PIPE_DEF] || null;
|
---|
288 | }
|
---|
289 | export function getNgModuleDef(type, throwNotFound) {
|
---|
290 | const ngModuleDef = type[NG_MOD_DEF] || null;
|
---|
291 | if (!ngModuleDef && throwNotFound === true) {
|
---|
292 | throw new Error(`Type ${stringify(type)} does not have 'ɵmod' property.`);
|
---|
293 | }
|
---|
294 | return ngModuleDef;
|
---|
295 | }
|
---|
296 | export function getNgLocaleIdDef(type) {
|
---|
297 | return type[NG_LOC_ID_DEF] || null;
|
---|
298 | }
|
---|
299 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmaW5pdGlvbi5qcyIsInNvdXJjZVJvb3Qi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jb25zdCDJtcm1ZGVmaW5lRGlyZWN0aXZlID1cbiAgICDJtcm1ZGVmaW5lQ29tcG9uZW50IGFzIGFueSBhczxUPihkaXJlY3RpdmVEZWZpbml0aW9uOiB7XG4gICAgICAvKipcbiAgICAgICAqIERpcmVjdGl2ZSB0eXBlLCBuZWVkZWQgdG8gY29uZmlndXJlIHRoZSBpbmplY3Rvci5cbiAgICAgICAqL1xuICAgICAgdHlwZTogVHlwZTxUPjtcblxuICAgICAgLyoqIFRoZSBzZWxlY3RvcnMgdGhhdCB3aWxsIGJlIHVzZWQgdG8gbWF0Y2ggbm9kZXMgdG8gdGhpcyBkaXJlY3RpdmUuICovXG4gICAgICBzZWxlY3RvcnM/OiBDc3NTZWxlY3Rvckxpc3Q7XG5cbiAgICAgIC8qKlxuICAgICAgICogQSBtYXAgb2YgaW5wdXQgbmFtZXMuXG4gICAgICAgKlxuICAgICAgICogVGhlIGZvcm1hdCBpcyBpbjogYHtbYWN0dWFsUHJvcGVydHlOYW1lOiBzdHJpbmddOihzdHJpbmd8W3N0cmluZywgc3RyaW5nXSl9YC5cbiAgICAgICAqXG4gICAgICAgKiBHaXZlbjpcbiAgICAgICAqIGBgYFxuICAgICAgICogY2xhc3MgTXlDb21wb25lbnQge1xuICAgICAgICogICBASW5wdXQoKVxuICAgICAgICogICBwdWJsaWNJbnB1dDE6IHN0cmluZztcbiAgICAgICAqXG4gICAgICAgKiAgIEBJbnB1dCgncHVibGljSW5wdXQyJylcbiAgICAgICAqICAgZGVjbGFyZWRJbnB1dDI6IHN0cmluZztcbiAgICAgICAqIH1cbiAgICAgICAqIGBgYFxuICAgICAgICpcbiAgICAgICAqIGlzIGRlc2NyaWJlZCBhczpcbiAgICAgICAqIGBgYFxuICAgICAgICoge1xuICAgICAgICogICBwdWJsaWNJbnB1dDE6ICdwdWJsaWNJbnB1dDEnLFxuICAgICAgICogICBkZWNsYXJlZElucHV0MjogWydkZWNsYXJlZElucHV0MicsICdwdWJsaWNJbnB1dDInXS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