@angular/common 15.0.0-next.5 → 15.0.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.
Files changed (81) hide show
  1. package/esm2020/http/public_api.mjs +6 -3
  2. package/esm2020/http/src/backend.mjs +1 -1
  3. package/esm2020/http/src/client.mjs +3 -3
  4. package/esm2020/http/src/interceptor.mjs +65 -20
  5. package/esm2020/http/src/jsonp.mjs +38 -18
  6. package/esm2020/http/src/module.mjs +40 -116
  7. package/esm2020/http/src/provider.mjs +129 -0
  8. package/esm2020/http/src/xhr.mjs +3 -3
  9. package/esm2020/http/src/xsrf.mjs +42 -33
  10. package/esm2020/http/testing/public_api.mjs +2 -1
  11. package/esm2020/http/testing/src/backend.mjs +3 -3
  12. package/esm2020/http/testing/src/module.mjs +9 -14
  13. package/esm2020/http/testing/src/provider.mjs +18 -0
  14. package/esm2020/src/common.mjs +2 -2
  15. package/esm2020/src/common_module.mjs +4 -4
  16. package/esm2020/src/directives/ng_class.mjs +3 -3
  17. package/esm2020/src/directives/ng_component_outlet.mjs +3 -3
  18. package/esm2020/src/directives/ng_for_of.mjs +3 -3
  19. package/esm2020/src/directives/ng_if.mjs +3 -3
  20. package/esm2020/src/directives/ng_optimized_image/image_loaders/cloudflare_loader.mjs +1 -2
  21. package/esm2020/src/directives/ng_optimized_image/image_loaders/cloudinary_loader.mjs +15 -2
  22. package/esm2020/src/directives/ng_optimized_image/image_loaders/image_loader.mjs +2 -3
  23. package/esm2020/src/directives/ng_optimized_image/image_loaders/imagekit_loader.mjs +15 -2
  24. package/esm2020/src/directives/ng_optimized_image/image_loaders/imgix_loader.mjs +15 -2
  25. package/esm2020/src/directives/ng_optimized_image/lcp_image_observer.mjs +3 -3
  26. package/esm2020/src/directives/ng_optimized_image/ng_optimized_image.mjs +206 -39
  27. package/esm2020/src/directives/ng_optimized_image/preconnect_link_checker.mjs +4 -5
  28. package/esm2020/src/directives/ng_optimized_image/preload-link-creator.mjs +74 -0
  29. package/esm2020/src/directives/ng_optimized_image/tokens.mjs +24 -0
  30. package/esm2020/src/directives/ng_plural.mjs +6 -6
  31. package/esm2020/src/directives/ng_style.mjs +3 -3
  32. package/esm2020/src/directives/ng_switch.mjs +9 -9
  33. package/esm2020/src/directives/ng_template_outlet.mjs +3 -3
  34. package/esm2020/src/errors.mjs +1 -1
  35. package/esm2020/src/i18n/localization.mjs +6 -6
  36. package/esm2020/src/location/hash_location_strategy.mjs +3 -3
  37. package/esm2020/src/location/location.mjs +3 -3
  38. package/esm2020/src/location/location_strategy.mjs +6 -6
  39. package/esm2020/src/location/platform_location.mjs +6 -6
  40. package/esm2020/src/pipes/async_pipe.mjs +3 -3
  41. package/esm2020/src/pipes/case_conversion_pipes.mjs +9 -9
  42. package/esm2020/src/pipes/date_pipe.mjs +50 -7
  43. package/esm2020/src/pipes/date_pipe_config.mjs +13 -0
  44. package/esm2020/src/pipes/i18n_plural_pipe.mjs +3 -3
  45. package/esm2020/src/pipes/i18n_select_pipe.mjs +3 -3
  46. package/esm2020/src/pipes/index.mjs +3 -3
  47. package/esm2020/src/pipes/json_pipe.mjs +3 -3
  48. package/esm2020/src/pipes/keyvalue_pipe.mjs +3 -3
  49. package/esm2020/src/pipes/number_pipe.mjs +9 -9
  50. package/esm2020/src/pipes/slice_pipe.mjs +3 -3
  51. package/esm2020/src/version.mjs +1 -1
  52. package/esm2020/testing/src/location_mock.mjs +3 -3
  53. package/esm2020/testing/src/mock_location_strategy.mjs +3 -3
  54. package/esm2020/testing/src/mock_platform_location.mjs +3 -3
  55. package/esm2020/testing/src/provide_location_mocks.mjs +23 -0
  56. package/esm2020/testing/src/testing.mjs +2 -1
  57. package/esm2020/upgrade/src/location_upgrade_module.mjs +4 -4
  58. package/fesm2015/common.mjs +503 -156
  59. package/fesm2015/common.mjs.map +1 -1
  60. package/fesm2015/http/testing.mjs +27 -16
  61. package/fesm2015/http/testing.mjs.map +1 -1
  62. package/fesm2015/http.mjs +295 -174
  63. package/fesm2015/http.mjs.map +1 -1
  64. package/fesm2015/testing.mjs +32 -12
  65. package/fesm2015/testing.mjs.map +1 -1
  66. package/fesm2015/upgrade.mjs +5 -5
  67. package/fesm2020/common.mjs +501 -155
  68. package/fesm2020/common.mjs.map +1 -1
  69. package/fesm2020/http/testing.mjs +27 -16
  70. package/fesm2020/http/testing.mjs.map +1 -1
  71. package/fesm2020/http.mjs +294 -172
  72. package/fesm2020/http.mjs.map +1 -1
  73. package/fesm2020/testing.mjs +32 -12
  74. package/fesm2020/testing.mjs.map +1 -1
  75. package/fesm2020/upgrade.mjs +5 -5
  76. package/http/index.d.ts +88 -30
  77. package/http/testing/index.d.ts +4 -1
  78. package/index.d.ts +99 -29
  79. package/package.json +3 -3
  80. package/testing/index.d.ts +10 -1
  81. package/upgrade/index.d.ts +1 -1
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Angular v15.0.0-next.5
2
+ * @license Angular v15.0.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, Injectable, ɵɵinject, Inject, inject, Optional, EventEmitter, ɵfindLocaleData, ɵLocaleDataIndex, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, LOCALE_ID, ɵregisterLocaleData, ɵisListLikeIterable, ɵstringify, Directive, Input, createNgModule, NgModuleRef, ɵRuntimeError, Host, Attribute, RendererStyleFlags2, ɵisPromise, ɵisSubscribable, Pipe, DEFAULT_CURRENCY_CODE, NgModule, Version, ɵɵdefineInjectable, ɵformatRuntimeError, Renderer2, ElementRef, Injector, NgZone } from '@angular/core';
8
+ import { InjectionToken, Injectable, ɵɵinject, Inject, inject, Optional, EventEmitter, ɵfindLocaleData, ɵLocaleDataIndex, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, LOCALE_ID, ɵregisterLocaleData, ɵisListLikeIterable, ɵstringify, Directive, Input, createNgModule, NgModuleRef, ɵRuntimeError, Host, Attribute, RendererStyleFlags2, ɵisPromise, ɵisSubscribable, Pipe, DEFAULT_CURRENCY_CODE, NgModule, Version, ɵɵdefineInjectable, ɵformatRuntimeError, Renderer2, ElementRef, Injector, PLATFORM_ID, NgZone } from '@angular/core';
9
9
 
