@angular/compiler-cli 16.2.0-next.1 → 16.2.0-next.3

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.
Files changed (35) hide show
  1. package/bundles/{chunk-ADNHTL54.js → chunk-DKWZY2MH.js} +6 -5
  2. package/bundles/{chunk-ADNHTL54.js.map → chunk-DKWZY2MH.js.map} +1 -1
  3. package/bundles/{chunk-LVVIYUZC.js → chunk-E72KZKRK.js} +52 -9
  4. package/bundles/chunk-E72KZKRK.js.map +6 -0
  5. package/bundles/{chunk-CWFGODIP.js → chunk-GRJYX2PA.js} +2 -2
  6. package/bundles/{chunk-LOZJLM26.js → chunk-IPC76KA7.js} +14 -1
  7. package/bundles/chunk-IPC76KA7.js.map +6 -0
  8. package/bundles/{chunk-3SPKRPX3.js → chunk-YZ3WOD5G.js} +134 -57
  9. package/bundles/chunk-YZ3WOD5G.js.map +6 -0
  10. package/bundles/index.js +4 -4
  11. package/bundles/linker/babel/index.js +5 -2
  12. package/bundles/linker/babel/index.js.map +1 -1
  13. package/bundles/linker/index.js +2 -2
  14. package/bundles/private/migrations.js +2 -2
  15. package/bundles/src/bin/ng_xi18n.js +4 -4
  16. package/bundles/src/bin/ngc.js +4 -4
  17. package/bundles_metadata.json +1 -1
  18. package/linker/babel/src/ast/babel_ast_factory.d.ts +1 -0
  19. package/package.json +2 -2
  20. package/src/ngtsc/annotations/component/src/handler.d.ts +5 -2
  21. package/src/ngtsc/annotations/component/src/resources.d.ts +1 -0
  22. package/src/ngtsc/annotations/directive/src/handler.d.ts +1 -0
  23. package/src/ngtsc/annotations/ng_module/src/handler.d.ts +5 -2
  24. package/src/ngtsc/annotations/src/injectable.d.ts +1 -0
  25. package/src/ngtsc/annotations/src/pipe.d.ts +1 -0
  26. package/src/ngtsc/core/src/compiler.d.ts +1 -0
  27. package/src/ngtsc/transform/src/api.d.ts +7 -2
  28. package/src/ngtsc/transform/src/compilation.d.ts +2 -1
  29. package/src/ngtsc/translator/src/api/ast_factory.d.ts +7 -0
  30. package/src/ngtsc/translator/src/translator.d.ts +1 -0
  31. package/src/ngtsc/translator/src/typescript_ast_factory.d.ts +1 -0
  32. package/bundles/chunk-3SPKRPX3.js.map +0 -6
  33. package/bundles/chunk-LOZJLM26.js.map +0 -6
  34. package/bundles/chunk-LVVIYUZC.js.map +0 -6
  35. /package/bundles/{chunk-CWFGODIP.js.map → chunk-GRJYX2PA.js.map} +0 -0
