@angular/common 20.0.0-next.1 → 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 +227 -252
- package/fesm2022/common.mjs.map +1 -1
- package/fesm2022/http/testing.mjs +10 -14
- package/fesm2022/http/testing.mjs.map +1 -1
- package/fesm2022/http.mjs +65 -113
- package/fesm2022/http.mjs.map +1 -1
- package/fesm2022/testing.mjs +22 -41
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/upgrade.mjs +7 -23
- package/fesm2022/upgrade.mjs.map +1 -1
- package/http/index.d.ts +2803 -2858
- package/http/testing/index.d.ts +74 -79
- package/index.d.ts +2393 -2617
- package/package.json +2 -2
- package/testing/index.d.ts +55 -64
- package/upgrade/index.d.ts +137 -146
package/fesm2022/common.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v20.0.0-next.
|
|
2
|
+
* @license Angular v20.0.0-next.2
|
|
3
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
|
}] });
|
|
@@ -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.1",
|
|
|
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.1",
|
|
|
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]',
|
|
@@ -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.1",
|
|
|
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,7 +4198,7 @@ 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 {
|
|
@@ -4263,7 +4263,7 @@ class AsyncPipe {
|
|
|
4263
4263
|
_subscription = null;
|
|
4264
4264
|
_obj = null;
|
|
4265
4265
|
_strategy = null;
|
|
4266
|
-
applicationErrorHandler = inject(
|
|
4266
|
+
applicationErrorHandler = inject(_INTERNAL_APPLICATION_ERROR_HANDLER);
|
|
4267
4267
|
constructor(ref) {
|
|
4268
4268
|
// Assign `ref` into `this._ref` manually instead of declaring `_ref` in the constructor
|
|
4269
4269
|
// parameter list, as the type of `this._ref` includes `null` unlike the type of `ref`.
|
|
@@ -4307,10 +4307,10 @@ class AsyncPipe {
|
|
|
4307
4307
|
this._subscription = this._strategy.createSubscription(obj, (value) => this._updateLatestValue(obj, value), (e) => this.applicationErrorHandler(e));
|
|
4308
4308
|
}
|
|
4309
4309
|
_selectStrategy(obj) {
|
|
4310
|
-
if (
|
|
4310
|
+
if (_isPromise(obj)) {
|
|
4311
4311
|
return _promiseStrategy;
|
|
4312
4312
|
}
|
|
4313
|
-
if (
|
|
4313
|
+
if (_isSubscribable(obj)) {
|
|
4314
4314
|
return _subscribableStrategy;
|
|
4315
4315
|
}
|
|
4316
4316
|
throw invalidPipeArgumentError(AsyncPipe, obj);
|
|
@@ -4331,10 +4331,10 @@ class AsyncPipe {
|
|
|
4331
4331
|
}
|
|
4332
4332
|
}
|
|
4333
4333
|
}
|
|
4334
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4335
|
-
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 });
|
|
4336
4336
|
}
|
|
4337
|
-
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: [{
|
|
4338
4338
|
type: Pipe,
|
|
4339
4339
|
args: [{
|
|
4340
4340
|
name: 'async',
|
|
@@ -4366,10 +4366,10 @@ class LowerCasePipe {
|
|
|
4366
4366
|
}
|
|
4367
4367
|
return value.toLowerCase();
|
|
4368
4368
|
}
|
|
4369
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4370
|
-
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" });
|
|
4371
4371
|
}
|
|
4372
|
-
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: [{
|
|
4373
4373
|
type: Pipe,
|
|
4374
4374
|
args: [{
|
|
4375
4375
|
name: 'lowercase',
|
|
@@ -4410,10 +4410,10 @@ class TitleCasePipe {
|
|
|
4410
4410
|
}
|
|
4411
4411
|
return value.replace(unicodeWordMatch, (txt) => txt[0].toUpperCase() + txt.slice(1).toLowerCase());
|
|
4412
4412
|
}
|
|
4413
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4414
|
-
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" });
|
|
4415
4415
|
}
|
|
4416
|
-
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: [{
|
|
4417
4417
|
type: Pipe,
|
|
4418
4418
|
args: [{
|
|
4419
4419
|
name: 'titlecase',
|
|
@@ -4436,10 +4436,10 @@ class UpperCasePipe {
|
|
|
4436
4436
|
}
|
|
4437
4437
|
return value.toUpperCase();
|
|
4438
4438
|
}
|
|
4439
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4440
|
-
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" });
|
|
4441
4441
|
}
|
|
4442
|
-
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: [{
|
|
4443
4443
|
type: Pipe,
|
|
4444
4444
|
args: [{
|
|
4445
4445
|
name: 'uppercase',
|
|
@@ -4670,10 +4670,10 @@ class DatePipe {
|
|
|
4670
4670
|
throw invalidPipeArgumentError(DatePipe, error.message);
|
|
4671
4671
|
}
|
|
4672
4672
|
}
|
|
4673
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4674
|
-
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" });
|
|
4675
4675
|
}
|
|
4676
|
-
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: [{
|
|
4677
4677
|
type: Pipe,
|
|
4678
4678
|
args: [{
|
|
4679
4679
|
name: 'date',
|
|
@@ -4729,10 +4729,10 @@ class I18nPluralPipe {
|
|
|
4729
4729
|
const key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale);
|
|
4730
4730
|
return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());
|
|
4731
4731
|
}
|
|
4732
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4733
|
-
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" });
|
|
4734
4734
|
}
|
|
4735
|
-
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: [{
|
|
4736
4736
|
type: Pipe,
|
|
4737
4737
|
args: [{
|
|
4738
4738
|
name: 'i18nPlural',
|
|
@@ -4776,10 +4776,10 @@ class I18nSelectPipe {
|
|
|
4776
4776
|
}
|
|
4777
4777
|
return '';
|
|
4778
4778
|
}
|
|
4779
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4780
|
-
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" });
|
|
4781
4781
|
}
|
|
4782
|
-
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: [{
|
|
4783
4783
|
type: Pipe,
|
|
4784
4784
|
args: [{
|
|
4785
4785
|
name: 'i18nSelect',
|
|
@@ -4808,10 +4808,10 @@ class JsonPipe {
|
|
|
4808
4808
|
transform(value) {
|
|
4809
4809
|
return JSON.stringify(value, null, 2);
|
|
4810
4810
|
}
|
|
4811
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4812
|
-
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 });
|
|
4813
4813
|
}
|
|
4814
|
-
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: [{
|
|
4815
4815
|
type: Pipe,
|
|
4816
4816
|
args: [{
|
|
4817
4817
|
name: 'json',
|
|
@@ -4873,10 +4873,10 @@ class KeyValuePipe {
|
|
|
4873
4873
|
}
|
|
4874
4874
|
return this.keyValues;
|
|
4875
4875
|
}
|
|
4876
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4877
|
-
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 });
|
|
4878
4878
|
}
|
|
4879
|
-
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: [{
|
|
4880
4880
|
type: Pipe,
|
|
4881
4881
|
args: [{
|
|
4882
4882
|
name: 'keyvalue',
|
|
@@ -4993,10 +4993,10 @@ class DecimalPipe {
|
|
|
4993
4993
|
throw invalidPipeArgumentError(DecimalPipe, error.message);
|
|
4994
4994
|
}
|
|
4995
4995
|
}
|
|
4996
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
4997
|
-
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" });
|
|
4998
4998
|
}
|
|
4999
|
-
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: [{
|
|
5000
5000
|
type: Pipe,
|
|
5001
5001
|
args: [{
|
|
5002
5002
|
name: 'number',
|
|
@@ -5058,10 +5058,10 @@ class PercentPipe {
|
|
|
5058
5058
|
throw invalidPipeArgumentError(PercentPipe, error.message);
|
|
5059
5059
|
}
|
|
5060
5060
|
}
|
|
5061
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
5062
|
-
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" });
|
|
5063
5063
|
}
|
|
5064
|
-
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: [{
|
|
5065
5065
|
type: Pipe,
|
|
5066
5066
|
args: [{
|
|
5067
5067
|
name: 'percent',
|
|
@@ -5125,10 +5125,10 @@ class CurrencyPipe {
|
|
|
5125
5125
|
throw invalidPipeArgumentError(CurrencyPipe, error.message);
|
|
5126
5126
|
}
|
|
5127
5127
|
}
|
|
5128
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
5129
|
-
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" });
|
|
5130
5130
|
}
|
|
5131
|
-
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: [{
|
|
5132
5132
|
type: Pipe,
|
|
5133
5133
|
args: [{
|
|
5134
5134
|
name: 'currency',
|
|
@@ -5202,10 +5202,10 @@ class SlicePipe {
|
|
|
5202
5202
|
}
|
|
5203
5203
|
return value.slice(start, end);
|
|
5204
5204
|
}
|
|
5205
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
5206
|
-
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 });
|
|
5207
5207
|
}
|
|
5208
|
-
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: [{
|
|
5209
5209
|
type: Pipe,
|
|
5210
5210
|
args: [{
|
|
5211
5211
|
name: 'slice',
|
|
@@ -5248,11 +5248,11 @@ const COMMON_PIPES = [
|
|
|
5248
5248
|
* @publicApi
|
|
5249
5249
|
*/
|
|
5250
5250
|
class CommonModule {
|
|
5251
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
5252
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0-next.
|
|
5253
|
-
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 });
|
|
5254
5254
|
}
|
|
5255
|
-
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: [{
|
|
5256
5256
|
type: NgModule,
|
|
5257
5257
|
args: [{
|
|
5258
5258
|
imports: [COMMON_DIRECTIVES, COMMON_PIPES],
|
|
@@ -5285,7 +5285,7 @@ function isPlatformServer(platformId) {
|
|
|
5285
5285
|
/**
|
|
5286
5286
|
* @publicApi
|
|
5287
5287
|
*/
|
|
5288
|
-
const VERSION = new Version('20.0.0-next.
|
|
5288
|
+
const VERSION = new Version('20.0.0-next.2');
|
|
5289
5289
|
|
|
5290
5290
|
/**
|
|
5291
5291
|
* Defines a scroll position manager. Implemented by `BrowserViewportScroller`.
|
|
@@ -5296,7 +5296,7 @@ class ViewportScroller {
|
|
|
5296
5296
|
// De-sugared tree-shakable injection
|
|
5297
5297
|
// See #23917
|
|
5298
5298
|
/** @nocollapse */
|
|
5299
|
-
static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */
|
|
5299
|
+
static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ __defineInjectable({
|
|
5300
5300
|
token: ViewportScroller,
|
|
5301
5301
|
providedIn: 'root',
|
|
5302
5302
|
factory: () => typeof ngServerMode !== 'undefined' && ngServerMode
|
|
@@ -5542,12 +5542,12 @@ function createImageLoader(buildUrlFn, exampleUrls) {
|
|
|
5542
5542
|
};
|
|
5543
5543
|
}
|
|
5544
5544
|
function throwInvalidPathError(path, exampleUrls) {
|
|
5545
|
-
throw new
|
|
5545
|
+
throw new _RuntimeError(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, ngDevMode &&
|
|
5546
5546
|
`Image loader has detected an invalid path (\`${path}\`). ` +
|
|
5547
5547
|
`To fix this, supply a path using one of the following formats: ${exampleUrls.join(' or ')}`);
|
|
5548
5548
|
}
|
|
5549
5549
|
function throwUnexpectedAbsoluteUrlError(path, url) {
|
|
5550
|
-
throw new
|
|
5550
|
+
throw new _RuntimeError(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, ngDevMode &&
|
|
5551
5551
|
`Image loader has detected a \`<img>\` tag with an invalid \`ngSrc\` attribute: ${url}. ` +
|
|
5552
5552
|
`This image loader expects \`ngSrc\` to be a relative URL - ` +
|
|
5553
5553
|
`however the provided value is an absolute URL. ` +
|
|
@@ -5739,7 +5739,7 @@ function isNetlifyUrl(url) {
|
|
|
5739
5739
|
*/
|
|
5740
5740
|
function provideNetlifyLoader(path) {
|
|
5741
5741
|
if (path && !isValidPath(path)) {
|
|
5742
|
-
throw new
|
|
5742
|
+
throw new _RuntimeError(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, ngDevMode &&
|
|
5743
5743
|
`Image loader has detected an invalid path (\`${path}\`). ` +
|
|
5744
5744
|
`To fix this, supply either the full URL to the Netlify site, or leave it empty to use the current site.`);
|
|
5745
5745
|
}
|
|
@@ -5783,7 +5783,7 @@ function createNetlifyUrl(config, path) {
|
|
|
5783
5783
|
}
|
|
5784
5784
|
else {
|
|
5785
5785
|
if (ngDevMode) {
|
|
5786
|
-
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}\`".`));
|
|
5787
5787
|
}
|
|
5788
5788
|
}
|
|
5789
5789
|
}
|
|
@@ -5806,7 +5806,7 @@ function imgDirectiveDetails(ngSrc, includeNgSrc = true) {
|
|
|
5806
5806
|
*/
|
|
5807
5807
|
function assertDevMode(checkName) {
|
|
5808
5808
|
if (!ngDevMode) {
|
|
5809
|
-
throw new
|
|
5809
|
+
throw new _RuntimeError(2958 /* RuntimeErrorCode.UNEXPECTED_DEV_MODE_CHECK_IN_PROD_MODE */, `Unexpected invocation of the ${checkName} in the prod mode. ` +
|
|
5810
5810
|
`Please make sure that the prod mode is enabled for production builds.`);
|
|
5811
5811
|
}
|
|
5812
5812
|
}
|
|
@@ -5903,23 +5903,23 @@ class LCPImageObserver {
|
|
|
5903
5903
|
this.observer.disconnect();
|
|
5904
5904
|
this.images.clear();
|
|
5905
5905
|
}
|
|
5906
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
5907
|
-
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' });
|
|
5908
5908
|
}
|
|
5909
|
-
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: [{
|
|
5910
5910
|
type: Injectable,
|
|
5911
5911
|
args: [{ providedIn: 'root' }]
|
|
5912
5912
|
}], ctorParameters: () => [] });
|
|
5913
5913
|
function logMissingPriorityError(ngSrc) {
|
|
5914
5914
|
const directiveDetails = imgDirectiveDetails(ngSrc);
|
|
5915
|
-
console.error(
|
|
5915
|
+
console.error(_formatRuntimeError(2955 /* RuntimeErrorCode.LCP_IMG_MISSING_PRIORITY */, `${directiveDetails} this image is the Largest Contentful Paint (LCP) ` +
|
|
5916
5916
|
`element but was not marked "priority". This image should be marked ` +
|
|
5917
5917
|
`"priority" in order to prioritize its loading. ` +
|
|
5918
5918
|
`To fix this, add the "priority" attribute.`));
|
|
5919
5919
|
}
|
|
5920
5920
|
function logModifiedWarning(ngSrc) {
|
|
5921
5921
|
const directiveDetails = imgDirectiveDetails(ngSrc);
|
|
5922
|
-
console.warn(
|
|
5922
|
+
console.warn(_formatRuntimeError(2964 /* RuntimeErrorCode.LCP_IMG_NGSRC_MODIFIED */, `${directiveDetails} this image is the Largest Contentful Paint (LCP) ` +
|
|
5923
5923
|
`element and has had its "ngSrc" attribute modified. This can cause ` +
|
|
5924
5924
|
`slower loading performance. It is recommended not to modify the "ngSrc" ` +
|
|
5925
5925
|
`property on any image which could be the LCP element.`));
|
|
@@ -6004,7 +6004,7 @@ class PreconnectLinkChecker {
|
|
|
6004
6004
|
// performance implications of making extra DOM lookups for each image.
|
|
6005
6005
|
this.preconnectLinks ??= this.queryPreconnectLinks();
|
|
6006
6006
|
if (!this.preconnectLinks.has(imgUrl.origin)) {
|
|
6007
|
-
console.warn(
|
|
6007
|
+
console.warn(_formatRuntimeError(2956 /* RuntimeErrorCode.PRIORITY_IMG_MISSING_PRECONNECT_TAG */, `${imgDirectiveDetails(originalNgSrc)} there is no preconnect tag present for this ` +
|
|
6008
6008
|
`image. Preconnecting to the origin(s) that serve priority images ensures that these ` +
|
|
6009
6009
|
`images are delivered as soon as possible. To fix this, please add the following ` +
|
|
6010
6010
|
`element into the <head> of the document:\n` +
|
|
@@ -6025,10 +6025,10 @@ class PreconnectLinkChecker {
|
|
|
6025
6025
|
this.preconnectLinks?.clear();
|
|
6026
6026
|
this.alreadySeen.clear();
|
|
6027
6027
|
}
|
|
6028
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
6029
|
-
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' });
|
|
6030
6030
|
}
|
|
6031
|
-
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: [{
|
|
6032
6032
|
type: Injectable,
|
|
6033
6033
|
args: [{ providedIn: 'root' }]
|
|
6034
6034
|
}], ctorParameters: () => [] });
|
|
@@ -6091,7 +6091,7 @@ class PreloadLinkCreator {
|
|
|
6091
6091
|
createPreloadLinkTag(renderer, src, srcset, sizes) {
|
|
6092
6092
|
if (ngDevMode) {
|
|
6093
6093
|
if (this.preloadedImages.size >= DEFAULT_PRELOADED_IMAGES_LIMIT) {
|
|
6094
|
-
throw new
|
|
6094
|
+
throw new _RuntimeError(2961 /* RuntimeErrorCode.TOO_MANY_PRELOADED_IMAGES */, ngDevMode &&
|
|
6095
6095
|
`The \`NgOptimizedImage\` directive has detected that more than ` +
|
|
6096
6096
|
`${DEFAULT_PRELOADED_IMAGES_LIMIT} images were marked as priority. ` +
|
|
6097
6097
|
`This might negatively affect an overall performance of the page. ` +
|
|
@@ -6115,10 +6115,10 @@ class PreloadLinkCreator {
|
|
|
6115
6115
|
}
|
|
6116
6116
|
renderer.appendChild(this.document.head, preload);
|
|
6117
6117
|
}
|
|
6118
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
6119
|
-
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' });
|
|
6120
6120
|
}
|
|
6121
|
-
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: [{
|
|
6122
6122
|
type: Injectable,
|
|
6123
6123
|
args: [{ providedIn: 'root' }]
|
|
6124
6124
|
}] });
|
|
@@ -6213,12 +6213,6 @@ const PRIORITY_COUNT_THRESHOLD = 10;
|
|
|
6213
6213
|
* exceeds the threshold PRIORITY_COUNT_THRESHOLD
|
|
6214
6214
|
*/
|
|
6215
6215
|
let IMGS_WITH_PRIORITY_ATTR_COUNT = 0;
|
|
6216
|
-
/**
|
|
6217
|
-
* This function is for testing purpose.
|
|
6218
|
-
*/
|
|
6219
|
-
function resetImagePriorityCount() {
|
|
6220
|
-
IMGS_WITH_PRIORITY_ATTR_COUNT = 0;
|
|
6221
|
-
}
|
|
6222
6216
|
/**
|
|
6223
6217
|
* Directive that improves image loading performance by enforcing best practices.
|
|
6224
6218
|
*
|
|
@@ -6318,7 +6312,7 @@ function resetImagePriorityCount() {
|
|
|
6318
6312
|
*/
|
|
6319
6313
|
class NgOptimizedImage {
|
|
6320
6314
|
imageLoader = inject(IMAGE_LOADER);
|
|
6321
|
-
config = processConfig(inject(
|
|
6315
|
+
config = processConfig(inject(_IMAGE_CONFIG));
|
|
6322
6316
|
renderer = inject(Renderer2);
|
|
6323
6317
|
imgElement = inject(ElementRef).nativeElement;
|
|
6324
6318
|
injector = inject(Injector);
|
|
@@ -6429,7 +6423,7 @@ class NgOptimizedImage {
|
|
|
6429
6423
|
}
|
|
6430
6424
|
/** @nodoc */
|
|
6431
6425
|
ngOnInit() {
|
|
6432
|
-
|
|
6426
|
+
_performanceMarkFeature('NgOptimizedImage');
|
|
6433
6427
|
if (ngDevMode) {
|
|
6434
6428
|
const ngZone = this.injector.get(NgZone);
|
|
6435
6429
|
assertNonEmptyInput(this, 'ngSrc', this.ngSrc);
|
|
@@ -6696,10 +6690,10 @@ class NgOptimizedImage {
|
|
|
6696
6690
|
setHostAttribute(name, value) {
|
|
6697
6691
|
this.renderer.setAttribute(this.imgElement, name, value);
|
|
6698
6692
|
}
|
|
6699
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.
|
|
6700
|
-
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 });
|
|
6701
6695
|
}
|
|
6702
|
-
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: [{
|
|
6703
6697
|
type: Directive,
|
|
6704
6698
|
args: [{
|
|
6705
6699
|
selector: 'img[ngSrc]',
|
|
@@ -6760,7 +6754,7 @@ function processConfig(config) {
|
|
|
6760
6754
|
if (config.breakpoints) {
|
|
6761
6755
|
sortedBreakpoints.breakpoints = config.breakpoints.sort((a, b) => a - b);
|
|
6762
6756
|
}
|
|
6763
|
-
return Object.assign({},
|
|
6757
|
+
return Object.assign({}, _IMAGE_CONFIG_DEFAULTS, config, sortedBreakpoints);
|
|
6764
6758
|
}
|
|
6765
6759
|
/***** Assert functions *****/
|
|
6766
6760
|
/**
|
|
@@ -6768,7 +6762,7 @@ function processConfig(config) {
|
|
|
6768
6762
|
*/
|
|
6769
6763
|
function assertNoConflictingSrc(dir) {
|
|
6770
6764
|
if (dir.src) {
|
|
6771
|
-
throw new
|
|
6765
|
+
throw new _RuntimeError(2950 /* RuntimeErrorCode.UNEXPECTED_SRC_ATTR */, `${imgDirectiveDetails(dir.ngSrc)} both \`src\` and \`ngSrc\` have been set. ` +
|
|
6772
6766
|
`Supplying both of these attributes breaks lazy loading. ` +
|
|
6773
6767
|
`The NgOptimizedImage directive sets \`src\` itself based on the value of \`ngSrc\`. ` +
|
|
6774
6768
|
`To fix this, please remove the \`src\` attribute.`);
|
|
@@ -6779,7 +6773,7 @@ function assertNoConflictingSrc(dir) {
|
|
|
6779
6773
|
*/
|
|
6780
6774
|
function assertNoConflictingSrcset(dir) {
|
|
6781
6775
|
if (dir.srcset) {
|
|
6782
|
-
throw new
|
|
6776
|
+
throw new _RuntimeError(2951 /* RuntimeErrorCode.UNEXPECTED_SRCSET_ATTR */, `${imgDirectiveDetails(dir.ngSrc)} both \`srcset\` and \`ngSrcset\` have been set. ` +
|
|
6783
6777
|
`Supplying both of these attributes breaks lazy loading. ` +
|
|
6784
6778
|
`The NgOptimizedImage directive sets \`srcset\` itself based on the value of ` +
|
|
6785
6779
|
`\`ngSrcset\`. To fix this, please remove the \`srcset\` attribute.`);
|
|
@@ -6794,7 +6788,7 @@ function assertNotBase64Image(dir) {
|
|
|
6794
6788
|
if (ngSrc.length > BASE64_IMG_MAX_LENGTH_IN_ERROR) {
|
|
6795
6789
|
ngSrc = ngSrc.substring(0, BASE64_IMG_MAX_LENGTH_IN_ERROR) + '...';
|
|
6796
6790
|
}
|
|
6797
|
-
throw new
|
|
6791
|
+
throw new _RuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \`ngSrc\` is a Base64-encoded string ` +
|
|
6798
6792
|
`(${ngSrc}). NgOptimizedImage does not support Base64-encoded strings. ` +
|
|
6799
6793
|
`To fix this, disable the NgOptimizedImage directive for this element ` +
|
|
6800
6794
|
`by removing \`ngSrc\` and using a standard \`src\` attribute instead.`);
|
|
@@ -6806,7 +6800,7 @@ function assertNotBase64Image(dir) {
|
|
|
6806
6800
|
function assertNoComplexSizes(dir) {
|
|
6807
6801
|
let sizes = dir.sizes;
|
|
6808
6802
|
if (sizes?.match(/((\)|,)\s|^)\d+px/)) {
|
|
6809
|
-
throw new
|
|
6803
|
+
throw new _RuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \`sizes\` was set to a string including ` +
|
|
6810
6804
|
`pixel values. For automatic \`srcset\` generation, \`sizes\` must only include responsive ` +
|
|
6811
6805
|
`values, such as \`sizes="50vw"\` or \`sizes="(min-width: 768px) 50vw, 100vw"\`. ` +
|
|
6812
6806
|
`To fix this, modify the \`sizes\` attribute, or provide your own \`ngSrcset\` value directly.`);
|
|
@@ -6822,7 +6816,7 @@ function assertValidPlaceholder(dir, imageLoader) {
|
|
|
6822
6816
|
*/
|
|
6823
6817
|
function assertNoPlaceholderConfigWithoutPlaceholder(dir) {
|
|
6824
6818
|
if (dir.placeholderConfig && !dir.placeholder) {
|
|
6825
|
-
throw new
|
|
6819
|
+
throw new _RuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \`placeholderConfig\` options were provided for an ` +
|
|
6826
6820
|
`image that does not use the \`placeholder\` attribute, and will have no effect.`);
|
|
6827
6821
|
}
|
|
6828
6822
|
}
|
|
@@ -6832,7 +6826,7 @@ function assertNoPlaceholderConfigWithoutPlaceholder(dir) {
|
|
|
6832
6826
|
*/
|
|
6833
6827
|
function assertNoRelativePlaceholderWithoutLoader(dir, imageLoader) {
|
|
6834
6828
|
if (dir.placeholder === true && imageLoader === noopImageLoader) {
|
|
6835
|
-
throw new
|
|
6829
|
+
throw new _RuntimeError(2963 /* RuntimeErrorCode.MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \`placeholder\` attribute is set to true but ` +
|
|
6836
6830
|
`no image loader is configured (i.e. the default one is being used), ` +
|
|
6837
6831
|
`which would result in the same image being used for the primary image and its placeholder. ` +
|
|
6838
6832
|
`To fix this, provide a loader or remove the \`placeholder\` attribute from the image.`);
|
|
@@ -6846,13 +6840,13 @@ function assertNoOversizedDataUrl(dir) {
|
|
|
6846
6840
|
typeof dir.placeholder === 'string' &&
|
|
6847
6841
|
dir.placeholder.startsWith('data:')) {
|
|
6848
6842
|
if (dir.placeholder.length > DATA_URL_ERROR_LIMIT) {
|
|
6849
|
-
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 ` +
|
|
6850
6844
|
`than ${DATA_URL_ERROR_LIMIT} characters. This is strongly discouraged, as large inline placeholders ` +
|
|
6851
6845
|
`directly increase the bundle size of Angular and hurt page load performance. To fix this, generate ` +
|
|
6852
6846
|
`a smaller data URL placeholder.`);
|
|
6853
6847
|
}
|
|
6854
6848
|
if (dir.placeholder.length > DATA_URL_WARN_LIMIT) {
|
|
6855
|
-
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 ` +
|
|
6856
6850
|
`than ${DATA_URL_WARN_LIMIT} characters. This is discouraged, as large inline placeholders ` +
|
|
6857
6851
|
`directly increase the bundle size of Angular and hurt page load performance. For better loading performance, ` +
|
|
6858
6852
|
`generate a smaller data URL placeholder.`));
|
|
@@ -6865,7 +6859,7 @@ function assertNoOversizedDataUrl(dir) {
|
|
|
6865
6859
|
function assertNotBlobUrl(dir) {
|
|
6866
6860
|
const ngSrc = dir.ngSrc.trim();
|
|
6867
6861
|
if (ngSrc.startsWith('blob:')) {
|
|
6868
|
-
throw new
|
|
6862
|
+
throw new _RuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \`ngSrc\` was set to a blob URL (${ngSrc}). ` +
|
|
6869
6863
|
`Blob URLs are not supported by the NgOptimizedImage directive. ` +
|
|
6870
6864
|
`To fix this, disable the NgOptimizedImage directive for this element ` +
|
|
6871
6865
|
`by removing \`ngSrc\` and using a regular \`src\` attribute instead.`);
|
|
@@ -6878,7 +6872,7 @@ function assertNonEmptyInput(dir, name, value) {
|
|
|
6878
6872
|
const isString = typeof value === 'string';
|
|
6879
6873
|
const isEmptyString = isString && value.trim() === '';
|
|
6880
6874
|
if (!isString || isEmptyString) {
|
|
6881
|
-
throw new
|
|
6875
|
+
throw new _RuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \`${name}\` has an invalid value ` +
|
|
6882
6876
|
`(\`${value}\`). To fix this, change the value to a non-empty string.`);
|
|
6883
6877
|
}
|
|
6884
6878
|
}
|
|
@@ -6897,7 +6891,7 @@ function assertValidNgSrcset(dir, value) {
|
|
|
6897
6891
|
}
|
|
6898
6892
|
const isValidSrcset = isValidWidthDescriptor || isValidDensityDescriptor;
|
|
6899
6893
|
if (!isValidSrcset) {
|
|
6900
|
-
throw new
|
|
6894
|
+
throw new _RuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \`ngSrcset\` has an invalid value (\`${value}\`). ` +
|
|
6901
6895
|
`To fix this, supply \`ngSrcset\` using a comma-separated list of one or more width ` +
|
|
6902
6896
|
`descriptors (e.g. "100w, 200w") or density descriptors (e.g. "1x, 2x").`);
|
|
6903
6897
|
}
|
|
@@ -6907,7 +6901,7 @@ function assertUnderDensityCap(dir, value) {
|
|
|
6907
6901
|
.split(',')
|
|
6908
6902
|
.every((num) => num === '' || parseFloat(num) <= ABSOLUTE_SRCSET_DENSITY_CAP);
|
|
6909
6903
|
if (!underDensityCap) {
|
|
6910
|
-
throw new
|
|
6904
|
+
throw new _RuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \`ngSrcset\` contains an unsupported image density:` +
|
|
6911
6905
|
`\`${value}\`. NgOptimizedImage generally recommends a max image density of ` +
|
|
6912
6906
|
`${RECOMMENDED_SRCSET_DENSITY_CAP}x but supports image densities up to ` +
|
|
6913
6907
|
`${ABSOLUTE_SRCSET_DENSITY_CAP}x. The human eye cannot distinguish between image densities ` +
|
|
@@ -6932,7 +6926,7 @@ function postInitInputChangeError(dir, inputName) {
|
|
|
6932
6926
|
`Changing the \`${inputName}\` would have no effect on the underlying ` +
|
|
6933
6927
|
`image element, because the resource loading has already occurred.`;
|
|
6934
6928
|
}
|
|
6935
|
-
return new
|
|
6929
|
+
return new _RuntimeError(2953 /* RuntimeErrorCode.UNEXPECTED_INPUT_CHANGE */, `${imgDirectiveDetails(dir.ngSrc)} \`${inputName}\` was updated after initialization. ` +
|
|
6936
6930
|
`The NgOptimizedImage directive will not react to this input change. ${reason} ` +
|
|
6937
6931
|
`To fix this, either switch \`${inputName}\` to a static value ` +
|
|
6938
6932
|
`or wrap the image element in an @if that is gated on the necessary value.`);
|
|
@@ -6962,7 +6956,7 @@ function assertGreaterThanZero(dir, inputValue, inputName) {
|
|
|
6962
6956
|
const validNumber = typeof inputValue === 'number' && inputValue > 0;
|
|
6963
6957
|
const validString = typeof inputValue === 'string' && /^\d+$/.test(inputValue.trim()) && parseInt(inputValue) > 0;
|
|
6964
6958
|
if (!validNumber && !validString) {
|
|
6965
|
-
throw new
|
|
6959
|
+
throw new _RuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \`${inputName}\` has an invalid value. ` +
|
|
6966
6960
|
`To fix this, provide \`${inputName}\` as a number greater than 0.`);
|
|
6967
6961
|
}
|
|
6968
6962
|
}
|
|
@@ -7004,7 +6998,7 @@ function assertNoImageDistortion(dir, img, renderer) {
|
|
|
7004
6998
|
const stylingDistortion = nonZeroRenderedDimensions &&
|
|
7005
6999
|
Math.abs(intrinsicAspectRatio - renderedAspectRatio) > ASPECT_RATIO_TOLERANCE;
|
|
7006
7000
|
if (inaccurateDimensions) {
|
|
7007
|
-
console.warn(
|
|
7001
|
+
console.warn(_formatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the aspect ratio of the image does not match ` +
|
|
7008
7002
|
`the aspect ratio indicated by the width and height attributes. ` +
|
|
7009
7003
|
`\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` +
|
|
7010
7004
|
`(aspect-ratio: ${round(intrinsicAspectRatio)}). \nSupplied width and height attributes: ` +
|
|
@@ -7012,7 +7006,7 @@ function assertNoImageDistortion(dir, img, renderer) {
|
|
|
7012
7006
|
`\nTo fix this, update the width and height attributes.`));
|
|
7013
7007
|
}
|
|
7014
7008
|
else if (stylingDistortion) {
|
|
7015
|
-
console.warn(
|
|
7009
|
+
console.warn(_formatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the aspect ratio of the rendered image ` +
|
|
7016
7010
|
`does not match the image's intrinsic aspect ratio. ` +
|
|
7017
7011
|
`\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` +
|
|
7018
7012
|
`(aspect-ratio: ${round(intrinsicAspectRatio)}). \nRendered image size: ` +
|
|
@@ -7030,7 +7024,7 @@ function assertNoImageDistortion(dir, img, renderer) {
|
|
|
7030
7024
|
const oversizedWidth = intrinsicWidth - recommendedWidth >= OVERSIZED_IMAGE_TOLERANCE;
|
|
7031
7025
|
const oversizedHeight = intrinsicHeight - recommendedHeight >= OVERSIZED_IMAGE_TOLERANCE;
|
|
7032
7026
|
if (oversizedWidth || oversizedHeight) {
|
|
7033
|
-
console.warn(
|
|
7027
|
+
console.warn(_formatRuntimeError(2960 /* RuntimeErrorCode.OVERSIZED_IMAGE */, `${imgDirectiveDetails(dir.ngSrc)} the intrinsic image is significantly ` +
|
|
7034
7028
|
`larger than necessary. ` +
|
|
7035
7029
|
`\nRendered image size: ${renderedWidth}w x ${renderedHeight}h. ` +
|
|
7036
7030
|
`\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h. ` +
|
|
@@ -7062,7 +7056,7 @@ function assertNonEmptyWidthAndHeight(dir) {
|
|
|
7062
7056
|
if (dir.height === undefined)
|
|
7063
7057
|
missingAttributes.push('height');
|
|
7064
7058
|
if (missingAttributes.length > 0) {
|
|
7065
|
-
throw new
|
|
7059
|
+
throw new _RuntimeError(2954 /* RuntimeErrorCode.REQUIRED_INPUT_MISSING */, `${imgDirectiveDetails(dir.ngSrc)} these required attributes ` +
|
|
7066
7060
|
`are missing: ${missingAttributes.map((attr) => `"${attr}"`).join(', ')}. ` +
|
|
7067
7061
|
`Including "width" and "height" attributes will prevent image-related layout shifts. ` +
|
|
7068
7062
|
`To fix this, include "width" and "height" attributes on the image tag or turn on ` +
|
|
@@ -7075,7 +7069,7 @@ function assertNonEmptyWidthAndHeight(dir) {
|
|
|
7075
7069
|
*/
|
|
7076
7070
|
function assertEmptyWidthAndHeight(dir) {
|
|
7077
7071
|
if (dir.width || dir.height) {
|
|
7078
|
-
throw new
|
|
7072
|
+
throw new _RuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the attributes \`height\` and/or \`width\` are present ` +
|
|
7079
7073
|
`along with the \`fill\` attribute. Because \`fill\` mode causes an image to fill its containing ` +
|
|
7080
7074
|
`element, the size attributes have no effect and should be removed.`);
|
|
7081
7075
|
}
|
|
@@ -7090,7 +7084,7 @@ function assertNonZeroRenderedHeight(dir, img, renderer) {
|
|
|
7090
7084
|
removeErrorListenerFn();
|
|
7091
7085
|
const renderedHeight = img.clientHeight;
|
|
7092
7086
|
if (dir.fill && renderedHeight === 0) {
|
|
7093
|
-
console.warn(
|
|
7087
|
+
console.warn(_formatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the height of the fill-mode image is zero. ` +
|
|
7094
7088
|
`This is likely because the containing element does not have the CSS 'position' ` +
|
|
7095
7089
|
`property set to one of the following: "relative", "fixed", or "absolute". ` +
|
|
7096
7090
|
`To fix this problem, make sure the container element has the CSS 'position' ` +
|
|
@@ -7111,7 +7105,7 @@ function assertNonZeroRenderedHeight(dir, img, renderer) {
|
|
|
7111
7105
|
*/
|
|
7112
7106
|
function assertValidLoadingInput(dir) {
|
|
7113
7107
|
if (dir.loading && dir.priority) {
|
|
7114
|
-
throw new
|
|
7108
|
+
throw new _RuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \`loading\` attribute ` +
|
|
7115
7109
|
`was used on an image that was marked "priority". ` +
|
|
7116
7110
|
`Setting \`loading\` on priority images is not allowed ` +
|
|
7117
7111
|
`because these images will always be eagerly loaded. ` +
|
|
@@ -7119,7 +7113,7 @@ function assertValidLoadingInput(dir) {
|
|
|
7119
7113
|
}
|
|
7120
7114
|
const validInputs = ['auto', 'eager', 'lazy'];
|
|
7121
7115
|
if (typeof dir.loading === 'string' && !validInputs.includes(dir.loading)) {
|
|
7122
|
-
throw new
|
|
7116
|
+
throw new _RuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \`loading\` attribute ` +
|
|
7123
7117
|
`has an invalid value (\`${dir.loading}\`). ` +
|
|
7124
7118
|
`To fix this, provide a valid value ("lazy", "eager", or "auto").`);
|
|
7125
7119
|
}
|
|
@@ -7143,7 +7137,7 @@ function assertNotMissingBuiltInLoader(ngSrc, imageLoader) {
|
|
|
7143
7137
|
}
|
|
7144
7138
|
}
|
|
7145
7139
|
if (builtInLoaderName) {
|
|
7146
|
-
console.warn(
|
|
7140
|
+
console.warn(_formatRuntimeError(2962 /* RuntimeErrorCode.MISSING_BUILTIN_LOADER */, `NgOptimizedImage: It looks like your images may be hosted on the ` +
|
|
7147
7141
|
`${builtInLoaderName} CDN, but your app is not using Angular's ` +
|
|
7148
7142
|
`built-in loader for that CDN. We recommend switching to use ` +
|
|
7149
7143
|
`the built-in by calling \`provide${builtInLoaderName}Loader()\` ` +
|
|
@@ -7158,7 +7152,7 @@ function assertNotMissingBuiltInLoader(ngSrc, imageLoader) {
|
|
|
7158
7152
|
*/
|
|
7159
7153
|
function assertNoNgSrcsetWithoutLoader(dir, imageLoader) {
|
|
7160
7154
|
if (dir.ngSrcset && imageLoader === noopImageLoader) {
|
|
7161
|
-
console.warn(
|
|
7155
|
+
console.warn(_formatRuntimeError(2963 /* RuntimeErrorCode.MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \`ngSrcset\` attribute is present but ` +
|
|
7162
7156
|
`no image loader is configured (i.e. the default one is being used), ` +
|
|
7163
7157
|
`which would result in the same image being used for all configured sizes. ` +
|
|
7164
7158
|
`To fix this, provide a loader or remove the \`ngSrcset\` attribute from the image.`));
|
|
@@ -7170,7 +7164,7 @@ function assertNoNgSrcsetWithoutLoader(dir, imageLoader) {
|
|
|
7170
7164
|
*/
|
|
7171
7165
|
function assertNoLoaderParamsWithoutLoader(dir, imageLoader) {
|
|
7172
7166
|
if (dir.loaderParams && imageLoader === noopImageLoader) {
|
|
7173
|
-
console.warn(
|
|
7167
|
+
console.warn(_formatRuntimeError(2963 /* RuntimeErrorCode.MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \`loaderParams\` attribute is present but ` +
|
|
7174
7168
|
`no image loader is configured (i.e. the default one is being used), ` +
|
|
7175
7169
|
`which means that the loaderParams data will not be consumed and will not affect the URL. ` +
|
|
7176
7170
|
`To fix this, provide a custom loader or remove the \`loaderParams\` attribute from the image.`));
|
|
@@ -7184,7 +7178,7 @@ async function assetPriorityCountBelowThreshold(appRef) {
|
|
|
7184
7178
|
IMGS_WITH_PRIORITY_ATTR_COUNT++;
|
|
7185
7179
|
await appRef.whenStable();
|
|
7186
7180
|
if (IMGS_WITH_PRIORITY_ATTR_COUNT > PRIORITY_COUNT_THRESHOLD) {
|
|
7187
|
-
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). ` +
|
|
7188
7182
|
`Marking too many images as "high" priority can hurt your application's LCP (https://web.dev/lcp). ` +
|
|
7189
7183
|
`"Priority" should only be set on the image expected to be the page's LCP element.`));
|
|
7190
7184
|
}
|
|
@@ -7203,7 +7197,7 @@ function assertPlaceholderDimensions(dir, imgElement) {
|
|
|
7203
7197
|
let renderedWidth = parseFloat(computedStyle.getPropertyValue('width'));
|
|
7204
7198
|
let renderedHeight = parseFloat(computedStyle.getPropertyValue('height'));
|
|
7205
7199
|
if (renderedWidth > PLACEHOLDER_DIMENSION_LIMIT || renderedHeight > PLACEHOLDER_DIMENSION_LIMIT) {
|
|
7206
|
-
console.warn(
|
|
7200
|
+
console.warn(_formatRuntimeError(2967 /* RuntimeErrorCode.PLACEHOLDER_DIMENSION_LIMIT_EXCEEDED */, `${imgDirectiveDetails(dir.ngSrc)} it uses a placeholder image, but at least one ` +
|
|
7207
7201
|
`of the dimensions attribute (height or width) exceeds the limit of ${PLACEHOLDER_DIMENSION_LIMIT}px. ` +
|
|
7208
7202
|
`To fix this, use a smaller image as a placeholder.`));
|
|
7209
7203
|
}
|
|
@@ -7232,7 +7226,7 @@ function unwrapSafeUrl(value) {
|
|
|
7232
7226
|
if (typeof value === 'string') {
|
|
7233
7227
|
return value;
|
|
7234
7228
|
}
|
|
7235
|
-
return
|
|
7229
|
+
return _unwrapSafeValue(value);
|
|
7236
7230
|
}
|
|
7237
7231
|
// Transform function to handle inputs which may be booleans, strings, or string representations
|
|
7238
7232
|
// of boolean values. Used for the placeholder attribute.
|
|
@@ -7243,24 +7237,5 @@ function booleanOrUrlAttribute(value) {
|
|
|
7243
7237
|
return booleanAttribute(value);
|
|
7244
7238
|
}
|
|
7245
7239
|
|
|
7246
|
-
/**
|
|
7247
|
-
* @module
|
|
7248
|
-
* @description
|
|
7249
|
-
* Entry point for all public APIs of the common package.
|
|
7250
|
-
*/
|
|
7251
|
-
|
|
7252
|
-
/**
|
|
7253
|
-
* @module
|
|
7254
|
-
* @description
|
|
7255
|
-
* Entry point for all public APIs of this package.
|
|
7256
|
-
*/
|
|
7257
|
-
// This file only reexports content of the `src` folder. Keep it that way.
|
|
7258
|
-
|
|
7259
|
-
// This file is not used to build this module. It is only used during editing
|
|
7260
|
-
|
|
7261
|
-
/**
|
|
7262
|
-
* Generated bundle index. Do not edit.
|
|
7263
|
-
*/
|
|
7264
|
-
|
|
7265
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 };
|
|
7266
7241
|
//# sourceMappingURL=common.mjs.map
|