[6a3a178] | 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 | (function (factory) {
|
---|
| 9 | if (typeof module === "object" && typeof module.exports === "object") {
|
---|
| 10 | var v = factory(require, exports);
|
---|
| 11 | if (v !== undefined) module.exports = v;
|
---|
| 12 | }
|
---|
| 13 | else if (typeof define === "function" && define.amd) {
|
---|
| 14 | define("@angular/compiler/src/jit_compiler_facade", ["require", "exports", "tslib", "@angular/compiler/src/constant_pool", "@angular/compiler/src/core", "@angular/compiler/src/injectable_compiler_2", "@angular/compiler/src/ml_parser/interpolation_config", "@angular/compiler/src/output/output_ast", "@angular/compiler/src/output/output_jit", "@angular/compiler/src/parse_util", "@angular/compiler/src/render3/r3_factory", "@angular/compiler/src/render3/r3_injector_compiler", "@angular/compiler/src/render3/r3_jit", "@angular/compiler/src/render3/r3_module_compiler", "@angular/compiler/src/render3/r3_pipe_compiler", "@angular/compiler/src/render3/util", "@angular/compiler/src/render3/view/compiler", "@angular/compiler/src/render3/view/template", "@angular/compiler/src/resource_loader", "@angular/compiler/src/schema/dom_element_schema_registry"], factory);
|
---|
| 15 | }
|
---|
| 16 | })(function (require, exports) {
|
---|
| 17 | "use strict";
|
---|
| 18 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
| 19 | exports.publishFacade = exports.CompilerFacadeImpl = void 0;
|
---|
| 20 | var tslib_1 = require("tslib");
|
---|
| 21 | var constant_pool_1 = require("@angular/compiler/src/constant_pool");
|
---|
| 22 | var core_1 = require("@angular/compiler/src/core");
|
---|
| 23 | var injectable_compiler_2_1 = require("@angular/compiler/src/injectable_compiler_2");
|
---|
| 24 | var interpolation_config_1 = require("@angular/compiler/src/ml_parser/interpolation_config");
|
---|
| 25 | var output_ast_1 = require("@angular/compiler/src/output/output_ast");
|
---|
| 26 | var output_jit_1 = require("@angular/compiler/src/output/output_jit");
|
---|
| 27 | var parse_util_1 = require("@angular/compiler/src/parse_util");
|
---|
| 28 | var r3_factory_1 = require("@angular/compiler/src/render3/r3_factory");
|
---|
| 29 | var r3_injector_compiler_1 = require("@angular/compiler/src/render3/r3_injector_compiler");
|
---|
| 30 | var r3_jit_1 = require("@angular/compiler/src/render3/r3_jit");
|
---|
| 31 | var r3_module_compiler_1 = require("@angular/compiler/src/render3/r3_module_compiler");
|
---|
| 32 | var r3_pipe_compiler_1 = require("@angular/compiler/src/render3/r3_pipe_compiler");
|
---|
| 33 | var util_1 = require("@angular/compiler/src/render3/util");
|
---|
| 34 | var compiler_1 = require("@angular/compiler/src/render3/view/compiler");
|
---|
| 35 | var template_1 = require("@angular/compiler/src/render3/view/template");
|
---|
| 36 | var resource_loader_1 = require("@angular/compiler/src/resource_loader");
|
---|
| 37 | var dom_element_schema_registry_1 = require("@angular/compiler/src/schema/dom_element_schema_registry");
|
---|
| 38 | var CompilerFacadeImpl = /** @class */ (function () {
|
---|
| 39 | function CompilerFacadeImpl(jitEvaluator) {
|
---|
| 40 | if (jitEvaluator === void 0) { jitEvaluator = new output_jit_1.JitEvaluator(); }
|
---|
| 41 | this.jitEvaluator = jitEvaluator;
|
---|
| 42 | this.FactoryTarget = r3_factory_1.FactoryTarget;
|
---|
| 43 | this.ResourceLoader = resource_loader_1.ResourceLoader;
|
---|
| 44 | this.elementSchemaRegistry = new dom_element_schema_registry_1.DomElementSchemaRegistry();
|
---|
| 45 | }
|
---|
| 46 | CompilerFacadeImpl.prototype.compilePipe = function (angularCoreEnv, sourceMapUrl, facade) {
|
---|
| 47 | var metadata = {
|
---|
| 48 | name: facade.name,
|
---|
| 49 | type: util_1.wrapReference(facade.type),
|
---|
| 50 | internalType: new output_ast_1.WrappedNodeExpr(facade.type),
|
---|
| 51 | typeArgumentCount: 0,
|
---|
| 52 | deps: null,
|
---|
| 53 | pipeName: facade.pipeName,
|
---|
| 54 | pure: facade.pure,
|
---|
| 55 | };
|
---|
| 56 | var res = r3_pipe_compiler_1.compilePipeFromMetadata(metadata);
|
---|
| 57 | return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);
|
---|
| 58 | };
|
---|
| 59 | CompilerFacadeImpl.prototype.compilePipeDeclaration = function (angularCoreEnv, sourceMapUrl, declaration) {
|
---|
| 60 | var meta = convertDeclarePipeFacadeToMetadata(declaration);
|
---|
| 61 | var res = r3_pipe_compiler_1.compilePipeFromMetadata(meta);
|
---|
| 62 | return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);
|
---|
| 63 | };
|
---|
| 64 | CompilerFacadeImpl.prototype.compileInjectable = function (angularCoreEnv, sourceMapUrl, facade) {
|
---|
| 65 | var _a;
|
---|
| 66 | var _b = injectable_compiler_2_1.compileInjectable({
|
---|
| 67 | name: facade.name,
|
---|
| 68 | type: util_1.wrapReference(facade.type),
|
---|
| 69 | internalType: new output_ast_1.WrappedNodeExpr(facade.type),
|
---|
| 70 | typeArgumentCount: facade.typeArgumentCount,
|
---|
| 71 | providedIn: computeProvidedIn(facade.providedIn),
|
---|
| 72 | useClass: convertToProviderExpression(facade, USE_CLASS),
|
---|
| 73 | useFactory: wrapExpression(facade, USE_FACTORY),
|
---|
| 74 | useValue: convertToProviderExpression(facade, USE_VALUE),
|
---|
| 75 | useExisting: convertToProviderExpression(facade, USE_EXISTING),
|
---|
| 76 | deps: (_a = facade.deps) === null || _a === void 0 ? void 0 : _a.map(convertR3DependencyMetadata),
|
---|
| 77 | },
|
---|
| 78 | /* resolveForwardRefs */ true), expression = _b.expression, statements = _b.statements;
|
---|
| 79 | return this.jitExpression(expression, angularCoreEnv, sourceMapUrl, statements);
|
---|
| 80 | };
|
---|
| 81 | CompilerFacadeImpl.prototype.compileInjectableDeclaration = function (angularCoreEnv, sourceMapUrl, facade) {
|
---|
| 82 | var _a;
|
---|
| 83 | var _b = injectable_compiler_2_1.compileInjectable({
|
---|
| 84 | name: facade.type.name,
|
---|
| 85 | type: util_1.wrapReference(facade.type),
|
---|
| 86 | internalType: new output_ast_1.WrappedNodeExpr(facade.type),
|
---|
| 87 | typeArgumentCount: 0,
|
---|
| 88 | providedIn: computeProvidedIn(facade.providedIn),
|
---|
| 89 | useClass: convertToProviderExpression(facade, USE_CLASS),
|
---|
| 90 | useFactory: wrapExpression(facade, USE_FACTORY),
|
---|
| 91 | useValue: convertToProviderExpression(facade, USE_VALUE),
|
---|
| 92 | useExisting: convertToProviderExpression(facade, USE_EXISTING),
|
---|
| 93 | deps: (_a = facade.deps) === null || _a === void 0 ? void 0 : _a.map(convertR3DeclareDependencyMetadata),
|
---|
| 94 | },
|
---|
| 95 | /* resolveForwardRefs */ true), expression = _b.expression, statements = _b.statements;
|
---|
| 96 | return this.jitExpression(expression, angularCoreEnv, sourceMapUrl, statements);
|
---|
| 97 | };
|
---|
| 98 | CompilerFacadeImpl.prototype.compileInjector = function (angularCoreEnv, sourceMapUrl, facade) {
|
---|
| 99 | var meta = {
|
---|
| 100 | name: facade.name,
|
---|
| 101 | type: util_1.wrapReference(facade.type),
|
---|
| 102 | internalType: new output_ast_1.WrappedNodeExpr(facade.type),
|
---|
| 103 | providers: new output_ast_1.WrappedNodeExpr(facade.providers),
|
---|
| 104 | imports: facade.imports.map(function (i) { return new output_ast_1.WrappedNodeExpr(i); }),
|
---|
| 105 | };
|
---|
| 106 | var res = r3_injector_compiler_1.compileInjector(meta);
|
---|
| 107 | return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);
|
---|
| 108 | };
|
---|
| 109 | CompilerFacadeImpl.prototype.compileInjectorDeclaration = function (angularCoreEnv, sourceMapUrl, declaration) {
|
---|
| 110 | var meta = convertDeclareInjectorFacadeToMetadata(declaration);
|
---|
| 111 | var res = r3_injector_compiler_1.compileInjector(meta);
|
---|
| 112 | return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);
|
---|
| 113 | };
|
---|
| 114 | CompilerFacadeImpl.prototype.compileNgModule = function (angularCoreEnv, sourceMapUrl, facade) {
|
---|
| 115 | var meta = {
|
---|
| 116 | type: util_1.wrapReference(facade.type),
|
---|
| 117 | internalType: new output_ast_1.WrappedNodeExpr(facade.type),
|
---|
| 118 | adjacentType: new output_ast_1.WrappedNodeExpr(facade.type),
|
---|
| 119 | bootstrap: facade.bootstrap.map(util_1.wrapReference),
|
---|
| 120 | declarations: facade.declarations.map(util_1.wrapReference),
|
---|
| 121 | imports: facade.imports.map(util_1.wrapReference),
|
---|
| 122 | exports: facade.exports.map(util_1.wrapReference),
|
---|
| 123 | emitInline: true,
|
---|
| 124 | containsForwardDecls: false,
|
---|
| 125 | schemas: facade.schemas ? facade.schemas.map(util_1.wrapReference) : null,
|
---|
| 126 | id: facade.id ? new output_ast_1.WrappedNodeExpr(facade.id) : null,
|
---|
| 127 | };
|
---|
| 128 | var res = r3_module_compiler_1.compileNgModule(meta);
|
---|
| 129 | return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);
|
---|
| 130 | };
|
---|
| 131 | CompilerFacadeImpl.prototype.compileNgModuleDeclaration = function (angularCoreEnv, sourceMapUrl, declaration) {
|
---|
| 132 | var expression = r3_module_compiler_1.compileNgModuleDeclarationExpression(declaration);
|
---|
| 133 | return this.jitExpression(expression, angularCoreEnv, sourceMapUrl, []);
|
---|
| 134 | };
|
---|
| 135 | CompilerFacadeImpl.prototype.compileDirective = function (angularCoreEnv, sourceMapUrl, facade) {
|
---|
| 136 | var meta = convertDirectiveFacadeToMetadata(facade);
|
---|
| 137 | return this.compileDirectiveFromMeta(angularCoreEnv, sourceMapUrl, meta);
|
---|
| 138 | };
|
---|
| 139 | CompilerFacadeImpl.prototype.compileDirectiveDeclaration = function (angularCoreEnv, sourceMapUrl, declaration) {
|
---|
| 140 | var typeSourceSpan = this.createParseSourceSpan('Directive', declaration.type.name, sourceMapUrl);
|
---|
| 141 | var meta = convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan);
|
---|
| 142 | return this.compileDirectiveFromMeta(angularCoreEnv, sourceMapUrl, meta);
|
---|
| 143 | };
|
---|
| 144 | CompilerFacadeImpl.prototype.compileDirectiveFromMeta = function (angularCoreEnv, sourceMapUrl, meta) {
|
---|
| 145 | var constantPool = new constant_pool_1.ConstantPool();
|
---|
| 146 | var bindingParser = template_1.makeBindingParser();
|
---|
| 147 | var res = compiler_1.compileDirectiveFromMetadata(meta, constantPool, bindingParser);
|
---|
| 148 | return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, constantPool.statements);
|
---|
| 149 | };
|
---|
| 150 | CompilerFacadeImpl.prototype.compileComponent = function (angularCoreEnv, sourceMapUrl, facade) {
|
---|
| 151 | // Parse the template and check for errors.
|
---|
| 152 | var _a = parseJitTemplate(facade.template, facade.name, sourceMapUrl, facade.preserveWhitespaces, facade.interpolation), template = _a.template, interpolation = _a.interpolation;
|
---|
| 153 | // Compile the component metadata, including template, into an expression.
|
---|
| 154 | var meta = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, facade), convertDirectiveFacadeToMetadata(facade)), { selector: facade.selector || this.elementSchemaRegistry.getDefaultComponentElementName(), template: template, declarationListEmitMode: 0 /* Direct */, styles: tslib_1.__spreadArray(tslib_1.__spreadArray([], tslib_1.__read(facade.styles)), tslib_1.__read(template.styles)), encapsulation: facade.encapsulation, interpolation: interpolation, changeDetection: facade.changeDetection, animations: facade.animations != null ? new output_ast_1.WrappedNodeExpr(facade.animations) : null, viewProviders: facade.viewProviders != null ? new output_ast_1.WrappedNodeExpr(facade.viewProviders) :
|
---|
| 155 | null, relativeContextFilePath: '', i18nUseExternalIds: true });
|
---|
| 156 | var jitExpressionSourceMap = "ng:///" + facade.name + ".js";
|
---|
| 157 | return this.compileComponentFromMeta(angularCoreEnv, jitExpressionSourceMap, meta);
|
---|
| 158 | };
|
---|
| 159 | CompilerFacadeImpl.prototype.compileComponentDeclaration = function (angularCoreEnv, sourceMapUrl, declaration) {
|
---|
| 160 | var typeSourceSpan = this.createParseSourceSpan('Component', declaration.type.name, sourceMapUrl);
|
---|
| 161 | var meta = convertDeclareComponentFacadeToMetadata(declaration, typeSourceSpan, sourceMapUrl);
|
---|
| 162 | return this.compileComponentFromMeta(angularCoreEnv, sourceMapUrl, meta);
|
---|
| 163 | };
|
---|
| 164 | CompilerFacadeImpl.prototype.compileComponentFromMeta = function (angularCoreEnv, sourceMapUrl, meta) {
|
---|
| 165 | var constantPool = new constant_pool_1.ConstantPool();
|
---|
| 166 | var bindingParser = template_1.makeBindingParser(meta.interpolation);
|
---|
| 167 | var res = compiler_1.compileComponentFromMetadata(meta, constantPool, bindingParser);
|
---|
| 168 | return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, constantPool.statements);
|
---|
| 169 | };
|
---|
| 170 | CompilerFacadeImpl.prototype.compileFactory = function (angularCoreEnv, sourceMapUrl, meta) {
|
---|
| 171 | var factoryRes = r3_factory_1.compileFactoryFunction({
|
---|
| 172 | name: meta.name,
|
---|
| 173 | type: util_1.wrapReference(meta.type),
|
---|
| 174 | internalType: new output_ast_1.WrappedNodeExpr(meta.type),
|
---|
| 175 | typeArgumentCount: meta.typeArgumentCount,
|
---|
| 176 | deps: convertR3DependencyMetadataArray(meta.deps),
|
---|
| 177 | target: meta.target,
|
---|
| 178 | });
|
---|
| 179 | return this.jitExpression(factoryRes.expression, angularCoreEnv, sourceMapUrl, factoryRes.statements);
|
---|
| 180 | };
|
---|
| 181 | CompilerFacadeImpl.prototype.compileFactoryDeclaration = function (angularCoreEnv, sourceMapUrl, meta) {
|
---|
| 182 | var factoryRes = r3_factory_1.compileFactoryFunction({
|
---|
| 183 | name: meta.type.name,
|
---|
| 184 | type: util_1.wrapReference(meta.type),
|
---|
| 185 | internalType: new output_ast_1.WrappedNodeExpr(meta.type),
|
---|
| 186 | typeArgumentCount: 0,
|
---|
| 187 | deps: Array.isArray(meta.deps) ? meta.deps.map(convertR3DeclareDependencyMetadata) :
|
---|
| 188 | meta.deps,
|
---|
| 189 | target: meta.target,
|
---|
| 190 | });
|
---|
| 191 | return this.jitExpression(factoryRes.expression, angularCoreEnv, sourceMapUrl, factoryRes.statements);
|
---|
| 192 | };
|
---|
| 193 | CompilerFacadeImpl.prototype.createParseSourceSpan = function (kind, typeName, sourceUrl) {
|
---|
| 194 | return parse_util_1.r3JitTypeSourceSpan(kind, typeName, sourceUrl);
|
---|
| 195 | };
|
---|
| 196 | /**
|
---|
| 197 | * JIT compiles an expression and returns the result of executing that expression.
|
---|
| 198 | *
|
---|
| 199 | * @param def the definition which will be compiled and executed to get the value to patch
|
---|
| 200 | * @param context an object map of @angular/core symbol names to symbols which will be available
|
---|
| 201 | * in the context of the compiled expression
|
---|
| 202 | * @param sourceUrl a URL to use for the source map of the compiled expression
|
---|
| 203 | * @param preStatements a collection of statements that should be evaluated before the expression.
|
---|
| 204 | */
|
---|
| 205 | CompilerFacadeImpl.prototype.jitExpression = function (def, context, sourceUrl, preStatements) {
|
---|
| 206 | // The ConstantPool may contain Statements which declare variables used in the final expression.
|
---|
| 207 | // Therefore, its statements need to precede the actual JIT operation. The final statement is a
|
---|
| 208 | // declaration of $def which is set to the expression being compiled.
|
---|
| 209 | var statements = tslib_1.__spreadArray(tslib_1.__spreadArray([], tslib_1.__read(preStatements)), [
|
---|
| 210 | new output_ast_1.DeclareVarStmt('$def', def, undefined, [output_ast_1.StmtModifier.Exported]),
|
---|
| 211 | ]);
|
---|
| 212 | var res = this.jitEvaluator.evaluateStatements(sourceUrl, statements, new r3_jit_1.R3JitReflector(context), /* enableSourceMaps */ true);
|
---|
| 213 | return res['$def'];
|
---|
| 214 | };
|
---|
| 215 | return CompilerFacadeImpl;
|
---|
| 216 | }());
|
---|
| 217 | exports.CompilerFacadeImpl = CompilerFacadeImpl;
|
---|
| 218 | var USE_CLASS = Object.keys({ useClass: null })[0];
|
---|
| 219 | var USE_FACTORY = Object.keys({ useFactory: null })[0];
|
---|
| 220 | var USE_VALUE = Object.keys({ useValue: null })[0];
|
---|
| 221 | var USE_EXISTING = Object.keys({ useExisting: null })[0];
|
---|
| 222 | function convertToR3QueryMetadata(facade) {
|
---|
| 223 | return tslib_1.__assign(tslib_1.__assign({}, facade), { predicate: Array.isArray(facade.predicate) ? facade.predicate :
|
---|
| 224 | new output_ast_1.WrappedNodeExpr(facade.predicate), read: facade.read ? new output_ast_1.WrappedNodeExpr(facade.read) : null, static: facade.static, emitDistinctChangesOnly: facade.emitDistinctChangesOnly });
|
---|
| 225 | }
|
---|
| 226 | function convertQueryDeclarationToMetadata(declaration) {
|
---|
| 227 | var _a, _b, _c, _d;
|
---|
| 228 | return {
|
---|
| 229 | propertyName: declaration.propertyName,
|
---|
| 230 | first: (_a = declaration.first) !== null && _a !== void 0 ? _a : false,
|
---|
| 231 | predicate: Array.isArray(declaration.predicate) ? declaration.predicate :
|
---|
| 232 | new output_ast_1.WrappedNodeExpr(declaration.predicate),
|
---|
| 233 | descendants: (_b = declaration.descendants) !== null && _b !== void 0 ? _b : false,
|
---|
| 234 | read: declaration.read ? new output_ast_1.WrappedNodeExpr(declaration.read) : null,
|
---|
| 235 | static: (_c = declaration.static) !== null && _c !== void 0 ? _c : false,
|
---|
| 236 | emitDistinctChangesOnly: (_d = declaration.emitDistinctChangesOnly) !== null && _d !== void 0 ? _d : true,
|
---|
| 237 | };
|
---|
| 238 | }
|
---|
| 239 | function convertDirectiveFacadeToMetadata(facade) {
|
---|
| 240 | var inputsFromMetadata = parseInputOutputs(facade.inputs || []);
|
---|
| 241 | var outputsFromMetadata = parseInputOutputs(facade.outputs || []);
|
---|
| 242 | var propMetadata = facade.propMetadata;
|
---|
| 243 | var inputsFromType = {};
|
---|
| 244 | var outputsFromType = {};
|
---|
| 245 | var _loop_1 = function (field) {
|
---|
| 246 | if (propMetadata.hasOwnProperty(field)) {
|
---|
| 247 | propMetadata[field].forEach(function (ann) {
|
---|
| 248 | if (isInput(ann)) {
|
---|
| 249 | inputsFromType[field] =
|
---|
| 250 | ann.bindingPropertyName ? [ann.bindingPropertyName, field] : field;
|
---|
| 251 | }
|
---|
| 252 | else if (isOutput(ann)) {
|
---|
| 253 | outputsFromType[field] = ann.bindingPropertyName || field;
|
---|
| 254 | }
|
---|
| 255 | });
|
---|
| 256 | }
|
---|
| 257 | };
|
---|
| 258 | for (var field in propMetadata) {
|
---|
| 259 | _loop_1(field);
|
---|
| 260 | }
|
---|
| 261 | return tslib_1.__assign(tslib_1.__assign({}, facade), { typeArgumentCount: 0, typeSourceSpan: facade.typeSourceSpan, type: util_1.wrapReference(facade.type), internalType: new output_ast_1.WrappedNodeExpr(facade.type), deps: null, host: extractHostBindings(facade.propMetadata, facade.typeSourceSpan, facade.host), inputs: tslib_1.__assign(tslib_1.__assign({}, inputsFromMetadata), inputsFromType), outputs: tslib_1.__assign(tslib_1.__assign({}, outputsFromMetadata), outputsFromType), queries: facade.queries.map(convertToR3QueryMetadata), providers: facade.providers != null ? new output_ast_1.WrappedNodeExpr(facade.providers) : null, viewQueries: facade.viewQueries.map(convertToR3QueryMetadata), fullInheritance: false });
|
---|
| 262 | }
|
---|
| 263 | function convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {
|
---|
| 264 | var _a, _b, _c, _d, _e, _f, _g, _h;
|
---|
| 265 | return {
|
---|
| 266 | name: declaration.type.name,
|
---|
| 267 | type: util_1.wrapReference(declaration.type),
|
---|
| 268 | typeSourceSpan: typeSourceSpan,
|
---|
| 269 | internalType: new output_ast_1.WrappedNodeExpr(declaration.type),
|
---|
| 270 | selector: (_a = declaration.selector) !== null && _a !== void 0 ? _a : null,
|
---|
| 271 | inputs: (_b = declaration.inputs) !== null && _b !== void 0 ? _b : {},
|
---|
| 272 | outputs: (_c = declaration.outputs) !== null && _c !== void 0 ? _c : {},
|
---|
| 273 | host: convertHostDeclarationToMetadata(declaration.host),
|
---|
| 274 | queries: ((_d = declaration.queries) !== null && _d !== void 0 ? _d : []).map(convertQueryDeclarationToMetadata),
|
---|
| 275 | viewQueries: ((_e = declaration.viewQueries) !== null && _e !== void 0 ? _e : []).map(convertQueryDeclarationToMetadata),
|
---|
| 276 | providers: declaration.providers !== undefined ? new output_ast_1.WrappedNodeExpr(declaration.providers) :
|
---|
| 277 | null,
|
---|
| 278 | exportAs: (_f = declaration.exportAs) !== null && _f !== void 0 ? _f : null,
|
---|
| 279 | usesInheritance: (_g = declaration.usesInheritance) !== null && _g !== void 0 ? _g : false,
|
---|
| 280 | lifecycle: { usesOnChanges: (_h = declaration.usesOnChanges) !== null && _h !== void 0 ? _h : false },
|
---|
| 281 | deps: null,
|
---|
| 282 | typeArgumentCount: 0,
|
---|
| 283 | fullInheritance: false,
|
---|
| 284 | };
|
---|
| 285 | }
|
---|
| 286 | function convertHostDeclarationToMetadata(host) {
|
---|
| 287 | var _a, _b, _c;
|
---|
| 288 | if (host === void 0) { host = {}; }
|
---|
| 289 | return {
|
---|
| 290 | attributes: convertOpaqueValuesToExpressions((_a = host.attributes) !== null && _a !== void 0 ? _a : {}),
|
---|
| 291 | listeners: (_b = host.listeners) !== null && _b !== void 0 ? _b : {},
|
---|
| 292 | properties: (_c = host.properties) !== null && _c !== void 0 ? _c : {},
|
---|
| 293 | specialAttributes: {
|
---|
| 294 | classAttr: host.classAttribute,
|
---|
| 295 | styleAttr: host.styleAttribute,
|
---|
| 296 | },
|
---|
| 297 | };
|
---|
| 298 | }
|
---|
| 299 | function convertOpaqueValuesToExpressions(obj) {
|
---|
| 300 | var e_1, _a;
|
---|
| 301 | var result = {};
|
---|
| 302 | try {
|
---|
| 303 | for (var _b = tslib_1.__values(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
---|
| 304 | var key = _c.value;
|
---|
| 305 | result[key] = new output_ast_1.WrappedNodeExpr(obj[key]);
|
---|
| 306 | }
|
---|
| 307 | }
|
---|
| 308 | catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
---|
| 309 | finally {
|
---|
| 310 | try {
|
---|
| 311 | if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
---|
| 312 | }
|
---|
| 313 | finally { if (e_1) throw e_1.error; }
|
---|
| 314 | }
|
---|
| 315 | return result;
|
---|
| 316 | }
|
---|
| 317 | function convertDeclareComponentFacadeToMetadata(declaration, typeSourceSpan, sourceMapUrl) {
|
---|
| 318 | var _a, _b, _c, _d, _e, _f;
|
---|
| 319 | var _g = parseJitTemplate(declaration.template, declaration.type.name, sourceMapUrl, (_a = declaration.preserveWhitespaces) !== null && _a !== void 0 ? _a : false, declaration.interpolation), template = _g.template, interpolation = _g.interpolation;
|
---|
| 320 | return tslib_1.__assign(tslib_1.__assign({}, convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan)), { template: template, styles: (_b = declaration.styles) !== null && _b !== void 0 ? _b : [], directives: ((_c = declaration.components) !== null && _c !== void 0 ? _c : [])
|
---|
| 321 | .concat((_d = declaration.directives) !== null && _d !== void 0 ? _d : [])
|
---|
| 322 | .map(convertUsedDirectiveDeclarationToMetadata), pipes: convertUsedPipesToMetadata(declaration.pipes), viewProviders: declaration.viewProviders !== undefined ?
|
---|
| 323 | new output_ast_1.WrappedNodeExpr(declaration.viewProviders) :
|
---|
| 324 | null, animations: declaration.animations !== undefined ? new output_ast_1.WrappedNodeExpr(declaration.animations) :
|
---|
| 325 | null, changeDetection: (_e = declaration.changeDetection) !== null && _e !== void 0 ? _e : core_1.ChangeDetectionStrategy.Default, encapsulation: (_f = declaration.encapsulation) !== null && _f !== void 0 ? _f : core_1.ViewEncapsulation.Emulated, interpolation: interpolation, declarationListEmitMode: 2 /* ClosureResolved */, relativeContextFilePath: '', i18nUseExternalIds: true });
|
---|
| 326 | }
|
---|
| 327 | function convertUsedDirectiveDeclarationToMetadata(declaration) {
|
---|
| 328 | var _a, _b, _c;
|
---|
| 329 | return {
|
---|
| 330 | selector: declaration.selector,
|
---|
| 331 | type: new output_ast_1.WrappedNodeExpr(declaration.type),
|
---|
| 332 | inputs: (_a = declaration.inputs) !== null && _a !== void 0 ? _a : [],
|
---|
| 333 | outputs: (_b = declaration.outputs) !== null && _b !== void 0 ? _b : [],
|
---|
| 334 | exportAs: (_c = declaration.exportAs) !== null && _c !== void 0 ? _c : null,
|
---|
| 335 | };
|
---|
| 336 | }
|
---|
| 337 | function convertUsedPipesToMetadata(declaredPipes) {
|
---|
| 338 | var e_2, _a;
|
---|
| 339 | var pipes = new Map();
|
---|
| 340 | if (declaredPipes === undefined) {
|
---|
| 341 | return pipes;
|
---|
| 342 | }
|
---|
| 343 | try {
|
---|
| 344 | for (var _b = tslib_1.__values(Object.keys(declaredPipes)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
---|
| 345 | var pipeName = _c.value;
|
---|
| 346 | var pipeType = declaredPipes[pipeName];
|
---|
| 347 | pipes.set(pipeName, new output_ast_1.WrappedNodeExpr(pipeType));
|
---|
| 348 | }
|
---|
| 349 | }
|
---|
| 350 | catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
---|
| 351 | finally {
|
---|
| 352 | try {
|
---|
| 353 | if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
---|
| 354 | }
|
---|
| 355 | finally { if (e_2) throw e_2.error; }
|
---|
| 356 | }
|
---|
| 357 | return pipes;
|
---|
| 358 | }
|
---|
| 359 | function parseJitTemplate(template, typeName, sourceMapUrl, preserveWhitespaces, interpolation) {
|
---|
| 360 | var interpolationConfig = interpolation ? interpolation_config_1.InterpolationConfig.fromArray(interpolation) : interpolation_config_1.DEFAULT_INTERPOLATION_CONFIG;
|
---|
| 361 | // Parse the template and check for errors.
|
---|
| 362 | var parsed = template_1.parseTemplate(template, sourceMapUrl, { preserveWhitespaces: preserveWhitespaces, interpolationConfig: interpolationConfig });
|
---|
| 363 | if (parsed.errors !== null) {
|
---|
| 364 | var errors = parsed.errors.map(function (err) { return err.toString(); }).join(', ');
|
---|
| 365 | throw new Error("Errors during JIT compilation of template for " + typeName + ": " + errors);
|
---|
| 366 | }
|
---|
| 367 | return { template: parsed, interpolation: interpolationConfig };
|
---|
| 368 | }
|
---|
| 369 | /**
|
---|
| 370 | * Convert the expression, if present to an `R3ProviderExpression`.
|
---|
| 371 | *
|
---|
| 372 | * In JIT mode we do not want the compiler to wrap the expression in a `forwardRef()` call because,
|
---|
| 373 | * if it is referencing a type that has not yet been defined, it will have already been wrapped in
|
---|
| 374 | * a `forwardRef()` - either by the application developer or during partial-compilation. Thus we can
|
---|
| 375 | * set `isForwardRef` to `false`.
|
---|
| 376 | */
|
---|
| 377 | function convertToProviderExpression(obj, property) {
|
---|
| 378 | if (obj.hasOwnProperty(property)) {
|
---|
| 379 | return injectable_compiler_2_1.createR3ProviderExpression(new output_ast_1.WrappedNodeExpr(obj[property]), /* isForwardRef */ false);
|
---|
| 380 | }
|
---|
| 381 | else {
|
---|
| 382 | return undefined;
|
---|
| 383 | }
|
---|
| 384 | }
|
---|
| 385 | function wrapExpression(obj, property) {
|
---|
| 386 | if (obj.hasOwnProperty(property)) {
|
---|
| 387 | return new output_ast_1.WrappedNodeExpr(obj[property]);
|
---|
| 388 | }
|
---|
| 389 | else {
|
---|
| 390 | return undefined;
|
---|
| 391 | }
|
---|
| 392 | }
|
---|
| 393 | function computeProvidedIn(providedIn) {
|
---|
| 394 | var expression = (providedIn == null || typeof providedIn === 'string') ?
|
---|
| 395 | new output_ast_1.LiteralExpr(providedIn !== null && providedIn !== void 0 ? providedIn : null) :
|
---|
| 396 | new output_ast_1.WrappedNodeExpr(providedIn);
|
---|
| 397 | // See `convertToProviderExpression()` for why `isForwardRef` is false.
|
---|
| 398 | return injectable_compiler_2_1.createR3ProviderExpression(expression, /* isForwardRef */ false);
|
---|
| 399 | }
|
---|
| 400 | function convertR3DependencyMetadataArray(facades) {
|
---|
| 401 | return facades == null ? null : facades.map(convertR3DependencyMetadata);
|
---|
| 402 | }
|
---|
| 403 | function convertR3DependencyMetadata(facade) {
|
---|
| 404 | var isAttributeDep = facade.attribute != null; // both `null` and `undefined`
|
---|
| 405 | var rawToken = facade.token === null ? null : new output_ast_1.WrappedNodeExpr(facade.token);
|
---|
| 406 | // In JIT mode, if the dep is an `@Attribute()` then we use the attribute name given in
|
---|
| 407 | // `attribute` rather than the `token`.
|
---|
| 408 | var token = isAttributeDep ? new output_ast_1.WrappedNodeExpr(facade.attribute) : rawToken;
|
---|
| 409 | return createR3DependencyMetadata(token, isAttributeDep, facade.host, facade.optional, facade.self, facade.skipSelf);
|
---|
| 410 | }
|
---|
| 411 | function convertR3DeclareDependencyMetadata(facade) {
|
---|
| 412 | var _a, _b, _c, _d, _e;
|
---|
| 413 | var isAttributeDep = (_a = facade.attribute) !== null && _a !== void 0 ? _a : false;
|
---|
| 414 | var token = facade.token === null ? null : new output_ast_1.WrappedNodeExpr(facade.token);
|
---|
| 415 | return createR3DependencyMetadata(token, isAttributeDep, (_b = facade.host) !== null && _b !== void 0 ? _b : false, (_c = facade.optional) !== null && _c !== void 0 ? _c : false, (_d = facade.self) !== null && _d !== void 0 ? _d : false, (_e = facade.skipSelf) !== null && _e !== void 0 ? _e : false);
|
---|
| 416 | }
|
---|
| 417 | function createR3DependencyMetadata(token, isAttributeDep, host, optional, self, skipSelf) {
|
---|
| 418 | // If the dep is an `@Attribute()` the `attributeNameType` ought to be the `unknown` type.
|
---|
| 419 | // But types are not available at runtime so we just use a literal `"<unknown>"` string as a dummy
|
---|
| 420 | // marker.
|
---|
| 421 | var attributeNameType = isAttributeDep ? output_ast_1.literal('unknown') : null;
|
---|
| 422 | return { token: token, attributeNameType: attributeNameType, host: host, optional: optional, self: self, skipSelf: skipSelf };
|
---|
| 423 | }
|
---|
| 424 | function extractHostBindings(propMetadata, sourceSpan, host) {
|
---|
| 425 | // First parse the declarations from the metadata.
|
---|
| 426 | var bindings = compiler_1.parseHostBindings(host || {});
|
---|
| 427 | // After that check host bindings for errors
|
---|
| 428 | var errors = compiler_1.verifyHostBindings(bindings, sourceSpan);
|
---|
| 429 | if (errors.length) {
|
---|
| 430 | throw new Error(errors.map(function (error) { return error.msg; }).join('\n'));
|
---|
| 431 | }
|
---|
| 432 | var _loop_2 = function (field) {
|
---|
| 433 | if (propMetadata.hasOwnProperty(field)) {
|
---|
| 434 | propMetadata[field].forEach(function (ann) {
|
---|
| 435 | if (isHostBinding(ann)) {
|
---|
| 436 | // Since this is a decorator, we know that the value is a class member. Always access it
|
---|
| 437 | // through `this` so that further down the line it can't be confused for a literal value
|
---|
| 438 | // (e.g. if there's a property called `true`).
|
---|
| 439 | bindings.properties[ann.hostPropertyName || field] =
|
---|
| 440 | util_1.getSafePropertyAccessString('this', field);
|
---|
| 441 | }
|
---|
| 442 | else if (isHostListener(ann)) {
|
---|
| 443 | bindings.listeners[ann.eventName || field] = field + "(" + (ann.args || []).join(',') + ")";
|
---|
| 444 | }
|
---|
| 445 | });
|
---|
| 446 | }
|
---|
| 447 | };
|
---|
| 448 | // Next, loop over the properties of the object, looking for @HostBinding and @HostListener.
|
---|
| 449 | for (var field in propMetadata) {
|
---|
| 450 | _loop_2(field);
|
---|
| 451 | }
|
---|
| 452 | return bindings;
|
---|
| 453 | }
|
---|
| 454 | function isHostBinding(value) {
|
---|
| 455 | return value.ngMetadataName === 'HostBinding';
|
---|
| 456 | }
|
---|
| 457 | function isHostListener(value) {
|
---|
| 458 | return value.ngMetadataName === 'HostListener';
|
---|
| 459 | }
|
---|
| 460 | function isInput(value) {
|
---|
| 461 | return value.ngMetadataName === 'Input';
|
---|
| 462 | }
|
---|
| 463 | function isOutput(value) {
|
---|
| 464 | return value.ngMetadataName === 'Output';
|
---|
| 465 | }
|
---|
| 466 | function parseInputOutputs(values) {
|
---|
| 467 | return values.reduce(function (map, value) {
|
---|
| 468 | var _a = tslib_1.__read(value.split(',').map(function (piece) { return piece.trim(); }), 2), field = _a[0], property = _a[1];
|
---|
| 469 | map[field] = property || field;
|
---|
| 470 | return map;
|
---|
| 471 | }, {});
|
---|
| 472 | }
|
---|
| 473 | function convertDeclarePipeFacadeToMetadata(declaration) {
|
---|
| 474 | var _a;
|
---|
| 475 | return {
|
---|
| 476 | name: declaration.type.name,
|
---|
| 477 | type: util_1.wrapReference(declaration.type),
|
---|
| 478 | internalType: new output_ast_1.WrappedNodeExpr(declaration.type),
|
---|
| 479 | typeArgumentCount: 0,
|
---|
| 480 | pipeName: declaration.name,
|
---|
| 481 | deps: null,
|
---|
| 482 | pure: (_a = declaration.pure) !== null && _a !== void 0 ? _a : true,
|
---|
| 483 | };
|
---|
| 484 | }
|
---|
| 485 | function convertDeclareInjectorFacadeToMetadata(declaration) {
|
---|
| 486 | return {
|
---|
| 487 | name: declaration.type.name,
|
---|
| 488 | type: util_1.wrapReference(declaration.type),
|
---|
| 489 | internalType: new output_ast_1.WrappedNodeExpr(declaration.type),
|
---|
| 490 | providers: declaration.providers !== undefined ? new output_ast_1.WrappedNodeExpr(declaration.providers) :
|
---|
| 491 | null,
|
---|
| 492 | imports: declaration.imports !== undefined ?
|
---|
| 493 | declaration.imports.map(function (i) { return new output_ast_1.WrappedNodeExpr(i); }) :
|
---|
| 494 | [],
|
---|
| 495 | };
|
---|
| 496 | }
|
---|
| 497 | function publishFacade(global) {
|
---|
| 498 | var ng = global.ng || (global.ng = {});
|
---|
| 499 | ng.ɵcompilerFacade = new CompilerFacadeImpl();
|
---|
| 500 | }
|
---|
| 501 | exports.publishFacade = publishFacade;
|
---|
| 502 | });
|
---|
| 503 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaml0X2NvbXBpbGVyX2ZhY2FkZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvbXBpbGVyL3NyYy9qaXRfY29tcGlsZXJfZmFjYWRlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRzs7Ozs7Ozs7Ozs7Ozs7SUFJSCxxRUFBNkM7SUFDN0MsbURBQTRHO0lBQzVHLHFGQUE0RztJQUM1Ryw2RkFBbUc7SUFDbkcsc0VBQStIO0lBQy9ILHNFQUFpRDtJQ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