@angular/compiler 18.0.0-next.3 → 18.0.0-next.4

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.
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Angular v18.0.0-next.3
3
- * (c) 2010-2022 Google LLC. https://angular.io/
2
+ * @license Angular v18.0.0-next.4
3
+ * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
@@ -2662,10 +2662,6 @@ class Identifiers {
2662
2662
  name: 'ɵɵgetInheritedFactory',
2663
2663
  moduleName: CORE,
2664
2664
  }; }
2665
- static { this.InputFlags = {
2666
- name: 'ɵɵInputFlags',
2667
- moduleName: CORE,
2668
- }; }
2669
2665
  // sanitization-related functions
2670
2666
  static { this.sanitizeHtml = { name: 'ɵɵsanitizeHtml', moduleName: CORE }; }
2671
2667
  static { this.sanitizeStyle = { name: 'ɵɵsanitizeStyle', moduleName: CORE }; }
@@ -5638,19 +5634,19 @@ function conditionallyCreateDirectiveBindingLiteral(map, forInputs) {
5638
5634
  publicName = value.bindingPropertyName;
5639
5635
  const differentDeclaringName = publicName !== declaredName;
5640
5636
  const hasDecoratorInputTransform = value.transformFunction !== null;
5637
+ let flags = InputFlags.None;
5641
5638
  // Build up input flags
5642
- let flags = null;
5643
5639
  if (value.isSignal) {
5644
- flags = bitwiseOrInputFlagsExpr(InputFlags.SignalBased, flags);
5640
+ flags |= InputFlags.SignalBased;
5645
5641
  }
5646
5642
  if (hasDecoratorInputTransform) {
5647
- flags = bitwiseOrInputFlagsExpr(InputFlags.HasDecoratorInputTransform, flags);
5643
+ flags |= InputFlags.HasDecoratorInputTransform;
5648
5644
  }
5649
5645
  // Inputs, compared to outputs, will track their declared name (for `ngOnChanges`), support
5650
5646
  // decorator input transform functions, or store flag information if there is any.
5651
- if (forInputs && (differentDeclaringName || hasDecoratorInputTransform || flags !== null)) {
5652
- const flagsExpr = flags ?? importExpr(Identifiers.InputFlags).prop(InputFlags[InputFlags.None]);
5653
- const result = [flagsExpr, asLiteral(publicName)];
5647
+ if (forInputs &&
5648
+ (differentDeclaringName || hasDecoratorInputTransform || flags !== InputFlags.None)) {
5649
+ const result = [literal(flags), asLiteral(publicName)];
5654
5650
  if (differentDeclaringName || hasDecoratorInputTransform) {
5655
5651
  result.push(asLiteral(declaredName));
5656
5652
  if (hasDecoratorInputTransform) {
@@ -5671,26 +5667,6 @@ function conditionallyCreateDirectiveBindingLiteral(map, forInputs) {
5671
5667
  };
5672
5668
  }));
5673
5669
  }
5674
- /** Gets an output AST expression referencing the given flag. */
5675
- function getInputFlagExpr(flag) {
5676
- return importExpr(Identifiers.InputFlags).prop(InputFlags[flag]);
5677
- }
5678
- /** Combines a given input flag with an existing flag expression, if present. */
5679
- function bitwiseOrInputFlagsExpr(flag, expr) {
5680
- if (expr === null) {
5681
- return getInputFlagExpr(flag);
5682
- }
5683
- return getInputFlagExpr(flag).bitwiseOr(expr);
5684
- }
5685
- /**
5686
- * Remove trailing null nodes as they are implied.
5687
- */
5688
- function trimTrailingNulls(parameters) {
5689
- while (isNull(parameters[parameters.length - 1])) {
5690
- parameters.pop();
5691
- }
5692
- return parameters;
5693
- }
5694
5670
  /**
5695
5671
  * A representation for an object literal used during codegen of definition objects. The generic
5696
5672
  * type `T` allows to reference a documented type of the generated structure, such that the
@@ -28644,7 +28620,7 @@ function publishFacade(global) {
28644
28620
  * @description
28645
28621
  * Entry point for all public APIs of the compiler package.
28646
28622
  */
28647
- const VERSION = new Version('18.0.0-next.3');
28623
+ const VERSION = new Version('18.0.0-next.4');
28648
28624
 
28649
28625
  class CompilerConfig {
28650
28626
  constructor({ defaultEncapsulation = ViewEncapsulation.Emulated, preserveWhitespaces, strictInjectionParameters } = {}) {
@@ -30229,7 +30205,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
30229
30205
  function compileDeclareClassMetadata(metadata) {
30230
30206
  const definitionMap = new DefinitionMap();
30231
30207
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
30232
- definitionMap.set('version', literal('18.0.0-next.3'));
30208
+ definitionMap.set('version', literal('18.0.0-next.4'));
30233
30209
  definitionMap.set('ngImport', importExpr(Identifiers.core));
30234
30210
  definitionMap.set('type', metadata.type);
30235
30211
  definitionMap.set('decorators', metadata.decorators);
@@ -30247,7 +30223,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
30247
30223
  callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
30248
30224
  callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
30249
30225
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
30250
- definitionMap.set('version', literal('18.0.0-next.3'));
30226
+ definitionMap.set('version', literal('18.0.0-next.4'));
30251
30227
  definitionMap.set('ngImport', importExpr(Identifiers.core));
30252
30228
  definitionMap.set('type', metadata.type);
30253
30229
  definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
@@ -30342,7 +30318,7 @@ function createDirectiveDefinitionMap(meta) {
30342
30318
  const definitionMap = new DefinitionMap();
30343
30319
  const minVersion = getMinimumVersionForPartialOutput(meta);
30344
30320
  definitionMap.set('minVersion', literal(minVersion));
30345
- definitionMap.set('version', literal('18.0.0-next.3'));
30321
+ definitionMap.set('version', literal('18.0.0-next.4'));
30346
30322
  // e.g. `type: MyDirective`
30347
30323
  definitionMap.set('type', meta.type.value);
30348
30324
  if (meta.isStandalone) {
@@ -30757,7 +30733,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
30757
30733
  function compileDeclareFactoryFunction(meta) {
30758
30734
  const definitionMap = new DefinitionMap();
30759
30735
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
30760
- definitionMap.set('version', literal('18.0.0-next.3'));
30736
+ definitionMap.set('version', literal('18.0.0-next.4'));
30761
30737
  definitionMap.set('ngImport', importExpr(Identifiers.core));
30762
30738
  definitionMap.set('type', meta.type.value);
30763
30739
  definitionMap.set('deps', compileDependencies(meta.deps));
@@ -30792,7 +30768,7 @@ function compileDeclareInjectableFromMetadata(meta) {
30792
30768
  function createInjectableDefinitionMap(meta) {
30793
30769
  const definitionMap = new DefinitionMap();
30794
30770
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
30795
- definitionMap.set('version', literal('18.0.0-next.3'));
30771
+ definitionMap.set('version', literal('18.0.0-next.4'));
30796
30772
  definitionMap.set('ngImport', importExpr(Identifiers.core));
30797
30773
  definitionMap.set('type', meta.type.value);
30798
30774
  // Only generate providedIn property if it has a non-null value
@@ -30843,7 +30819,7 @@ function compileDeclareInjectorFromMetadata(meta) {
30843
30819
  function createInjectorDefinitionMap(meta) {
30844
30820
  const definitionMap = new DefinitionMap();
30845
30821
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
30846
- definitionMap.set('version', literal('18.0.0-next.3'));
30822
+ definitionMap.set('version', literal('18.0.0-next.4'));
30847
30823
  definitionMap.set('ngImport', importExpr(Identifiers.core));
30848
30824
  definitionMap.set('type', meta.type.value);
30849
30825
  definitionMap.set('providers', meta.providers);
@@ -30876,7 +30852,7 @@ function createNgModuleDefinitionMap(meta) {
30876
30852
  throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
30877
30853
  }
30878
30854
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
30879
- definitionMap.set('version', literal('18.0.0-next.3'));
30855
+ definitionMap.set('version', literal('18.0.0-next.4'));
30880
30856
  definitionMap.set('ngImport', importExpr(Identifiers.core));
30881
30857
  definitionMap.set('type', meta.type.value);
30882
30858
  // We only generate the keys in the metadata if the arrays contain values.
@@ -30927,7 +30903,7 @@ function compileDeclarePipeFromMetadata(meta) {
30927
30903
  function createPipeDefinitionMap(meta) {
30928
30904
  const definitionMap = new DefinitionMap();
30929
30905
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
30930
- definitionMap.set('version', literal('18.0.0-next.3'));
30906
+ definitionMap.set('version', literal('18.0.0-next.4'));
30931
30907
  definitionMap.set('ngImport', importExpr(Identifiers.core));
30932
30908
  // e.g. `type: MyPipe`
30933
30909
  definitionMap.set('type', meta.type.value);