@angular/common 20.0.0-next.0 → 20.0.0-next.2
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/common.mjs +236 -264
- package/fesm2022/common.mjs.map +1 -1
- package/fesm2022/http/testing.mjs +11 -15
- package/fesm2022/http/testing.mjs.map +1 -1
- package/fesm2022/http.mjs +66 -114
- package/fesm2022/http.mjs.map +1 -1
- package/fesm2022/testing.mjs +23 -42
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/upgrade.mjs +11 -25
- package/fesm2022/upgrade.mjs.map +1 -1
- package/http/index.d.ts +2809 -2860
- package/http/testing/index.d.ts +75 -80
- package/index.d.ts +2149 -2372
- package/package.json +2 -2
- package/testing/index.d.ts +56 -65
- package/upgrade/index.d.ts +139 -147
package/fesm2022/common.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v20.0.0-next.
|
|
3
|
-
* (c) 2010-
|
|
2
|
+
* @license Angular v20.0.0-next.2
|
|
3
|
+
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
|
-
import { Injectable, InjectionToken, inject, Optional, Inject, ɵɵinject, ɵfindLocaleData, ɵLocaleDataIndex, ɵgetLocaleCurrencyCode,
|
|
8
|
+
import { Injectable, InjectionToken, inject, Optional, Inject, ɵɵinject as __inject, ɵgetLocalePluralCase as _getLocalePluralCase, ɵfindLocaleData as _findLocaleData, ɵLocaleDataIndex as _LocaleDataIndex, ɵgetLocaleCurrencyCode as _getLocaleCurrencyCode, ɵRuntimeError as _RuntimeError, ɵformatRuntimeError as _formatRuntimeError, LOCALE_ID, ɵregisterLocaleData as _registerLocaleData, ɵstringify as _stringify, Input, Directive, createNgModule, NgModuleRef, Host, Attribute, RendererStyleFlags2, ɵINTERNAL_APPLICATION_ERROR_HANDLER as _INTERNAL_APPLICATION_ERROR_HANDLER, ɵisPromise as _isPromise, ɵisSubscribable as _isSubscribable, untracked, Pipe, DEFAULT_CURRENCY_CODE, NgModule, Version, ɵɵdefineInjectable as __defineInjectable, PLATFORM_ID, ɵIMAGE_CONFIG as _IMAGE_CONFIG, Renderer2, ElementRef, Injector, DestroyRef, ɵperformanceMarkFeature as _performanceMarkFeature, NgZone, ApplicationRef, booleanAttribute, numberAttribute, ChangeDetectorRef, ɵIMAGE_CONFIG_DEFAULTS as _IMAGE_CONFIG_DEFAULTS, ɵunwrapSafeValue as _unwrapSafeValue } from '@angular/core';
|
|
9
9
|
export { ɵIMAGE_CONFIG as IMAGE_CONFIG } from '@angular/core';
|
|
10
10
|
import { Subject } from 'rxjs';
|
|
11
11
|
|
|
@@ -30,10 +30,10 @@ class DomAdapter {
|
|
|
30
30
|
* implementations.
|
|
31
31
|
*/
|
|
32
32
|
class PlatformNavigation {
|
|
33
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
34
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
33
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: PlatformNavigation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
34
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: PlatformNavigation, providedIn: 'platform', useFactory: () => window.navigation });
|
|
35
35
|
}
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: PlatformNavigation, decorators: [{
|
|
37
37
|
type: Injectable,
|
|
38
38
|
args: [{ providedIn: 'platform', useFactory: () => window.navigation }]
|
|
39
39
|
}] });
|
|
@@ -62,8 +62,8 @@ const DOCUMENT = new InjectionToken(ngDevMode ? 'DocumentToken' : '');
|
|
|
62
62
|
* when they need to interact with the DOM APIs like pushState, popState, etc.
|
|
63
63
|
*
|
|
64
64
|
* {@link LocationStrategy} in turn is used by the {@link Location} service which is used directly
|
|
65
|
-
* by the {@link Router} in order to navigate between routes. Since all interactions between
|
|
66
|
-
* Router} /
|
|
65
|
+
* by the {@link /api/router/Router Router} in order to navigate between routes. Since all interactions between
|
|
66
|
+
* {@link /api/router/Router Router} /
|
|
67
67
|
* {@link Location} / {@link LocationStrategy} and DOM APIs flow through the `PlatformLocation`
|
|
68
68
|
* class, they are all platform-agnostic.
|
|
69
69
|
*
|
|
@@ -73,10 +73,10 @@ class PlatformLocation {
|
|
|
73
73
|
historyGo(relativePosition) {
|
|
74
74
|
throw new Error(ngDevMode ? 'Not implemented' : '');
|
|
75
75
|
}
|
|
76
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
77
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
76
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: PlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
77
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: PlatformLocation, providedIn: 'platform', useFactory: () => inject(BrowserPlatformLocation) });
|
|
78
78
|
}
|
|
79
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
79
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: PlatformLocation, decorators: [{
|
|
80
80
|
type: Injectable,
|
|
81
81
|
args: [{ providedIn: 'platform', useFactory: () => inject(BrowserPlatformLocation) }]
|
|
82
82
|
}] });
|
|
@@ -158,10 +158,10 @@ class BrowserPlatformLocation extends PlatformLocation {
|
|
|
158
158
|
getState() {
|
|
159
159
|
return this._history.state;
|
|
160
160
|
}
|
|
161
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
162
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
161
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: BrowserPlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
162
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: BrowserPlatformLocation, providedIn: 'platform', useFactory: () => new BrowserPlatformLocation() });
|
|
163
163
|
}
|
|
164
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: BrowserPlatformLocation, decorators: [{
|
|
165
165
|
type: Injectable,
|
|
166
166
|
args: [{
|
|
167
167
|
providedIn: 'platform',
|
|
@@ -242,10 +242,10 @@ class LocationStrategy {
|
|
|
242
242
|
historyGo(relativePosition) {
|
|
243
243
|
throw new Error(ngDevMode ? 'Not implemented' : '');
|
|
244
244
|
}
|
|
245
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
246
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
245
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
246
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: () => inject(PathLocationStrategy) });
|
|
247
247
|
}
|
|
248
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
248
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: LocationStrategy, decorators: [{
|
|
249
249
|
type: Injectable,
|
|
250
250
|
args: [{ providedIn: 'root', useFactory: () => inject(PathLocationStrategy) }]
|
|
251
251
|
}] });
|
|
@@ -357,10 +357,10 @@ class PathLocationStrategy extends LocationStrategy {
|
|
|
357
357
|
historyGo(relativePosition = 0) {
|
|
358
358
|
this._platformLocation.historyGo?.(relativePosition);
|
|
359
359
|
}
|
|
360
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
361
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
360
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: PathLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
361
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: PathLocationStrategy, providedIn: 'root' });
|
|
362
362
|
}
|
|
363
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
363
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: PathLocationStrategy, decorators: [{
|
|
364
364
|
type: Injectable,
|
|
365
365
|
args: [{ providedIn: 'root' }]
|
|
366
366
|
}], ctorParameters: () => [{ type: PlatformLocation }, { type: undefined, decorators: [{
|
|
@@ -443,10 +443,10 @@ class HashLocationStrategy extends LocationStrategy {
|
|
|
443
443
|
historyGo(relativePosition = 0) {
|
|
444
444
|
this._platformLocation.historyGo?.(relativePosition);
|
|
445
445
|
}
|
|
446
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
447
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
446
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: HashLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
447
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: HashLocationStrategy });
|
|
448
448
|
}
|
|
449
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
449
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: HashLocationStrategy, decorators: [{
|
|
450
450
|
type: Injectable
|
|
451
451
|
}], ctorParameters: () => [{ type: PlatformLocation }, { type: undefined, decorators: [{
|
|
452
452
|
type: Optional
|
|
@@ -700,10 +700,10 @@ class Location {
|
|
|
700
700
|
* @returns The URL string, modified if needed.
|
|
701
701
|
*/
|
|
702
702
|
static stripTrailingSlash = stripTrailingSlash;
|
|
703
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
704
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
703
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: Location, deps: [{ token: LocationStrategy }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
704
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation });
|
|
705
705
|
}
|
|
706
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
706
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: Location, decorators: [{
|
|
707
707
|
type: Injectable,
|
|
708
708
|
args: [{
|
|
709
709
|
providedIn: 'root',
|
|
@@ -712,7 +712,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.0",
|
|
|
712
712
|
}]
|
|
713
713
|
}], ctorParameters: () => [{ type: LocationStrategy }] });
|
|
714
714
|
function createLocation() {
|
|
715
|
-
return new Location(
|
|
715
|
+
return new Location(__inject(LocationStrategy));
|
|
716
716
|
}
|
|
717
717
|
function _stripBasePath(basePath, url) {
|
|
718
718
|
if (!basePath || !url.startsWith(basePath)) {
|
|
@@ -971,7 +971,7 @@ var WeekDay;
|
|
|
971
971
|
* This function serves no purpose when relying on the `Intl` API.
|
|
972
972
|
*/
|
|
973
973
|
function getLocaleId(locale) {
|
|
974
|
-
return
|
|
974
|
+
return _findLocaleData(locale)[_LocaleDataIndex.LocaleId];
|
|
975
975
|
}
|
|
976
976
|
/**
|
|
977
977
|
* Retrieves day period strings for the given locale.
|
|
@@ -988,10 +988,10 @@ function getLocaleId(locale) {
|
|
|
988
988
|
* Use `Intl.DateTimeFormat` for date formating instead.
|
|
989
989
|
*/
|
|
990
990
|
function getLocaleDayPeriods(locale, formStyle, width) {
|
|
991
|
-
const data =
|
|
991
|
+
const data = _findLocaleData(locale);
|
|
992
992
|
const amPmData = [
|
|
993
|
-
data[
|
|
994
|
-
data[
|
|
993
|
+
data[_LocaleDataIndex.DayPeriodsFormat],
|
|
994
|
+
data[_LocaleDataIndex.DayPeriodsStandalone],
|
|
995
995
|
];
|
|
996
996
|
const amPm = getLastDefinedValue(amPmData, formStyle);
|
|
997
997
|
return getLastDefinedValue(amPm, width);
|
|
@@ -1012,10 +1012,10 @@ function getLocaleDayPeriods(locale, formStyle, width) {
|
|
|
1012
1012
|
* Use `Intl.DateTimeFormat` for date formating instead.
|
|
1013
1013
|
*/
|
|
1014
1014
|
function getLocaleDayNames(locale, formStyle, width) {
|
|
1015
|
-
const data =
|
|
1015
|
+
const data = _findLocaleData(locale);
|
|
1016
1016
|
const daysData = [
|
|
1017
|
-
data[
|
|
1018
|
-
data[
|
|
1017
|
+
data[_LocaleDataIndex.DaysFormat],
|
|
1018
|
+
data[_LocaleDataIndex.DaysStandalone],
|
|
1019
1019
|
];
|
|
1020
1020
|
const days = getLastDefinedValue(daysData, formStyle);
|
|
1021
1021
|
return getLastDefinedValue(days, width);
|
|
@@ -1036,10 +1036,10 @@ function getLocaleDayNames(locale, formStyle, width) {
|
|
|
1036
1036
|
* Use `Intl.DateTimeFormat` for date formating instead.
|
|
1037
1037
|
*/
|
|
1038
1038
|
function getLocaleMonthNames(locale, formStyle, width) {
|
|
1039
|
-
const data =
|
|
1039
|
+
const data = _findLocaleData(locale);
|
|
1040
1040
|
const monthsData = [
|
|
1041
|
-
data[
|
|
1042
|
-
data[
|
|
1041
|
+
data[_LocaleDataIndex.MonthsFormat],
|
|
1042
|
+
data[_LocaleDataIndex.MonthsStandalone],
|
|
1043
1043
|
];
|
|
1044
1044
|
const months = getLastDefinedValue(monthsData, formStyle);
|
|
1045
1045
|
return getLastDefinedValue(months, width);
|
|
@@ -1059,8 +1059,8 @@ function getLocaleMonthNames(locale, formStyle, width) {
|
|
|
1059
1059
|
* Use `Intl.DateTimeFormat` for date formating instead.
|
|
1060
1060
|
*/
|
|
1061
1061
|
function getLocaleEraNames(locale, width) {
|
|
1062
|
-
const data =
|
|
1063
|
-
const erasData = data[
|
|
1062
|
+
const data = _findLocaleData(locale);
|
|
1063
|
+
const erasData = data[_LocaleDataIndex.Eras];
|
|
1064
1064
|
return getLastDefinedValue(erasData, width);
|
|
1065
1065
|
}
|
|
1066
1066
|
/**
|
|
@@ -1081,8 +1081,8 @@ function getLocaleEraNames(locale, width) {
|
|
|
1081
1081
|
* - Other librairies like [`date-fns`](https://date-fns.org/), [`day.js`](https://day.js.org/en/) or [`weekstart`](https://www.npmjs.com/package/weekstart) library provide their own locale based data for the first day of the week.
|
|
1082
1082
|
*/
|
|
1083
1083
|
function getLocaleFirstDayOfWeek(locale) {
|
|
1084
|
-
const data =
|
|
1085
|
-
return data[
|
|
1084
|
+
const data = _findLocaleData(locale);
|
|
1085
|
+
return data[_LocaleDataIndex.FirstDayOfWeek];
|
|
1086
1086
|
}
|
|
1087
1087
|
/**
|
|
1088
1088
|
* Range of week days that are considered the week-end for the given locale.
|
|
@@ -1098,8 +1098,8 @@ function getLocaleFirstDayOfWeek(locale) {
|
|
|
1098
1098
|
* Libraries like [`Luxon`](https://moment.github.io/luxon/#/) rely on `Intl` but fallback on the ISO 8601 definition (Saturday+Sunday) if `getWeekInfo` is not supported .
|
|
1099
1099
|
*/
|
|
1100
1100
|
function getLocaleWeekEndRange(locale) {
|
|
1101
|
-
const data =
|
|
1102
|
-
return data[
|
|
1101
|
+
const data = _findLocaleData(locale);
|
|
1102
|
+
return data[_LocaleDataIndex.WeekendRange];
|
|
1103
1103
|
}
|
|
1104
1104
|
/**
|
|
1105
1105
|
* Retrieves a localized date-value formatting string.
|
|
@@ -1116,8 +1116,8 @@ function getLocaleWeekEndRange(locale) {
|
|
|
1116
1116
|
* Use `Intl.DateTimeFormat` for date formating instead.
|
|
1117
1117
|
*/
|
|
1118
1118
|
function getLocaleDateFormat(locale, width) {
|
|
1119
|
-
const data =
|
|
1120
|
-
return getLastDefinedValue(data[
|
|
1119
|
+
const data = _findLocaleData(locale);
|
|
1120
|
+
return getLastDefinedValue(data[_LocaleDataIndex.DateFormat], width);
|
|
1121
1121
|
}
|
|
1122
1122
|
/**
|
|
1123
1123
|
* Retrieves a localized time-value formatting string.
|
|
@@ -1133,8 +1133,8 @@ function getLocaleDateFormat(locale, width) {
|
|
|
1133
1133
|
* Use `Intl.DateTimeFormat` for date formating instead.
|
|
1134
1134
|
*/
|
|
1135
1135
|
function getLocaleTimeFormat(locale, width) {
|
|
1136
|
-
const data =
|
|
1137
|
-
return getLastDefinedValue(data[
|
|
1136
|
+
const data = _findLocaleData(locale);
|
|
1137
|
+
return getLastDefinedValue(data[_LocaleDataIndex.TimeFormat], width);
|
|
1138
1138
|
}
|
|
1139
1139
|
/**
|
|
1140
1140
|
* Retrieves a localized date-time formatting string.
|
|
@@ -1151,8 +1151,8 @@ function getLocaleTimeFormat(locale, width) {
|
|
|
1151
1151
|
* Use `Intl.DateTimeFormat` for date formating instead.
|
|
1152
1152
|
*/
|
|
1153
1153
|
function getLocaleDateTimeFormat(locale, width) {
|
|
1154
|
-
const data =
|
|
1155
|
-
const dateTimeFormatData = data[
|
|
1154
|
+
const data = _findLocaleData(locale);
|
|
1155
|
+
const dateTimeFormatData = data[_LocaleDataIndex.DateTimeFormat];
|
|
1156
1156
|
return getLastDefinedValue(dateTimeFormatData, width);
|
|
1157
1157
|
}
|
|
1158
1158
|
/**
|
|
@@ -1169,14 +1169,14 @@ function getLocaleDateTimeFormat(locale, width) {
|
|
|
1169
1169
|
* Use `Intl.NumberFormat` to format numbers instead.
|
|
1170
1170
|
*/
|
|
1171
1171
|
function getLocaleNumberSymbol(locale, symbol) {
|
|
1172
|
-
const data =
|
|
1173
|
-
const res = data[
|
|
1172
|
+
const data = _findLocaleData(locale);
|
|
1173
|
+
const res = data[_LocaleDataIndex.NumberSymbols][symbol];
|
|
1174
1174
|
if (typeof res === 'undefined') {
|
|
1175
1175
|
if (symbol === NumberSymbol.CurrencyDecimal) {
|
|
1176
|
-
return data[
|
|
1176
|
+
return data[_LocaleDataIndex.NumberSymbols][NumberSymbol.Decimal];
|
|
1177
1177
|
}
|
|
1178
1178
|
else if (symbol === NumberSymbol.CurrencyGroup) {
|
|
1179
|
-
return data[
|
|
1179
|
+
return data[_LocaleDataIndex.NumberSymbols][NumberSymbol.Group];
|
|
1180
1180
|
}
|
|
1181
1181
|
}
|
|
1182
1182
|
return res;
|
|
@@ -1220,8 +1220,8 @@ function getLocaleNumberSymbol(locale, symbol) {
|
|
|
1220
1220
|
* Let `Intl.NumberFormat` determine the number format instead
|
|
1221
1221
|
*/
|
|
1222
1222
|
function getLocaleNumberFormat(locale, type) {
|
|
1223
|
-
const data =
|
|
1224
|
-
return data[
|
|
1223
|
+
const data = _findLocaleData(locale);
|
|
1224
|
+
return data[_LocaleDataIndex.NumberFormats][type];
|
|
1225
1225
|
}
|
|
1226
1226
|
/**
|
|
1227
1227
|
* Retrieves the symbol used to represent the currency for the main country
|
|
@@ -1237,8 +1237,8 @@ function getLocaleNumberFormat(locale, type) {
|
|
|
1237
1237
|
* @deprecated Use the `Intl` API to format a currency with from currency code
|
|
1238
1238
|
*/
|
|
1239
1239
|
function getLocaleCurrencySymbol(locale) {
|
|
1240
|
-
const data =
|
|
1241
|
-
return data[
|
|
1240
|
+
const data = _findLocaleData(locale);
|
|
1241
|
+
return data[_LocaleDataIndex.CurrencySymbol] || null;
|
|
1242
1242
|
}
|
|
1243
1243
|
/**
|
|
1244
1244
|
* Retrieves the name of the currency for the main country corresponding
|
|
@@ -1253,8 +1253,8 @@ function getLocaleCurrencySymbol(locale) {
|
|
|
1253
1253
|
* @deprecated Use the `Intl` API to format a currency with from currency code
|
|
1254
1254
|
*/
|
|
1255
1255
|
function getLocaleCurrencyName(locale) {
|
|
1256
|
-
const data =
|
|
1257
|
-
return data[
|
|
1256
|
+
const data = _findLocaleData(locale);
|
|
1257
|
+
return data[_LocaleDataIndex.CurrencyName] || null;
|
|
1258
1258
|
}
|
|
1259
1259
|
/**
|
|
1260
1260
|
* Retrieves the default currency code for the given locale.
|
|
@@ -1270,7 +1270,7 @@ function getLocaleCurrencyName(locale) {
|
|
|
1270
1270
|
* Time relative currency data is provided by the CLDR project. See https://www.unicode.org/cldr/charts/44/supplemental/detailed_territory_currency_information.html
|
|
1271
1271
|
*/
|
|
1272
1272
|
function getLocaleCurrencyCode(locale) {
|
|
1273
|
-
return
|
|
1273
|
+
return _getLocaleCurrencyCode(locale);
|
|
1274
1274
|
}
|
|
1275
1275
|
/**
|
|
1276
1276
|
* Retrieves the currency values for a given locale.
|
|
@@ -1279,8 +1279,8 @@ function getLocaleCurrencyCode(locale) {
|
|
|
1279
1279
|
* @see [Internationalization (i18n) Guide](guide/i18n)
|
|
1280
1280
|
*/
|
|
1281
1281
|
function getLocaleCurrencies(locale) {
|
|
1282
|
-
const data =
|
|
1283
|
-
return data[
|
|
1282
|
+
const data = _findLocaleData(locale);
|
|
1283
|
+
return data[_LocaleDataIndex.Currencies];
|
|
1284
1284
|
}
|
|
1285
1285
|
/**
|
|
1286
1286
|
* @publicApi
|
|
@@ -1288,10 +1288,10 @@ function getLocaleCurrencies(locale) {
|
|
|
1288
1288
|
* @deprecated Angular recommends relying on the `Intl` API for i18n.
|
|
1289
1289
|
* Use `Intl.PluralRules` instead
|
|
1290
1290
|
*/
|
|
1291
|
-
const getLocalePluralCase =
|
|
1291
|
+
const getLocalePluralCase = _getLocalePluralCase;
|
|
1292
1292
|
function checkFullData(data) {
|
|
1293
|
-
if (!data[
|
|
1294
|
-
throw new Error(`Missing extra locale data for the locale "${data[
|
|
1293
|
+
if (!data[_LocaleDataIndex.ExtraData]) {
|
|
1294
|
+
throw new Error(`Missing extra locale data for the locale "${data[_LocaleDataIndex.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`);
|
|
1295
1295
|
}
|
|
1296
1296
|
}
|
|
1297
1297
|
/**
|
|
@@ -1320,9 +1320,9 @@ function checkFullData(data) {
|
|
|
1320
1320
|
* Let `Intl.DateTimeFormat` determine the day period instead.
|
|
1321
1321
|
*/
|
|
1322
1322
|
function getLocaleExtraDayPeriodRules(locale) {
|
|
1323
|
-
const data =
|
|
1323
|
+
const data = _findLocaleData(locale);
|
|
1324
1324
|
checkFullData(data);
|
|
1325
|
-
const rules = data[
|
|
1325
|
+
const rules = data[_LocaleDataIndex.ExtraData][2 /* ɵExtraLocaleDataIndex.ExtraDayPeriodsRules */] || [];
|
|
1326
1326
|
return rules.map((rule) => {
|
|
1327
1327
|
if (typeof rule === 'string') {
|
|
1328
1328
|
return extractTime(rule);
|
|
@@ -1351,11 +1351,11 @@ function getLocaleExtraDayPeriodRules(locale) {
|
|
|
1351
1351
|
* To extract a day period use `Intl.DateTimeFormat` with the `dayPeriod` option instead.
|
|
1352
1352
|
*/
|
|
1353
1353
|
function getLocaleExtraDayPeriods(locale, formStyle, width) {
|
|
1354
|
-
const data =
|
|
1354
|
+
const data = _findLocaleData(locale);
|
|
1355
1355
|
checkFullData(data);
|
|
1356
1356
|
const dayPeriodsData = [
|
|
1357
|
-
data[
|
|
1358
|
-
data[
|
|
1357
|
+
data[_LocaleDataIndex.ExtraData][0 /* ɵExtraLocaleDataIndex.ExtraDayPeriodFormats */],
|
|
1358
|
+
data[_LocaleDataIndex.ExtraData][1 /* ɵExtraLocaleDataIndex.ExtraDayPeriodStandalone */],
|
|
1359
1359
|
];
|
|
1360
1360
|
const dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || [];
|
|
1361
1361
|
return getLastDefinedValue(dayPeriods, width) || [];
|
|
@@ -1374,8 +1374,8 @@ function getLocaleExtraDayPeriods(locale, formStyle, width) {
|
|
|
1374
1374
|
* 3rd party alternatives like [`rtl-detect`](https://www.npmjs.com/package/rtl-detect) can work around this issue.
|
|
1375
1375
|
*/
|
|
1376
1376
|
function getLocaleDirection(locale) {
|
|
1377
|
-
const data =
|
|
1378
|
-
return data[
|
|
1377
|
+
const data = _findLocaleData(locale);
|
|
1378
|
+
return data[_LocaleDataIndex.Directionality];
|
|
1379
1379
|
}
|
|
1380
1380
|
/**
|
|
1381
1381
|
* Retrieves the first value that is defined in an array, going backwards from an index position.
|
|
@@ -1508,7 +1508,7 @@ function formatDate(value, format, locale, timezone) {
|
|
|
1508
1508
|
let dateTimezoneOffset = date.getTimezoneOffset();
|
|
1509
1509
|
if (timezone) {
|
|
1510
1510
|
dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);
|
|
1511
|
-
date = convertTimezoneToLocal(date, timezone
|
|
1511
|
+
date = convertTimezoneToLocal(date, timezone);
|
|
1512
1512
|
}
|
|
1513
1513
|
let text = '';
|
|
1514
1514
|
parts.forEach((value) => {
|
|
@@ -1535,10 +1535,10 @@ function assertValidDateFormat(parts) {
|
|
|
1535
1535
|
const message = `Suspicious use of week-based year "Y" in date pattern "${parts.join('')}". Did you mean to use calendar year "y" instead?`;
|
|
1536
1536
|
if (parts.length === 1) {
|
|
1537
1537
|
// NOTE: allow "YYYY" with just a warning, since it's used in tests.
|
|
1538
|
-
console.error(
|
|
1538
|
+
console.error(_formatRuntimeError(2300 /* RuntimeErrorCode.SUSPICIOUS_DATE_FORMAT */, message));
|
|
1539
1539
|
}
|
|
1540
1540
|
else {
|
|
1541
|
-
throw new
|
|
1541
|
+
throw new _RuntimeError(2300 /* RuntimeErrorCode.SUSPICIOUS_DATE_FORMAT */, message);
|
|
1542
1542
|
}
|
|
1543
1543
|
}
|
|
1544
1544
|
}
|
|
@@ -1712,7 +1712,7 @@ function getDatePart(part, date) {
|
|
|
1712
1712
|
case 7 /* DateType.Day */:
|
|
1713
1713
|
return date.getDay();
|
|
1714
1714
|
default:
|
|
1715
|
-
throw new
|
|
1715
|
+
throw new _RuntimeError(2301 /* RuntimeErrorCode.UNKNOWN_DATE_TYPE_VALUE */, ngDevMode && `Unknown DateType value "${part}".`);
|
|
1716
1716
|
}
|
|
1717
1717
|
}
|
|
1718
1718
|
/**
|
|
@@ -1785,7 +1785,7 @@ function getDateTranslation(date, locale, name, width, form, extended) {
|
|
|
1785
1785
|
// The `throw new Error` below works around the problem, and the unexpected: never variable
|
|
1786
1786
|
// makes sure tsc still checks this code is unreachable.
|
|
1787
1787
|
const unexpected = name;
|
|
1788
|
-
throw new
|
|
1788
|
+
throw new _RuntimeError(2302 /* RuntimeErrorCode.UNEXPECTED_TRANSLATION_TYPE */, ngDevMode && `unexpected translation type ${unexpected}`);
|
|
1789
1789
|
}
|
|
1790
1790
|
}
|
|
1791
1791
|
/**
|
|
@@ -1822,7 +1822,7 @@ function timeZoneGetter(width) {
|
|
|
1822
1822
|
padNumber(Math.abs(zone % 60), 2, minusSign));
|
|
1823
1823
|
}
|
|
1824
1824
|
default:
|
|
1825
|
-
throw new
|
|
1825
|
+
throw new _RuntimeError(2302 /* RuntimeErrorCode.UNKNOWN_ZONE_WIDTH */, ngDevMode && `Unknown zone width "${width}"`);
|
|
1826
1826
|
}
|
|
1827
1827
|
};
|
|
1828
1828
|
}
|
|
@@ -2128,7 +2128,7 @@ function addDateMinutes(date, minutes) {
|
|
|
2128
2128
|
return date;
|
|
2129
2129
|
}
|
|
2130
2130
|
function convertTimezoneToLocal(date, timezone, reverse) {
|
|
2131
|
-
const reverseValue =
|
|
2131
|
+
const reverseValue = -1 ;
|
|
2132
2132
|
const dateTimezoneOffset = date.getTimezoneOffset();
|
|
2133
2133
|
const timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);
|
|
2134
2134
|
return addDateMinutes(date, reverseValue * (timezoneOffset - dateTimezoneOffset));
|
|
@@ -2177,7 +2177,7 @@ function toDate(value) {
|
|
|
2177
2177
|
}
|
|
2178
2178
|
const date = new Date(value);
|
|
2179
2179
|
if (!isDate(date)) {
|
|
2180
|
-
throw new
|
|
2180
|
+
throw new _RuntimeError(2302 /* RuntimeErrorCode.INVALID_TO_DATE_CONVERSION */, ngDevMode && `Unable to convert "${value}" into a date`);
|
|
2181
2181
|
}
|
|
2182
2182
|
return date;
|
|
2183
2183
|
}
|
|
@@ -2604,10 +2604,10 @@ function parseIntAutoRadix(text) {
|
|
|
2604
2604
|
* @publicApi
|
|
2605
2605
|
*/
|
|
2606
2606
|
class NgLocalization {
|
|
2607
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
2608
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
2607
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2608
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgLocalization, providedIn: 'root', useFactory: (locale) => new NgLocaleLocalization(locale), deps: [{ token: LOCALE_ID }] });
|
|
2609
2609
|
}
|
|
2610
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
2610
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgLocalization, decorators: [{
|
|
2611
2611
|
type: Injectable,
|
|
2612
2612
|
args: [{
|
|
2613
2613
|
providedIn: 'root',
|
|
@@ -2662,10 +2662,10 @@ class NgLocaleLocalization extends NgLocalization {
|
|
|
2662
2662
|
return 'other';
|
|
2663
2663
|
}
|
|
2664
2664
|
}
|
|
2665
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
2666
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
2665
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgLocaleLocalization, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2666
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgLocaleLocalization });
|
|
2667
2667
|
}
|
|
2668
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
2668
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgLocaleLocalization, decorators: [{
|
|
2669
2669
|
type: Injectable
|
|
2670
2670
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
2671
2671
|
type: Inject,
|
|
@@ -2682,7 +2682,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.0",
|
|
|
2682
2682
|
* @publicApi
|
|
2683
2683
|
*/
|
|
2684
2684
|
function registerLocaleData(data, localeId, extraData) {
|
|
2685
|
-
return
|
|
2685
|
+
return _registerLocaleData(data, localeId, extraData);
|
|
2686
2686
|
}
|
|
2687
2687
|
|
|
2688
2688
|
function parseCookieValue(cookieStr, name) {
|
|
@@ -2831,7 +2831,7 @@ class NgClass {
|
|
|
2831
2831
|
_toggleClass(klass, enabled) {
|
|
2832
2832
|
if (ngDevMode) {
|
|
2833
2833
|
if (typeof klass !== 'string') {
|
|
2834
|
-
throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${
|
|
2834
|
+
throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${_stringify(klass)}`);
|
|
2835
2835
|
}
|
|
2836
2836
|
}
|
|
2837
2837
|
klass = klass.trim();
|
|
@@ -2846,10 +2846,10 @@ class NgClass {
|
|
|
2846
2846
|
});
|
|
2847
2847
|
}
|
|
2848
2848
|
}
|
|
2849
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
2850
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
2849
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgClass, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2850
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.2", type: NgClass, isStandalone: true, selector: "[ngClass]", inputs: { klass: ["class", "klass"], ngClass: "ngClass" }, ngImport: i0 });
|
|
2851
2851
|
}
|
|
2852
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
2852
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgClass, decorators: [{
|
|
2853
2853
|
type: Directive,
|
|
2854
2854
|
args: [{
|
|
2855
2855
|
selector: '[ngClass]',
|
|
@@ -2863,7 +2863,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.0",
|
|
|
2863
2863
|
}] } });
|
|
2864
2864
|
|
|
2865
2865
|
/**
|
|
2866
|
-
* Instantiates a {@link Component} type and inserts its Host View into the current View.
|
|
2866
|
+
* Instantiates a {@link /api/core/Component Component} type and inserts its Host View into the current View.
|
|
2867
2867
|
* `NgComponentOutlet` provides a declarative approach for dynamic component creation.
|
|
2868
2868
|
*
|
|
2869
2869
|
* `NgComponentOutlet` requires a component type, if a falsy value is set the view will clear and
|
|
@@ -3036,10 +3036,10 @@ class NgComponentOutlet {
|
|
|
3036
3036
|
}
|
|
3037
3037
|
}
|
|
3038
3038
|
}
|
|
3039
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
3040
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
3039
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgComponentOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3040
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.2", type: NgComponentOutlet, isStandalone: true, selector: "[ngComponentOutlet]", inputs: { ngComponentOutlet: "ngComponentOutlet", ngComponentOutletInputs: "ngComponentOutletInputs", ngComponentOutletInjector: "ngComponentOutletInjector", ngComponentOutletContent: "ngComponentOutletContent", ngComponentOutletNgModule: "ngComponentOutletNgModule", ngComponentOutletNgModuleFactory: "ngComponentOutletNgModuleFactory" }, exportAs: ["ngComponentOutlet"], usesOnChanges: true, ngImport: i0 });
|
|
3041
3041
|
}
|
|
3042
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
3042
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgComponentOutlet, decorators: [{
|
|
3043
3043
|
type: Directive,
|
|
3044
3044
|
args: [{
|
|
3045
3045
|
selector: '[ngComponentOutlet]',
|
|
@@ -3291,7 +3291,7 @@ class NgForOf {
|
|
|
3291
3291
|
if (typeof value === 'object') {
|
|
3292
3292
|
errorMessage += ' Did you mean to use the keyvalue pipe?';
|
|
3293
3293
|
}
|
|
3294
|
-
throw new
|
|
3294
|
+
throw new _RuntimeError(-2200 /* RuntimeErrorCode.NG_FOR_MISSING_DIFFER */, errorMessage);
|
|
3295
3295
|
}
|
|
3296
3296
|
}
|
|
3297
3297
|
else {
|
|
@@ -3346,10 +3346,10 @@ class NgForOf {
|
|
|
3346
3346
|
static ngTemplateContextGuard(dir, ctx) {
|
|
3347
3347
|
return true;
|
|
3348
3348
|
}
|
|
3349
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
3350
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
3349
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgForOf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3350
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.2", type: NgForOf, isStandalone: true, selector: "[ngFor][ngForOf]", inputs: { ngForOf: "ngForOf", ngForTrackBy: "ngForTrackBy", ngForTemplate: "ngForTemplate" }, ngImport: i0 });
|
|
3351
3351
|
}
|
|
3352
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
3352
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgForOf, decorators: [{
|
|
3353
3353
|
type: Directive,
|
|
3354
3354
|
args: [{
|
|
3355
3355
|
selector: '[ngFor][ngForOf]',
|
|
@@ -3529,7 +3529,7 @@ class NgIf {
|
|
|
3529
3529
|
* A template to show if the condition expression evaluates to true.
|
|
3530
3530
|
*/
|
|
3531
3531
|
set ngIfThen(templateRef) {
|
|
3532
|
-
assertTemplate('
|
|
3532
|
+
assertTemplate(templateRef, (typeof ngDevMode === 'undefined' || ngDevMode) && 'ngIfThen');
|
|
3533
3533
|
this._thenTemplateRef = templateRef;
|
|
3534
3534
|
this._thenViewRef = null; // clear previous view if any.
|
|
3535
3535
|
this._updateView();
|
|
@@ -3538,7 +3538,7 @@ class NgIf {
|
|
|
3538
3538
|
* A template to show if the condition expression evaluates to false.
|
|
3539
3539
|
*/
|
|
3540
3540
|
set ngIfElse(templateRef) {
|
|
3541
|
-
assertTemplate('
|
|
3541
|
+
assertTemplate(templateRef, (typeof ngDevMode === 'undefined' || ngDevMode) && 'ngIfElse');
|
|
3542
3542
|
this._elseTemplateRef = templateRef;
|
|
3543
3543
|
this._elseViewRef = null; // clear previous view if any.
|
|
3544
3544
|
this._updateView();
|
|
@@ -3583,10 +3583,10 @@ class NgIf {
|
|
|
3583
3583
|
static ngTemplateContextGuard(dir, ctx) {
|
|
3584
3584
|
return true;
|
|
3585
3585
|
}
|
|
3586
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
3587
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
3586
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgIf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3587
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.2", type: NgIf, isStandalone: true, selector: "[ngIf]", inputs: { ngIf: "ngIf", ngIfThen: "ngIfThen", ngIfElse: "ngIfElse" }, ngImport: i0 });
|
|
3588
3588
|
}
|
|
3589
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
3589
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgIf, decorators: [{
|
|
3590
3590
|
type: Directive,
|
|
3591
3591
|
args: [{
|
|
3592
3592
|
selector: '[ngIf]',
|
|
@@ -3605,10 +3605,10 @@ class NgIfContext {
|
|
|
3605
3605
|
$implicit = null;
|
|
3606
3606
|
ngIf = null;
|
|
3607
3607
|
}
|
|
3608
|
-
function assertTemplate(
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3608
|
+
function assertTemplate(templateRef, property) {
|
|
3609
|
+
if (templateRef && !templateRef.createEmbeddedView) {
|
|
3610
|
+
throw new _RuntimeError(2020 /* RuntimeErrorCode.NG_IF_NOT_A_TEMPLATE_REF */, (typeof ngDevMode === 'undefined' || ngDevMode) &&
|
|
3611
|
+
`${property} must be a TemplateRef, but received '${_stringify(templateRef)}'.`);
|
|
3612
3612
|
}
|
|
3613
3613
|
}
|
|
3614
3614
|
|
|
@@ -3744,10 +3744,10 @@ class NgSwitch {
|
|
|
3744
3744
|
}
|
|
3745
3745
|
}
|
|
3746
3746
|
}
|
|
3747
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
3748
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
3747
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3748
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.2", type: NgSwitch, isStandalone: true, selector: "[ngSwitch]", inputs: { ngSwitch: "ngSwitch" }, ngImport: i0 });
|
|
3749
3749
|
}
|
|
3750
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
3750
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgSwitch, decorators: [{
|
|
3751
3751
|
type: Directive,
|
|
3752
3752
|
args: [{
|
|
3753
3753
|
selector: '[ngSwitch]',
|
|
@@ -3810,10 +3810,10 @@ class NgSwitchCase {
|
|
|
3810
3810
|
ngDoCheck() {
|
|
3811
3811
|
this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase));
|
|
3812
3812
|
}
|
|
3813
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
3814
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
3813
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgSwitchCase, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3814
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.2", type: NgSwitchCase, isStandalone: true, selector: "[ngSwitchCase]", inputs: { ngSwitchCase: "ngSwitchCase" }, ngImport: i0 });
|
|
3815
3815
|
}
|
|
3816
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
3816
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgSwitchCase, decorators: [{
|
|
3817
3817
|
type: Directive,
|
|
3818
3818
|
args: [{
|
|
3819
3819
|
selector: '[ngSwitchCase]',
|
|
@@ -3846,10 +3846,10 @@ class NgSwitchDefault {
|
|
|
3846
3846
|
}
|
|
3847
3847
|
ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));
|
|
3848
3848
|
}
|
|
3849
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
3850
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
3849
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgSwitchDefault, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3850
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.2", type: NgSwitchDefault, isStandalone: true, selector: "[ngSwitchDefault]", ngImport: i0 });
|
|
3851
3851
|
}
|
|
3852
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
3852
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgSwitchDefault, decorators: [{
|
|
3853
3853
|
type: Directive,
|
|
3854
3854
|
args: [{
|
|
3855
3855
|
selector: '[ngSwitchDefault]',
|
|
@@ -3860,7 +3860,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.0",
|
|
|
3860
3860
|
type: Host
|
|
3861
3861
|
}] }] });
|
|
3862
3862
|
function throwNgSwitchProviderNotFoundError(attrName, directiveName) {
|
|
3863
|
-
throw new
|
|
3863
|
+
throw new _RuntimeError(2000 /* RuntimeErrorCode.PARENT_NG_SWITCH_NOT_FOUND */, `An element with the "${attrName}" attribute ` +
|
|
3864
3864
|
`(matching the "${directiveName}" directive) must be located inside an element with the "ngSwitch" attribute ` +
|
|
3865
3865
|
`(matching "NgSwitch" directive)`);
|
|
3866
3866
|
}
|
|
@@ -3925,10 +3925,10 @@ class NgPlural {
|
|
|
3925
3925
|
this._activeView.create();
|
|
3926
3926
|
}
|
|
3927
3927
|
}
|
|
3928
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
3929
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
3928
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgPlural, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3929
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.2", type: NgPlural, isStandalone: true, selector: "[ngPlural]", inputs: { ngPlural: "ngPlural" }, ngImport: i0 });
|
|
3930
3930
|
}
|
|
3931
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
3931
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgPlural, decorators: [{
|
|
3932
3932
|
type: Directive,
|
|
3933
3933
|
args: [{
|
|
3934
3934
|
selector: '[ngPlural]',
|
|
@@ -3963,10 +3963,10 @@ class NgPluralCase {
|
|
|
3963
3963
|
const isANumber = !isNaN(Number(value));
|
|
3964
3964
|
ngPlural.addCase(isANumber ? `=${value}` : value, new SwitchView(viewContainer, template));
|
|
3965
3965
|
}
|
|
3966
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
3967
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
3966
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgPluralCase, deps: [{ token: 'ngPluralCase', attribute: true }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: NgPlural, host: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3967
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.2", type: NgPluralCase, isStandalone: true, selector: "[ngPluralCase]", ngImport: i0 });
|
|
3968
3968
|
}
|
|
3969
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
3969
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgPluralCase, decorators: [{
|
|
3970
3970
|
type: Directive,
|
|
3971
3971
|
args: [{
|
|
3972
3972
|
selector: '[ngPluralCase]',
|
|
@@ -4059,10 +4059,10 @@ class NgStyle {
|
|
|
4059
4059
|
changes.forEachAddedItem((record) => this._setStyle(record.key, record.currentValue));
|
|
4060
4060
|
changes.forEachChangedItem((record) => this._setStyle(record.key, record.currentValue));
|
|
4061
4061
|
}
|
|
4062
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4063
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
4062
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgStyle, deps: [{ token: i0.ElementRef }, { token: i0.KeyValueDiffers }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4063
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.2", type: NgStyle, isStandalone: true, selector: "[ngStyle]", inputs: { ngStyle: "ngStyle" }, ngImport: i0 });
|
|
4064
4064
|
}
|
|
4065
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4065
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgStyle, decorators: [{
|
|
4066
4066
|
type: Directive,
|
|
4067
4067
|
args: [{
|
|
4068
4068
|
selector: '[ngStyle]',
|
|
@@ -4163,10 +4163,10 @@ class NgTemplateOutlet {
|
|
|
4163
4163
|
},
|
|
4164
4164
|
});
|
|
4165
4165
|
}
|
|
4166
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4167
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
4166
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgTemplateOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4167
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.0-next.2", type: NgTemplateOutlet, isStandalone: true, selector: "[ngTemplateOutlet]", inputs: { ngTemplateOutletContext: "ngTemplateOutletContext", ngTemplateOutlet: "ngTemplateOutlet", ngTemplateOutletInjector: "ngTemplateOutletInjector" }, usesOnChanges: true, ngImport: i0 });
|
|
4168
4168
|
}
|
|
4169
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4169
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgTemplateOutlet, decorators: [{
|
|
4170
4170
|
type: Directive,
|
|
4171
4171
|
args: [{
|
|
4172
4172
|
selector: '[ngTemplateOutlet]',
|
|
@@ -4198,11 +4198,11 @@ const COMMON_DIRECTIVES = [
|
|
|
4198
4198
|
];
|
|
4199
4199
|
|
|
4200
4200
|
function invalidPipeArgumentError(type, value) {
|
|
4201
|
-
return new
|
|
4201
|
+
return new _RuntimeError(2100 /* RuntimeErrorCode.INVALID_PIPE_ARGUMENT */, ngDevMode && `InvalidPipeArgument: '${value}' for pipe '${_stringify(type)}'`);
|
|
4202
4202
|
}
|
|
4203
4203
|
|
|
4204
4204
|
class SubscribableStrategy {
|
|
4205
|
-
createSubscription(async, updateLatestValue) {
|
|
4205
|
+
createSubscription(async, updateLatestValue, onError) {
|
|
4206
4206
|
// Subscription can be side-effectful, and we don't want any signal reads which happen in the
|
|
4207
4207
|
// side effect of the subscription to be tracked by a component's template when that
|
|
4208
4208
|
// subscription is triggered via the async pipe. So we wrap the subscription in `untracked` to
|
|
@@ -4212,9 +4212,7 @@ class SubscribableStrategy {
|
|
|
4212
4212
|
// being treated as signal writes during the template evaluation (which throws errors).
|
|
4213
4213
|
return untracked(() => async.subscribe({
|
|
4214
4214
|
next: updateLatestValue,
|
|
4215
|
-
error:
|
|
4216
|
-
throw e;
|
|
4217
|
-
},
|
|
4215
|
+
error: onError,
|
|
4218
4216
|
}));
|
|
4219
4217
|
}
|
|
4220
4218
|
dispose(subscription) {
|
|
@@ -4223,10 +4221,8 @@ class SubscribableStrategy {
|
|
|
4223
4221
|
}
|
|
4224
4222
|
}
|
|
4225
4223
|
class PromiseStrategy {
|
|
4226
|
-
createSubscription(async, updateLatestValue) {
|
|
4227
|
-
return async.then(updateLatestValue,
|
|
4228
|
-
throw e;
|
|
4229
|
-
});
|
|
4224
|
+
createSubscription(async, updateLatestValue, onError) {
|
|
4225
|
+
return async.then(updateLatestValue, onError);
|
|
4230
4226
|
}
|
|
4231
4227
|
dispose(subscription) { }
|
|
4232
4228
|
}
|
|
@@ -4267,6 +4263,7 @@ class AsyncPipe {
|
|
|
4267
4263
|
_subscription = null;
|
|
4268
4264
|
_obj = null;
|
|
4269
4265
|
_strategy = null;
|
|
4266
|
+
applicationErrorHandler = inject(_INTERNAL_APPLICATION_ERROR_HANDLER);
|
|
4270
4267
|
constructor(ref) {
|
|
4271
4268
|
// Assign `ref` into `this._ref` manually instead of declaring `_ref` in the constructor
|
|
4272
4269
|
// parameter list, as the type of `this._ref` includes `null` unlike the type of `ref`.
|
|
@@ -4307,13 +4304,13 @@ class AsyncPipe {
|
|
|
4307
4304
|
_subscribe(obj) {
|
|
4308
4305
|
this._obj = obj;
|
|
4309
4306
|
this._strategy = this._selectStrategy(obj);
|
|
4310
|
-
this._subscription = this._strategy.createSubscription(obj, (value) => this._updateLatestValue(obj, value));
|
|
4307
|
+
this._subscription = this._strategy.createSubscription(obj, (value) => this._updateLatestValue(obj, value), (e) => this.applicationErrorHandler(e));
|
|
4311
4308
|
}
|
|
4312
4309
|
_selectStrategy(obj) {
|
|
4313
|
-
if (
|
|
4310
|
+
if (_isPromise(obj)) {
|
|
4314
4311
|
return _promiseStrategy;
|
|
4315
4312
|
}
|
|
4316
|
-
if (
|
|
4313
|
+
if (_isSubscribable(obj)) {
|
|
4317
4314
|
return _subscribableStrategy;
|
|
4318
4315
|
}
|
|
4319
4316
|
throw invalidPipeArgumentError(AsyncPipe, obj);
|
|
@@ -4334,10 +4331,10 @@ class AsyncPipe {
|
|
|
4334
4331
|
}
|
|
4335
4332
|
}
|
|
4336
4333
|
}
|
|
4337
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4338
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
4334
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: AsyncPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4335
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.2", ngImport: i0, type: AsyncPipe, isStandalone: true, name: "async", pure: false });
|
|
4339
4336
|
}
|
|
4340
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4337
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: AsyncPipe, decorators: [{
|
|
4341
4338
|
type: Pipe,
|
|
4342
4339
|
args: [{
|
|
4343
4340
|
name: 'async',
|
|
@@ -4369,10 +4366,10 @@ class LowerCasePipe {
|
|
|
4369
4366
|
}
|
|
4370
4367
|
return value.toLowerCase();
|
|
4371
4368
|
}
|
|
4372
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4373
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
4369
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4370
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.2", ngImport: i0, type: LowerCasePipe, isStandalone: true, name: "lowercase" });
|
|
4374
4371
|
}
|
|
4375
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4372
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: LowerCasePipe, decorators: [{
|
|
4376
4373
|
type: Pipe,
|
|
4377
4374
|
args: [{
|
|
4378
4375
|
name: 'lowercase',
|
|
@@ -4413,10 +4410,10 @@ class TitleCasePipe {
|
|
|
4413
4410
|
}
|
|
4414
4411
|
return value.replace(unicodeWordMatch, (txt) => txt[0].toUpperCase() + txt.slice(1).toLowerCase());
|
|
4415
4412
|
}
|
|
4416
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4417
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
4413
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4414
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.2", ngImport: i0, type: TitleCasePipe, isStandalone: true, name: "titlecase" });
|
|
4418
4415
|
}
|
|
4419
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4416
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: TitleCasePipe, decorators: [{
|
|
4420
4417
|
type: Pipe,
|
|
4421
4418
|
args: [{
|
|
4422
4419
|
name: 'titlecase',
|
|
@@ -4439,10 +4436,10 @@ class UpperCasePipe {
|
|
|
4439
4436
|
}
|
|
4440
4437
|
return value.toUpperCase();
|
|
4441
4438
|
}
|
|
4442
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4443
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
4439
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4440
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.2", ngImport: i0, type: UpperCasePipe, isStandalone: true, name: "uppercase" });
|
|
4444
4441
|
}
|
|
4445
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4442
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: UpperCasePipe, decorators: [{
|
|
4446
4443
|
type: Pipe,
|
|
4447
4444
|
args: [{
|
|
4448
4445
|
name: 'uppercase',
|
|
@@ -4673,10 +4670,10 @@ class DatePipe {
|
|
|
4673
4670
|
throw invalidPipeArgumentError(DatePipe, error.message);
|
|
4674
4671
|
}
|
|
4675
4672
|
}
|
|
4676
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4677
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
4673
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: DatePipe, deps: [{ token: LOCALE_ID }, { token: DATE_PIPE_DEFAULT_TIMEZONE, optional: true }, { token: DATE_PIPE_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4674
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.2", ngImport: i0, type: DatePipe, isStandalone: true, name: "date" });
|
|
4678
4675
|
}
|
|
4679
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4676
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: DatePipe, decorators: [{
|
|
4680
4677
|
type: Pipe,
|
|
4681
4678
|
args: [{
|
|
4682
4679
|
name: 'date',
|
|
@@ -4732,10 +4729,10 @@ class I18nPluralPipe {
|
|
|
4732
4729
|
const key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale);
|
|
4733
4730
|
return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());
|
|
4734
4731
|
}
|
|
4735
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4736
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
4732
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: I18nPluralPipe, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4733
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.2", ngImport: i0, type: I18nPluralPipe, isStandalone: true, name: "i18nPlural" });
|
|
4737
4734
|
}
|
|
4738
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4735
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: I18nPluralPipe, decorators: [{
|
|
4739
4736
|
type: Pipe,
|
|
4740
4737
|
args: [{
|
|
4741
4738
|
name: 'i18nPlural',
|
|
@@ -4779,10 +4776,10 @@ class I18nSelectPipe {
|
|
|
4779
4776
|
}
|
|
4780
4777
|
return '';
|
|
4781
4778
|
}
|
|
4782
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4783
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
4779
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4780
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.2", ngImport: i0, type: I18nSelectPipe, isStandalone: true, name: "i18nSelect" });
|
|
4784
4781
|
}
|
|
4785
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4782
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: I18nSelectPipe, decorators: [{
|
|
4786
4783
|
type: Pipe,
|
|
4787
4784
|
args: [{
|
|
4788
4785
|
name: 'i18nSelect',
|
|
@@ -4811,10 +4808,10 @@ class JsonPipe {
|
|
|
4811
4808
|
transform(value) {
|
|
4812
4809
|
return JSON.stringify(value, null, 2);
|
|
4813
4810
|
}
|
|
4814
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4815
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
4811
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4812
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.2", ngImport: i0, type: JsonPipe, isStandalone: true, name: "json", pure: false });
|
|
4816
4813
|
}
|
|
4817
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4814
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: JsonPipe, decorators: [{
|
|
4818
4815
|
type: Pipe,
|
|
4819
4816
|
args: [{
|
|
4820
4817
|
name: 'json',
|
|
@@ -4876,10 +4873,10 @@ class KeyValuePipe {
|
|
|
4876
4873
|
}
|
|
4877
4874
|
return this.keyValues;
|
|
4878
4875
|
}
|
|
4879
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4880
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
4876
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: KeyValuePipe, deps: [{ token: i0.KeyValueDiffers }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4877
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.2", ngImport: i0, type: KeyValuePipe, isStandalone: true, name: "keyvalue", pure: false });
|
|
4881
4878
|
}
|
|
4882
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4879
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: KeyValuePipe, decorators: [{
|
|
4883
4880
|
type: Pipe,
|
|
4884
4881
|
args: [{
|
|
4885
4882
|
name: 'keyvalue',
|
|
@@ -4996,10 +4993,10 @@ class DecimalPipe {
|
|
|
4996
4993
|
throw invalidPipeArgumentError(DecimalPipe, error.message);
|
|
4997
4994
|
}
|
|
4998
4995
|
}
|
|
4999
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
5000
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
4996
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: DecimalPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4997
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.2", ngImport: i0, type: DecimalPipe, isStandalone: true, name: "number" });
|
|
5001
4998
|
}
|
|
5002
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4999
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: DecimalPipe, decorators: [{
|
|
5003
5000
|
type: Pipe,
|
|
5004
5001
|
args: [{
|
|
5005
5002
|
name: 'number',
|
|
@@ -5061,10 +5058,10 @@ class PercentPipe {
|
|
|
5061
5058
|
throw invalidPipeArgumentError(PercentPipe, error.message);
|
|
5062
5059
|
}
|
|
5063
5060
|
}
|
|
5064
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
5065
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
5061
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: PercentPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
5062
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.2", ngImport: i0, type: PercentPipe, isStandalone: true, name: "percent" });
|
|
5066
5063
|
}
|
|
5067
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
5064
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: PercentPipe, decorators: [{
|
|
5068
5065
|
type: Pipe,
|
|
5069
5066
|
args: [{
|
|
5070
5067
|
name: 'percent',
|
|
@@ -5128,10 +5125,10 @@ class CurrencyPipe {
|
|
|
5128
5125
|
throw invalidPipeArgumentError(CurrencyPipe, error.message);
|
|
5129
5126
|
}
|
|
5130
5127
|
}
|
|
5131
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
5132
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
5128
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: CurrencyPipe, deps: [{ token: LOCALE_ID }, { token: DEFAULT_CURRENCY_CODE }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
5129
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.2", ngImport: i0, type: CurrencyPipe, isStandalone: true, name: "currency" });
|
|
5133
5130
|
}
|
|
5134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
5131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: CurrencyPipe, decorators: [{
|
|
5135
5132
|
type: Pipe,
|
|
5136
5133
|
args: [{
|
|
5137
5134
|
name: 'currency',
|
|
@@ -5205,10 +5202,10 @@ class SlicePipe {
|
|
|
5205
5202
|
}
|
|
5206
5203
|
return value.slice(start, end);
|
|
5207
5204
|
}
|
|
5208
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
5209
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
5205
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
5206
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.0-next.2", ngImport: i0, type: SlicePipe, isStandalone: true, name: "slice", pure: false });
|
|
5210
5207
|
}
|
|
5211
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
5208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: SlicePipe, decorators: [{
|
|
5212
5209
|
type: Pipe,
|
|
5213
5210
|
args: [{
|
|
5214
5211
|
name: 'slice',
|
|
@@ -5251,11 +5248,11 @@ const COMMON_PIPES = [
|
|
|
5251
5248
|
* @publicApi
|
|
5252
5249
|
*/
|
|
5253
5250
|
class CommonModule {
|
|
5254
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
5255
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
5256
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
5251
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5252
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0-next.2", ngImport: i0, type: CommonModule, imports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe], exports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe] });
|
|
5253
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: CommonModule });
|
|
5257
5254
|
}
|
|
5258
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
5255
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: CommonModule, decorators: [{
|
|
5259
5256
|
type: NgModule,
|
|
5260
5257
|
args: [{
|
|
5261
5258
|
imports: [COMMON_DIRECTIVES, COMMON_PIPES],
|
|
@@ -5288,7 +5285,7 @@ function isPlatformServer(platformId) {
|
|
|
5288
5285
|
/**
|
|
5289
5286
|
* @publicApi
|
|
5290
5287
|
*/
|
|
5291
|
-
const VERSION = new Version('20.0.0-next.
|
|
5288
|
+
const VERSION = new Version('20.0.0-next.2');
|
|
5292
5289
|
|
|
5293
5290
|
/**
|
|
5294
5291
|
* Defines a scroll position manager. Implemented by `BrowserViewportScroller`.
|
|
@@ -5299,7 +5296,7 @@ class ViewportScroller {
|
|
|
5299
5296
|
// De-sugared tree-shakable injection
|
|
5300
5297
|
// See #23917
|
|
5301
5298
|
/** @nocollapse */
|
|
5302
|
-
static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */
|
|
5299
|
+
static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ __defineInjectable({
|
|
5303
5300
|
token: ViewportScroller,
|
|
5304
5301
|
providedIn: 'root',
|
|
5305
5302
|
factory: () => typeof ngServerMode !== 'undefined' && ngServerMode
|
|
@@ -5545,12 +5542,12 @@ function createImageLoader(buildUrlFn, exampleUrls) {
|
|
|
5545
5542
|
};
|
|
5546
5543
|
}
|
|
5547
5544
|
function throwInvalidPathError(path, exampleUrls) {
|
|
5548
|
-
throw new
|
|
5545
|
+
throw new _RuntimeError(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, ngDevMode &&
|
|
5549
5546
|
`Image loader has detected an invalid path (\`${path}\`). ` +
|
|
5550
5547
|
`To fix this, supply a path using one of the following formats: ${exampleUrls.join(' or ')}`);
|
|
5551
5548
|
}
|
|
5552
5549
|
function throwUnexpectedAbsoluteUrlError(path, url) {
|
|
5553
|
-
throw new
|
|
5550
|
+
throw new _RuntimeError(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, ngDevMode &&
|
|
5554
5551
|
`Image loader has detected a \`<img>\` tag with an invalid \`ngSrc\` attribute: ${url}. ` +
|
|
5555
5552
|
`This image loader expects \`ngSrc\` to be a relative URL - ` +
|
|
5556
5553
|
`however the provided value is an absolute URL. ` +
|
|
@@ -5742,7 +5739,7 @@ function isNetlifyUrl(url) {
|
|
|
5742
5739
|
*/
|
|
5743
5740
|
function provideNetlifyLoader(path) {
|
|
5744
5741
|
if (path && !isValidPath(path)) {
|
|
5745
|
-
throw new
|
|
5742
|
+
throw new _RuntimeError(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, ngDevMode &&
|
|
5746
5743
|
`Image loader has detected an invalid path (\`${path}\`). ` +
|
|
5747
5744
|
`To fix this, supply either the full URL to the Netlify site, or leave it empty to use the current site.`);
|
|
5748
5745
|
}
|
|
@@ -5786,7 +5783,7 @@ function createNetlifyUrl(config, path) {
|
|
|
5786
5783
|
}
|
|
5787
5784
|
else {
|
|
5788
5785
|
if (ngDevMode) {
|
|
5789
|
-
console.warn(
|
|
5786
|
+
console.warn(_formatRuntimeError(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, `The Netlify image loader has detected an \`<img>\` tag with the unsupported attribute "\`${param}\`".`));
|
|
5790
5787
|
}
|
|
5791
5788
|
}
|
|
5792
5789
|
}
|
|
@@ -5809,7 +5806,7 @@ function imgDirectiveDetails(ngSrc, includeNgSrc = true) {
|
|
|
5809
5806
|
*/
|
|
5810
5807
|
function assertDevMode(checkName) {
|
|
5811
5808
|
if (!ngDevMode) {
|
|
5812
|
-
throw new
|
|
5809
|
+
throw new _RuntimeError(2958 /* RuntimeErrorCode.UNEXPECTED_DEV_MODE_CHECK_IN_PROD_MODE */, `Unexpected invocation of the ${checkName} in the prod mode. ` +
|
|
5813
5810
|
`Please make sure that the prod mode is enabled for production builds.`);
|
|
5814
5811
|
}
|
|
5815
5812
|
}
|
|
@@ -5906,23 +5903,23 @@ class LCPImageObserver {
|
|
|
5906
5903
|
this.observer.disconnect();
|
|
5907
5904
|
this.images.clear();
|
|
5908
5905
|
}
|
|
5909
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
5910
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
5906
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5907
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: LCPImageObserver, providedIn: 'root' });
|
|
5911
5908
|
}
|
|
5912
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
5909
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: LCPImageObserver, decorators: [{
|
|
5913
5910
|
type: Injectable,
|
|
5914
5911
|
args: [{ providedIn: 'root' }]
|
|
5915
5912
|
}], ctorParameters: () => [] });
|
|
5916
5913
|
function logMissingPriorityError(ngSrc) {
|
|
5917
5914
|
const directiveDetails = imgDirectiveDetails(ngSrc);
|
|
5918
|
-
console.error(
|
|
5915
|
+
console.error(_formatRuntimeError(2955 /* RuntimeErrorCode.LCP_IMG_MISSING_PRIORITY */, `${directiveDetails} this image is the Largest Contentful Paint (LCP) ` +
|
|
5919
5916
|
`element but was not marked "priority". This image should be marked ` +
|
|
5920
5917
|
`"priority" in order to prioritize its loading. ` +
|
|
5921
5918
|
`To fix this, add the "priority" attribute.`));
|
|
5922
5919
|
}
|
|
5923
5920
|
function logModifiedWarning(ngSrc) {
|
|
5924
5921
|
const directiveDetails = imgDirectiveDetails(ngSrc);
|
|
5925
|
-
console.warn(
|
|
5922
|
+
console.warn(_formatRuntimeError(2964 /* RuntimeErrorCode.LCP_IMG_NGSRC_MODIFIED */, `${directiveDetails} this image is the Largest Contentful Paint (LCP) ` +
|
|
5926
5923
|
`element and has had its "ngSrc" attribute modified. This can cause ` +
|
|
5927
5924
|
`slower loading performance. It is recommended not to modify the "ngSrc" ` +
|
|
5928
5925
|
`property on any image which could be the LCP element.`));
|
|
@@ -6007,7 +6004,7 @@ class PreconnectLinkChecker {
|
|
|
6007
6004
|
// performance implications of making extra DOM lookups for each image.
|
|
6008
6005
|
this.preconnectLinks ??= this.queryPreconnectLinks();
|
|
6009
6006
|
if (!this.preconnectLinks.has(imgUrl.origin)) {
|
|
6010
|
-
console.warn(
|
|
6007
|
+
console.warn(_formatRuntimeError(2956 /* RuntimeErrorCode.PRIORITY_IMG_MISSING_PRECONNECT_TAG */, `${imgDirectiveDetails(originalNgSrc)} there is no preconnect tag present for this ` +
|
|
6011
6008
|
`image. Preconnecting to the origin(s) that serve priority images ensures that these ` +
|
|
6012
6009
|
`images are delivered as soon as possible. To fix this, please add the following ` +
|
|
6013
6010
|
`element into the <head> of the document:\n` +
|
|
@@ -6028,10 +6025,10 @@ class PreconnectLinkChecker {
|
|
|
6028
6025
|
this.preconnectLinks?.clear();
|
|
6029
6026
|
this.alreadySeen.clear();
|
|
6030
6027
|
}
|
|
6031
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
6032
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
6028
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6029
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' });
|
|
6033
6030
|
}
|
|
6034
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
6031
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: PreconnectLinkChecker, decorators: [{
|
|
6035
6032
|
type: Injectable,
|
|
6036
6033
|
args: [{ providedIn: 'root' }]
|
|
6037
6034
|
}], ctorParameters: () => [] });
|
|
@@ -6094,7 +6091,7 @@ class PreloadLinkCreator {
|
|
|
6094
6091
|
createPreloadLinkTag(renderer, src, srcset, sizes) {
|
|
6095
6092
|
if (ngDevMode) {
|
|
6096
6093
|
if (this.preloadedImages.size >= DEFAULT_PRELOADED_IMAGES_LIMIT) {
|
|
6097
|
-
throw new
|
|
6094
|
+
throw new _RuntimeError(2961 /* RuntimeErrorCode.TOO_MANY_PRELOADED_IMAGES */, ngDevMode &&
|
|
6098
6095
|
`The \`NgOptimizedImage\` directive has detected that more than ` +
|
|
6099
6096
|
`${DEFAULT_PRELOADED_IMAGES_LIMIT} images were marked as priority. ` +
|
|
6100
6097
|
`This might negatively affect an overall performance of the page. ` +
|
|
@@ -6118,10 +6115,10 @@ class PreloadLinkCreator {
|
|
|
6118
6115
|
}
|
|
6119
6116
|
renderer.appendChild(this.document.head, preload);
|
|
6120
6117
|
}
|
|
6121
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
6122
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
6118
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: PreloadLinkCreator, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6119
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: PreloadLinkCreator, providedIn: 'root' });
|
|
6123
6120
|
}
|
|
6124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
6121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: PreloadLinkCreator, decorators: [{
|
|
6125
6122
|
type: Injectable,
|
|
6126
6123
|
args: [{ providedIn: 'root' }]
|
|
6127
6124
|
}] });
|
|
@@ -6216,12 +6213,6 @@ const PRIORITY_COUNT_THRESHOLD = 10;
|
|
|
6216
6213
|
* exceeds the threshold PRIORITY_COUNT_THRESHOLD
|
|
6217
6214
|
*/
|
|
6218
6215
|
let IMGS_WITH_PRIORITY_ATTR_COUNT = 0;
|
|
6219
|
-
/**
|
|
6220
|
-
* This function is for testing purpose.
|
|
6221
|
-
*/
|
|
6222
|
-
function resetImagePriorityCount() {
|
|
6223
|
-
IMGS_WITH_PRIORITY_ATTR_COUNT = 0;
|
|
6224
|
-
}
|
|
6225
6216
|
/**
|
|
6226
6217
|
* Directive that improves image loading performance by enforcing best practices.
|
|
6227
6218
|
*
|
|
@@ -6321,7 +6312,7 @@ function resetImagePriorityCount() {
|
|
|
6321
6312
|
*/
|
|
6322
6313
|
class NgOptimizedImage {
|
|
6323
6314
|
imageLoader = inject(IMAGE_LOADER);
|
|
6324
|
-
config = processConfig(inject(
|
|
6315
|
+
config = processConfig(inject(_IMAGE_CONFIG));
|
|
6325
6316
|
renderer = inject(Renderer2);
|
|
6326
6317
|
imgElement = inject(ElementRef).nativeElement;
|
|
6327
6318
|
injector = inject(Injector);
|
|
@@ -6432,7 +6423,7 @@ class NgOptimizedImage {
|
|
|
6432
6423
|
}
|
|
6433
6424
|
/** @nodoc */
|
|
6434
6425
|
ngOnInit() {
|
|
6435
|
-
|
|
6426
|
+
_performanceMarkFeature('NgOptimizedImage');
|
|
6436
6427
|
if (ngDevMode) {
|
|
6437
6428
|
const ngZone = this.injector.get(NgZone);
|
|
6438
6429
|
assertNonEmptyInput(this, 'ngSrc', this.ngSrc);
|
|
@@ -6699,10 +6690,10 @@ class NgOptimizedImage {
|
|
|
6699
6690
|
setHostAttribute(name, value) {
|
|
6700
6691
|
this.renderer.setAttribute(this.imgElement, name, value);
|
|
6701
6692
|
}
|
|
6702
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
6703
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.0.0-next.
|
|
6693
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
6694
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.0.0-next.2", type: NgOptimizedImage, isStandalone: true, selector: "img[ngSrc]", inputs: { ngSrc: ["ngSrc", "ngSrc", unwrapSafeUrl], ngSrcset: "ngSrcset", sizes: "sizes", width: ["width", "width", numberAttribute], height: ["height", "height", numberAttribute], loading: "loading", priority: ["priority", "priority", booleanAttribute], loaderParams: "loaderParams", disableOptimizedSrcset: ["disableOptimizedSrcset", "disableOptimizedSrcset", booleanAttribute], fill: ["fill", "fill", booleanAttribute], placeholder: ["placeholder", "placeholder", booleanOrUrlAttribute], placeholderConfig: "placeholderConfig", src: "src", srcset: "srcset" }, host: { properties: { "style.position": "fill ? \"absolute\" : null", "style.width": "fill ? \"100%\" : null", "style.height": "fill ? \"100%\" : null", "style.inset": "fill ? \"0\" : null", "style.background-size": "placeholder ? \"cover\" : null", "style.background-position": "placeholder ? \"50% 50%\" : null", "style.background-repeat": "placeholder ? \"no-repeat\" : null", "style.background-image": "placeholder ? generatePlaceholder(placeholder) : null", "style.filter": "placeholder && shouldBlurPlaceholder(placeholderConfig) ? \"blur(15px)\" : null" } }, usesOnChanges: true, ngImport: i0 });
|
|
6704
6695
|
}
|
|
6705
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
6696
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.2", ngImport: i0, type: NgOptimizedImage, decorators: [{
|
|
6706
6697
|
type: Directive,
|
|
6707
6698
|
args: [{
|
|
6708
6699
|
selector: 'img[ngSrc]',
|
|
@@ -6763,7 +6754,7 @@ function processConfig(config) {
|
|
|
6763
6754
|
if (config.breakpoints) {
|
|
6764
6755
|
sortedBreakpoints.breakpoints = config.breakpoints.sort((a, b) => a - b);
|
|
6765
6756
|
}
|
|
6766
|
-
return Object.assign({},
|
|
6757
|
+
return Object.assign({}, _IMAGE_CONFIG_DEFAULTS, config, sortedBreakpoints);
|
|
6767
6758
|
}
|
|
6768
6759
|
/***** Assert functions *****/
|
|
6769
6760
|
/**
|
|
@@ -6771,7 +6762,7 @@ function processConfig(config) {
|
|
|
6771
6762
|
*/
|
|
6772
6763
|
function assertNoConflictingSrc(dir) {
|
|
6773
6764
|
if (dir.src) {
|
|
6774
|
-
throw new
|
|
6765
|
+
throw new _RuntimeError(2950 /* RuntimeErrorCode.UNEXPECTED_SRC_ATTR */, `${imgDirectiveDetails(dir.ngSrc)} both \`src\` and \`ngSrc\` have been set. ` +
|
|
6775
6766
|
`Supplying both of these attributes breaks lazy loading. ` +
|
|
6776
6767
|
`The NgOptimizedImage directive sets \`src\` itself based on the value of \`ngSrc\`. ` +
|
|
6777
6768
|
`To fix this, please remove the \`src\` attribute.`);
|
|
@@ -6782,7 +6773,7 @@ function assertNoConflictingSrc(dir) {
|
|
|
6782
6773
|
*/
|
|
6783
6774
|
function assertNoConflictingSrcset(dir) {
|
|
6784
6775
|
if (dir.srcset) {
|
|
6785
|
-
throw new
|
|
6776
|
+
throw new _RuntimeError(2951 /* RuntimeErrorCode.UNEXPECTED_SRCSET_ATTR */, `${imgDirectiveDetails(dir.ngSrc)} both \`srcset\` and \`ngSrcset\` have been set. ` +
|
|
6786
6777
|
`Supplying both of these attributes breaks lazy loading. ` +
|
|
6787
6778
|
`The NgOptimizedImage directive sets \`srcset\` itself based on the value of ` +
|
|
6788
6779
|
`\`ngSrcset\`. To fix this, please remove the \`srcset\` attribute.`);
|
|
@@ -6797,7 +6788,7 @@ function assertNotBase64Image(dir) {
|
|
|
6797
6788
|
if (ngSrc.length > BASE64_IMG_MAX_LENGTH_IN_ERROR) {
|
|
6798
6789
|
ngSrc = ngSrc.substring(0, BASE64_IMG_MAX_LENGTH_IN_ERROR) + '...';
|
|
6799
6790
|
}
|
|
6800
|
-
throw new
|
|
6791
|
+
throw new _RuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \`ngSrc\` is a Base64-encoded string ` +
|
|
6801
6792
|
`(${ngSrc}). NgOptimizedImage does not support Base64-encoded strings. ` +
|
|
6802
6793
|
`To fix this, disable the NgOptimizedImage directive for this element ` +
|
|
6803
6794
|
`by removing \`ngSrc\` and using a standard \`src\` attribute instead.`);
|
|
@@ -6809,7 +6800,7 @@ function assertNotBase64Image(dir) {
|
|
|
6809
6800
|
function assertNoComplexSizes(dir) {
|
|
6810
6801
|
let sizes = dir.sizes;
|
|
6811
6802
|
if (sizes?.match(/((\)|,)\s|^)\d+px/)) {
|
|
6812
|
-
throw new
|
|
6803
|
+
throw new _RuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \`sizes\` was set to a string including ` +
|
|
6813
6804
|
`pixel values. For automatic \`srcset\` generation, \`sizes\` must only include responsive ` +
|
|
6814
6805
|
`values, such as \`sizes="50vw"\` or \`sizes="(min-width: 768px) 50vw, 100vw"\`. ` +
|
|
6815
6806
|
`To fix this, modify the \`sizes\` attribute, or provide your own \`ngSrcset\` value directly.`);
|
|
@@ -6825,7 +6816,7 @@ function assertValidPlaceholder(dir, imageLoader) {
|
|
|
6825
6816
|
*/
|
|
6826
6817
|
function assertNoPlaceholderConfigWithoutPlaceholder(dir) {
|
|
6827
6818
|
if (dir.placeholderConfig && !dir.placeholder) {
|
|
6828
|
-
throw new
|
|
6819
|
+
throw new _RuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \`placeholderConfig\` options were provided for an ` +
|
|
6829
6820
|
`image that does not use the \`placeholder\` attribute, and will have no effect.`);
|
|
6830
6821
|
}
|
|
6831
6822
|
}
|
|
@@ -6835,7 +6826,7 @@ function assertNoPlaceholderConfigWithoutPlaceholder(dir) {
|
|
|
6835
6826
|
*/
|
|
6836
6827
|
function assertNoRelativePlaceholderWithoutLoader(dir, imageLoader) {
|
|
6837
6828
|
if (dir.placeholder === true && imageLoader === noopImageLoader) {
|
|
6838
|
-
throw new
|
|
6829
|
+
throw new _RuntimeError(2963 /* RuntimeErrorCode.MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \`placeholder\` attribute is set to true but ` +
|
|
6839
6830
|
`no image loader is configured (i.e. the default one is being used), ` +
|
|
6840
6831
|
`which would result in the same image being used for the primary image and its placeholder. ` +
|
|
6841
6832
|
`To fix this, provide a loader or remove the \`placeholder\` attribute from the image.`);
|
|
@@ -6849,13 +6840,13 @@ function assertNoOversizedDataUrl(dir) {
|
|
|
6849
6840
|
typeof dir.placeholder === 'string' &&
|
|
6850
6841
|
dir.placeholder.startsWith('data:')) {
|
|
6851
6842
|
if (dir.placeholder.length > DATA_URL_ERROR_LIMIT) {
|
|
6852
|
-
throw new
|
|
6843
|
+
throw new _RuntimeError(2965 /* RuntimeErrorCode.OVERSIZED_PLACEHOLDER */, `${imgDirectiveDetails(dir.ngSrc)} the \`placeholder\` attribute is set to a data URL which is longer ` +
|
|
6853
6844
|
`than ${DATA_URL_ERROR_LIMIT} characters. This is strongly discouraged, as large inline placeholders ` +
|
|
6854
6845
|
`directly increase the bundle size of Angular and hurt page load performance. To fix this, generate ` +
|
|
6855
6846
|
`a smaller data URL placeholder.`);
|
|
6856
6847
|
}
|
|
6857
6848
|
if (dir.placeholder.length > DATA_URL_WARN_LIMIT) {
|
|
6858
|
-
console.warn(
|
|
6849
|
+
console.warn(_formatRuntimeError(2965 /* RuntimeErrorCode.OVERSIZED_PLACEHOLDER */, `${imgDirectiveDetails(dir.ngSrc)} the \`placeholder\` attribute is set to a data URL which is longer ` +
|
|
6859
6850
|
`than ${DATA_URL_WARN_LIMIT} characters. This is discouraged, as large inline placeholders ` +
|
|
6860
6851
|
`directly increase the bundle size of Angular and hurt page load performance. For better loading performance, ` +
|
|
6861
6852
|
`generate a smaller data URL placeholder.`));
|
|
@@ -6868,7 +6859,7 @@ function assertNoOversizedDataUrl(dir) {
|
|
|
6868
6859
|
function assertNotBlobUrl(dir) {
|
|
6869
6860
|
const ngSrc = dir.ngSrc.trim();
|
|
6870
6861
|
if (ngSrc.startsWith('blob:')) {
|
|
6871
|
-
throw new
|
|
6862
|
+
throw new _RuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \`ngSrc\` was set to a blob URL (${ngSrc}). ` +
|
|
6872
6863
|
`Blob URLs are not supported by the NgOptimizedImage directive. ` +
|
|
6873
6864
|
`To fix this, disable the NgOptimizedImage directive for this element ` +
|
|
6874
6865
|
`by removing \`ngSrc\` and using a regular \`src\` attribute instead.`);
|
|
@@ -6881,7 +6872,7 @@ function assertNonEmptyInput(dir, name, value) {
|
|
|
6881
6872
|
const isString = typeof value === 'string';
|
|
6882
6873
|
const isEmptyString = isString && value.trim() === '';
|
|
6883
6874
|
if (!isString || isEmptyString) {
|
|
6884
|
-
throw new
|
|
6875
|
+
throw new _RuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \`${name}\` has an invalid value ` +
|
|
6885
6876
|
`(\`${value}\`). To fix this, change the value to a non-empty string.`);
|
|
6886
6877
|
}
|
|
6887
6878
|
}
|
|
@@ -6900,7 +6891,7 @@ function assertValidNgSrcset(dir, value) {
|
|
|
6900
6891
|
}
|
|
6901
6892
|
const isValidSrcset = isValidWidthDescriptor || isValidDensityDescriptor;
|
|
6902
6893
|
if (!isValidSrcset) {
|
|
6903
|
-
throw new
|
|
6894
|
+
throw new _RuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \`ngSrcset\` has an invalid value (\`${value}\`). ` +
|
|
6904
6895
|
`To fix this, supply \`ngSrcset\` using a comma-separated list of one or more width ` +
|
|
6905
6896
|
`descriptors (e.g. "100w, 200w") or density descriptors (e.g. "1x, 2x").`);
|
|
6906
6897
|
}
|
|
@@ -6910,7 +6901,7 @@ function assertUnderDensityCap(dir, value) {
|
|
|
6910
6901
|
.split(',')
|
|
6911
6902
|
.every((num) => num === '' || parseFloat(num) <= ABSOLUTE_SRCSET_DENSITY_CAP);
|
|
6912
6903
|
if (!underDensityCap) {
|
|
6913
|
-
throw new
|
|
6904
|
+
throw new _RuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \`ngSrcset\` contains an unsupported image density:` +
|
|
6914
6905
|
`\`${value}\`. NgOptimizedImage generally recommends a max image density of ` +
|
|
6915
6906
|
`${RECOMMENDED_SRCSET_DENSITY_CAP}x but supports image densities up to ` +
|
|
6916
6907
|
`${ABSOLUTE_SRCSET_DENSITY_CAP}x. The human eye cannot distinguish between image densities ` +
|
|
@@ -6935,7 +6926,7 @@ function postInitInputChangeError(dir, inputName) {
|
|
|
6935
6926
|
`Changing the \`${inputName}\` would have no effect on the underlying ` +
|
|
6936
6927
|
`image element, because the resource loading has already occurred.`;
|
|
6937
6928
|
}
|
|
6938
|
-
return new
|
|
6929
|
+
return new _RuntimeError(2953 /* RuntimeErrorCode.UNEXPECTED_INPUT_CHANGE */, `${imgDirectiveDetails(dir.ngSrc)} \`${inputName}\` was updated after initialization. ` +
|
|
6939
6930
|
`The NgOptimizedImage directive will not react to this input change. ${reason} ` +
|
|
6940
6931
|
`To fix this, either switch \`${inputName}\` to a static value ` +
|
|
6941
6932
|
`or wrap the image element in an @if that is gated on the necessary value.`);
|
|
@@ -6965,7 +6956,7 @@ function assertGreaterThanZero(dir, inputValue, inputName) {
|
|
|
6965
6956
|
const validNumber = typeof inputValue === 'number' && inputValue > 0;
|
|
6966
6957
|
const validString = typeof inputValue === 'string' && /^\d+$/.test(inputValue.trim()) && parseInt(inputValue) > 0;
|
|
6967
6958
|
if (!validNumber && !validString) {
|
|
6968
|
-
throw new
|
|
6959
|
+
throw new _RuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \`${inputName}\` has an invalid value. ` +
|
|
6969
6960
|
`To fix this, provide \`${inputName}\` as a number greater than 0.`);
|
|
6970
6961
|
}
|
|
6971
6962
|
}
|
|
@@ -7007,7 +6998,7 @@ function assertNoImageDistortion(dir, img, renderer) {
|
|
|
7007
6998
|
const stylingDistortion = nonZeroRenderedDimensions &&
|
|
7008
6999
|
Math.abs(intrinsicAspectRatio - renderedAspectRatio) > ASPECT_RATIO_TOLERANCE;
|
|
7009
7000
|
if (inaccurateDimensions) {
|
|
7010
|
-
console.warn(
|
|
7001
|
+
console.warn(_formatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the aspect ratio of the image does not match ` +
|
|
7011
7002
|
`the aspect ratio indicated by the width and height attributes. ` +
|
|
7012
7003
|
`\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` +
|
|
7013
7004
|
`(aspect-ratio: ${round(intrinsicAspectRatio)}). \nSupplied width and height attributes: ` +
|
|
@@ -7015,7 +7006,7 @@ function assertNoImageDistortion(dir, img, renderer) {
|
|
|
7015
7006
|
`\nTo fix this, update the width and height attributes.`));
|
|
7016
7007
|
}
|
|
7017
7008
|
else if (stylingDistortion) {
|
|
7018
|
-
console.warn(
|
|
7009
|
+
console.warn(_formatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the aspect ratio of the rendered image ` +
|
|
7019
7010
|
`does not match the image's intrinsic aspect ratio. ` +
|
|
7020
7011
|
`\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` +
|
|
7021
7012
|
`(aspect-ratio: ${round(intrinsicAspectRatio)}). \nRendered image size: ` +
|
|
@@ -7033,7 +7024,7 @@ function assertNoImageDistortion(dir, img, renderer) {
|
|
|
7033
7024
|
const oversizedWidth = intrinsicWidth - recommendedWidth >= OVERSIZED_IMAGE_TOLERANCE;
|
|
7034
7025
|
const oversizedHeight = intrinsicHeight - recommendedHeight >= OVERSIZED_IMAGE_TOLERANCE;
|
|
7035
7026
|
if (oversizedWidth || oversizedHeight) {
|
|
7036
|
-
console.warn(
|
|
7027
|
+
console.warn(_formatRuntimeError(2960 /* RuntimeErrorCode.OVERSIZED_IMAGE */, `${imgDirectiveDetails(dir.ngSrc)} the intrinsic image is significantly ` +
|
|
7037
7028
|
`larger than necessary. ` +
|
|
7038
7029
|
`\nRendered image size: ${renderedWidth}w x ${renderedHeight}h. ` +
|
|
7039
7030
|
`\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h. ` +
|
|
@@ -7065,7 +7056,7 @@ function assertNonEmptyWidthAndHeight(dir) {
|
|
|
7065
7056
|
if (dir.height === undefined)
|
|
7066
7057
|
missingAttributes.push('height');
|
|
7067
7058
|
if (missingAttributes.length > 0) {
|
|
7068
|
-
throw new
|
|
7059
|
+
throw new _RuntimeError(2954 /* RuntimeErrorCode.REQUIRED_INPUT_MISSING */, `${imgDirectiveDetails(dir.ngSrc)} these required attributes ` +
|
|
7069
7060
|
`are missing: ${missingAttributes.map((attr) => `"${attr}"`).join(', ')}. ` +
|
|
7070
7061
|
`Including "width" and "height" attributes will prevent image-related layout shifts. ` +
|
|
7071
7062
|
`To fix this, include "width" and "height" attributes on the image tag or turn on ` +
|
|
@@ -7078,7 +7069,7 @@ function assertNonEmptyWidthAndHeight(dir) {
|
|
|
7078
7069
|
*/
|
|
7079
7070
|
function assertEmptyWidthAndHeight(dir) {
|
|
7080
7071
|
if (dir.width || dir.height) {
|
|
7081
|
-
throw new
|
|
7072
|
+
throw new _RuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the attributes \`height\` and/or \`width\` are present ` +
|
|
7082
7073
|
`along with the \`fill\` attribute. Because \`fill\` mode causes an image to fill its containing ` +
|
|
7083
7074
|
`element, the size attributes have no effect and should be removed.`);
|
|
7084
7075
|
}
|
|
@@ -7093,7 +7084,7 @@ function assertNonZeroRenderedHeight(dir, img, renderer) {
|
|
|
7093
7084
|
removeErrorListenerFn();
|
|
7094
7085
|
const renderedHeight = img.clientHeight;
|
|
7095
7086
|
if (dir.fill && renderedHeight === 0) {
|
|
7096
|
-
console.warn(
|
|
7087
|
+
console.warn(_formatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the height of the fill-mode image is zero. ` +
|
|
7097
7088
|
`This is likely because the containing element does not have the CSS 'position' ` +
|
|
7098
7089
|
`property set to one of the following: "relative", "fixed", or "absolute". ` +
|
|
7099
7090
|
`To fix this problem, make sure the container element has the CSS 'position' ` +
|
|
@@ -7114,7 +7105,7 @@ function assertNonZeroRenderedHeight(dir, img, renderer) {
|
|
|
7114
7105
|
*/
|
|
7115
7106
|
function assertValidLoadingInput(dir) {
|
|
7116
7107
|
if (dir.loading && dir.priority) {
|
|
7117
|
-
throw new
|
|
7108
|
+
throw new _RuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \`loading\` attribute ` +
|
|
7118
7109
|
`was used on an image that was marked "priority". ` +
|
|
7119
7110
|
`Setting \`loading\` on priority images is not allowed ` +
|
|
7120
7111
|
`because these images will always be eagerly loaded. ` +
|
|
@@ -7122,7 +7113,7 @@ function assertValidLoadingInput(dir) {
|
|
|
7122
7113
|
}
|
|
7123
7114
|
const validInputs = ['auto', 'eager', 'lazy'];
|
|
7124
7115
|
if (typeof dir.loading === 'string' && !validInputs.includes(dir.loading)) {
|
|
7125
|
-
throw new
|
|
7116
|
+
throw new _RuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \`loading\` attribute ` +
|
|
7126
7117
|
`has an invalid value (\`${dir.loading}\`). ` +
|
|
7127
7118
|
`To fix this, provide a valid value ("lazy", "eager", or "auto").`);
|
|
7128
7119
|
}
|
|
@@ -7146,7 +7137,7 @@ function assertNotMissingBuiltInLoader(ngSrc, imageLoader) {
|
|
|
7146
7137
|
}
|
|
7147
7138
|
}
|
|
7148
7139
|
if (builtInLoaderName) {
|
|
7149
|
-
console.warn(
|
|
7140
|
+
console.warn(_formatRuntimeError(2962 /* RuntimeErrorCode.MISSING_BUILTIN_LOADER */, `NgOptimizedImage: It looks like your images may be hosted on the ` +
|
|
7150
7141
|
`${builtInLoaderName} CDN, but your app is not using Angular's ` +
|
|
7151
7142
|
`built-in loader for that CDN. We recommend switching to use ` +
|
|
7152
7143
|
`the built-in by calling \`provide${builtInLoaderName}Loader()\` ` +
|
|
@@ -7161,7 +7152,7 @@ function assertNotMissingBuiltInLoader(ngSrc, imageLoader) {
|
|
|
7161
7152
|
*/
|
|
7162
7153
|
function assertNoNgSrcsetWithoutLoader(dir, imageLoader) {
|
|
7163
7154
|
if (dir.ngSrcset && imageLoader === noopImageLoader) {
|
|
7164
|
-
console.warn(
|
|
7155
|
+
console.warn(_formatRuntimeError(2963 /* RuntimeErrorCode.MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \`ngSrcset\` attribute is present but ` +
|
|
7165
7156
|
`no image loader is configured (i.e. the default one is being used), ` +
|
|
7166
7157
|
`which would result in the same image being used for all configured sizes. ` +
|
|
7167
7158
|
`To fix this, provide a loader or remove the \`ngSrcset\` attribute from the image.`));
|
|
@@ -7173,7 +7164,7 @@ function assertNoNgSrcsetWithoutLoader(dir, imageLoader) {
|
|
|
7173
7164
|
*/
|
|
7174
7165
|
function assertNoLoaderParamsWithoutLoader(dir, imageLoader) {
|
|
7175
7166
|
if (dir.loaderParams && imageLoader === noopImageLoader) {
|
|
7176
|
-
console.warn(
|
|
7167
|
+
console.warn(_formatRuntimeError(2963 /* RuntimeErrorCode.MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \`loaderParams\` attribute is present but ` +
|
|
7177
7168
|
`no image loader is configured (i.e. the default one is being used), ` +
|
|
7178
7169
|
`which means that the loaderParams data will not be consumed and will not affect the URL. ` +
|
|
7179
7170
|
`To fix this, provide a custom loader or remove the \`loaderParams\` attribute from the image.`));
|
|
@@ -7187,7 +7178,7 @@ async function assetPriorityCountBelowThreshold(appRef) {
|
|
|
7187
7178
|
IMGS_WITH_PRIORITY_ATTR_COUNT++;
|
|
7188
7179
|
await appRef.whenStable();
|
|
7189
7180
|
if (IMGS_WITH_PRIORITY_ATTR_COUNT > PRIORITY_COUNT_THRESHOLD) {
|
|
7190
|
-
console.warn(
|
|
7181
|
+
console.warn(_formatRuntimeError(2966 /* RuntimeErrorCode.TOO_MANY_PRIORITY_ATTRIBUTES */, `NgOptimizedImage: The "priority" attribute is set to true more than ${PRIORITY_COUNT_THRESHOLD} times (${IMGS_WITH_PRIORITY_ATTR_COUNT} times). ` +
|
|
7191
7182
|
`Marking too many images as "high" priority can hurt your application's LCP (https://web.dev/lcp). ` +
|
|
7192
7183
|
`"Priority" should only be set on the image expected to be the page's LCP element.`));
|
|
7193
7184
|
}
|
|
@@ -7206,7 +7197,7 @@ function assertPlaceholderDimensions(dir, imgElement) {
|
|
|
7206
7197
|
let renderedWidth = parseFloat(computedStyle.getPropertyValue('width'));
|
|
7207
7198
|
let renderedHeight = parseFloat(computedStyle.getPropertyValue('height'));
|
|
7208
7199
|
if (renderedWidth > PLACEHOLDER_DIMENSION_LIMIT || renderedHeight > PLACEHOLDER_DIMENSION_LIMIT) {
|
|
7209
|
-
console.warn(
|
|
7200
|
+
console.warn(_formatRuntimeError(2967 /* RuntimeErrorCode.PLACEHOLDER_DIMENSION_LIMIT_EXCEEDED */, `${imgDirectiveDetails(dir.ngSrc)} it uses a placeholder image, but at least one ` +
|
|
7210
7201
|
`of the dimensions attribute (height or width) exceeds the limit of ${PLACEHOLDER_DIMENSION_LIMIT}px. ` +
|
|
7211
7202
|
`To fix this, use a smaller image as a placeholder.`));
|
|
7212
7203
|
}
|
|
@@ -7235,7 +7226,7 @@ function unwrapSafeUrl(value) {
|
|
|
7235
7226
|
if (typeof value === 'string') {
|
|
7236
7227
|
return value;
|
|
7237
7228
|
}
|
|
7238
|
-
return
|
|
7229
|
+
return _unwrapSafeValue(value);
|
|
7239
7230
|
}
|
|
7240
7231
|
// Transform function to handle inputs which may be booleans, strings, or string representations
|
|
7241
7232
|
// of boolean values. Used for the placeholder attribute.
|
|
@@ -7246,24 +7237,5 @@ function booleanOrUrlAttribute(value) {
|
|
|
7246
7237
|
return booleanAttribute(value);
|
|
7247
7238
|
}
|
|
7248
7239
|
|
|
7249
|
-
/**
|
|
7250
|
-
* @module
|
|
7251
|
-
* @description
|
|
7252
|
-
* Entry point for all public APIs of the common package.
|
|
7253
|
-
*/
|
|
7254
|
-
|
|
7255
|
-
/**
|
|
7256
|
-
* @module
|
|
7257
|
-
* @description
|
|
7258
|
-
* Entry point for all public APIs of this package.
|
|
7259
|
-
*/
|
|
7260
|
-
// This file only reexports content of the `src` folder. Keep it that way.
|
|
7261
|
-
|
|
7262
|
-
// This file is not used to build this module. It is only used during editing
|
|
7263
|
-
|
|
7264
|
-
/**
|
|
7265
|
-
* Generated bundle index. Do not edit.
|
|
7266
|
-
*/
|
|
7267
|
-
|
|
7268
7240
|
export { APP_BASE_HREF, AsyncPipe, BrowserPlatformLocation, CommonModule, CurrencyPipe, DATE_PIPE_DEFAULT_OPTIONS, DATE_PIPE_DEFAULT_TIMEZONE, DOCUMENT, DatePipe, DecimalPipe, FormStyle, FormatWidth, HashLocationStrategy, I18nPluralPipe, I18nSelectPipe, IMAGE_LOADER, JsonPipe, KeyValuePipe, LOCATION_INITIALIZED, Location, LocationStrategy, LowerCasePipe, NgClass, NgComponentOutlet, NgForOf as NgFor, NgForOf, NgForOfContext, NgIf, NgIfContext, NgLocaleLocalization, NgLocalization, NgOptimizedImage, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NumberFormatStyle, NumberSymbol, PRECONNECT_CHECK_BLOCKLIST, PathLocationStrategy, PercentPipe, PlatformLocation, Plural, SlicePipe, TitleCasePipe, TranslationWidth, UpperCasePipe, VERSION, ViewportScroller, WeekDay, XhrFactory, formatCurrency, formatDate, formatNumber, formatPercent, getCurrencySymbol, getLocaleCurrencyCode, getLocaleCurrencyName, getLocaleCurrencySymbol, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleDayNames, getLocaleDayPeriods, getLocaleDirection, getLocaleEraNames, getLocaleExtraDayPeriodRules, getLocaleExtraDayPeriods, getLocaleFirstDayOfWeek, getLocaleId, getLocaleMonthNames, getLocaleNumberFormat, getLocaleNumberSymbol, getLocalePluralCase, getLocaleTimeFormat, getLocaleWeekEndRange, getNumberOfCurrencyDigits, isPlatformBrowser, isPlatformServer, provideCloudflareLoader, provideCloudinaryLoader, provideImageKitLoader, provideImgixLoader, provideNetlifyLoader, registerLocaleData, DomAdapter as ɵDomAdapter, NullViewportScroller as ɵNullViewportScroller, PLATFORM_BROWSER_ID as ɵPLATFORM_BROWSER_ID, PLATFORM_SERVER_ID as ɵPLATFORM_SERVER_ID, PlatformNavigation as ɵPlatformNavigation, getDOM as ɵgetDOM, normalizeQueryParams as ɵnormalizeQueryParams, parseCookieValue as ɵparseCookieValue, setRootDomAdapter as ɵsetRootDomAdapter };
|
|
7269
7241
|
//# sourceMappingURL=common.mjs.map
|