@angular/core 17.0.0-next.0 → 17.0.0-next.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/fesm2022/core.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.0.0-next.0
2
+ * @license Angular v17.0.0-next.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1741,20 +1741,6 @@ function ɵɵdefineComponent(componentDefinition) {
1741
1741
  return def;
1742
1742
  });
1743
1743
  }
1744
- /**
1745
- * Generated next to NgModules to monkey-patch directive and pipe references onto a component's
1746
- * definition, when generating a direct reference in the component file would otherwise create an
1747
- * import cycle.
1748
- *
1749
- * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details.
1750
- *
1751
- * @codeGenApi
1752
- */
1753
- function ɵɵsetComponentScope(type, directives, pipes) {
1754
- const def = type.ɵcmp;
1755
- def.directiveDefs = extractDefListOrFactory(directives, /* pipeDef */ false);
1756
- def.pipeDefs = extractDefListOrFactory(pipes, /* pipeDef */ true);
1757
- }
1758
1744
  function extractDirectiveDef(type) {
1759
1745
  return getComponentDef(type) || getDirectiveDef(type);
1760
1746
  }
@@ -1779,24 +1765,6 @@ function ɵɵdefineNgModule(def) {
1779
1765
  return res;
1780
1766
  });
1781
1767
  }
1782
- /**
1783
- * Adds the module metadata that is necessary to compute the module's transitive scope to an
1784
- * existing module definition.
1785
- *
1786
- * Scope metadata of modules is not used in production builds, so calls to this function can be
1787
- * marked pure to tree-shake it from the bundle, allowing for all referenced declarations
1788
- * to become eligible for tree-shaking as well.
1789
- *
1790
- * @codeGenApi
1791
- */
1792
- function ɵɵsetNgModuleScope(type, scope) {
1793
- return noSideEffects(() => {
1794
- const ngModuleDef = getNgModuleDef(type, true);
1795
- ngModuleDef.declarations = scope.declarations || EMPTY_ARRAY;
1796
- ngModuleDef.imports = scope.imports || EMPTY_ARRAY;
1797
- ngModuleDef.exports = scope.exports || EMPTY_ARRAY;
1798
- });
1799
- }
1800
1768
  /**
1801
1769
  * Inverts an inputs or outputs lookup such that the keys, which were the
1802
1770
  * minified keys, are part of the values, and the values are parsed so that
@@ -7347,9 +7315,6 @@ class DepsTracker {
7347
7315
  throw new Error(`Attempting to get component dependencies for a type that is not a component: ${type}`);
7348
7316
  }
7349
7317
  if (def.standalone) {
7350
- if (!rawImports) {
7351
- throw new Error('Standalone component should pass its raw import in order to compute its dependencies');
7352
- }
7353
7318
  const scope = this.getStandaloneComponentScope(type, rawImports);
7354
7319
  if (scope.compilation.isPoisoned) {
7355
7320
  return { dependencies: [] };
@@ -7497,7 +7462,7 @@ class DepsTracker {
7497
7462
  pipes: new Set(),
7498
7463
  },
7499
7464
  };
7500
- for (const rawImport of rawImports) {
7465
+ for (const rawImport of rawImports ?? []) {
7501
7466
  const imported = resolveForwardRef(rawImport);
7502
7467
  try {
7503
7468
  verifyStandaloneImport(imported, type);
@@ -10887,7 +10852,7 @@ class Version {
10887
10852
  /**
10888
10853
  * @publicApi
10889
10854
  */
10890
- const VERSION = new Version('17.0.0-next.0');
10855
+ const VERSION = new Version('17.0.0-next.1');
10891
10856
 
10892
10857
  // This default value is when checking the hierarchy for a token.
10893
10858
  //
@@ -22699,6 +22664,54 @@ function ɵɵStandaloneFeature(definition) {
22699
22664
  };
22700
22665
  }
22701
22666
 
