@angular/common 15.0.0-next.0 → 15.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/http/src/client.mjs +4 -4
- package/esm2020/http/src/interceptor.mjs +3 -3
- package/esm2020/http/src/jsonp.mjs +6 -6
- package/esm2020/http/src/module.mjs +15 -15
- package/esm2020/http/src/xhr.mjs +3 -3
- package/esm2020/http/src/xsrf.mjs +6 -6
- package/esm2020/http/testing/src/backend.mjs +3 -3
- package/esm2020/http/testing/src/module.mjs +4 -4
- package/esm2020/src/common.mjs +2 -2
- package/esm2020/src/common_module.mjs +4 -4
- package/esm2020/src/directives/index.mjs +3 -3
- package/esm2020/src/directives/ng_class.mjs +3 -3
- package/esm2020/src/directives/ng_component_outlet.mjs +3 -3
- package/esm2020/src/directives/ng_for_of.mjs +8 -4
- package/esm2020/src/directives/ng_if.mjs +3 -3
- package/esm2020/src/directives/ng_optimized_image/error_helper.mjs +4 -4
- package/esm2020/src/directives/ng_optimized_image/image_loaders/image_loader.mjs +4 -4
- package/esm2020/src/directives/ng_optimized_image/lcp_image_observer.mjs +11 -11
- package/esm2020/src/directives/ng_optimized_image/ng_optimized_image.mjs +88 -67
- package/esm2020/src/directives/ng_optimized_image/preconnect_link_checker.mjs +11 -10
- package/esm2020/src/directives/ng_plural.mjs +6 -6
- package/esm2020/src/directives/ng_style.mjs +3 -3
- package/esm2020/src/directives/ng_switch.mjs +9 -9
- package/esm2020/src/directives/ng_template_outlet.mjs +3 -3
- package/esm2020/src/i18n/localization.mjs +6 -6
- package/esm2020/src/location/hash_location_strategy.mjs +3 -3
- package/esm2020/src/location/location.mjs +3 -3
- package/esm2020/src/location/location_strategy.mjs +6 -6
- package/esm2020/src/location/platform_location.mjs +6 -6
- package/esm2020/src/pipes/async_pipe.mjs +3 -3
- package/esm2020/src/pipes/case_conversion_pipes.mjs +9 -9
- package/esm2020/src/pipes/date_pipe.mjs +3 -3
- package/esm2020/src/pipes/i18n_plural_pipe.mjs +3 -3
- package/esm2020/src/pipes/i18n_select_pipe.mjs +3 -3
- package/esm2020/src/pipes/json_pipe.mjs +3 -3
- package/esm2020/src/pipes/keyvalue_pipe.mjs +3 -3
- package/esm2020/src/pipes/number_pipe.mjs +9 -9
- package/esm2020/src/pipes/slice_pipe.mjs +3 -3
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/location_mock.mjs +3 -3
- package/esm2020/testing/src/mock_location_strategy.mjs +3 -3
- package/esm2020/testing/src/mock_platform_location.mjs +5 -5
- package/esm2020/upgrade/src/location_upgrade_module.mjs +4 -4
- package/fesm2015/common.mjs +216 -194
- package/fesm2015/common.mjs.map +1 -1
- package/fesm2015/http/testing.mjs +8 -8
- package/fesm2015/http.mjs +37 -37
- package/fesm2015/http.mjs.map +1 -1
- package/fesm2015/testing.mjs +11 -11
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2015/upgrade.mjs +5 -5
- package/fesm2020/common.mjs +216 -194
- package/fesm2020/common.mjs.map +1 -1
- package/fesm2020/http/testing.mjs +8 -8
- package/fesm2020/http.mjs +37 -37
- package/fesm2020/http.mjs.map +1 -1
- package/fesm2020/testing.mjs +11 -11
- package/fesm2020/testing.mjs.map +1 -1
- package/fesm2020/upgrade.mjs +5 -5
- package/http/index.d.ts +72 -69
- package/http/testing/index.d.ts +1 -1
- package/index.d.ts +27 -13
- package/package.json +2 -2
- package/testing/index.d.ts +1 -1
- package/upgrade/index.d.ts +1 -1
package/fesm2020/common.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.0.0-next.
|
|
2
|
+
* @license Angular v15.0.0-next.2
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -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.
|
|
91
|
-
PlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
90
|
+
PlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: PlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
91
|
+
PlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: PlatformLocation, providedIn: 'platform', useFactory: useBrowserPlatformLocation });
|
|
92
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.
|
|
194
|
-
BrowserPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
195
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
193
|
+
BrowserPlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.2", ngImport: i0, type: BrowserPlatformLocation, providedIn: 'platform', useFactory: createBrowserPlatformLocation });
|
|
195
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.
|
|
315
|
-
LocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
316
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
314
|
+
LocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
315
|
+
LocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: () => inject(PathLocationStrategy) });
|
|
316
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.
|
|
425
|
-
PathLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
426
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
424
|
+
PathLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.2", ngImport: i0, type: PathLocationStrategy, providedIn: 'root' });
|
|
426
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.
|
|
523
|
-
HashLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
524
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
522
|
+
HashLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.2", ngImport: i0, type: HashLocationStrategy });
|
|
524
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.
|
|
776
|
-
Location.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
777
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
775
|
+
Location.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.2", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation });
|
|
777
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.
|
|
2594
|
-
NgLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
2595
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
2593
|
+
NgLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2594
|
+
NgLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.2", 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.
|
|
2651
|
-
NgLocaleLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
2652
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
2650
|
+
NgLocaleLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.2", ngImport: i0, type: NgLocaleLocalization });
|
|
2652
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.
|
|
2846
|
-
NgClass.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
2847
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
2845
|
+
NgClass.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.2", 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.2", 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.
|
|
2967
|
-
NgComponentOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
2968
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
2966
|
+
NgComponentOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.2", 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.2", 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.
|
|
3259
|
-
NgForOf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
3260
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
3258
|
+
NgForOf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.2", 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.2", 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.
|
|
3494
|
-
NgIf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
3495
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
3493
|
+
NgIf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.2", 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.2", 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.
|
|
3667
|
-
NgSwitch.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
3668
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
3666
|
+
NgSwitch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3667
|
+
NgSwitch.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.2", type: NgSwitch, isStandalone: true, selector: "[ngSwitch]", inputs: { ngSwitch: "ngSwitch" }, ngImport: i0 });
|
|
3668
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.
|
|
3728
|
-
NgSwitchCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
3729
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
3727
|
+
NgSwitchCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: NgSwitchCase, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3728
|
+
NgSwitchCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.2", type: NgSwitchCase, isStandalone: true, selector: "[ngSwitchCase]", inputs: { ngSwitchCase: "ngSwitchCase" }, ngImport: i0 });
|
|
3729
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.
|
|
3765
|
-
NgSwitchDefault.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
3766
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
3764
|
+
NgSwitchDefault.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: NgSwitchDefault, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3765
|
+
NgSwitchDefault.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.2", type: NgSwitchDefault, isStandalone: true, selector: "[ngSwitchDefault]", ngImport: i0 });
|
|
3766
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.
|
|
3851
|
-
NgPlural.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
3852
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
3850
|
+
NgPlural.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.2", type: NgPlural, isStandalone: true, selector: "[ngPlural]", inputs: { ngPlural: "ngPlural" }, ngImport: i0 });
|
|
3852
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.
|
|
3889
|
-
NgPluralCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
3890
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
3888
|
+
NgPluralCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: NgPluralCase, deps: [{ token: 'ngPluralCase', attribute: true }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: NgPlural, host: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3889
|
+
NgPluralCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.2", type: NgPluralCase, isStandalone: true, selector: "[ngPluralCase]", ngImport: i0 });
|
|
3890
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.
|
|
3985
|
-
NgStyle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
3986
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
3984
|
+
NgStyle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.2", type: NgStyle, isStandalone: true, selector: "[ngStyle]", inputs: { ngStyle: "ngStyle" }, ngImport: i0 });
|
|
3986
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.
|
|
4067
|
-
NgTemplateOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
4068
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
4066
|
+
NgTemplateOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.2", 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.2", 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.
|
|
4241
|
-
AsyncPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
4242
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
4240
|
+
AsyncPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.2", ngImport: i0, type: AsyncPipe, isStandalone: true, name: "async", pure: false });
|
|
4242
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.
|
|
4284
|
-
LowerCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
4285
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
4283
|
+
LowerCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4284
|
+
LowerCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.2", ngImport: i0, type: LowerCasePipe, isStandalone: true, name: "lowercase" });
|
|
4285
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.
|
|
4329
|
-
TitleCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
4330
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
4328
|
+
TitleCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4329
|
+
TitleCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.2", ngImport: i0, type: TitleCasePipe, isStandalone: true, name: "titlecase" });
|
|
4330
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.
|
|
4356
|
-
UpperCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
4357
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
4355
|
+
UpperCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4356
|
+
UpperCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.2", ngImport: i0, type: UpperCasePipe, isStandalone: true, name: "uppercase" });
|
|
4357
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: UpperCasePipe, decorators: [{
|
|
4358
4358
|
type: Pipe,
|
|
4359
4359
|
args: [{
|
|
4360
4360
|
name: 'uppercase',
|
|
@@ -4549,9 +4549,9 @@ class DatePipe {
|
|
|
4549
4549
|
}
|
|
4550
4550
|
}
|
|
4551
4551
|
}
|
|
4552
|
-
DatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
4553
|
-
DatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
4554
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
4552
|
+
DatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.2", ngImport: i0, type: DatePipe, isStandalone: true, name: "date" });
|
|
4554
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: DatePipe, decorators: [{
|
|
4555
4555
|
type: Pipe,
|
|
4556
4556
|
args: [{
|
|
4557
4557
|
name: 'date',
|
|
@@ -4611,9 +4611,9 @@ class I18nPluralPipe {
|
|
|
4611
4611
|
return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());
|
|
4612
4612
|
}
|
|
4613
4613
|
}
|
|
4614
|
-
I18nPluralPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
4615
|
-
I18nPluralPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
4616
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
4614
|
+
I18nPluralPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.2", ngImport: i0, type: I18nPluralPipe, isStandalone: true, name: "i18nPlural" });
|
|
4616
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: I18nPluralPipe, decorators: [{
|
|
4617
4617
|
type: Pipe,
|
|
4618
4618
|
args: [{
|
|
4619
4619
|
name: 'i18nPlural',
|
|
@@ -4667,9 +4667,9 @@ class I18nSelectPipe {
|
|
|
4667
4667
|
return '';
|
|
4668
4668
|
}
|
|
4669
4669
|
}
|
|
4670
|
-
I18nSelectPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
4671
|
-
I18nSelectPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
4672
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
4670
|
+
I18nSelectPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4671
|
+
I18nSelectPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.2", ngImport: i0, type: I18nSelectPipe, isStandalone: true, name: "i18nSelect" });
|
|
4672
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: I18nSelectPipe, decorators: [{
|
|
4673
4673
|
type: Pipe,
|
|
4674
4674
|
args: [{
|
|
4675
4675
|
name: 'i18nSelect',
|
|
@@ -4708,9 +4708,9 @@ class JsonPipe {
|
|
|
4708
4708
|
return JSON.stringify(value, null, 2);
|
|
4709
4709
|
}
|
|
4710
4710
|
}
|
|
4711
|
-
JsonPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
4712
|
-
JsonPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
4713
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
4711
|
+
JsonPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
4712
|
+
JsonPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.2", ngImport: i0, type: JsonPipe, isStandalone: true, name: "json", pure: false });
|
|
4713
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: JsonPipe, decorators: [{
|
|
4714
4714
|
type: Pipe,
|
|
4715
4715
|
args: [{
|
|
4716
4716
|
name: 'json',
|
|
@@ -4778,9 +4778,9 @@ class KeyValuePipe {
|
|
|
4778
4778
|
return this.keyValues;
|
|
4779
4779
|
}
|
|
4780
4780
|
}
|
|
4781
|
-
KeyValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
4782
|
-
KeyValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
4783
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
4781
|
+
KeyValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.2", ngImport: i0, type: KeyValuePipe, isStandalone: true, name: "keyvalue", pure: false });
|
|
4783
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: KeyValuePipe, decorators: [{
|
|
4784
4784
|
type: Pipe,
|
|
4785
4785
|
args: [{
|
|
4786
4786
|
name: 'keyvalue',
|
|
@@ -4913,9 +4913,9 @@ class DecimalPipe {
|
|
|
4913
4913
|
}
|
|
4914
4914
|
}
|
|
4915
4915
|
}
|
|
4916
|
-
DecimalPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
4917
|
-
DecimalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
4918
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
4916
|
+
DecimalPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.2", ngImport: i0, type: DecimalPipe, isStandalone: true, name: "number" });
|
|
4918
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: DecimalPipe, decorators: [{
|
|
4919
4919
|
type: Pipe,
|
|
4920
4920
|
args: [{
|
|
4921
4921
|
name: 'number',
|
|
@@ -4978,9 +4978,9 @@ class PercentPipe {
|
|
|
4978
4978
|
}
|
|
4979
4979
|
}
|
|
4980
4980
|
}
|
|
4981
|
-
PercentPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
4982
|
-
PercentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
4983
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
4981
|
+
PercentPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.2", ngImport: i0, type: PercentPipe, isStandalone: true, name: "percent" });
|
|
4983
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: PercentPipe, decorators: [{
|
|
4984
4984
|
type: Pipe,
|
|
4985
4985
|
args: [{
|
|
4986
4986
|
name: 'percent',
|
|
@@ -5096,9 +5096,9 @@ class CurrencyPipe {
|
|
|
5096
5096
|
}
|
|
5097
5097
|
}
|
|
5098
5098
|
}
|
|
5099
|
-
CurrencyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
5100
|
-
CurrencyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
5101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
5099
|
+
CurrencyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", 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.2", ngImport: i0, type: CurrencyPipe, isStandalone: true, name: "currency" });
|
|
5101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: CurrencyPipe, decorators: [{
|
|
5102
5102
|
type: Pipe,
|
|
5103
5103
|
args: [{
|
|
5104
5104
|
name: 'currency',
|
|
@@ -5183,9 +5183,9 @@ class SlicePipe {
|
|
|
5183
5183
|
return typeof obj === 'string' || Array.isArray(obj);
|
|
5184
5184
|
}
|
|
5185
5185
|
}
|
|
5186
|
-
SlicePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
5187
|
-
SlicePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
5188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
5186
|
+
SlicePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
5187
|
+
SlicePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.0-next.2", ngImport: i0, type: SlicePipe, isStandalone: true, name: "slice", pure: false });
|
|
5188
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: SlicePipe, decorators: [{
|
|
5189
5189
|
type: Pipe,
|
|
5190
5190
|
args: [{
|
|
5191
5191
|
name: 'slice',
|
|
@@ -5239,10 +5239,10 @@ const COMMON_PIPES = [
|
|
|
5239
5239
|
*/
|
|
5240
5240
|
class CommonModule {
|
|
5241
5241
|
}
|
|
5242
|
-
CommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
5243
|
-
CommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
5244
|
-
CommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
5245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
5242
|
+
CommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5243
|
+
CommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-next.2", ngImport: i0, type: CommonModule, imports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe], exports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe] });
|
|
5244
|
+
CommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: CommonModule });
|
|
5245
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: CommonModule, decorators: [{
|
|
5246
5246
|
type: NgModule,
|
|
5247
5247
|
args: [{
|
|
5248
5248
|
imports: [COMMON_DIRECTIVES, COMMON_PIPES],
|
|
@@ -5300,7 +5300,7 @@ function isPlatformWorkerUi(platformId) {
|
|
|
5300
5300
|
/**
|
|
5301
5301
|
* @publicApi
|
|
5302
5302
|
*/
|
|
5303
|
-
const VERSION = new Version('15.0.0-next.
|
|
5303
|
+
const VERSION = new Version('15.0.0-next.2');
|
|
5304
5304
|
|
|
5305
5305
|
/**
|
|
5306
5306
|
* @license
|
|
@@ -5552,9 +5552,9 @@ function assertDevMode(checkName) {
|
|
|
5552
5552
|
* found in the LICENSE file at https://angular.io/license
|
|
5553
5553
|
*/
|
|
5554
5554
|
// Assembles directive details string, useful for error messages.
|
|
5555
|
-
function imgDirectiveDetails(
|
|
5556
|
-
const
|
|
5557
|
-
return `The NgOptimizedImage directive ${
|
|
5555
|
+
function imgDirectiveDetails(ngSrc, includeNgSrc = true) {
|
|
5556
|
+
const ngSrcInfo = includeNgSrc ? `(activated on an <img> element with the \`ngSrc="${ngSrc}"\`) ` : '';
|
|
5557
|
+
return `The NgOptimizedImage directive ${ngSrcInfo}has detected that`;
|
|
5558
5558
|
}
|
|
5559
5559
|
|
|
5560
5560
|
/**
|
|
@@ -5637,6 +5637,7 @@ const PRECONNECT_CHECK_BLOCKLIST = new InjectionToken('PRECONNECT_CHECK_BLOCKLIS
|
|
|
5637
5637
|
*/
|
|
5638
5638
|
class PreconnectLinkChecker {
|
|
5639
5639
|
constructor() {
|
|
5640
|
+
this.document = inject(DOCUMENT);
|
|
5640
5641
|
/**
|
|
5641
5642
|
* Set of <link rel="preconnect"> tags found on this page.
|
|
5642
5643
|
* The `null` value indicates that there was no DOM query operation performed.
|
|
@@ -5649,7 +5650,7 @@ class PreconnectLinkChecker {
|
|
|
5649
5650
|
this.window = null;
|
|
5650
5651
|
this.blocklist = new Set(INTERNAL_PRECONNECT_CHECK_BLOCKLIST);
|
|
5651
5652
|
assertDevMode('preconnect link checker');
|
|
5652
|
-
const win =
|
|
5653
|
+
const win = this.document.defaultView;
|
|
5653
5654
|
if (typeof win !== 'undefined') {
|
|
5654
5655
|
this.window = win;
|
|
5655
5656
|
}
|
|
@@ -5674,9 +5675,9 @@ class PreconnectLinkChecker {
|
|
|
5674
5675
|
* given src.
|
|
5675
5676
|
*
|
|
5676
5677
|
* @param rewrittenSrc src formatted with loader
|
|
5677
|
-
* @param
|
|
5678
|
+
* @param originalNgSrc ngSrc value
|
|
5678
5679
|
*/
|
|
5679
|
-
assertPreconnect(rewrittenSrc,
|
|
5680
|
+
assertPreconnect(rewrittenSrc, originalNgSrc) {
|
|
5680
5681
|
if (!this.window)
|
|
5681
5682
|
return;
|
|
5682
5683
|
const imgUrl = getUrl(rewrittenSrc, this.window);
|
|
@@ -5692,8 +5693,8 @@ class PreconnectLinkChecker {
|
|
|
5692
5693
|
this.preconnectLinks = this.queryPreconnectLinks();
|
|
5693
5694
|
}
|
|
5694
5695
|
if (!this.preconnectLinks.has(imgUrl.origin)) {
|
|
5695
|
-
console.warn(ɵformatRuntimeError(2956 /* RuntimeErrorCode.PRIORITY_IMG_MISSING_PRECONNECT_TAG */, `${imgDirectiveDetails(
|
|
5696
|
-
`Preconnecting to the origin(s) that serve priority images ensures that these ` +
|
|
5696
|
+
console.warn(ɵformatRuntimeError(2956 /* RuntimeErrorCode.PRIORITY_IMG_MISSING_PRECONNECT_TAG */, `${imgDirectiveDetails(originalNgSrc)} there is no preconnect tag present for this ` +
|
|
5697
|
+
`image. Preconnecting to the origin(s) that serve priority images ensures that these ` +
|
|
5697
5698
|
`images are delivered as soon as possible. To fix this, please add the following ` +
|
|
5698
5699
|
`element into the <head> of the document:\n` +
|
|
5699
5700
|
` <link rel="preconnect" href="${imgUrl.origin}">`));
|
|
@@ -5702,7 +5703,7 @@ class PreconnectLinkChecker {
|
|
|
5702
5703
|
queryPreconnectLinks() {
|
|
5703
5704
|
const preconnectUrls = new Set();
|
|
5704
5705
|
const selector = 'link[rel=preconnect]';
|
|
5705
|
-
const links = Array.from(document.querySelectorAll(selector));
|
|
5706
|
+
const links = Array.from(this.document.querySelectorAll(selector));
|
|
5706
5707
|
for (let link of links) {
|
|
5707
5708
|
const url = getUrl(link.href, this.window);
|
|
5708
5709
|
preconnectUrls.add(url.origin);
|
|
@@ -5714,9 +5715,9 @@ class PreconnectLinkChecker {
|
|
|
5714
5715
|
this.alreadySeen.clear();
|
|
5715
5716
|
}
|
|
5716
5717
|
}
|
|
5717
|
-
PreconnectLinkChecker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
5718
|
-
PreconnectLinkChecker.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
5719
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
5718
|
+
PreconnectLinkChecker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5719
|
+
PreconnectLinkChecker.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' });
|
|
5720
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: PreconnectLinkChecker, decorators: [{
|
|
5720
5721
|
type: Injectable,
|
|
5721
5722
|
args: [{ providedIn: 'root' }]
|
|
5722
5723
|
}], ctorParameters: function () { return []; } });
|
|
@@ -5799,10 +5800,10 @@ function throwInvalidPathError(path, exampleUrls) {
|
|
|
5799
5800
|
}
|
|
5800
5801
|
function throwUnexpectedAbsoluteUrlError(path, url) {
|
|
5801
5802
|
throw new ɵRuntimeError(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, ngDevMode &&
|
|
5802
|
-
`Image loader has detected a \`<img>\` tag with an invalid \`
|
|
5803
|
-
`This image loader expects \`
|
|
5803
|
+
`Image loader has detected a \`<img>\` tag with an invalid \`ngSrc\` attribute: ${url}. ` +
|
|
5804
|
+
`This image loader expects \`ngSrc\` to be a relative URL - ` +
|
|
5804
5805
|
`however the provided value is an absolute URL. ` +
|
|
5805
|
-
`To fix this, provide \`
|
|
5806
|
+
`To fix this, provide \`ngSrc\` as a path relative to the base URL ` +
|
|
5806
5807
|
`configured for this loader (\`${path}\`).`);
|
|
5807
5808
|
}
|
|
5808
5809
|
|
|
@@ -5967,7 +5968,7 @@ function createImgixUrl(path, config) {
|
|
|
5967
5968
|
*/
|
|
5968
5969
|
class LCPImageObserver {
|
|
5969
5970
|
constructor() {
|
|
5970
|
-
// Map of full image URLs -> original `
|
|
5971
|
+
// Map of full image URLs -> original `ngSrc` values.
|
|
5971
5972
|
this.images = new Map();
|
|
5972
5973
|
// Keep track of images for which `console.warn` was produced.
|
|
5973
5974
|
this.alreadyWarned = new Set();
|
|
@@ -6000,8 +6001,8 @@ class LCPImageObserver {
|
|
|
6000
6001
|
// Exclude `data:` and `blob:` URLs, since they are not supported by the directive.
|
|
6001
6002
|
if (imgSrc.startsWith('data:') || imgSrc.startsWith('blob:'))
|
|
6002
6003
|
return;
|
|
6003
|
-
const
|
|
6004
|
-
if (
|
|
6004
|
+
const imgNgSrc = this.images.get(imgSrc);
|
|
6005
|
+
if (imgNgSrc && !this.alreadyWarned.has(imgSrc)) {
|
|
6005
6006
|
this.alreadyWarned.add(imgSrc);
|
|
6006
6007
|
logMissingPriorityWarning(imgSrc);
|
|
6007
6008
|
}
|
|
@@ -6009,10 +6010,10 @@ class LCPImageObserver {
|
|
|
6009
6010
|
observer.observe({ type: 'largest-contentful-paint', buffered: true });
|
|
6010
6011
|
return observer;
|
|
6011
6012
|
}
|
|
6012
|
-
registerImage(rewrittenSrc,
|
|
6013
|
+
registerImage(rewrittenSrc, originalNgSrc) {
|
|
6013
6014
|
if (!this.observer)
|
|
6014
6015
|
return;
|
|
6015
|
-
this.images.set(getUrl(rewrittenSrc, this.window).href,
|
|
6016
|
+
this.images.set(getUrl(rewrittenSrc, this.window).href, originalNgSrc);
|
|
6016
6017
|
}
|
|
6017
6018
|
unregisterImage(rewrittenSrc) {
|
|
6018
6019
|
if (!this.observer)
|
|
@@ -6027,14 +6028,14 @@ class LCPImageObserver {
|
|
|
6027
6028
|
this.alreadyWarned.clear();
|
|
6028
6029
|
}
|
|
6029
6030
|
}
|
|
6030
|
-
LCPImageObserver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
6031
|
-
LCPImageObserver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
6032
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
6031
|
+
LCPImageObserver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6032
|
+
LCPImageObserver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: LCPImageObserver, providedIn: 'root' });
|
|
6033
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: LCPImageObserver, decorators: [{
|
|
6033
6034
|
type: Injectable,
|
|
6034
6035
|
args: [{ providedIn: 'root' }]
|
|
6035
6036
|
}], ctorParameters: function () { return []; } });
|
|
6036
|
-
function logMissingPriorityWarning(
|
|
6037
|
-
const directiveDetails = imgDirectiveDetails(
|
|
6037
|
+
function logMissingPriorityWarning(ngSrc) {
|
|
6038
|
+
const directiveDetails = imgDirectiveDetails(ngSrc);
|
|
6038
6039
|
console.warn(ɵformatRuntimeError(2955 /* RuntimeErrorCode.LCP_IMG_MISSING_PRIORITY */, `${directiveDetails} this image is the Largest Contentful Paint (LCP) ` +
|
|
6039
6040
|
`element but was not marked "priority". This image should be marked ` +
|
|
6040
6041
|
`"priority" in order to prioritize its loading. ` +
|
|
@@ -6109,8 +6110,8 @@ const OVERSIZED_IMAGE_TOLERANCE = 1000;
|
|
|
6109
6110
|
* Follow the steps below to enable and use the directive:
|
|
6110
6111
|
* 1. Import it into the necessary NgModule or a standalone Component.
|
|
6111
6112
|
* 2. Optionally provide an `ImageLoader` if you use an image hosting service.
|
|
6112
|
-
* 3. Update the necessary `<img>` tags in templates and replace `src` attributes with `
|
|
6113
|
-
* Using a `
|
|
6113
|
+
* 3. Update the necessary `<img>` tags in templates and replace `src` attributes with `ngSrc`.
|
|
6114
|
+
* Using a `ngSrc` allows the directive to control when the `src` gets set, which triggers an image
|
|
6114
6115
|
* download.
|
|
6115
6116
|
*
|
|
6116
6117
|
* Step 1: import the `NgOptimizedImage` directive.
|
|
@@ -6136,7 +6137,7 @@ const OVERSIZED_IMAGE_TOLERANCE = 1000;
|
|
|
6136
6137
|
*
|
|
6137
6138
|
* To use the **default loader**: no additional code changes are necessary. The URL returned by the
|
|
6138
6139
|
* generic loader will always match the value of "src". In other words, this loader applies no
|
|
6139
|
-
* transformations to the resource URL and the value of the `
|
|
6140
|
+
* transformations to the resource URL and the value of the `ngSrc` attribute will be used as is.
|
|
6140
6141
|
*
|
|
6141
6142
|
* To use an existing loader for a **third-party image service**: add the provider factory for your
|
|
6142
6143
|
* chosen service to the `providers` array. In the example below, the Imgix loader is used:
|
|
@@ -6176,10 +6177,10 @@ const OVERSIZED_IMAGE_TOLERANCE = 1000;
|
|
|
6176
6177
|
* ],
|
|
6177
6178
|
* ```
|
|
6178
6179
|
*
|
|
6179
|
-
* Step 3: update `<img>` tags in templates to use `
|
|
6180
|
+
* Step 3: update `<img>` tags in templates to use `ngSrc` instead of `src`.
|
|
6180
6181
|
*
|
|
6181
6182
|
* ```
|
|
6182
|
-
* <img
|
|
6183
|
+
* <img ngSrc="logo.png" width="200" height="100">
|
|
6183
6184
|
* ```
|
|
6184
6185
|
*
|
|
6185
6186
|
* @publicApi
|
|
@@ -6202,6 +6203,25 @@ class NgOptimizedImage {
|
|
|
6202
6203
|
this._renderedSrc = null;
|
|
6203
6204
|
this._priority = false;
|
|
6204
6205
|
}
|
|
6206
|
+
/**
|
|
6207
|
+
* Previously, the `rawSrc` attribute was used to activate the directive.
|
|
6208
|
+
* The attribute was renamed to `ngSrc` and this input just produces an error,
|
|
6209
|
+
* suggesting to switch to `ngSrc` instead.
|
|
6210
|
+
*
|
|
6211
|
+
* This error should be removed in v15.
|
|
6212
|
+
*
|
|
6213
|
+
* @nodoc
|
|
6214
|
+
* @deprecated Use `ngSrc` instead.
|
|
6215
|
+
*/
|
|
6216
|
+
set rawSrc(value) {
|
|
6217
|
+
if (ngDevMode) {
|
|
6218
|
+
throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(value, false)} the \`rawSrc\` attribute was used ` +
|
|
6219
|
+
`to activate the directive. Newer version of the directive uses the \`ngSrc\` ` +
|
|
6220
|
+
`attribute instead. Please replace \`rawSrc\` with \`ngSrc\` and ` +
|
|
6221
|
+
`\`rawSrcset\` with \`ngSrcset\` attributes in the template to ` +
|
|
6222
|
+
`enable image optimizations.`);
|
|
6223
|
+
}
|
|
6224
|
+
}
|
|
6205
6225
|
/**
|
|
6206
6226
|
* The intrinsic width of the image in pixels.
|
|
6207
6227
|
*/
|
|
@@ -6233,8 +6253,8 @@ class NgOptimizedImage {
|
|
|
6233
6253
|
}
|
|
6234
6254
|
ngOnInit() {
|
|
6235
6255
|
if (ngDevMode) {
|
|
6236
|
-
assertNonEmptyInput(this, '
|
|
6237
|
-
|
|
6256
|
+
assertNonEmptyInput(this, 'ngSrc', this.ngSrc);
|
|
6257
|
+
assertValidNgSrcset(this, this.ngSrcset);
|
|
6238
6258
|
assertNoConflictingSrc(this);
|
|
6239
6259
|
assertNoConflictingSrcset(this);
|
|
6240
6260
|
assertNotBase64Image(this);
|
|
@@ -6244,7 +6264,7 @@ class NgOptimizedImage {
|
|
|
6244
6264
|
assertNoImageDistortion(this, this.imgElement, this.renderer);
|
|
6245
6265
|
if (this.priority) {
|
|
6246
6266
|
const checker = this.injector.get(PreconnectLinkChecker);
|
|
6247
|
-
checker.assertPreconnect(this.getRewrittenSrc(), this.
|
|
6267
|
+
checker.assertPreconnect(this.getRewrittenSrc(), this.ngSrc);
|
|
6248
6268
|
}
|
|
6249
6269
|
else {
|
|
6250
6270
|
// Monitor whether an image is an LCP element only in case
|
|
@@ -6253,7 +6273,7 @@ class NgOptimizedImage {
|
|
|
6253
6273
|
if (this.lcpObserver !== null) {
|
|
6254
6274
|
const ngZone = this.injector.get(NgZone);
|
|
6255
6275
|
ngZone.runOutsideAngular(() => {
|
|
6256
|
-
this.lcpObserver.registerImage(this.getRewrittenSrc(), this.
|
|
6276
|
+
this.lcpObserver.registerImage(this.getRewrittenSrc(), this.ngSrc);
|
|
6257
6277
|
});
|
|
6258
6278
|
}
|
|
6259
6279
|
}
|
|
@@ -6270,13 +6290,13 @@ class NgOptimizedImage {
|
|
|
6270
6290
|
// The `src` and `srcset` attributes should be set last since other attributes
|
|
6271
6291
|
// could affect the image's loading behavior.
|
|
6272
6292
|
this.setHostAttribute('src', this.getRewrittenSrc());
|
|
6273
|
-
if (this.
|
|
6293
|
+
if (this.ngSrcset) {
|
|
6274
6294
|
this.setHostAttribute('srcset', this.getRewrittenSrcset());
|
|
6275
6295
|
}
|
|
6276
6296
|
}
|
|
6277
6297
|
ngOnChanges(changes) {
|
|
6278
6298
|
if (ngDevMode) {
|
|
6279
|
-
assertNoPostInitInputChange(this, changes, ['
|
|
6299
|
+
assertNoPostInitInputChange(this, changes, ['ngSrc', 'ngSrcset', 'width', 'height', 'priority']);
|
|
6280
6300
|
}
|
|
6281
6301
|
}
|
|
6282
6302
|
getLoadingBehavior() {
|
|
@@ -6293,18 +6313,18 @@ class NgOptimizedImage {
|
|
|
6293
6313
|
// because if the developer uses rendered width instead of intrinsic width in the HTML width
|
|
6294
6314
|
// attribute, the image requested may be too small for 2x+ screens.
|
|
6295
6315
|
if (!this._renderedSrc) {
|
|
6296
|
-
const imgConfig = { src: this.
|
|
6316
|
+
const imgConfig = { src: this.ngSrc };
|
|
6297
6317
|
// Cache calculated image src to reuse it later in the code.
|
|
6298
6318
|
this._renderedSrc = this.imageLoader(imgConfig);
|
|
6299
6319
|
}
|
|
6300
6320
|
return this._renderedSrc;
|
|
6301
6321
|
}
|
|
6302
6322
|
getRewrittenSrcset() {
|
|
6303
|
-
const widthSrcSet = VALID_WIDTH_DESCRIPTOR_SRCSET.test(this.
|
|
6304
|
-
const finalSrcs = this.
|
|
6323
|
+
const widthSrcSet = VALID_WIDTH_DESCRIPTOR_SRCSET.test(this.ngSrcset);
|
|
6324
|
+
const finalSrcs = this.ngSrcset.split(',').filter(src => src !== '').map(srcStr => {
|
|
6305
6325
|
srcStr = srcStr.trim();
|
|
6306
6326
|
const width = widthSrcSet ? parseFloat(srcStr) : parseFloat(srcStr) * this.width;
|
|
6307
|
-
return `${this.imageLoader({ src: this.
|
|
6327
|
+
return `${this.imageLoader({ src: this.ngSrc, width })} ${srcStr}`;
|
|
6308
6328
|
});
|
|
6309
6329
|
return finalSrcs.join(', ');
|
|
6310
6330
|
}
|
|
@@ -6319,17 +6339,19 @@ class NgOptimizedImage {
|
|
|
6319
6339
|
this.renderer.setAttribute(this.imgElement, name, value);
|
|
6320
6340
|
}
|
|
6321
6341
|
}
|
|
6322
|
-
NgOptimizedImage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
6323
|
-
NgOptimizedImage.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.
|
|
6324
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.
|
|
6342
|
+
NgOptimizedImage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
6343
|
+
NgOptimizedImage.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.2", 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 });
|
|
6344
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.2", ngImport: i0, type: NgOptimizedImage, decorators: [{
|
|
6325
6345
|
type: Directive,
|
|
6326
6346
|
args: [{
|
|
6327
6347
|
standalone: true,
|
|
6328
|
-
selector: 'img[rawSrc]',
|
|
6348
|
+
selector: 'img[ngSrc],img[rawSrc]',
|
|
6329
6349
|
}]
|
|
6330
6350
|
}], propDecorators: { rawSrc: [{
|
|
6331
6351
|
type: Input
|
|
6332
|
-
}],
|
|
6352
|
+
}], ngSrc: [{
|
|
6353
|
+
type: Input
|
|
6354
|
+
}], ngSrcset: [{
|
|
6333
6355
|
type: Input
|
|
6334
6356
|
}], width: [{
|
|
6335
6357
|
type: Input
|
|
@@ -6363,9 +6385,9 @@ function inputToBoolean(value) {
|
|
|
6363
6385
|
*/
|
|
6364
6386
|
function assertNoConflictingSrc(dir) {
|
|
6365
6387
|
if (dir.src) {
|
|
6366
|
-
throw new ɵRuntimeError(2950 /* RuntimeErrorCode.UNEXPECTED_SRC_ATTR */, `${imgDirectiveDetails(dir.
|
|
6388
|
+
throw new ɵRuntimeError(2950 /* RuntimeErrorCode.UNEXPECTED_SRC_ATTR */, `${imgDirectiveDetails(dir.ngSrc)} both \`src\` and \`ngSrc\` have been set. ` +
|
|
6367
6389
|
`Supplying both of these attributes breaks lazy loading. ` +
|
|
6368
|
-
`The NgOptimizedImage directive sets \`src\` itself based on the value of \`
|
|
6390
|
+
`The NgOptimizedImage directive sets \`src\` itself based on the value of \`ngSrc\`. ` +
|
|
6369
6391
|
`To fix this, please remove the \`src\` attribute.`);
|
|
6370
6392
|
}
|
|
6371
6393
|
}
|
|
@@ -6374,37 +6396,37 @@ function assertNoConflictingSrc(dir) {
|
|
|
6374
6396
|
*/
|
|
6375
6397
|
function assertNoConflictingSrcset(dir) {
|
|
6376
6398
|
if (dir.srcset) {
|
|
6377
|
-
throw new ɵRuntimeError(2951 /* RuntimeErrorCode.UNEXPECTED_SRCSET_ATTR */, `${imgDirectiveDetails(dir.
|
|
6399
|
+
throw new ɵRuntimeError(2951 /* RuntimeErrorCode.UNEXPECTED_SRCSET_ATTR */, `${imgDirectiveDetails(dir.ngSrc)} both \`srcset\` and \`ngSrcset\` have been set. ` +
|
|
6378
6400
|
`Supplying both of these attributes breaks lazy loading. ` +
|
|
6379
6401
|
`The NgOptimizedImage directive sets \`srcset\` itself based on the value of ` +
|
|
6380
|
-
`\`
|
|
6402
|
+
`\`ngSrcset\`. To fix this, please remove the \`srcset\` attribute.`);
|
|
6381
6403
|
}
|
|
6382
6404
|
}
|
|
6383
6405
|
/**
|
|
6384
|
-
* Verifies that the `
|
|
6406
|
+
* Verifies that the `ngSrc` is not a Base64-encoded image.
|
|
6385
6407
|
*/
|
|
6386
6408
|
function assertNotBase64Image(dir) {
|
|
6387
|
-
let
|
|
6388
|
-
if (
|
|
6389
|
-
if (
|
|
6390
|
-
|
|
6409
|
+
let ngSrc = dir.ngSrc.trim();
|
|
6410
|
+
if (ngSrc.startsWith('data:')) {
|
|
6411
|
+
if (ngSrc.length > BASE64_IMG_MAX_LENGTH_IN_ERROR) {
|
|
6412
|
+
ngSrc = ngSrc.substring(0, BASE64_IMG_MAX_LENGTH_IN_ERROR) + '...';
|
|
6391
6413
|
}
|
|
6392
|
-
throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.
|
|
6393
|
-
`(${
|
|
6414
|
+
throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \`ngSrc\` is a Base64-encoded string ` +
|
|
6415
|
+
`(${ngSrc}). NgOptimizedImage does not support Base64-encoded strings. ` +
|
|
6394
6416
|
`To fix this, disable the NgOptimizedImage directive for this element ` +
|
|
6395
|
-
`by removing \`
|
|
6417
|
+
`by removing \`ngSrc\` and using a standard \`src\` attribute instead.`);
|
|
6396
6418
|
}
|
|
6397
6419
|
}
|
|
6398
6420
|
/**
|
|
6399
|
-
* Verifies that the `
|
|
6421
|
+
* Verifies that the `ngSrc` is not a Blob URL.
|
|
6400
6422
|
*/
|
|
6401
6423
|
function assertNotBlobUrl(dir) {
|
|
6402
|
-
const
|
|
6403
|
-
if (
|
|
6404
|
-
throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.
|
|
6424
|
+
const ngSrc = dir.ngSrc.trim();
|
|
6425
|
+
if (ngSrc.startsWith('blob:')) {
|
|
6426
|
+
throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \`ngSrc\` was set to a blob URL (${ngSrc}). ` +
|
|
6405
6427
|
`Blob URLs are not supported by the NgOptimizedImage directive. ` +
|
|
6406
6428
|
`To fix this, disable the NgOptimizedImage directive for this element ` +
|
|
6407
|
-
`by removing \`
|
|
6429
|
+
`by removing \`ngSrc\` and using a regular \`src\` attribute instead.`);
|
|
6408
6430
|
}
|
|
6409
6431
|
}
|
|
6410
6432
|
/**
|
|
@@ -6414,17 +6436,17 @@ function assertNonEmptyInput(dir, name, value) {
|
|
|
6414
6436
|
const isString = typeof value === 'string';
|
|
6415
6437
|
const isEmptyString = isString && value.trim() === '';
|
|
6416
6438
|
if (!isString || isEmptyString) {
|
|
6417
|
-
throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.
|
|
6439
|
+
throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \`${name}\` has an invalid value ` +
|
|
6418
6440
|
`(\`${value}\`). To fix this, change the value to a non-empty string.`);
|
|
6419
6441
|
}
|
|
6420
6442
|
}
|
|
6421
6443
|
/**
|
|
6422
|
-
* Verifies that the `
|
|
6444
|
+
* Verifies that the `ngSrcset` is in a valid format, e.g. "100w, 200w" or "1x, 2x".
|
|
6423
6445
|
*/
|
|
6424
|
-
function
|
|
6446
|
+
function assertValidNgSrcset(dir, value) {
|
|
6425
6447
|
if (value == null)
|
|
6426
6448
|
return;
|
|
6427
|
-
assertNonEmptyInput(dir, '
|
|
6449
|
+
assertNonEmptyInput(dir, 'ngSrcset', value);
|
|
6428
6450
|
const stringVal = value;
|
|
6429
6451
|
const isValidWidthDescriptor = VALID_WIDTH_DESCRIPTOR_SRCSET.test(stringVal);
|
|
6430
6452
|
const isValidDensityDescriptor = VALID_DENSITY_DESCRIPTOR_SRCSET.test(stringVal);
|
|
@@ -6433,15 +6455,15 @@ function assertValidRawSrcset(dir, value) {
|
|
|
6433
6455
|
}
|
|
6434
6456
|
const isValidSrcset = isValidWidthDescriptor || isValidDensityDescriptor;
|
|
6435
6457
|
if (!isValidSrcset) {
|
|
6436
|
-
throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.
|
|
6437
|
-
`To fix this, supply \`
|
|
6458
|
+
throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \`ngSrcset\` has an invalid value (\`${value}\`). ` +
|
|
6459
|
+
`To fix this, supply \`ngSrcset\` using a comma-separated list of one or more width ` +
|
|
6438
6460
|
`descriptors (e.g. "100w, 200w") or density descriptors (e.g. "1x, 2x").`);
|
|
6439
6461
|
}
|
|
6440
6462
|
}
|
|
6441
6463
|
function assertUnderDensityCap(dir, value) {
|
|
6442
6464
|
const underDensityCap = value.split(',').every(num => num === '' || parseFloat(num) <= ABSOLUTE_SRCSET_DENSITY_CAP);
|
|
6443
6465
|
if (!underDensityCap) {
|
|
6444
|
-
throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.
|
|
6466
|
+
throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \`ngSrcset\` contains an unsupported image density:` +
|
|
6445
6467
|
`\`${value}\`. NgOptimizedImage generally recommends a max image density of ` +
|
|
6446
6468
|
`${RECOMMENDED_SRCSET_DENSITY_CAP}x but supports image densities up to ` +
|
|
6447
6469
|
`${ABSOLUTE_SRCSET_DENSITY_CAP}x. The human eye cannot distinguish between image densities ` +
|
|
@@ -6455,7 +6477,7 @@ function assertUnderDensityCap(dir, value) {
|
|
|
6455
6477
|
* the directive has initialized.
|
|
6456
6478
|
*/
|
|
6457
6479
|
function postInitInputChangeError(dir, inputName) {
|
|
6458
|
-
return new ɵRuntimeError(2953 /* RuntimeErrorCode.UNEXPECTED_INPUT_CHANGE */, `${imgDirectiveDetails(dir.
|
|
6480
|
+
return new ɵRuntimeError(2953 /* RuntimeErrorCode.UNEXPECTED_INPUT_CHANGE */, `${imgDirectiveDetails(dir.ngSrc)} \`${inputName}\` was updated after initialization. ` +
|
|
6459
6481
|
`The NgOptimizedImage directive will not react to this input change. ` +
|
|
6460
6482
|
`To fix this, switch \`${inputName}\` a static value or wrap the image element ` +
|
|
6461
6483
|
`in an *ngIf that is gated on the necessary value.`);
|
|
@@ -6467,12 +6489,12 @@ function assertNoPostInitInputChange(dir, changes, inputs) {
|
|
|
6467
6489
|
inputs.forEach(input => {
|
|
6468
6490
|
const isUpdated = changes.hasOwnProperty(input);
|
|
6469
6491
|
if (isUpdated && !changes[input].isFirstChange()) {
|
|
6470
|
-
if (input === '
|
|
6471
|
-
// When the `
|
|
6472
|
-
// `ngOnChanges` hook, thus the `
|
|
6473
|
-
// `
|
|
6492
|
+
if (input === 'ngSrc') {
|
|
6493
|
+
// When the `ngSrc` input changes, we detect that only in the
|
|
6494
|
+
// `ngOnChanges` hook, thus the `ngSrc` is already set. We use
|
|
6495
|
+
// `ngSrc` in the error message, so we use a previous value, but
|
|
6474
6496
|
// not the updated one in it.
|
|
6475
|
-
dir = {
|
|
6497
|
+
dir = { ngSrc: changes[input].previousValue };
|
|
6476
6498
|
}
|
|
6477
6499
|
throw postInitInputChangeError(dir, input);
|
|
6478
6500
|
}
|
|
@@ -6485,7 +6507,7 @@ function assertGreaterThanZero(dir, inputValue, inputName) {
|
|
|
6485
6507
|
const validNumber = typeof inputValue === 'number' && inputValue > 0;
|
|
6486
6508
|
const validString = typeof inputValue === 'string' && /^\d+$/.test(inputValue.trim()) && parseInt(inputValue) > 0;
|
|
6487
6509
|
if (!validNumber && !validString) {
|
|
6488
|
-
throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.
|
|
6510
|
+
throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \`${inputName}\` has an invalid value ` +
|
|
6489
6511
|
`(\`${inputValue}\`). To fix this, provide \`${inputName}\` ` +
|
|
6490
6512
|
`as a number greater than 0.`);
|
|
6491
6513
|
}
|
|
@@ -6520,40 +6542,40 @@ function assertNoImageDistortion(dir, img, renderer) {
|
|
|
6520
6542
|
const stylingDistortion = nonZeroRenderedDimensions &&
|
|
6521
6543
|
Math.abs(intrinsicAspectRatio - renderedAspectRatio) > ASPECT_RATIO_TOLERANCE;
|
|
6522
6544
|
if (inaccurateDimensions) {
|
|
6523
|
-
console.warn(ɵformatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.
|
|
6545
|
+
console.warn(ɵformatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the aspect ratio of the image does not match ` +
|
|
6524
6546
|
`the aspect ratio indicated by the width and height attributes. ` +
|
|
6525
|
-
|
|
6526
|
-
`(aspect-ratio: ${intrinsicAspectRatio}).
|
|
6547
|
+
`\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` +
|
|
6548
|
+
`(aspect-ratio: ${intrinsicAspectRatio}). \nSupplied width and height attributes: ` +
|
|
6527
6549
|
`${suppliedWidth}w x ${suppliedHeight}h (aspect-ratio: ${suppliedAspectRatio}). ` +
|
|
6528
|
-
|
|
6550
|
+
`\nTo fix this, update the width and height attributes.`));
|
|
6529
6551
|
}
|
|
6530
6552
|
else if (stylingDistortion) {
|
|
6531
|
-
console.warn(ɵformatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.
|
|
6553
|
+
console.warn(ɵformatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the aspect ratio of the rendered image ` +
|
|
6532
6554
|
`does not match the image's intrinsic aspect ratio. ` +
|
|
6533
|
-
|
|
6534
|
-
`(aspect-ratio: ${intrinsicAspectRatio}).
|
|
6555
|
+
`\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` +
|
|
6556
|
+
`(aspect-ratio: ${intrinsicAspectRatio}). \nRendered image size: ` +
|
|
6535
6557
|
`${renderedWidth}w x ${renderedHeight}h (aspect-ratio: ` +
|
|
6536
|
-
`${renderedAspectRatio}).
|
|
6558
|
+
`${renderedAspectRatio}). \nThis issue can occur if "width" and "height" ` +
|
|
6537
6559
|
`attributes are added to an image without updating the corresponding ` +
|
|
6538
6560
|
`image styling. To fix this, adjust image styling. In most cases, ` +
|
|
6539
6561
|
`adding "height: auto" or "width: auto" to the image styling will fix ` +
|
|
6540
6562
|
`this issue.`));
|
|
6541
6563
|
}
|
|
6542
|
-
else if (!dir.
|
|
6543
|
-
// If `
|
|
6564
|
+
else if (!dir.ngSrcset && nonZeroRenderedDimensions) {
|
|
6565
|
+
// If `ngSrcset` hasn't been set, sanity check the intrinsic size.
|
|
6544
6566
|
const recommendedWidth = RECOMMENDED_SRCSET_DENSITY_CAP * renderedWidth;
|
|
6545
6567
|
const recommendedHeight = RECOMMENDED_SRCSET_DENSITY_CAP * renderedHeight;
|
|
6546
6568
|
const oversizedWidth = (intrinsicWidth - recommendedWidth) >= OVERSIZED_IMAGE_TOLERANCE;
|
|
6547
6569
|
const oversizedHeight = (intrinsicHeight - recommendedHeight) >= OVERSIZED_IMAGE_TOLERANCE;
|
|
6548
6570
|
if (oversizedWidth || oversizedHeight) {
|
|
6549
|
-
console.warn(ɵformatRuntimeError(2960 /* RuntimeErrorCode.OVERSIZED_IMAGE */, `${imgDirectiveDetails(dir.
|
|
6571
|
+
console.warn(ɵformatRuntimeError(2960 /* RuntimeErrorCode.OVERSIZED_IMAGE */, `${imgDirectiveDetails(dir.ngSrc)} the intrinsic image is significantly ` +
|
|
6550
6572
|
`larger than necessary. ` +
|
|
6551
6573
|
`\nRendered image size: ${renderedWidth}w x ${renderedHeight}h. ` +
|
|
6552
6574
|
`\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h. ` +
|
|
6553
6575
|
`\nRecommended intrinsic image size: ${recommendedWidth}w x ${recommendedHeight}h. ` +
|
|
6554
6576
|
`\nNote: Recommended intrinsic image size is calculated assuming a maximum DPR of ` +
|
|
6555
6577
|
`${RECOMMENDED_SRCSET_DENSITY_CAP}. To improve loading time, resize the image ` +
|
|
6556
|
-
`or consider using the "
|
|
6578
|
+
`or consider using the "ngSrcset" and "sizes" attributes.`));
|
|
6557
6579
|
}
|
|
6558
6580
|
}
|
|
6559
6581
|
});
|
|
@@ -6568,7 +6590,7 @@ function assertNonEmptyWidthAndHeight(dir) {
|
|
|
6568
6590
|
if (dir.height === undefined)
|
|
6569
6591
|
missingAttributes.push('height');
|
|
6570
6592
|
if (missingAttributes.length > 0) {
|
|
6571
|
-
throw new ɵRuntimeError(2954 /* RuntimeErrorCode.REQUIRED_INPUT_MISSING */, `${imgDirectiveDetails(dir.
|
|
6593
|
+
throw new ɵRuntimeError(2954 /* RuntimeErrorCode.REQUIRED_INPUT_MISSING */, `${imgDirectiveDetails(dir.ngSrc)} these required attributes ` +
|
|
6572
6594
|
`are missing: ${missingAttributes.map(attr => `"${attr}"`).join(', ')}. ` +
|
|
6573
6595
|
`Including "width" and "height" attributes will prevent image-related layout shifts. ` +
|
|
6574
6596
|
`To fix this, include "width" and "height" attributes on the image tag.`);
|
|
@@ -6580,7 +6602,7 @@ function assertNonEmptyWidthAndHeight(dir) {
|
|
|
6580
6602
|
*/
|
|
6581
6603
|
function assertValidLoadingInput(dir) {
|
|
6582
6604
|
if (dir.loading && dir.priority) {
|
|
6583
|
-
throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.
|
|
6605
|
+
throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \`loading\` attribute ` +
|
|
6584
6606
|
`was used on an image that was marked "priority". ` +
|
|
6585
6607
|
`Setting \`loading\` on priority images is not allowed ` +
|
|
6586
6608
|
`because these images will always be eagerly loaded. ` +
|
|
@@ -6588,7 +6610,7 @@ function assertValidLoadingInput(dir) {
|
|
|
6588
6610
|
}
|
|
6589
6611
|
const validInputs = ['auto', 'eager', 'lazy'];
|
|
6590
6612
|
if (typeof dir.loading === 'string' && !validInputs.includes(dir.loading)) {
|
|
6591
|
-
throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.
|
|
6613
|
+
throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \`loading\` attribute ` +
|
|
6592
6614
|
`has an invalid value (\`${dir.loading}\`). ` +
|
|
6593
6615
|
`To fix this, provide a valid value ("lazy", "eager", or "auto").`);
|
|
6594
6616
|
}
|
|
@@ -6631,5 +6653,5 @@ function assertValidLoadingInput(dir) {
|
|
|
6631
6653
|
* Generated bundle index. Do not edit.
|
|
6632
6654
|
*/
|
|
6633
6655
|
|
|
6634
|
-
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, 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 };
|
|
6656
|
+
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 };
|
|
6635
6657
|
//# sourceMappingURL=common.mjs.map
|