@angular/common 18.0.0-next.4 → 18.0.0-next.6

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 (63) hide show
  1. package/esm2022/http/public_api.mjs +2 -2
  2. package/esm2022/http/src/client.mjs +3 -3
  3. package/esm2022/http/src/errors.mjs +1 -1
  4. package/esm2022/http/src/fetch.mjs +6 -6
  5. package/esm2022/http/src/interceptor.mjs +3 -3
  6. package/esm2022/http/src/jsonp.mjs +9 -9
  7. package/esm2022/http/src/module.mjs +17 -13
  8. package/esm2022/http/src/response.mjs +8 -2
  9. package/esm2022/http/src/transfer_cache.mjs +73 -12
  10. package/esm2022/http/src/xhr.mjs +7 -7
  11. package/esm2022/http/src/xsrf.mjs +6 -6
  12. package/esm2022/http/testing/src/backend.mjs +3 -3
  13. package/esm2022/http/testing/src/module.mjs +7 -5
  14. package/esm2022/src/common.mjs +2 -2
  15. package/esm2022/src/common_module.mjs +4 -4
  16. package/esm2022/src/directives/ng_class.mjs +3 -3
  17. package/esm2022/src/directives/ng_component_outlet.mjs +3 -3
  18. package/esm2022/src/directives/ng_for_of.mjs +3 -3
  19. package/esm2022/src/directives/ng_if.mjs +3 -3
  20. package/esm2022/src/directives/ng_optimized_image/lcp_image_observer.mjs +3 -3
  21. package/esm2022/src/directives/ng_optimized_image/ng_optimized_image.mjs +3 -3
  22. package/esm2022/src/directives/ng_optimized_image/preconnect_link_checker.mjs +3 -3
  23. package/esm2022/src/directives/ng_optimized_image/preload-link-creator.mjs +3 -3
  24. package/esm2022/src/directives/ng_plural.mjs +6 -6
  25. package/esm2022/src/directives/ng_style.mjs +3 -3
  26. package/esm2022/src/directives/ng_switch.mjs +9 -9
  27. package/esm2022/src/directives/ng_template_outlet.mjs +3 -3
  28. package/esm2022/src/i18n/locale_data_api.mjs +86 -3
  29. package/esm2022/src/i18n/localization.mjs +6 -6
  30. package/esm2022/src/location/hash_location_strategy.mjs +3 -3
  31. package/esm2022/src/location/location.mjs +3 -3
  32. package/esm2022/src/location/location_strategy.mjs +6 -6
  33. package/esm2022/src/location/platform_location.mjs +6 -6
  34. package/esm2022/src/navigation/platform_navigation.mjs +3 -3
  35. package/esm2022/src/pipes/async_pipe.mjs +3 -3
  36. package/esm2022/src/pipes/case_conversion_pipes.mjs +9 -9
  37. package/esm2022/src/pipes/date_pipe.mjs +3 -3
  38. package/esm2022/src/pipes/i18n_plural_pipe.mjs +3 -3
  39. package/esm2022/src/pipes/i18n_select_pipe.mjs +3 -3
  40. package/esm2022/src/pipes/json_pipe.mjs +3 -3
  41. package/esm2022/src/pipes/keyvalue_pipe.mjs +3 -3
  42. package/esm2022/src/pipes/number_pipe.mjs +9 -9
  43. package/esm2022/src/pipes/slice_pipe.mjs +3 -3
  44. package/esm2022/src/platform_id.mjs +1 -21
  45. package/esm2022/src/version.mjs +1 -1
  46. package/esm2022/testing/src/location_mock.mjs +3 -3
  47. package/esm2022/testing/src/mock_location_strategy.mjs +3 -3
  48. package/esm2022/testing/src/mock_platform_location.mjs +6 -6
  49. package/esm2022/upgrade/src/location_upgrade_module.mjs +4 -4
  50. package/fesm2022/common.mjs +203 -140
  51. package/fesm2022/common.mjs.map +1 -1
  52. package/fesm2022/http/testing.mjs +10 -8
  53. package/fesm2022/http/testing.mjs.map +1 -1
  54. package/fesm2022/http.mjs +123 -52
  55. package/fesm2022/http.mjs.map +1 -1
  56. package/fesm2022/testing.mjs +16 -16
  57. package/fesm2022/upgrade.mjs +5 -5
  58. package/http/index.d.ts +36 -1
  59. package/http/testing/index.d.ts +3 -1
  60. package/index.d.ts +88 -22
  61. package/package.json +2 -2
  62. package/testing/index.d.ts +1 -1
  63. package/upgrade/index.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.0.0-next.4
