@angular/common 17.2.0-next.0 → 17.2.0-rc.0
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/esm2022/http/public_api.mjs +6 -6
- package/esm2022/http/src/client.mjs +6 -6
- package/esm2022/http/src/fetch.mjs +12 -11
- package/esm2022/http/src/headers.mjs +7 -9
- package/esm2022/http/src/interceptor.mjs +11 -10
- package/esm2022/http/src/jsonp.mjs +11 -13
- package/esm2022/http/src/module.mjs +18 -28
- package/esm2022/http/src/params.mjs +15 -14
- package/esm2022/http/src/private_export.mjs +2 -2
- package/esm2022/http/src/provider.mjs +13 -13
- package/esm2022/http/src/request.mjs +19 -21
- package/esm2022/http/src/response.mjs +3 -3
- package/esm2022/http/src/transfer_cache.mjs +15 -11
- package/esm2022/http/src/xhr.mjs +11 -10
- package/esm2022/http/src/xsrf.mjs +17 -14
- package/esm2022/http/testing/src/api.mjs +1 -1
- package/esm2022/http/testing/src/backend.mjs +11 -11
- package/esm2022/http/testing/src/module.mjs +7 -13
- package/esm2022/http/testing/src/provider.mjs +1 -1
- package/esm2022/http/testing/src/request.mjs +11 -8
- package/esm2022/src/common.mjs +6 -6
- package/esm2022/src/common_module.mjs +5 -5
- package/esm2022/src/cookie.mjs +1 -1
- package/esm2022/src/directives/index.mjs +1 -1
- package/esm2022/src/directives/ng_class.mjs +6 -6
- package/esm2022/src/directives/ng_component_outlet.mjs +11 -13
- package/esm2022/src/directives/ng_for_of.mjs +5 -5
- package/esm2022/src/directives/ng_if.mjs +7 -9
- package/esm2022/src/directives/ng_optimized_image/asserts.mjs +1 -1
- package/esm2022/src/directives/ng_optimized_image/error_helper.mjs +4 -2
- package/esm2022/src/directives/ng_optimized_image/image_loaders/cloudflare_loader.mjs +1 -1
- package/esm2022/src/directives/ng_optimized_image/image_loaders/cloudinary_loader.mjs +9 -8
- package/esm2022/src/directives/ng_optimized_image/image_loaders/image_loader.mjs +2 -2
- package/esm2022/src/directives/ng_optimized_image/image_loaders/imagekit_loader.mjs +1 -1
- package/esm2022/src/directives/ng_optimized_image/image_loaders/imgix_loader.mjs +2 -2
- package/esm2022/src/directives/ng_optimized_image/image_loaders/netlify_loader.mjs +82 -0
- package/esm2022/src/directives/ng_optimized_image/index.mjs +2 -1
- package/esm2022/src/directives/ng_optimized_image/lcp_image_observer.mjs +6 -6
- package/esm2022/src/directives/ng_optimized_image/ng_optimized_image.mjs +167 -29
- package/esm2022/src/directives/ng_optimized_image/preconnect_link_checker.mjs +12 -14
- package/esm2022/src/directives/ng_optimized_image/preload-link-creator.mjs +4 -4
- package/esm2022/src/directives/ng_optimized_image/tokens.mjs +5 -2
- package/esm2022/src/directives/ng_optimized_image/url.mjs +2 -2
- package/esm2022/src/directives/ng_plural.mjs +7 -7
- package/esm2022/src/directives/ng_style.mjs +5 -5
- package/esm2022/src/directives/ng_switch.mjs +17 -15
- package/esm2022/src/directives/ng_switch_equality.mjs +1 -1
- package/esm2022/src/directives/ng_template_outlet.mjs +5 -5
- package/esm2022/src/dom_adapter.mjs +2 -4
- package/esm2022/src/dom_tokens.mjs +2 -2
- package/esm2022/src/errors.mjs +1 -1
- package/esm2022/src/i18n/format_date.mjs +62 -43
- package/esm2022/src/i18n/format_number.mjs +14 -13
- package/esm2022/src/i18n/locale_data.mjs +1 -1
- package/esm2022/src/i18n/locale_data_api.mjs +14 -8
- package/esm2022/src/i18n/localization.mjs +7 -7
- package/esm2022/src/location/hash_location_strategy.mjs +6 -8
- package/esm2022/src/location/index.mjs +2 -2
- package/esm2022/src/location/location.mjs +9 -11
- package/esm2022/src/location/location_strategy.mjs +14 -11
- package/esm2022/src/location/platform_location.mjs +9 -9
- package/esm2022/src/location/util.mjs +2 -2
- package/esm2022/src/navigation/navigation_types.mjs +9 -0
- package/esm2022/src/navigation/platform_navigation.mjs +4 -4
- package/esm2022/src/pipes/async_pipe.mjs +7 -7
- package/esm2022/src/pipes/case_conversion_pipes.mjs +11 -11
- package/esm2022/src/pipes/date_pipe.mjs +70 -71
- package/esm2022/src/pipes/i18n_plural_pipe.mjs +4 -5
- package/esm2022/src/pipes/i18n_select_pipe.mjs +4 -5
- package/esm2022/src/pipes/index.mjs +1 -1
- package/esm2022/src/pipes/invalid_pipe_argument_error.mjs +1 -1
- package/esm2022/src/pipes/json_pipe.mjs +3 -3
- package/esm2022/src/pipes/keyvalue_pipe.mjs +7 -9
- package/esm2022/src/pipes/number_pipe.mjs +13 -13
- package/esm2022/src/pipes/slice_pipe.mjs +4 -4
- package/esm2022/src/private_export.mjs +3 -2
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/src/viewport_scroller.mjs +6 -5
- package/esm2022/testing/src/location_mock.mjs +34 -19
- package/esm2022/testing/src/mock_location_strategy.mjs +6 -6
- package/esm2022/testing/src/mock_platform_location.mjs +112 -13
- package/esm2022/testing/src/navigation/fake_navigation.mjs +11 -11
- package/esm2022/testing/src/navigation/navigation_types.mjs +9 -0
- package/esm2022/testing/src/navigation/provide_fake_platform_navigation.mjs +8 -5
- package/esm2022/testing/src/private_export.mjs +9 -0
- package/esm2022/testing/src/testing.mjs +3 -2
- package/esm2022/upgrade/src/index.mjs +2 -2
- package/esm2022/upgrade/src/location_shim.mjs +11 -13
- package/esm2022/upgrade/src/location_upgrade_module.mjs +15 -18
- package/esm2022/upgrade/src/params.mjs +6 -6
- package/esm2022/upgrade/src/utils.mjs +2 -2
- package/fesm2022/common.mjs +584 -341
- package/fesm2022/common.mjs.map +1 -1
- package/fesm2022/http/testing.mjs +26 -29
- package/fesm2022/http/testing.mjs.map +1 -1
- package/fesm2022/http.mjs +133 -138
- package/fesm2022/http.mjs.map +1 -1
- package/fesm2022/testing.mjs +993 -199
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/upgrade.mjs +30 -35
- package/fesm2022/upgrade.mjs.map +1 -1
- package/http/index.d.ts +2 -2
- package/http/testing/index.d.ts +3 -3
- package/index.d.ts +275 -70
- package/locales/ff-CM.mjs +31 -11
- package/locales/ff-GN.mjs +31 -11
- package/locales/ff-MR.mjs +31 -11
- package/locales/global/ff-CM.js +58 -44
- package/locales/global/ff-GN.js +58 -44
- package/locales/global/ff-MR.js +58 -44
- package/package.json +2 -2
- package/testing/index.d.ts +6 -1
- package/upgrade/index.d.ts +1 -1
package/fesm2022/common.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v17.2.0-
|
|
2
|
+
* @license Angular v17.2.0-rc.0
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
|
-
import { InjectionToken, inject,
|
|
8
|
+
import { Injectable, InjectionToken, inject, Optional, Inject, EventEmitter, ɵɵinject, ɵfindLocaleData, ɵLocaleDataIndex, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, LOCALE_ID, ɵregisterLocaleData, ɵstringify, Directive, Input, createNgModule, NgModuleRef, ɵRuntimeError, ɵformatRuntimeError, Host, Attribute, RendererStyleFlags2, untracked, ɵisPromise, ɵisSubscribable, Pipe, DEFAULT_CURRENCY_CODE, NgModule, Version, ɵɵdefineInjectable, PLATFORM_ID, ɵIMAGE_CONFIG, Renderer2, ElementRef, Injector, ɵperformanceMarkFeature, NgZone, numberAttribute, booleanAttribute, ɵIMAGE_CONFIG_DEFAULTS, ɵunwrapSafeValue } from '@angular/core';
|
|
9
9
|
export { ɵIMAGE_CONFIG as IMAGE_CONFIG } from '@angular/core';
|
|
10
10
|
|
|
11
11
|
let _DOM = null;
|
|
@@ -13,9 +13,7 @@ function getDOM() {
|
|
|
13
13
|
return _DOM;
|
|
14
14
|
}
|
|
15
15
|
function setRootDomAdapter(adapter) {
|
|
16
|
-
|
|
17
|
-
_DOM = adapter;
|
|
18
|
-
}
|
|
16
|
+
_DOM ??= adapter;
|
|
19
17
|
}
|
|
20
18
|
/* tslint:disable:requireParameterType */
|
|
21
19
|
/**
|
|
@@ -27,6 +25,19 @@ function setRootDomAdapter(adapter) {
|
|
|
27
25
|
class DomAdapter {
|
|
28
26
|
}
|
|
29
27
|
|
|
28
|
+
/**
|
|
29
|
+
* This class wraps the platform Navigation API which allows server-specific and test
|
|
30
|
+
* implementations.
|
|
31
|
+
*/
|
|
32
|
+
class PlatformNavigation {
|
|
33
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: PlatformNavigation, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
34
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: PlatformNavigation, providedIn: 'platform', useFactory: () => window.navigation }); }
|
|
35
|
+
}
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: PlatformNavigation, decorators: [{
|
|
37
|
+
type: Injectable,
|
|
38
|
+
args: [{ providedIn: 'platform', useFactory: () => window.navigation }]
|
|
39
|
+
}] });
|
|
40
|
+
|
|
30
41
|
/**
|
|
31
42
|
* A DI Token representing the main rendering context.
|
|
32
43
|
* In a browser and SSR this is the DOM Document.
|
|
@@ -34,7 +45,7 @@ class DomAdapter {
|
|
|
34
45
|
*
|
|
35
46
|
* @publicApi
|
|
36
47
|
*/
|
|
37
|
-
const DOCUMENT = new InjectionToken('DocumentToken');
|
|
48
|
+
const DOCUMENT = new InjectionToken(ngDevMode ? 'DocumentToken' : '');
|
|
38
49
|
|
|
39
50
|
/**
|
|
40
51
|
* This class should not be used directly by an application developer. Instead, use
|
|
@@ -60,12 +71,12 @@ const DOCUMENT = new InjectionToken('DocumentToken');
|
|
|
60
71
|
*/
|
|
61
72
|
class PlatformLocation {
|
|
62
73
|
historyGo(relativePosition) {
|
|
63
|
-
throw new Error('Not implemented');
|
|
74
|
+
throw new Error(ngDevMode ? 'Not implemented' : '');
|
|
64
75
|
}
|
|
65
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
66
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-
|
|
76
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: PlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
77
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: PlatformLocation, providedIn: 'platform', useFactory: () => inject(BrowserPlatformLocation) }); }
|
|
67
78
|
}
|
|
68
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
79
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: PlatformLocation, decorators: [{
|
|
69
80
|
type: Injectable,
|
|
70
81
|
args: [{ providedIn: 'platform', useFactory: () => inject(BrowserPlatformLocation) }]
|
|
71
82
|
}] });
|
|
@@ -75,7 +86,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0",
|
|
|
75
86
|
*
|
|
76
87
|
* @publicApi
|
|
77
88
|
*/
|
|
78
|
-
const LOCATION_INITIALIZED = new InjectionToken('Location Initialized');
|
|
89
|
+
const LOCATION_INITIALIZED = new InjectionToken(ngDevMode ? 'Location Initialized' : '');
|
|
79
90
|
/**
|
|
80
91
|
* `PlatformLocation` encapsulates all of the direct calls to platform APIs.
|
|
81
92
|
* This class should not be used directly by an application developer. Instead, use
|
|
@@ -145,10 +156,10 @@ class BrowserPlatformLocation extends PlatformLocation {
|
|
|
145
156
|
getState() {
|
|
146
157
|
return this._history.state;
|
|
147
158
|
}
|
|
148
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
149
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-
|
|
159
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: BrowserPlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
160
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: BrowserPlatformLocation, providedIn: 'platform', useFactory: () => new BrowserPlatformLocation() }); }
|
|
150
161
|
}
|
|
151
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
162
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: BrowserPlatformLocation, decorators: [{
|
|
152
163
|
type: Injectable,
|
|
153
164
|
args: [{
|
|
154
165
|
providedIn: 'platform',
|
|
@@ -198,7 +209,7 @@ function joinWithSlash(start, end) {
|
|
|
198
209
|
*/
|
|
199
210
|
function stripTrailingSlash(url) {
|
|
200
211
|
const match = url.match(/#|\?|$/);
|
|
201
|
-
const pathEndIdx = match && match.index || url.length;
|
|
212
|
+
const pathEndIdx = (match && match.index) || url.length;
|
|
202
213
|
const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);
|
|
203
214
|
return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);
|
|
204
215
|
}
|
|
@@ -232,12 +243,12 @@ function normalizeQueryParams(params) {
|
|
|
232
243
|
*/
|
|
233
244
|
class LocationStrategy {
|
|
234
245
|
historyGo(relativePosition) {
|
|
235
|
-
throw new Error('Not implemented');
|
|
246
|
+
throw new Error(ngDevMode ? 'Not implemented' : '');
|
|
236
247
|
}
|
|
237
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
238
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-
|
|
248
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
249
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: () => inject(PathLocationStrategy) }); }
|
|
239
250
|
}
|
|
240
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
251
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: LocationStrategy, decorators: [{
|
|
241
252
|
type: Injectable,
|
|
242
253
|
args: [{ providedIn: 'root', useFactory: () => inject(PathLocationStrategy) }]
|
|
243
254
|
}] });
|
|
@@ -264,7 +275,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0",
|
|
|
264
275
|
*
|
|
265
276
|
* @publicApi
|
|
266
277
|
*/
|
|
267
|
-
const APP_BASE_HREF = new InjectionToken('appBaseHref');
|
|
278
|
+
const APP_BASE_HREF = new InjectionToken(ngDevMode ? 'appBaseHref' : '');
|
|
268
279
|
/**
|
|
269
280
|
* @description
|
|
270
281
|
* A {@link LocationStrategy} used to configure the {@link Location} service to
|
|
@@ -301,8 +312,11 @@ class PathLocationStrategy extends LocationStrategy {
|
|
|
301
312
|
super();
|
|
302
313
|
this._platformLocation = _platformLocation;
|
|
303
314
|
this._removeListenerFns = [];
|
|
304
|
-
this._baseHref =
|
|
305
|
-
|
|
315
|
+
this._baseHref =
|
|
316
|
+
href ??
|
|
317
|
+
this._platformLocation.getBaseHrefFromDOM() ??
|
|
318
|
+
inject(DOCUMENT).location?.origin ??
|
|
319
|
+
'';
|
|
306
320
|
}
|
|
307
321
|
/** @nodoc */
|
|
308
322
|
ngOnDestroy() {
|
|
@@ -344,10 +358,10 @@ class PathLocationStrategy extends LocationStrategy {
|
|
|
344
358
|
historyGo(relativePosition = 0) {
|
|
345
359
|
this._platformLocation.historyGo?.(relativePosition);
|
|
346
360
|
}
|
|
347
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
348
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-
|
|
361
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: PathLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
362
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: PathLocationStrategy, providedIn: 'root' }); }
|
|
349
363
|
}
|
|
350
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
364
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: PathLocationStrategy, decorators: [{
|
|
351
365
|
type: Injectable,
|
|
352
366
|
args: [{ providedIn: 'root' }]
|
|
353
367
|
}], ctorParameters: () => [{ type: PlatformLocation }, { type: undefined, decorators: [{
|
|
@@ -400,14 +414,12 @@ class HashLocationStrategy extends LocationStrategy {
|
|
|
400
414
|
path(includeHash = false) {
|
|
401
415
|
// the hash value is always prefixed with a `#`
|
|
402
416
|
// and if it is empty then it will stay empty
|
|
403
|
-
|
|
404
|
-
if (path == null)
|
|
405
|
-
path = '#';
|
|
417
|
+
const path = this._platformLocation.hash ?? '#';
|
|
406
418
|
return path.length > 0 ? path.substring(1) : path;
|
|
407
419
|
}
|
|
408
420
|
prepareExternalUrl(internal) {
|
|
409
421
|
const url = joinWithSlash(this._baseHref, internal);
|
|
410
|
-
return url.length > 0 ?
|
|
422
|
+
return url.length > 0 ? '#' + url : url;
|
|
411
423
|
}
|
|
412
424
|
pushState(state, title, path, queryParams) {
|
|
413
425
|
let url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams));
|
|
@@ -435,10 +447,10 @@ class HashLocationStrategy extends LocationStrategy {
|
|
|
435
447
|
historyGo(relativePosition = 0) {
|
|
436
448
|
this._platformLocation.historyGo?.(relativePosition);
|
|
437
449
|
}
|
|
438
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
439
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-
|
|
450
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: HashLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
451
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: HashLocationStrategy }); }
|
|
440
452
|
}
|
|
441
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
453
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: HashLocationStrategy, decorators: [{
|
|
442
454
|
type: Injectable
|
|
443
455
|
}], ctorParameters: () => [{ type: PlatformLocation }, { type: undefined, decorators: [{
|
|
444
456
|
type: Optional
|
|
@@ -625,11 +637,9 @@ class Location {
|
|
|
625
637
|
*/
|
|
626
638
|
onUrlChange(fn) {
|
|
627
639
|
this._urlChangeListeners.push(fn);
|
|
628
|
-
|
|
629
|
-
this.
|
|
630
|
-
|
|
631
|
-
});
|
|
632
|
-
}
|
|
640
|
+
this._urlChangeSubscription ??= this.subscribe((v) => {
|
|
641
|
+
this._notifyUrlChangeListeners(v.url, v.state);
|
|
642
|
+
});
|
|
633
643
|
return () => {
|
|
634
644
|
const fnIndex = this._urlChangeListeners.indexOf(fn);
|
|
635
645
|
this._urlChangeListeners.splice(fnIndex, 1);
|
|
@@ -641,7 +651,7 @@ class Location {
|
|
|
641
651
|
}
|
|
642
652
|
/** @internal */
|
|
643
653
|
_notifyUrlChangeListeners(url = '', state) {
|
|
644
|
-
this._urlChangeListeners.forEach(fn => fn(url, state));
|
|
654
|
+
this._urlChangeListeners.forEach((fn) => fn(url, state));
|
|
645
655
|
}
|
|
646
656
|
/**
|
|
647
657
|
* Subscribes to the platform's `popState` events.
|
|
@@ -687,10 +697,10 @@ class Location {
|
|
|
687
697
|
* @returns The URL string, modified if needed.
|
|
688
698
|
*/
|
|
689
699
|
static { this.stripTrailingSlash = stripTrailingSlash; }
|
|
690
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
691
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-
|
|
700
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: Location, deps: [{ token: LocationStrategy }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
701
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation }); }
|
|
692
702
|
}
|
|
693
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
703
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: Location, decorators: [{
|
|
694
704
|
type: Injectable,
|
|
695
705
|
args: [{
|
|
696
706
|
providedIn: 'root',
|
|
@@ -720,7 +730,7 @@ function _stripOrigin(baseHref) {
|
|
|
720
730
|
// syntactically incorrect code after Closure Compiler minification.
|
|
721
731
|
// This was likely caused by a bug in Closure Compiler, but
|
|
722
732
|
// for now, the check is rewritten to use `new RegExp` instead.
|
|
723
|
-
const isAbsoluteUrl =
|
|
733
|
+
const isAbsoluteUrl = new RegExp('^(https?:)?//').test(baseHref);
|
|
724
734
|
if (isAbsoluteUrl) {
|
|
725
735
|
const [, pathname] = baseHref.split(/\/\/[^\/]+/);
|
|
726
736
|
return pathname;
|
|
@@ -954,7 +964,8 @@ function getLocaleId(locale) {
|
|
|
954
964
|
function getLocaleDayPeriods(locale, formStyle, width) {
|
|
955
965
|
const data = ɵfindLocaleData(locale);
|
|
956
966
|
const amPmData = [
|
|
957
|
-
data[ɵLocaleDataIndex.DayPeriodsFormat],
|
|
967
|
+
data[ɵLocaleDataIndex.DayPeriodsFormat],
|
|
968
|
+
data[ɵLocaleDataIndex.DayPeriodsStandalone],
|
|
958
969
|
];
|
|
959
970
|
const amPm = getLastDefinedValue(amPmData, formStyle);
|
|
960
971
|
return getLastDefinedValue(amPm, width);
|
|
@@ -973,7 +984,10 @@ function getLocaleDayPeriods(locale, formStyle, width) {
|
|
|
973
984
|
*/
|
|
974
985
|
function getLocaleDayNames(locale, formStyle, width) {
|
|
975
986
|
const data = ɵfindLocaleData(locale);
|
|
976
|
-
const daysData = [
|
|
987
|
+
const daysData = [
|
|
988
|
+
data[ɵLocaleDataIndex.DaysFormat],
|
|
989
|
+
data[ɵLocaleDataIndex.DaysStandalone],
|
|
990
|
+
];
|
|
977
991
|
const days = getLastDefinedValue(daysData, formStyle);
|
|
978
992
|
return getLastDefinedValue(days, width);
|
|
979
993
|
}
|
|
@@ -991,7 +1005,10 @@ function getLocaleDayNames(locale, formStyle, width) {
|
|
|
991
1005
|
*/
|
|
992
1006
|
function getLocaleMonthNames(locale, formStyle, width) {
|
|
993
1007
|
const data = ɵfindLocaleData(locale);
|
|
994
|
-
const monthsData = [
|
|
1008
|
+
const monthsData = [
|
|
1009
|
+
data[ɵLocaleDataIndex.MonthsFormat],
|
|
1010
|
+
data[ɵLocaleDataIndex.MonthsStandalone],
|
|
1011
|
+
];
|
|
995
1012
|
const months = getLastDefinedValue(monthsData, formStyle);
|
|
996
1013
|
return getLastDefinedValue(months, width);
|
|
997
1014
|
}
|
|
@@ -1206,8 +1223,7 @@ function getLocaleCurrencies(locale) {
|
|
|
1206
1223
|
const getLocalePluralCase = ɵgetLocalePluralCase;
|
|
1207
1224
|
function checkFullData(data) {
|
|
1208
1225
|
if (!data[ɵLocaleDataIndex.ExtraData]) {
|
|
1209
|
-
throw new Error(`Missing extra locale data for the locale "${data[ɵLocaleDataIndex
|
|
1210
|
-
.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`);
|
|
1226
|
+
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.`);
|
|
1211
1227
|
}
|
|
1212
1228
|
}
|
|
1213
1229
|
/**
|
|
@@ -1265,7 +1281,7 @@ function getLocaleExtraDayPeriods(locale, formStyle, width) {
|
|
|
1265
1281
|
checkFullData(data);
|
|
1266
1282
|
const dayPeriodsData = [
|
|
1267
1283
|
data[ɵLocaleDataIndex.ExtraData][0 /* ɵExtraLocaleDataIndex.ExtraDayPeriodFormats */],
|
|
1268
|
-
data[ɵLocaleDataIndex.ExtraData][1 /* ɵExtraLocaleDataIndex.ExtraDayPeriodStandalone */]
|
|
1284
|
+
data[ɵLocaleDataIndex.ExtraData][1 /* ɵExtraLocaleDataIndex.ExtraDayPeriodStandalone */],
|
|
1269
1285
|
];
|
|
1270
1286
|
const dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || [];
|
|
1271
1287
|
return getLastDefinedValue(dayPeriods, width) || [];
|
|
@@ -1430,11 +1446,13 @@ function formatDate(value, format, locale, timezone) {
|
|
|
1430
1446
|
date = convertTimezoneToLocal(date, timezone, true);
|
|
1431
1447
|
}
|
|
1432
1448
|
let text = '';
|
|
1433
|
-
parts.forEach(value => {
|
|
1449
|
+
parts.forEach((value) => {
|
|
1434
1450
|
const dateFormatter = getDateFormatter(value);
|
|
1435
|
-
text += dateFormatter
|
|
1436
|
-
|
|
1437
|
-
|
|
1451
|
+
text += dateFormatter
|
|
1452
|
+
? dateFormatter(date, locale, dateTimezoneOffset)
|
|
1453
|
+
: value === "''"
|
|
1454
|
+
? "'"
|
|
1455
|
+
: value.replace(/(^'|'$)/g, '').replace(/''/g, "'");
|
|
1438
1456
|
});
|
|
1439
1457
|
return text;
|
|
1440
1458
|
}
|
|
@@ -1468,7 +1486,7 @@ function createDate(year, month, date) {
|
|
|
1468
1486
|
}
|
|
1469
1487
|
function getNamedFormat(locale, format) {
|
|
1470
1488
|
const localeId = getLocaleId(locale);
|
|
1471
|
-
NAMED_FORMATS[localeId]
|
|
1489
|
+
NAMED_FORMATS[localeId] ??= {};
|
|
1472
1490
|
if (NAMED_FORMATS[localeId][format]) {
|
|
1473
1491
|
return NAMED_FORMATS[localeId][format];
|
|
1474
1492
|
}
|
|
@@ -1501,24 +1519,34 @@ function getNamedFormat(locale, format) {
|
|
|
1501
1519
|
case 'short':
|
|
1502
1520
|
const shortTime = getNamedFormat(locale, 'shortTime');
|
|
1503
1521
|
const shortDate = getNamedFormat(locale, 'shortDate');
|
|
1504
|
-
formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [
|
|
1522
|
+
formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [
|
|
1523
|
+
shortTime,
|
|
1524
|
+
shortDate,
|
|
1525
|
+
]);
|
|
1505
1526
|
break;
|
|
1506
1527
|
case 'medium':
|
|
1507
1528
|
const mediumTime = getNamedFormat(locale, 'mediumTime');
|
|
1508
1529
|
const mediumDate = getNamedFormat(locale, 'mediumDate');
|
|
1509
|
-
formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [
|
|
1530
|
+
formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [
|
|
1531
|
+
mediumTime,
|
|
1532
|
+
mediumDate,
|
|
1533
|
+
]);
|
|
1510
1534
|
break;
|
|
1511
1535
|
case 'long':
|
|
1512
1536
|
const longTime = getNamedFormat(locale, 'longTime');
|
|
1513
1537
|
const longDate = getNamedFormat(locale, 'longDate');
|
|
1514
|
-
formatValue =
|
|
1515
|
-
|
|
1538
|
+
formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [
|
|
1539
|
+
longTime,
|
|
1540
|
+
longDate,
|
|
1541
|
+
]);
|
|
1516
1542
|
break;
|
|
1517
1543
|
case 'full':
|
|
1518
1544
|
const fullTime = getNamedFormat(locale, 'fullTime');
|
|
1519
1545
|
const fullDate = getNamedFormat(locale, 'fullDate');
|
|
1520
|
-
formatValue =
|
|
1521
|
-
|
|
1546
|
+
formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [
|
|
1547
|
+
fullTime,
|
|
1548
|
+
fullDate,
|
|
1549
|
+
]);
|
|
1522
1550
|
break;
|
|
1523
1551
|
}
|
|
1524
1552
|
if (formatValue) {
|
|
@@ -1529,7 +1557,7 @@ function getNamedFormat(locale, format) {
|
|
|
1529
1557
|
function formatDateTime(str, opt_values) {
|
|
1530
1558
|
if (opt_values) {
|
|
1531
1559
|
str = str.replace(/\{([^}]+)}/g, function (match, key) {
|
|
1532
|
-
return
|
|
1560
|
+
return opt_values != null && key in opt_values ? opt_values[key] : match;
|
|
1533
1561
|
});
|
|
1534
1562
|
}
|
|
1535
1563
|
return str;
|
|
@@ -1624,13 +1652,12 @@ function getDateTranslation(date, locale, name, width, form, extended) {
|
|
|
1624
1652
|
if (extended) {
|
|
1625
1653
|
const rules = getLocaleExtraDayPeriodRules(locale);
|
|
1626
1654
|
const dayPeriods = getLocaleExtraDayPeriods(locale, form, width);
|
|
1627
|
-
const index = rules.findIndex(rule => {
|
|
1655
|
+
const index = rules.findIndex((rule) => {
|
|
1628
1656
|
if (Array.isArray(rule)) {
|
|
1629
1657
|
// morning, afternoon, evening, night
|
|
1630
1658
|
const [from, to] = rule;
|
|
1631
1659
|
const afterFrom = currentHours >= from.hours && currentMinutes >= from.minutes;
|
|
1632
|
-
const beforeTo =
|
|
1633
|
-
(currentHours === to.hours && currentMinutes < to.minutes));
|
|
1660
|
+
const beforeTo = currentHours < to.hours || (currentHours === to.hours && currentMinutes < to.minutes);
|
|
1634
1661
|
// We must account for normal rules that span a period during the day (e.g. 6am-9am)
|
|
1635
1662
|
// where `from` is less (earlier) than `to`. But also rules that span midnight (e.g.
|
|
1636
1663
|
// 10pm - 5am) where `from` is greater (later!) than `to`.
|
|
@@ -1650,7 +1677,8 @@ function getDateTranslation(date, locale, name, width, form, extended) {
|
|
|
1650
1677
|
return true;
|
|
1651
1678
|
}
|
|
1652
1679
|
}
|
|
1653
|
-
else {
|
|
1680
|
+
else {
|
|
1681
|
+
// noon or midnight
|
|
1654
1682
|
if (rule.hours === currentHours && rule.minutes === currentMinutes) {
|
|
1655
1683
|
return true;
|
|
1656
1684
|
}
|
|
@@ -1686,20 +1714,26 @@ function timeZoneGetter(width) {
|
|
|
1686
1714
|
const hours = zone > 0 ? Math.floor(zone / 60) : Math.ceil(zone / 60);
|
|
1687
1715
|
switch (width) {
|
|
1688
1716
|
case ZoneWidth.Short:
|
|
1689
|
-
return ((zone >= 0
|
|
1690
|
-
padNumber(
|
|
1717
|
+
return ((zone >= 0 ? '+' : '') +
|
|
1718
|
+
padNumber(hours, 2, minusSign) +
|
|
1719
|
+
padNumber(Math.abs(zone % 60), 2, minusSign));
|
|
1691
1720
|
case ZoneWidth.ShortGMT:
|
|
1692
|
-
return 'GMT' + (
|
|
1721
|
+
return 'GMT' + (zone >= 0 ? '+' : '') + padNumber(hours, 1, minusSign);
|
|
1693
1722
|
case ZoneWidth.Long:
|
|
1694
|
-
return 'GMT' +
|
|
1695
|
-
|
|
1723
|
+
return ('GMT' +
|
|
1724
|
+
(zone >= 0 ? '+' : '') +
|
|
1725
|
+
padNumber(hours, 2, minusSign) +
|
|
1726
|
+
':' +
|
|
1727
|
+
padNumber(Math.abs(zone % 60), 2, minusSign));
|
|
1696
1728
|
case ZoneWidth.Extended:
|
|
1697
1729
|
if (offset === 0) {
|
|
1698
1730
|
return 'Z';
|
|
1699
1731
|
}
|
|
1700
1732
|
else {
|
|
1701
|
-
return ((zone >= 0
|
|
1702
|
-
padNumber(
|
|
1733
|
+
return ((zone >= 0 ? '+' : '') +
|
|
1734
|
+
padNumber(hours, 2, minusSign) +
|
|
1735
|
+
':' +
|
|
1736
|
+
padNumber(Math.abs(zone % 60), 2, minusSign));
|
|
1703
1737
|
}
|
|
1704
1738
|
default:
|
|
1705
1739
|
throw new Error(`Unknown zone width "${width}"`);
|
|
@@ -1710,10 +1744,17 @@ const JANUARY = 0;
|
|
|
1710
1744
|
const THURSDAY = 4;
|
|
1711
1745
|
function getFirstThursdayOfYear(year) {
|
|
1712
1746
|
const firstDayOfYear = createDate(year, JANUARY, 1).getDay();
|
|
1713
|
-
return createDate(year, 0, 1 + (
|
|
1747
|
+
return createDate(year, 0, 1 + (firstDayOfYear <= THURSDAY ? THURSDAY : THURSDAY + 7) - firstDayOfYear);
|
|
1714
1748
|
}
|
|
1715
|
-
|
|
1716
|
-
|
|
1749
|
+
/**
|
|
1750
|
+
* ISO Week starts on day 1 (Monday) and ends with day 0 (Sunday)
|
|
1751
|
+
*/
|
|
1752
|
+
function getThursdayThisIsoWeek(datetime) {
|
|
1753
|
+
// getDay returns 0-6 range with sunday as 0.
|
|
1754
|
+
const currentDay = datetime.getDay();
|
|
1755
|
+
// On a Sunday, read the previous Thursday since ISO weeks start on Monday.
|
|
1756
|
+
const deltaToThursday = currentDay === 0 ? -3 : THURSDAY - currentDay;
|
|
1757
|
+
return createDate(datetime.getFullYear(), datetime.getMonth(), datetime.getDate() + deltaToThursday);
|
|
1717
1758
|
}
|
|
1718
1759
|
function weekGetter(size, monthBased = false) {
|
|
1719
1760
|
return function (date, locale) {
|
|
@@ -1724,7 +1765,7 @@ function weekGetter(size, monthBased = false) {
|
|
|
1724
1765
|
result = 1 + Math.floor((today + nbDaysBefore1stDayOfMonth) / 7);
|
|
1725
1766
|
}
|
|
1726
1767
|
else {
|
|
1727
|
-
const thisThurs =
|
|
1768
|
+
const thisThurs = getThursdayThisIsoWeek(date);
|
|
1728
1769
|
// Some days of a year are part of next year according to ISO 8601.
|
|
1729
1770
|
// Compute the firstThurs from the year of this week's Thursday
|
|
1730
1771
|
const firstThurs = getFirstThursdayOfYear(thisThurs.getFullYear());
|
|
@@ -1739,7 +1780,7 @@ function weekGetter(size, monthBased = false) {
|
|
|
1739
1780
|
*/
|
|
1740
1781
|
function weekNumberingYearGetter(size, trim = false) {
|
|
1741
1782
|
return function (date, locale) {
|
|
1742
|
-
const thisThurs =
|
|
1783
|
+
const thisThurs = getThursdayThisIsoWeek(date);
|
|
1743
1784
|
const weekNumberingYear = thisThurs.getFullYear();
|
|
1744
1785
|
return padNumber(weekNumberingYear, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign), trim);
|
|
1745
1786
|
};
|
|
@@ -1822,16 +1863,13 @@ function getDateFormatter(format) {
|
|
|
1822
1863
|
break;
|
|
1823
1864
|
// Month of the year (January, ...), string, standalone
|
|
1824
1865
|
case 'LLL':
|
|
1825
|
-
formatter =
|
|
1826
|
-
dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated, FormStyle.Standalone);
|
|
1866
|
+
formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated, FormStyle.Standalone);
|
|
1827
1867
|
break;
|
|
1828
1868
|
case 'LLLL':
|
|
1829
|
-
formatter =
|
|
1830
|
-
dateStrGetter(TranslationType.Months, TranslationWidth.Wide, FormStyle.Standalone);
|
|
1869
|
+
formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide, FormStyle.Standalone);
|
|
1831
1870
|
break;
|
|
1832
1871
|
case 'LLLLL':
|
|
1833
|
-
formatter =
|
|
1834
|
-
dateStrGetter(TranslationType.Months, TranslationWidth.Narrow, FormStyle.Standalone);
|
|
1872
|
+
formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow, FormStyle.Standalone);
|
|
1835
1873
|
break;
|
|
1836
1874
|
// Week of the year (1, ... 52)
|
|
1837
1875
|
case 'w':
|
|
@@ -1857,15 +1895,13 @@ function getDateFormatter(format) {
|
|
|
1857
1895
|
formatter = dateGetter(DateType.Day, 1);
|
|
1858
1896
|
break;
|
|
1859
1897
|
case 'ccc':
|
|
1860
|
-
formatter =
|
|
1861
|
-
dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated, FormStyle.Standalone);
|
|
1898
|
+
formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated, FormStyle.Standalone);
|
|
1862
1899
|
break;
|
|
1863
1900
|
case 'cccc':
|
|
1864
1901
|
formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide, FormStyle.Standalone);
|
|
1865
1902
|
break;
|
|
1866
1903
|
case 'ccccc':
|
|
1867
|
-
formatter =
|
|
1868
|
-
dateStrGetter(TranslationType.Days, TranslationWidth.Narrow, FormStyle.Standalone);
|
|
1904
|
+
formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Narrow, FormStyle.Standalone);
|
|
1869
1905
|
break;
|
|
1870
1906
|
case 'cccccc':
|
|
1871
1907
|
formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short, FormStyle.Standalone);
|
|
@@ -1916,8 +1952,7 @@ function getDateFormatter(format) {
|
|
|
1916
1952
|
formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Format, true);
|
|
1917
1953
|
break;
|
|
1918
1954
|
case 'BBBB':
|
|
1919
|
-
formatter =
|
|
1920
|
-
dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Format, true);
|
|
1955
|
+
formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Format, true);
|
|
1921
1956
|
break;
|
|
1922
1957
|
case 'BBBBB':
|
|
1923
1958
|
formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Format, true);
|
|
@@ -2050,7 +2085,7 @@ function toDate(value) {
|
|
|
2050
2085
|
return new Date(parsedNb);
|
|
2051
2086
|
}
|
|
2052
2087
|
let match;
|
|
2053
|
-
if (match = value.match(ISO8601_DATE_REGEX)) {
|
|
2088
|
+
if ((match = value.match(ISO8601_DATE_REGEX))) {
|
|
2054
2089
|
return isoStringToDate(match);
|
|
2055
2090
|
}
|
|
2056
2091
|
}
|
|
@@ -2143,7 +2178,7 @@ function formatNumberToLocaleString(value, pattern, locale, groupSymbol, decimal
|
|
|
2143
2178
|
let integerLen = parsedNumber.integerLen;
|
|
2144
2179
|
const exponent = parsedNumber.exponent;
|
|
2145
2180
|
let decimals = [];
|
|
2146
|
-
isZero = digits.every(d => !d);
|
|
2181
|
+
isZero = digits.every((d) => !d);
|
|
2147
2182
|
// pad zeros for small numbers
|
|
2148
2183
|
for (; integerLen < minInt; integerLen++) {
|
|
2149
2184
|
digits.unshift(0);
|
|
@@ -2219,7 +2254,7 @@ function formatCurrency(value, locale, currency, currencyCode, digitsInfo) {
|
|
|
2219
2254
|
pattern.minFrac = getNumberOfCurrencyDigits(currencyCode);
|
|
2220
2255
|
pattern.maxFrac = pattern.minFrac;
|
|
2221
2256
|
const res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.CurrencyGroup, NumberSymbol.CurrencyDecimal, digitsInfo);
|
|
2222
|
-
return res
|
|
2257
|
+
return (res
|
|
2223
2258
|
.replace(CURRENCY_CHAR, currency)
|
|
2224
2259
|
// if we have 2 time the currency character, the second one is ignored
|
|
2225
2260
|
.replace(CURRENCY_CHAR, '')
|
|
@@ -2227,7 +2262,7 @@ function formatCurrency(value, locale, currency, currencyCode, digitsInfo) {
|
|
|
2227
2262
|
// the currency character is suppressed by passing an empty string, the
|
|
2228
2263
|
// spacing character would remain as part of the string. Then we
|
|
2229
2264
|
// should remove it.
|
|
2230
|
-
.trim();
|
|
2265
|
+
.trim());
|
|
2231
2266
|
}
|
|
2232
2267
|
/**
|
|
2233
2268
|
* @ngModule CommonModule
|
|
@@ -2286,16 +2321,16 @@ function parseNumberFormat(format, minusSign = '-') {
|
|
|
2286
2321
|
negPre: '',
|
|
2287
2322
|
negSuf: '',
|
|
2288
2323
|
gSize: 0,
|
|
2289
|
-
lgSize: 0
|
|
2324
|
+
lgSize: 0,
|
|
2290
2325
|
};
|
|
2291
2326
|
const patternParts = format.split(PATTERN_SEP);
|
|
2292
2327
|
const positive = patternParts[0];
|
|
2293
2328
|
const negative = patternParts[1];
|
|
2294
|
-
const positiveParts = positive.indexOf(DECIMAL_SEP) !== -1
|
|
2295
|
-
positive.split(DECIMAL_SEP)
|
|
2296
|
-
[
|
|
2329
|
+
const positiveParts = positive.indexOf(DECIMAL_SEP) !== -1
|
|
2330
|
+
? positive.split(DECIMAL_SEP)
|
|
2331
|
+
: [
|
|
2297
2332
|
positive.substring(0, positive.lastIndexOf(ZERO_CHAR) + 1),
|
|
2298
|
-
positive.substring(positive.lastIndexOf(ZERO_CHAR) + 1)
|
|
2333
|
+
positive.substring(positive.lastIndexOf(ZERO_CHAR) + 1),
|
|
2299
2334
|
], integer = positiveParts[0], fraction = positiveParts[1] || '';
|
|
2300
2335
|
p.posPre = integer.substring(0, integer.indexOf(DIGIT_CHAR));
|
|
2301
2336
|
for (let i = 0; i < fraction.length; i++) {
|
|
@@ -2312,7 +2347,7 @@ function parseNumberFormat(format, minusSign = '-') {
|
|
|
2312
2347
|
}
|
|
2313
2348
|
const groups = integer.split(GROUP_SEP);
|
|
2314
2349
|
p.gSize = groups[1] ? groups[1].length : 0;
|
|
2315
|
-
p.lgSize =
|
|
2350
|
+
p.lgSize = groups[2] || groups[1] ? (groups[2] || groups[1]).length : 0;
|
|
2316
2351
|
if (negative) {
|
|
2317
2352
|
const trunkLen = positive.length - p.posPre.length - p.posSuf.length, pos = negative.indexOf(DIGIT_CHAR);
|
|
2318
2353
|
p.negPre = negative.substring(0, pos).replace(/'/g, '');
|
|
@@ -2371,7 +2406,8 @@ function parseNumber(num) {
|
|
|
2371
2406
|
integerLen = numStr.length;
|
|
2372
2407
|
}
|
|
2373
2408
|
// Count the number of leading zeros.
|
|
2374
|
-
for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) {
|
|
2409
|
+
for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) {
|
|
2410
|
+
/* empty */
|
|
2375
2411
|
}
|
|
2376
2412
|
if (i === (zeros = numStr.length)) {
|
|
2377
2413
|
// The digits are all zero.
|
|
@@ -2425,7 +2461,7 @@ function roundNumber(parsedNumber, minFrac, maxFrac) {
|
|
|
2425
2461
|
// We rounded to zero so reset the parsedNumber
|
|
2426
2462
|
fractionLen = Math.max(0, fractionLen);
|
|
2427
2463
|
parsedNumber.integerLen = 1;
|
|
2428
|
-
digits.length = Math.max(1, roundAt = fractionSize + 1);
|
|
2464
|
+
digits.length = Math.max(1, (roundAt = fractionSize + 1));
|
|
2429
2465
|
digits[0] = 0;
|
|
2430
2466
|
for (let i = 1; i < roundAt; i++)
|
|
2431
2467
|
digits[i] = 0;
|
|
@@ -2482,10 +2518,10 @@ function parseIntAutoRadix(text) {
|
|
|
2482
2518
|
* @publicApi
|
|
2483
2519
|
*/
|
|
2484
2520
|
class NgLocalization {
|
|
2485
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
2486
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-
|
|
2521
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2522
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgLocalization, providedIn: 'root', useFactory: (locale) => new NgLocaleLocalization(locale), deps: [{ token: LOCALE_ID }] }); }
|
|
2487
2523
|
}
|
|
2488
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
2524
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgLocalization, decorators: [{
|
|
2489
2525
|
type: Injectable,
|
|
2490
2526
|
args: [{
|
|
2491
2527
|
providedIn: 'root',
|
|
@@ -2539,10 +2575,10 @@ class NgLocaleLocalization extends NgLocalization {
|
|
|
2539
2575
|
return 'other';
|
|
2540
2576
|
}
|
|
2541
2577
|
}
|
|
2542
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
2543
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-
|
|
2578
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgLocaleLocalization, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2579
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgLocaleLocalization }); }
|
|
2544
2580
|
}
|
|
2545
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
2581
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgLocaleLocalization, decorators: [{
|
|
2546
2582
|
type: Injectable
|
|
2547
2583
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
2548
2584
|
type: Inject,
|
|
@@ -2701,7 +2737,7 @@ class NgClass {
|
|
|
2701
2737
|
}
|
|
2702
2738
|
klass = klass.trim();
|
|
2703
2739
|
if (klass.length > 0) {
|
|
2704
|
-
klass.split(WS_REGEXP).forEach(klass => {
|
|
2740
|
+
klass.split(WS_REGEXP).forEach((klass) => {
|
|
2705
2741
|
if (enabled) {
|
|
2706
2742
|
this._renderer.addClass(this._ngEl.nativeElement, klass);
|
|
2707
2743
|
}
|
|
@@ -2711,10 +2747,10 @@ class NgClass {
|
|
|
2711
2747
|
});
|
|
2712
2748
|
}
|
|
2713
2749
|
}
|
|
2714
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
2715
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-
|
|
2750
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgClass, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2751
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-rc.0", type: NgClass, isStandalone: true, selector: "[ngClass]", inputs: { klass: ["class", "klass"], ngClass: "ngClass" }, ngImport: i0 }); }
|
|
2716
2752
|
}
|
|
2717
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
2753
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgClass, decorators: [{
|
|
2718
2754
|
type: Directive,
|
|
2719
2755
|
args: [{
|
|
2720
2756
|
selector: '[ngClass]',
|
|
@@ -2812,17 +2848,17 @@ class NgComponentOutlet {
|
|
|
2812
2848
|
// Note: square brackets property accessor is safe for Closure compiler optimizations (the
|
|
2813
2849
|
// `changes` argument of the `ngOnChanges` lifecycle hook retains the names of the fields that
|
|
2814
2850
|
// were changed).
|
|
2815
|
-
return changes['ngComponentOutletNgModule'] !== undefined ||
|
|
2816
|
-
changes['ngComponentOutletNgModuleFactory'] !== undefined;
|
|
2851
|
+
return (changes['ngComponentOutletNgModule'] !== undefined ||
|
|
2852
|
+
changes['ngComponentOutletNgModuleFactory'] !== undefined);
|
|
2817
2853
|
}
|
|
2818
2854
|
_needToReCreateComponentInstance(changes) {
|
|
2819
2855
|
// Note: square brackets property accessor is safe for Closure compiler optimizations (the
|
|
2820
2856
|
// `changes` argument of the `ngOnChanges` lifecycle hook retains the names of the fields that
|
|
2821
2857
|
// were changed).
|
|
2822
|
-
return changes['ngComponentOutlet'] !== undefined ||
|
|
2858
|
+
return (changes['ngComponentOutlet'] !== undefined ||
|
|
2823
2859
|
changes['ngComponentOutletContent'] !== undefined ||
|
|
2824
2860
|
changes['ngComponentOutletInjector'] !== undefined ||
|
|
2825
|
-
this._needToReCreateNgModuleInstance(changes);
|
|
2861
|
+
this._needToReCreateNgModuleInstance(changes));
|
|
2826
2862
|
}
|
|
2827
2863
|
/** @nodoc */
|
|
2828
2864
|
ngOnChanges(changes) {
|
|
@@ -2835,12 +2871,10 @@ class NgComponentOutlet {
|
|
|
2835
2871
|
if (this._needToReCreateNgModuleInstance(changes)) {
|
|
2836
2872
|
this._moduleRef?.destroy();
|
|
2837
2873
|
if (this.ngComponentOutletNgModule) {
|
|
2838
|
-
this._moduleRef =
|
|
2839
|
-
createNgModule(this.ngComponentOutletNgModule, getParentInjector(injector));
|
|
2874
|
+
this._moduleRef = createNgModule(this.ngComponentOutletNgModule, getParentInjector(injector));
|
|
2840
2875
|
}
|
|
2841
2876
|
else if (this.ngComponentOutletNgModuleFactory) {
|
|
2842
|
-
this._moduleRef =
|
|
2843
|
-
this.ngComponentOutletNgModuleFactory.create(getParentInjector(injector));
|
|
2877
|
+
this._moduleRef = this.ngComponentOutletNgModuleFactory.create(getParentInjector(injector));
|
|
2844
2878
|
}
|
|
2845
2879
|
else {
|
|
2846
2880
|
this._moduleRef = undefined;
|
|
@@ -2883,10 +2917,10 @@ class NgComponentOutlet {
|
|
|
2883
2917
|
}
|
|
2884
2918
|
}
|
|
2885
2919
|
}
|
|
2886
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
2887
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-
|
|
2920
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgComponentOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2921
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-rc.0", type: NgComponentOutlet, isStandalone: true, selector: "[ngComponentOutlet]", inputs: { ngComponentOutlet: "ngComponentOutlet", ngComponentOutletInputs: "ngComponentOutletInputs", ngComponentOutletInjector: "ngComponentOutletInjector", ngComponentOutletContent: "ngComponentOutletContent", ngComponentOutletNgModule: "ngComponentOutletNgModule", ngComponentOutletNgModuleFactory: "ngComponentOutletNgModuleFactory" }, usesOnChanges: true, ngImport: i0 }); }
|
|
2888
2922
|
}
|
|
2889
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
2923
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgComponentOutlet, decorators: [{
|
|
2890
2924
|
type: Directive,
|
|
2891
2925
|
args: [{
|
|
2892
2926
|
selector: '[ngComponentOutlet]',
|
|
@@ -3166,10 +3200,10 @@ class NgForOf {
|
|
|
3166
3200
|
static ngTemplateContextGuard(dir, ctx) {
|
|
3167
3201
|
return true;
|
|
3168
3202
|
}
|
|
3169
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
3170
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-
|
|
3203
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgForOf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3204
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-rc.0", type: NgForOf, isStandalone: true, selector: "[ngFor][ngForOf]", inputs: { ngForOf: "ngForOf", ngForTrackBy: "ngForTrackBy", ngForTemplate: "ngForTemplate" }, ngImport: i0 }); }
|
|
3171
3205
|
}
|
|
3172
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
3206
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgForOf, decorators: [{
|
|
3173
3207
|
type: Directive,
|
|
3174
3208
|
args: [{
|
|
3175
3209
|
selector: '[ngFor][ngForOf]',
|
|
@@ -3369,8 +3403,7 @@ class NgIf {
|
|
|
3369
3403
|
this._viewContainer.clear();
|
|
3370
3404
|
this._elseViewRef = null;
|
|
3371
3405
|
if (this._thenTemplateRef) {
|
|
3372
|
-
this._thenViewRef =
|
|
3373
|
-
this._viewContainer.createEmbeddedView(this._thenTemplateRef, this._context);
|
|
3406
|
+
this._thenViewRef = this._viewContainer.createEmbeddedView(this._thenTemplateRef, this._context);
|
|
3374
3407
|
}
|
|
3375
3408
|
}
|
|
3376
3409
|
}
|
|
@@ -3379,8 +3412,7 @@ class NgIf {
|
|
|
3379
3412
|
this._viewContainer.clear();
|
|
3380
3413
|
this._thenViewRef = null;
|
|
3381
3414
|
if (this._elseTemplateRef) {
|
|
3382
|
-
this._elseViewRef =
|
|
3383
|
-
this._viewContainer.createEmbeddedView(this._elseTemplateRef, this._context);
|
|
3415
|
+
this._elseViewRef = this._viewContainer.createEmbeddedView(this._elseTemplateRef, this._context);
|
|
3384
3416
|
}
|
|
3385
3417
|
}
|
|
3386
3418
|
}
|
|
@@ -3394,10 +3426,10 @@ class NgIf {
|
|
|
3394
3426
|
static ngTemplateContextGuard(dir, ctx) {
|
|
3395
3427
|
return true;
|
|
3396
3428
|
}
|
|
3397
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
3398
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-
|
|
3429
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgIf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3430
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-rc.0", type: NgIf, isStandalone: true, selector: "[ngIf]", inputs: { ngIf: "ngIf", ngIfThen: "ngIfThen", ngIfElse: "ngIfElse" }, ngImport: i0 }); }
|
|
3399
3431
|
}
|
|
3400
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
3432
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgIf, decorators: [{
|
|
3401
3433
|
type: Directive,
|
|
3402
3434
|
args: [{
|
|
3403
3435
|
selector: '[ngIf]',
|
|
@@ -3545,13 +3577,15 @@ class NgSwitch {
|
|
|
3545
3577
|
}
|
|
3546
3578
|
/** @internal */
|
|
3547
3579
|
_matchCase(value) {
|
|
3548
|
-
const matched = NG_SWITCH_USE_STRICT_EQUALS
|
|
3580
|
+
const matched = NG_SWITCH_USE_STRICT_EQUALS
|
|
3581
|
+
? value === this._ngSwitch
|
|
3582
|
+
: value == this._ngSwitch;
|
|
3549
3583
|
if ((typeof ngDevMode === 'undefined' || ngDevMode) && matched !== (value == this._ngSwitch)) {
|
|
3550
3584
|
console.warn(ɵformatRuntimeError(2001 /* RuntimeErrorCode.EQUALITY_NG_SWITCH_DIFFERENCE */, 'As of Angular v17 the NgSwitch directive uses strict equality comparison === instead of == to match different cases. ' +
|
|
3551
3585
|
`Previously the case value "${stringifyValue(value)}" matched switch expression value "${stringifyValue(this._ngSwitch)}", but this is no longer the case with the stricter equality check. ` +
|
|
3552
3586
|
'Your comparison results return different results using === vs. == and you should adjust your ngSwitch expression and / or values to conform with the strict equality requirements.'));
|
|
3553
3587
|
}
|
|
3554
|
-
this._lastCasesMatched
|
|
3588
|
+
this._lastCasesMatched ||= matched;
|
|
3555
3589
|
this._lastCaseCheckIndex++;
|
|
3556
3590
|
if (this._lastCaseCheckIndex === this._caseCount) {
|
|
3557
3591
|
this._updateDefaultCases(!this._lastCasesMatched);
|
|
@@ -3568,10 +3602,10 @@ class NgSwitch {
|
|
|
3568
3602
|
}
|
|
3569
3603
|
}
|
|
3570
3604
|
}
|
|
3571
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
3572
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-
|
|
3605
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3606
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-rc.0", type: NgSwitch, isStandalone: true, selector: "[ngSwitch]", inputs: { ngSwitch: "ngSwitch" }, ngImport: i0 }); }
|
|
3573
3607
|
}
|
|
3574
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
3608
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgSwitch, decorators: [{
|
|
3575
3609
|
type: Directive,
|
|
3576
3610
|
args: [{
|
|
3577
3611
|
selector: '[ngSwitch]',
|
|
@@ -3605,8 +3639,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0",
|
|
|
3605
3639
|
* that defines the subtree to be selected if the value of the match expression
|
|
3606
3640
|
* matches the value of the switch expression.
|
|
3607
3641
|
*
|
|
3608
|
-
*
|
|
3609
|
-
*
|
|
3642
|
+
* As of Angular v17 the NgSwitch directive uses strict equality comparison (`===`) instead of
|
|
3643
|
+
* loose equality (`==`) to match different cases.
|
|
3610
3644
|
*
|
|
3611
3645
|
* @publicApi
|
|
3612
3646
|
* @see {@link NgSwitch}
|
|
@@ -3629,10 +3663,10 @@ class NgSwitchCase {
|
|
|
3629
3663
|
ngDoCheck() {
|
|
3630
3664
|
this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase));
|
|
3631
3665
|
}
|
|
3632
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
3633
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-
|
|
3666
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgSwitchCase, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3667
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-rc.0", type: NgSwitchCase, isStandalone: true, selector: "[ngSwitchCase]", inputs: { ngSwitchCase: "ngSwitchCase" }, ngImport: i0 }); }
|
|
3634
3668
|
}
|
|
3635
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
3669
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgSwitchCase, decorators: [{
|
|
3636
3670
|
type: Directive,
|
|
3637
3671
|
args: [{
|
|
3638
3672
|
selector: '[ngSwitchCase]',
|
|
@@ -3666,10 +3700,10 @@ class NgSwitchDefault {
|
|
|
3666
3700
|
}
|
|
3667
3701
|
ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));
|
|
3668
3702
|
}
|
|
3669
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
3670
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-
|
|
3703
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgSwitchDefault, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3704
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-rc.0", type: NgSwitchDefault, isStandalone: true, selector: "[ngSwitchDefault]", ngImport: i0 }); }
|
|
3671
3705
|
}
|
|
3672
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
3706
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgSwitchDefault, decorators: [{
|
|
3673
3707
|
type: Directive,
|
|
3674
3708
|
args: [{
|
|
3675
3709
|
selector: '[ngSwitchDefault]',
|
|
@@ -3747,10 +3781,10 @@ class NgPlural {
|
|
|
3747
3781
|
this._activeView.create();
|
|
3748
3782
|
}
|
|
3749
3783
|
}
|
|
3750
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
3751
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-
|
|
3784
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgPlural, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3785
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-rc.0", type: NgPlural, isStandalone: true, selector: "[ngPlural]", inputs: { ngPlural: "ngPlural" }, ngImport: i0 }); }
|
|
3752
3786
|
}
|
|
3753
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
3787
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgPlural, decorators: [{
|
|
3754
3788
|
type: Directive,
|
|
3755
3789
|
args: [{
|
|
3756
3790
|
selector: '[ngPlural]',
|
|
@@ -3785,10 +3819,10 @@ class NgPluralCase {
|
|
|
3785
3819
|
const isANumber = !isNaN(Number(value));
|
|
3786
3820
|
ngPlural.addCase(isANumber ? `=${value}` : value, new SwitchView(viewContainer, template));
|
|
3787
3821
|
}
|
|
3788
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
3789
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-
|
|
3822
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgPluralCase, deps: [{ token: 'ngPluralCase', attribute: true }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: NgPlural, host: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3823
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-rc.0", type: NgPluralCase, isStandalone: true, selector: "[ngPluralCase]", ngImport: i0 }); }
|
|
3790
3824
|
}
|
|
3791
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
3825
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgPluralCase, decorators: [{
|
|
3792
3826
|
type: Directive,
|
|
3793
3827
|
args: [{
|
|
3794
3828
|
selector: '[ngPluralCase]',
|
|
@@ -3874,10 +3908,10 @@ class NgStyle {
|
|
|
3874
3908
|
changes.forEachAddedItem((record) => this._setStyle(record.key, record.currentValue));
|
|
3875
3909
|
changes.forEachChangedItem((record) => this._setStyle(record.key, record.currentValue));
|
|
3876
3910
|
}
|
|
3877
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
3878
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-
|
|
3911
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgStyle, deps: [{ token: i0.ElementRef }, { token: i0.KeyValueDiffers }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3912
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-rc.0", type: NgStyle, isStandalone: true, selector: "[ngStyle]", inputs: { ngStyle: "ngStyle" }, ngImport: i0 }); }
|
|
3879
3913
|
}
|
|
3880
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
3914
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgStyle, decorators: [{
|
|
3881
3915
|
type: Directive,
|
|
3882
3916
|
args: [{
|
|
3883
3917
|
selector: '[ngStyle]',
|
|
@@ -3978,10 +4012,10 @@ class NgTemplateOutlet {
|
|
|
3978
4012
|
},
|
|
3979
4013
|
});
|
|
3980
4014
|
}
|
|
3981
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
3982
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-
|
|
4015
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgTemplateOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4016
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-rc.0", type: NgTemplateOutlet, isStandalone: true, selector: "[ngTemplateOutlet]", inputs: { ngTemplateOutletContext: "ngTemplateOutletContext", ngTemplateOutlet: "ngTemplateOutlet", ngTemplateOutletInjector: "ngTemplateOutletInjector" }, usesOnChanges: true, ngImport: i0 }); }
|
|
3983
4017
|
}
|
|
3984
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
4018
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgTemplateOutlet, decorators: [{
|
|
3985
4019
|
type: Directive,
|
|
3986
4020
|
args: [{
|
|
3987
4021
|
selector: '[ngTemplateOutlet]',
|
|
@@ -4030,7 +4064,7 @@ class SubscribableStrategy {
|
|
|
4030
4064
|
next: updateLatestValue,
|
|
4031
4065
|
error: (e) => {
|
|
4032
4066
|
throw e;
|
|
4033
|
-
}
|
|
4067
|
+
},
|
|
4034
4068
|
}));
|
|
4035
4069
|
}
|
|
4036
4070
|
dispose(subscription) {
|
|
@@ -4040,7 +4074,7 @@ class SubscribableStrategy {
|
|
|
4040
4074
|
}
|
|
4041
4075
|
class PromiseStrategy {
|
|
4042
4076
|
createSubscription(async, updateLatestValue) {
|
|
4043
|
-
return async.then(updateLatestValue, e => {
|
|
4077
|
+
return async.then(updateLatestValue, (e) => {
|
|
4044
4078
|
throw e;
|
|
4045
4079
|
});
|
|
4046
4080
|
}
|
|
@@ -4139,10 +4173,10 @@ class AsyncPipe {
|
|
|
4139
4173
|
this._ref.markForCheck();
|
|
4140
4174
|
}
|
|
4141
4175
|
}
|
|
4142
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
4143
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-
|
|
4176
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: AsyncPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4177
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-rc.0", ngImport: i0, type: AsyncPipe, isStandalone: true, name: "async", pure: false }); }
|
|
4144
4178
|
}
|
|
4145
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
4179
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: AsyncPipe, decorators: [{
|
|
4146
4180
|
type: Pipe,
|
|
4147
4181
|
args: [{
|
|
4148
4182
|
name: 'async',
|
|
@@ -4175,10 +4209,10 @@ class LowerCasePipe {
|
|
|
4175
4209
|
}
|
|
4176
4210
|
return value.toLowerCase();
|
|
4177
4211
|
}
|
|
4178
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
4179
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-
|
|
4212
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4213
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-rc.0", ngImport: i0, type: LowerCasePipe, isStandalone: true, name: "lowercase" }); }
|
|
4180
4214
|
}
|
|
4181
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
4215
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: LowerCasePipe, decorators: [{
|
|
4182
4216
|
type: Pipe,
|
|
4183
4217
|
args: [{
|
|
4184
4218
|
name: 'lowercase',
|
|
@@ -4218,12 +4252,12 @@ class TitleCasePipe {
|
|
|
4218
4252
|
if (typeof value !== 'string') {
|
|
4219
4253
|
throw invalidPipeArgumentError(TitleCasePipe, value);
|
|
4220
4254
|
}
|
|
4221
|
-
return value.replace(unicodeWordMatch, (txt => txt[0].toUpperCase() + txt.slice(1).toLowerCase())
|
|
4255
|
+
return value.replace(unicodeWordMatch, (txt) => txt[0].toUpperCase() + txt.slice(1).toLowerCase());
|
|
4222
4256
|
}
|
|
4223
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
4224
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-
|
|
4257
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4258
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-rc.0", ngImport: i0, type: TitleCasePipe, isStandalone: true, name: "titlecase" }); }
|
|
4225
4259
|
}
|
|
4226
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
4260
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: TitleCasePipe, decorators: [{
|
|
4227
4261
|
type: Pipe,
|
|
4228
4262
|
args: [{
|
|
4229
4263
|
name: 'titlecase',
|
|
@@ -4247,10 +4281,10 @@ class UpperCasePipe {
|
|
|
4247
4281
|
}
|
|
4248
4282
|
return value.toUpperCase();
|
|
4249
4283
|
}
|
|
4250
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
4251
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-
|
|
4284
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4285
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-rc.0", ngImport: i0, type: UpperCasePipe, isStandalone: true, name: "uppercase" }); }
|
|
4252
4286
|
}
|
|
4253
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
4287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: UpperCasePipe, decorators: [{
|
|
4254
4288
|
type: Pipe,
|
|
4255
4289
|
args: [{
|
|
4256
4290
|
name: 'uppercase',
|
|
@@ -4270,7 +4304,7 @@ const DEFAULT_DATE_FORMAT = 'mediumDate';
|
|
|
4270
4304
|
*
|
|
4271
4305
|
* @deprecated use DATE_PIPE_DEFAULT_OPTIONS token to configure DatePipe
|
|
4272
4306
|
*/
|
|
4273
|
-
const DATE_PIPE_DEFAULT_TIMEZONE = new InjectionToken('DATE_PIPE_DEFAULT_TIMEZONE');
|
|
4307
|
+
const DATE_PIPE_DEFAULT_TIMEZONE = new InjectionToken(ngDevMode ? 'DATE_PIPE_DEFAULT_TIMEZONE' : '');
|
|
4274
4308
|
/**
|
|
4275
4309
|
* DI token that allows to provide default configuration for the `DatePipe` instances in an
|
|
4276
4310
|
* application. The value is an object which can include the following fields:
|
|
@@ -4302,7 +4336,7 @@ const DATE_PIPE_DEFAULT_TIMEZONE = new InjectionToken('DATE_PIPE_DEFAULT_TIMEZON
|
|
|
4302
4336
|
* ]
|
|
4303
4337
|
* ```
|
|
4304
4338
|
*/
|
|
4305
|
-
const DATE_PIPE_DEFAULT_OPTIONS = new InjectionToken('DATE_PIPE_DEFAULT_OPTIONS');
|
|
4339
|
+
const DATE_PIPE_DEFAULT_OPTIONS = new InjectionToken(ngDevMode ? 'DATE_PIPE_DEFAULT_OPTIONS' : '');
|
|
4306
4340
|
// clang-format off
|
|
4307
4341
|
/**
|
|
4308
4342
|
* @ngModule CommonModule
|
|
@@ -4360,70 +4394,70 @@ const DATE_PIPE_DEFAULT_OPTIONS = new InjectionToken('DATE_PIPE_DEFAULT_OPTIONS'
|
|
|
4360
4394
|
* Format details depend on the locale.
|
|
4361
4395
|
* Fields marked with (*) are only available in the extra data set for the given locale.
|
|
4362
4396
|
*
|
|
4363
|
-
* | Field type
|
|
4364
|
-
*
|
|
4365
|
-
* | Era
|
|
4366
|
-
* |
|
|
4367
|
-
* |
|
|
4368
|
-
* | Year
|
|
4369
|
-
* |
|
|
4370
|
-
* |
|
|
4371
|
-
* |
|
|
4372
|
-
* | Week-numbering year | Y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 |
|
|
4373
|
-
* |
|
|
4374
|
-
* |
|
|
4375
|
-
* |
|
|
4376
|
-
* | Month
|
|
4377
|
-
* |
|
|
4378
|
-
* |
|
|
4379
|
-
* |
|
|
4380
|
-
* |
|
|
4381
|
-
* | Month standalone
|
|
4382
|
-
* |
|
|
4383
|
-
* |
|
|
4384
|
-
* |
|
|
4385
|
-
* |
|
|
4386
|
-
* | Week of year | w | Numeric: minimum digits | 1... 53 |
|
|
4387
|
-
* |
|
|
4388
|
-
* | Week of month
|
|
4389
|
-
* | Day of month
|
|
4390
|
-
* |
|
|
4391
|
-
* | Week day
|
|
4392
|
-
* |
|
|
4393
|
-
* |
|
|
4394
|
-
* |
|
|
4395
|
-
* | Week day standalone
|
|
4396
|
-
* |
|
|
4397
|
-
* |
|
|
4398
|
-
* |
|
|
4399
|
-
* |
|
|
4400
|
-
* | Period
|
|
4401
|
-
* |
|
|
4402
|
-
* |
|
|
4403
|
-
* | Period*
|
|
4404
|
-
* |
|
|
4405
|
-
* |
|
|
4406
|
-
* | Period standalone*
|
|
4407
|
-
* |
|
|
4408
|
-
* |
|
|
4409
|
-
* | Hour 1-12
|
|
4410
|
-
* |
|
|
4411
|
-
* | Hour 0-23
|
|
4412
|
-
* |
|
|
4413
|
-
* | Minute
|
|
4414
|
-
* |
|
|
4415
|
-
* | Second
|
|
4416
|
-
* |
|
|
4417
|
-
* | Fractional seconds
|
|
4418
|
-
* |
|
|
4419
|
-
* |
|
|
4420
|
-
* | Zone
|
|
4421
|
-
* |
|
|
4422
|
-
* |
|
|
4423
|
-
* |
|
|
4424
|
-
* |
|
|
4425
|
-
* |
|
|
4426
|
-
* |
|
|
4397
|
+
* | Field type | Format | Description | Example Value |
|
|
4398
|
+
* |-------------------------|-------------|---------------------------------------------------------------|------------------------------------------------------------|
|
|
4399
|
+
* | Era | G, GG & GGG | Abbreviated | AD |
|
|
4400
|
+
* | | GGGG | Wide | Anno Domini |
|
|
4401
|
+
* | | GGGGG | Narrow | A |
|
|
4402
|
+
* | Year | y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 |
|
|
4403
|
+
* | | yy | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 |
|
|
4404
|
+
* | | yyy | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 |
|
|
4405
|
+
* | | yyyy | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 |
|
|
4406
|
+
* | ISO Week-numbering year | Y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 |
|
|
4407
|
+
* | | YY | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 |
|
|
4408
|
+
* | | YYY | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 |
|
|
4409
|
+
* | | YYYY | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 |
|
|
4410
|
+
* | Month | M | Numeric: 1 digit | 9, 12 |
|
|
4411
|
+
* | | MM | Numeric: 2 digits + zero padded | 09, 12 |
|
|
4412
|
+
* | | MMM | Abbreviated | Sep |
|
|
4413
|
+
* | | MMMM | Wide | September |
|
|
4414
|
+
* | | MMMMM | Narrow | S |
|
|
4415
|
+
* | Month standalone | L | Numeric: 1 digit | 9, 12 |
|
|
4416
|
+
* | | LL | Numeric: 2 digits + zero padded | 09, 12 |
|
|
4417
|
+
* | | LLL | Abbreviated | Sep |
|
|
4418
|
+
* | | LLLL | Wide | September |
|
|
4419
|
+
* | | LLLLL | Narrow | S |
|
|
4420
|
+
* | ISO Week of year | w | Numeric: minimum digits | 1... 53 |
|
|
4421
|
+
* | | ww | Numeric: 2 digits + zero padded | 01... 53 |
|
|
4422
|
+
* | Week of month | W | Numeric: 1 digit | 1... 5 |
|
|
4423
|
+
* | Day of month | d | Numeric: minimum digits | 1 |
|
|
4424
|
+
* | | dd | Numeric: 2 digits + zero padded | 01 |
|
|
4425
|
+
* | Week day | E, EE & EEE | Abbreviated | Tue |
|
|
4426
|
+
* | | EEEE | Wide | Tuesday |
|
|
4427
|
+
* | | EEEEE | Narrow | T |
|
|
4428
|
+
* | | EEEEEE | Short | Tu |
|
|
4429
|
+
* | Week day standalone | c, cc | Numeric: 1 digit | 2 |
|
|
4430
|
+
* | | ccc | Abbreviated | Tue |
|
|
4431
|
+
* | | cccc | Wide | Tuesday |
|
|
4432
|
+
* | | ccccc | Narrow | T |
|
|
4433
|
+
* | | cccccc | Short | Tu |
|
|
4434
|
+
* | Period | a, aa & aaa | Abbreviated | am/pm or AM/PM |
|
|
4435
|
+
* | | aaaa | Wide (fallback to `a` when missing) | ante meridiem/post meridiem |
|
|
4436
|
+
* | | aaaaa | Narrow | a/p |
|
|
4437
|
+
* | Period* | B, BB & BBB | Abbreviated | mid. |
|
|
4438
|
+
* | | BBBB | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |
|
|
4439
|
+
* | | BBBBB | Narrow | md |
|
|
4440
|
+
* | Period standalone* | b, bb & bbb | Abbreviated | mid. |
|
|
4441
|
+
* | | bbbb | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |
|
|
4442
|
+
* | | bbbbb | Narrow | md |
|
|
4443
|
+
* | Hour 1-12 | h | Numeric: minimum digits | 1, 12 |
|
|
4444
|
+
* | | hh | Numeric: 2 digits + zero padded | 01, 12 |
|
|
4445
|
+
* | Hour 0-23 | H | Numeric: minimum digits | 0, 23 |
|
|
4446
|
+
* | | HH | Numeric: 2 digits + zero padded | 00, 23 |
|
|
4447
|
+
* | Minute | m | Numeric: minimum digits | 8, 59 |
|
|
4448
|
+
* | | mm | Numeric: 2 digits + zero padded | 08, 59 |
|
|
4449
|
+
* | Second | s | Numeric: minimum digits | 0... 59 |
|
|
4450
|
+
* | | ss | Numeric: 2 digits + zero padded | 00... 59 |
|
|
4451
|
+
* | Fractional seconds | S | Numeric: 1 digit | 0... 9 |
|
|
4452
|
+
* | | SS | Numeric: 2 digits + zero padded | 00... 99 |
|
|
4453
|
+
* | | SSS | Numeric: 3 digits + zero padded (= milliseconds) | 000... 999 |
|
|
4454
|
+
* | Zone | z, zz & zzz | Short specific non location format (fallback to O) | GMT-8 |
|
|
4455
|
+
* | | zzzz | Long specific non location format (fallback to OOOO) | GMT-08:00 |
|
|
4456
|
+
* | | Z, ZZ & ZZZ | ISO8601 basic format | -0800 |
|
|
4457
|
+
* | | ZZZZ | Long localized GMT format | GMT-8:00 |
|
|
4458
|
+
* | | ZZZZZ | ISO8601 extended format + Z indicator for offset 0 (= XXXXX) | -08:00 |
|
|
4459
|
+
* | | O, OO & OOO | Short localized GMT format | GMT-8 |
|
|
4460
|
+
* | | OOOO | Long localized GMT format | GMT-08:00 |
|
|
4427
4461
|
*
|
|
4428
4462
|
*
|
|
4429
4463
|
* ### Format examples
|
|
@@ -4481,14 +4515,13 @@ class DatePipe {
|
|
|
4481
4515
|
throw invalidPipeArgumentError(DatePipe, error.message);
|
|
4482
4516
|
}
|
|
4483
4517
|
}
|
|
4484
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
4485
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-
|
|
4518
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", 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 }); }
|
|
4519
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-rc.0", ngImport: i0, type: DatePipe, isStandalone: true, name: "date" }); }
|
|
4486
4520
|
}
|
|
4487
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
4521
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: DatePipe, decorators: [{
|
|
4488
4522
|
type: Pipe,
|
|
4489
4523
|
args: [{
|
|
4490
4524
|
name: 'date',
|
|
4491
|
-
pure: true,
|
|
4492
4525
|
standalone: true,
|
|
4493
4526
|
}]
|
|
4494
4527
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
@@ -4541,14 +4574,13 @@ class I18nPluralPipe {
|
|
|
4541
4574
|
const key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale);
|
|
4542
4575
|
return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());
|
|
4543
4576
|
}
|
|
4544
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
4545
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-
|
|
4577
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: I18nPluralPipe, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4578
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-rc.0", ngImport: i0, type: I18nPluralPipe, isStandalone: true, name: "i18nPlural" }); }
|
|
4546
4579
|
}
|
|
4547
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
4580
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: I18nPluralPipe, decorators: [{
|
|
4548
4581
|
type: Pipe,
|
|
4549
4582
|
args: [{
|
|
4550
4583
|
name: 'i18nPlural',
|
|
4551
|
-
pure: true,
|
|
4552
4584
|
standalone: true,
|
|
4553
4585
|
}]
|
|
4554
4586
|
}], ctorParameters: () => [{ type: NgLocalization }] });
|
|
@@ -4590,14 +4622,13 @@ class I18nSelectPipe {
|
|
|
4590
4622
|
}
|
|
4591
4623
|
return '';
|
|
4592
4624
|
}
|
|
4593
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
4594
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-
|
|
4625
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4626
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-rc.0", ngImport: i0, type: I18nSelectPipe, isStandalone: true, name: "i18nSelect" }); }
|
|
4595
4627
|
}
|
|
4596
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
4628
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: I18nSelectPipe, decorators: [{
|
|
4597
4629
|
type: Pipe,
|
|
4598
4630
|
args: [{
|
|
4599
4631
|
name: 'i18nSelect',
|
|
4600
|
-
pure: true,
|
|
4601
4632
|
standalone: true,
|
|
4602
4633
|
}]
|
|
4603
4634
|
}] });
|
|
@@ -4624,10 +4655,10 @@ class JsonPipe {
|
|
|
4624
4655
|
transform(value) {
|
|
4625
4656
|
return JSON.stringify(value, null, 2);
|
|
4626
4657
|
}
|
|
4627
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
4628
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-
|
|
4658
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4659
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-rc.0", ngImport: i0, type: JsonPipe, isStandalone: true, name: "json", pure: false }); }
|
|
4629
4660
|
}
|
|
4630
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
4661
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: JsonPipe, decorators: [{
|
|
4631
4662
|
type: Pipe,
|
|
4632
4663
|
args: [{
|
|
4633
4664
|
name: 'json',
|
|
@@ -4669,10 +4700,8 @@ class KeyValuePipe {
|
|
|
4669
4700
|
if (!input || (!(input instanceof Map) && typeof input !== 'object')) {
|
|
4670
4701
|
return null;
|
|
4671
4702
|
}
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
this.differ = this.differs.find(input).create();
|
|
4675
|
-
}
|
|
4703
|
+
// make a differ for whatever type we've been passed in
|
|
4704
|
+
this.differ ??= this.differs.find(input).create();
|
|
4676
4705
|
const differChanges = this.differ.diff(input);
|
|
4677
4706
|
const compareFnChanged = compareFn !== this.compareFn;
|
|
4678
4707
|
if (differChanges) {
|
|
@@ -4687,10 +4716,10 @@ class KeyValuePipe {
|
|
|
4687
4716
|
}
|
|
4688
4717
|
return this.keyValues;
|
|
4689
4718
|
}
|
|
4690
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
4691
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-
|
|
4719
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: KeyValuePipe, deps: [{ token: i0.KeyValueDiffers }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4720
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-rc.0", ngImport: i0, type: KeyValuePipe, isStandalone: true, name: "keyvalue", pure: false }); }
|
|
4692
4721
|
}
|
|
4693
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
4722
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: KeyValuePipe, decorators: [{
|
|
4694
4723
|
type: Pipe,
|
|
4695
4724
|
args: [{
|
|
4696
4725
|
name: 'keyvalue',
|
|
@@ -4806,7 +4835,7 @@ class DecimalPipe {
|
|
|
4806
4835
|
transform(value, digitsInfo, locale) {
|
|
4807
4836
|
if (!isValue(value))
|
|
4808
4837
|
return null;
|
|
4809
|
-
locale
|
|
4838
|
+
locale ||= this._locale;
|
|
4810
4839
|
try {
|
|
4811
4840
|
const num = strToNumber(value);
|
|
4812
4841
|
return formatNumber(num, locale, digitsInfo);
|
|
@@ -4815,10 +4844,10 @@ class DecimalPipe {
|
|
|
4815
4844
|
throw invalidPipeArgumentError(DecimalPipe, error.message);
|
|
4816
4845
|
}
|
|
4817
4846
|
}
|
|
4818
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
4819
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-
|
|
4847
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: DecimalPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4848
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-rc.0", ngImport: i0, type: DecimalPipe, isStandalone: true, name: "number" }); }
|
|
4820
4849
|
}
|
|
4821
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
4850
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: DecimalPipe, decorators: [{
|
|
4822
4851
|
type: Pipe,
|
|
4823
4852
|
args: [{
|
|
4824
4853
|
name: 'number',
|
|
@@ -4871,7 +4900,7 @@ class PercentPipe {
|
|
|
4871
4900
|
transform(value, digitsInfo, locale) {
|
|
4872
4901
|
if (!isValue(value))
|
|
4873
4902
|
return null;
|
|
4874
|
-
locale
|
|
4903
|
+
locale ||= this._locale;
|
|
4875
4904
|
try {
|
|
4876
4905
|
const num = strToNumber(value);
|
|
4877
4906
|
return formatPercent(num, locale, digitsInfo);
|
|
@@ -4880,10 +4909,10 @@ class PercentPipe {
|
|
|
4880
4909
|
throw invalidPipeArgumentError(PercentPipe, error.message);
|
|
4881
4910
|
}
|
|
4882
4911
|
}
|
|
4883
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
4884
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-
|
|
4912
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: PercentPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4913
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-rc.0", ngImport: i0, type: PercentPipe, isStandalone: true, name: "percent" }); }
|
|
4885
4914
|
}
|
|
4886
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
4915
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: PercentPipe, decorators: [{
|
|
4887
4916
|
type: Pipe,
|
|
4888
4917
|
args: [{
|
|
4889
4918
|
name: 'percent',
|
|
@@ -4955,7 +4984,7 @@ class CurrencyPipe {
|
|
|
4955
4984
|
transform(value, currencyCode = this._defaultCurrencyCode, display = 'symbol', digitsInfo, locale) {
|
|
4956
4985
|
if (!isValue(value))
|
|
4957
4986
|
return null;
|
|
4958
|
-
locale
|
|
4987
|
+
locale ||= this._locale;
|
|
4959
4988
|
if (typeof display === 'boolean') {
|
|
4960
4989
|
if ((typeof ngDevMode === 'undefined' || ngDevMode) && console && console.warn) {
|
|
4961
4990
|
console.warn(`Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are "code", "symbol" or "symbol-narrow".`);
|
|
@@ -4979,10 +5008,10 @@ class CurrencyPipe {
|
|
|
4979
5008
|
throw invalidPipeArgumentError(CurrencyPipe, error.message);
|
|
4980
5009
|
}
|
|
4981
5010
|
}
|
|
4982
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
4983
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-
|
|
5011
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: CurrencyPipe, deps: [{ token: LOCALE_ID }, { token: DEFAULT_CURRENCY_CODE }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5012
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-rc.0", ngImport: i0, type: CurrencyPipe, isStandalone: true, name: "currency" }); }
|
|
4984
5013
|
}
|
|
4985
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
5014
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: CurrencyPipe, decorators: [{
|
|
4986
5015
|
type: Pipe,
|
|
4987
5016
|
args: [{
|
|
4988
5017
|
name: 'currency',
|
|
@@ -5059,10 +5088,10 @@ class SlicePipe {
|
|
|
5059
5088
|
supports(obj) {
|
|
5060
5089
|
return typeof obj === 'string' || Array.isArray(obj);
|
|
5061
5090
|
}
|
|
5062
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
5063
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-
|
|
5091
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5092
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-rc.0", ngImport: i0, type: SlicePipe, isStandalone: true, name: "slice", pure: false }); }
|
|
5064
5093
|
}
|
|
5065
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
5094
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: SlicePipe, decorators: [{
|
|
5066
5095
|
type: Pipe,
|
|
5067
5096
|
args: [{
|
|
5068
5097
|
name: 'slice',
|
|
@@ -5106,11 +5135,11 @@ const COMMON_PIPES = [
|
|
|
5106
5135
|
* @publicApi
|
|
5107
5136
|
*/
|
|
5108
5137
|
class CommonModule {
|
|
5109
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
5110
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.0-
|
|
5111
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.0-
|
|
5138
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5139
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.0-rc.0", 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] }); }
|
|
5140
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: CommonModule }); }
|
|
5112
5141
|
}
|
|
5113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
5142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: CommonModule, decorators: [{
|
|
5114
5143
|
type: NgModule,
|
|
5115
5144
|
args: [{
|
|
5116
5145
|
imports: [COMMON_DIRECTIVES, COMMON_PIPES],
|
|
@@ -5163,7 +5192,7 @@ function isPlatformWorkerUi(platformId) {
|
|
|
5163
5192
|
/**
|
|
5164
5193
|
* @publicApi
|
|
5165
5194
|
*/
|
|
5166
|
-
const VERSION = new Version('17.2.0-
|
|
5195
|
+
const VERSION = new Version('17.2.0-rc.0');
|
|
5167
5196
|
|
|
5168
5197
|
/**
|
|
5169
5198
|
* Defines a scroll position manager. Implemented by `BrowserViewportScroller`.
|
|
@@ -5177,9 +5206,9 @@ class ViewportScroller {
|
|
|
5177
5206
|
static { this.ɵprov = ɵɵdefineInjectable({
|
|
5178
5207
|
token: ViewportScroller,
|
|
5179
5208
|
providedIn: 'root',
|
|
5180
|
-
factory: () => isPlatformBrowser(inject(PLATFORM_ID))
|
|
5181
|
-
new BrowserViewportScroller(inject(DOCUMENT), window)
|
|
5182
|
-
new NullViewportScroller()
|
|
5209
|
+
factory: () => isPlatformBrowser(inject(PLATFORM_ID))
|
|
5210
|
+
? new BrowserViewportScroller(inject(DOCUMENT), window)
|
|
5211
|
+
: new NullViewportScroller(),
|
|
5183
5212
|
}); }
|
|
5184
5213
|
}
|
|
5185
5214
|
/**
|
|
@@ -5270,7 +5299,8 @@ function findAnchorFromDocument(document, target) {
|
|
|
5270
5299
|
}
|
|
5271
5300
|
// `getElementById` and `getElementsByName` won't pierce through the shadow DOM so we
|
|
5272
5301
|
// have to traverse the DOM manually and do the lookup through the shadow roots.
|
|
5273
|
-
if (typeof document.createTreeWalker === 'function' &&
|
|
5302
|
+
if (typeof document.createTreeWalker === 'function' &&
|
|
5303
|
+
document.body &&
|
|
5274
5304
|
typeof document.body.attachShadow === 'function') {
|
|
5275
5305
|
const treeWalker = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT);
|
|
5276
5306
|
let currentNode = treeWalker.currentNode;
|
|
@@ -5337,7 +5367,7 @@ function isAbsoluteUrl(src) {
|
|
|
5337
5367
|
// Given a URL, extract the hostname part.
|
|
5338
5368
|
// If a URL is a relative one - the URL is returned as is.
|
|
5339
5369
|
function extractHostname(url) {
|
|
5340
|
-
return isAbsoluteUrl(url) ?
|
|
5370
|
+
return isAbsoluteUrl(url) ? new URL(url).hostname : url;
|
|
5341
5371
|
}
|
|
5342
5372
|
function isValidPath(path) {
|
|
5343
5373
|
const isString = typeof path === 'string';
|
|
@@ -5375,7 +5405,7 @@ const noopImageLoader = (config) => config.src;
|
|
|
5375
5405
|
* @see {@link NgOptimizedImage}
|
|
5376
5406
|
* @publicApi
|
|
5377
5407
|
*/
|
|
5378
|
-
const IMAGE_LOADER = new InjectionToken('ImageLoader', {
|
|
5408
|
+
const IMAGE_LOADER = new InjectionToken(ngDevMode ? 'ImageLoader' : '', {
|
|
5379
5409
|
providedIn: 'root',
|
|
5380
5410
|
factory: () => noopImageLoader,
|
|
5381
5411
|
});
|
|
@@ -5452,7 +5482,7 @@ function createCloudflareUrl(path, config) {
|
|
|
5452
5482
|
*/
|
|
5453
5483
|
const cloudinaryLoaderInfo = {
|
|
5454
5484
|
name: 'Cloudinary',
|
|
5455
|
-
testUrl: isCloudinaryUrl
|
|
5485
|
+
testUrl: isCloudinaryUrl,
|
|
5456
5486
|
};
|
|
5457
5487
|
const CLOUDINARY_LOADER_REGEX = /https?\:\/\/[^\/]+\.cloudinary\.com\/.+/;
|
|
5458
5488
|
/**
|
|
@@ -5473,12 +5503,13 @@ function isCloudinaryUrl(url) {
|
|
|
5473
5503
|
*
|
|
5474
5504
|
* @publicApi
|
|
5475
5505
|
*/
|
|
5476
|
-
const provideCloudinaryLoader = createImageLoader(createCloudinaryUrl, ngDevMode
|
|
5477
|
-
[
|
|
5478
|
-
'https://res.cloudinary.com/mysite',
|
|
5479
|
-
'https://
|
|
5480
|
-
|
|
5481
|
-
|
|
5506
|
+
const provideCloudinaryLoader = createImageLoader(createCloudinaryUrl, ngDevMode
|
|
5507
|
+
? [
|
|
5508
|
+
'https://res.cloudinary.com/mysite',
|
|
5509
|
+
'https://mysite.cloudinary.com',
|
|
5510
|
+
'https://subdomain.mysite.com',
|
|
5511
|
+
]
|
|
5512
|
+
: undefined);
|
|
5482
5513
|
function createCloudinaryUrl(path, config) {
|
|
5483
5514
|
// Cloudinary image URLformat:
|
|
5484
5515
|
// https://cloudinary.com/documentation/image_transformations#transformation_url_structure
|
|
@@ -5537,7 +5568,7 @@ function createImagekitUrl(path, config) {
|
|
|
5537
5568
|
*/
|
|
5538
5569
|
const imgixLoaderInfo = {
|
|
5539
5570
|
name: 'Imgix',
|
|
5540
|
-
testUrl: isImgixUrl
|
|
5571
|
+
testUrl: isImgixUrl,
|
|
5541
5572
|
};
|
|
5542
5573
|
const IMGIX_LOADER_REGEX = /https?\:\/\/[^\/]+\.imgix\.net\/.+/;
|
|
5543
5574
|
/**
|
|
@@ -5566,9 +5597,83 @@ function createImgixUrl(path, config) {
|
|
|
5566
5597
|
return url.href;
|
|
5567
5598
|
}
|
|
5568
5599
|
|
|
5600
|
+
/**
|
|
5601
|
+
* Name and URL tester for Netlify.
|
|
5602
|
+
*/
|
|
5603
|
+
const netlifyLoaderInfo = {
|
|
5604
|
+
name: 'Netlify',
|
|
5605
|
+
testUrl: isNetlifyUrl,
|
|
5606
|
+
};
|
|
5607
|
+
const NETLIFY_LOADER_REGEX = /https?\:\/\/[^\/]+\.netlify\.app\/.+/;
|
|
5608
|
+
/**
|
|
5609
|
+
* Tests whether a URL is from a Netlify site. This won't catch sites with a custom domain,
|
|
5610
|
+
* but it's a good start for sites in development. This is only used to warn users who haven't
|
|
5611
|
+
* configured an image loader.
|
|
5612
|
+
*/
|
|
5613
|
+
function isNetlifyUrl(url) {
|
|
5614
|
+
return NETLIFY_LOADER_REGEX.test(url);
|
|
5615
|
+
}
|
|
5616
|
+
/**
|
|
5617
|
+
* Function that generates an ImageLoader for Netlify and turns it into an Angular provider.
|
|
5618
|
+
*
|
|
5619
|
+
* @param path optional URL of the desired Netlify site. Defaults to the current site.
|
|
5620
|
+
* @returns Set of providers to configure the Netlify loader.
|
|
5621
|
+
*
|
|
5622
|
+
* @publicApi
|
|
5623
|
+
*/
|
|
5624
|
+
function provideNetlifyLoader(path) {
|
|
5625
|
+
if (path && !isValidPath(path)) {
|
|
5626
|
+
throw new ɵRuntimeError(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, ngDevMode &&
|
|
5627
|
+
`Image loader has detected an invalid path (\`${path}\`). ` +
|
|
5628
|
+
`To fix this, supply either the full URL to the Netlify site, or leave it empty to use the current site.`);
|
|
5629
|
+
}
|
|
5630
|
+
if (path) {
|
|
5631
|
+
const url = new URL(path);
|
|
5632
|
+
path = url.origin;
|
|
5633
|
+
}
|
|
5634
|
+
const loaderFn = (config) => {
|
|
5635
|
+
return createNetlifyUrl(config, path);
|
|
5636
|
+
};
|
|
5637
|
+
const providers = [{ provide: IMAGE_LOADER, useValue: loaderFn }];
|
|
5638
|
+
return providers;
|
|
5639
|
+
}
|
|
5640
|
+
const validParams = new Map([
|
|
5641
|
+
['height', 'h'],
|
|
5642
|
+
['fit', 'fit'],
|
|
5643
|
+
['quality', 'q'],
|
|
5644
|
+
['q', 'q'],
|
|
5645
|
+
['position', 'position'],
|
|
5646
|
+
]);
|
|
5647
|
+
function createNetlifyUrl(config, path) {
|
|
5648
|
+
// Note: `path` can be undefined, in which case we use a fake one to construct a `URL` instance.
|
|
5649
|
+
const url = new URL(path ?? 'https://a/');
|
|
5650
|
+
url.pathname = '/.netlify/images';
|
|
5651
|
+
if (!isAbsoluteUrl(config.src) && !config.src.startsWith('/')) {
|
|
5652
|
+
config.src = '/' + config.src;
|
|
5653
|
+
}
|
|
5654
|
+
url.searchParams.set('url', config.src);
|
|
5655
|
+
if (config.width) {
|
|
5656
|
+
url.searchParams.set('w', config.width.toString());
|
|
5657
|
+
}
|
|
5658
|
+
for (const [param, value] of Object.entries(config.loaderParams ?? {})) {
|
|
5659
|
+
if (validParams.has(param)) {
|
|
5660
|
+
url.searchParams.set(validParams.get(param), value.toString());
|
|
5661
|
+
}
|
|
5662
|
+
else {
|
|
5663
|
+
if (ngDevMode) {
|
|
5664
|
+
console.warn(ɵformatRuntimeError(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, `The Netlify image loader has detected an \`<img>\` tag with the unsupported attribute "\`${param}\`".`));
|
|
5665
|
+
}
|
|
5666
|
+
}
|
|
5667
|
+
}
|
|
5668
|
+
// The "a" hostname is used for relative URLs, so we can remove it from the final URL.
|
|
5669
|
+
return url.hostname === 'a' ? url.href.replace(url.origin, '') : url.href;
|
|
5670
|
+
}
|
|
5671
|
+
|
|
5569
5672
|
// Assembles directive details string, useful for error messages.
|
|
5570
5673
|
function imgDirectiveDetails(ngSrc, includeNgSrc = true) {
|
|
5571
|
-
const ngSrcInfo = includeNgSrc
|
|
5674
|
+
const ngSrcInfo = includeNgSrc
|
|
5675
|
+
? `(activated on an <img> element with the \`ngSrc="${ngSrc}"\`) `
|
|
5676
|
+
: '';
|
|
5572
5677
|
return `The NgOptimizedImage directive ${ngSrcInfo}has detected that`;
|
|
5573
5678
|
}
|
|
5574
5679
|
|
|
@@ -5649,7 +5754,7 @@ class LCPImageObserver {
|
|
|
5649
5754
|
priority: isPriority,
|
|
5650
5755
|
modified: false,
|
|
5651
5756
|
alreadyWarnedModified: false,
|
|
5652
|
-
alreadyWarnedPriority: false
|
|
5757
|
+
alreadyWarnedPriority: false,
|
|
5653
5758
|
};
|
|
5654
5759
|
this.images.set(getUrl(rewrittenSrc, this.window).href, newObservedImageState);
|
|
5655
5760
|
}
|
|
@@ -5673,10 +5778,10 @@ class LCPImageObserver {
|
|
|
5673
5778
|
this.observer.disconnect();
|
|
5674
5779
|
this.images.clear();
|
|
5675
5780
|
}
|
|
5676
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
5677
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-
|
|
5781
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5782
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: LCPImageObserver, providedIn: 'root' }); }
|
|
5678
5783
|
}
|
|
5679
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
5784
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: LCPImageObserver, decorators: [{
|
|
5680
5785
|
type: Injectable,
|
|
5681
5786
|
args: [{ providedIn: 'root' }]
|
|
5682
5787
|
}], ctorParameters: () => [] });
|
|
@@ -5715,7 +5820,7 @@ const INTERNAL_PRECONNECT_CHECK_BLOCKLIST = new Set(['localhost', '127.0.0.1', '
|
|
|
5715
5820
|
*
|
|
5716
5821
|
* @publicApi
|
|
5717
5822
|
*/
|
|
5718
|
-
const PRECONNECT_CHECK_BLOCKLIST = new InjectionToken('PRECONNECT_CHECK_BLOCKLIST');
|
|
5823
|
+
const PRECONNECT_CHECK_BLOCKLIST = new InjectionToken(ngDevMode ? 'PRECONNECT_CHECK_BLOCKLIST' : '');
|
|
5719
5824
|
/**
|
|
5720
5825
|
* Contains the logic to detect whether an image, marked with the "priority" attribute
|
|
5721
5826
|
* has a corresponding `<link rel="preconnect">` tag in the `document.head`.
|
|
@@ -5749,7 +5854,7 @@ class PreconnectLinkChecker {
|
|
|
5749
5854
|
}
|
|
5750
5855
|
populateBlocklist(origins) {
|
|
5751
5856
|
if (Array.isArray(origins)) {
|
|
5752
|
-
deepForEach(origins, origin => {
|
|
5857
|
+
deepForEach(origins, (origin) => {
|
|
5753
5858
|
this.blocklist.add(extractHostname(origin));
|
|
5754
5859
|
});
|
|
5755
5860
|
}
|
|
@@ -5772,13 +5877,11 @@ class PreconnectLinkChecker {
|
|
|
5772
5877
|
return;
|
|
5773
5878
|
// Register this origin as seen, so we don't check it again later.
|
|
5774
5879
|
this.alreadySeen.add(imgUrl.origin);
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
this.preconnectLinks = this.queryPreconnectLinks();
|
|
5781
|
-
}
|
|
5880
|
+
// Note: we query for preconnect links only *once* and cache the results
|
|
5881
|
+
// for the entire lifespan of an application, since it's unlikely that the
|
|
5882
|
+
// list would change frequently. This allows to make sure there are no
|
|
5883
|
+
// performance implications of making extra DOM lookups for each image.
|
|
5884
|
+
this.preconnectLinks ??= this.queryPreconnectLinks();
|
|
5782
5885
|
if (!this.preconnectLinks.has(imgUrl.origin)) {
|
|
5783
5886
|
console.warn(ɵformatRuntimeError(2956 /* RuntimeErrorCode.PRIORITY_IMG_MISSING_PRECONNECT_TAG */, `${imgDirectiveDetails(originalNgSrc)} there is no preconnect tag present for this ` +
|
|
5784
5887
|
`image. Preconnecting to the origin(s) that serve priority images ensures that these ` +
|
|
@@ -5801,10 +5904,10 @@ class PreconnectLinkChecker {
|
|
|
5801
5904
|
this.preconnectLinks?.clear();
|
|
5802
5905
|
this.alreadySeen.clear();
|
|
5803
5906
|
}
|
|
5804
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
5805
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-
|
|
5907
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5908
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' }); }
|
|
5806
5909
|
}
|
|
5807
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
5910
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: PreconnectLinkChecker, decorators: [{
|
|
5808
5911
|
type: Injectable,
|
|
5809
5912
|
args: [{ providedIn: 'root' }]
|
|
5810
5913
|
}], ctorParameters: () => [] });
|
|
@@ -5832,7 +5935,10 @@ const DEFAULT_PRELOADED_IMAGES_LIMIT = 5;
|
|
|
5832
5935
|
* This Set tracks the original src passed into the `ngSrc` input not the src after it has been
|
|
5833
5936
|
* run through the specified `IMAGE_LOADER`.
|
|
5834
5937
|
*/
|
|
5835
|
-
const PRELOADED_IMAGES = new InjectionToken('NG_OPTIMIZED_PRELOADED_IMAGES', {
|
|
5938
|
+
const PRELOADED_IMAGES = new InjectionToken('NG_OPTIMIZED_PRELOADED_IMAGES', {
|
|
5939
|
+
providedIn: 'root',
|
|
5940
|
+
factory: () => new Set(),
|
|
5941
|
+
});
|
|
5836
5942
|
|
|
5837
5943
|
/**
|
|
5838
5944
|
* @description Contains the logic needed to track and add preload link tags to the `<head>` tag. It
|
|
@@ -5890,10 +5996,10 @@ class PreloadLinkCreator {
|
|
|
5890
5996
|
}
|
|
5891
5997
|
renderer.appendChild(this.document.head, preload);
|
|
5892
5998
|
}
|
|
5893
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
5894
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-
|
|
5999
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: PreloadLinkCreator, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6000
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: PreloadLinkCreator, providedIn: 'root' }); }
|
|
5895
6001
|
}
|
|
5896
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
6002
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: PreloadLinkCreator, decorators: [{
|
|
5897
6003
|
type: Injectable,
|
|
5898
6004
|
args: [{ providedIn: 'root' }]
|
|
5899
6005
|
}] });
|
|
@@ -5938,7 +6044,7 @@ const VIEWPORT_BREAKPOINT_CUTOFF = 640;
|
|
|
5938
6044
|
/**
|
|
5939
6045
|
* Used to determine whether two aspect ratios are similar in value.
|
|
5940
6046
|
*/
|
|
5941
|
-
const ASPECT_RATIO_TOLERANCE = .1;
|
|
6047
|
+
const ASPECT_RATIO_TOLERANCE = 0.1;
|
|
5942
6048
|
/**
|
|
5943
6049
|
* Used to determine whether the image has been requested at an overly
|
|
5944
6050
|
* large size compared to the actual rendered image size (after taking
|
|
@@ -5951,8 +6057,28 @@ const OVERSIZED_IMAGE_TOLERANCE = 1000;
|
|
|
5951
6057
|
*/
|
|
5952
6058
|
const FIXED_SRCSET_WIDTH_LIMIT = 1920;
|
|
5953
6059
|
const FIXED_SRCSET_HEIGHT_LIMIT = 1080;
|
|
6060
|
+
/**
|
|
6061
|
+
* Default blur radius of the CSS filter used on placeholder images, in pixels
|
|
6062
|
+
*/
|
|
6063
|
+
const PLACEHOLDER_BLUR_AMOUNT = 15;
|
|
6064
|
+
/**
|
|
6065
|
+
* Used to warn or error when the user provides an overly large dataURL for the placeholder
|
|
6066
|
+
* attribute.
|
|
6067
|
+
* Character count of Base64 images is 1 character per byte, and base64 encoding is approximately
|
|
6068
|
+
* 33% larger than base images, so 4000 characters is around 3KB on disk and 10000 characters is
|
|
6069
|
+
* around 7.7KB. Experimentally, 4000 characters is about 20x20px in PNG or medium-quality JPEG
|
|
6070
|
+
* format, and 10,000 is around 50x50px, but there's quite a bit of variation depending on how the
|
|
6071
|
+
* image is saved.
|
|
6072
|
+
*/
|
|
6073
|
+
const DATA_URL_WARN_LIMIT = 4000;
|
|
6074
|
+
const DATA_URL_ERROR_LIMIT = 10000;
|
|
5954
6075
|
/** Info about built-in loaders we can test for. */
|
|
5955
|
-
const BUILT_IN_LOADERS = [
|
|
6076
|
+
const BUILT_IN_LOADERS = [
|
|
6077
|
+
imgixLoaderInfo,
|
|
6078
|
+
imageKitLoaderInfo,
|
|
6079
|
+
cloudinaryLoaderInfo,
|
|
6080
|
+
netlifyLoaderInfo,
|
|
6081
|
+
];
|
|
5956
6082
|
/**
|
|
5957
6083
|
* Directive that improves image loading performance by enforcing best practices.
|
|
5958
6084
|
*
|
|
@@ -6118,6 +6244,7 @@ class NgOptimizedImage {
|
|
|
6118
6244
|
if (!this.ngSrcset) {
|
|
6119
6245
|
assertNoComplexSizes(this);
|
|
6120
6246
|
}
|
|
6247
|
+
assertValidPlaceholder(this, this.imageLoader);
|
|
6121
6248
|
assertNotMissingBuiltInLoader(this.ngSrc, this.imageLoader);
|
|
6122
6249
|
assertNoNgSrcsetWithoutLoader(this, this.imageLoader);
|
|
6123
6250
|
assertNoLoaderParamsWithoutLoader(this, this.imageLoader);
|
|
@@ -6132,15 +6259,16 @@ class NgOptimizedImage {
|
|
|
6132
6259
|
checker.assertPreconnect(this.getRewrittenSrc(), this.ngSrc);
|
|
6133
6260
|
}
|
|
6134
6261
|
}
|
|
6262
|
+
if (this.placeholder) {
|
|
6263
|
+
this.removePlaceholderOnLoad(this, this.imgElement, this.renderer);
|
|
6264
|
+
}
|
|
6135
6265
|
this.setHostAttributes();
|
|
6136
6266
|
}
|
|
6137
6267
|
setHostAttributes() {
|
|
6138
6268
|
// Must set width/height explicitly in case they are bound (in which case they will
|
|
6139
6269
|
// only be reflected and not found by the browser)
|
|
6140
6270
|
if (this.fill) {
|
|
6141
|
-
|
|
6142
|
-
this.sizes = '100vw';
|
|
6143
|
-
}
|
|
6271
|
+
this.sizes ||= '100vw';
|
|
6144
6272
|
}
|
|
6145
6273
|
else {
|
|
6146
6274
|
this.setHostAttribute('width', this.width.toString());
|
|
@@ -6217,7 +6345,10 @@ class NgOptimizedImage {
|
|
|
6217
6345
|
}
|
|
6218
6346
|
getRewrittenSrcset() {
|
|
6219
6347
|
const widthSrcSet = VALID_WIDTH_DESCRIPTOR_SRCSET.test(this.ngSrcset);
|
|
6220
|
-
const finalSrcs = this.ngSrcset
|
|
6348
|
+
const finalSrcs = this.ngSrcset
|
|
6349
|
+
.split(',')
|
|
6350
|
+
.filter((src) => src !== '')
|
|
6351
|
+
.map((srcStr) => {
|
|
6221
6352
|
srcStr = srcStr.trim();
|
|
6222
6353
|
const width = widthSrcSet ? parseFloat(srcStr) : parseFloat(srcStr) * this.width;
|
|
6223
6354
|
return `${this.callImageLoader({ src: this.ngSrc, width })} ${srcStr}`;
|
|
@@ -6238,9 +6369,9 @@ class NgOptimizedImage {
|
|
|
6238
6369
|
if (this.sizes?.trim() === '100vw') {
|
|
6239
6370
|
// Since this is a full-screen-width image, our srcset only needs to include
|
|
6240
6371
|
// breakpoints with full viewport widths.
|
|
6241
|
-
filteredBreakpoints = breakpoints.filter(bp => bp >= VIEWPORT_BREAKPOINT_CUTOFF);
|
|
6372
|
+
filteredBreakpoints = breakpoints.filter((bp) => bp >= VIEWPORT_BREAKPOINT_CUTOFF);
|
|
6242
6373
|
}
|
|
6243
|
-
const finalSrcs = filteredBreakpoints.map(bp => `${this.callImageLoader({ src: this.ngSrc, width: bp })} ${bp}w`);
|
|
6374
|
+
const finalSrcs = filteredBreakpoints.map((bp) => `${this.callImageLoader({ src: this.ngSrc, width: bp })} ${bp}w`);
|
|
6244
6375
|
return finalSrcs.join(', ');
|
|
6245
6376
|
}
|
|
6246
6377
|
updateSrcAndSrcset(forceSrcRecalc = false) {
|
|
@@ -6264,9 +6395,9 @@ class NgOptimizedImage {
|
|
|
6264
6395
|
return rewrittenSrcset;
|
|
6265
6396
|
}
|
|
6266
6397
|
getFixedSrcset() {
|
|
6267
|
-
const finalSrcs = DENSITY_SRCSET_MULTIPLIERS.map(multiplier => `${this.callImageLoader({
|
|
6398
|
+
const finalSrcs = DENSITY_SRCSET_MULTIPLIERS.map((multiplier) => `${this.callImageLoader({
|
|
6268
6399
|
src: this.ngSrc,
|
|
6269
|
-
width: this.width * multiplier
|
|
6400
|
+
width: this.width * multiplier,
|
|
6270
6401
|
})} ${multiplier}x`);
|
|
6271
6402
|
return finalSrcs.join(', ');
|
|
6272
6403
|
}
|
|
@@ -6276,8 +6407,51 @@ class NgOptimizedImage {
|
|
|
6276
6407
|
oversizedImage =
|
|
6277
6408
|
this.width > FIXED_SRCSET_WIDTH_LIMIT || this.height > FIXED_SRCSET_HEIGHT_LIMIT;
|
|
6278
6409
|
}
|
|
6279
|
-
return !this.disableOptimizedSrcset &&
|
|
6280
|
-
!
|
|
6410
|
+
return (!this.disableOptimizedSrcset &&
|
|
6411
|
+
!this.srcset &&
|
|
6412
|
+
this.imageLoader !== noopImageLoader &&
|
|
6413
|
+
!oversizedImage);
|
|
6414
|
+
}
|
|
6415
|
+
/**
|
|
6416
|
+
* Returns an image url formatted for use with the CSS background-image property. Expects one of:
|
|
6417
|
+
* * A base64 encoded image, which is wrapped and passed through.
|
|
6418
|
+
* * A boolean. If true, calls the image loader to generate a small placeholder url.
|
|
6419
|
+
*/
|
|
6420
|
+
generatePlaceholder(placeholderInput) {
|
|
6421
|
+
const { placeholderResolution } = this.config;
|
|
6422
|
+
if (placeholderInput === true) {
|
|
6423
|
+
return `url(${this.callImageLoader({
|
|
6424
|
+
src: this.ngSrc,
|
|
6425
|
+
width: placeholderResolution,
|
|
6426
|
+
isPlaceholder: true,
|
|
6427
|
+
})})`;
|
|
6428
|
+
}
|
|
6429
|
+
else if (typeof placeholderInput === 'string' && placeholderInput.startsWith('data:')) {
|
|
6430
|
+
return `url(${placeholderInput})`;
|
|
6431
|
+
}
|
|
6432
|
+
return null;
|
|
6433
|
+
}
|
|
6434
|
+
/**
|
|
6435
|
+
* Determines if blur should be applied, based on an optional boolean
|
|
6436
|
+
* property `blur` within the optional configuration object `placeholderConfig`.
|
|
6437
|
+
*/
|
|
6438
|
+
shouldBlurPlaceholder(placeholderConfig) {
|
|
6439
|
+
if (!placeholderConfig || !placeholderConfig.hasOwnProperty('blur')) {
|
|
6440
|
+
return true;
|
|
6441
|
+
}
|
|
6442
|
+
return Boolean(placeholderConfig.blur);
|
|
6443
|
+
}
|
|
6444
|
+
removePlaceholderOnLoad(dir, img, renderer) {
|
|
6445
|
+
const removeLoadListenerFn = renderer.listen(img, 'load', () => {
|
|
6446
|
+
removeLoadListenerFn();
|
|
6447
|
+
removeErrorListenerFn();
|
|
6448
|
+
dir.placeholder = false;
|
|
6449
|
+
});
|
|
6450
|
+
const removeErrorListenerFn = renderer.listen(img, 'error', () => {
|
|
6451
|
+
removeLoadListenerFn();
|
|
6452
|
+
removeErrorListenerFn();
|
|
6453
|
+
dir.placeholder = false;
|
|
6454
|
+
});
|
|
6281
6455
|
}
|
|
6282
6456
|
/** @nodoc */
|
|
6283
6457
|
ngOnDestroy() {
|
|
@@ -6290,10 +6464,10 @@ class NgOptimizedImage {
|
|
|
6290
6464
|
setHostAttribute(name, value) {
|
|
6291
6465
|
this.renderer.setAttribute(this.imgElement, name, value);
|
|
6292
6466
|
}
|
|
6293
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-
|
|
6294
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.2.0-
|
|
6467
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6468
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.2.0-rc.0", 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", booleanOrDataUrlAttribute], 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 }); }
|
|
6295
6469
|
}
|
|
6296
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-
|
|
6470
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-rc.0", ngImport: i0, type: NgOptimizedImage, decorators: [{
|
|
6297
6471
|
type: Directive,
|
|
6298
6472
|
args: [{
|
|
6299
6473
|
standalone: true,
|
|
@@ -6302,8 +6476,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0",
|
|
|
6302
6476
|
'[style.position]': 'fill ? "absolute" : null',
|
|
6303
6477
|
'[style.width]': 'fill ? "100%" : null',
|
|
6304
6478
|
'[style.height]': 'fill ? "100%" : null',
|
|
6305
|
-
'[style.inset]': 'fill ? "
|
|
6306
|
-
|
|
6479
|
+
'[style.inset]': 'fill ? "0" : null',
|
|
6480
|
+
'[style.background-size]': 'placeholder ? "cover" : null',
|
|
6481
|
+
'[style.background-position]': 'placeholder ? "50% 50%" : null',
|
|
6482
|
+
'[style.background-repeat]': 'placeholder ? "no-repeat" : null',
|
|
6483
|
+
'[style.background-image]': 'placeholder ? generatePlaceholder(placeholder) : null',
|
|
6484
|
+
'[style.filter]': `placeholder && shouldBlurPlaceholder(placeholderConfig) ? "blur(${PLACEHOLDER_BLUR_AMOUNT}px)" : null`,
|
|
6485
|
+
},
|
|
6307
6486
|
}]
|
|
6308
6487
|
}], propDecorators: { ngSrc: [{
|
|
6309
6488
|
type: Input,
|
|
@@ -6331,6 +6510,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0",
|
|
|
6331
6510
|
}], fill: [{
|
|
6332
6511
|
type: Input,
|
|
6333
6512
|
args: [{ transform: booleanAttribute }]
|
|
6513
|
+
}], placeholder: [{
|
|
6514
|
+
type: Input,
|
|
6515
|
+
args: [{ transform: booleanOrDataUrlAttribute }]
|
|
6516
|
+
}], placeholderConfig: [{
|
|
6517
|
+
type: Input
|
|
6334
6518
|
}], src: [{
|
|
6335
6519
|
type: Input
|
|
6336
6520
|
}], srcset: [{
|
|
@@ -6397,6 +6581,53 @@ function assertNoComplexSizes(dir) {
|
|
|
6397
6581
|
`To fix this, modify the \`sizes\` attribute, or provide your own \`ngSrcset\` value directly.`);
|
|
6398
6582
|
}
|
|
6399
6583
|
}
|
|
6584
|
+
function assertValidPlaceholder(dir, imageLoader) {
|
|
6585
|
+
assertNoPlaceholderConfigWithoutPlaceholder(dir);
|
|
6586
|
+
assertNoRelativePlaceholderWithoutLoader(dir, imageLoader);
|
|
6587
|
+
assertNoOversizedDataUrl(dir);
|
|
6588
|
+
}
|
|
6589
|
+
/**
|
|
6590
|
+
* Verifies that placeholderConfig isn't being used without placeholder
|
|
6591
|
+
*/
|
|
6592
|
+
function assertNoPlaceholderConfigWithoutPlaceholder(dir) {
|
|
6593
|
+
if (dir.placeholderConfig && !dir.placeholder) {
|
|
6594
|
+
throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \`placeholderConfig\` options were provided for an ` +
|
|
6595
|
+
`image that does not use the \`placeholder\` attribute, and will have no effect.`);
|
|
6596
|
+
}
|
|
6597
|
+
}
|
|
6598
|
+
/**
|
|
6599
|
+
* Warns if a relative URL placeholder is specified, but no loader is present to provide the small
|
|
6600
|
+
* image.
|
|
6601
|
+
*/
|
|
6602
|
+
function assertNoRelativePlaceholderWithoutLoader(dir, imageLoader) {
|
|
6603
|
+
if (dir.placeholder === true && imageLoader === noopImageLoader) {
|
|
6604
|
+
throw new ɵRuntimeError(2963 /* RuntimeErrorCode.MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \`placeholder\` attribute is set to true but ` +
|
|
6605
|
+
`no image loader is configured (i.e. the default one is being used), ` +
|
|
6606
|
+
`which would result in the same image being used for the primary image and its placeholder. ` +
|
|
6607
|
+
`To fix this, provide a loader or remove the \`placeholder\` attribute from the image.`);
|
|
6608
|
+
}
|
|
6609
|
+
}
|
|
6610
|
+
/**
|
|
6611
|
+
* Warns or throws an error if an oversized dataURL placeholder is provided.
|
|
6612
|
+
*/
|
|
6613
|
+
function assertNoOversizedDataUrl(dir) {
|
|
6614
|
+
if (dir.placeholder &&
|
|
6615
|
+
typeof dir.placeholder === 'string' &&
|
|
6616
|
+
dir.placeholder.startsWith('data:')) {
|
|
6617
|
+
if (dir.placeholder.length > DATA_URL_ERROR_LIMIT) {
|
|
6618
|
+
throw new ɵRuntimeError(2965 /* RuntimeErrorCode.OVERSIZED_PLACEHOLDER */, `${imgDirectiveDetails(dir.ngSrc)} the \`placeholder\` attribute is set to a data URL which is longer ` +
|
|
6619
|
+
`than ${DATA_URL_ERROR_LIMIT} characters. This is strongly discouraged, as large inline placeholders ` +
|
|
6620
|
+
`directly increase the bundle size of Angular and hurt page load performance. To fix this, generate ` +
|
|
6621
|
+
`a smaller data URL placeholder.`);
|
|
6622
|
+
}
|
|
6623
|
+
if (dir.placeholder.length > DATA_URL_WARN_LIMIT) {
|
|
6624
|
+
console.warn(ɵformatRuntimeError(2965 /* RuntimeErrorCode.OVERSIZED_PLACEHOLDER */, `${imgDirectiveDetails(dir.ngSrc)} the \`placeholder\` attribute is set to a data URL which is longer ` +
|
|
6625
|
+
`than ${DATA_URL_WARN_LIMIT} characters. This is discouraged, as large inline placeholders ` +
|
|
6626
|
+
`directly increase the bundle size of Angular and hurt page load performance. For better loading performance, ` +
|
|
6627
|
+
`generate a smaller data URL placeholder.`));
|
|
6628
|
+
}
|
|
6629
|
+
}
|
|
6630
|
+
}
|
|
6400
6631
|
/**
|
|
6401
6632
|
* Verifies that the `ngSrc` is not a Blob URL.
|
|
6402
6633
|
*/
|
|
@@ -6441,7 +6672,9 @@ function assertValidNgSrcset(dir, value) {
|
|
|
6441
6672
|
}
|
|
6442
6673
|
}
|
|
6443
6674
|
function assertUnderDensityCap(dir, value) {
|
|
6444
|
-
const underDensityCap = value
|
|
6675
|
+
const underDensityCap = value
|
|
6676
|
+
.split(',')
|
|
6677
|
+
.every((num) => num === '' || parseFloat(num) <= ABSOLUTE_SRCSET_DENSITY_CAP);
|
|
6445
6678
|
if (!underDensityCap) {
|
|
6446
6679
|
throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \`ngSrcset\` contains an unsupported image density:` +
|
|
6447
6680
|
`\`${value}\`. NgOptimizedImage generally recommends a max image density of ` +
|
|
@@ -6459,12 +6692,14 @@ function assertUnderDensityCap(dir, value) {
|
|
|
6459
6692
|
function postInitInputChangeError(dir, inputName) {
|
|
6460
6693
|
let reason;
|
|
6461
6694
|
if (inputName === 'width' || inputName === 'height') {
|
|
6462
|
-
reason =
|
|
6463
|
-
`
|
|
6695
|
+
reason =
|
|
6696
|
+
`Changing \`${inputName}\` may result in different attribute value ` +
|
|
6697
|
+
`applied to the underlying image element and cause layout shifts on a page.`;
|
|
6464
6698
|
}
|
|
6465
6699
|
else {
|
|
6466
|
-
reason =
|
|
6467
|
-
`
|
|
6700
|
+
reason =
|
|
6701
|
+
`Changing the \`${inputName}\` would have no effect on the underlying ` +
|
|
6702
|
+
`image element, because the resource loading has already occurred.`;
|
|
6468
6703
|
}
|
|
6469
6704
|
return new ɵRuntimeError(2953 /* RuntimeErrorCode.UNEXPECTED_INPUT_CHANGE */, `${imgDirectiveDetails(dir.ngSrc)} \`${inputName}\` was updated after initialization. ` +
|
|
6470
6705
|
`The NgOptimizedImage directive will not react to this input change. ${reason} ` +
|
|
@@ -6475,7 +6710,7 @@ function postInitInputChangeError(dir, inputName) {
|
|
|
6475
6710
|
* Verify that none of the listed inputs has changed.
|
|
6476
6711
|
*/
|
|
6477
6712
|
function assertNoPostInitInputChange(dir, changes, inputs) {
|
|
6478
|
-
inputs.forEach(input => {
|
|
6713
|
+
inputs.forEach((input) => {
|
|
6479
6714
|
const isUpdated = changes.hasOwnProperty(input);
|
|
6480
6715
|
if (isUpdated && !changes[input].isFirstChange()) {
|
|
6481
6716
|
if (input === 'ngSrc') {
|
|
@@ -6561,8 +6796,8 @@ function assertNoImageDistortion(dir, img, renderer) {
|
|
|
6561
6796
|
// If `ngSrcset` hasn't been set, sanity check the intrinsic size.
|
|
6562
6797
|
const recommendedWidth = RECOMMENDED_SRCSET_DENSITY_CAP * renderedWidth;
|
|
6563
6798
|
const recommendedHeight = RECOMMENDED_SRCSET_DENSITY_CAP * renderedHeight;
|
|
6564
|
-
const oversizedWidth =
|
|
6565
|
-
const oversizedHeight =
|
|
6799
|
+
const oversizedWidth = intrinsicWidth - recommendedWidth >= OVERSIZED_IMAGE_TOLERANCE;
|
|
6800
|
+
const oversizedHeight = intrinsicHeight - recommendedHeight >= OVERSIZED_IMAGE_TOLERANCE;
|
|
6566
6801
|
if (oversizedWidth || oversizedHeight) {
|
|
6567
6802
|
console.warn(ɵformatRuntimeError(2960 /* RuntimeErrorCode.OVERSIZED_IMAGE */, `${imgDirectiveDetails(dir.ngSrc)} the intrinsic image is significantly ` +
|
|
6568
6803
|
`larger than necessary. ` +
|
|
@@ -6595,7 +6830,7 @@ function assertNonEmptyWidthAndHeight(dir) {
|
|
|
6595
6830
|
missingAttributes.push('height');
|
|
6596
6831
|
if (missingAttributes.length > 0) {
|
|
6597
6832
|
throw new ɵRuntimeError(2954 /* RuntimeErrorCode.REQUIRED_INPUT_MISSING */, `${imgDirectiveDetails(dir.ngSrc)} these required attributes ` +
|
|
6598
|
-
`are missing: ${missingAttributes.map(attr => `"${attr}"`).join(', ')}. ` +
|
|
6833
|
+
`are missing: ${missingAttributes.map((attr) => `"${attr}"`).join(', ')}. ` +
|
|
6599
6834
|
`Including "width" and "height" attributes will prevent image-related layout shifts. ` +
|
|
6600
6835
|
`To fix this, include "width" and "height" attributes on the image tag or turn on ` +
|
|
6601
6836
|
`"fill" mode with the \`fill\` attribute.`);
|
|
@@ -6717,6 +6952,14 @@ function unwrapSafeUrl(value) {
|
|
|
6717
6952
|
}
|
|
6718
6953
|
return ɵunwrapSafeValue(value);
|
|
6719
6954
|
}
|
|
6955
|
+
// Transform function to handle inputs which may be booleans, strings, or string representations
|
|
6956
|
+
// of boolean values. Used for the placeholder attribute.
|
|
6957
|
+
function booleanOrDataUrlAttribute(value) {
|
|
6958
|
+
if (typeof value === 'string' && value.startsWith(`data:`)) {
|
|
6959
|
+
return value;
|
|
6960
|
+
}
|
|
6961
|
+
return booleanAttribute(value);
|
|
6962
|
+
}
|
|
6720
6963
|
|
|
6721
6964
|
/**
|
|
6722
6965
|
* @module
|
|
@@ -6737,5 +6980,5 @@ function unwrapSafeUrl(value) {
|
|
|
6737
6980
|
* Generated bundle index. Do not edit.
|
|
6738
6981
|
*/
|
|
6739
6982
|
|
|
6740
|
-
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, isPlatformWorkerApp, isPlatformWorkerUi, provideCloudflareLoader, provideCloudinaryLoader, provideImageKitLoader, provideImgixLoader, registerLocaleData, DomAdapter as ɵDomAdapter, NullViewportScroller as ɵNullViewportScroller, PLATFORM_BROWSER_ID as ɵPLATFORM_BROWSER_ID, PLATFORM_SERVER_ID as ɵPLATFORM_SERVER_ID, PLATFORM_WORKER_APP_ID as ɵPLATFORM_WORKER_APP_ID, PLATFORM_WORKER_UI_ID as ɵPLATFORM_WORKER_UI_ID, getDOM as ɵgetDOM, normalizeQueryParams as ɵnormalizeQueryParams, parseCookieValue as ɵparseCookieValue, setRootDomAdapter as ɵsetRootDomAdapter };
|
|
6983
|
+
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, isPlatformWorkerApp, isPlatformWorkerUi, 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, PLATFORM_WORKER_APP_ID as ɵPLATFORM_WORKER_APP_ID, PLATFORM_WORKER_UI_ID as ɵPLATFORM_WORKER_UI_ID, PlatformNavigation as ɵPlatformNavigation, getDOM as ɵgetDOM, normalizeQueryParams as ɵnormalizeQueryParams, parseCookieValue as ɵparseCookieValue, setRootDomAdapter as ɵsetRootDomAdapter };
|
|
6741
6984
|
//# sourceMappingURL=common.mjs.map
|