1 | (function (factory) {
|
---|
2 | if (typeof module === "object" && typeof module.exports === "object") {
|
---|
3 | var v = factory(require, exports);
|
---|
4 | if (v !== undefined) module.exports = v;
|
---|
5 | }
|
---|
6 | else if (typeof define === "function" && define.amd) {
|
---|
7 | define("@angular/compiler/src/render3/partial/injectable", ["require", "exports", "@angular/compiler/src/injectable_compiler_2", "@angular/compiler/src/output/output_ast", "@angular/compiler/src/render3/r3_identifiers", "@angular/compiler/src/render3/view/util", "@angular/compiler/src/render3/partial/util"], factory);
|
---|
8 | }
|
---|
9 | })(function (require, exports) {
|
---|
10 | "use strict";
|
---|
11 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
12 | exports.createInjectableDefinitionMap = exports.compileDeclareInjectableFromMetadata = void 0;
|
---|
13 | /**
|
---|
14 | * @license
|
---|
15 | * Copyright Google LLC All Rights Reserved.
|
---|
16 | *
|
---|
17 | * Use of this source code is governed by an MIT-style license that can be
|
---|
18 | * found in the LICENSE file at https://angular.io/license
|
---|
19 | */
|
---|
20 | var injectable_compiler_2_1 = require("@angular/compiler/src/injectable_compiler_2");
|
---|
21 | var o = require("@angular/compiler/src/output/output_ast");
|
---|
22 | var r3_identifiers_1 = require("@angular/compiler/src/render3/r3_identifiers");
|
---|
23 | var util_1 = require("@angular/compiler/src/render3/view/util");
|
---|
24 | var util_2 = require("@angular/compiler/src/render3/partial/util");
|
---|
25 | /**
|
---|
26 | * Every time we make a breaking change to the declaration interface or partial-linker behavior, we
|
---|
27 | * must update this constant to prevent old partial-linkers from incorrectly processing the
|
---|
28 | * declaration.
|
---|
29 | *
|
---|
30 | * Do not include any prerelease in these versions as they are ignored.
|
---|
31 | */
|
---|
32 | var MINIMUM_PARTIAL_LINKER_VERSION = '12.0.0';
|
---|
33 | /**
|
---|
34 | * Compile a Injectable declaration defined by the `R3InjectableMetadata`.
|
---|
35 | */
|
---|
36 | function compileDeclareInjectableFromMetadata(meta) {
|
---|
37 | var definitionMap = createInjectableDefinitionMap(meta);
|
---|
38 | var expression = o.importExpr(r3_identifiers_1.Identifiers.declareInjectable).callFn([definitionMap.toLiteralMap()]);
|
---|
39 | var type = injectable_compiler_2_1.createInjectableType(meta);
|
---|
40 | return { expression: expression, type: type, statements: [] };
|
---|
41 | }
|
---|
42 | exports.compileDeclareInjectableFromMetadata = compileDeclareInjectableFromMetadata;
|
---|
43 | /**
|
---|
44 | * Gathers the declaration fields for a Injectable into a `DefinitionMap`.
|
---|
45 | */
|
---|
46 | function createInjectableDefinitionMap(meta) {
|
---|
47 | var definitionMap = new util_1.DefinitionMap();
|
---|
48 | definitionMap.set('minVersion', o.literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
---|
49 | definitionMap.set('version', o.literal('12.2.13'));
|
---|
50 | definitionMap.set('ngImport', o.importExpr(r3_identifiers_1.Identifiers.core));
|
---|
51 | definitionMap.set('type', meta.internalType);
|
---|
52 | // Only generate providedIn property if it has a non-null value
|
---|
53 | if (meta.providedIn !== undefined) {
|
---|
54 | var providedIn = convertFromProviderExpression(meta.providedIn);
|
---|
55 | if (providedIn.value !== null) {
|
---|
56 | definitionMap.set('providedIn', providedIn);
|
---|
57 | }
|
---|
58 | }
|
---|
59 | if (meta.useClass !== undefined) {
|
---|
60 | definitionMap.set('useClass', convertFromProviderExpression(meta.useClass));
|
---|
61 | }
|
---|
62 | if (meta.useExisting !== undefined) {
|
---|
63 | definitionMap.set('useExisting', convertFromProviderExpression(meta.useExisting));
|
---|
64 | }
|
---|
65 | if (meta.useValue !== undefined) {
|
---|
66 | definitionMap.set('useValue', convertFromProviderExpression(meta.useValue));
|
---|
67 | }
|
---|
68 | // Factories do not contain `ForwardRef`s since any types are already wrapped in a function call
|
---|
69 | // so the types will not be eagerly evaluated. Therefore we do not need to process this expression
|
---|
70 | // with `convertFromProviderExpression()`.
|
---|
71 | if (meta.useFactory !== undefined) {
|
---|
72 | definitionMap.set('useFactory', meta.useFactory);
|
---|
73 | }
|
---|
74 | if (meta.deps !== undefined) {
|
---|
75 | definitionMap.set('deps', o.literalArr(meta.deps.map(util_2.compileDependency)));
|
---|
76 | }
|
---|
77 | return definitionMap;
|
---|
78 | }
|
---|
79 | exports.createInjectableDefinitionMap = createInjectableDefinitionMap;
|
---|
80 | /**
|
---|
81 | * Convert an `R3ProviderExpression` to an `Expression`, possibly wrapping its expression in a
|
---|
82 | * `forwardRef()` call.
|
---|
83 | *
|
---|
84 | * If `R3ProviderExpression.isForwardRef` is true then the expression was originally wrapped in a
|
---|
85 | * `forwardRef()` call to prevent the value from being eagerly evaluated in the code.
|
---|
86 | *
|
---|
87 | * Normally, the linker will statically process the code, putting the `expression` inside a factory
|
---|
88 | * function so the `forwardRef()` wrapper is not evaluated before it has been defined. But if the
|
---|
89 | * partial declaration is evaluated by the JIT compiler the `forwardRef()` call is still needed to
|
---|
90 | * prevent eager evaluation of the `expression`.
|
---|
91 | *
|
---|
92 | * So in partial declarations, expressions that could be forward-refs are wrapped in `forwardRef()`
|
---|
93 | * calls, and this is then unwrapped in the linker as necessary.
|
---|
94 | *
|
---|
95 | * See `packages/compiler-cli/src/ngtsc/annotations/src/injectable.ts` and
|
---|
96 | * `packages/compiler/src/jit_compiler_facade.ts` for more information.
|
---|
97 | */
|
---|
98 | function convertFromProviderExpression(_a) {
|
---|
99 | var expression = _a.expression, isForwardRef = _a.isForwardRef;
|
---|
100 | return isForwardRef ? util_2.generateForwardRef(expression) : expression;
|
---|
101 | }
|
---|
102 | });
|
---|
103 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5qZWN0YWJsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvbXBpbGVyL3NyYy9yZW5kZXIzL3BhcnRpYWwvaW5qZWN0YWJsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7SUFBQTs7Ozs7O09BTUc7SUF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