2
+ * @license Angular v18.0.0-next.6
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -14,10 +14,10 @@ import { Subject } from 'rxjs';
14
14
  * implementations.
15
15
  */
16
16
  class PlatformNavigation {
17
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.4", ngImport: i0, type: PlatformNavigation, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
18
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.4", ngImport: i0, type: PlatformNavigation, providedIn: 'platform', useFactory: () => window.navigation }); }
17
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: PlatformNavigation, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
18
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: PlatformNavigation, providedIn: 'platform', useFactory: () => window.navigation }); }
19
19
  }
20
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4", ngImport: i0, type: PlatformNavigation, decorators: [{
20
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: PlatformNavigation, decorators: [{
21
21
  type: Injectable,
22
22
  args: [{ providedIn: 'platform', useFactory: () => window.navigation }]
23
23
  }] });
@@ -888,10 +888,10 @@ class MockPlatformLocation {
888
888
  });
889
889
  }
890
890
  }
891
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.4", ngImport: i0, type: MockPlatformLocation, deps: [{ token: MOCK_PLATFORM_LOCATION_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
892
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.4", ngImport: i0, type: MockPlatformLocation }); }
891
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: MockPlatformLocation, deps: [{ token: MOCK_PLATFORM_LOCATION_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
892
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: MockPlatformLocation }); }
893
893
  }
894
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4", ngImport: i0, type: MockPlatformLocation, decorators: [{
894
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: MockPlatformLocation, decorators: [{
895
895
  type: Injectable
896
896
  }], ctorParameters: () => [{ type: undefined, decorators: [{
897
897
  type: Inject,
@@ -962,10 +962,10 @@ class FakeNavigationPlatformLocation {
962
962
  getState() {
963
963
  return this._platformNavigation.currentEntry.getHistoryState();
964
964
  }
965
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.4", ngImport: i0, type: FakeNavigationPlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
966
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.4", ngImport: i0, type: FakeNavigationPlatformLocation }); }
965
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: FakeNavigationPlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
966
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: FakeNavigationPlatformLocation }); }
967
967
  }
968
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4", ngImport: i0, type: FakeNavigationPlatformLocation, decorators: [{
968
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: FakeNavigationPlatformLocation, decorators: [{
969
969
  type: Injectable
970
970
  }], ctorParameters: () => [] });
971
971
 
@@ -1137,10 +1137,10 @@ class SpyLocation {
1137
1137
  this._history.push(new LocationState(path, query, state));
1138
1138
  this._historyIndex = this._history.length - 1;
1139
1139
  }
1140
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.4", ngImport: i0, type: SpyLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1141
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.4", ngImport: i0, type: SpyLocation }); }
1140
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: SpyLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1141
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: SpyLocation }); }
1142
1142
  }
1143
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4", ngImport: i0, type: SpyLocation, decorators: [{
1143
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: SpyLocation, decorators: [{
1144
1144
  type: Injectable
1145
1145
  }] });
1146
1146
  class LocationState {
@@ -1219,10 +1219,10 @@ class MockLocationStrategy extends LocationStrategy {
1219
1219
  getState() {
1220
1220
  return this.stateChanges[(this.stateChanges.length || 1) - 1];
1221
1221
  }
1222
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.4", ngImport: i0, type: MockLocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1223
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.4", ngImport: i0, type: MockLocationStrategy }); }
1222
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: MockLocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1223
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: MockLocationStrategy }); }
1224
1224
  }
1225
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4", ngImport: i0, type: MockLocationStrategy, decorators: [{
1225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: MockLocationStrategy, decorators: [{
1226
1226
  type: Injectable
1227
1227
  }], ctorParameters: () => [] });