10
10
  /**
11
11
  * @license
@@ -87,9 +87,9 @@ class PlatformLocation {
87
87
  throw new Error('Not implemented');
88
88
  }
89
89
  }
90
- PlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: PlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
91
- PlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: PlatformLocation, providedIn: 'platform', useFactory: useBrowserPlatformLocation });
92
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: PlatformLocation, decorators: [{
90
+ PlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
91
+ PlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PlatformLocation, providedIn: 'platform', useFactory: useBrowserPlatformLocation });
92
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PlatformLocation, decorators: [{
93
93
  type: Injectable,
94
94
  args: [{
95
95
  providedIn: 'platform',
@@ -190,9 +190,9 @@ class BrowserPlatformLocation extends PlatformLocation {
190
190
  return this._history.state;
191
191
  }
192
192
  }
193
- BrowserPlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: BrowserPlatformLocation, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
194
- BrowserPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: BrowserPlatformLocation, providedIn: 'platform', useFactory: createBrowserPlatformLocation });
195
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: BrowserPlatformLocation, decorators: [{
193
+ BrowserPlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: BrowserPlatformLocation, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
194
+ BrowserPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: BrowserPlatformLocation, providedIn: 'platform', useFactory: createBrowserPlatformLocation });
195
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: BrowserPlatformLocation, decorators: [{
196
196
  type: Injectable,
197
197
  args: [{
198
198
  providedIn: 'platform',
@@ -311,9 +311,9 @@ class LocationStrategy {
311
311
  throw new Error('Not implemented');
312
312
  }
313
313
  }
314
- LocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
315
- LocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: () => inject(PathLocationStrategy) });
316
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: LocationStrategy, decorators: [{
314
+ LocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
315
+ LocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: () => inject(PathLocationStrategy) });
316
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: LocationStrategy, decorators: [{
317
317
  type: Injectable,
318
318
  args: [{ providedIn: 'root', useFactory: () => inject(PathLocationStrategy) }]
319
319
  }] });
@@ -421,9 +421,9 @@ class PathLocationStrategy extends LocationStrategy {
421
421
  this._platformLocation.historyGo?.(relativePosition);
422
422
  }
423
423
  }
424
- PathLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: PathLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
425
- PathLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: PathLocationStrategy, providedIn: 'root' });
426
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: PathLocationStrategy, decorators: [{
424
+ PathLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PathLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
425
+ PathLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PathLocationStrategy, providedIn: 'root' });
426
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PathLocationStrategy, decorators: [{
427
427
  type: Injectable,
428
428
  args: [{ providedIn: 'root' }]
429
429
  }], ctorParameters: function () { return [{ type: PlatformLocation }, { type: undefined, decorators: [{
@@ -519,9 +519,9 @@ class HashLocationStrategy extends LocationStrategy {
519
519
  this._platformLocation.historyGo?.(relativePosition);
520
520
  }
521
521
  }
522
- HashLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: HashLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
523
- HashLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: HashLocationStrategy });
524
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: HashLocationStrategy, decorators: [{
522
+ HashLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: HashLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
523
+ HashLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: HashLocationStrategy });
524
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: HashLocationStrategy, decorators: [{
525
525
  type: Injectable
526
526
  }], ctorParameters: function () { return [{ type: PlatformLocation }, { type: undefined, decorators: [{
527
527
  type: Optional
@@ -772,9 +772,9 @@ Location.joinWithSlash = joinWithSlash;
772
772
  * @returns The URL string, modified if needed.
773
773
  */
774
774
  Location.stripTrailingSlash = stripTrailingSlash;
775
- Location.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: Location, deps: [{ token: LocationStrategy }], target: i0.ɵɵFactoryTarget.Injectable });
776
- Location.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation });
777
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: Location, decorators: [{
775
+ Location.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: Location, deps: [{ token: LocationStrategy }], target: i0.ɵɵFactoryTarget.Injectable });
776
+ Location.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation });
777
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: Location, decorators: [{
778
778
  type: Injectable,
779
779
  args: [{
780
780
  providedIn: 'root',
@@ -2590,9 +2590,9 @@ function parseIntAutoRadix(text) {
2590
2590
  */
2591
2591
  class NgLocalization {
2592
2592
  }
2593
- NgLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2594
- NgLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgLocalization, providedIn: 'root', useFactory: (locale) => new NgLocaleLocalization(locale), deps: [{ token: LOCALE_ID }] });
2595
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgLocalization, decorators: [{
2593
+ NgLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2594
+ NgLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgLocalization, providedIn: 'root', useFactory: (locale) => new NgLocaleLocalization(locale), deps: [{ token: LOCALE_ID }] });
2595
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgLocalization, decorators: [{
2596
2596
  type: Injectable,
2597
2597
  args: [{
2598
2598
  providedIn: 'root',
@@ -2647,9 +2647,9 @@ class NgLocaleLocalization extends NgLocalization {
2647
2647
  }
2648
2648
  }
2649
2649
  }
2650
- NgLocaleLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgLocaleLocalization, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });
2651
- NgLocaleLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgLocaleLocalization });
2652
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgLocaleLocalization, decorators: [{
2650
+ NgLocaleLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgLocaleLocalization, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });
2651
+ NgLocaleLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgLocaleLocalization });
2652
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgLocaleLocalization, decorators: [{
2653
2653
  type: Injectable
2654
2654
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
2655
2655
  type: Inject,
@@ -2842,9 +2842,9 @@ class NgClass {
2842
2842
  }
2843
2843
  }
2844
2844
  }