22667
+ /**
22668
+ * Generated next to NgModules to monkey-patch directive and pipe references onto a component's
22669
+ * definition, when generating a direct reference in the component file would otherwise create an
22670
+ * import cycle.
22671
+ *
22672
+ * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details.
22673
+ *
22674
+ * @codeGenApi
22675
+ */
22676
+ function ɵɵsetComponentScope(type, directives, pipes) {
22677
+ const def = type.ɵcmp;
22678
+ def.directiveDefs = extractDefListOrFactory(directives, /* pipeDef */ false);
22679
+ def.pipeDefs = extractDefListOrFactory(pipes, /* pipeDef */ true);
22680
+ }
22681
+ /**
22682
+ * Adds the module metadata that is necessary to compute the module's transitive scope to an
22683
+ * existing module definition.
22684
+ *
22685
+ * Scope metadata of modules is not used in production builds, so calls to this function can be
22686
+ * marked pure to tree-shake it from the bundle, allowing for all referenced declarations
22687
+ * to become eligible for tree-shaking as well.
22688
+ *
22689
+ * @codeGenApi
22690
+ */
22691
+ function ɵɵsetNgModuleScope(type, scope) {
22692
+ return noSideEffects(() => {
22693
+ const ngModuleDef = getNgModuleDef(type, true);
22694
+ ngModuleDef.declarations = convertToTypeArray(scope.declarations || EMPTY_ARRAY);
22695
+ ngModuleDef.imports = convertToTypeArray(scope.imports || EMPTY_ARRAY);
22696
+ ngModuleDef.exports = convertToTypeArray(scope.exports || EMPTY_ARRAY);
22697
+ depsTracker.registerNgModule(type, scope);
22698
+ });
22699
+ }
22700
+ function convertToTypeArray(values) {
22701
+ if (typeof values === 'function') {
22702
+ return values;
22703
+ }
22704
+ if (values.some(isForwardRef)) {
22705
+ return () => values.map(resolveForwardRef).map(maybeUnwrapModuleWithProviders);
22706
+ }
22707
+ else {
22708
+ return values.map(maybeUnwrapModuleWithProviders);
22709
+ }
22710
+ }
22711
+ function maybeUnwrapModuleWithProviders(value) {
22712
+ return isModuleWithProviders(value) ? value.ngModule : value;
22713
+ }
22714
+
22702
22715
  /**
22703
22716
  * Retrieves the component instance associated with a given DOM element.
22704
22717
  *
@@ -24987,8 +25000,9 @@ function ɵɵtemplateRefExtractor(tNode, lView) {
24987
25000
  }
24988
25001
 
24989
25002
  function ɵɵgetComponentDepsFactory(type, rawImports) {
24990
- // TODO(pmvald): Implement this runtime using deps tracker.
24991
- return () => [];
25003
+ return () => {
25004
+ return depsTracker.getComponentDependencies(type, rawImports).dependencies;
25005
+ };
24992
25006
  }
24993
25007
 
24994
25008
  /**
@@ -25113,6 +25127,7 @@ const angularCoreEnv = (() => ({
25113
25127
  'ɵɵclassProp': ɵɵclassProp,
25114
25128
  'ɵɵadvance': ɵɵadvance,
25115
25129
  'ɵɵtemplate': ɵɵtemplate,
25130
+ 'ɵɵconditional': ɵɵconditional,
25116
25131
  'ɵɵdefer': ɵɵdefer,
25117
25132
  'ɵɵdeferWhen': ɵɵdeferWhen,
25118
25133
  'ɵɵdeferOnIdle': ɵɵdeferOnIdle,
@@ -29264,8 +29279,8 @@ function internalProvideZoneChangeDetection(ngZoneFactory) {
29264
29279
  * ```
29265
29280
  *
29266
29281
  * @publicApi
29267
- * @see bootstrapApplication
29268
- * @see NgZoneOptions
29282
+ * @see {@link bootstrapApplication}
29283
+ * @see {@link NgZoneOptions}
29269
29284
  */
29270
29285
  function provideZoneChangeDetection(options) {
29271
29286
  const zoneProviders = internalProvideZoneChangeDetection(() => new NgZone(getNgZoneOptions(options)));