1228
1228
  class _MockPopStateEvent {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.0.0-next.4
2
+ * @license Angular v18.0.0-next.6
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -841,11 +841,11 @@ class LocationUpgradeModule {
841
841
  ],
842
842
  };
843
843
  }
844
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.4", ngImport: i0, type: LocationUpgradeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
845
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-next.4", ngImport: i0, type: LocationUpgradeModule, imports: [CommonModule] }); }
846
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-next.4", ngImport: i0, type: LocationUpgradeModule, imports: [CommonModule] }); }
844
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: LocationUpgradeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
845
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-next.6", ngImport: i0, type: LocationUpgradeModule, imports: [CommonModule] }); }
846
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: LocationUpgradeModule, imports: [CommonModule] }); }
847
847
  }
848
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4", ngImport: i0, type: LocationUpgradeModule, decorators: [{
848
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: LocationUpgradeModule, decorators: [{
849
849
  type: NgModule,
850
850
  args: [{ imports: [CommonModule] }]
851
851
  }] });
package/http/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.0.0-next.4
2
+ * @license Angular v18.0.0-next.6
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -45,6 +45,34 @@ export declare class FetchBackend implements HttpBackend {
45
45
  */
46
46
  export declare const HTTP_INTERCEPTORS: InjectionToken<readonly HttpInterceptor[]>;
47
47
 
48
+ /**
49
+ * If your application uses different HTTP origins to make API calls (via `HttpClient`) on the server and
50
+ * on the client, the `HTTP_TRANSFER_CACHE_ORIGIN_MAP` token allows you to establish a mapping
51
+ * between those origins, so that `HttpTransferCache` feature can recognize those requests as the same
52
+ * ones and reuse the data cached on the server during hydration on the client.
53
+ *
54
+ * **Important note**: the `HTTP_TRANSFER_CACHE_ORIGIN_MAP` token should *only* be provided in
55
+ * the *server* code of your application (typically in the `app.server.config.ts` script). Angular throws an
56
+ * error if it detects that the token is defined while running on the client.
57
+ *
58
+ * @usageNotes
59
+ *
60
+ * When the same API endpoint is accessed via `http://internal-domain.com:8080` on the server and
61
+ * via `https://external-domain.com` on the client, you can use the following configuration:
62
+ * ```typescript
63
+ * // in app.server.config.ts
64
+ * {
65
+ * provide: HTTP_TRANSFER_CACHE_ORIGIN_MAP,
66
+ * useValue: {
67
+ * 'http://internal-domain.com:8080': 'https://external-domain.com'
68
+ * }
69
+ * }
70
+ * ```
71
+ *
72
+ * @publicApi
73
+ */
74
+ export declare const HTTP_TRANSFER_CACHE_ORIGIN_MAP: InjectionToken<Record<string, string>>;
75
+
48
76
  /**
49
77
  * A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend.
50
78
  *
@@ -3163,6 +3191,7 @@ export declare class HttpClient {
3163
3191
  * with method JSONP, where they are rejected.
3164
3192
  *
3165
3193
  * @publicApi
3194
+ * @deprecated `withJsonpSupport()` as providers instead
3166
3195
  */
3167
3196
  export declare class HttpClientJsonpModule {
3168
3197
  static ɵfac: i0.ɵɵFactoryDeclaration<HttpClientJsonpModule, never>;
@@ -3178,6 +3207,7 @@ export declare class HttpClientJsonpModule {
3178
3207
  * multiprovider for built-in DI token `HTTP_INTERCEPTORS`.
3179
3208
  *
3180
3209
  * @publicApi
3210
+ * @deprecated use `provideHttpClient(withInterceptorsFromDi())` as providers instead
3181
3211
  */
3182
3212
  export declare class HttpClientModule {
3183
3213
  static ɵfac: i0.ɵɵFactoryDeclaration<HttpClientModule, never>;
@@ -3196,6 +3226,8 @@ export declare class HttpClientModule {
3196
3226
  * and the default header name is `X-XSRF-TOKEN`.
3197
3227
  *
3198
3228
  * @publicApi
3229
+ * @deprecated Use withXsrfConfiguration({cookieName: 'XSRF-TOKEN', headerName: 'X-XSRF-TOKEN'}) as
3230
+ * providers instead or `withNoXsrfProtection` if you want to disabled XSRF protection.
3199
3231
  */
3200
3232
  export declare class HttpClientXsrfModule {
3201
3233
  /**
@@ -4195,6 +4227,8 @@ export declare enum HttpStatusCode {
4195
4227
  * @param includePostRequests Enables caching for POST requests. By default, only GET and HEAD
4196
4228
  * requests are cached. This option can be enabled if POST requests are used to retrieve data
4197
4229
  * (for example using GraphQL).
4230
+ * @param includeRequestsWithAuthHeaders Enables caching of requests containing either `Authorization`
4231
+ * or `Proxy-Authorization` headers. By default, these requests are excluded from caching.
4198
4232
  *
4199
4233
  * @publicApi
4200
4234
  */
@@ -4202,6 +4236,7 @@ export declare type HttpTransferCacheOptions = {
4202
4236
  includeHeaders?: string[];
4203
4237
  filter?: (req: HttpRequest<unknown>) => boolean;
4204
4238
  includePostRequests?: boolean;
4239
+ includeRequestsWithAuthHeaders?: boolean;
4205
4240
  };
4206
4241
 
4207
4242
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.0.0-next.4
2
+ * @license Angular v18.0.0-next.6
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -19,6 +19,8 @@ import { Provider } from '@angular/core';
19
19
  * Inject `HttpTestingController` to expect and flush requests in your tests.
20
20
  *
21
21
  * @publicApi
22
+ *
23
+ * @deprecated Add `provideHttpClientTesting()` to your providers instead.
22
24
  */
23
25
  export declare class HttpClientTestingModule {
24
26
  static ɵfac: i0.ɵɵFactoryDeclaration<HttpClientTestingModule, never>;
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.0.0-next.4
2
+ * @license Angular v18.0.0-next.6
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -613,6 +613,8 @@ export declare function formatPercent(value: number, locale: string, digitsInfo?
613
613
  * @see {@link getLocaleDateTimeFormat}
614
614
  * @see [Internationalization (i18n) Guide](guide/i18n)
615
615
  * @publicApi
616
+ *
617
+ * @deprecated Date locale data getters are deprecated
616
618
  */
617
619
  export declare enum FormatWidth {
618
620
  /**
@@ -645,6 +647,8 @@ export declare enum FormatWidth {
645
647
  * @see [Internationalization (i18n) Guide](guide/i18n)
646
648
  *
647
649
  * @publicApi
650
+ *
651
+ * @deprecated locale data getters are deprecated
648
652
  */
649
653
  export declare enum FormStyle {
650
654
  Format = 0,
@@ -665,6 +669,12 @@ export declare enum FormStyle {
665
669
  * @see [Internationalization (i18n) Guide](guide/i18n)
666
670
  *
667
671
  * @publicApi
672
+ *
673
+ * @deprecated Angular recommends relying on the `Intl` API for i18n.
674
+ * You can use `Intl.NumberFormat().formatToParts()` to extract the currency symbol.
675
+ * For example: `Intl.NumberFormat('en', {style:'currency', currency: 'USD'}).formatToParts().find(part => part.type === 'currency').value`
676
+ * returns `$` for USD currency code in the `en` locale.
677
+ * Note: `US$` is a currency symbol for the `en-ca` locale but not the `en-us` locale.
668
678
  */
669
679
  export declare function getCurrencySymbol(code: string, format: 'wide' | 'narrow', locale?: string): string;
670
680
 
@@ -677,6 +687,9 @@ export declare function getCurrencySymbol(code: string, format: 'wide' | 'narrow
677
687
  * @returns The code of the default currency for the given locale.
678
688
  *
679
689
  * @publicApi
690
+ *
691
+ * @deprecated We recommend you create a map of locale to ISO 4217 currency codes.
692
+ * Time relative currency data is provided by the CLDR project. See https://www.unicode.org/cldr/charts/44/supplemental/detailed_territory_currency_information.html
680
693
  */
681
694
  export declare function getLocaleCurrencyCode(locale: string): string | null;
682
695
 
@@ -689,6 +702,8 @@ export declare function getLocaleCurrencyCode(locale: string): string | null;
689
702
  * @see [Internationalization (i18n) Guide](guide/i18n)
690
703
  *
691
704
  * @publicApi
705
+ *
706
+ * @deprecated Use the `Intl` API to format a currency with from currency code
692
707
  */
693
708
  export declare function getLocaleCurrencyName(locale: string): string | null;
694
709
 
@@ -702,6 +717,8 @@ export declare function getLocaleCurrencyName(locale: string): string | null;
702
717
  * @see [Internationalization (i18n) Guide](guide/i18n)
703
718
  *
704
719
  * @publicApi
720
+ *
721
+ * @deprecated Use the `Intl` API to format a currency with from currency code
705
722
  */
706
723
  export declare function getLocaleCurrencySymbol(locale: string): string | null;
707
724
 
@@ -715,6 +732,9 @@ export declare function getLocaleCurrencySymbol(locale: string): string | null;
715
732
  * @see [Internationalization (i18n) Guide](guide/i18n)
716
733
  *
717
734
  * @publicApi
735
+ *
736
+ * @deprecated Angular recommends relying on the `Intl` API for i18n.
737
+ * Use `Intl.DateTimeFormat` for date formating instead.
718
738
  */
719
739
  export declare function getLocaleDateFormat(locale: string, width: FormatWidth): string;
720
740
 
@@ -728,6 +748,9 @@ export declare function getLocaleDateFormat(locale: string, width: FormatWidth):
728
748
  * @see [Internationalization (i18n) Guide](guide/i18n)
729
749
  *
730
750
  * @publicApi
751
+ *
752
+ * @deprecated Angular recommends relying on the `Intl` API for i18n.
753
+ * Use `Intl.DateTimeFormat` for date formating instead.
731
754
  */
732
755
  export declare function getLocaleDateTimeFormat(locale: string, width: FormatWidth): string;
733
756
 
@@ -742,6 +765,9 @@ export declare function getLocaleDateTimeFormat(locale: string, width: FormatWid
742
765
  * @see [Internationalization (i18n) Guide](guide/i18n)
743
766
  *
744
767
  * @publicApi
768
+ *
769
+ * @deprecated Angular recommends relying on the `Intl` API for i18n.
770
+ * Use `Intl.DateTimeFormat` for date formating instead.
745
771
  */
746
772
  export declare function getLocaleDayNames(locale: string, formStyle: FormStyle, width: TranslationWidth): ReadonlyArray<string>;
747
773
 
@@ -755,6 +781,9 @@ export declare function getLocaleDayNames(locale: string, formStyle: FormStyle,
755
781
  * @see [Internationalization (i18n) Guide](guide/i18n)
756
782
  *
757
783
  * @publicApi
784
+ *
785
+ * @deprecated Angular recommends relying on the `Intl` API for i18n.
786
+ * Use `Intl.DateTimeFormat` for date formating instead.
758
787
  */
759
788
  export declare function getLocaleDayPeriods(locale: string, formStyle: FormStyle, width: TranslationWidth): Readonly<[string, string]>;
760
789
 
@@ -764,6 +793,12 @@ export declare function getLocaleDayPeriods(locale: string, formStyle: FormStyle
764
793
  * @publicApi
765
794
  * @returns 'rtl' or 'ltr'
766
795
  * @see [Internationalization (i18n) Guide](guide/i18n)
796
+ *
797
+ * @deprecated Angular recommends relying on the `Intl` API for i18n.
798
+ * For dates and numbers, let `Intl.DateTimeFormat()` and `Intl.NumberFormat()` determine the writing direction.
799
+ * The `Intl` alternative [`getTextInfo`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo).
800
+ * has only partial support (Chromium M99 & Safari 17).
801
+ * 3rd party alternatives like [`rtl-detect`](https://www.npmjs.com/package/rtl-detect) can work around this issue.
767
802
  */
768
803
  export declare function getLocaleDirection(locale: string): 'ltr' | 'rtl';
769
804
 
@@ -777,6 +812,9 @@ export declare function getLocaleDirection(locale: string): 'ltr' | 'rtl';
777
812
  * @see [Internationalization (i18n) Guide](guide/i18n)
778
813
  *
779
814
  * @publicApi
815
+ *
816
+ * @deprecated Angular recommends relying on the `Intl` API for i18n.
817
+ * Use `Intl.DateTimeFormat` for date formating instead.
780
818
  */
781
819
  export declare function getLocaleEraNames(locale: string, width: TranslationWidth): Readonly<[string, string]>;
782
820
 
@@ -801,6 +839,9 @@ export declare function getLocaleEraNames(locale: string, width: TranslationWidt
801
839
  * @see [Internationalization (i18n) Guide](guide/i18n)
802
840
  *
803
841
  * @publicApi
842
+ *
843
+ * @deprecated Angular recommends relying on the `Intl` API for i18n.
844
+ * Let `Intl.DateTimeFormat` determine the day period instead.
804
845
  */
805
846
  export declare function getLocaleExtraDayPeriodRules(locale: string): (Time | [Time, Time])[];
806
847
 
@@ -820,6 +861,9 @@ export declare function getLocaleExtraDayPeriodRules(locale: string): (Time | [T
820
861
  * @see [Internationalization (i18n) Guide](guide/i18n)
821
862
  *
822
863
  * @publicApi
864
+ *
865
+ * @deprecated Angular recommends relying on the `Intl` API for i18n.
866
+ * To extract a day period use `Intl.DateTimeFormat` with the `dayPeriod` option instead.
823
867
  */
824
868
  export declare function getLocaleExtraDayPeriods(locale: string, formStyle: FormStyle, width: TranslationWidth): string[];
825
869
 
@@ -833,6 +877,12 @@ export declare function getLocaleExtraDayPeriods(locale: string, formStyle: Form
833
877
  * @see [Internationalization (i18n) Guide](guide/i18n)
834
878
  *
835
879
  * @publicApi
880
+ *
881
+ * @deprecated Angular recommends relying on the `Intl` API for i18n.
882
+ * Intl's [`getWeekInfo`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo) has partial support (Chromium M99 & Safari 17).
883
+ * You may want to rely on the following alternatives:
884
+ * - Libraries like [`Luxon`](https://moment.github.io/luxon/#/) rely on `Intl` but fallback on the ISO 8601 definition (monday) if `getWeekInfo` is not supported.
885
+ * - Other librairies like [`date-fns`](https://date-fns.org/), [`day.js`](https://day.js.org/en/) or [`weekstart`](https://www.npmjs.com/package/weekstart) library provide their own locale based data for the first day of the week.
836
886
  */
837
887
  export declare function getLocaleFirstDayOfWeek(locale: string): WeekDay;
838
888
 
@@ -844,6 +894,9 @@ export declare function getLocaleFirstDayOfWeek(locale: string): WeekDay;
844
894
  * @see [Internationalization (i18n) Guide](guide/i18n)
845
895
  *
846
896
  * @publicApi
897
+ *
898
+ * @deprecated Angular recommends relying on the `Intl` API for i18n.
899
+ * This function serves no purpose when relying on the `Intl` API.
847
900
  */
848
901
  export declare function getLocaleId(locale: string): string;
849
902
 
@@ -858,6 +911,9 @@ export declare function getLocaleId(locale: string): string;
858
911
  * @see [Internationalization (i18n) Guide](guide/i18n)
859
912
  *
860
913
  * @publicApi
914
+ *
915
+ * @deprecated Angular recommends relying on the `Intl` API for i18n.
916
+ * Use `Intl.DateTimeFormat` for date formating instead.
861
917
  */
862
918
  export declare function getLocaleMonthNames(locale: string, formStyle: FormStyle, width: TranslationWidth): ReadonlyArray<string>;
863
919
 
@@ -895,6 +951,9 @@ export declare function getLocaleMonthNames(locale: string, formStyle: FormStyle
895
951
  * @see [Internationalization (i18n) Guide](guide/i18n)
896
952
  *
897
953
  * @publicApi
954
+ *
955
+ * @deprecated Angular recommends relying on the `Intl` API for i18n.
956
+ * Let `Intl.NumberFormat` determine the number format instead
898
957
  */
899
958
  export declare function getLocaleNumberFormat(locale: string, type: NumberFormatStyle): string;
900
959
 
@@ -907,12 +966,17 @@ export declare function getLocaleNumberFormat(locale: string, type: NumberFormat
907
966
  * @see [Internationalization (i18n) Guide](guide/i18n)
908
967
  *
909
968
  * @publicApi
969
+ *
970
+ * @deprecated Angular recommends relying on the `Intl` API for i18n.
971
+ * Use `Intl.NumberFormat` to format numbers instead.
910
972
  */
911
973
  export declare function getLocaleNumberSymbol(locale: string, symbol: NumberSymbol): string;
912
974
 
913
975
  /**
914
- * @alias core/ɵgetLocalePluralCase
915
976
  * @publicApi
977
+ *
978
+ * @deprecated Angular recommends relying on the `Intl` API for i18n.
979
+ * Use `Intl.PluralRules` instead
916
980
  */
917
981
  export declare const getLocalePluralCase: (locale: string) => (value: number) => Plural;
918
982
 
@@ -926,6 +990,8 @@ export declare const getLocalePluralCase: (locale: string) => (value: number) =>
926
990
  * @see [Internationalization (i18n) Guide](guide/i18n)
927
991
 
928
992
  * @publicApi
993
+ * @deprecated Angular recommends relying on the `Intl` API for i18n.
994
+ * Use `Intl.DateTimeFormat` for date formating instead.
929
995
  */
930
996
  export declare function getLocaleTimeFormat(locale: string, width: FormatWidth): string;
931
997
 
@@ -937,6 +1003,10 @@ export declare function getLocaleTimeFormat(locale: string, width: FormatWidth):
937
1003
  * @see [Internationalization (i18n) Guide](guide/i18n)
938
1004
  *
939
1005
  * @publicApi
1006
+ *
1007
+ * @deprecated Angular recommends relying on the `Intl` API for i18n.
1008
+ * Intl's [`getWeekInfo`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo) has partial support (Chromium M99 & Safari 17).
1009
+ * Libraries like [`Luxon`](https://moment.github.io/luxon/#/) rely on `Intl` but fallback on the ISO 8601 definition (Saturday+Sunday) if `getWeekInfo` is not supported .
940
1010
  */
941
1011
  export declare function getLocaleWeekEndRange(locale: string): [WeekDay, WeekDay];
942
1012
 
@@ -949,6 +1019,9 @@ export declare function getLocaleWeekEndRange(locale: string): [WeekDay, WeekDay
949
1019
  * @see [Internationalization (i18n) Guide](guide/i18n)
950
1020
  *
951
1021
  * @publicApi
1022
+ *
1023
+ * @deprecated Angular recommends relying on the `Intl` API for i18n.
1024
+ * This function should not be used anymore. Let `Intl.NumberFormat` determine the number of digits to display for the currency
952
1025
  */
953
1026
  export declare function getNumberOfCurrencyDigits(code: string): number;
954
1027
 
@@ -1241,22 +1314,6 @@ export declare function isPlatformBrowser(platformId: Object): boolean;
1241
1314
  */
1242
1315
  export declare function isPlatformServer(platformId: Object): boolean;
1243
1316
 
1244
- /**
1245
- * Returns whether a platform id represents a web worker app platform.
1246
- * @publicApi
1247
- * @deprecated This function serves no purpose since the removal of the Webworker platform. It will
1248
- * always return `false`.
1249
- */
1250
- export declare function isPlatformWorkerApp(platformId: Object): boolean;
1251
-
1252
- /**
1253
- * Returns whether a platform id represents a web worker UI platform.
1254
- * @publicApi
1255
- * @deprecated This function serves no purpose since the removal of the Webworker platform. It will
1256
- * always return `false`.
1257
- */
1258
- export declare function isPlatformWorkerUi(platformId: Object): boolean;
1259
-
1260
1317
  /**
1261
1318
  * @ngModule CommonModule
1262
1319
  * @description
@@ -2807,6 +2864,8 @@ export declare class NgTemplateOutlet<C = unknown> implements OnChanges {
2807
2864
  * @see [Internationalization (i18n) Guide](guide/i18n)
2808
2865
  *
2809
2866
  * @publicApi
2867
+ *
2868
+ * @deprecated `getLocaleNumberFormat` is deprecated
2810
2869
  */
2811
2870
  export declare enum NumberFormatStyle {
2812
2871
  Decimal = 0,
@@ -2823,6 +2882,9 @@ export declare enum NumberFormatStyle {
2823
2882
  * @see [Internationalization (i18n) Guide](guide/i18n)
2824
2883
  *
2825
2884
  * @publicApi
2885
+ *
2886
+ * @deprecated `getLocaleNumberSymbol` is deprecated
2887
+ *
2826
2888
  * @object-literal-as-enum
2827
2889
  */
2828
2890
  export declare const NumberSymbol: {
@@ -3041,6 +3103,8 @@ export declare abstract class PlatformLocation {
3041
3103
  * @see [Internationalization (i18n) Guide](guide/i18n)
3042
3104
  *
3043
3105
  * @publicApi
3106
+ *
3107
+ * @deprecated `getLocalePluralCase` is deprecated
3044
3108
  */
3045
3109
  export declare enum Plural {
3046
3110
  Zero = 0,
@@ -3228,6 +3292,8 @@ declare class SwitchView {
3228
3292
  * Represents a time value with hours and minutes.
3229
3293
  *
3230
3294
  * @publicApi
3295
+ *
3296
+ * @deprecated Locale date getters are deprecated
3231
3297
  */
3232
3298
  export declare type Time = {
3233
3299
  hours: number;
@@ -3268,6 +3334,8 @@ export declare class TitleCasePipe implements PipeTransform {
3268
3334
  * Examples are given for the word "Sunday" in English.
3269
3335
  *
3270
3336
  * @publicApi
3337
+ *
3338
+ * @deprecated locale data getters are deprecated
3271
3339
  */
3272
3340
  export declare enum TranslationWidth {
3273
3341
  /** 1 character for `en-US`. For example: 'S' */
@@ -3347,6 +3415,8 @@ export declare abstract class ViewportScroller {
3347
3415
  * The value for each day of the week, based on the `en-US` locale
3348
3416
  *
3349
3417
  * @publicApi
3418
+ *
3419
+ * @deprecated Week locale getters are deprecated
3350
3420
  */
3351
3421
  export declare enum WeekDay {
3352
3422
  Sunday = 0,
@@ -3437,10 +3507,6 @@ export declare const ɵPLATFORM_BROWSER_ID = "browser";
3437
3507
 
3438
3508
  export declare const ɵPLATFORM_SERVER_ID = "server";
3439
3509
 
3440
- export declare const ɵPLATFORM_WORKER_APP_ID = "browserWorkerApp";
3441
-
3442
- export declare const ɵPLATFORM_WORKER_UI_ID = "browserWorkerUi";
3443
-
3444
3510
  /**
3445
3511
  * This class wraps the platform Navigation API which allows server-specific and test
3446
3512
  * implementations.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/common",
3
- "version": "18.0.0-next.4",
3
+ "version": "18.0.0-next.6",
4
4
  "description": "Angular - commonly needed directives and services",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -54,7 +54,7 @@
54
54
  }
55
55
  },
56
56
  "peerDependencies": {
57
- "@angular/core": "18.0.0-next.4",
57
+ "@angular/core": "18.0.0-next.6",
58
58
  "rxjs": "^6.5.3 || ^7.4.0"
59
59
  },
60
60
  "repository": {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.0.0-next.4
2
+ * @license Angular v18.0.0-next.6
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v18.0.0-next.4
2
+ * @license Angular v18.0.0-next.6
3
3
  * (c) 2010-2024 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */