@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/core.d.ts +3 -6
- package/esm2020/src/application_init.mjs +4 -3
- package/esm2020/src/application_module.mjs +5 -95
- package/esm2020/src/application_ref.mjs +4 -3
- package/esm2020/src/application_tokens.mjs +5 -2
- package/esm2020/src/i18n/tokens.mjs +39 -3
- package/esm2020/src/linker/compiler.mjs +4 -3
- package/esm2020/src/render3/component_ref.mjs +1 -11
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/fake_async.mjs +3 -2
- package/esm2020/testing/src/logger.mjs +3 -3
- package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
- package/fesm2015/core.mjs +54 -109
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +3 -2
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +54 -102
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +3 -2
- package/fesm2020/testing.mjs.map +1 -1
- package/package.json +1 -1
- package/schematics/utils/typescript/symbol.js +4 -3
- package/testing/testing.d.ts +3 -2
package/fesm2020/core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v13.2.
|
|
2
|
+
* @license Angular v13.2.7
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -21102,7 +21102,7 @@ class Version {
|
|
|
21102
21102
|
/**
|
|
21103
21103
|
* @publicApi
|
|
21104
21104
|
*/
|
|
21105
|
-
const VERSION = new Version('13.2.
|
|
21105
|
+
const VERSION = new Version('13.2.7');
|
|
21106
21106
|
|
|
21107
21107
|
/**
|
|
21108
21108
|
* @license
|
|
@@ -21507,14 +21507,6 @@ function getNamespace(elementName) {
|
|
|
21507
21507
|
const name = elementName.toLowerCase();
|
|
21508
21508
|
return name === 'svg' ? SVG_NAMESPACE : (name === 'math' ? MATH_ML_NAMESPACE : null);
|
|
21509
21509
|
}
|
|
21510
|
-
/**
|
|
21511
|
-
* A change detection scheduler token for {@link RootContext}. This token is the default value used
|
|
21512
|
-
* for the default `RootContext` found in the {@link ROOT_CONTEXT} token.
|
|
21513
|
-
*/
|
|
21514
|
-
const SCHEDULER = new InjectionToken('SCHEDULER_TOKEN', {
|
|
21515
|
-
providedIn: 'root',
|
|
21516
|
-
factory: () => defaultScheduler,
|
|
21517
|
-
});
|
|
21518
21510
|
function createChainedInjector(rootViewInjector, moduleInjector) {
|
|
21519
21511
|
return {
|
|
21520
21512
|
get: (token, notFoundValue, flags) => {
|
|
@@ -24838,9 +24830,10 @@ class ApplicationInitStatus {
|
|
|
24838
24830
|
}
|
|
24839
24831
|
}
|
|
24840
24832
|
ApplicationInitStatus.ɵfac = function ApplicationInitStatus_Factory(t) { return new (t || ApplicationInitStatus)(ɵɵinject(APP_INITIALIZER, 8)); };
|
|
24841
|
-
ApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationInitStatus, factory: ApplicationInitStatus.ɵfac });
|
|
24833
|
+
ApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationInitStatus, factory: ApplicationInitStatus.ɵfac, providedIn: 'root' });
|
|
24842
24834
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationInitStatus, [{
|
|
24843
|
-
type: Injectable
|
|
24835
|
+
type: Injectable,
|
|
24836
|
+
args: [{ providedIn: 'root' }]
|
|
24844
24837
|
}], function () { return [{ type: undefined, decorators: [{
|
|
24845
24838
|
type: Inject,
|
|
24846
24839
|
args: [APP_INITIALIZER]
|
|
@@ -24866,7 +24859,10 @@ ApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Appli
|
|
|
24866
24859
|
*
|
|
24867
24860
|
* @publicApi
|
|
24868
24861
|
*/
|
|
24869
|
-
const APP_ID = new InjectionToken('AppId'
|
|
24862
|
+
const APP_ID = new InjectionToken('AppId', {
|
|
24863
|
+
providedIn: 'root',
|
|
24864
|
+
factory: _appIdRandomProviderFactory,
|
|
24865
|
+
});
|
|
24870
24866
|
function _appIdRandomProviderFactory() {
|
|
24871
24867
|
return `${_randomChar()}${_randomChar()}${_randomChar()}`;
|
|
24872
24868
|
}
|
|
@@ -24941,6 +24937,33 @@ Console.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Console, factory: C
|
|
|
24941
24937
|
* Use of this source code is governed by an MIT-style license that can be
|
|
24942
24938
|
* found in the LICENSE file at https://angular.io/license
|
|
24943
24939
|
*/
|
|
24940
|
+
/**
|
|
24941
|
+
* Work out the locale from the potential global properties.
|
|
24942
|
+
*
|
|
24943
|
+
* * Closure Compiler: use `goog.LOCALE`.
|
|
24944
|
+
* * Ivy enabled: use `$localize.locale`
|
|
24945
|
+
*/
|
|
24946
|
+
function getGlobalLocale() {
|
|
24947
|
+
if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode &&
|
|
24948
|
+
typeof goog !== 'undefined' && goog.LOCALE !== 'en') {
|
|
24949
|
+
// * The default `goog.LOCALE` value is `en`, while Angular used `en-US`.
|
|
24950
|
+
// * In order to preserve backwards compatibility, we use Angular default value over
|
|
24951
|
+
// Closure Compiler's one.
|
|
24952
|
+
return goog.LOCALE;
|
|
24953
|
+
}
|
|
24954
|
+
else {
|
|
24955
|
+
// KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE
|
|
24956
|
+
// COMPILE-TIME INLINER.
|
|
24957
|
+
//
|
|
24958
|
+
// * During compile time inlining of translations the expression will be replaced
|
|
24959
|
+
// with a string literal that is the current locale. Other forms of this expression are not
|
|
24960
|
+
// guaranteed to be replaced.
|
|
24961
|
+
//
|
|
24962
|
+
// * During runtime translation evaluation, the developer is required to set `$localize.locale`
|
|
24963
|
+
// if required, or just to provide their own `LOCALE_ID` provider.
|
|
24964
|
+
return (typeof $localize !== 'undefined' && $localize.locale) || DEFAULT_LOCALE_ID;
|
|
24965
|
+
}
|
|
24966
|
+
}
|
|
24944
24967
|
/**
|
|
24945
24968
|
* Provide this token to set the locale of your application.
|
|
24946
24969
|
* It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,
|
|
@@ -24963,7 +24986,10 @@ Console.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Console, factory: C
|
|
|
24963
24986
|
*
|
|
24964
24987
|
* @publicApi
|
|
24965
24988
|
*/
|
|
24966
|
-
const LOCALE_ID = new InjectionToken('LocaleId'
|
|
24989
|
+
const LOCALE_ID = new InjectionToken('LocaleId', {
|
|
24990
|
+
providedIn: 'root',
|
|
24991
|
+
factory: () => inject(LOCALE_ID, InjectFlags.Optional | InjectFlags.SkipSelf) || getGlobalLocale(),
|
|
24992
|
+
});
|
|
24967
24993
|
/**
|
|
24968
24994
|
* Provide this token to set the default currency code your application uses for
|
|
24969
24995
|
* CurrencyPipe when there is no currency code passed into it. This is only used by
|
|
@@ -25002,7 +25028,10 @@ const LOCALE_ID = new InjectionToken('LocaleId');
|
|
|
25002
25028
|
*
|
|
25003
25029
|
* @publicApi
|
|
25004
25030
|
*/
|
|
25005
|
-
const DEFAULT_CURRENCY_CODE = new InjectionToken('DefaultCurrencyCode'
|
|
25031
|
+
const DEFAULT_CURRENCY_CODE = new InjectionToken('DefaultCurrencyCode', {
|
|
25032
|
+
providedIn: 'root',
|
|
25033
|
+
factory: () => USD_CURRENCY_CODE,
|
|
25034
|
+
});
|
|
25006
25035
|
/**
|
|
25007
25036
|
* Use this token at bootstrap to provide the content of your translation file (`xtb`,
|
|
25008
25037
|
* `xlf` or `xlf2`) when you want to translate your application in another language.
|
|
@@ -25169,9 +25198,10 @@ class Compiler {
|
|
|
25169
25198
|
}
|
|
25170
25199
|
}
|
|
25171
25200
|
Compiler.ɵfac = function Compiler_Factory(t) { return new (t || Compiler)(); };
|
|
25172
|
-
Compiler.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Compiler, factory: Compiler.ɵfac });
|
|
25201
|
+
Compiler.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Compiler, factory: Compiler.ɵfac, providedIn: 'root' });
|
|
25173
25202
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Compiler, [{
|
|
25174
|
-
type: Injectable
|
|
25203
|
+
type: Injectable,
|
|
25204
|
+
args: [{ providedIn: 'root' }]
|
|
25175
25205
|
}], null, null); })();
|
|
25176
25206
|
/**
|
|
25177
25207
|
* Token to provide CompilerOptions in the platform injector.
|
|
@@ -26532,9 +26562,10 @@ class ApplicationRef {
|
|
|
26532
26562
|
}
|
|
26533
26563
|
}
|
|
26534
26564
|
ApplicationRef.ɵfac = function ApplicationRef_Factory(t) { return new (t || ApplicationRef)(ɵɵinject(NgZone), ɵɵinject(Injector), ɵɵinject(ErrorHandler), ɵɵinject(ComponentFactoryResolver$1), ɵɵinject(ApplicationInitStatus)); };
|
|
26535
|
-
ApplicationRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac });
|
|
26565
|
+
ApplicationRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac, providedIn: 'root' });
|
|
26536
26566
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationRef, [{
|
|
26537
|
-
type: Injectable
|
|
26567
|
+
type: Injectable,
|
|
26568
|
+
args: [{ providedIn: 'root' }]
|
|
26538
26569
|
}], function () { return [{ type: NgZone }, { type: Injector }, { type: ErrorHandler }, { type: ComponentFactoryResolver$1 }, { type: ApplicationInitStatus }]; }, null); })();
|
|
26539
26570
|
function remove(list, el) {
|
|
26540
26571
|
const index = list.indexOf(el);
|
|
@@ -28538,88 +28569,10 @@ const platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDER
|
|
|
28538
28569
|
* Use of this source code is governed by an MIT-style license that can be
|
|
28539
28570
|
* found in the LICENSE file at https://angular.io/license
|
|
28540
28571
|
*/
|
|
28541
|
-
function _localeFactory(locale) {
|
|
28542
|
-
return locale || getGlobalLocale();
|
|
28543
|
-
}
|
|
28544
28572
|
/**
|
|
28545
|
-
* Work out the locale from the potential global properties.
|
|
28546
|
-
*
|
|
28547
|
-
* * Closure Compiler: use `goog.getLocale()`.
|
|
28548
|
-
* * Ivy enabled: use `$localize.locale`
|
|
28549
|
-
*/
|
|
28550
|
-
function getGlobalLocale() {
|
|
28551
|
-
if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode &&
|
|
28552
|
-
typeof goog !== 'undefined' && goog.getLocale() !== 'en') {
|
|
28553
|
-
// * The default `goog.getLocale()` value is `en`, while Angular used `en-US`.
|
|
28554
|
-
// * In order to preserve backwards compatibility, we use Angular default value over
|
|
28555
|
-
// Closure Compiler's one.
|
|
28556
|
-
return goog.getLocale();
|
|
28557
|
-
}
|
|
28558
|
-
else {
|
|
28559
|
-
// KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE
|
|
28560
|
-
// COMPILE-TIME INLINER.
|
|
28561
|
-
//
|
|
28562
|
-
// * During compile time inlining of translations the expression will be replaced
|
|
28563
|
-
// with a string literal that is the current locale. Other forms of this expression are not
|
|
28564
|
-
// guaranteed to be replaced.
|
|
28565
|
-
//
|
|
28566
|
-
// * During runtime translation evaluation, the developer is required to set `$localize.locale`
|
|
28567
|
-
// if required, or just to provide their own `LOCALE_ID` provider.
|
|
28568
|
-
return (typeof $localize !== 'undefined' && $localize.locale) || DEFAULT_LOCALE_ID;
|
|
28569
|
-
}
|
|
28570
|
-
}
|
|
28571
|
-
/**
|
|
28572
|
-
* A built-in [dependency injection token](guide/glossary#di-token)
|
|
28573
|
-
* that is used to configure the root injector for bootstrapping.
|
|
28574
|
-
*/
|
|
28575
|
-
const APPLICATION_MODULE_PROVIDERS = [
|
|
28576
|
-
{
|
|
28577
|
-
provide: ApplicationRef,
|
|
28578
|
-
useClass: ApplicationRef,
|
|
28579
|
-
deps: [NgZone, Injector, ErrorHandler, ComponentFactoryResolver$1, ApplicationInitStatus]
|
|
28580
|
-
},
|
|
28581
|
-
{ provide: SCHEDULER, deps: [NgZone], useFactory: zoneSchedulerFactory },
|
|
28582
|
-
{
|
|
28583
|
-
provide: ApplicationInitStatus,
|
|
28584
|
-
useClass: ApplicationInitStatus,
|
|
28585
|
-
deps: [[new Optional(), APP_INITIALIZER]]
|
|
28586
|
-
},
|
|
28587
|
-
{ provide: Compiler, useClass: Compiler, deps: [] },
|
|
28588
|
-
APP_ID_RANDOM_PROVIDER,
|
|
28589
|
-
{
|
|
28590
|
-
provide: LOCALE_ID,
|
|
28591
|
-
useFactory: _localeFactory,
|
|
28592
|
-
deps: [[new Inject(LOCALE_ID), new Optional(), new SkipSelf()]]
|
|
28593
|
-
},
|
|
28594
|
-
{ provide: DEFAULT_CURRENCY_CODE, useValue: USD_CURRENCY_CODE },
|
|
28595
|
-
];
|
|
28596
|
-
/**
|
|
28597
|
-
* Schedule work at next available slot.
|
|
28598
|
-
*
|
|
28599
|
-
* In Ivy this is just `requestAnimationFrame`. For compatibility reasons when bootstrapped
|
|
28600
|
-
* using `platformRef.bootstrap` we need to use `NgZone.onStable` as the scheduling mechanism.
|
|
28601
|
-
* This overrides the scheduling mechanism in Ivy to `NgZone.onStable`.
|
|
28602
|
-
*
|
|
28603
|
-
* @param ngZone NgZone to use for scheduling.
|
|
28604
|
-
*/
|
|
28605
|
-
function zoneSchedulerFactory(ngZone) {
|
|
28606
|
-
let queue = [];
|
|
28607
|
-
ngZone.onStable.subscribe(() => {
|
|
28608
|
-
while (queue.length) {
|
|
28609
|
-
queue.pop()();
|
|
28610
|
-
}
|
|
28611
|
-
});
|
|
28612
|
-
return function (fn) {
|
|
28613
|
-
queue.push(fn);
|
|
28614
|
-
};
|
|
28615
|
-
}
|
|
28616
|
-
/**
|
|
28617
|
-
* Configures the root injector for an app with
|
|
28618
|
-
* providers of `@angular/core` dependencies that `ApplicationRef` needs
|
|
28619
|
-
* to bootstrap components.
|
|
28620
|
-
*
|
|
28621
28573
|
* Re-exported by `BrowserModule`, which is included automatically in the root
|
|
28622
|
-
* `AppModule` when you create a new app with the CLI `new` command.
|
|
28574
|
+
* `AppModule` when you create a new app with the CLI `new` command. Eagerly injects
|
|
28575
|
+
* `ApplicationRef` to instantiate it.
|
|
28623
28576
|
*
|
|
28624
28577
|
* @publicApi
|
|
28625
28578
|
*/
|
|
@@ -28629,10 +28582,9 @@ class ApplicationModule {
|
|
|
28629
28582
|
}
|
|
28630
28583
|
ApplicationModule.ɵfac = function ApplicationModule_Factory(t) { return new (t || ApplicationModule)(ɵɵinject(ApplicationRef)); };
|
|
28631
28584
|
ApplicationModule.ɵmod = /*@__PURE__*/ ɵɵdefineNgModule({ type: ApplicationModule });
|
|
28632
|
-
ApplicationModule.ɵinj = /*@__PURE__*/ ɵɵdefineInjector({
|
|
28585
|
+
ApplicationModule.ɵinj = /*@__PURE__*/ ɵɵdefineInjector({});
|
|
28633
28586
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationModule, [{
|
|
28634
|
-
type: NgModule
|
|
28635
|
-
args: [{ providers: APPLICATION_MODULE_PROVIDERS }]
|
|
28587
|
+
type: NgModule
|
|
28636
28588
|
}], function () { return [{ type: ApplicationRef }]; }, null); })();
|
|
28637
28589
|
|
|
28638
28590
|
/**
|