@angular/common 21.2.0-next.1 → 21.2.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/_common_module-chunk.mjs +103 -97
- package/fesm2022/_common_module-chunk.mjs.map +1 -1
- package/fesm2022/_location-chunk.mjs +16 -16
- package/fesm2022/_module-chunk.mjs +46 -46
- package/fesm2022/_platform_location-chunk.mjs +7 -7
- package/fesm2022/_platform_navigation-chunk.mjs +4 -4
- package/fesm2022/_xhr-chunk.mjs +1 -1
- package/fesm2022/common.mjs +42 -17
- package/fesm2022/common.mjs.map +1 -1
- package/fesm2022/http-testing.mjs +8 -8
- package/fesm2022/http.mjs +19 -4
- package/fesm2022/http.mjs.map +1 -1
- package/fesm2022/testing.mjs +13 -13
- package/fesm2022/upgrade.mjs +5 -5
- package/package.json +2 -2
- package/types/_common_module-chunk.d.ts +11 -3
- package/types/_module-chunk.d.ts +1 -1
- package/types/_platform_location-chunk.d.ts +1 -1
- package/types/_xhr-chunk.d.ts +1 -1
- package/types/common.d.ts +10 -1
- package/types/http-testing.d.ts +1 -1
- package/types/http.d.ts +1 -1
- package/types/testing.d.ts +1 -1
- package/types/upgrade.d.ts +1 -1
package/fesm2022/common.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.2.0-next.
|
|
2
|
+
* @license Angular v21.2.0-next.3
|
|
3
3
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -64,7 +64,7 @@ class NavigationAdapterForLocation extends Location {
|
|
|
64
64
|
}
|
|
65
65
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
66
66
|
minVersion: "12.0.0",
|
|
67
|
-
version: "21.2.0-next.
|
|
67
|
+
version: "21.2.0-next.3",
|
|
68
68
|
ngImport: i0,
|
|
69
69
|
type: NavigationAdapterForLocation,
|
|
70
70
|
deps: [],
|
|
@@ -72,14 +72,14 @@ class NavigationAdapterForLocation extends Location {
|
|
|
72
72
|
});
|
|
73
73
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
74
74
|
minVersion: "12.0.0",
|
|
75
|
-
version: "21.2.0-next.
|
|
75
|
+
version: "21.2.0-next.3",
|
|
76
76
|
ngImport: i0,
|
|
77
77
|
type: NavigationAdapterForLocation
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
i0.ɵɵngDeclareClassMetadata({
|
|
81
81
|
minVersion: "12.0.0",
|
|
82
|
-
version: "21.2.0-next.
|
|
82
|
+
version: "21.2.0-next.3",
|
|
83
83
|
ngImport: i0,
|
|
84
84
|
type: NavigationAdapterForLocation,
|
|
85
85
|
decorators: [{
|
|
@@ -101,7 +101,7 @@ function isPlatformServer(platformId) {
|
|
|
101
101
|
return platformId === PLATFORM_SERVER_ID;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
const VERSION = /* @__PURE__ */new Version('21.2.0-next.
|
|
104
|
+
const VERSION = /* @__PURE__ */new Version('21.2.0-next.3');
|
|
105
105
|
|
|
106
106
|
class ViewportScroller {
|
|
107
107
|
static ɵprov =
|
|
@@ -270,6 +270,9 @@ function createCloudflareUrl(path, config) {
|
|
|
270
270
|
if (config.width) {
|
|
271
271
|
params += `,width=${config.width}`;
|
|
272
272
|
}
|
|
273
|
+
if (config.height) {
|
|
274
|
+
params += `,height=${config.height}`;
|
|
275
|
+
}
|
|
273
276
|
if (config.isPlaceholder) {
|
|
274
277
|
params += `,quality=${PLACEHOLDER_QUALITY}`;
|
|
275
278
|
}
|
|
@@ -295,6 +298,9 @@ function createCloudinaryUrl(path, config) {
|
|
|
295
298
|
if (config.width) {
|
|
296
299
|
params += `,w_${config.width}`;
|
|
297
300
|
}
|
|
301
|
+
if (config.height) {
|
|
302
|
+
params += `,h_${config.height}`;
|
|
303
|
+
}
|
|
298
304
|
if (config.loaderParams?.['rounded']) {
|
|
299
305
|
params += `,r_max`;
|
|
300
306
|
}
|
|
@@ -323,6 +329,9 @@ function createImagekitUrl(path, config) {
|
|
|
323
329
|
if (width) {
|
|
324
330
|
params.push(`w-${width}`);
|
|
325
331
|
}
|
|
332
|
+
if (config.height) {
|
|
333
|
+
params.push(`h-${config.height}`);
|
|
334
|
+
}
|
|
326
335
|
if (config.isPlaceholder) {
|
|
327
336
|
params.push(`q-${PLACEHOLDER_QUALITY}`);
|
|
328
337
|
}
|
|
@@ -350,6 +359,9 @@ function createImgixUrl(path, config) {
|
|
|
350
359
|
if (config.width) {
|
|
351
360
|
params.push(`w=${config.width}`);
|
|
352
361
|
}
|
|
362
|
+
if (config.height) {
|
|
363
|
+
params.push(`h=${config.height}`);
|
|
364
|
+
}
|
|
353
365
|
if (config.isPlaceholder) {
|
|
354
366
|
params.push(`q=${PLACEHOLDER_QUALITY}`);
|
|
355
367
|
}
|
|
@@ -398,6 +410,9 @@ function createNetlifyUrl(config, path) {
|
|
|
398
410
|
if (config.width) {
|
|
399
411
|
url.searchParams.set('w', config.width.toString());
|
|
400
412
|
}
|
|
413
|
+
if (config.height) {
|
|
414
|
+
url.searchParams.set('h', config.height.toString());
|
|
415
|
+
}
|
|
401
416
|
const configQuality = config.loaderParams?.['quality'] ?? config.loaderParams?.['q'];
|
|
402
417
|
if (config.isPlaceholder && !configQuality) {
|
|
403
418
|
url.searchParams.set('q', PLACEHOLDER_QUALITY);
|
|
@@ -490,7 +505,7 @@ class LCPImageObserver {
|
|
|
490
505
|
}
|
|
491
506
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
492
507
|
minVersion: "12.0.0",
|
|
493
|
-
version: "21.2.0-next.
|
|
508
|
+
version: "21.2.0-next.3",
|
|
494
509
|
ngImport: i0,
|
|
495
510
|
type: LCPImageObserver,
|
|
496
511
|
deps: [],
|
|
@@ -498,7 +513,7 @@ class LCPImageObserver {
|
|
|
498
513
|
});
|
|
499
514
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
500
515
|
minVersion: "12.0.0",
|
|
501
|
-
version: "21.2.0-next.
|
|
516
|
+
version: "21.2.0-next.3",
|
|
502
517
|
ngImport: i0,
|
|
503
518
|
type: LCPImageObserver,
|
|
504
519
|
providedIn: 'root'
|
|
@@ -506,7 +521,7 @@ class LCPImageObserver {
|
|
|
506
521
|
}
|
|
507
522
|
i0.ɵɵngDeclareClassMetadata({
|
|
508
523
|
minVersion: "12.0.0",
|
|
509
|
-
version: "21.2.0-next.
|
|
524
|
+
version: "21.2.0-next.3",
|
|
510
525
|
ngImport: i0,
|
|
511
526
|
type: LCPImageObserver,
|
|
512
527
|
decorators: [{
|
|
@@ -577,7 +592,7 @@ class PreconnectLinkChecker {
|
|
|
577
592
|
}
|
|
578
593
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
579
594
|
minVersion: "12.0.0",
|
|
580
|
-
version: "21.2.0-next.
|
|
595
|
+
version: "21.2.0-next.3",
|
|
581
596
|
ngImport: i0,
|
|
582
597
|
type: PreconnectLinkChecker,
|
|
583
598
|
deps: [],
|
|
@@ -585,7 +600,7 @@ class PreconnectLinkChecker {
|
|
|
585
600
|
});
|
|
586
601
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
587
602
|
minVersion: "12.0.0",
|
|
588
|
-
version: "21.2.0-next.
|
|
603
|
+
version: "21.2.0-next.3",
|
|
589
604
|
ngImport: i0,
|
|
590
605
|
type: PreconnectLinkChecker,
|
|
591
606
|
providedIn: 'root'
|
|
@@ -593,7 +608,7 @@ class PreconnectLinkChecker {
|
|
|
593
608
|
}
|
|
594
609
|
i0.ɵɵngDeclareClassMetadata({
|
|
595
610
|
minVersion: "12.0.0",
|
|
596
|
-
version: "21.2.0-next.
|
|
611
|
+
version: "21.2.0-next.3",
|
|
597
612
|
ngImport: i0,
|
|
598
613
|
type: PreconnectLinkChecker,
|
|
599
614
|
decorators: [{
|
|
@@ -643,7 +658,7 @@ class PreloadLinkCreator {
|
|
|
643
658
|
}
|
|
644
659
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
645
660
|
minVersion: "12.0.0",
|
|
646
|
-
version: "21.2.0-next.
|
|
661
|
+
version: "21.2.0-next.3",
|
|
647
662
|
ngImport: i0,
|
|
648
663
|
type: PreloadLinkCreator,
|
|
649
664
|
deps: [],
|
|
@@ -651,7 +666,7 @@ class PreloadLinkCreator {
|
|
|
651
666
|
});
|
|
652
667
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
653
668
|
minVersion: "12.0.0",
|
|
654
|
-
version: "21.2.0-next.
|
|
669
|
+
version: "21.2.0-next.3",
|
|
655
670
|
ngImport: i0,
|
|
656
671
|
type: PreloadLinkCreator,
|
|
657
672
|
providedIn: 'root'
|
|
@@ -659,7 +674,7 @@ class PreloadLinkCreator {
|
|
|
659
674
|
}
|
|
660
675
|
i0.ɵɵngDeclareClassMetadata({
|
|
661
676
|
minVersion: "12.0.0",
|
|
662
|
-
version: "21.2.0-next.
|
|
677
|
+
version: "21.2.0-next.3",
|
|
663
678
|
ngImport: i0,
|
|
664
679
|
type: PreloadLinkCreator,
|
|
665
680
|
decorators: [{
|
|
@@ -821,11 +836,21 @@ class NgOptimizedImage {
|
|
|
821
836
|
assertPlaceholderDimensions(this, this.imgElement);
|
|
822
837
|
}
|
|
823
838
|
}
|
|
839
|
+
getAspectRatio() {
|
|
840
|
+
if (this.width && this.height && this.height !== 0) {
|
|
841
|
+
return this.width / this.height;
|
|
842
|
+
}
|
|
843
|
+
return null;
|
|
844
|
+
}
|
|
824
845
|
callImageLoader(configWithoutCustomParams) {
|
|
825
846
|
let augmentedConfig = configWithoutCustomParams;
|
|
826
847
|
if (this.loaderParams) {
|
|
827
848
|
augmentedConfig.loaderParams = this.loaderParams;
|
|
828
849
|
}
|
|
850
|
+
const ratio = this.getAspectRatio();
|
|
851
|
+
if (ratio !== null && augmentedConfig.width) {
|
|
852
|
+
augmentedConfig.height = Math.round(augmentedConfig.width / ratio);
|
|
853
|
+
}
|
|
829
854
|
return this.imageLoader(augmentedConfig);
|
|
830
855
|
}
|
|
831
856
|
getLoadingBehavior() {
|
|
@@ -958,7 +983,7 @@ class NgOptimizedImage {
|
|
|
958
983
|
}
|
|
959
984
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
960
985
|
minVersion: "12.0.0",
|
|
961
|
-
version: "21.2.0-next.
|
|
986
|
+
version: "21.2.0-next.3",
|
|
962
987
|
ngImport: i0,
|
|
963
988
|
type: NgOptimizedImage,
|
|
964
989
|
deps: [],
|
|
@@ -966,7 +991,7 @@ class NgOptimizedImage {
|
|
|
966
991
|
});
|
|
967
992
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
968
993
|
minVersion: "16.1.0",
|
|
969
|
-
version: "21.2.0-next.
|
|
994
|
+
version: "21.2.0-next.3",
|
|
970
995
|
type: NgOptimizedImage,
|
|
971
996
|
isStandalone: true,
|
|
972
997
|
selector: "img[ngSrc]",
|
|
@@ -1006,7 +1031,7 @@ class NgOptimizedImage {
|
|
|
1006
1031
|
}
|
|
1007
1032
|
i0.ɵɵngDeclareClassMetadata({
|
|
1008
1033
|
minVersion: "12.0.0",
|
|
1009
|
-
version: "21.2.0-next.
|
|
1034
|
+
version: "21.2.0-next.3",
|
|
1010
1035
|
ngImport: i0,
|
|
1011
1036
|
type: NgOptimizedImage,
|
|
1012
1037
|
decorators: [{
|