@@ -15,7 +15,7 @@ import {
15
15
  translateExpression,
16
16
  translateStatement,
17
17
  translateType
18
- } from "./chunk-LOZJLM26.js";
18
+ } from "./chunk-IPC76KA7.js";
19
19
  import {
20
20
  ErrorCode,
21
21
  FatalDiagnosticError,
@@ -3398,7 +3398,7 @@ var TraitCompiler = class {
3398
3398
  return void 0;
3399
3399
  }
3400
3400
  const promises = [];
3401
- const priorWork = this.incrementalBuild.priorAnalysisFor(sf);
3401
+ const priorWork = this.compilationMode !== CompilationMode.LOCAL ? this.incrementalBuild.priorAnalysisFor(sf) : null;
3402
3402
  if (priorWork !== null) {
3403
3403
  this.perf.eventCount(PerfEvent.SourceFileReuseAnalysis);
3404
3404
  if (priorWork.length > 0) {
@@ -3594,13 +3594,16 @@ var TraitCompiler = class {
3594
3594
  }
3595
3595
  }
3596
3596
  const symbol = this.makeSymbolForTrait(trait.handler, clazz, (_a = result.analysis) != null ? _a : null);
3597
- if (result.analysis !== void 0 && trait.handler.register !== void 0) {
3597
+ if (this.compilationMode !== CompilationMode.LOCAL && result.analysis !== void 0 && trait.handler.register !== void 0) {
3598
3598
  trait.handler.register(clazz, result.analysis);
3599
3599
  }
3600
3600
  trait = trait.toAnalyzed((_b = result.analysis) != null ? _b : null, (_c = result.diagnostics) != null ? _c : null, symbol);
3601
3601
  }
3602
3602
  resolve() {
3603
3603
  var _a, _b;
3604
+ if (this.compilationMode === CompilationMode.LOCAL) {
3605
+ return;
3606
+ }
3604
3607
  const classes = this.classes.keys();
3605
3608
  for (const clazz of classes) {
3606
3609
  const record = this.classes.get(clazz);
@@ -3665,6 +3668,9 @@ var TraitCompiler = class {
3665
3668
  }
3666
3669
  }
3667
3670
  extendedTemplateCheck(sf, extendedTemplateChecker) {
3671
+ if (this.compilationMode === CompilationMode.LOCAL) {
3672
+ return [];
3673
+ }
3668
3674
  const classes = this.fileToClasses.get(sf);
3669
3675
  if (classes === void 0) {
3670
3676
  return [];
@@ -3715,7 +3721,7 @@ var TraitCompiler = class {
3715
3721
  }
3716
3722
  }
3717
3723
  updateResources(clazz) {
3718
- if (!this.reflector.isClass(clazz) || !this.classes.has(clazz)) {
3724
+ if (this.compilationMode === CompilationMode.LOCAL || !this.reflector.isClass(clazz) || !this.classes.has(clazz)) {
3719
3725
  return;
3720
3726
  }
3721
3727
  const record = this.classes.get(clazz);
@@ -3734,14 +3740,21 @@ var TraitCompiler = class {
3734
3740
  const record = this.classes.get(original);
3735
3741
  let res = [];
3736
3742
  for (const trait of record.traits) {
3737
- if (trait.state !== TraitState.Resolved || containsErrors(trait.analysisDiagnostics) || containsErrors(trait.resolveDiagnostics)) {
3738
- continue;
3739
- }
3740
3743
  let compileRes;
3741
- if (this.compilationMode === CompilationMode.PARTIAL && trait.handler.compilePartial !== void 0) {
3742
- compileRes = trait.handler.compilePartial(clazz, trait.analysis, trait.resolution);
3744
+ if (this.compilationMode === CompilationMode.LOCAL) {
3745
+ if (trait.state !== TraitState.Analyzed || trait.analysis === null || containsErrors(trait.analysisDiagnostics)) {
3746
+ continue;
3747
+ }
3748
+ compileRes = trait.handler.compileLocal(clazz, trait.analysis, constantPool);
3743
3749
  } else {
3744
- compileRes = trait.handler.compileFull(clazz, trait.analysis, trait.resolution, constantPool);
3750
+ if (trait.state !== TraitState.Resolved || containsErrors(trait.analysisDiagnostics) || containsErrors(trait.resolveDiagnostics)) {
3751
+ continue;
3752
+ }
3753
+ if (this.compilationMode === CompilationMode.PARTIAL && trait.handler.compilePartial !== void 0) {
3754
+ compileRes = trait.handler.compilePartial(clazz, trait.analysis, trait.resolution);
3755
+ } else {
3756
+ compileRes = trait.handler.compileFull(clazz, trait.analysis, trait.resolution, constantPool);
3757
+ }
3745
3758
  }
3746
3759
  const compileMatchRes = compileRes;
3747
3760
  if (Array.isArray(compileMatchRes)) {
@@ -3765,7 +3778,7 @@ var TraitCompiler = class {
3765
3778
  const record = this.classes.get(original);
3766
3779
  const decorators = [];
3767
3780
  for (const trait of record.traits) {
3768
- if (trait.state !== TraitState.Resolved) {
3781
+ if (this.compilationMode !== CompilationMode.LOCAL && trait.state !== TraitState.Resolved) {
3769
3782
  continue;
3770
3783
  }
3771
3784
  if (trait.detected.trigger !== null && ts15.isDecorator(trait.detected.trigger)) {
@@ -5061,6 +5074,13 @@ var DirectiveDecoratorHandler = class {
5061
5074
  const classMetadata = analysis.classMetadata !== null ? compileDeclareClassMetadata(analysis.classMetadata).toStmt() : null;
5062
5075
  return compileResults(fac, def, classMetadata, "\u0275dir", inputTransformFields);
5063
5076
  }
5077
+ compileLocal(node, analysis, pool) {
5078
+ const fac = compileNgFactoryDefField(toFactoryMetadata(analysis.meta, FactoryTarget.Directive));
5079
+ const def = compileDirectiveFromMetadata(analysis.meta, pool, makeBindingParser());
5080
+ const inputTransformFields = compileInputTransformFields(analysis.inputs);
5081
+ const classMetadata = analysis.classMetadata !== null ? compileClassMetadata(analysis.classMetadata).toStmt() : null;
5082
+ return compileResults(fac, def, classMetadata, "\u0275dir", inputTransformFields);
5083
+ }
5064
5084
  findClassFieldWithAngularFeatures(node) {
5065
5085
  return this.reflector.getMembersOfClass(node).find((member) => {
5066
5086
  if (!member.isStatic && member.kind === ClassMemberKind.Method && LIFECYCLE_HOOKS.has(member.name)) {
@@ -5075,7 +5095,7 @@ var DirectiveDecoratorHandler = class {
5075
5095
  };
5076
5096
 
5077
5097
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
5078
- import { compileClassMetadata as compileClassMetadata2, compileDeclareClassMetadata as compileDeclareClassMetadata2, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileInjector, compileNgModule, ExternalExpr as ExternalExpr5, FactoryTarget as FactoryTarget2, FunctionExpr as FunctionExpr2, InvokeFunctionExpr, LiteralArrayExpr as LiteralArrayExpr2, R3Identifiers, R3SelectorScopeMode, ReturnStatement as ReturnStatement2, WrappedNodeExpr as WrappedNodeExpr6 } from "@angular/compiler";
5098
+ import { compileClassMetadata as compileClassMetadata2, compileDeclareClassMetadata as compileDeclareClassMetadata2, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileInjector, compileNgModule, ExternalExpr as ExternalExpr5, FactoryTarget as FactoryTarget2, FunctionExpr as FunctionExpr2, InvokeFunctionExpr, LiteralArrayExpr as LiteralArrayExpr2, R3Identifiers, R3NgModuleMetadataKind, R3SelectorScopeMode, ReturnStatement as ReturnStatement2, WrappedNodeExpr as WrappedNodeExpr6 } from "@angular/compiler";
5079
5099
  import ts22 from "typescript";
5080
5100
 
5081
5101
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/module_with_providers.mjs
@@ -5212,7 +5232,7 @@ var NgModuleSymbol = class extends SemanticSymbol {
5212
5232
  }
5213
5233
  };
5214
5234
  var NgModuleDecoratorHandler = class {
5215
- constructor(reflector, evaluator, metaReader, metaRegistry, scopeRegistry, referencesRegistry, exportedProviderStatusResolver, semanticDepGraphUpdater, isCore, refEmitter, annotateForClosureCompiler, onlyPublishPublicTypings, injectableRegistry, perf, includeClassMetadata) {
5235
+ constructor(reflector, evaluator, metaReader, metaRegistry, scopeRegistry, referencesRegistry, exportedProviderStatusResolver, semanticDepGraphUpdater, isCore, refEmitter, annotateForClosureCompiler, onlyPublishPublicTypings, injectableRegistry, perf, includeClassMetadata, includeSelectorScope, compilationMode) {
5216
5236
  this.reflector = reflector;
5217
5237
  this.evaluator = evaluator;
5218
5238
  this.metaReader = metaReader;
@@ -5228,6 +5248,8 @@ var NgModuleDecoratorHandler = class {
5228
5248
  this.injectableRegistry = injectableRegistry;
5229
5249
  this.perf = perf;
5230
5250
  this.includeClassMetadata = includeClassMetadata;
5251
+ this.includeSelectorScope = includeSelectorScope;
5252
+ this.compilationMode = compilationMode;
5231
5253
  this.precedence = HandlerPrecedence.PRIMARY;
5232
5254
  this.name = "NgModuleDecoratorHandler";
5233
5255
  }
@@ -5247,7 +5269,7 @@ var NgModuleDecoratorHandler = class {
5247
5269
  }
5248
5270
  }
5249
5271
  analyze(node, decorator) {
5250
- var _a;
5272
+ var _a, _b, _c, _d, _e;
5251
5273
  this.perf.eventCount(PerfEvent.AnalyzeNgModule);
5252
5274
  const name = node.name.text;
5253
5275
  if (decorator.args === null || decorator.args.length > 1) {
@@ -5267,9 +5289,8 @@ var NgModuleDecoratorHandler = class {
5267
5289
  ]);
5268
5290
  const diagnostics = [];
5269
5291
  let declarationRefs = [];
5270
- let rawDeclarations = null;
5271
- if (ngModule.has("declarations")) {
5272
- rawDeclarations = ngModule.get("declarations");
5292
+ const rawDeclarations = (_a = ngModule.get("declarations")) != null ? _a : null;
5293
+ if (this.compilationMode !== CompilationMode.LOCAL && rawDeclarations !== null) {
5273
5294
  const declarationMeta = this.evaluator.evaluate(rawDeclarations, forwardRefResolver);
5274
5295
  declarationRefs = this.resolveTypeList(rawDeclarations, declarationMeta, name, "declarations", 0).references;
5275
5296
  for (const ref of declarationRefs) {
@@ -5283,33 +5304,31 @@ var NgModuleDecoratorHandler = class {
5283
5304
  return { diagnostics };
5284
5305
  }
5285
5306
  let importRefs = [];
5286
- let rawImports = null;
5287
- if (ngModule.has("imports")) {
5288
- rawImports = ngModule.get("imports");
5307
+ let rawImports = (_b = ngModule.get("imports")) != null ? _b : null;
5308
+ if (this.compilationMode !== CompilationMode.LOCAL && rawImports !== null) {
5289
5309
  const importsMeta = this.evaluator.evaluate(rawImports, moduleResolvers);
5290
5310
  importRefs = this.resolveTypeList(rawImports, importsMeta, name, "imports", 0).references;
5291
5311
  }
5292
5312
  let exportRefs = [];
5293
- let rawExports = null;
5294
- if (ngModule.has("exports")) {
5295
- rawExports = ngModule.get("exports");
5313
+ const rawExports = (_c = ngModule.get("exports")) != null ? _c : null;
5314
+ if (this.compilationMode !== CompilationMode.LOCAL && rawExports !== null) {
5296
5315
  const exportsMeta = this.evaluator.evaluate(rawExports, moduleResolvers);
5297
5316
  exportRefs = this.resolveTypeList(rawExports, exportsMeta, name, "exports", 0).references;
5298
5317
  this.referencesRegistry.add(node, ...exportRefs);
5299
5318
  }
5300
5319
  let bootstrapRefs = [];
5301
- if (ngModule.has("bootstrap")) {
5302
- const expr = ngModule.get("bootstrap");
5303
- const bootstrapMeta = this.evaluator.evaluate(expr, forwardRefResolver);
5304
- bootstrapRefs = this.resolveTypeList(expr, bootstrapMeta, name, "bootstrap", 0).references;
5320
+ const rawBootstrap = (_d = ngModule.get("bootstrap")) != null ? _d : null;
5321
+ if (this.compilationMode !== CompilationMode.LOCAL && rawBootstrap !== null) {
5322
+ const bootstrapMeta = this.evaluator.evaluate(rawBootstrap, forwardRefResolver);
5323
+ bootstrapRefs = this.resolveTypeList(rawBootstrap, bootstrapMeta, name, "bootstrap", 0).references;
5305
5324
  for (const ref of bootstrapRefs) {
5306
5325
  const dirMeta = this.metaReader.getDirectiveMetadata(ref);
5307
5326
  if (dirMeta == null ? void 0 : dirMeta.isStandalone) {
5308
- diagnostics.push(makeStandaloneBootstrapDiagnostic(node, ref, expr));
5327
+ diagnostics.push(makeStandaloneBootstrapDiagnostic(node, ref, rawBootstrap));
5309
5328
  }
5310
5329
  }
5311
5330
  }
5312
- const schemas = ngModule.has("schemas") ? extractSchemas(ngModule.get("schemas"), this.evaluator, "NgModule") : [];
5331
+ const schemas = this.compilationMode !== CompilationMode.LOCAL && ngModule.has("schemas") ? extractSchemas(ngModule.get("schemas"), this.evaluator, "NgModule") : [];
5313
5332
  let id = null;
5314
5333
  if (ngModule.has("id")) {
5315
5334
  const idExpr = ngModule.get("id");
@@ -5338,26 +5357,42 @@ var NgModuleDecoratorHandler = class {
5338
5357
  const isForwardReference = (ref) => isExpressionForwardReference(ref.value, node.name, valueContext);
5339
5358
  const containsForwardDecls = bootstrap.some(isForwardReference) || declarations.some(isForwardReference) || imports.some(isForwardReference) || exports.some(isForwardReference);
5340
5359
  const type = wrapTypeReference(this.reflector, node);
5341
- const ngModuleMetadata = {
5342
- type,
5343
- bootstrap,
5344
- declarations,
5345
- publicDeclarationTypes: this.onlyPublishPublicTypings ? exportedDeclarations : null,
5346
- exports,
5347
- imports,
5348
- includeImportTypes: !this.onlyPublishPublicTypings,
5349
- containsForwardDecls,
5350
- id,
5351
- selectorScopeMode: R3SelectorScopeMode.SideEffect,
5352
- schemas: []
5353
- };
5360
+ let ngModuleMetadata;
5361
+ if (this.compilationMode === CompilationMode.LOCAL) {
5362
+ ngModuleMetadata = {
5363
+ kind: R3NgModuleMetadataKind.Local,
5364
+ type,
5365
+ bootstrapExpression: rawBootstrap ? new WrappedNodeExpr6(rawBootstrap) : null,
5366
+ declarationsExpression: rawDeclarations ? new WrappedNodeExpr6(rawDeclarations) : null,
5367
+ exportsExpression: rawExports ? new WrappedNodeExpr6(rawExports) : null,
5368
+ importsExpression: rawImports ? new WrappedNodeExpr6(rawImports) : null,
5369
+ id,
5370
+ selectorScopeMode: R3SelectorScopeMode.SideEffect,
5371
+ schemas: []
5372
+ };
5373
+ } else {
5374
+ ngModuleMetadata = {
5375
+ kind: R3NgModuleMetadataKind.Global,
5376
+ type,
5377
+ bootstrap,
5378
+ declarations,
5379
+ publicDeclarationTypes: this.onlyPublishPublicTypings ? exportedDeclarations : null,
5380
+ exports,
5381
+ imports,
5382
+ includeImportTypes: !this.onlyPublishPublicTypings,
5383
+ containsForwardDecls,
5384
+ id,
5385
+ selectorScopeMode: this.includeSelectorScope ? R3SelectorScopeMode.SideEffect : R3SelectorScopeMode.Omit,
5386
+ schemas: []
5387
+ };
5388
+ }
5354
5389
  const rawProviders = ngModule.has("providers") ? ngModule.get("providers") : null;
5355
5390
  let wrappedProviders = null;
5356
5391
  if (rawProviders !== null && (!ts22.isArrayLiteralExpression(rawProviders) || rawProviders.elements.length > 0)) {
5357
5392
  wrappedProviders = new WrappedNodeExpr6(this.annotateForClosureCompiler ? wrapFunctionExpressionsInParens(rawProviders) : rawProviders);
5358
5393
  }
5359
5394
  const topLevelImports = [];
5360
- if (ngModule.has("imports")) {
5395
+ if (this.compilationMode !== CompilationMode.LOCAL && ngModule.has("imports")) {
5361
5396
  const rawImports2 = unwrapExpression(ngModule.get("imports"));
5362
5397
  let topLevelExpressions = [];
5363
5398
  if (ts22.isArrayLiteralExpression(rawImports2)) {
@@ -5416,7 +5451,7 @@ var NgModuleDecoratorHandler = class {
5416
5451
  classMetadata: this.includeClassMetadata ? extractClassMetadata(node, this.reflector, this.isCore, this.annotateForClosureCompiler) : null,
5417
5452
  factorySymbolName: node.name.text,
5418
5453
  remoteScopesMayRequireCycleProtection,
5419
- decorator: (_a = decorator == null ? void 0 : decorator.node) != null ? _a : null
5454
+ decorator: (_e = decorator == null ? void 0 : decorator.node) != null ? _e : null
5420
5455
  }
5421
5456
  };
5422
5457
  }
@@ -5557,6 +5592,19 @@ var NgModuleDecoratorHandler = class {
5557
5592
  this.insertMetadataStatement(ngModuleDef.statements, metadata);
5558
5593
  return this.compileNgModule(factoryFn, injectorDef, ngModuleDef);
5559
5594
  }
5595
+ compileLocal(node, { inj, mod, fac, classMetadata, declarations, remoteScopesMayRequireCycleProtection }) {
5596
+ const factoryFn = compileNgFactoryDefField(fac);
5597
+ const ngInjectorDef = compileInjector({
5598
+ ...inj,
5599
+ imports: []
5600
+ });
5601
+ const ngModuleDef = compileNgModule(mod);
5602
+ const statements = ngModuleDef.statements;
5603
+ const metadata = classMetadata !== null ? compileClassMetadata2(classMetadata) : null;
5604
+ this.insertMetadataStatement(statements, metadata);
5605
+ this.appendRemoteScopingStatements(statements, node, declarations, remoteScopesMayRequireCycleProtection);
5606
+ return this.compileNgModule(factoryFn, ngInjectorDef, ngModuleDef);
5607
+ }
5560
5608
  insertMetadataStatement(ngModuleStatements, metadata) {
5561
5609
  if (metadata !== null) {
5562
5610
  ngModuleStatements.unshift(metadata.toStmt());
@@ -5773,7 +5821,8 @@ function parseExtractedTemplate(template, sourceStr, sourceParseRange, escapedSt
5773
5821
  escapedString,
5774
5822
  enableI18nLegacyMessageIdFormat: options.enableI18nLegacyMessageIdFormat,
5775
5823
  i18nNormalizeLineEndingsInICUs,
5776
- alwaysAttemptHtmlToR3AstConversion: options.usePoisonedData
5824
+ alwaysAttemptHtmlToR3AstConversion: options.usePoisonedData,
5825
+ enabledBlockTypes: options.enabledBlockTypes
5777
5826
  });
5778
5827
  const { nodes: diagNodes } = parseTemplate(sourceStr, sourceMapUrl != null ? sourceMapUrl : "", {
5779
5828
  preserveWhitespaces: true,
@@ -6121,7 +6170,7 @@ function isLikelyModuleWithProviders(value) {
6121
6170
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
6122
6171
  var EMPTY_ARRAY2 = [];
6123
6172
  var ComponentDecoratorHandler = class {
6124
- 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) {
6173
+ constructor(reflector, evaluator, metaRegistry, metaReader, scopeReader, dtsScopeReader, scopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, strictCtorDeps, resourceLoader, rootDirs, defaultPreserveWhitespaces, i18nUseExternalIds, enableI18nLegacyMessageIdFormat, usePoisonedData, i18nNormalizeLineEndingsInICUs, enabledBlockTypes, moduleResolver, cycleAnalyzer, cycleHandlingStrategy, refEmitter, referencesRegistry, depTracker, injectableRegistry, semanticDepGraphUpdater, annotateForClosureCompiler, perf, hostDirectivesResolver, includeClassMetadata, compilationMode) {
6125
6174
  this.reflector = reflector;
6126
6175
  this.evaluator = evaluator;
6127
6176
  this.metaRegistry = metaRegistry;
@@ -6140,6 +6189,7 @@ var ComponentDecoratorHandler = class {
6140
6189
  this.enableI18nLegacyMessageIdFormat = enableI18nLegacyMessageIdFormat;
6141
6190
  this.usePoisonedData = usePoisonedData;
6142
6191
  this.i18nNormalizeLineEndingsInICUs = i18nNormalizeLineEndingsInICUs;
6192
+ this.enabledBlockTypes = enabledBlockTypes;
6143
6193
  this.moduleResolver = moduleResolver;
6144
6194
  this.cycleAnalyzer = cycleAnalyzer;
6145
6195
  this.cycleHandlingStrategy = cycleHandlingStrategy;
@@ -6152,6 +6202,7 @@ var ComponentDecoratorHandler = class {
6152
6202
  this.perf = perf;
6153
6203
  this.hostDirectivesResolver = hostDirectivesResolver;
6154
6204
  this.includeClassMetadata = includeClassMetadata;
6205
+ this.compilationMode = compilationMode;
6155
6206
  this.literalCache = /* @__PURE__ */ new Map();
6156
6207
  this.elementSchemaRegistry = new DomElementSchemaRegistry();
6157
6208
  this.preanalyzeTemplateCache = /* @__PURE__ */ new Map();
@@ -6161,7 +6212,8 @@ var ComponentDecoratorHandler = class {
6161
6212
  this.extractTemplateOptions = {
6162
6213
  enableI18nLegacyMessageIdFormat: this.enableI18nLegacyMessageIdFormat,
6163
6214
  i18nNormalizeLineEndingsInICUs: this.i18nNormalizeLineEndingsInICUs,
6164
- usePoisonedData: this.usePoisonedData
6215
+ usePoisonedData: this.usePoisonedData,
6216
+ enabledBlockTypes: this.enabledBlockTypes
6165
6217
  };
6166
6218
  }
6167
6219
  detect(node, decorators) {
@@ -6221,7 +6273,7 @@ var ComponentDecoratorHandler = class {
6221
6273
  ]).then(() => void 0);
6222
6274
  }
6223
6275
  analyze(node, decorator) {
6224
- var _a, _b, _c;
6276
+ var _a, _b, _c, _d;
6225
6277
  this.perf.eventCount(PerfEvent.AnalyzeComponent);
6226
6278
  const containingFile = node.getSourceFile().fileName;
6227
6279
  this.literalCache.delete(decorator);
@@ -6263,15 +6315,15 @@ var ComponentDecoratorHandler = class {
6263
6315
  providersRequiringFactory = resolveProvidersRequiringFactory(component.get("providers"), this.reflector, this.evaluator);
6264
6316
  }
6265
6317
  let resolvedImports = null;
6266
- let rawImports = null;
6267
- if (component.has("imports") && !metadata.isStandalone) {
6318
+ let rawImports = (_b = component.get("imports")) != null ? _b : null;
6319
+ if (rawImports && !metadata.isStandalone) {
6268
6320
  if (diagnostics === void 0) {
6269
6321
  diagnostics = [];
6270
6322
  }
6271
6323
  diagnostics.push(makeDiagnostic(ErrorCode.COMPONENT_NOT_STANDALONE, component.get("imports"), `'imports' is only valid on a component that is standalone.`, [makeRelatedInformation(node.name, `Did you forget to add 'standalone: true' to this @Component?`)]));
6272
6324
  isPoisoned = true;
6273
- } else if (component.has("imports")) {
6274
- const expr = component.get("imports");
6325
+ } else if (this.compilationMode !== CompilationMode.LOCAL && rawImports) {
6326
+ const expr = rawImports;
6275
6327
  const importResolvers = combineResolvers([
6276
6328
  createModuleWithProvidersResolver(this.reflector, this.isCore),
6277
6329
  forwardRefResolver
@@ -6294,7 +6346,7 @@ var ComponentDecoratorHandler = class {
6294
6346
  diagnostics = [];
6295
6347
  }
6296
6348
  diagnostics.push(makeDiagnostic(ErrorCode.COMPONENT_NOT_STANDALONE, component.get("schemas"), `'schemas' is only valid on a component that is standalone.`));
6297
- } else if (component.has("schemas")) {
6349
+ } else if (this.compilationMode !== CompilationMode.LOCAL && component.has("schemas")) {
6298
6350
  schemas = extractSchemas(component.get("schemas"), this.evaluator, "Component");
6299
6351
  } else if (metadata.isStandalone) {
6300
6352
  schemas = [];
@@ -6309,7 +6361,8 @@ var ComponentDecoratorHandler = class {
6309
6361
  template = extractTemplate(node, templateDecl, this.evaluator, this.depTracker, this.resourceLoader, {
6310
6362
  enableI18nLegacyMessageIdFormat: this.enableI18nLegacyMessageIdFormat,
6311
6363
  i18nNormalizeLineEndingsInICUs: this.i18nNormalizeLineEndingsInICUs,
6312
- usePoisonedData: this.usePoisonedData
6364
+ usePoisonedData: this.usePoisonedData,
6365
+ enabledBlockTypes: this.enabledBlockTypes
6313
6366
  });
6314
6367
  }
6315
6368
  const templateResource = template.declaration.isInline ? { path: null, expression: component.get("template") } : {
@@ -6386,7 +6439,7 @@ var ComponentDecoratorHandler = class {
6386
6439
  ngContentSelectors: template.ngContentSelectors
6387
6440
  },
6388
6441
  encapsulation,
6389
- interpolation: (_b = template.interpolationConfig) != null ? _b : DEFAULT_INTERPOLATION_CONFIG2,
6442
+ interpolation: (_c = template.interpolationConfig) != null ? _c : DEFAULT_INTERPOLATION_CONFIG2,
6390
6443
  styles,
6391
6444
  animations,
6392
6445
  viewProviders: wrappedViewProviders,
@@ -6409,7 +6462,7 @@ var ComponentDecoratorHandler = class {
6409
6462
  rawImports,
6410
6463
  resolvedImports,
6411
6464
  schemas,
6412
- decorator: (_c = decorator == null ? void 0 : decorator.node) != null ? _c : null
6465
+ decorator: (_d = decorator == null ? void 0 : decorator.node) != null ? _d : null
6413
6466
  },
6414
6467
  diagnostics
6415
6468
  };
@@ -6730,6 +6783,21 @@ var ComponentDecoratorHandler = class {
6730
6783
  const classMetadata = analysis.classMetadata !== null ? compileDeclareClassMetadata3(analysis.classMetadata).toStmt() : null;
6731
6784
  return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields);
6732
6785
  }
6786
+ compileLocal(node, analysis, pool) {
6787
+ if (analysis.template.errors !== null && analysis.template.errors.length > 0) {
6788
+ return [];
6789
+ }
6790
+ const meta = {
6791
+ ...analysis.meta,
6792
+ declarationListEmitMode: 0,
6793
+ declarations: []
6794
+ };
6795
+ const fac = compileNgFactoryDefField(toFactoryMetadata(meta, FactoryTarget3.Component));
6796
+ const def = compileComponentFromMetadata(meta, pool, makeBindingParser2());
6797
+ const inputTransformFields = compileInputTransformFields(analysis.inputs);
6798
+ const classMetadata = analysis.classMetadata !== null ? compileClassMetadata3(analysis.classMetadata).toStmt() : null;
6799
+ return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields);
6800
+ }
6733
6801
  _checkForCyclicImport(importedFile, expr, origin) {
6734
6802
  const imported = resolveImportedFile(this.moduleResolver, importedFile, expr, origin);
6735
6803
  if (imported === null) {
@@ -6840,6 +6908,9 @@ var InjectableDecoratorHandler = class {
6840
6908
  compilePartial(node, analysis) {
6841
6909
  return this.compile(compileDeclareFactory, compileDeclareInjectableFromMetadata, compileDeclareClassMetadata4, node, analysis);
6842
6910
  }
6911
+ compileLocal(node, analysis) {
6912
+ return this.compile(compileNgFactoryDefField, (meta) => compileInjectable(meta, false), compileClassMetadata4, node, analysis);
6913
+ }
6843
6914
  compile(compileFactoryFn, compileInjectableFn, compileClassMetadataFn, node, analysis) {
6844
6915
  const results = [];
6845
6916
  if (analysis.needsFactory) {
@@ -7130,6 +7201,12 @@ var PipeDecoratorHandler = class {
7130
7201
  const classMetadata = analysis.classMetadata !== null ? compileDeclareClassMetadata5(analysis.classMetadata).toStmt() : null;
7131
7202
  return compileResults(fac, def, classMetadata, "\u0275pipe", null);
7132
7203
  }
7204
+ compileLocal(node, analysis) {
7205
+ const fac = compileNgFactoryDefField(toFactoryMetadata(analysis.meta, FactoryTarget5.Pipe));
7206
+ const def = compilePipeFromMetadata(analysis.meta);
7207
+ const classMetadata = analysis.classMetadata !== null ? compileClassMetadata5(analysis.classMetadata).toStmt() : null;
7208
+ return compileResults(fac, def, classMetadata, "\u0275pipe", null);
7209
+ }
7133
7210
  };
7134
7211
 
7135
7212
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/checker.mjs
@@ -7226,4 +7303,4 @@ export {
7226
7303
  * Use of this source code is governed by an MIT-style license that can be
7227
7304
  * found in the LICENSE file at https://angular.io/license
7228
7305
  */
7229
- //# sourceMappingURL=chunk-3SPKRPX3.js.map
7306
+ //# sourceMappingURL=chunk-YZ3WOD5G.js.map