2845
- NgClass.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgClass, deps: [{ token: i0.IterableDiffers }, { token: i0.KeyValueDiffers }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
2846
- NgClass.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: NgClass, isStandalone: true, selector: "[ngClass]", inputs: { klass: ["class", "klass"], ngClass: "ngClass" }, ngImport: i0 });
2847
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgClass, decorators: [{
2845
+ NgClass.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgClass, deps: [{ token: i0.IterableDiffers }, { token: i0.KeyValueDiffers }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
2846
+ NgClass.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.0", type: NgClass, isStandalone: true, selector: "[ngClass]", inputs: { klass: ["class", "klass"], ngClass: "ngClass" }, ngImport: i0 });
2847
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgClass, decorators: [{
2848
2848
  type: Directive,
2849
2849
  args: [{
2850
2850
  selector: '[ngClass]',
@@ -2963,9 +2963,9 @@ class NgComponentOutlet {
2963
2963
  this._moduleRef.destroy();
2964
2964
  }
2965
2965
  }
2966
- NgComponentOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgComponentOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
2967
- NgComponentOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: NgComponentOutlet, isStandalone: true, selector: "[ngComponentOutlet]", inputs: { ngComponentOutlet: "ngComponentOutlet", ngComponentOutletInjector: "ngComponentOutletInjector", ngComponentOutletContent: "ngComponentOutletContent", ngComponentOutletNgModule: "ngComponentOutletNgModule", ngComponentOutletNgModuleFactory: "ngComponentOutletNgModuleFactory" }, usesOnChanges: true, ngImport: i0 });
2968
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgComponentOutlet, decorators: [{
2966
+ NgComponentOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgComponentOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
2967
+ NgComponentOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.0", type: NgComponentOutlet, isStandalone: true, selector: "[ngComponentOutlet]", inputs: { ngComponentOutlet: "ngComponentOutlet", ngComponentOutletInjector: "ngComponentOutletInjector", ngComponentOutletContent: "ngComponentOutletContent", ngComponentOutletNgModule: "ngComponentOutletNgModule", ngComponentOutletNgModuleFactory: "ngComponentOutletNgModuleFactory" }, usesOnChanges: true, ngImport: i0 });
2968
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgComponentOutlet, decorators: [{
2969
2969
  type: Directive,
2970
2970
  args: [{
2971
2971
  selector: '[ngComponentOutlet]',
@@ -3255,9 +3255,9 @@ class NgForOf {
3255
3255
  return true;
3256
3256
  }
3257
3257
  }
3258
- NgForOf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgForOf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });
3259
- NgForOf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: NgForOf, isStandalone: true, selector: "[ngFor][ngForOf]", inputs: { ngForOf: "ngForOf", ngForTrackBy: "ngForTrackBy", ngForTemplate: "ngForTemplate" }, ngImport: i0 });
3260
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgForOf, decorators: [{
3258
+ NgForOf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgForOf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });
3259
+ NgForOf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.0", type: NgForOf, isStandalone: true, selector: "[ngFor][ngForOf]", inputs: { ngForOf: "ngForOf", ngForTrackBy: "ngForTrackBy", ngForTemplate: "ngForTemplate" }, ngImport: i0 });
3260
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgForOf, decorators: [{
3261
3261
  type: Directive,
3262
3262
  args: [{
3263
3263
  selector: '[ngFor][ngForOf]',
@@ -3490,9 +3490,9 @@ class NgIf {
3490
3490
  return true;
3491
3491
  }
3492
3492
  }
3493
- NgIf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgIf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
3494
- NgIf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: NgIf, isStandalone: true, selector: "[ngIf]", inputs: { ngIf: "ngIf", ngIfThen: "ngIfThen", ngIfElse: "ngIfElse" }, ngImport: i0 });
3495
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgIf, decorators: [{
3493
+ NgIf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgIf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
3494
+ NgIf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.0", type: NgIf, isStandalone: true, selector: "[ngIf]", inputs: { ngIf: "ngIf", ngIfThen: "ngIfThen", ngIfElse: "ngIfElse" }, ngImport: i0 });
3495
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgIf, decorators: [{
3496
3496
  type: Directive,
3497
3497
  args: [{
3498
3498
  selector: '[ngIf]',
@@ -3663,9 +3663,9 @@ class NgSwitch {
3663
3663
  }
3664
3664
  }
3665
3665
  }
3666
- NgSwitch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3667
- NgSwitch.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: NgSwitch, isStandalone: true, selector: "[ngSwitch]", inputs: { ngSwitch: "ngSwitch" }, ngImport: i0 });
3668
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgSwitch, decorators: [{
3666
+ NgSwitch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3667
+ NgSwitch.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.0", type: NgSwitch, isStandalone: true, selector: "[ngSwitch]", inputs: { ngSwitch: "ngSwitch" }, ngImport: i0 });
3668
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgSwitch, decorators: [{
3669
3669
  type: Directive,
3670
3670
  args: [{
3671
3671
  selector: '[ngSwitch]',
@@ -3724,9 +3724,9 @@ class NgSwitchCase {
3724
3724
  this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase));
3725
3725
  }
3726
3726
  }
3727
- NgSwitchCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgSwitchCase, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3728
- NgSwitchCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: NgSwitchCase, isStandalone: true, selector: "[ngSwitchCase]", inputs: { ngSwitchCase: "ngSwitchCase" }, ngImport: i0 });
3729
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgSwitchCase, decorators: [{
3727
+ NgSwitchCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgSwitchCase, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3728
+ NgSwitchCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.0", type: NgSwitchCase, isStandalone: true, selector: "[ngSwitchCase]", inputs: { ngSwitchCase: "ngSwitchCase" }, ngImport: i0 });
3729
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgSwitchCase, decorators: [{
3730
3730
  type: Directive,
3731
3731
  args: [{
3732
3732
  selector: '[ngSwitchCase]',
@@ -3761,9 +3761,9 @@ class NgSwitchDefault {
3761
3761
  ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));
3762
3762
  }
3763
3763
  }
3764
- NgSwitchDefault.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgSwitchDefault, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3765
- NgSwitchDefault.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: NgSwitchDefault, isStandalone: true, selector: "[ngSwitchDefault]", ngImport: i0 });
3766
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgSwitchDefault, decorators: [{
3764
+ NgSwitchDefault.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgSwitchDefault, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3765
+ NgSwitchDefault.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.0", type: NgSwitchDefault, isStandalone: true, selector: "[ngSwitchDefault]", ngImport: i0 });
3766
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgSwitchDefault, decorators: [{
3767
3767
  type: Directive,
3768
3768
  args: [{
3769
3769
  selector: '[ngSwitchDefault]',
@@ -3847,9 +3847,9 @@ class NgPlural {
3847
3847
  }
3848
3848
  }
3849
3849
  }
3850
- NgPlural.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgPlural, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Directive });
3851
- NgPlural.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: NgPlural, isStandalone: true, selector: "[ngPlural]", inputs: { ngPlural: "ngPlural" }, ngImport: i0 });
3852
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgPlural, decorators: [{
3850
+ NgPlural.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgPlural, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Directive });
3851
+ NgPlural.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.0", type: NgPlural, isStandalone: true, selector: "[ngPlural]", inputs: { ngPlural: "ngPlural" }, ngImport: i0 });
3852
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgPlural, decorators: [{
3853
3853
  type: Directive,
3854
3854
  args: [{
3855
3855
  selector: '[ngPlural]',
@@ -3885,9 +3885,9 @@ class NgPluralCase {
3885
3885
  ngPlural.addCase(isANumber ? `=${value}` : value, new SwitchView(viewContainer, template));
3886
3886
  }
3887
3887
  }
3888
- NgPluralCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgPluralCase, deps: [{ token: 'ngPluralCase', attribute: true }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: NgPlural, host: true }], target: i0.ɵɵFactoryTarget.Directive });
3889
- NgPluralCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: NgPluralCase, isStandalone: true, selector: "[ngPluralCase]", ngImport: i0 });
3890
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgPluralCase, decorators: [{
3888
+ NgPluralCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.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 });
3889
+ NgPluralCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.0", type: NgPluralCase, isStandalone: true, selector: "[ngPluralCase]", ngImport: i0 });
3890
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgPluralCase, decorators: [{
3891
3891
  type: Directive,
3892
3892
  args: [{
3893
3893
  selector: '[ngPluralCase]',
@@ -3981,9 +3981,9 @@ class NgStyle {
3981
3981
  changes.forEachChangedItem((record) => this._setStyle(record.key, record.currentValue));
3982
3982
  }
3983
3983
  }
3984
- NgStyle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgStyle, deps: [{ token: i0.ElementRef }, { token: i0.KeyValueDiffers }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
3985
- NgStyle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: NgStyle, isStandalone: true, selector: "[ngStyle]", inputs: { ngStyle: "ngStyle" }, ngImport: i0 });
3986
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgStyle, decorators: [{
3984
+ NgStyle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgStyle, deps: [{ token: i0.ElementRef }, { token: i0.KeyValueDiffers }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
3985
+ NgStyle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.0", type: NgStyle, isStandalone: true, selector: "[ngStyle]", inputs: { ngStyle: "ngStyle" }, ngImport: i0 });
3986
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgStyle, decorators: [{
3987
3987
  type: Directive,
3988
3988
  args: [{
3989
3989
  selector: '[ngStyle]',
@@ -4063,9 +4063,9 @@ class NgTemplateOutlet {
4063
4063
  }
4064
4064
  }
4065
4065
  }
4066
- NgTemplateOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgTemplateOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
4067
- NgTemplateOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: NgTemplateOutlet, isStandalone: true, selector: "[ngTemplateOutlet]", inputs: { ngTemplateOutletContext: "ngTemplateOutletContext", ngTemplateOutlet: "ngTemplateOutlet", ngTemplateOutletInjector: "ngTemplateOutletInjector" }, usesOnChanges: true, ngImport: i0 });
4068
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgTemplateOutlet, decorators: [{
4066
+ NgTemplateOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgTemplateOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
4067
+ NgTemplateOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.0", type: NgTemplateOutlet, isStandalone: true, selector: "[ngTemplateOutlet]", inputs: { ngTemplateOutletContext: "ngTemplateOutletContext", ngTemplateOutlet: "ngTemplateOutlet", ngTemplateOutletInjector: "ngTemplateOutletInjector" }, usesOnChanges: true, ngImport: i0 });
4068
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgTemplateOutlet, decorators: [{
4069
4069
  type: Directive,
4070
4070
  args: [{
4071
4071
  selector: '[ngTemplateOutlet]',
@@ -4237,9 +4237,9 @@ class AsyncPipe {
4237
4237
  }
4238
4238
  }
4239
4239
  }
4240
- AsyncPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: AsyncPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });
4241
- AsyncPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: AsyncPipe, isStandalone: true, name: "async", pure: false });
4242
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: AsyncPipe, decorators: [{
4240
+ AsyncPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: AsyncPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });
4241
+ AsyncPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: AsyncPipe, isStandalone: true, name: "async", pure: false });
4242
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: AsyncPipe, decorators: [{
4243
4243
  type: Pipe,
4244
4244
  args: [{
4245
4245
  name: 'async',
@@ -4280,9 +4280,9 @@ class LowerCasePipe {
4280
4280
  return value.toLowerCase();
4281
4281
  }
4282
4282
  }
4283
- LowerCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4284
- LowerCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: LowerCasePipe, isStandalone: true, name: "lowercase" });
4285
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: LowerCasePipe, decorators: [{
4283
+ LowerCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4284
+ LowerCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: LowerCasePipe, isStandalone: true, name: "lowercase" });
4285
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: LowerCasePipe, decorators: [{
4286
4286
  type: Pipe,
4287
4287
  args: [{
4288
4288
  name: 'lowercase',
@@ -4325,9 +4325,9 @@ class TitleCasePipe {
4325
4325
  return value.replace(unicodeWordMatch, (txt => txt[0].toUpperCase() + txt.slice(1).toLowerCase()));
4326
4326
  }
4327
4327
  }
4328
- TitleCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4329
- TitleCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: TitleCasePipe, isStandalone: true, name: "titlecase" });
4330
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: TitleCasePipe, decorators: [{
4328
+ TitleCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4329
+ TitleCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: TitleCasePipe, isStandalone: true, name: "titlecase" });
4330
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: TitleCasePipe, decorators: [{
4331
4331
  type: Pipe,
4332
4332
  args: [{
4333
4333
  name: 'titlecase',
@@ -4352,9 +4352,9 @@ class UpperCasePipe {
4352
4352
  return value.toUpperCase();
4353
4353
  }
4354
4354
  }
4355
- UpperCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4356
- UpperCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: UpperCasePipe, isStandalone: true, name: "uppercase" });
4357
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: UpperCasePipe, decorators: [{
4355
+ UpperCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4356
+ UpperCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: UpperCasePipe, isStandalone: true, name: "uppercase" });
4357
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: UpperCasePipe, decorators: [{
4358
4358
  type: Pipe,
4359
4359
  args: [{
4360
4360
  name: 'uppercase',
@@ -4362,6 +4362,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5",
4362
4362
  }]
4363
4363
  }] });
4364
4364
 
4365
+ /**
4366
+ * @license
4367
+ * Copyright Google LLC All Rights Reserved.
4368
+ *
4369
+ * Use of this source code is governed by an MIT-style license that can be
4370
+ * found in the LICENSE file at https://angular.io/license
4371
+ */
4372
+ /**
4373
+ * The default date format of Angular date pipe, which corresponds to the following format:
4374
+ * `'MMM d,y'` (e.g. `Jun 15, 2015`)
4375
+ */
4376
+ const DEFAULT_DATE_FORMAT = 'mediumDate';
4377
+
4365
4378
  /**
4366
4379
  * @license
4367
4380
  * Copyright Google LLC All Rights Reserved.
@@ -4372,8 +4385,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5",
4372
4385
  /**
4373
4386
  * Optionally-provided default timezone to use for all instances of `DatePipe` (such as `'+0430'`).
4374
4387
  * If the value isn't provided, the `DatePipe` will use the end-user's local system timezone.
4388
+ *
4389
+ * @deprecated use DATE_PIPE_DEFAULT_OPTIONS token to configure DatePipe
4375
4390
  */
4376
4391
  const DATE_PIPE_DEFAULT_TIMEZONE = new InjectionToken('DATE_PIPE_DEFAULT_TIMEZONE');
4392
+ /**
4393
+ * DI token that allows to provide default configuration for the `DatePipe` instances in an
4394
+ * application. The value is an object which can include the following fields:
4395
+ * - `dateFormat`: configures the default date format. If not provided, the `DatePipe`
4396
+ * will use the 'mediumDate' as a value.
4397
+ * - `timezone`: configures the default timezone. If not provided, the `DatePipe` will
4398
+ * use the end-user's local system timezone.
4399
+ *
4400
+ * @see `DatePipeConfig`
4401
+ *
4402
+ * @usageNotes
4403
+ *
4404
+ * Various date pipe default values can be overwritten by providing this token with
4405
+ * the value that has this interface.
4406
+ *
4407
+ * For example:
4408
+ *
4409
+ * Override the default date format by providing a value using the token:
4410
+ * ```typescript
4411
+ * providers: [
4412
+ * {provide: DATE_PIPE_DEFAULT_OPTIONS, useValue: {dateFormat: 'shortDate'}}
4413
+ * ]
4414
+ * ```
4415
+ *
4416
+ * Override the default timezone by providing a value using the token:
4417
+ * ```typescript
4418
+ * providers: [
4419
+ * {provide: DATE_PIPE_DEFAULT_OPTIONS, useValue: {timezone: '-1200'}}
4420
+ * ]
4421
+ * ```
4422
+ */
4423
+ const DATE_PIPE_DEFAULT_OPTIONS = new InjectionToken('DATE_PIPE_DEFAULT_OPTIONS');
4377
4424
  // clang-format off
4378
4425
  /**
4379
4426
  * @ngModule CommonModule
@@ -4534,24 +4581,27 @@ const DATE_PIPE_DEFAULT_TIMEZONE = new InjectionToken('DATE_PIPE_DEFAULT_TIMEZON
4534
4581
  */
4535
4582
  // clang-format on
4536
4583
  class DatePipe {
4537
- constructor(locale, defaultTimezone) {
4584
+ constructor(locale, defaultTimezone, defaultOptions) {
4538
4585
  this.locale = locale;
4539
4586
  this.defaultTimezone = defaultTimezone;
4587
+ this.defaultOptions = defaultOptions;
4540
4588
  }
4541
- transform(value, format = 'mediumDate', timezone, locale) {
4589
+ transform(value, format, timezone, locale) {
4542
4590
  if (value == null || value === '' || value !== value)
4543
4591
  return null;
4544
4592
  try {
4545
- return formatDate(value, format, locale || this.locale, timezone ?? this.defaultTimezone ?? undefined);
4593
+ const _format = format ?? this.defaultOptions?.dateFormat ?? DEFAULT_DATE_FORMAT;
4594
+ const _timezone = timezone ?? this.defaultOptions?.timezone ?? this.defaultTimezone ?? undefined;
4595
+ return formatDate(value, _format, locale || this.locale, _timezone);
4546
4596
  }
4547
4597
  catch (error) {
4548
4598
  throw invalidPipeArgumentError(DatePipe, error.message);
4549
4599
  }
4550
4600
  }
4551
4601
  }
4552
- DatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: DatePipe, deps: [{ token: LOCALE_ID }, { token: DATE_PIPE_DEFAULT_TIMEZONE, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
4553
- DatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: DatePipe, isStandalone: true, name: "date" });
4554
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: DatePipe, decorators: [{
4602
+ DatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.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 });
4603
+ DatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: DatePipe, isStandalone: true, name: "date" });
4604
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: DatePipe, decorators: [{
4555
4605
  type: Pipe,
4556
4606
  args: [{
4557
4607
  name: 'date',
@@ -4566,6 +4616,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5",
4566
4616
  args: [DATE_PIPE_DEFAULT_TIMEZONE]
4567
4617
  }, {
4568
4618
  type: Optional
4619
+ }] }, { type: undefined, decorators: [{
4620
+ type: Inject,
4621
+ args: [DATE_PIPE_DEFAULT_OPTIONS]
4622
+ }, {
4623
+ type: Optional
4569
4624
  }] }]; } });
4570
4625
 
4571
4626
  /**
@@ -4611,9 +4666,9 @@ class I18nPluralPipe {
4611
4666
  return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());
4612
4667
  }
4613
4668
  }
4614
- I18nPluralPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: I18nPluralPipe, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Pipe });
4615
- I18nPluralPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: I18nPluralPipe, isStandalone: true, name: "i18nPlural" });
4616
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: I18nPluralPipe, decorators: [{
4669
+ I18nPluralPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: I18nPluralPipe, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Pipe });
4670
+ I18nPluralPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: I18nPluralPipe, isStandalone: true, name: "i18nPlural" });
4671
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: I18nPluralPipe, decorators: [{
4617
4672
  type: Pipe,
4618
4673
  args: [{
4619
4674
  name: 'i18nPlural',
@@ -4667,9 +4722,9 @@ class I18nSelectPipe {
4667
4722
  return '';
4668
4723
  }
4669
4724
  }
4670
- I18nSelectPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4671
- I18nSelectPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: I18nSelectPipe, isStandalone: true, name: "i18nSelect" });
4672
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: I18nSelectPipe, decorators: [{
4725
+ I18nSelectPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4726
+ I18nSelectPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: I18nSelectPipe, isStandalone: true, name: "i18nSelect" });
4727
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: I18nSelectPipe, decorators: [{
4673
4728
  type: Pipe,
4674
4729
  args: [{
4675
4730
  name: 'i18nSelect',
@@ -4708,9 +4763,9 @@ class JsonPipe {
4708
4763
  return JSON.stringify(value, null, 2);
4709
4764
  }
4710
4765
  }
4711
- JsonPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4712
- JsonPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: JsonPipe, isStandalone: true, name: "json", pure: false });
4713
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: JsonPipe, decorators: [{
4766
+ JsonPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4767
+ JsonPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: JsonPipe, isStandalone: true, name: "json", pure: false });
4768
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: JsonPipe, decorators: [{
4714
4769
  type: Pipe,
4715
4770
  args: [{
4716
4771
  name: 'json',
@@ -4778,9 +4833,9 @@ class KeyValuePipe {
4778
4833
  return this.keyValues;
4779
4834
  }
4780
4835
  }
4781
- KeyValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: KeyValuePipe, deps: [{ token: i0.KeyValueDiffers }], target: i0.ɵɵFactoryTarget.Pipe });
4782
- KeyValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: KeyValuePipe, isStandalone: true, name: "keyvalue", pure: false });
4783
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: KeyValuePipe, decorators: [{
4836
+ KeyValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: KeyValuePipe, deps: [{ token: i0.KeyValueDiffers }], target: i0.ɵɵFactoryTarget.Pipe });
4837
+ KeyValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: KeyValuePipe, isStandalone: true, name: "keyvalue", pure: false });
4838
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: KeyValuePipe, decorators: [{
4784
4839
  type: Pipe,
4785
4840
  args: [{
4786
4841
  name: 'keyvalue',
@@ -4913,9 +4968,9 @@ class DecimalPipe {
4913
4968
  }
4914
4969
  }
4915
4970
  }
4916
- DecimalPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: DecimalPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
4917
- DecimalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: DecimalPipe, isStandalone: true, name: "number" });
4918
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: DecimalPipe, decorators: [{
4971
+ DecimalPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: DecimalPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
4972
+ DecimalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: DecimalPipe, isStandalone: true, name: "number" });
4973
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: DecimalPipe, decorators: [{
4919
4974
  type: Pipe,
4920
4975
  args: [{
4921
4976
  name: 'number',
@@ -4978,9 +5033,9 @@ class PercentPipe {
4978
5033
  }
4979
5034
  }
4980
5035
  }
4981
- PercentPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: PercentPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
4982
- PercentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: PercentPipe, isStandalone: true, name: "percent" });
4983
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: PercentPipe, decorators: [{
5036
+ PercentPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PercentPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
5037
+ PercentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PercentPipe, isStandalone: true, name: "percent" });
5038
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PercentPipe, decorators: [{
4984
5039
  type: Pipe,
4985
5040
  args: [{
4986
5041
  name: 'percent',
@@ -5096,9 +5151,9 @@ class CurrencyPipe {
5096
5151
  }
5097
5152
  }
5098
5153
  }
5099
- CurrencyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: CurrencyPipe, deps: [{ token: LOCALE_ID }, { token: DEFAULT_CURRENCY_CODE }], target: i0.ɵɵFactoryTarget.Pipe });
5100
- CurrencyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: CurrencyPipe, isStandalone: true, name: "currency" });
5101
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: CurrencyPipe, decorators: [{
5154
+ CurrencyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: CurrencyPipe, deps: [{ token: LOCALE_ID }, { token: DEFAULT_CURRENCY_CODE }], target: i0.ɵɵFactoryTarget.Pipe });
5155
+ CurrencyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: CurrencyPipe, isStandalone: true, name: "currency" });
5156
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: CurrencyPipe, decorators: [{
5102
5157
  type: Pipe,
5103
5158
  args: [{
5104
5159
  name: 'currency',
@@ -5183,9 +5238,9 @@ class SlicePipe {
5183
5238
  return typeof obj === 'string' || Array.isArray(obj);
5184
5239
  }
5185
5240
  }
5186
- SlicePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5187
- SlicePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: SlicePipe, isStandalone: true, name: "slice", pure: false });
5188
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: SlicePipe, decorators: [{
5241
+ SlicePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5242
+ SlicePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: SlicePipe, isStandalone: true, name: "slice", pure: false });
5243
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: SlicePipe, decorators: [{
5189
5244
  type: Pipe,
5190
5245
  args: [{
5191
5246
  name: 'slice',
@@ -5239,10 +5294,10 @@ const COMMON_PIPES = [
5239
5294
  */
5240
5295
  class CommonModule {
5241
5296
  }
5242
- CommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5243
- CommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-next.5", 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] });
5244
- CommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: CommonModule });
5245
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: CommonModule, decorators: [{
5297
+ CommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5298
+ CommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.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] });
5299
+ CommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: CommonModule });
5300
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: CommonModule, decorators: [{
5246
5301
  type: NgModule,
5247
5302
  args: [{
5248
5303
  imports: [COMMON_DIRECTIVES, COMMON_PIPES],
@@ -5300,7 +5355,7 @@ function isPlatformWorkerUi(platformId) {
5300
5355
  /**
5301
5356
  * @publicApi
5302
5357
  */
5303
- const VERSION = new Version('15.0.0-next.5');
5358
+ const VERSION = new Version('15.0.0-rc.0');
5304
5359
 
5305
5360
  /**
5306
5361
  * @license
@@ -5588,7 +5643,6 @@ const noopImageLoader = (config) => config.src;
5588
5643
  * @see `ImageLoader`
5589
5644
  * @see `NgOptimizedImage`
5590
5645
  * @publicApi
5591
- * @developerPreview
5592
5646
  */
5593
5647
  const IMAGE_LOADER = new InjectionToken('ImageLoader', {
5594
5648
  providedIn: 'root',
@@ -5657,7 +5711,6 @@ function throwUnexpectedAbsoluteUrlError(path, url) {
5657
5711
  * @returns Provider that provides an ImageLoader function
5658
5712
  *
5659
5713
  * @publicApi
5660
- * @developerPreview
5661
5714
  */
5662
5715
  const provideCloudflareLoader = createImageLoader(createCloudflareUrl, ngDevMode ? ['https://<ZONE>/cdn-cgi/image/<OPTIONS>/<SOURCE-IMAGE>'] : undefined);
5663
5716
  function createCloudflareUrl(path, config) {
@@ -5677,6 +5730,20 @@ function createCloudflareUrl(path, config) {
5677
5730
  * Use of this source code is governed by an MIT-style license that can be
5678
5731
  * found in the LICENSE file at https://angular.io/license
5679
5732
  */
5733
+ /**
5734
+ * Name and URL tester for Cloudinary.
5735
+ */
5736
+ const cloudinaryLoaderInfo = {
5737
+ name: 'Cloudinary',
5738
+ testUrl: isCloudinaryUrl
5739
+ };
5740
+ const CLOUDINARY_LOADER_REGEX = /https?\:\/\/[^\/]+\.cloudinary\.com\/.+/;
5741
+ /**
5742
+ * Tests whether a URL is from Cloudinary CDN.
5743
+ */
5744
+ function isCloudinaryUrl(url) {
5745
+ return CLOUDINARY_LOADER_REGEX.test(url);
5746
+ }
5680
5747
  /**
5681
5748
  * Function that generates an ImageLoader for Cloudinary and turns it into an Angular provider.
5682
5749
  *
@@ -5688,7 +5755,6 @@ function createCloudflareUrl(path, config) {
5688
5755
  * @returns Set of providers to configure the Cloudinary loader.
5689
5756
  *
5690
5757
  * @publicApi
5691
- * @developerPreview
5692
5758
  */
5693
5759
  const provideCloudinaryLoader = createImageLoader(createCloudinaryUrl, ngDevMode ?
5694
5760
  [
@@ -5715,6 +5781,20 @@ function createCloudinaryUrl(path, config) {
5715
5781
  * Use of this source code is governed by an MIT-style license that can be
5716
5782
  * found in the LICENSE file at https://angular.io/license
5717
5783
  */
5784
+ /**
5785
+ * Name and URL tester for ImageKit.
5786
+ */
5787
+ const imageKitLoaderInfo = {
5788
+ name: 'ImageKit',
5789
+ testUrl: isImageKitUrl
5790
+ };
5791
+ const IMAGE_KIT_LOADER_REGEX = /https?\:\/\/[^\/]+\.imagekit\.io\/.+/;
5792
+ /**
5793
+ * Tests whether a URL is from ImageKit CDN.
5794
+ */
5795
+ function isImageKitUrl(url) {
5796
+ return IMAGE_KIT_LOADER_REGEX.test(url);
5797
+ }
5718
5798
  /**
5719
5799
  * Function that generates an ImageLoader for ImageKit and turns it into an Angular provider.
5720
5800
  *
@@ -5725,7 +5805,6 @@ function createCloudinaryUrl(path, config) {
5725
5805
  * @returns Set of providers to configure the ImageKit loader.
5726
5806
  *
5727
5807
  * @publicApi
5728
- * @developerPreview
5729
5808
  */
5730
5809
  const provideImageKitLoader = createImageLoader(createImagekitUrl, ngDevMode ? ['https://ik.imagekit.io/mysite', 'https://subdomain.mysite.com'] : undefined);
5731
5810
  function createImagekitUrl(path, config) {
@@ -5745,6 +5824,20 @@ function createImagekitUrl(path, config) {
5745
5824
  * Use of this source code is governed by an MIT-style license that can be
5746
5825
  * found in the LICENSE file at https://angular.io/license
5747
5826
  */
5827
+ /**
5828
+ * Name and URL tester for Imgix.
5829
+ */
5830
+ const imgixLoaderInfo = {
5831
+ name: 'Imgix',
5832
+ testUrl: isImgixUrl
5833
+ };
5834
+ const IMGIX_LOADER_REGEX = /https?\:\/\/[^\/]+\.imgix\.net\/.+/;
5835
+ /**
5836
+ * Tests whether a URL is from Imgix CDN.
5837
+ */
5838
+ function isImgixUrl(url) {
5839
+ return IMGIX_LOADER_REGEX.test(url);
5840
+ }
5748
5841
  /**
5749
5842
  * Function that generates an ImageLoader for Imgix and turns it into an Angular provider.
5750
5843
  *
@@ -5753,7 +5846,6 @@ function createImagekitUrl(path, config) {
5753
5846
  * @returns Set of providers to configure the Imgix loader.
5754
5847
  *
5755
5848
  * @publicApi
5756
- * @developerPreview
5757
5849
  */
5758
5850
  const provideImgixLoader = createImageLoader(createImgixUrl, ngDevMode ? ['https://somepath.imgix.net/'] : undefined);
5759
5851
  function createImgixUrl(path, config) {
@@ -5877,9 +5969,9 @@ class LCPImageObserver {
5877
5969
  this.alreadyWarned.clear();
5878
5970
  }
5879
5971
  }
5880
- LCPImageObserver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5881
- LCPImageObserver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: LCPImageObserver, providedIn: 'root' });
5882
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: LCPImageObserver, decorators: [{
5972
+ LCPImageObserver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5973
+ LCPImageObserver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: LCPImageObserver, providedIn: 'root' });
5974
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: LCPImageObserver, decorators: [{
5883
5975
  type: Injectable,
5884
5976
  args: [{ providedIn: 'root' }]
5885
5977
  }], ctorParameters: function () { return []; } });
@@ -5917,7 +6009,6 @@ const INTERNAL_PRECONNECT_CHECK_BLOCKLIST = new Set(['localhost', '127.0.0.1', '
5917
6009
  * ```
5918
6010
  *
5919
6011
  * @publicApi
5920
- * @developerPreview
5921
6012
  */
5922
6013
  const PRECONNECT_CHECK_BLOCKLIST = new InjectionToken('PRECONNECT_CHECK_BLOCKLIST');
5923
6014
  /**
@@ -6006,9 +6097,9 @@ class PreconnectLinkChecker {
6006
6097
  this.alreadySeen.clear();
6007
6098
  }
6008
6099
  }
6009
- PreconnectLinkChecker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6010
- PreconnectLinkChecker.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' });
6011
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: PreconnectLinkChecker, decorators: [{
6100
+ PreconnectLinkChecker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6101
+ PreconnectLinkChecker.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' });
6102
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PreconnectLinkChecker, decorators: [{
6012
6103
  type: Injectable,
6013
6104
  args: [{ providedIn: 'root' }]
6014
6105
  }], ctorParameters: function () { return []; } });
@@ -6022,6 +6113,99 @@ function deepForEach(input, fn) {
6022
6113
  }
6023
6114
  }
6024
6115
 
6116
+ /**
6117
+ * @license
6118
+ * Copyright Google LLC All Rights Reserved.
6119
+ *
6120
+ * Use of this source code is governed by an MIT-style license that can be
6121
+ * found in the LICENSE file at https://angular.io/license
6122
+ */
6123
+ /**
6124
+ * In SSR scenarios, a preload `<link>` element is generated for priority images.
6125
+ * Having a large number of preload tags may negatively affect the performance,
6126
+ * so we warn developers (by throwing an error) if the number of preloaded images
6127
+ * is above a certain threshold. This const specifies this threshold.
6128
+ */
6129
+ const DEFAULT_PRELOADED_IMAGES_LIMIT = 5;
6130
+ /**
6131
+ * Helps to keep track of priority images that already have a corresponding
6132
+ * preload tag (to avoid generating multiple preload tags with the same URL).
6133
+ *
6134
+ * This Set tracks the original src passed into the `ngSrc` input not the src after it has been
6135
+ * run through the specified `IMAGE_LOADER`.
6136
+ */
6137
+ const PRELOADED_IMAGES = new InjectionToken('NG_OPTIMIZED_PRELOADED_IMAGES', { providedIn: 'root', factory: () => new Set() });
6138
+
6139
+ /**
6140
+ * @license
6141
+ * Copyright Google LLC All Rights Reserved.
6142
+ *
6143
+ * Use of this source code is governed by an MIT-style license that can be
6144
+ * found in the LICENSE file at https://angular.io/license
6145
+ */
6146
+ /**
6147
+ * @description Contains the logic needed to track and add preload link tags to the `<head>` tag. It
6148
+ * will also track what images have already had preload link tags added so as to not duplicate link
6149
+ * tags.
6150
+ *
6151
+ * In dev mode this service will validate that the number of preloaded images does not exceed the
6152
+ * configured default preloaded images limit: {@link DEFAULT_PRELOADED_IMAGES_LIMIT}.
6153
+ */
6154
+ class PreloadLinkCreator {
6155
+ constructor() {
6156
+ this.preloadedImages = inject(PRELOADED_IMAGES);
6157
+ this.document = inject(DOCUMENT);
6158
+ }
6159
+ /**
6160
+ * @description Add a preload `<link>` to the `<head>` of the `index.html` that is served from the
6161
+ * server while using Angular Universal and SSR to kick off image loads for high priority images.
6162
+ *
6163
+ * The `sizes` (passed in from the user) and `srcset` (parsed and formatted from `ngSrcset`)
6164
+ * properties used to set the corresponding attributes, `imagesizes` and `imagesrcset`
6165
+ * respectively, on the preload `<link>` tag so that the correctly sized image is preloaded from
6166
+ * the CDN.
6167
+ *
6168
+ * {@link https://web.dev/preload-responsive-images/#imagesrcset-and-imagesizes}
6169
+ *
6170
+ * @param renderer The `Renderer2` passed in from the directive
6171
+ * @param src The original src of the image that is set on the `ngSrc` input.
6172
+ * @param srcset The parsed and formatted srcset created from the `ngSrcset` input
6173
+ * @param sizes The value of the `sizes` attribute passed in to the `<img>` tag
6174
+ */
6175
+ createPreloadLinkTag(renderer, src, srcset, sizes) {
6176
+ if (ngDevMode) {
6177
+ if (this.preloadedImages.size >= DEFAULT_PRELOADED_IMAGES_LIMIT) {
6178
+ throw new ɵRuntimeError(2961 /* RuntimeErrorCode.TOO_MANY_PRELOADED_IMAGES */, ngDevMode &&
6179
+ `The \`NgOptimizedImage\` directive has detected that more than ` +
6180
+ `${DEFAULT_PRELOADED_IMAGES_LIMIT} images were marked as priority. ` +
6181
+ `This might negatively affect an overall performance of the page. ` +
6182
+ `To fix this, remove the "priority" attribute from images with less priority.`);
6183
+ }
6184
+ }
6185
+ if (this.preloadedImages.has(src)) {
6186
+ return;
6187
+ }
6188
+ this.preloadedImages.add(src);
6189
+ const preload = renderer.createElement('link');
6190
+ renderer.setAttribute(preload, 'as', 'image');
6191
+ renderer.setAttribute(preload, 'href', src);
6192
+ renderer.setAttribute(preload, 'rel', 'preload');
6193
+ if (sizes) {
6194
+ renderer.setAttribute(preload, 'imageSizes', sizes);
6195
+ }
6196
+ if (srcset) {
6197
+ renderer.setAttribute(preload, 'imageSrcset', srcset);
6198
+ }
6199
+ renderer.appendChild(this.document.head, preload);
6200
+ }
6201
+ }
6202
+ PreloadLinkCreator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PreloadLinkCreator, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6203
+ PreloadLinkCreator.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PreloadLinkCreator, providedIn: 'root' });
6204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PreloadLinkCreator, decorators: [{
6205
+ type: Injectable,
6206
+ args: [{ providedIn: 'root' }]
6207
+ }] });
6208
+
6025
6209
  /**
6026
6210
  * @license
6027
6211
  * Copyright Google LLC All Rights Reserved.
@@ -6058,6 +6242,14 @@ const ABSOLUTE_SRCSET_DENSITY_CAP = 3;
6058
6242
  * only throw based on the slightly more conservative ABSOLUTE_SRCSET_DENSITY_CAP.
6059
6243
  */
6060
6244
  const RECOMMENDED_SRCSET_DENSITY_CAP = 2;
6245
+ /**
6246
+ * Used in generating automatic density-based srcsets
6247
+ */
6248
+ const DENSITY_SRCSET_MULTIPLIERS = [1, 2];
6249
+ /**
6250
+ * Used to determine which breakpoints to use on full-width images
6251
+ */
6252
+ const VIEWPORT_BREAKPOINT_CUTOFF = 640;
6061
6253
  /**
6062
6254
  * Used to determine whether two aspect ratios are similar in value.
6063
6255
  */
@@ -6068,6 +6260,19 @@ const ASPECT_RATIO_TOLERANCE = .1;
6068
6260
  * into account a typical device pixel ratio). In pixels.
6069
6261
  */
6070
6262
  const OVERSIZED_IMAGE_TOLERANCE = 1000;
6263
+ /** Info about built-in loaders we can test for. */
6264
+ const BUILT_IN_LOADERS = [imgixLoaderInfo, imageKitLoaderInfo, cloudinaryLoaderInfo];
6265
+ const defaultConfig = {
6266
+ breakpoints: [16, 32, 48, 64, 96, 128, 256, 384, 640, 750, 828, 1080, 1200, 1920, 2048, 3840],
6267
+ };
6268
+ /**
6269
+ * Injection token that configures the image optimized image functionality.
6270
+ *
6271
+ * @see `NgOptimizedImage`
6272
+ * @publicApi
6273
+ * @developerPreview
6274
+ */
6275
+ const IMAGE_CONFIG = new InjectionToken('ImageConfig', { providedIn: 'root', factory: () => defaultConfig });
6071
6276
  /**
6072
6277
  * Directive that improves image loading performance by enforcing best practices.
6073
6278
  *
@@ -6079,6 +6284,7 @@ const OVERSIZED_IMAGE_TOLERANCE = 1000;
6079
6284
  *
6080
6285
  * In addition, the directive:
6081
6286
  * - Generates appropriate asset URLs if a corresponding `ImageLoader` function is provided
6287
+ * - Automatically generates a srcset
6082
6288
  * - Requires that `width` and `height` are set
6083
6289
  * - Warns if `width` or `height` have been set incorrectly
6084
6290
  * - Warns if the image will be visually distorted when rendered
@@ -6164,14 +6370,16 @@ const OVERSIZED_IMAGE_TOLERANCE = 1000;
6164
6370
  * ```
6165
6371
  *
6166
6372
  * @publicApi
6167
- * @developerPreview
6168
6373
  */
6169
6374
  class NgOptimizedImage {
6170
6375
  constructor() {
6171
6376
  this.imageLoader = inject(IMAGE_LOADER);
6377
+ this.config = processConfig(inject(IMAGE_CONFIG));
6172
6378
  this.renderer = inject(Renderer2);
6173
6379
  this.imgElement = inject(ElementRef).nativeElement;
6174
6380
  this.injector = inject(Injector);
6381
+ this.isServer = isPlatformServer(inject(PLATFORM_ID));
6382
+ this.preloadLinkChecker = inject(PreloadLinkCreator);
6175
6383
  // a LCP image observer - should be injected only in the dev mode
6176
6384
  this.lcpObserver = ngDevMode ? this.injector.get(LCPImageObserver) : null;
6177
6385
  /**
@@ -6182,28 +6390,12 @@ class NgOptimizedImage {
6182
6390
  */
6183
6391
  this._renderedSrc = null;
6184
6392
  this._priority = false;
6393
+ this._disableOptimizedSrcset = false;
6394
+ this._fill = false;
6185
6395
  }
6186
6396
  /**
6187
- * Previously, the `rawSrc` attribute was used to activate the directive.
6188
- * The attribute was renamed to `ngSrc` and this input just produces an error,
6189
- * suggesting to switch to `ngSrc` instead.
6190
- *
6191
- * This error should be removed in v15.
6192
- *
6193
- * @nodoc
6194
- * @deprecated Use `ngSrc` instead.
6195
- */
6196
- set rawSrc(value) {
6197
- if (ngDevMode) {
6198
- throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(value, false)} the \`rawSrc\` attribute was used ` +
6199
- `to activate the directive. Newer version of the directive uses the \`ngSrc\` ` +
6200
- `attribute instead. Please replace \`rawSrc\` with \`ngSrc\` and ` +
6201
- `\`rawSrcset\` with \`ngSrcset\` attributes in the template to ` +
6202
- `enable image optimizations.`);
6203
- }
6204
- }
6205
- /**
6206
- * The intrinsic width of the image in pixels.
6397
+ * For responsive images: the intrinsic width of the image in pixels.
6398
+ * For fixed size images: the desired rendered width of the image in pixels.
6207
6399
  */
6208
6400
  set width(value) {
6209
6401
  ngDevMode && assertGreaterThanZero(this, value, 'width');
@@ -6213,7 +6405,9 @@ class NgOptimizedImage {
6213
6405
  return this._width;
6214
6406
  }
6215
6407
  /**
6216
- * The intrinsic height of the image in pixels.
6408
+ * For responsive images: the intrinsic height of the image in pixels.
6409
+ * For fixed size images: the desired rendered height of the image in pixels.* The intrinsic
6410
+ * height of the image in pixels.
6217
6411
  */
6218
6412
  set height(value) {
6219
6413
  ngDevMode && assertGreaterThanZero(this, value, 'height');
@@ -6231,17 +6425,50 @@ class NgOptimizedImage {
6231
6425
  get priority() {
6232
6426
  return this._priority;
6233
6427
  }
6428
+ /**
6429
+ * Disables automatic srcset generation for this image.
6430
+ */
6431
+ set disableOptimizedSrcset(value) {
6432
+ this._disableOptimizedSrcset = inputToBoolean(value);
6433
+ }
6434
+ get disableOptimizedSrcset() {
6435
+ return this._disableOptimizedSrcset;
6436
+ }
6437
+ /**
6438
+ * Sets the image to "fill mode", which eliminates the height/width requirement and adds
6439
+ * styles such that the image fills its containing element.
6440
+ *
6441
+ * @developerPreview
6442
+ */
6443
+ set fill(value) {
6444
+ this._fill = inputToBoolean(value);
6445
+ }
6446
+ get fill() {
6447
+ return this._fill;
6448
+ }
6449
+ /** @nodoc */
6234
6450
  ngOnInit() {
6235
6451
  if (ngDevMode) {
6236
6452
  assertNonEmptyInput(this, 'ngSrc', this.ngSrc);
6237
6453
  assertValidNgSrcset(this, this.ngSrcset);
6238
6454
  assertNoConflictingSrc(this);
6239
- assertNoConflictingSrcset(this);
6455
+ if (this.ngSrcset) {
6456
+ assertNoConflictingSrcset(this);
6457
+ }
6240
6458
  assertNotBase64Image(this);
6241
6459
  assertNotBlobUrl(this);
6242
- assertNonEmptyWidthAndHeight(this);
6460
+ if (this.fill) {
6461
+ assertEmptyWidthAndHeight(this);
6462
+ }
6463
+ else {
6464
+ assertNonEmptyWidthAndHeight(this);
6465
+ }
6243
6466
  assertValidLoadingInput(this);
6244
6467
  assertNoImageDistortion(this, this.imgElement, this.renderer);
6468
+ if (!this.ngSrcset) {
6469
+ assertNoComplexSizes(this);
6470
+ }
6471
+ assertNotMissingBuiltInLoader(this.ngSrc, this.imageLoader);
6245
6472
  if (this.priority) {
6246
6473
  const checker = this.injector.get(PreconnectLinkChecker);
6247
6474
  checker.assertPreconnect(this.getRewrittenSrc(), this.ngSrc);
@@ -6263,17 +6490,39 @@ class NgOptimizedImage {
6263
6490
  setHostAttributes() {
6264
6491
  // Must set width/height explicitly in case they are bound (in which case they will
6265
6492
  // only be reflected and not found by the browser)
6266
- this.setHostAttribute('width', this.width.toString());
6267
- this.setHostAttribute('height', this.height.toString());
6493
+ if (this.fill) {
6494
+ if (!this.sizes) {
6495
+ this.sizes = '100vw';
6496
+ }
6497
+ }
6498
+ else {
6499
+ this.setHostAttribute('width', this.width.toString());
6500
+ this.setHostAttribute('height', this.height.toString());
6501
+ }
6268
6502
  this.setHostAttribute('loading', this.getLoadingBehavior());
6269
6503
  this.setHostAttribute('fetchpriority', this.getFetchPriority());
6270
6504
  // The `src` and `srcset` attributes should be set last since other attributes
6271
6505
  // could affect the image's loading behavior.
6272
- this.setHostAttribute('src', this.getRewrittenSrc());
6506
+ const rewrittenSrc = this.getRewrittenSrc();
6507
+ this.setHostAttribute('src', rewrittenSrc);
6508
+ let rewrittenSrcset = undefined;
6509
+ if (this.sizes) {
6510
+ this.setHostAttribute('sizes', this.sizes);
6511
+ }
6273
6512
  if (this.ngSrcset) {
6274
- this.setHostAttribute('srcset', this.getRewrittenSrcset());
6513
+ rewrittenSrcset = this.getRewrittenSrcset();
6514
+ }
6515
+ else if (!this._disableOptimizedSrcset && !this.srcset && this.imageLoader !== noopImageLoader) {
6516
+ rewrittenSrcset = this.getAutomaticSrcset();
6517
+ }
6518
+ if (rewrittenSrcset) {
6519
+ this.setHostAttribute('srcset', rewrittenSrcset);
6520
+ }
6521
+ if (this.isServer && this.priority) {
6522
+ this.preloadLinkChecker.createPreloadLinkTag(this.renderer, rewrittenSrc, rewrittenSrcset, this.sizes);
6275
6523
  }
6276
6524
  }
6525
+ /** @nodoc */
6277
6526
  ngOnChanges(changes) {
6278
6527
  if (ngDevMode) {
6279
6528
  assertNoPostInitInputChange(this, changes, ['ngSrc', 'ngSrcset', 'width', 'height', 'priority']);
@@ -6308,6 +6557,30 @@ class NgOptimizedImage {
6308
6557
  });
6309
6558
  return finalSrcs.join(', ');
6310
6559
  }
6560
+ getAutomaticSrcset() {
6561
+ if (this.sizes) {
6562
+ return this.getResponsiveSrcset();
6563
+ }
6564
+ else {
6565
+ return this.getFixedSrcset();
6566
+ }
6567
+ }
6568
+ getResponsiveSrcset() {
6569
+ const { breakpoints } = this.config;
6570
+ let filteredBreakpoints = breakpoints;
6571
+ if (this.sizes?.trim() === '100vw') {
6572
+ // Since this is a full-screen-width image, our srcset only needs to include
6573
+ // breakpoints with full viewport widths.
6574
+ filteredBreakpoints = breakpoints.filter(bp => bp >= VIEWPORT_BREAKPOINT_CUTOFF);
6575
+ }
6576
+ const finalSrcs = filteredBreakpoints.map(bp => `${this.imageLoader({ src: this.ngSrc, width: bp })} ${bp}w`);
6577
+ return finalSrcs.join(', ');
6578
+ }
6579
+ getFixedSrcset() {
6580
+ const finalSrcs = DENSITY_SRCSET_MULTIPLIERS.map(multiplier => `${this.imageLoader({ src: this.ngSrc, width: this.width * multiplier })} ${multiplier}x`);
6581
+ return finalSrcs.join(', ');
6582
+ }
6583
+ /** @nodoc */
6311
6584
  ngOnDestroy() {
6312
6585
  if (ngDevMode) {
6313
6586
  if (!this.priority && this._renderedSrc !== null && this.lcpObserver !== null) {
@@ -6319,20 +6592,26 @@ class NgOptimizedImage {
6319
6592
  this.renderer.setAttribute(this.imgElement, name, value);
6320
6593
  }
6321
6594
  }
6322
- NgOptimizedImage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive });
6323
- NgOptimizedImage.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: NgOptimizedImage, isStandalone: true, selector: "img[ngSrc],img[rawSrc]", inputs: { rawSrc: "rawSrc", ngSrc: "ngSrc", ngSrcset: "ngSrcset", width: "width", height: "height", loading: "loading", priority: "priority", src: "src", srcset: "srcset" }, usesOnChanges: true, ngImport: i0 });
6324
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgOptimizedImage, decorators: [{
6595
+ NgOptimizedImage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive });
6596
+ NgOptimizedImage.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.0", type: NgOptimizedImage, isStandalone: true, selector: "img[ngSrc]", inputs: { ngSrc: "ngSrc", ngSrcset: "ngSrcset", sizes: "sizes", width: "width", height: "height", loading: "loading", priority: "priority", disableOptimizedSrcset: "disableOptimizedSrcset", fill: "fill", src: "src", srcset: "srcset" }, host: { properties: { "style.position": "fill ? \"absolute\" : null", "style.width": "fill ? \"100%\" : null", "style.height": "fill ? \"100%\" : null", "style.inset": "fill ? \"0px\" : null" } }, usesOnChanges: true, ngImport: i0 });
6597
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgOptimizedImage, decorators: [{
6325
6598
  type: Directive,
6326
6599
  args: [{
6327
6600
  standalone: true,
6328
- selector: 'img[ngSrc],img[rawSrc]',
6601
+ selector: 'img[ngSrc]',
6602
+ host: {
6603
+ '[style.position]': 'fill ? "absolute" : null',
6604
+ '[style.width]': 'fill ? "100%" : null',
6605
+ '[style.height]': 'fill ? "100%" : null',
6606
+ '[style.inset]': 'fill ? "0px" : null'
6607
+ }
6329
6608
  }]
6330
- }], propDecorators: { rawSrc: [{
6331
- type: Input
6332
- }], ngSrc: [{
6609
+ }], propDecorators: { ngSrc: [{
6333
6610
  type: Input
6334
6611
  }], ngSrcset: [{
6335
6612
  type: Input
6613
+ }], sizes: [{
6614
+ type: Input
6336
6615
  }], width: [{
6337
6616
  type: Input
6338
6617
  }], height: [{
@@ -6341,6 +6620,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5",
6341
6620
  type: Input
6342
6621
  }], priority: [{
6343
6622
  type: Input
6623
+ }], disableOptimizedSrcset: [{
6624
+ type: Input
6625
+ }], fill: [{
6626
+ type: Input
6344
6627
  }], src: [{
6345
6628
  type: Input
6346
6629
  }], srcset: [{
@@ -6359,6 +6642,16 @@ function inputToInteger(value) {
6359
6642
  function inputToBoolean(value) {
6360
6643
  return value != null && `${value}` !== 'false';
6361
6644
  }
6645
+ /**
6646
+ * Sorts provided config breakpoints and uses defaults.
6647
+ */
6648
+ function processConfig(config) {
6649
+ let sortedBreakpoints = {};
6650
+ if (config.breakpoints) {
6651
+ sortedBreakpoints.breakpoints = config.breakpoints.sort((a, b) => a - b);
6652
+ }
6653
+ return Object.assign({}, defaultConfig, config, sortedBreakpoints);
6654
+ }
6362
6655
  /***** Assert functions *****/
6363
6656
  /**
6364
6657
  * Verifies that there is no `src` set on a host element.
@@ -6397,6 +6690,18 @@ function assertNotBase64Image(dir) {
6397
6690
  `by removing \`ngSrc\` and using a standard \`src\` attribute instead.`);
6398
6691
  }
6399
6692
  }
6693
+ /**
6694
+ * Verifies that the 'sizes' only includes responsive values.
6695
+ */
6696
+ function assertNoComplexSizes(dir) {
6697
+ let sizes = dir.sizes;
6698
+ if (sizes?.match(/((\)|,)\s|^)\d+px/)) {
6699
+ throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \`sizes\` was set to a string including ` +
6700
+ `pixel values. For automatic \`srcset\` generation, \`sizes\` must only include responsive ` +
6701
+ `values, such as \`sizes="50vw"\` or \`sizes="(min-width: 768px) 50vw, 100vw"\`. ` +
6702
+ `To fix this, modify the \`sizes\` attribute, or provide your own \`ngSrcset\` value directly.`);
6703
+ }
6704
+ }
6400
6705
  /**
6401
6706
  * Verifies that the `ngSrc` is not a Blob URL.
6402
6707
  */
@@ -6573,7 +6878,19 @@ function assertNonEmptyWidthAndHeight(dir) {
6573
6878
  throw new ɵRuntimeError(2954 /* RuntimeErrorCode.REQUIRED_INPUT_MISSING */, `${imgDirectiveDetails(dir.ngSrc)} these required attributes ` +
6574
6879
  `are missing: ${missingAttributes.map(attr => `"${attr}"`).join(', ')}. ` +
6575
6880
  `Including "width" and "height" attributes will prevent image-related layout shifts. ` +
6576
- `To fix this, include "width" and "height" attributes on the image tag.`);
6881
+ `To fix this, include "width" and "height" attributes on the image tag or turn on ` +
6882
+ `"fill" mode with the \`fill\` attribute.`);
6883
+ }
6884
+ }
6885
+ /**
6886
+ * Verifies that width and height are not set. Used in fill mode, where those attributes don't make
6887
+ * sense.
6888
+ */
6889
+ function assertEmptyWidthAndHeight(dir) {
6890
+ if (dir.width || dir.height) {
6891
+ throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the attributes \`height\` and/or \`width\` are present ` +
6892
+ `along with the \`fill\` attribute. Because \`fill\` mode causes an image to fill its containing ` +
6893
+ `element, the size attributes have no effect and should be removed.`);
6577
6894
  }
6578
6895
  }
6579
6896
  /**
@@ -6595,6 +6912,35 @@ function assertValidLoadingInput(dir) {
6595
6912
  `To fix this, provide a valid value ("lazy", "eager", or "auto").`);
6596
6913
  }
6597
6914
  }
6915
+ /**
6916
+ * Warns if NOT using a loader (falling back to the generic loader) and
6917
+ * the image appears to be hosted on one of the image CDNs for which
6918
+ * we do have a built-in image loader. Suggests switching to the
6919
+ * built-in loader.
6920
+ *
6921
+ * @param ngSrc Value of the ngSrc attribute
6922
+ * @param imageLoader ImageLoader provided
6923
+ */
6924
+ function assertNotMissingBuiltInLoader(ngSrc, imageLoader) {
6925
+ if (imageLoader === noopImageLoader) {
6926
+ let builtInLoaderName = '';
6927
+ for (const loader of BUILT_IN_LOADERS) {
6928
+ if (loader.testUrl(ngSrc)) {
6929
+ builtInLoaderName = loader.name;
6930
+ break;
6931
+ }
6932
+ }
6933
+ if (builtInLoaderName) {
6934
+ console.warn(ɵformatRuntimeError(2962 /* RuntimeErrorCode.MISSING_BUILTIN_LOADER */, `NgOptimizedImage: It looks like your images may be hosted on the ` +
6935
+ `${builtInLoaderName} CDN, but your app is not using Angular's ` +
6936
+ `built-in loader for that CDN. We recommend switching to use ` +
6937
+ `the built-in by calling \`provide${builtInLoaderName}Loader()\` ` +
6938
+ `in your \`providers\` and passing it your instance's base URL. ` +
6939
+ `If you don't want to use the built-in loader, define a custom ` +
6940
+ `loader function using IMAGE_LOADER to silence this warning.`));
6941
+ }
6942
+ }
6943
+ }
6598
6944
 
6599
6945
  /**
6600
6946
  * @license
@@ -6633,5 +6979,5 @@ function assertValidLoadingInput(dir) {
6633
6979
  * Generated bundle index. Do not edit.
6634
6980
  */
6635
6981
 
6636
- export { APP_BASE_HREF, AsyncPipe, CommonModule, CurrencyPipe, 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, BrowserPlatformLocation as ɵBrowserPlatformLocation, 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, parseCookieValue as ɵparseCookieValue, setRootDomAdapter as ɵsetRootDomAdapter };
6982
+ export { APP_BASE_HREF, AsyncPipe, 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, BrowserPlatformLocation as ɵBrowserPlatformLocation, 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, parseCookieValue as ɵparseCookieValue, setRootDomAdapter as ɵsetRootDomAdapter };
6637
6983
  //# sourceMappingURL=common.mjs.map