@angular/compiler-cli 17.0.0-next.5 → 17.0.0-next.7
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-7QICZXP3.js → chunk-3NXCUQ44.js} +2 -2
- package/bundles/{chunk-7QTF7U4J.js → chunk-C4TR4DIO.js} +2 -2
- package/bundles/{chunk-YWV5CDS7.js → chunk-I3FLXBLP.js} +67 -33
- package/bundles/chunk-I3FLXBLP.js.map +6 -0
- package/bundles/{chunk-TX6LIB73.js → chunk-PAPUMJUA.js} +2 -1
- package/bundles/{chunk-TX6LIB73.js.map → chunk-PAPUMJUA.js.map} +1 -1
- package/bundles/{chunk-RVITQ7TS.js → chunk-PBDWVP2J.js} +106 -47
- package/bundles/chunk-PBDWVP2J.js.map +6 -0
- package/bundles/{chunk-KV7WQARZ.js → chunk-PYIYPY3X.js} +38 -15
- package/bundles/chunk-PYIYPY3X.js.map +6 -0
- package/bundles/{chunk-OADA63HC.js → chunk-W3AMRN7J.js} +2 -2
- package/bundles/index.js +6 -6
- package/bundles/linker/babel/index.js +3 -3
- package/bundles/linker/index.js +3 -3
- package/bundles/private/migrations.js +3 -3
- package/bundles/private/tooling.js +2 -2
- package/bundles/src/bin/ng_xi18n.js +5 -5
- package/bundles/src/bin/ngc.js +5 -5
- package/bundles_metadata.json +1 -1
- package/linker/src/file_linker/partial_linkers/partial_component_linker_1.d.ts +3 -1
- package/linker/src/file_linker/partial_linkers/partial_linker.d.ts +1 -1
- package/linker/src/file_linker/partial_linkers/util.d.ts +1 -0
- package/package.json +2 -2
- package/src/ngtsc/annotations/common/src/evaluation.d.ts +8 -0
- package/src/ngtsc/annotations/component/src/handler.d.ts +3 -2
- package/src/ngtsc/annotations/component/src/resources.d.ts +0 -1
- package/src/ngtsc/core/src/compiler.d.ts +0 -1
- package/src/ngtsc/diagnostics/src/error_code.d.ts +14 -1
- package/src/ngtsc/docs/src/class_extractor.d.ts +3 -1
- package/src/ngtsc/docs/src/entities.d.ts +2 -0
- package/src/ngtsc/docs/src/function_extractor.d.ts +1 -1
- package/src/ngtsc/imports/src/deferred_symbol_tracker.d.ts +1 -1
- package/src/ngtsc/typecheck/src/oob.d.ts +6 -1
- package/src/ngtsc/typecheck/src/type_check_block.d.ts +8 -4
- package/bundles/chunk-KV7WQARZ.js.map +0 -6
- package/bundles/chunk-RVITQ7TS.js.map +0 -6
- package/bundles/chunk-YWV5CDS7.js.map +0 -6
- /package/bundles/{chunk-7QICZXP3.js.map → chunk-3NXCUQ44.js.map} +0 -0
- /package/bundles/{chunk-7QTF7U4J.js.map → chunk-C4TR4DIO.js.map} +0 -0
- /package/bundles/{chunk-OADA63HC.js.map → chunk-W3AMRN7J.js.map} +0 -0
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
NoopImportRewriter,
|
|
8
8
|
Reference,
|
|
9
9
|
assertSuccessfulReferenceEmit
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PAPUMJUA.js";
|
|
11
11
|
|
|
12
12
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/context.mjs
|
|
13
13
|
var Context = class {
|
|
@@ -738,4 +738,4 @@ export {
|
|
|
738
738
|
* Use of this source code is governed by an MIT-style license that can be
|
|
739
739
|
* found in the LICENSE file at https://angular.io/license
|
|
740
740
|
*/
|
|
741
|
-
//# sourceMappingURL=chunk-
|
|
741
|
+
//# sourceMappingURL=chunk-3NXCUQ44.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
TypeScriptReflectionHost,
|
|
7
7
|
isAliasImportDeclaration,
|
|
8
8
|
loadIsReferencedAliasDeclarationPatch
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PAPUMJUA.js";
|
|
10
10
|
|
|
11
11
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/transformers/downlevel_decorators_transform/downlevel_decorators_transform.mjs
|
|
12
12
|
import ts from "typescript";
|
|
@@ -344,4 +344,4 @@ export {
|
|
|
344
344
|
* Use of this source code is governed by an MIT-style license that can be
|
|
345
345
|
* found in the LICENSE file at https://angular.io/license
|
|
346
346
|
*/
|
|
347
|
-
//# sourceMappingURL=chunk-
|
|
347
|
+
//# sourceMappingURL=chunk-C4TR4DIO.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
translateExpression,
|
|
8
8
|
translateStatement,
|
|
9
9
|
translateType
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3NXCUQ44.js";
|
|
11
11
|
import {
|
|
12
12
|
ClassMemberKind,
|
|
13
13
|
ErrorCode,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
reflectObjectLiteral,
|
|
31
31
|
reflectTypeEntityToDeclaration,
|
|
32
32
|
typeNodeToValueExpr
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-PAPUMJUA.js";
|
|
34
34
|
import {
|
|
35
35
|
PerfEvent,
|
|
36
36
|
PerfPhase
|
|
@@ -3316,6 +3316,7 @@ function getInheritedUndecoratedCtorDiagnostic(node, baseClass, kind) {
|
|
|
3316
3316
|
}
|
|
3317
3317
|
|
|
3318
3318
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/evaluation.mjs
|
|
3319
|
+
import { ViewEncapsulation } from "@angular/compiler";
|
|
3319
3320
|
import ts14 from "typescript";
|
|
3320
3321
|
function resolveEnumValue(evaluator, metadata, field, enumSymbolName) {
|
|
3321
3322
|
let resolved = null;
|
|
@@ -3330,6 +3331,23 @@ function resolveEnumValue(evaluator, metadata, field, enumSymbolName) {
|
|
|
3330
3331
|
}
|
|
3331
3332
|
return resolved;
|
|
3332
3333
|
}
|
|
3334
|
+
function resolveEncapsulationEnumValueLocally(expr) {
|
|
3335
|
+
if (!expr) {
|
|
3336
|
+
return null;
|
|
3337
|
+
}
|
|
3338
|
+
const exprText = expr.getText().trim();
|
|
3339
|
+
for (const key in ViewEncapsulation) {
|
|
3340
|
+
if (!Number.isNaN(Number(key))) {
|
|
3341
|
+
continue;
|
|
3342
|
+
}
|
|
3343
|
+
const suffix = `ViewEncapsulation.${key}`;
|
|
3344
|
+
if (exprText === suffix || exprText.endsWith(`.${suffix}`)) {
|
|
3345
|
+
const ans = Number(ViewEncapsulation[key]);
|
|
3346
|
+
return ans;
|
|
3347
|
+
}
|
|
3348
|
+
}
|
|
3349
|
+
return null;
|
|
3350
|
+
}
|
|
3333
3351
|
function isStringArray(resolvedValue) {
|
|
3334
3352
|
return Array.isArray(resolvedValue) && resolvedValue.every((elem) => typeof elem === "string");
|
|
3335
3353
|
}
|
|
@@ -3398,7 +3416,7 @@ var InjectableClassRegistry = class {
|
|
|
3398
3416
|
};
|
|
3399
3417
|
|
|
3400
3418
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/metadata.mjs
|
|
3401
|
-
import {
|
|
3419
|
+
import { ArrowFunctionExpr, LiteralArrayExpr, LiteralExpr as LiteralExpr2, literalMap, WrappedNodeExpr as WrappedNodeExpr3 } from "@angular/compiler";
|
|
3402
3420
|
import ts15 from "typescript";
|
|
3403
3421
|
function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompiler, angularDecoratorTransform = (dec) => dec) {
|
|
3404
3422
|
if (!reflection.isClass(clazz)) {
|
|
@@ -3418,9 +3436,7 @@ function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompi
|
|
|
3418
3436
|
const classCtorParameters = reflection.getConstructorParameters(clazz);
|
|
3419
3437
|
if (classCtorParameters !== null) {
|
|
3420
3438
|
const ctorParameters = classCtorParameters.map((param) => ctorParameterToMetadata(param, isCore));
|
|
3421
|
-
metaCtorParameters = new
|
|
3422
|
-
new ReturnStatement(new LiteralArrayExpr(ctorParameters))
|
|
3423
|
-
]);
|
|
3439
|
+
metaCtorParameters = new ArrowFunctionExpr([], new LiteralArrayExpr(ctorParameters));
|
|
3424
3440
|
}
|
|
3425
3441
|
let metaPropDecorators = null;
|
|
3426
3442
|
const classMembers = reflection.getMembersOfClass(clazz).filter((member) => !member.isStatic && member.decorators !== null && member.decorators.length > 0);
|
|
@@ -3539,7 +3555,7 @@ function compileInputTransformFields(inputs) {
|
|
|
3539
3555
|
}
|
|
3540
3556
|
|
|
3541
3557
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
|
|
3542
|
-
import { compileClassMetadata as compileClassMetadata3, compileComponentClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata as compileDeclareClassMetadata3, compileDeclareComponentFromMetadata, CssSelector as CssSelector2, DEFAULT_INTERPOLATION_CONFIG as DEFAULT_INTERPOLATION_CONFIG2, DomElementSchemaRegistry, FactoryTarget as FactoryTarget3, makeBindingParser as makeBindingParser2, R3TargetBinder, R3TemplateDependencyKind, SelectorMatcher as SelectorMatcher2, ViewEncapsulation, WrappedNodeExpr as WrappedNodeExpr7 } from "@angular/compiler";
|
|
3558
|
+
import { compileClassMetadata as compileClassMetadata3, compileComponentClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata as compileDeclareClassMetadata3, compileDeclareComponentFromMetadata, CssSelector as CssSelector2, DEFAULT_INTERPOLATION_CONFIG as DEFAULT_INTERPOLATION_CONFIG2, DomElementSchemaRegistry, FactoryTarget as FactoryTarget3, makeBindingParser as makeBindingParser2, R3TargetBinder, R3TemplateDependencyKind, SelectorMatcher as SelectorMatcher2, ViewEncapsulation as ViewEncapsulation2, WrappedNodeExpr as WrappedNodeExpr7 } from "@angular/compiler";
|
|
3543
3559
|
import ts24 from "typescript";
|
|
3544
3560
|
|
|
3545
3561
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/api.mjs
|
|
@@ -5162,7 +5178,7 @@ var DirectiveDecoratorHandler = class {
|
|
|
5162
5178
|
};
|
|
5163
5179
|
|
|
5164
5180
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
|
|
5165
|
-
import { compileClassMetadata as compileClassMetadata2, compileDeclareClassMetadata as compileDeclareClassMetadata2, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileInjector, compileNgModule, ExternalExpr as ExternalExpr5, FactoryTarget as FactoryTarget2, FunctionExpr
|
|
5181
|
+
import { compileClassMetadata as compileClassMetadata2, compileDeclareClassMetadata as compileDeclareClassMetadata2, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileInjector, compileNgModule, ExternalExpr as ExternalExpr5, FactoryTarget as FactoryTarget2, FunctionExpr, InvokeFunctionExpr, LiteralArrayExpr as LiteralArrayExpr2, R3Identifiers, R3NgModuleMetadataKind, R3SelectorScopeMode, ReturnStatement, WrappedNodeExpr as WrappedNodeExpr6 } from "@angular/compiler";
|
|
5166
5182
|
import ts22 from "typescript";
|
|
5167
5183
|
|
|
5168
5184
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/module_with_providers.mjs
|
|
@@ -5708,8 +5724,8 @@ var NgModuleDecoratorHandler = class {
|
|
|
5708
5724
|
});
|
|
5709
5725
|
const directiveArray = new LiteralArrayExpr2(directives);
|
|
5710
5726
|
const pipesArray = new LiteralArrayExpr2(pipes);
|
|
5711
|
-
const directiveExpr = remoteScopesMayRequireCycleProtection && directives.length > 0 ? new
|
|
5712
|
-
const pipesExpr = remoteScopesMayRequireCycleProtection && pipes.length > 0 ? new
|
|
5727
|
+
const directiveExpr = remoteScopesMayRequireCycleProtection && directives.length > 0 ? new FunctionExpr([], [new ReturnStatement(directiveArray)]) : directiveArray;
|
|
5728
|
+
const pipesExpr = remoteScopesMayRequireCycleProtection && pipes.length > 0 ? new FunctionExpr([], [new ReturnStatement(pipesArray)]) : pipesArray;
|
|
5713
5729
|
const componentType = this.refEmitter.emit(decl, context);
|
|
5714
5730
|
assertSuccessfulReferenceEmit(componentType, node, "component");
|
|
5715
5731
|
const declExpr = componentType.expression;
|
|
@@ -5913,8 +5929,7 @@ function parseExtractedTemplate(template, sourceStr, sourceParseRange, escapedSt
|
|
|
5913
5929
|
escapedString,
|
|
5914
5930
|
enableI18nLegacyMessageIdFormat: options.enableI18nLegacyMessageIdFormat,
|
|
5915
5931
|
i18nNormalizeLineEndingsInICUs,
|
|
5916
|
-
alwaysAttemptHtmlToR3AstConversion: options.usePoisonedData
|
|
5917
|
-
enabledBlockTypes: options.enabledBlockTypes
|
|
5932
|
+
alwaysAttemptHtmlToR3AstConversion: options.usePoisonedData
|
|
5918
5933
|
});
|
|
5919
5934
|
const { nodes: diagNodes } = parseTemplate(sourceStr, sourceMapUrl != null ? sourceMapUrl : "", {
|
|
5920
5935
|
preserveWhitespaces: true,
|
|
@@ -5925,8 +5940,7 @@ function parseExtractedTemplate(template, sourceStr, sourceParseRange, escapedSt
|
|
|
5925
5940
|
enableI18nLegacyMessageIdFormat: options.enableI18nLegacyMessageIdFormat,
|
|
5926
5941
|
i18nNormalizeLineEndingsInICUs,
|
|
5927
5942
|
leadingTriviaChars: [],
|
|
5928
|
-
alwaysAttemptHtmlToR3AstConversion: options.usePoisonedData
|
|
5929
|
-
enabledBlockTypes: options.enabledBlockTypes
|
|
5943
|
+
alwaysAttemptHtmlToR3AstConversion: options.usePoisonedData
|
|
5930
5944
|
});
|
|
5931
5945
|
return {
|
|
5932
5946
|
...parsedTemplate,
|
|
@@ -6299,7 +6313,7 @@ var EMPTY_ARRAY2 = [];
|
|
|
6299
6313
|
var isUsedDirective = (decl) => decl.kind === R3TemplateDependencyKind.Directive;
|
|
6300
6314
|
var isUsedPipe = (decl) => decl.kind === R3TemplateDependencyKind.Pipe;
|
|
6301
6315
|
var ComponentDecoratorHandler = class {
|
|
6302
|
-
constructor(reflector, evaluator, metaRegistry, metaReader, scopeReader, dtsScopeReader, scopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, strictCtorDeps, resourceLoader, rootDirs, defaultPreserveWhitespaces, i18nUseExternalIds, enableI18nLegacyMessageIdFormat, usePoisonedData, i18nNormalizeLineEndingsInICUs,
|
|
6316
|
+
constructor(reflector, evaluator, metaRegistry, metaReader, scopeReader, dtsScopeReader, scopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, strictCtorDeps, resourceLoader, rootDirs, defaultPreserveWhitespaces, i18nUseExternalIds, enableI18nLegacyMessageIdFormat, usePoisonedData, i18nNormalizeLineEndingsInICUs, moduleResolver, cycleAnalyzer, cycleHandlingStrategy, refEmitter, referencesRegistry, depTracker, injectableRegistry, semanticDepGraphUpdater, annotateForClosureCompiler, perf, hostDirectivesResolver, includeClassMetadata, compilationMode, deferredSymbolTracker) {
|
|
6303
6317
|
this.reflector = reflector;
|
|
6304
6318
|
this.evaluator = evaluator;
|
|
6305
6319
|
this.metaRegistry = metaRegistry;
|
|
@@ -6318,7 +6332,6 @@ var ComponentDecoratorHandler = class {
|
|
|
6318
6332
|
this.enableI18nLegacyMessageIdFormat = enableI18nLegacyMessageIdFormat;
|
|
6319
6333
|
this.usePoisonedData = usePoisonedData;
|
|
6320
6334
|
this.i18nNormalizeLineEndingsInICUs = i18nNormalizeLineEndingsInICUs;
|
|
6321
|
-
this.enabledBlockTypes = enabledBlockTypes;
|
|
6322
6335
|
this.moduleResolver = moduleResolver;
|
|
6323
6336
|
this.cycleAnalyzer = cycleAnalyzer;
|
|
6324
6337
|
this.cycleHandlingStrategy = cycleHandlingStrategy;
|
|
@@ -6342,8 +6355,7 @@ var ComponentDecoratorHandler = class {
|
|
|
6342
6355
|
this.extractTemplateOptions = {
|
|
6343
6356
|
enableI18nLegacyMessageIdFormat: this.enableI18nLegacyMessageIdFormat,
|
|
6344
6357
|
i18nNormalizeLineEndingsInICUs: this.i18nNormalizeLineEndingsInICUs,
|
|
6345
|
-
usePoisonedData: this.usePoisonedData
|
|
6346
|
-
enabledBlockTypes: this.enabledBlockTypes
|
|
6358
|
+
usePoisonedData: this.usePoisonedData
|
|
6347
6359
|
};
|
|
6348
6360
|
}
|
|
6349
6361
|
detect(node, decorators) {
|
|
@@ -6414,8 +6426,13 @@ var ComponentDecoratorHandler = class {
|
|
|
6414
6426
|
return {};
|
|
6415
6427
|
}
|
|
6416
6428
|
const { decorator: component, metadata, inputs, outputs, hostDirectives, rawHostDirectives } = directiveResult;
|
|
6417
|
-
const encapsulation = (_a = resolveEnumValue(this.evaluator, component, "encapsulation", "ViewEncapsulation")) != null ? _a :
|
|
6418
|
-
|
|
6429
|
+
const encapsulation = (_a = this.compilationMode !== CompilationMode.LOCAL ? resolveEnumValue(this.evaluator, component, "encapsulation", "ViewEncapsulation") : resolveEncapsulationEnumValueLocally(component.get("encapsulation"))) != null ? _a : ViewEncapsulation2.Emulated;
|
|
6430
|
+
let changeDetection = null;
|
|
6431
|
+
if (this.compilationMode !== CompilationMode.LOCAL) {
|
|
6432
|
+
changeDetection = resolveEnumValue(this.evaluator, component, "changeDetection", "ChangeDetectionStrategy");
|
|
6433
|
+
} else if (component.has("changeDetection")) {
|
|
6434
|
+
changeDetection = new WrappedNodeExpr7(component.get("changeDetection"));
|
|
6435
|
+
}
|
|
6419
6436
|
let animations = null;
|
|
6420
6437
|
let animationTriggerNames = null;
|
|
6421
6438
|
if (component.has("animations")) {
|
|
@@ -6491,8 +6508,7 @@ var ComponentDecoratorHandler = class {
|
|
|
6491
6508
|
template = extractTemplate(node, templateDecl, this.evaluator, this.depTracker, this.resourceLoader, {
|
|
6492
6509
|
enableI18nLegacyMessageIdFormat: this.enableI18nLegacyMessageIdFormat,
|
|
6493
6510
|
i18nNormalizeLineEndingsInICUs: this.i18nNormalizeLineEndingsInICUs,
|
|
6494
|
-
usePoisonedData: this.usePoisonedData
|
|
6495
|
-
enabledBlockTypes: this.enabledBlockTypes
|
|
6511
|
+
usePoisonedData: this.usePoisonedData
|
|
6496
6512
|
}, this.compilationMode);
|
|
6497
6513
|
}
|
|
6498
6514
|
const templateResource = template.declaration.isInline ? { path: null, expression: component.get("template") } : {
|
|
@@ -6524,7 +6540,7 @@ var ComponentDecoratorHandler = class {
|
|
|
6524
6540
|
diagnostics.push(makeResourceNotFoundError(styleUrl.url, styleUrl.nodeForError, resourceType).toDiagnostic());
|
|
6525
6541
|
}
|
|
6526
6542
|
}
|
|
6527
|
-
if (encapsulation ===
|
|
6543
|
+
if (encapsulation === ViewEncapsulation2.ShadowDom && metadata.selector !== null) {
|
|
6528
6544
|
const selectorError = checkCustomElementSelectorForErrors(metadata.selector);
|
|
6529
6545
|
if (selectorError !== null) {
|
|
6530
6546
|
if (diagnostics === void 0) {
|
|
@@ -6569,6 +6585,7 @@ var ComponentDecoratorHandler = class {
|
|
|
6569
6585
|
ngContentSelectors: template.ngContentSelectors
|
|
6570
6586
|
},
|
|
6571
6587
|
encapsulation,
|
|
6588
|
+
changeDetection,
|
|
6572
6589
|
interpolation: (_c = template.interpolationConfig) != null ? _c : DEFAULT_INTERPOLATION_CONFIG2,
|
|
6573
6590
|
styles,
|
|
6574
6591
|
animations,
|
|
@@ -6597,9 +6614,6 @@ var ComponentDecoratorHandler = class {
|
|
|
6597
6614
|
},
|
|
6598
6615
|
diagnostics
|
|
6599
6616
|
};
|
|
6600
|
-
if (changeDetection !== null) {
|
|
6601
|
-
output.analysis.meta.changeDetection = changeDetection;
|
|
6602
|
-
}
|
|
6603
6617
|
return output;
|
|
6604
6618
|
}
|
|
6605
6619
|
symbol(node, analysis) {
|
|
@@ -6796,7 +6810,7 @@ var ComponentDecoratorHandler = class {
|
|
|
6796
6810
|
symbol.usedPipes = Array.from(declarations.values()).filter(isUsedPipe).map(getSemanticReference);
|
|
6797
6811
|
}
|
|
6798
6812
|
const eagerDeclarations = Array.from(declarations.values()).filter((decl) => decl.kind === R3TemplateDependencyKind.NgModule || eagerlyUsed.has(decl.ref.node));
|
|
6799
|
-
this.resolveDeferBlocks(deferBlocks, declarations, data, analysis, eagerlyUsed);
|
|
6813
|
+
this.resolveDeferBlocks(deferBlocks, declarations, data, analysis, eagerlyUsed, bound);
|
|
6800
6814
|
const cyclesFromDirectives = /* @__PURE__ */ new Map();
|
|
6801
6815
|
const cyclesFromPipes = /* @__PURE__ */ new Map();
|
|
6802
6816
|
if (!metadata.isStandalone) {
|
|
@@ -6846,6 +6860,16 @@ var ComponentDecoratorHandler = class {
|
|
|
6846
6860
|
throw new FatalDiagnosticError(ErrorCode.IMPORT_CYCLE_DETECTED, node, "One or more import cycles would need to be created to compile this component, which is not supported by the current compiler configuration.", relatedMessages);
|
|
6847
6861
|
}
|
|
6848
6862
|
}
|
|
6863
|
+
} else {
|
|
6864
|
+
const directivelessBinder = new R3TargetBinder(new SelectorMatcher2());
|
|
6865
|
+
const bound = directivelessBinder.bind({ template: metadata.template.nodes });
|
|
6866
|
+
const deferredBlocks = bound.getDeferBlocks();
|
|
6867
|
+
const triggerElements = /* @__PURE__ */ new Map();
|
|
6868
|
+
for (const block of deferredBlocks) {
|
|
6869
|
+
this.resolveDeferTriggers(block, block.triggers, bound, triggerElements);
|
|
6870
|
+
this.resolveDeferTriggers(block, block.prefetchTriggers, bound, triggerElements);
|
|
6871
|
+
data.deferBlocks.set(block, { deps: [], triggerElements });
|
|
6872
|
+
}
|
|
6849
6873
|
}
|
|
6850
6874
|
if (analysis.resolvedImports !== null && analysis.rawImports !== null) {
|
|
6851
6875
|
const standaloneDiagnostics = validateStandaloneImports(analysis.resolvedImports, analysis.rawImports, this.metaReader, this.scopeReader);
|
|
@@ -6909,8 +6933,8 @@ var ComponentDecoratorHandler = class {
|
|
|
6909
6933
|
return [];
|
|
6910
6934
|
}
|
|
6911
6935
|
const deferrableTypes = /* @__PURE__ */ new Map();
|
|
6912
|
-
for (const [_,
|
|
6913
|
-
for (const deferBlockDep of
|
|
6936
|
+
for (const [_, metadata] of resolution.deferBlocks) {
|
|
6937
|
+
for (const deferBlockDep of metadata.deps) {
|
|
6914
6938
|
const dep = deferBlockDep;
|
|
6915
6939
|
const classDecl = dep.classDeclaration;
|
|
6916
6940
|
const importDecl = (_a = resolution.deferrableDeclToImportDecl.get(classDecl)) != null ? _a : null;
|
|
@@ -6982,12 +7006,13 @@ var ComponentDecoratorHandler = class {
|
|
|
6982
7006
|
}
|
|
6983
7007
|
this.cycleAnalyzer.recordSyntheticImport(origin, imported);
|
|
6984
7008
|
}
|
|
6985
|
-
resolveDeferBlocks(deferBlocks, deferrableDecls, resolutionData, analysisData, eagerlyUsedDecls) {
|
|
7009
|
+
resolveDeferBlocks(deferBlocks, deferrableDecls, resolutionData, analysisData, eagerlyUsedDecls, componentBoundTarget) {
|
|
6986
7010
|
const allDeferredDecls = /* @__PURE__ */ new Set();
|
|
6987
7011
|
for (const [deferBlock, bound] of deferBlocks) {
|
|
6988
7012
|
const usedDirectives = new Set(bound.getEagerlyUsedDirectives().map((d) => d.ref.node));
|
|
6989
7013
|
const usedPipes = new Set(bound.getEagerlyUsedPipes());
|
|
6990
7014
|
const deps = [];
|
|
7015
|
+
const triggerElements = /* @__PURE__ */ new Map();
|
|
6991
7016
|
for (const decl of Array.from(deferrableDecls.values())) {
|
|
6992
7017
|
if (decl.kind === R3TemplateDependencyKind.NgModule) {
|
|
6993
7018
|
continue;
|
|
@@ -7007,10 +7032,13 @@ var ComponentDecoratorHandler = class {
|
|
|
7007
7032
|
});
|
|
7008
7033
|
allDeferredDecls.add(decl.ref.node);
|
|
7009
7034
|
}
|
|
7010
|
-
|
|
7035
|
+
this.resolveDeferTriggers(deferBlock, deferBlock.triggers, componentBoundTarget, triggerElements);
|
|
7036
|
+
this.resolveDeferTriggers(deferBlock, deferBlock.prefetchTriggers, componentBoundTarget, triggerElements);
|
|
7037
|
+
resolutionData.deferBlocks.set(deferBlock, { deps, triggerElements });
|
|
7011
7038
|
}
|
|
7012
7039
|
if (analysisData.meta.isStandalone && analysisData.rawImports !== null && ts24.isArrayLiteralExpression(analysisData.rawImports)) {
|
|
7013
|
-
for (const
|
|
7040
|
+
for (const element of analysisData.rawImports.elements) {
|
|
7041
|
+
const node = tryUnwrapForwardRef(element, this.reflector) || element;
|
|
7014
7042
|
if (!ts24.isIdentifier(node)) {
|
|
7015
7043
|
continue;
|
|
7016
7044
|
}
|
|
@@ -7047,6 +7075,12 @@ var ComponentDecoratorHandler = class {
|
|
|
7047
7075
|
}
|
|
7048
7076
|
}
|
|
7049
7077
|
}
|
|
7078
|
+
resolveDeferTriggers(block, triggers, componentBoundTarget, triggerElements) {
|
|
7079
|
+
Object.keys(triggers).forEach((key) => {
|
|
7080
|
+
const trigger = triggers[key];
|
|
7081
|
+
triggerElements.set(trigger, componentBoundTarget.getDeferredTriggerTarget(block, trigger));
|
|
7082
|
+
});
|
|
7083
|
+
}
|
|
7050
7084
|
};
|
|
7051
7085
|
function validateStandaloneImports(importRefs, importExpr, metaReader, scopeReader) {
|
|
7052
7086
|
const diagnostics = [];
|
|
@@ -7546,4 +7580,4 @@ export {
|
|
|
7546
7580
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7547
7581
|
* found in the LICENSE file at https://angular.io/license
|
|
7548
7582
|
*/
|
|
7549
|
-
//# sourceMappingURL=chunk-
|
|
7583
|
+
//# sourceMappingURL=chunk-I3FLXBLP.js.map
|