@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',
@@ -313,9 +313,9 @@ class LocationStrategy {
313
313
  throw new Error('Not implemented');
314
314
  }
315
315
  }
316
- LocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
317
- LocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: () => inject(PathLocationStrategy) });
318
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: LocationStrategy, decorators: [{
316
+ LocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
317
+ LocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: () => inject(PathLocationStrategy) });
318
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: LocationStrategy, decorators: [{
319
319
  type: Injectable,
320
320
  args: [{ providedIn: 'root', useFactory: () => inject(PathLocationStrategy) }]
321
321
  }] });
@@ -424,9 +424,9 @@ class PathLocationStrategy extends LocationStrategy {
424
424
  (_b = (_a = this._platformLocation).historyGo) === null || _b === void 0 ? void 0 : _b.call(_a, relativePosition);
425
425
  }
426
426
  }
427
- 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 });
428
- PathLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: PathLocationStrategy, providedIn: 'root' });
429
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: PathLocationStrategy, decorators: [{
427
+ 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 });
428
+ PathLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PathLocationStrategy, providedIn: 'root' });
429
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PathLocationStrategy, decorators: [{
430
430
  type: Injectable,
431
431
  args: [{ providedIn: 'root' }]
432
432
  }], ctorParameters: function () {
@@ -525,9 +525,9 @@ class HashLocationStrategy extends LocationStrategy {
525
525
  (_b = (_a = this._platformLocation).historyGo) === null || _b === void 0 ? void 0 : _b.call(_a, relativePosition);
526
526
  }
527
527
  }
