@angular/compiler-cli 14.1.0-next.4 → 14.1.1
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/bundles/{chunk-TUMJDJFX.js → chunk-3AXTYLAQ.js} +8 -11
- package/bundles/chunk-3AXTYLAQ.js.map +6 -0
- package/bundles/{chunk-W6KM7BUM.js → chunk-4JF5LVDW.js} +5 -8
- package/bundles/chunk-4JF5LVDW.js.map +6 -0
- package/bundles/{chunk-NJ7YQMH6.js → chunk-4N37OTSF.js} +19 -23
- package/bundles/chunk-4N37OTSF.js.map +6 -0
- package/bundles/{chunk-R4NY3TJC.js → chunk-ACXPVP2W.js} +1 -1
- package/bundles/chunk-ACXPVP2W.js.map +6 -0
- package/bundles/{chunk-WGBFSDVQ.js → chunk-CYVTLM4Z.js} +2 -6
- package/bundles/chunk-CYVTLM4Z.js.map +6 -0
- package/bundles/{chunk-LX5Q27EF.js → chunk-E7NQQTT7.js} +1 -1
- package/bundles/{chunk-LX5Q27EF.js.map → chunk-E7NQQTT7.js.map} +1 -1
- package/bundles/{chunk-QEIAOLAL.js → chunk-FFOD6G3X.js} +5 -9
- package/bundles/chunk-FFOD6G3X.js.map +6 -0
- package/bundles/{chunk-OLGEBPBY.js → chunk-FM6NPN5V.js} +3 -3
- package/bundles/{chunk-OLGEBPBY.js.map → chunk-FM6NPN5V.js.map} +0 -0
- package/bundles/{chunk-JXRNV3VY.js → chunk-HE5WHX7C.js} +11 -12
- package/bundles/chunk-HE5WHX7C.js.map +6 -0
- package/bundles/{chunk-2IMT6JFI.js → chunk-NFCN3OZI.js} +1 -1
- package/bundles/chunk-NFCN3OZI.js.map +6 -0
- package/bundles/{chunk-T7MYRXIE.js → chunk-TOKOIIBI.js} +2 -2
- package/bundles/chunk-TOKOIIBI.js.map +6 -0
- package/bundles/{chunk-JRBVL2HZ.js → chunk-TSVR3WF5.js} +8 -4
- package/bundles/chunk-TSVR3WF5.js.map +6 -0
- package/bundles/{chunk-RUNC33XY.js → chunk-X2UHASWN.js} +58 -54
- package/bundles/chunk-X2UHASWN.js.map +6 -0
- package/bundles/{chunk-GMSUYBZP.js → chunk-XYNRD7NE.js} +1 -33
- package/bundles/{chunk-GMSUYBZP.js.map → chunk-XYNRD7NE.js.map} +0 -0
- package/bundles/{chunk-K4XEMWX4.js → chunk-ZBS75WH7.js} +221 -95
- package/bundles/chunk-ZBS75WH7.js.map +6 -0
- package/bundles/index.js +11 -13
- package/bundles/index.js.map +1 -1
- package/bundles/linker/babel/index.js +13 -17
- package/bundles/linker/babel/index.js.map +1 -1
- package/bundles/linker/index.js +5 -5
- package/bundles/ngcc/index.js +11 -11
- package/bundles/ngcc/main-ngcc.js +12 -12
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +11 -11
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js.map +1 -1
- package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js +3 -3
- package/bundles/private/bazel.js +2 -2
- package/bundles/private/localize.js +4 -4
- package/bundles/private/migrations.js +6 -6
- package/bundles/private/tooling.js +3 -3
- package/bundles/src/bin/ng_xi18n.js +9 -12
- package/bundles/src/bin/ng_xi18n.js.map +1 -1
- package/bundles/src/bin/ngc.js +8 -8
- package/bundles_metadata.json +1 -1
- package/linker/src/linker_import_generator.d.ts +1 -1
- package/ngcc/src/host/commonjs_umd_utils.d.ts +2 -2
- package/ngcc/src/host/esm5_host.d.ts +1 -1
- package/ngcc/src/packages/build_marker.d.ts +1 -1
- package/package.json +2 -2
- package/src/ngtsc/core/api/src/public_options.d.ts +1 -1
- package/src/ngtsc/core/src/compiler.d.ts +2 -2
- package/src/ngtsc/diagnostics/src/error_code.d.ts +33 -3
- package/src/ngtsc/diagnostics/src/extended_template_diagnostic_name.d.ts +4 -1
- package/src/ngtsc/incremental/src/state.d.ts +1 -1
- package/src/ngtsc/indexer/src/context.d.ts +1 -1
- package/src/ngtsc/metadata/src/registry.d.ts +2 -1
- package/src/ngtsc/perf/src/recorder.d.ts +1 -1
- package/src/ngtsc/reflection/src/host.d.ts +1 -1
- package/src/ngtsc/scope/src/dependency.d.ts +1 -1
- package/src/ngtsc/translator/src/api/ast_factory.d.ts +2 -2
- package/src/ngtsc/translator/src/import_manager.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/api/extended_template_checker.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/checks/missing_control_flow_directive/index.d.ts +10 -0
- package/src/ngtsc/typecheck/extended/checks/missing_ngforof_let/index.d.ts +11 -0
- package/src/ngtsc/typecheck/extended/checks/optional_chain_not_nullable/index.d.ts +11 -0
- package/src/ngtsc/typecheck/extended/checks/suffix_not_supported/index.d.ts +11 -0
- package/src/ngtsc/typecheck/src/tcb_util.d.ts +1 -1
- package/src/transformers/api.d.ts +2 -2
- package/bundles/chunk-2IMT6JFI.js.map +0 -6
- package/bundles/chunk-JRBVL2HZ.js.map +0 -6
- package/bundles/chunk-JXRNV3VY.js.map +0 -6
- package/bundles/chunk-K4XEMWX4.js.map +0 -6
- package/bundles/chunk-NJ7YQMH6.js.map +0 -6
- package/bundles/chunk-QEIAOLAL.js.map +0 -6
- package/bundles/chunk-R4NY3TJC.js.map +0 -6
- package/bundles/chunk-RUNC33XY.js.map +0 -6
- package/bundles/chunk-T7MYRXIE.js.map +0 -6
- package/bundles/chunk-TUMJDJFX.js.map +0 -6
- package/bundles/chunk-W6KM7BUM.js.map +0 -6
- package/bundles/chunk-WGBFSDVQ.js.map +0 -6
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
reflectObjectLiteral,
|
|
14
14
|
reflectTypeEntityToDeclaration,
|
|
15
15
|
typeNodeToValueExpr
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-NFCN3OZI.js";
|
|
17
17
|
import {
|
|
18
18
|
ErrorCode,
|
|
19
19
|
FatalDiagnosticError,
|
|
@@ -33,20 +33,16 @@ import {
|
|
|
33
33
|
translateExpression,
|
|
34
34
|
translateStatement,
|
|
35
35
|
translateType
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-TSVR3WF5.js";
|
|
37
37
|
import {
|
|
38
38
|
absoluteFrom,
|
|
39
39
|
absoluteFromSourceFile,
|
|
40
40
|
relative
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-TOKOIIBI.js";
|
|
42
42
|
import {
|
|
43
43
|
PerfEvent,
|
|
44
44
|
PerfPhase
|
|
45
|
-
} from "./chunk-
|
|
46
|
-
import {
|
|
47
|
-
__spreadProps,
|
|
48
|
-
__spreadValues
|
|
49
|
-
} from "./chunk-GMSUYBZP.js";
|
|
45
|
+
} from "./chunk-ACXPVP2W.js";
|
|
50
46
|
|
|
51
47
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/util.mjs
|
|
52
48
|
import { ExternalExpr, ParseLocation, ParseSourceFile, ParseSourceSpan, ReadPropExpr, WrappedNodeExpr } from "@angular/compiler";
|
|
@@ -733,7 +729,7 @@ var StaticInterpreter = class {
|
|
|
733
729
|
} else if (isConcreteDeclaration(decl) && decl.identity !== null && decl.identity.kind === 0) {
|
|
734
730
|
return this.getResolvedEnum(decl.node, decl.identity.enumMembers, context);
|
|
735
731
|
}
|
|
736
|
-
const declContext =
|
|
732
|
+
const declContext = { ...context, ...joinModuleContext(context, node, decl) };
|
|
737
733
|
const result = this.visitAmbiguousDeclaration(decl, declContext);
|
|
738
734
|
if (result instanceof Reference) {
|
|
739
735
|
if (!result.synthetic) {
|
|
@@ -825,7 +821,10 @@ var StaticInterpreter = class {
|
|
|
825
821
|
if (decl.known !== null) {
|
|
826
822
|
return resolveKnownDeclaration(decl.known);
|
|
827
823
|
}
|
|
828
|
-
const declContext =
|
|
824
|
+
const declContext = {
|
|
825
|
+
...context,
|
|
826
|
+
...joinModuleContext(context, node, decl)
|
|
827
|
+
};
|
|
829
828
|
return this.visitAmbiguousDeclaration(decl, declContext);
|
|
830
829
|
});
|
|
831
830
|
}
|
|
@@ -908,7 +907,7 @@ var StaticInterpreter = class {
|
|
|
908
907
|
resolutionContext: lhs.bestGuessOwningModule.resolutionContext
|
|
909
908
|
};
|
|
910
909
|
}
|
|
911
|
-
return this.visitFfrExpression(expr,
|
|
910
|
+
return this.visitFfrExpression(expr, { ...context, ...contextExtension });
|
|
912
911
|
};
|
|
913
912
|
if (fn.body === null && context.foreignFunctionResolver !== void 0) {
|
|
914
913
|
const unresolvable = DynamicValue.fromDynamicInput(node, DynamicValue.fromExternalReference(node.expression, lhs));
|
|
@@ -937,7 +936,7 @@ var StaticInterpreter = class {
|
|
|
937
936
|
const ret = fn.body[0];
|
|
938
937
|
const args = this.evaluateFunctionArguments(node, context);
|
|
939
938
|
const newScope = /* @__PURE__ */ new Map();
|
|
940
|
-
const calleeContext =
|
|
939
|
+
const calleeContext = { ...context, scope: newScope };
|
|
941
940
|
fn.parameters.forEach((param, index) => {
|
|
942
941
|
let arg = args[index];
|
|
943
942
|
if (param.node.dotDotDotToken !== void 0) {
|
|
@@ -2261,7 +2260,7 @@ var DtsMetadataReader = class {
|
|
|
2261
2260
|
const isStandalone = def.type.typeArguments.length > 7 && ((_a = readBooleanType(def.type.typeArguments[7])) != null ? _a : false);
|
|
2262
2261
|
const inputs = ClassPropertyMapping.fromMappedObject(readStringMapType(def.type.typeArguments[3]));
|
|
2263
2262
|
const outputs = ClassPropertyMapping.fromMappedObject(readStringMapType(def.type.typeArguments[4]));
|
|
2264
|
-
return
|
|
2263
|
+
return {
|
|
2265
2264
|
kind: MetaKind.Directive,
|
|
2266
2265
|
ref,
|
|
2267
2266
|
name: clazz.name.text,
|
|
@@ -2270,8 +2269,8 @@ var DtsMetadataReader = class {
|
|
|
2270
2269
|
exportAs: readStringArrayType(def.type.typeArguments[2]),
|
|
2271
2270
|
inputs,
|
|
2272
2271
|
outputs,
|
|
2273
|
-
queries: readStringArrayType(def.type.typeArguments[5])
|
|
2274
|
-
|
|
2272
|
+
queries: readStringArrayType(def.type.typeArguments[5]),
|
|
2273
|
+
...extractDirectiveTypeCheckMeta(clazz, inputs, this.reflector),
|
|
2275
2274
|
baseClass: readBaseClass2(clazz, this.checker, this.reflector),
|
|
2276
2275
|
isPoisoned: false,
|
|
2277
2276
|
isStructural,
|
|
@@ -2279,7 +2278,7 @@ var DtsMetadataReader = class {
|
|
|
2279
2278
|
isStandalone,
|
|
2280
2279
|
imports: null,
|
|
2281
2280
|
schemas: null
|
|
2282
|
-
}
|
|
2281
|
+
};
|
|
2283
2282
|
}
|
|
2284
2283
|
getPipeMetadata(ref) {
|
|
2285
2284
|
var _a;
|
|
@@ -2374,7 +2373,8 @@ function flattenInheritedDirectiveMetadata(reader, dir) {
|
|
|
2374
2373
|
}
|
|
2375
2374
|
};
|
|
2376
2375
|
addMetadata(topMeta);
|
|
2377
|
-
return
|
|
2376
|
+
return {
|
|
2377
|
+
...topMeta,
|
|
2378
2378
|
inputs,
|
|
2379
2379
|
outputs,
|
|
2380
2380
|
coercedInputFields,
|
|
@@ -2383,7 +2383,7 @@ function flattenInheritedDirectiveMetadata(reader, dir) {
|
|
|
2383
2383
|
stringLiteralInputFields,
|
|
2384
2384
|
baseClass: isDynamic ? "dynamic" : null,
|
|
2385
2385
|
isStructural
|
|
2386
|
-
}
|
|
2386
|
+
};
|
|
2387
2387
|
}
|
|
2388
2388
|
|
|
2389
2389
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/registry.mjs
|
|
@@ -2611,9 +2611,10 @@ var MetadataDtsModuleScopeResolver = class {
|
|
|
2611
2611
|
if (alias === null) {
|
|
2612
2612
|
return dirOrPipe;
|
|
2613
2613
|
}
|
|
2614
|
-
return
|
|
2614
|
+
return {
|
|
2615
|
+
...dirOrPipe,
|
|
2615
2616
|
ref: ref.cloneWithAlias(alias)
|
|
2616
|
-
}
|
|
2617
|
+
};
|
|
2617
2618
|
}
|
|
2618
2619
|
};
|
|
2619
2620
|
|
|
@@ -2631,11 +2632,8 @@ function makeNotStandaloneDiagnostic(scopeReader, ref, rawExpr, kind) {
|
|
|
2631
2632
|
let relatedInformation = void 0;
|
|
2632
2633
|
if (scope !== null && scope.kind === ComponentScopeKind.NgModule) {
|
|
2633
2634
|
const isExported = scope.exported.dependencies.some((dep) => dep.ref.node === ref.node);
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
} else {
|
|
2637
|
-
relatedInformation = [makeRelatedInformation(scope.ngModule.name, `It's declared in the NgModule '${scope.ngModule.name.text}', but is not exported. Consider exporting it.`)];
|
|
2638
|
-
}
|
|
2635
|
+
const relatedInfoMessageText = isExported ? `It can be imported using its '${scope.ngModule.name.text}' NgModule instead.` : `It's declared in the '${scope.ngModule.name.text}' NgModule, but is not exported. Consider exporting it and importing the NgModule instead.`;
|
|
2636
|
+
relatedInformation = [makeRelatedInformation(scope.ngModule.name, relatedInfoMessageText)];
|
|
2639
2637
|
} else {
|
|
2640
2638
|
}
|
|
2641
2639
|
if (relatedInformation === void 0) {
|
|
@@ -2790,7 +2788,7 @@ var LocalModuleScopeRegistry = class {
|
|
|
2790
2788
|
isPoisoned = true;
|
|
2791
2789
|
continue;
|
|
2792
2790
|
}
|
|
2793
|
-
compilationDirectives.set(decl.node,
|
|
2791
|
+
compilationDirectives.set(decl.node, { ...directive, ref: decl });
|
|
2794
2792
|
if (directive.isPoisoned) {
|
|
2795
2793
|
isPoisoned = true;
|
|
2796
2794
|
}
|
|
@@ -2800,7 +2798,7 @@ var LocalModuleScopeRegistry = class {
|
|
|
2800
2798
|
isPoisoned = true;
|
|
2801
2799
|
continue;
|
|
2802
2800
|
}
|
|
2803
|
-
compilationPipes.set(decl.node,
|
|
2801
|
+
compilationPipes.set(decl.node, { ...pipe, ref: decl });
|
|
2804
2802
|
} else {
|
|
2805
2803
|
const errorNode = decl.getOriginForDiagnostics(ngModule.rawDeclarations);
|
|
2806
2804
|
diagnostics.push(makeDiagnostic(ErrorCode.NGMODULE_INVALID_DECLARATION, errorNode, `The class '${decl.node.name.text}' is listed in the declarations of the NgModule '${ngModule.ref.node.name.text}', but is not a directive, a component, or a pipe. Either remove it from the NgModule's declarations, or add an appropriate Angular decorator.`, [makeRelatedInformation(decl.node.name, `'${decl.node.name.text}' is declared here.`)]));
|
|
@@ -4075,8 +4073,8 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, isCore
|
|
|
4075
4073
|
const usesInheritance = reflector.hasBaseClass(clazz);
|
|
4076
4074
|
const type = wrapTypeReference(reflector, clazz);
|
|
4077
4075
|
const internalType = new WrappedNodeExpr4(reflector.getInternalNameOfClass(clazz));
|
|
4078
|
-
const inputs = ClassPropertyMapping.fromMappedObject(
|
|
4079
|
-
const outputs = ClassPropertyMapping.fromMappedObject(
|
|
4076
|
+
const inputs = ClassPropertyMapping.fromMappedObject({ ...inputsFromMeta, ...inputsFromFields });
|
|
4077
|
+
const outputs = ClassPropertyMapping.fromMappedObject({ ...outputsFromMeta, ...outputsFromFields });
|
|
4080
4078
|
const metadata = {
|
|
4081
4079
|
name: clazz.name.text,
|
|
4082
4080
|
deps: ctorDeps,
|
|
@@ -4516,7 +4514,7 @@ var DirectiveDecoratorHandler = class {
|
|
|
4516
4514
|
}
|
|
4517
4515
|
register(node, analysis) {
|
|
4518
4516
|
const ref = new Reference(node);
|
|
4519
|
-
this.metaRegistry.registerDirectiveMetadata(
|
|
4517
|
+
this.metaRegistry.registerDirectiveMetadata({
|
|
4520
4518
|
kind: MetaKind.Directive,
|
|
4521
4519
|
ref,
|
|
4522
4520
|
name: node.name.text,
|
|
@@ -4526,15 +4524,15 @@ var DirectiveDecoratorHandler = class {
|
|
|
4526
4524
|
outputs: analysis.outputs,
|
|
4527
4525
|
queries: analysis.meta.queries.map((query) => query.propertyName),
|
|
4528
4526
|
isComponent: false,
|
|
4529
|
-
baseClass: analysis.baseClass
|
|
4530
|
-
|
|
4527
|
+
baseClass: analysis.baseClass,
|
|
4528
|
+
...analysis.typeCheckMeta,
|
|
4531
4529
|
isPoisoned: analysis.isPoisoned,
|
|
4532
4530
|
isStructural: analysis.isStructural,
|
|
4533
4531
|
animationTriggerNames: null,
|
|
4534
4532
|
isStandalone: analysis.meta.isStandalone,
|
|
4535
4533
|
imports: null,
|
|
4536
4534
|
schemas: null
|
|
4537
|
-
})
|
|
4535
|
+
});
|
|
4538
4536
|
this.injectableRegistry.registerInjectable(node);
|
|
4539
4537
|
}
|
|
4540
4538
|
resolve(node, analysis, symbol) {
|
|
@@ -5007,9 +5005,10 @@ var NgModuleDecoratorHandler = class {
|
|
|
5007
5005
|
}
|
|
5008
5006
|
compileFull(node, { inj, mod, fac, classMetadata, declarations, remoteScopesMayRequireCycleProtection }, { injectorImports }) {
|
|
5009
5007
|
const factoryFn = compileNgFactoryDefField(fac);
|
|
5010
|
-
const ngInjectorDef = compileInjector(
|
|
5008
|
+
const ngInjectorDef = compileInjector({
|
|
5009
|
+
...inj,
|
|
5011
5010
|
imports: injectorImports
|
|
5012
|
-
})
|
|
5011
|
+
});
|
|
5013
5012
|
const ngModuleDef = compileNgModule(mod);
|
|
5014
5013
|
const statements = ngModuleDef.statements;
|
|
5015
5014
|
const metadata = classMetadata !== null ? compileClassMetadata2(classMetadata) : null;
|
|
@@ -5019,9 +5018,10 @@ var NgModuleDecoratorHandler = class {
|
|
|
5019
5018
|
}
|
|
5020
5019
|
compilePartial(node, { inj, fac, mod, classMetadata }, { injectorImports }) {
|
|
5021
5020
|
const factoryFn = compileDeclareFactory(fac);
|
|
5022
|
-
const injectorDef = compileDeclareInjectorFromMetadata(
|
|
5021
|
+
const injectorDef = compileDeclareInjectorFromMetadata({
|
|
5022
|
+
...inj,
|
|
5023
5023
|
imports: injectorImports
|
|
5024
|
-
})
|
|
5024
|
+
});
|
|
5025
5025
|
const ngModuleDef = compileDeclareNgModuleFromMetadata(mod);
|
|
5026
5026
|
const metadata = classMetadata !== null ? compileDeclareClassMetadata2(classMetadata) : null;
|
|
5027
5027
|
this.insertMetadataStatement(ngModuleDef.statements, metadata);
|
|
@@ -5212,17 +5212,19 @@ function extractTemplate(node, template, evaluator, depTracker, resourceLoader,
|
|
|
5212
5212
|
};
|
|
5213
5213
|
sourceMapUrl = null;
|
|
5214
5214
|
}
|
|
5215
|
-
return
|
|
5215
|
+
return {
|
|
5216
|
+
...parseExtractedTemplate(template, sourceStr, sourceParseRange, escapedString, sourceMapUrl, options),
|
|
5216
5217
|
content: templateContent,
|
|
5217
5218
|
sourceMapping,
|
|
5218
5219
|
declaration: template
|
|
5219
|
-
}
|
|
5220
|
+
};
|
|
5220
5221
|
} else {
|
|
5221
5222
|
const templateContent = resourceLoader.load(template.resolvedTemplateUrl);
|
|
5222
5223
|
if (depTracker !== null) {
|
|
5223
5224
|
depTracker.addResourceDependency(node.getSourceFile(), absoluteFrom(template.resolvedTemplateUrl));
|
|
5224
5225
|
}
|
|
5225
|
-
return
|
|
5226
|
+
return {
|
|
5227
|
+
...parseExtractedTemplate(template, templateContent, null, false, template.resolvedTemplateUrl, options),
|
|
5226
5228
|
content: templateContent,
|
|
5227
5229
|
sourceMapping: {
|
|
5228
5230
|
type: "external",
|
|
@@ -5232,7 +5234,7 @@ function extractTemplate(node, template, evaluator, depTracker, resourceLoader,
|
|
|
5232
5234
|
templateUrl: template.resolvedTemplateUrl
|
|
5233
5235
|
},
|
|
5234
5236
|
declaration: template
|
|
5235
|
-
}
|
|
5237
|
+
};
|
|
5236
5238
|
}
|
|
5237
5239
|
}
|
|
5238
5240
|
function parseExtractedTemplate(template, sourceStr, sourceParseRange, escapedString, sourceMapUrl, options) {
|
|
@@ -5257,10 +5259,11 @@ function parseExtractedTemplate(template, sourceStr, sourceParseRange, escapedSt
|
|
|
5257
5259
|
leadingTriviaChars: [],
|
|
5258
5260
|
alwaysAttemptHtmlToR3AstConversion: options.usePoisonedData
|
|
5259
5261
|
});
|
|
5260
|
-
return
|
|
5262
|
+
return {
|
|
5263
|
+
...parsedTemplate,
|
|
5261
5264
|
diagNodes,
|
|
5262
5265
|
file: new ParseSourceFile2(sourceStr, sourceMapUrl != null ? sourceMapUrl : "")
|
|
5263
|
-
}
|
|
5266
|
+
};
|
|
5264
5267
|
}
|
|
5265
5268
|
function parseTemplateDeclaration(decorator, component, containingFile, evaluator, resourceLoader, defaultPreserveWhitespaces) {
|
|
5266
5269
|
let preserveWhitespaces = defaultPreserveWhitespaces;
|
|
@@ -5399,7 +5402,7 @@ function transformDecoratorResources(dec, component, styles, template) {
|
|
|
5399
5402
|
for (const [name, value] of metadata.entries()) {
|
|
5400
5403
|
newMetadataFields.push(ts23.factory.createPropertyAssignment(name, value));
|
|
5401
5404
|
}
|
|
5402
|
-
return
|
|
5405
|
+
return { ...dec, args: [ts23.factory.createObjectLiteralExpression(newMetadataFields)] };
|
|
5403
5406
|
}
|
|
5404
5407
|
function extractComponentStyleUrls(evaluator, component) {
|
|
5405
5408
|
if (!component.has("styleUrls")) {
|
|
@@ -5834,7 +5837,8 @@ var ComponentDecoratorHandler = class {
|
|
|
5834
5837
|
baseClass: readBaseClass(node, this.reflector, this.evaluator),
|
|
5835
5838
|
inputs,
|
|
5836
5839
|
outputs,
|
|
5837
|
-
meta:
|
|
5840
|
+
meta: {
|
|
5841
|
+
...metadata,
|
|
5838
5842
|
template: {
|
|
5839
5843
|
nodes: template.nodes,
|
|
5840
5844
|
ngContentSelectors: template.ngContentSelectors
|
|
@@ -5846,7 +5850,7 @@ var ComponentDecoratorHandler = class {
|
|
|
5846
5850
|
viewProviders: wrappedViewProviders,
|
|
5847
5851
|
i18nUseExternalIds: this.i18nUseExternalIds,
|
|
5848
5852
|
relativeContextFilePath
|
|
5849
|
-
}
|
|
5853
|
+
},
|
|
5850
5854
|
typeCheckMeta: extractDirectiveTypeCheckMeta(node, inputs, this.reflector),
|
|
5851
5855
|
classMetadata: extractClassMetadata(node, this.reflector, this.isCore, this.annotateForClosureCompiler, (dec) => transformDecoratorResources(dec, component, styles, template)),
|
|
5852
5856
|
template,
|
|
@@ -5877,7 +5881,7 @@ var ComponentDecoratorHandler = class {
|
|
|
5877
5881
|
}
|
|
5878
5882
|
register(node, analysis) {
|
|
5879
5883
|
const ref = new Reference(node);
|
|
5880
|
-
this.metaRegistry.registerDirectiveMetadata(
|
|
5884
|
+
this.metaRegistry.registerDirectiveMetadata({
|
|
5881
5885
|
kind: MetaKind.Directive,
|
|
5882
5886
|
ref,
|
|
5883
5887
|
name: node.name.text,
|
|
@@ -5887,15 +5891,15 @@ var ComponentDecoratorHandler = class {
|
|
|
5887
5891
|
outputs: analysis.outputs,
|
|
5888
5892
|
queries: analysis.meta.queries.map((query) => query.propertyName),
|
|
5889
5893
|
isComponent: true,
|
|
5890
|
-
baseClass: analysis.baseClass
|
|
5891
|
-
|
|
5894
|
+
baseClass: analysis.baseClass,
|
|
5895
|
+
...analysis.typeCheckMeta,
|
|
5892
5896
|
isPoisoned: analysis.isPoisoned,
|
|
5893
5897
|
isStructural: false,
|
|
5894
5898
|
isStandalone: analysis.meta.isStandalone,
|
|
5895
5899
|
imports: analysis.resolvedImports,
|
|
5896
5900
|
animationTriggerNames: analysis.animationTriggerNames,
|
|
5897
5901
|
schemas: analysis.schemas
|
|
5898
|
-
})
|
|
5902
|
+
});
|
|
5899
5903
|
this.resourceRegistry.registerResources(analysis.resources, node);
|
|
5900
5904
|
this.injectableRegistry.registerInjectable(node);
|
|
5901
5905
|
}
|
|
@@ -6148,7 +6152,7 @@ var ComponentDecoratorHandler = class {
|
|
|
6148
6152
|
if (analysis.template.errors !== null && analysis.template.errors.length > 0) {
|
|
6149
6153
|
return [];
|
|
6150
6154
|
}
|
|
6151
|
-
const meta =
|
|
6155
|
+
const meta = { ...analysis.meta, ...resolution };
|
|
6152
6156
|
const fac = compileNgFactoryDefField(toFactoryMetadata(meta, FactoryTarget3.Component));
|
|
6153
6157
|
const def = compileComponentFromMetadata(meta, pool, makeBindingParser2());
|
|
6154
6158
|
const classMetadata = analysis.classMetadata !== null ? compileClassMetadata3(analysis.classMetadata).toStmt() : null;
|
|
@@ -6164,7 +6168,7 @@ var ComponentDecoratorHandler = class {
|
|
|
6164
6168
|
isInline: analysis.template.declaration.isInline,
|
|
6165
6169
|
inlineTemplateLiteralExpression: analysis.template.sourceMapping.type === "direct" ? new WrappedNodeExpr7(analysis.template.sourceMapping.node) : null
|
|
6166
6170
|
};
|
|
6167
|
-
const meta =
|
|
6171
|
+
const meta = { ...analysis.meta, ...resolution };
|
|
6168
6172
|
const fac = compileDeclareFactory(toFactoryMetadata(meta, FactoryTarget3.Component));
|
|
6169
6173
|
const def = compileDeclareComponentFromMetadata(meta, analysis.template, templateInfo);
|
|
6170
6174
|
const classMetadata = analysis.classMetadata !== null ? compileDeclareClassMetadata3(analysis.classMetadata).toStmt() : null;
|
|
@@ -6269,7 +6273,7 @@ var InjectableDecoratorHandler = class {
|
|
|
6269
6273
|
const results = [];
|
|
6270
6274
|
if (analysis.needsFactory) {
|
|
6271
6275
|
const meta = analysis.meta;
|
|
6272
|
-
const factoryRes = compileFactoryFn(toFactoryMetadata(
|
|
6276
|
+
const factoryRes = compileFactoryFn(toFactoryMetadata({ ...meta, deps: analysis.ctorDeps }, FactoryTarget4.Injectable));
|
|
6273
6277
|
if (analysis.classMetadata !== null) {
|
|
6274
6278
|
factoryRes.statements.push(compileClassMetadataFn(analysis.classMetadata).toStmt());
|
|
6275
6279
|
}
|
|
@@ -6593,4 +6597,4 @@ export {
|
|
|
6593
6597
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6594
6598
|
* found in the LICENSE file at https://angular.io/license
|
|
6595
6599
|
*/
|
|
6596
|
-
//# sourceMappingURL=chunk-
|
|
6600
|
+
//# sourceMappingURL=chunk-X2UHASWN.js.map
|