@angular/core 13.2.4 → 13.2.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/fesm2015/core.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v13.2.4
2
+ * @license Angular v13.2.7
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -21088,7 +21088,7 @@ class Version {
21088
21088
  /**
21089
21089
  * @publicApi
21090
21090
  */
21091
- const VERSION = new Version('13.2.4');
21091
+ const VERSION = new Version('13.2.7');
21092
21092
 
21093
21093
  /**
21094
21094
  * @license
@@ -21493,14 +21493,6 @@ function getNamespace(elementName) {
21493
21493
  const name = elementName.toLowerCase();
21494
21494
  return name === 'svg' ? SVG_NAMESPACE : (name === 'math' ? MATH_ML_NAMESPACE : null);
21495
21495
  }
21496
- /**
21497
- * A change detection scheduler token for {@link RootContext}. This token is the default value used
21498
- * for the default `RootContext` found in the {@link ROOT_CONTEXT} token.
21499
- */
21500
- const SCHEDULER = new InjectionToken('SCHEDULER_TOKEN', {
21501
- providedIn: 'root',
21502
- factory: () => defaultScheduler,
21503
- });
21504
21496
  function createChainedInjector(rootViewInjector, moduleInjector) {
21505
21497
  return {
21506
21498
  get: (token, notFoundValue, flags) => {
@@ -24804,10 +24796,11 @@ class ApplicationInitStatus {
24804
24796
  }
24805
24797
  }
24806
24798
  ApplicationInitStatus.ɵfac = function ApplicationInitStatus_Factory(t) { return new (t || ApplicationInitStatus)(ɵɵinject(APP_INITIALIZER, 8)); };
24807
- ApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationInitStatus, factory: ApplicationInitStatus.ɵfac });
24799
+ ApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationInitStatus, factory: ApplicationInitStatus.ɵfac, providedIn: 'root' });
24808
24800
  (function () {
24809
24801
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationInitStatus, [{
24810
- type: Injectable
24802
+ type: Injectable,
24803
+ args: [{ providedIn: 'root' }]
24811
24804
  }], function () {
24812
24805
  return [{ type: undefined, decorators: [{
24813
24806
  type: Inject,
@@ -24836,7 +24829,10 @@ ApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Appli
24836
24829
  *
24837
24830
  * @publicApi
24838
24831
  */
24839
- const APP_ID = new InjectionToken('AppId');
24832
+ const APP_ID = new InjectionToken('AppId', {
24833
+ providedIn: 'root',
24834
+ factory: _appIdRandomProviderFactory,
24835
+ });
24840
24836
  function _appIdRandomProviderFactory() {
24841
24837
  return `${_randomChar()}${_randomChar()}${_randomChar()}`;
24842
24838
  }
@@ -24913,6 +24909,33 @@ Console.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Console, factory: C
24913
24909
  * Use of this source code is governed by an MIT-style license that can be
24914
24910
  * found in the LICENSE file at https://angular.io/license
24915
24911
  */
24912
+ /**
24913
+ * Work out the locale from the potential global properties.
24914
+ *
24915
+ * * Closure Compiler: use `goog.LOCALE`.
24916
+ * * Ivy enabled: use `$localize.locale`
24917
+ */
24918
+ function getGlobalLocale() {
24919
+ if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode &&
24920
+ typeof goog !== 'undefined' && goog.LOCALE !== 'en') {
24921
+ // * The default `goog.LOCALE` value is `en`, while Angular used `en-US`.
24922
+ // * In order to preserve backwards compatibility, we use Angular default value over
24923
+ // Closure Compiler's one.
24924
+ return goog.LOCALE;
24925
+ }
24926
+ else {
24927
+ // KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE
24928
+ // COMPILE-TIME INLINER.
24929
+ //
24930
+ // * During compile time inlining of translations the expression will be replaced
24931
+ // with a string literal that is the current locale. Other forms of this expression are not
24932
+ // guaranteed to be replaced.
24933
+ //
24934
+ // * During runtime translation evaluation, the developer is required to set `$localize.locale`
24935
+ // if required, or just to provide their own `LOCALE_ID` provider.
24936
+ return (typeof $localize !== 'undefined' && $localize.locale) || DEFAULT_LOCALE_ID;
24937
+ }
24938
+ }
24916
24939
  /**
24917
24940
  * Provide this token to set the locale of your application.
24918
24941
  * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,
@@ -24935,7 +24958,10 @@ Console.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Console, factory: C
24935
24958
  *
24936
24959
  * @publicApi
24937
24960
  */
24938
- const LOCALE_ID = new InjectionToken('LocaleId');
24961
+ const LOCALE_ID = new InjectionToken('LocaleId', {
24962
+ providedIn: 'root',
24963
+ factory: () => inject(LOCALE_ID, InjectFlags.Optional | InjectFlags.SkipSelf) || getGlobalLocale(),
24964
+ });
24939
24965
  /**
24940
24966
  * Provide this token to set the default currency code your application uses for
24941
24967
  * CurrencyPipe when there is no currency code passed into it. This is only used by
@@ -24974,7 +25000,10 @@ const LOCALE_ID = new InjectionToken('LocaleId');
24974
25000
  *
24975
25001
  * @publicApi
24976
25002
  */
24977
- const DEFAULT_CURRENCY_CODE = new InjectionToken('DefaultCurrencyCode');
25003
+ const DEFAULT_CURRENCY_CODE = new InjectionToken('DefaultCurrencyCode', {
25004
+ providedIn: 'root',
25005
+ factory: () => USD_CURRENCY_CODE,
25006
+ });
24978
25007
  /**
24979
25008
  * Use this token at bootstrap to provide the content of your translation file (`xtb`,
24980
25009
  * `xlf` or `xlf2`) when you want to translate your application in another language.
@@ -25141,10 +25170,11 @@ class Compiler {
25141
25170
  }
25142
25171
  }
25143
25172
  Compiler.ɵfac = function Compiler_Factory(t) { return new (t || Compiler)(); };
25144
- Compiler.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Compiler, factory: Compiler.ɵfac });
25173
+ Compiler.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Compiler, factory: Compiler.ɵfac, providedIn: 'root' });
25145
25174
  (function () {
25146
25175
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Compiler, [{
25147
- type: Injectable
25176
+ type: Injectable,
25177
+ args: [{ providedIn: 'root' }]
25148
25178
  }], null, null);
25149
25179
  })();
25150
25180
  /**
@@ -26512,10 +26542,11 @@ class ApplicationRef {
26512
26542
  }
26513
26543
  }
26514
26544
  ApplicationRef.ɵfac = function ApplicationRef_Factory(t) { return new (t || ApplicationRef)(ɵɵinject(NgZone), ɵɵinject(Injector), ɵɵinject(ErrorHandler), ɵɵinject(ComponentFactoryResolver$1), ɵɵinject(ApplicationInitStatus)); };
26515
- ApplicationRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac });
26545
+ ApplicationRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac, providedIn: 'root' });
26516
26546
  (function () {
26517
26547
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationRef, [{
26518
- type: Injectable
26548
+ type: Injectable,
26549
+ args: [{ providedIn: 'root' }]
26519
26550
  }], function () { return [{ type: NgZone }, { type: Injector }, { type: ErrorHandler }, { type: ComponentFactoryResolver$1 }, { type: ApplicationInitStatus }]; }, null);
26520
26551
  })();
26521
26552
  function remove(list, el) {
@@ -28514,94 +28545,9 @@ const _CORE_PLATFORM_PROVIDERS = [
28514
28545
  const platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);
28515
28546
 
28516
28547
  /**
28517
- * @license
28518
- * Copyright Google LLC All Rights Reserved.
28519
- *
28520
- * Use of this source code is governed by an MIT-style license that can be
28521
- * found in the LICENSE file at https://angular.io/license
28522
- */
28523
- function _localeFactory(locale) {
28524
- return locale || getGlobalLocale();
28525
- }
28526
- /**
28527
- * Work out the locale from the potential global properties.
28528
- *
28529
- * * Closure Compiler: use `goog.getLocale()`.
28530
- * * Ivy enabled: use `$localize.locale`
28531
- */
28532
- function getGlobalLocale() {
28533
- if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode &&
28534
- typeof goog !== 'undefined' && goog.getLocale() !== 'en') {
28535
- // * The default `goog.getLocale()` value is `en`, while Angular used `en-US`.
28536
- // * In order to preserve backwards compatibility, we use Angular default value over
28537
- // Closure Compiler's one.
28538
- return goog.getLocale();
28539
- }
28540
- else {
28541
- // KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE
28542
- // COMPILE-TIME INLINER.
28543
- //
28544
- // * During compile time inlining of translations the expression will be replaced
28545
- // with a string literal that is the current locale. Other forms of this expression are not
28546
- // guaranteed to be replaced.
28547
- //
28548
- // * During runtime translation evaluation, the developer is required to set `$localize.locale`
28549
- // if required, or just to provide their own `LOCALE_ID` provider.
28550
- return (typeof $localize !== 'undefined' && $localize.locale) || DEFAULT_LOCALE_ID;
28551
- }
28552
- }
28553
- /**
28554
- * A built-in [dependency injection token](guide/glossary#di-token)
28555
- * that is used to configure the root injector for bootstrapping.
28556
- */
28557
- const APPLICATION_MODULE_PROVIDERS = [
28558
- {
28559
- provide: ApplicationRef,
28560
- useClass: ApplicationRef,
28561
- deps: [NgZone, Injector, ErrorHandler, ComponentFactoryResolver$1, ApplicationInitStatus]
28562
- },
28563
- { provide: SCHEDULER, deps: [NgZone], useFactory: zoneSchedulerFactory },
28564
- {
28565
- provide: ApplicationInitStatus,
28566
- useClass: ApplicationInitStatus,
28567
- deps: [[new Optional(), APP_INITIALIZER]]
28568
- },
28569
- { provide: Compiler, useClass: Compiler, deps: [] },
28570
- APP_ID_RANDOM_PROVIDER,
28571
- {
28572
- provide: LOCALE_ID,
28573
- useFactory: _localeFactory,
28574
- deps: [[new Inject(LOCALE_ID), new Optional(), new SkipSelf()]]
28575
- },
28576
- { provide: DEFAULT_CURRENCY_CODE, useValue: USD_CURRENCY_CODE },
28577
- ];
28578
- /**
28579
- * Schedule work at next available slot.
28580
- *
28581
- * In Ivy this is just `requestAnimationFrame`. For compatibility reasons when bootstrapped
28582
- * using `platformRef.bootstrap` we need to use `NgZone.onStable` as the scheduling mechanism.
28583
- * This overrides the scheduling mechanism in Ivy to `NgZone.onStable`.
28584
- *
28585
- * @param ngZone NgZone to use for scheduling.
28586
- */
28587
- function zoneSchedulerFactory(ngZone) {
28588
- let queue = [];
28589
- ngZone.onStable.subscribe(() => {
28590
- while (queue.length) {
28591
- queue.pop()();
28592
- }
28593
- });
28594
- return function (fn) {
28595
- queue.push(fn);
28596
- };
28597
- }
28598
- /**
28599
- * Configures the root injector for an app with
28600
- * providers of `@angular/core` dependencies that `ApplicationRef` needs
28601
- * to bootstrap components.
28602
- *
28603
28548
  * Re-exported by `BrowserModule`, which is included automatically in the root
28604
- * `AppModule` when you create a new app with the CLI `new` command.
28549
+ * `AppModule` when you create a new app with the CLI `new` command. Eagerly injects
28550
+ * `ApplicationRef` to instantiate it.
28605
28551
  *
28606
28552
  * @publicApi
28607
28553
  */
@@ -28611,11 +28557,10 @@ class ApplicationModule {
28611
28557
  }
28612
28558
  ApplicationModule.ɵfac = function ApplicationModule_Factory(t) { return new (t || ApplicationModule)(ɵɵinject(ApplicationRef)); };
28613
28559
  ApplicationModule.ɵmod = /*@__PURE__*/ ɵɵdefineNgModule({ type: ApplicationModule });
28614
- ApplicationModule.ɵinj = /*@__PURE__*/ ɵɵdefineInjector({ providers: APPLICATION_MODULE_PROVIDERS });
28560
+ ApplicationModule.ɵinj = /*@__PURE__*/ ɵɵdefineInjector({});
28615
28561
  (function () {
28616
28562
  (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationModule, [{
28617
- type: NgModule,
28618
- args: [{ providers: APPLICATION_MODULE_PROVIDERS }]
28563
+ type: NgModule
28619
28564
  }], function () { return [{ type: ApplicationRef }]; }, null);
28620
28565
  })();
28621
28566