528
- 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 });
529
- HashLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: HashLocationStrategy });
530
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: HashLocationStrategy, decorators: [{
528
+ 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 });
529
+ HashLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: HashLocationStrategy });
530
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: HashLocationStrategy, decorators: [{
531
531
  type: Injectable
532
532
  }], ctorParameters: function () {
533
533
  return [{ type: PlatformLocation }, { type: undefined, decorators: [{
@@ -783,9 +783,9 @@ Location.joinWithSlash = joinWithSlash;
783
783
  * @returns The URL string, modified if needed.
784
784
  */
785
785
  Location.stripTrailingSlash = stripTrailingSlash;
786
- 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 });
787
- Location.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation });
788
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: Location, decorators: [{
786
+ 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 });
787
+ Location.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation });
788
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: Location, decorators: [{
789
789
  type: Injectable,
790
790
  args: [{
791
791
  providedIn: 'root',
@@ -2601,9 +2601,9 @@ function parseIntAutoRadix(text) {
2601
2601
  */
2602
2602
  class NgLocalization {
2603
2603
  }
2604
- NgLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2605
- 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 }] });
2606
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgLocalization, decorators: [{
2604
+ NgLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2605
+ 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 }] });
2606
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgLocalization, decorators: [{
2607
2607
  type: Injectable,
2608
2608
  args: [{
2609
2609
  providedIn: 'root',
@@ -2658,9 +2658,9 @@ class NgLocaleLocalization extends NgLocalization {
2658
2658
  }
2659
2659
  }
2660
2660
  }
2661
- 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 });
2662
- NgLocaleLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgLocaleLocalization });
2663
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgLocaleLocalization, decorators: [{
2661
+ 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 });
2662
+ NgLocaleLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgLocaleLocalization });
2663
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgLocaleLocalization, decorators: [{
2664
2664
  type: Injectable
2665
2665
  }], ctorParameters: function () {
2666
2666
  return [{ type: undefined, decorators: [{
@@ -2855,9 +2855,9 @@ class NgClass {
2855
2855
  }
2856
2856
  }
2857
2857
  }
2858
- 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 });
2859
- 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 });
2860
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgClass, decorators: [{
2858
+ 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 });
2859
+ 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 });
2860
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgClass, decorators: [{
2861
2861
  type: Directive,
2862
2862
  args: [{
2863
2863
  selector: '[ngClass]',
@@ -2976,9 +2976,9 @@ class NgComponentOutlet {
2976
2976
  this._moduleRef.destroy();
2977
2977
  }
2978
2978
  }
2979
- 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 });
2980
- 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 });
2981
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgComponentOutlet, decorators: [{
2979
+ 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 });
2980
+ 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 });
2981
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgComponentOutlet, decorators: [{
2982
2982
  type: Directive,
2983
2983
  args: [{
2984
2984
  selector: '[ngComponentOutlet]',
@@ -3268,9 +3268,9 @@ class NgForOf {
3268
3268
  return true;
3269
3269
  }
3270
3270
  }
3271
- 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 });
3272
- 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 });
3273
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgForOf, decorators: [{
3271
+ 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 });
3272
+ 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 });
3273
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgForOf, decorators: [{
3274
3274
  type: Directive,
3275
3275
  args: [{
3276
3276
  selector: '[ngFor][ngForOf]',
@@ -3503,9 +3503,9 @@ class NgIf {
3503
3503
  return true;
3504
3504
  }
3505
3505
  }
3506
- 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 });
3507
- 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 });
3508
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgIf, decorators: [{
3506
+ 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 });
3507
+ 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 });
3508
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgIf, decorators: [{
3509
3509
  type: Directive,
3510
3510
  args: [{
3511
3511
  selector: '[ngIf]',
@@ -3676,9 +3676,9 @@ class NgSwitch {
3676
3676
  }
3677
3677
  }
3678
3678
  }
3679
- NgSwitch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3680
- 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 });
3681
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgSwitch, decorators: [{
3679
+ NgSwitch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3680
+ 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 });
3681
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgSwitch, decorators: [{
3682
3682
  type: Directive,
3683
3683
  args: [{
3684
3684
  selector: '[ngSwitch]',
@@ -3737,9 +3737,9 @@ class NgSwitchCase {
3737
3737
  this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase));
3738
3738
  }
3739
3739
  }
3740
- 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 });
3741
- 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 });
3742
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgSwitchCase, decorators: [{
3740
+ 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 });
3741
+ 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 });
3742
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgSwitchCase, decorators: [{
3743
3743
  type: Directive,
3744
3744
  args: [{
3745
3745
  selector: '[ngSwitchCase]',
@@ -3776,9 +3776,9 @@ class NgSwitchDefault {
3776
3776
  ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));
3777
3777
  }
3778
3778
  }
3779
- 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 });
3780
- NgSwitchDefault.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: NgSwitchDefault, isStandalone: true, selector: "[ngSwitchDefault]", ngImport: i0 });
3781
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgSwitchDefault, decorators: [{
3779
+ 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 });
3780
+ NgSwitchDefault.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.0", type: NgSwitchDefault, isStandalone: true, selector: "[ngSwitchDefault]", ngImport: i0 });
3781
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgSwitchDefault, decorators: [{
3782
3782
  type: Directive,
3783
3783
  args: [{
3784
3784
  selector: '[ngSwitchDefault]',
@@ -3864,9 +3864,9 @@ class NgPlural {
3864
3864
  }
3865
3865
  }
3866
3866
  }
3867
- 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 });
3868
- 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 });
3869
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgPlural, decorators: [{
3867
+ 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 });
3868
+ 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 });
3869
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgPlural, decorators: [{
3870
3870
  type: Directive,
3871
3871
  args: [{
3872
3872
  selector: '[ngPlural]',
@@ -3902,9 +3902,9 @@ class NgPluralCase {
3902
3902
  ngPlural.addCase(isANumber ? `=${value}` : value, new SwitchView(viewContainer, template));
3903
3903
  }
3904
3904
  }
3905
- 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 });
3906
- NgPluralCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: NgPluralCase, isStandalone: true, selector: "[ngPluralCase]", ngImport: i0 });
3907
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgPluralCase, decorators: [{
3905
+ 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 });
3906
+ NgPluralCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-rc.0", type: NgPluralCase, isStandalone: true, selector: "[ngPluralCase]", ngImport: i0 });
3907
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgPluralCase, decorators: [{
3908
3908
  type: Directive,
3909
3909
  args: [{
3910
3910
  selector: '[ngPluralCase]',
@@ -4000,9 +4000,9 @@ class NgStyle {
4000
4000
  changes.forEachChangedItem((record) => this._setStyle(record.key, record.currentValue));
4001
4001
  }
4002
4002
  }
4003
- 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 });
4004
- 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 });
4005
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgStyle, decorators: [{
4003
+ 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 });
4004
+ 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 });
4005
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgStyle, decorators: [{
4006
4006
  type: Directive,
4007
4007
  args: [{
4008
4008
  selector: '[ngStyle]',
@@ -4082,9 +4082,9 @@ class NgTemplateOutlet {
4082
4082
  }
4083
4083
  }
4084
4084
  }
4085
- 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 });
4086
- 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 });
4087
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgTemplateOutlet, decorators: [{
4085
+ 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 });
4086
+ 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 });
4087
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgTemplateOutlet, decorators: [{
4088
4088
  type: Directive,
4089
4089
  args: [{
4090
4090
  selector: '[ngTemplateOutlet]',
@@ -4256,9 +4256,9 @@ class AsyncPipe {
4256
4256
  }
4257
4257
  }
4258
4258
  }
4259
- 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 });
4260
- AsyncPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: AsyncPipe, isStandalone: true, name: "async", pure: false });
4261
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: AsyncPipe, decorators: [{
4259
+ 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 });
4260
+ AsyncPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: AsyncPipe, isStandalone: true, name: "async", pure: false });
4261
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: AsyncPipe, decorators: [{
4262
4262
  type: Pipe,
4263
4263
  args: [{
4264
4264
  name: 'async',
@@ -4299,9 +4299,9 @@ class LowerCasePipe {
4299
4299
  return value.toLowerCase();
4300
4300
  }
4301
4301
  }
4302
- LowerCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4303
- LowerCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: LowerCasePipe, isStandalone: true, name: "lowercase" });
4304
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: LowerCasePipe, decorators: [{
4302
+ LowerCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4303
+ LowerCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: LowerCasePipe, isStandalone: true, name: "lowercase" });
4304
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: LowerCasePipe, decorators: [{
4305
4305
  type: Pipe,
4306
4306
  args: [{
4307
4307
  name: 'lowercase',
@@ -4344,9 +4344,9 @@ class TitleCasePipe {
4344
4344
  return value.replace(unicodeWordMatch, (txt => txt[0].toUpperCase() + txt.slice(1).toLowerCase()));
4345
4345
  }
4346
4346
  }
4347
- TitleCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4348
- TitleCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: TitleCasePipe, isStandalone: true, name: "titlecase" });
4349
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: TitleCasePipe, decorators: [{
4347
+ TitleCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4348
+ TitleCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: TitleCasePipe, isStandalone: true, name: "titlecase" });
4349
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: TitleCasePipe, decorators: [{
4350
4350
  type: Pipe,
4351
4351
  args: [{
4352
4352
  name: 'titlecase',
@@ -4371,9 +4371,9 @@ class UpperCasePipe {
4371
4371
  return value.toUpperCase();
4372
4372
  }
4373
4373
  }
4374
- UpperCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4375
- UpperCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: UpperCasePipe, isStandalone: true, name: "uppercase" });
4376
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: UpperCasePipe, decorators: [{
4374
+ UpperCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4375
+ UpperCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: UpperCasePipe, isStandalone: true, name: "uppercase" });
4376
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: UpperCasePipe, decorators: [{
4377
4377
  type: Pipe,
4378
4378
  args: [{
4379
4379
  name: 'uppercase',
@@ -4381,6 +4381,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5",
4381
4381
  }]
4382
4382
  }] });
4383
4383
 
4384
+ /**
4385
+ * @license
4386
+ * Copyright Google LLC All Rights Reserved.
4387
+ *
4388
+ * Use of this source code is governed by an MIT-style license that can be
4389
+ * found in the LICENSE file at https://angular.io/license
4390
+ */
4391
+ /**
4392
+ * The default date format of Angular date pipe, which corresponds to the following format:
4393
+ * `'MMM d,y'` (e.g. `Jun 15, 2015`)
4394
+ */
4395
+ const DEFAULT_DATE_FORMAT = 'mediumDate';
4396
+
4384
4397
  /**
4385
4398
  * @license
4386
4399
  * Copyright Google LLC All Rights Reserved.
@@ -4391,8 +4404,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5",
4391
4404
  /**
4392
4405
  * Optionally-provided default timezone to use for all instances of `DatePipe` (such as `'+0430'`).
4393
4406
  * If the value isn't provided, the `DatePipe` will use the end-user's local system timezone.
4407
+ *
4408
+ * @deprecated use DATE_PIPE_DEFAULT_OPTIONS token to configure DatePipe
4394
4409
  */
4395
4410
  const DATE_PIPE_DEFAULT_TIMEZONE = new InjectionToken('DATE_PIPE_DEFAULT_TIMEZONE');
4411
+ /**
4412
+ * DI token that allows to provide default configuration for the `DatePipe` instances in an
4413
+ * application. The value is an object which can include the following fields:
4414
+ * - `dateFormat`: configures the default date format. If not provided, the `DatePipe`
4415
+ * will use the 'mediumDate' as a value.
4416
+ * - `timezone`: configures the default timezone. If not provided, the `DatePipe` will
4417
+ * use the end-user's local system timezone.
4418
+ *
4419
+ * @see `DatePipeConfig`
4420
+ *
4421
+ * @usageNotes
4422
+ *
4423
+ * Various date pipe default values can be overwritten by providing this token with
4424
+ * the value that has this interface.
4425
+ *
4426
+ * For example:
4427
+ *
4428
+ * Override the default date format by providing a value using the token:
4429
+ * ```typescript
4430
+ * providers: [
4431
+ * {provide: DATE_PIPE_DEFAULT_OPTIONS, useValue: {dateFormat: 'shortDate'}}
4432
+ * ]
4433
+ * ```
4434
+ *
4435
+ * Override the default timezone by providing a value using the token:
4436
+ * ```typescript
4437
+ * providers: [
4438
+ * {provide: DATE_PIPE_DEFAULT_OPTIONS, useValue: {timezone: '-1200'}}
4439
+ * ]
4440
+ * ```
4441
+ */
4442
+ const DATE_PIPE_DEFAULT_OPTIONS = new InjectionToken('DATE_PIPE_DEFAULT_OPTIONS');
4396
4443
  // clang-format off
4397
4444
  /**
4398
4445
  * @ngModule CommonModule
@@ -4553,25 +4600,28 @@ const DATE_PIPE_DEFAULT_TIMEZONE = new InjectionToken('DATE_PIPE_DEFAULT_TIMEZON
4553
4600
  */
4554
4601
  // clang-format on
4555
4602
  class DatePipe {
4556
- constructor(locale, defaultTimezone) {
4603
+ constructor(locale, defaultTimezone, defaultOptions) {
4557
4604
  this.locale = locale;
4558
4605
  this.defaultTimezone = defaultTimezone;
4606
+ this.defaultOptions = defaultOptions;
4559
4607
  }
4560
- transform(value, format = 'mediumDate', timezone, locale) {
4561
- var _a;
4608
+ transform(value, format, timezone, locale) {
4609
+ var _a, _b, _c, _d, _e;
4562
4610
  if (value == null || value === '' || value !== value)
4563
4611
  return null;
4564
4612
  try {
4565
- return formatDate(value, format, locale || this.locale, (_a = timezone !== null && timezone !== void 0 ? timezone : this.defaultTimezone) !== null && _a !== void 0 ? _a : undefined);
4613
+ const _format = (_b = format !== null && format !== void 0 ? format : (_a = this.defaultOptions) === null || _a === void 0 ? void 0 : _a.dateFormat) !== null && _b !== void 0 ? _b : DEFAULT_DATE_FORMAT;
4614
+ const _timezone = (_e = (_d = timezone !== null && timezone !== void 0 ? timezone : (_c = this.defaultOptions) === null || _c === void 0 ? void 0 : _c.timezone) !== null && _d !== void 0 ? _d : this.defaultTimezone) !== null && _e !== void 0 ? _e : undefined;
4615
+ return formatDate(value, _format, locale || this.locale, _timezone);
4566
4616
  }
4567
4617
  catch (error) {
4568
4618
  throw invalidPipeArgumentError(DatePipe, error.message);
4569
4619
  }
4570
4620
  }
4571
4621
  }
4572
- 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 });
4573
- DatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: DatePipe, isStandalone: true, name: "date" });
4574
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: DatePipe, decorators: [{
4622
+ 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 });
4623
+ DatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: DatePipe, isStandalone: true, name: "date" });
4624
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: DatePipe, decorators: [{
4575
4625
  type: Pipe,
4576
4626
  args: [{
4577
4627
  name: 'date',
@@ -4587,6 +4637,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5",
4587
4637
  args: [DATE_PIPE_DEFAULT_TIMEZONE]
4588
4638
  }, {
4589
4639
  type: Optional
4640
+ }] }, { type: undefined, decorators: [{
4641
+ type: Inject,
4642
+ args: [DATE_PIPE_DEFAULT_OPTIONS]
4643
+ }, {
4644
+ type: Optional
4590
4645
  }] }];
4591
4646
  } });
4592
4647
 
@@ -4633,9 +4688,9 @@ class I18nPluralPipe {
4633
4688
  return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());
4634
4689
  }
4635
4690
  }
4636
- 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 });
4637
- I18nPluralPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: I18nPluralPipe, isStandalone: true, name: "i18nPlural" });
4638
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: I18nPluralPipe, decorators: [{
4691
+ 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 });
4692
+ I18nPluralPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: I18nPluralPipe, isStandalone: true, name: "i18nPlural" });
4693
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: I18nPluralPipe, decorators: [{
4639
4694
  type: Pipe,
4640
4695
  args: [{
4641
4696
  name: 'i18nPlural',
@@ -4689,9 +4744,9 @@ class I18nSelectPipe {
4689
4744
  return '';
4690
4745
  }
4691
4746
  }
4692
- I18nSelectPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4693
- I18nSelectPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: I18nSelectPipe, isStandalone: true, name: "i18nSelect" });
4694
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: I18nSelectPipe, decorators: [{
4747
+ I18nSelectPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4748
+ I18nSelectPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: I18nSelectPipe, isStandalone: true, name: "i18nSelect" });
4749
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: I18nSelectPipe, decorators: [{
4695
4750
  type: Pipe,
4696
4751
  args: [{
4697
4752
  name: 'i18nSelect',
@@ -4730,9 +4785,9 @@ class JsonPipe {
4730
4785
  return JSON.stringify(value, null, 2);
4731
4786
  }
4732
4787
  }
4733
- JsonPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4734
- JsonPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: JsonPipe, isStandalone: true, name: "json", pure: false });
4735
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: JsonPipe, decorators: [{
4788
+ JsonPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4789
+ JsonPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: JsonPipe, isStandalone: true, name: "json", pure: false });
4790
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: JsonPipe, decorators: [{
4736
4791
  type: Pipe,
4737
4792
  args: [{
4738
4793
  name: 'json',
@@ -4800,9 +4855,9 @@ class KeyValuePipe {
4800
4855
  return this.keyValues;
4801
4856
  }
4802
4857
  }
4803
- 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 });
4804
- KeyValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: KeyValuePipe, isStandalone: true, name: "keyvalue", pure: false });
4805
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: KeyValuePipe, decorators: [{
4858
+ 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 });
4859
+ KeyValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: KeyValuePipe, isStandalone: true, name: "keyvalue", pure: false });
4860
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: KeyValuePipe, decorators: [{
4806
4861
  type: Pipe,
4807
4862
  args: [{
4808
4863
  name: 'keyvalue',
@@ -4935,9 +4990,9 @@ class DecimalPipe {
4935
4990
  }
4936
4991
  }
4937
4992
  }
4938
- 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 });
4939
- DecimalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: DecimalPipe, isStandalone: true, name: "number" });
4940
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: DecimalPipe, decorators: [{
4993
+ 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 });
4994
+ DecimalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: DecimalPipe, isStandalone: true, name: "number" });
4995
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: DecimalPipe, decorators: [{
4941
4996
  type: Pipe,
4942
4997
  args: [{
4943
4998
  name: 'number',
@@ -5002,9 +5057,9 @@ class PercentPipe {
5002
5057
  }
5003
5058
  }
5004
5059
  }
5005
- 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 });
5006
- PercentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: PercentPipe, isStandalone: true, name: "percent" });
5007
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: PercentPipe, decorators: [{
5060
+ 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 });
5061
+ PercentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PercentPipe, isStandalone: true, name: "percent" });
5062
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PercentPipe, decorators: [{
5008
5063
  type: Pipe,
5009
5064
  args: [{
5010
5065
  name: 'percent',
@@ -5122,9 +5177,9 @@ class CurrencyPipe {
5122
5177
  }
5123
5178
  }
5124
5179
  }
5125
- 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 });
5126
- CurrencyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: CurrencyPipe, isStandalone: true, name: "currency" });
5127
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: CurrencyPipe, decorators: [{
5180
+ 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 });
5181
+ CurrencyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: CurrencyPipe, isStandalone: true, name: "currency" });
5182
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: CurrencyPipe, decorators: [{
5128
5183
  type: Pipe,
5129
5184
  args: [{
5130
5185
  name: 'currency',
@@ -5211,9 +5266,9 @@ class SlicePipe {
5211
5266
  return typeof obj === 'string' || Array.isArray(obj);
5212
5267
  }
5213
5268
  }
5214
- SlicePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5215
- SlicePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: SlicePipe, isStandalone: true, name: "slice", pure: false });
5216
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: SlicePipe, decorators: [{
5269
+ SlicePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5270
+ SlicePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-rc.0", ngImport: i0, type: SlicePipe, isStandalone: true, name: "slice", pure: false });
5271
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: SlicePipe, decorators: [{
5217
5272
  type: Pipe,
5218
5273
  args: [{
5219
5274
  name: 'slice',
@@ -5267,10 +5322,10 @@ const COMMON_PIPES = [
5267
5322
  */
5268
5323
  class CommonModule {
5269
5324
  }
5270
- CommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5271
- 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] });
5272
- CommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: CommonModule });
5273
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: CommonModule, decorators: [{
5325
+ CommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5326
+ 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] });
5327
+ CommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: CommonModule });
5328
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: CommonModule, decorators: [{
5274
5329
  type: NgModule,
5275
5330
  args: [{
5276
5331
  imports: [COMMON_DIRECTIVES, COMMON_PIPES],
@@ -5328,7 +5383,7 @@ function isPlatformWorkerUi(platformId) {
5328
5383
  /**
5329
5384
  * @publicApi
5330
5385
  */
5331
- const VERSION = new Version('15.0.0-next.5');
5386
+ const VERSION = new Version('15.0.0-rc.0');
5332
5387
 
5333
5388
  /**
5334
5389
  * @license
@@ -5616,7 +5671,6 @@ const noopImageLoader = (config) => config.src;
5616
5671
  * @see `ImageLoader`
5617
5672
  * @see `NgOptimizedImage`
5618
5673
  * @publicApi
5619
- * @developerPreview
5620
5674
  */
5621
5675
  const IMAGE_LOADER = new InjectionToken('ImageLoader', {
5622
5676
  providedIn: 'root',
@@ -5685,7 +5739,6 @@ function throwUnexpectedAbsoluteUrlError(path, url) {
5685
5739
  * @returns Provider that provides an ImageLoader function
5686
5740
  *
5687
5741
  * @publicApi
5688
- * @developerPreview
5689
5742
  */
5690
5743
  const provideCloudflareLoader = createImageLoader(createCloudflareUrl, ngDevMode ? ['https://<ZONE>/cdn-cgi/image/<OPTIONS>/<SOURCE-IMAGE>'] : undefined);
5691
5744
  function createCloudflareUrl(path, config) {
@@ -5705,6 +5758,20 @@ function createCloudflareUrl(path, config) {
5705
5758
  * Use of this source code is governed by an MIT-style license that can be
5706
5759
  * found in the LICENSE file at https://angular.io/license
5707
5760
  */
5761
+ /**
5762
+ * Name and URL tester for Cloudinary.
5763
+ */
5764
+ const cloudinaryLoaderInfo = {
5765
+ name: 'Cloudinary',
5766
+ testUrl: isCloudinaryUrl
5767
+ };
5768
+ const CLOUDINARY_LOADER_REGEX = /https?\:\/\/[^\/]+\.cloudinary\.com\/.+/;
5769
+ /**
5770
+ * Tests whether a URL is from Cloudinary CDN.
5771
+ */
5772
+ function isCloudinaryUrl(url) {
5773
+ return CLOUDINARY_LOADER_REGEX.test(url);
5774
+ }
5708
5775
  /**
5709
5776
  * Function that generates an ImageLoader for Cloudinary and turns it into an Angular provider.
5710
5777
  *
@@ -5716,7 +5783,6 @@ function createCloudflareUrl(path, config) {
5716
5783
  * @returns Set of providers to configure the Cloudinary loader.
5717
5784
  *
5718
5785
  * @publicApi
5719
- * @developerPreview
5720
5786
  */
5721
5787
  const provideCloudinaryLoader = createImageLoader(createCloudinaryUrl, ngDevMode ?
5722
5788
  [
@@ -5743,6 +5809,20 @@ function createCloudinaryUrl(path, config) {
5743
5809
  * Use of this source code is governed by an MIT-style license that can be
5744
5810
  * found in the LICENSE file at https://angular.io/license
5745
5811
  */
5812
+ /**
5813
+ * Name and URL tester for ImageKit.
5814
+ */
5815
+ const imageKitLoaderInfo = {
5816
+ name: 'ImageKit',
5817
+ testUrl: isImageKitUrl
5818
+ };
5819
+ const IMAGE_KIT_LOADER_REGEX = /https?\:\/\/[^\/]+\.imagekit\.io\/.+/;
5820
+ /**
5821
+ * Tests whether a URL is from ImageKit CDN.
5822
+ */
5823
+ function isImageKitUrl(url) {
5824
+ return IMAGE_KIT_LOADER_REGEX.test(url);
5825
+ }
5746
5826
  /**
5747
5827
  * Function that generates an ImageLoader for ImageKit and turns it into an Angular provider.
5748
5828
  *
@@ -5753,7 +5833,6 @@ function createCloudinaryUrl(path, config) {
5753
5833
  * @returns Set of providers to configure the ImageKit loader.
5754
5834
  *
5755
5835
  * @publicApi
5756
- * @developerPreview
5757
5836
  */
5758
5837
  const provideImageKitLoader = createImageLoader(createImagekitUrl, ngDevMode ? ['https://ik.imagekit.io/mysite', 'https://subdomain.mysite.com'] : undefined);
5759
5838
  function createImagekitUrl(path, config) {
@@ -5773,6 +5852,20 @@ function createImagekitUrl(path, config) {
5773
5852
  * Use of this source code is governed by an MIT-style license that can be
5774
5853
  * found in the LICENSE file at https://angular.io/license
5775
5854
  */
5855
+ /**
5856
+ * Name and URL tester for Imgix.
5857
+ */
5858
+ const imgixLoaderInfo = {
5859
+ name: 'Imgix',
5860
+ testUrl: isImgixUrl
5861
+ };
5862
+ const IMGIX_LOADER_REGEX = /https?\:\/\/[^\/]+\.imgix\.net\/.+/;
5863
+ /**
5864
+ * Tests whether a URL is from Imgix CDN.
5865
+ */
5866
+ function isImgixUrl(url) {
5867
+ return IMGIX_LOADER_REGEX.test(url);
5868
+ }
5776
5869
  /**
5777
5870
  * Function that generates an ImageLoader for Imgix and turns it into an Angular provider.
5778
5871
  *
@@ -5781,7 +5874,6 @@ function createImagekitUrl(path, config) {
5781
5874
  * @returns Set of providers to configure the Imgix loader.
5782
5875
  *
5783
5876
  * @publicApi
5784
- * @developerPreview
5785
5877
  */
5786
5878
  const provideImgixLoader = createImageLoader(createImgixUrl, ngDevMode ? ['https://somepath.imgix.net/'] : undefined);
5787
5879
  function createImgixUrl(path, config) {
@@ -5906,9 +5998,9 @@ class LCPImageObserver {
5906
5998
  this.alreadyWarned.clear();
5907
5999
  }
5908
6000
  }
5909
- LCPImageObserver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5910
- LCPImageObserver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: LCPImageObserver, providedIn: 'root' });
5911
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: LCPImageObserver, decorators: [{
6001
+ LCPImageObserver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6002
+ LCPImageObserver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: LCPImageObserver, providedIn: 'root' });
6003
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: LCPImageObserver, decorators: [{
5912
6004
  type: Injectable,
5913
6005
  args: [{ providedIn: 'root' }]
5914
6006
  }], ctorParameters: function () { return []; } });
@@ -5946,7 +6038,6 @@ const INTERNAL_PRECONNECT_CHECK_BLOCKLIST = new Set(['localhost', '127.0.0.1', '
5946
6038
  * ```
5947
6039
  *
5948
6040
  * @publicApi
5949
- * @developerPreview
5950
6041
  */
5951
6042
  const PRECONNECT_CHECK_BLOCKLIST = new InjectionToken('PRECONNECT_CHECK_BLOCKLIST');
5952
6043
  /**
@@ -6036,9 +6127,9 @@ class PreconnectLinkChecker {
6036
6127
  this.alreadySeen.clear();
6037
6128
  }
6038
6129
  }
6039
- PreconnectLinkChecker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6040
- PreconnectLinkChecker.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' });
6041
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: PreconnectLinkChecker, decorators: [{
6130
+ PreconnectLinkChecker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6131
+ PreconnectLinkChecker.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' });
6132
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PreconnectLinkChecker, decorators: [{
6042
6133
  type: Injectable,
6043
6134
  args: [{ providedIn: 'root' }]
6044
6135
  }], ctorParameters: function () { return []; } });
@@ -6052,6 +6143,99 @@ function deepForEach(input, fn) {
6052
6143
  }
6053
6144
  }
6054
6145
 
6146
+ /**
6147
+ * @license
6148
+ * Copyright Google LLC All Rights Reserved.
6149
+ *
6150
+ * Use of this source code is governed by an MIT-style license that can be
6151
+ * found in the LICENSE file at https://angular.io/license
6152
+ */
6153
+ /**
6154
+ * In SSR scenarios, a preload `<link>` element is generated for priority images.
6155
+ * Having a large number of preload tags may negatively affect the performance,
6156
+ * so we warn developers (by throwing an error) if the number of preloaded images
6157
+ * is above a certain threshold. This const specifies this threshold.
6158
+ */
6159
+ const DEFAULT_PRELOADED_IMAGES_LIMIT = 5;
6160
+ /**
6161
+ * Helps to keep track of priority images that already have a corresponding
6162
+ * preload tag (to avoid generating multiple preload tags with the same URL).
6163
+ *
6164
+ * This Set tracks the original src passed into the `ngSrc` input not the src after it has been
6165
+ * run through the specified `IMAGE_LOADER`.
6166
+ */
6167
+ const PRELOADED_IMAGES = new InjectionToken('NG_OPTIMIZED_PRELOADED_IMAGES', { providedIn: 'root', factory: () => new Set() });
6168
+
6169
+ /**
6170
+ * @license
6171
+ * Copyright Google LLC All Rights Reserved.
6172
+ *
6173
+ * Use of this source code is governed by an MIT-style license that can be
6174
+ * found in the LICENSE file at https://angular.io/license
6175
+ */
6176
+ /**
6177
+ * @description Contains the logic needed to track and add preload link tags to the `<head>` tag. It
6178
+ * will also track what images have already had preload link tags added so as to not duplicate link
6179
+ * tags.
6180
+ *
6181
+ * In dev mode this service will validate that the number of preloaded images does not exceed the
6182
+ * configured default preloaded images limit: {@link DEFAULT_PRELOADED_IMAGES_LIMIT}.
6183
+ */
6184
+ class PreloadLinkCreator {
6185
+ constructor() {
6186
+ this.preloadedImages = inject(PRELOADED_IMAGES);
6187
+ this.document = inject(DOCUMENT);
6188
+ }
6189
+ /**
6190
+ * @description Add a preload `<link>` to the `<head>` of the `index.html` that is served from the
6191
+ * server while using Angular Universal and SSR to kick off image loads for high priority images.
6192
+ *
6193
+ * The `sizes` (passed in from the user) and `srcset` (parsed and formatted from `ngSrcset`)
6194
+ * properties used to set the corresponding attributes, `imagesizes` and `imagesrcset`
6195
+ * respectively, on the preload `<link>` tag so that the correctly sized image is preloaded from
6196
+ * the CDN.
6197
+ *
6198
+ * {@link https://web.dev/preload-responsive-images/#imagesrcset-and-imagesizes}
6199
+ *
6200
+ * @param renderer The `Renderer2` passed in from the directive
6201
+ * @param src The original src of the image that is set on the `ngSrc` input.
6202
+ * @param srcset The parsed and formatted srcset created from the `ngSrcset` input
6203
+ * @param sizes The value of the `sizes` attribute passed in to the `<img>` tag
6204
+ */
6205
+ createPreloadLinkTag(renderer, src, srcset, sizes) {
6206
+ if (ngDevMode) {
6207
+ if (this.preloadedImages.size >= DEFAULT_PRELOADED_IMAGES_LIMIT) {
6208
+ throw new ɵRuntimeError(2961 /* RuntimeErrorCode.TOO_MANY_PRELOADED_IMAGES */, ngDevMode &&
6209
+ `The \`NgOptimizedImage\` directive has detected that more than ` +
6210
+ `${DEFAULT_PRELOADED_IMAGES_LIMIT} images were marked as priority. ` +
6211
+ `This might negatively affect an overall performance of the page. ` +
6212
+ `To fix this, remove the "priority" attribute from images with less priority.`);
6213
+ }
6214
+ }
6215
+ if (this.preloadedImages.has(src)) {
6216
+ return;
6217
+ }
6218
+ this.preloadedImages.add(src);
6219
+ const preload = renderer.createElement('link');
6220
+ renderer.setAttribute(preload, 'as', 'image');
6221
+ renderer.setAttribute(preload, 'href', src);
6222
+ renderer.setAttribute(preload, 'rel', 'preload');
6223
+ if (sizes) {
6224
+ renderer.setAttribute(preload, 'imageSizes', sizes);
6225
+ }
6226
+ if (srcset) {
6227
+ renderer.setAttribute(preload, 'imageSrcset', srcset);
6228
+ }
6229
+ renderer.appendChild(this.document.head, preload);
6230
+ }
6231
+ }
6232
+ PreloadLinkCreator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PreloadLinkCreator, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6233
+ PreloadLinkCreator.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PreloadLinkCreator, providedIn: 'root' });
6234
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: PreloadLinkCreator, decorators: [{
6235
+ type: Injectable,
6236
+ args: [{ providedIn: 'root' }]
6237
+ }] });
6238
+
6055
6239
  /**
6056
6240
  * @license
6057
6241
  * Copyright Google LLC All Rights Reserved.
@@ -6088,6 +6272,14 @@ const ABSOLUTE_SRCSET_DENSITY_CAP = 3;
6088
6272
  * only throw based on the slightly more conservative ABSOLUTE_SRCSET_DENSITY_CAP.
6089
6273
  */
6090
6274
  const RECOMMENDED_SRCSET_DENSITY_CAP = 2;
6275
+ /**
6276
+ * Used in generating automatic density-based srcsets
6277
+ */
6278
+ const DENSITY_SRCSET_MULTIPLIERS = [1, 2];
6279
+ /**
6280
+ * Used to determine which breakpoints to use on full-width images
6281
+ */
6282
+ const VIEWPORT_BREAKPOINT_CUTOFF = 640;
6091
6283
  /**
6092
6284
  * Used to determine whether two aspect ratios are similar in value.
6093
6285
  */
@@ -6098,6 +6290,19 @@ const ASPECT_RATIO_TOLERANCE = .1;
6098
6290
  * into account a typical device pixel ratio). In pixels.
6099
6291
  */
6100
6292
  const OVERSIZED_IMAGE_TOLERANCE = 1000;
6293
+ /** Info about built-in loaders we can test for. */
6294
+ const BUILT_IN_LOADERS = [imgixLoaderInfo, imageKitLoaderInfo, cloudinaryLoaderInfo];
6295
+ const defaultConfig = {
6296
+ breakpoints: [16, 32, 48, 64, 96, 128, 256, 384, 640, 750, 828, 1080, 1200, 1920, 2048, 3840],
6297
+ };
6298
+ /**
6299
+ * Injection token that configures the image optimized image functionality.
6300
+ *
6301
+ * @see `NgOptimizedImage`
6302
+ * @publicApi
6303
+ * @developerPreview
6304
+ */
6305
+ const IMAGE_CONFIG = new InjectionToken('ImageConfig', { providedIn: 'root', factory: () => defaultConfig });
6101
6306
  /**
6102
6307
  * Directive that improves image loading performance by enforcing best practices.
6103
6308
  *
@@ -6109,6 +6314,7 @@ const OVERSIZED_IMAGE_TOLERANCE = 1000;
6109
6314
  *
6110
6315
  * In addition, the directive:
6111
6316
  * - Generates appropriate asset URLs if a corresponding `ImageLoader` function is provided
6317
+ * - Automatically generates a srcset
6112
6318
  * - Requires that `width` and `height` are set
6113
6319
  * - Warns if `width` or `height` have been set incorrectly
6114
6320
  * - Warns if the image will be visually distorted when rendered
@@ -6194,14 +6400,16 @@ const OVERSIZED_IMAGE_TOLERANCE = 1000;
6194
6400
  * ```
6195
6401
  *
6196
6402
  * @publicApi
6197
- * @developerPreview
6198
6403
  */
6199
6404
  class NgOptimizedImage {
6200
6405
  constructor() {
6201
6406
  this.imageLoader = inject(IMAGE_LOADER);
6407
+ this.config = processConfig(inject(IMAGE_CONFIG));
6202
6408
  this.renderer = inject(Renderer2);
6203
6409
  this.imgElement = inject(ElementRef).nativeElement;
6204
6410
  this.injector = inject(Injector);
6411
+ this.isServer = isPlatformServer(inject(PLATFORM_ID));
6412
+ this.preloadLinkChecker = inject(PreloadLinkCreator);
6205
6413
  // a LCP image observer - should be injected only in the dev mode
6206
6414
  this.lcpObserver = ngDevMode ? this.injector.get(LCPImageObserver) : null;
6207
6415
  /**
@@ -6212,28 +6420,12 @@ class NgOptimizedImage {
6212
6420
  */
6213
6421
  this._renderedSrc = null;
6214
6422
  this._priority = false;
6423
+ this._disableOptimizedSrcset = false;
6424
+ this._fill = false;
6215
6425
  }
6216
6426
  /**
6217
- * Previously, the `rawSrc` attribute was used to activate the directive.
6218
- * The attribute was renamed to `ngSrc` and this input just produces an error,
6219
- * suggesting to switch to `ngSrc` instead.
6220
- *
6221
- * This error should be removed in v15.
6222
- *
6223
- * @nodoc
6224
- * @deprecated Use `ngSrc` instead.
6225
- */
6226
- set rawSrc(value) {
6227
- if (ngDevMode) {
6228
- throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(value, false)} the \`rawSrc\` attribute was used ` +
6229
- `to activate the directive. Newer version of the directive uses the \`ngSrc\` ` +
6230
- `attribute instead. Please replace \`rawSrc\` with \`ngSrc\` and ` +
6231
- `\`rawSrcset\` with \`ngSrcset\` attributes in the template to ` +
6232
- `enable image optimizations.`);
6233
- }
6234
- }
6235
- /**
6236
- * The intrinsic width of the image in pixels.
6427
+ * For responsive images: the intrinsic width of the image in pixels.
6428
+ * For fixed size images: the desired rendered width of the image in pixels.
6237
6429
  */
6238
6430
  set width(value) {
6239
6431
  ngDevMode && assertGreaterThanZero(this, value, 'width');
@@ -6243,7 +6435,9 @@ class NgOptimizedImage {
6243
6435
  return this._width;
6244
6436
  }
6245
6437
  /**
6246
- * The intrinsic height of the image in pixels.
6438
+ * For responsive images: the intrinsic height of the image in pixels.
6439
+ * For fixed size images: the desired rendered height of the image in pixels.* The intrinsic
6440
+ * height of the image in pixels.
6247
6441
  */
6248
6442
  set height(value) {
6249
6443
  ngDevMode && assertGreaterThanZero(this, value, 'height');
@@ -6261,17 +6455,50 @@ class NgOptimizedImage {
6261
6455
  get priority() {
6262
6456
  return this._priority;
6263
6457
  }
6458
+ /**
6459
+ * Disables automatic srcset generation for this image.
6460
+ */
6461
+ set disableOptimizedSrcset(value) {
6462
+ this._disableOptimizedSrcset = inputToBoolean(value);
6463
+ }
6464
+ get disableOptimizedSrcset() {
6465
+ return this._disableOptimizedSrcset;
6466
+ }
6467
+ /**
6468
+ * Sets the image to "fill mode", which eliminates the height/width requirement and adds
6469
+ * styles such that the image fills its containing element.
6470
+ *
6471
+ * @developerPreview
6472
+ */
6473
+ set fill(value) {
6474
+ this._fill = inputToBoolean(value);
6475
+ }
6476
+ get fill() {
6477
+ return this._fill;
6478
+ }
6479
+ /** @nodoc */
6264
6480
  ngOnInit() {
6265
6481
  if (ngDevMode) {
6266
6482
  assertNonEmptyInput(this, 'ngSrc', this.ngSrc);
6267
6483
  assertValidNgSrcset(this, this.ngSrcset);
6268
6484
  assertNoConflictingSrc(this);
6269
- assertNoConflictingSrcset(this);
6485
+ if (this.ngSrcset) {
6486
+ assertNoConflictingSrcset(this);
6487
+ }
6270
6488
  assertNotBase64Image(this);
6271
6489
  assertNotBlobUrl(this);
6272
- assertNonEmptyWidthAndHeight(this);
6490
+ if (this.fill) {
6491
+ assertEmptyWidthAndHeight(this);
6492
+ }
6493
+ else {
6494
+ assertNonEmptyWidthAndHeight(this);
6495
+ }
6273
6496
  assertValidLoadingInput(this);
6274
6497
  assertNoImageDistortion(this, this.imgElement, this.renderer);
6498
+ if (!this.ngSrcset) {
6499
+ assertNoComplexSizes(this);
6500
+ }
6501
+ assertNotMissingBuiltInLoader(this.ngSrc, this.imageLoader);
6275
6502
  if (this.priority) {
6276
6503
  const checker = this.injector.get(PreconnectLinkChecker);
6277
6504
  checker.assertPreconnect(this.getRewrittenSrc(), this.ngSrc);
@@ -6293,17 +6520,39 @@ class NgOptimizedImage {
6293
6520
  setHostAttributes() {
6294
6521
  // Must set width/height explicitly in case they are bound (in which case they will
6295
6522
  // only be reflected and not found by the browser)
6296
- this.setHostAttribute('width', this.width.toString());
6297
- this.setHostAttribute('height', this.height.toString());
6523
+ if (this.fill) {
6524
+ if (!this.sizes) {
6525
+ this.sizes = '100vw';
6526
+ }
6527
+ }
6528
+ else {
6529
+ this.setHostAttribute('width', this.width.toString());
6530
+ this.setHostAttribute('height', this.height.toString());
6531
+ }
6298
6532
  this.setHostAttribute('loading', this.getLoadingBehavior());
6299
6533
  this.setHostAttribute('fetchpriority', this.getFetchPriority());
6300
6534
  // The `src` and `srcset` attributes should be set last since other attributes
6301
6535
  // could affect the image's loading behavior.
6302
- this.setHostAttribute('src', this.getRewrittenSrc());
6536
+ const rewrittenSrc = this.getRewrittenSrc();
6537
+ this.setHostAttribute('src', rewrittenSrc);
6538
+ let rewrittenSrcset = undefined;
6539
+ if (this.sizes) {
6540
+ this.setHostAttribute('sizes', this.sizes);
6541
+ }
6303
6542
  if (this.ngSrcset) {
6304
- this.setHostAttribute('srcset', this.getRewrittenSrcset());
6543
+ rewrittenSrcset = this.getRewrittenSrcset();
6544
+ }
6545
+ else if (!this._disableOptimizedSrcset && !this.srcset && this.imageLoader !== noopImageLoader) {
6546
+ rewrittenSrcset = this.getAutomaticSrcset();
6547
+ }
6548
+ if (rewrittenSrcset) {
6549
+ this.setHostAttribute('srcset', rewrittenSrcset);
6550
+ }
6551
+ if (this.isServer && this.priority) {
6552
+ this.preloadLinkChecker.createPreloadLinkTag(this.renderer, rewrittenSrc, rewrittenSrcset, this.sizes);
6305
6553
  }
6306
6554
  }
6555
+ /** @nodoc */
6307
6556
  ngOnChanges(changes) {
6308
6557
  if (ngDevMode) {
6309
6558
  assertNoPostInitInputChange(this, changes, ['ngSrc', 'ngSrcset', 'width', 'height', 'priority']);
@@ -6338,6 +6587,31 @@ class NgOptimizedImage {
6338
6587
  });
6339
6588
  return finalSrcs.join(', ');
6340
6589
  }
6590
+ getAutomaticSrcset() {
6591
+ if (this.sizes) {
6592
+ return this.getResponsiveSrcset();
6593
+ }
6594
+ else {
6595
+ return this.getFixedSrcset();
6596
+ }
6597
+ }
6598
+ getResponsiveSrcset() {
6599
+ var _a;
6600
+ const { breakpoints } = this.config;
6601
+ let filteredBreakpoints = breakpoints;
6602
+ if (((_a = this.sizes) === null || _a === void 0 ? void 0 : _a.trim()) === '100vw') {
6603
+ // Since this is a full-screen-width image, our srcset only needs to include
6604
+ // breakpoints with full viewport widths.
6605
+ filteredBreakpoints = breakpoints.filter(bp => bp >= VIEWPORT_BREAKPOINT_CUTOFF);
6606
+ }
6607
+ const finalSrcs = filteredBreakpoints.map(bp => `${this.imageLoader({ src: this.ngSrc, width: bp })} ${bp}w`);
6608
+ return finalSrcs.join(', ');
6609
+ }
6610
+ getFixedSrcset() {
6611
+ const finalSrcs = DENSITY_SRCSET_MULTIPLIERS.map(multiplier => `${this.imageLoader({ src: this.ngSrc, width: this.width * multiplier })} ${multiplier}x`);
6612
+ return finalSrcs.join(', ');
6613
+ }
6614
+ /** @nodoc */
6341
6615
  ngOnDestroy() {
6342
6616
  if (ngDevMode) {
6343
6617
  if (!this.priority && this._renderedSrc !== null && this.lcpObserver !== null) {
@@ -6349,20 +6623,26 @@ class NgOptimizedImage {
6349
6623
  this.renderer.setAttribute(this.imgElement, name, value);
6350
6624
  }
6351
6625
  }
6352
- NgOptimizedImage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive });
6353
- 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 });
6354
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgOptimizedImage, decorators: [{
6626
+ NgOptimizedImage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive });
6627
+ 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 });
6628
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.0", ngImport: i0, type: NgOptimizedImage, decorators: [{
6355
6629
  type: Directive,
6356
6630
  args: [{
6357
6631
  standalone: true,
6358
- selector: 'img[ngSrc],img[rawSrc]',
6632
+ selector: 'img[ngSrc]',
6633
+ host: {
6634
+ '[style.position]': 'fill ? "absolute" : null',
6635
+ '[style.width]': 'fill ? "100%" : null',
6636
+ '[style.height]': 'fill ? "100%" : null',
6637
+ '[style.inset]': 'fill ? "0px" : null'
6638
+ }
6359
6639
  }]
6360
- }], propDecorators: { rawSrc: [{
6361
- type: Input
6362
- }], ngSrc: [{
6640
+ }], propDecorators: { ngSrc: [{
6363
6641
  type: Input
6364
6642
  }], ngSrcset: [{
6365
6643
  type: Input
6644
+ }], sizes: [{
6645
+ type: Input
6366
6646
  }], width: [{
6367
6647
  type: Input
6368
6648
  }], height: [{
@@ -6371,6 +6651,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5",
6371
6651
  type: Input
6372
6652
  }], priority: [{
6373
6653
  type: Input
6654
+ }], disableOptimizedSrcset: [{
6655
+ type: Input
6656
+ }], fill: [{
6657
+ type: Input
6374
6658
  }], src: [{
6375
6659
  type: Input
6376
6660
  }], srcset: [{
@@ -6389,6 +6673,16 @@ function inputToInteger(value) {
6389
6673
  function inputToBoolean(value) {
6390
6674
  return value != null && `${value}` !== 'false';
6391
6675
  }
6676
+ /**
6677
+ * Sorts provided config breakpoints and uses defaults.
6678
+ */
6679
+ function processConfig(config) {
6680
+ let sortedBreakpoints = {};
6681
+ if (config.breakpoints) {
6682
+ sortedBreakpoints.breakpoints = config.breakpoints.sort((a, b) => a - b);
6683
+ }
6684
+ return Object.assign({}, defaultConfig, config, sortedBreakpoints);
6685
+ }
6392
6686
  /***** Assert functions *****/
6393
6687
  /**
6394
6688
  * Verifies that there is no `src` set on a host element.
@@ -6427,6 +6721,18 @@ function assertNotBase64Image(dir) {
6427
6721
  `by removing \`ngSrc\` and using a standard \`src\` attribute instead.`);
6428
6722
  }
6429
6723
  }
6724
+ /**
6725
+ * Verifies that the 'sizes' only includes responsive values.
6726
+ */
6727
+ function assertNoComplexSizes(dir) {
6728
+ let sizes = dir.sizes;
6729
+ if (sizes === null || sizes === void 0 ? void 0 : sizes.match(/((\)|,)\s|^)\d+px/)) {
6730
+ throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \`sizes\` was set to a string including ` +
6731
+ `pixel values. For automatic \`srcset\` generation, \`sizes\` must only include responsive ` +
6732
+ `values, such as \`sizes="50vw"\` or \`sizes="(min-width: 768px) 50vw, 100vw"\`. ` +
6733
+ `To fix this, modify the \`sizes\` attribute, or provide your own \`ngSrcset\` value directly.`);
6734
+ }
6735
+ }
6430
6736
  /**
6431
6737
  * Verifies that the `ngSrc` is not a Blob URL.
6432
6738
  */
@@ -6603,7 +6909,19 @@ function assertNonEmptyWidthAndHeight(dir) {
6603
6909
  throw new ɵRuntimeError(2954 /* RuntimeErrorCode.REQUIRED_INPUT_MISSING */, `${imgDirectiveDetails(dir.ngSrc)} these required attributes ` +
6604
6910
  `are missing: ${missingAttributes.map(attr => `"${attr}"`).join(', ')}. ` +
6605
6911
  `Including "width" and "height" attributes will prevent image-related layout shifts. ` +
6606
- `To fix this, include "width" and "height" attributes on the image tag.`);
6912
+ `To fix this, include "width" and "height" attributes on the image tag or turn on ` +
6913
+ `"fill" mode with the \`fill\` attribute.`);
6914
+ }
6915
+ }
6916
+ /**
6917
+ * Verifies that width and height are not set. Used in fill mode, where those attributes don't make
6918
+ * sense.
6919
+ */
6920
+ function assertEmptyWidthAndHeight(dir) {
6921
+ if (dir.width || dir.height) {
6922
+ throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the attributes \`height\` and/or \`width\` are present ` +
6923
+ `along with the \`fill\` attribute. Because \`fill\` mode causes an image to fill its containing ` +
6924
+ `element, the size attributes have no effect and should be removed.`);
6607
6925
  }
6608
6926
  }
6609
6927
  /**
@@ -6625,6 +6943,35 @@ function assertValidLoadingInput(dir) {
6625
6943
  `To fix this, provide a valid value ("lazy", "eager", or "auto").`);
6626
6944
  }
6627
6945
  }
6946
+ /**
6947
+ * Warns if NOT using a loader (falling back to the generic loader) and
6948
+ * the image appears to be hosted on one of the image CDNs for which
6949
+ * we do have a built-in image loader. Suggests switching to the
6950
+ * built-in loader.
6951
+ *
6952
+ * @param ngSrc Value of the ngSrc attribute
6953
+ * @param imageLoader ImageLoader provided
6954
+ */
6955
+ function assertNotMissingBuiltInLoader(ngSrc, imageLoader) {
6956
+ if (imageLoader === noopImageLoader) {
6957
+ let builtInLoaderName = '';
6958
+ for (const loader of BUILT_IN_LOADERS) {
6959
+ if (loader.testUrl(ngSrc)) {
6960
+ builtInLoaderName = loader.name;
6961
+ break;
6962
+ }
6963
+ }
6964
+ if (builtInLoaderName) {
6965
+ console.warn(ɵformatRuntimeError(2962 /* RuntimeErrorCode.MISSING_BUILTIN_LOADER */, `NgOptimizedImage: It looks like your images may be hosted on the ` +
6966
+ `${builtInLoaderName} CDN, but your app is not using Angular's ` +
6967
+ `built-in loader for that CDN. We recommend switching to use ` +
6968
+ `the built-in by calling \`provide${builtInLoaderName}Loader()\` ` +
6969
+ `in your \`providers\` and passing it your instance's base URL. ` +
6970
+ `If you don't want to use the built-in loader, define a custom ` +
6971
+ `loader function using IMAGE_LOADER to silence this warning.`));
6972
+ }
6973
+ }
6974
+ }
6628
6975
 
6629
6976
  /**
6630
6977
  * @license
@@ -6663,5 +7010,5 @@ function assertValidLoadingInput(dir) {
6663
7010
  * Generated bundle index. Do not edit.
6664
7011
  */
6665
7012
 
6666
- 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 };
7013
+ 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 };
6667
7014
  //# sourceMappingURL=common.mjs.map