@angular/common 15.0.0-rc.2 → 15.0.0-rc.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.
Files changed (62) hide show
  1. package/esm2020/http/public_api.mjs +2 -2
  2. package/esm2020/http/src/client.mjs +3 -3
  3. package/esm2020/http/src/interceptor.mjs +4 -4
  4. package/esm2020/http/src/jsonp.mjs +6 -6
  5. package/esm2020/http/src/module.mjs +16 -16
  6. package/esm2020/http/src/provider.mjs +77 -2
  7. package/esm2020/http/src/xhr.mjs +3 -3
  8. package/esm2020/http/src/xsrf.mjs +6 -6
  9. package/esm2020/http/testing/src/backend.mjs +3 -3
  10. package/esm2020/http/testing/src/module.mjs +4 -4
  11. package/esm2020/src/common_module.mjs +4 -4
  12. package/esm2020/src/directives/ng_class.mjs +3 -3
  13. package/esm2020/src/directives/ng_component_outlet.mjs +3 -3
  14. package/esm2020/src/directives/ng_for_of.mjs +3 -3
  15. package/esm2020/src/directives/ng_if.mjs +3 -3
  16. package/esm2020/src/directives/ng_optimized_image/lcp_image_observer.mjs +3 -3
  17. package/esm2020/src/directives/ng_optimized_image/ng_optimized_image.mjs +27 -8
  18. package/esm2020/src/directives/ng_optimized_image/preconnect_link_checker.mjs +3 -3
  19. package/esm2020/src/directives/ng_optimized_image/preload-link-creator.mjs +3 -3
  20. package/esm2020/src/directives/ng_plural.mjs +6 -6
  21. package/esm2020/src/directives/ng_style.mjs +3 -3
  22. package/esm2020/src/directives/ng_switch.mjs +9 -9
  23. package/esm2020/src/directives/ng_template_outlet.mjs +3 -3
  24. package/esm2020/src/i18n/localization.mjs +6 -6
  25. package/esm2020/src/location/hash_location_strategy.mjs +3 -3
  26. package/esm2020/src/location/location.mjs +3 -3
  27. package/esm2020/src/location/location_strategy.mjs +6 -6
  28. package/esm2020/src/location/platform_location.mjs +6 -6
  29. package/esm2020/src/pipes/async_pipe.mjs +3 -3
  30. package/esm2020/src/pipes/case_conversion_pipes.mjs +9 -9
  31. package/esm2020/src/pipes/date_pipe.mjs +3 -3
  32. package/esm2020/src/pipes/i18n_plural_pipe.mjs +3 -3
  33. package/esm2020/src/pipes/i18n_select_pipe.mjs +3 -3
  34. package/esm2020/src/pipes/json_pipe.mjs +3 -3
  35. package/esm2020/src/pipes/keyvalue_pipe.mjs +3 -3
  36. package/esm2020/src/pipes/number_pipe.mjs +9 -9
  37. package/esm2020/src/pipes/slice_pipe.mjs +3 -3
  38. package/esm2020/src/version.mjs +1 -1
  39. package/esm2020/testing/src/location_mock.mjs +3 -3
  40. package/esm2020/testing/src/mock_location_strategy.mjs +3 -3
  41. package/esm2020/testing/src/mock_platform_location.mjs +3 -3
  42. package/esm2020/upgrade/src/location_upgrade_module.mjs +4 -4
  43. package/fesm2015/common.mjs +137 -118
  44. package/fesm2015/common.mjs.map +1 -1
  45. package/fesm2015/http/testing.mjs +8 -8
  46. package/fesm2015/http.mjs +113 -38
  47. package/fesm2015/http.mjs.map +1 -1
  48. package/fesm2015/testing.mjs +10 -10
  49. package/fesm2015/upgrade.mjs +5 -5
  50. package/fesm2020/common.mjs +137 -118
  51. package/fesm2020/common.mjs.map +1 -1
  52. package/fesm2020/http/testing.mjs +8 -8
  53. package/fesm2020/http.mjs +113 -38
  54. package/fesm2020/http.mjs.map +1 -1
  55. package/fesm2020/testing.mjs +10 -10
  56. package/fesm2020/upgrade.mjs +5 -5
  57. package/http/index.d.ts +87 -3
  58. package/http/testing/index.d.ts +1 -1
  59. package/index.d.ts +1 -1
  60. package/package.json +2 -2
  61. package/testing/index.d.ts +1 -1
  62. package/upgrade/index.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v15.0.0-rc.2
2
+ * @license Angular v15.0.0-rc.3
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -330,9 +330,9 @@ class HttpClientTestingBackend {
330
330
  }
331
331
  }
332
332
  }
333
- HttpClientTestingBackend.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpClientTestingBackend, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
334
- HttpClientTestingBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpClientTestingBackend });
335
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpClientTestingBackend, decorators: [{
333
+ HttpClientTestingBackend.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpClientTestingBackend, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
334
+ HttpClientTestingBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpClientTestingBackend });
335
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpClientTestingBackend, decorators: [{
336
336
  type: Injectable
337
337
  }] });
338
338
  function describeRequest(testRequest) {
@@ -372,12 +372,12 @@ function provideHttpClientTesting() {
372
372
  */
373
373
  class HttpClientTestingModule {
374
374
  }
375
- HttpClientTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpClientTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
376
- HttpClientTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpClientTestingModule, imports: [HttpClientModule] });
377
- HttpClientTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpClientTestingModule, providers: [
375
+ HttpClientTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpClientTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
376
+ HttpClientTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpClientTestingModule, imports: [HttpClientModule] });
377
+ HttpClientTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpClientTestingModule, providers: [
378
378
  provideHttpClientTesting(),
379
379
  ], imports: [HttpClientModule] });
380
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpClientTestingModule, decorators: [{
380
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpClientTestingModule, decorators: [{
381
381
  type: NgModule,
382
382
  args: [{
383
383
  imports: [
package/fesm2015/http.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v15.0.0-rc.2
2
+ * @license Angular v15.0.0-rc.3
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1416,9 +1416,9 @@ class HttpClient {
1416
1416
  return this.request('PUT', url, addBody(options, body));
1417
1417
  }
1418
1418
  }
1419
- HttpClient.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpClient, deps: [{ token: HttpHandler }], target: i0.ɵɵFactoryTarget.Injectable });
1420
- HttpClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpClient });
1421
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpClient, decorators: [{
1419
+ HttpClient.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpClient, deps: [{ token: HttpHandler }], target: i0.ɵɵFactoryTarget.Injectable });
1420
+ HttpClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpClient });
1421
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpClient, decorators: [{
1422
1422
  type: Injectable
1423
1423
  }], ctorParameters: function () { return [{ type: HttpHandler }]; } });
1424
1424
 
@@ -1499,9 +1499,9 @@ class HttpInterceptorHandler extends HttpHandler {
1499
1499
  return this.chain(initialRequest, downstreamRequest => this.backend.handle(downstreamRequest));
1500
1500
  }
1501
1501
  }
1502
- HttpInterceptorHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpInterceptorHandler, deps: [{ token: HttpBackend }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
1503
- HttpInterceptorHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpInterceptorHandler });
1504
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpInterceptorHandler, decorators: [{
1502
+ HttpInterceptorHandler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpInterceptorHandler, deps: [{ token: HttpBackend }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
1503
+ HttpInterceptorHandler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpInterceptorHandler });
1504
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpInterceptorHandler, decorators: [{
1505
1505
  type: Injectable
1506
1506
  }], ctorParameters: function () { return [{ type: HttpBackend }, { type: i0.EnvironmentInjector }]; } });
1507
1507
 
@@ -1711,9 +1711,9 @@ class JsonpClientBackend {
1711
1711
  foreignDocument.adoptNode(script);
1712
1712
  }
1713
1713
  }
1714
- JsonpClientBackend.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: JsonpClientBackend, deps: [{ token: JsonpCallbackContext }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
1715
- JsonpClientBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: JsonpClientBackend });
1716
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: JsonpClientBackend, decorators: [{
1714
+ JsonpClientBackend.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: JsonpClientBackend, deps: [{ token: JsonpCallbackContext }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
1715
+ JsonpClientBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: JsonpClientBackend });
1716
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: JsonpClientBackend, decorators: [{
1717
1717
  type: Injectable
1718
1718
  }], ctorParameters: function () {
1719
1719
  return [{ type: JsonpCallbackContext }, { type: undefined, decorators: [{
@@ -1754,9 +1754,9 @@ class JsonpInterceptor {
1754
1754
  return this.injector.runInContext(() => jsonpInterceptorFn(initialRequest, downstreamRequest => next.handle(downstreamRequest)));
1755
1755
  }
1756
1756
  }
1757
- JsonpInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: JsonpInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
1758
- JsonpInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: JsonpInterceptor });
1759
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: JsonpInterceptor, decorators: [{
1757
+ JsonpInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: JsonpInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
1758
+ JsonpInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: JsonpInterceptor });
1759
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: JsonpInterceptor, decorators: [{
1760
1760
  type: Injectable
1761
1761
  }], ctorParameters: function () { return [{ type: i0.EnvironmentInjector }]; } });
1762
1762
 
@@ -2025,9 +2025,9 @@ class HttpXhrBackend {
2025
2025
  });
2026
2026
  }
2027
2027
  }
2028
- HttpXhrBackend.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpXhrBackend, deps: [{ token: i1.XhrFactory }], target: i0.ɵɵFactoryTarget.Injectable });
2029
- HttpXhrBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpXhrBackend });
2030
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpXhrBackend, decorators: [{
2028
+ HttpXhrBackend.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpXhrBackend, deps: [{ token: i1.XhrFactory }], target: i0.ɵɵFactoryTarget.Injectable });
2029
+ HttpXhrBackend.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpXhrBackend });
2030
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpXhrBackend, decorators: [{
2031
2031
  type: Injectable
2032
2032
  }], ctorParameters: function () { return [{ type: i1.XhrFactory }]; } });
2033
2033
 
@@ -2084,9 +2084,9 @@ class HttpXsrfCookieExtractor {
2084
2084
  return this.lastToken;
2085
2085
  }
2086
2086
  }
2087
- HttpXsrfCookieExtractor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpXsrfCookieExtractor, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: XSRF_COOKIE_NAME }], target: i0.ɵɵFactoryTarget.Injectable });
2088
- HttpXsrfCookieExtractor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpXsrfCookieExtractor });
2089
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpXsrfCookieExtractor, decorators: [{
2087
+ HttpXsrfCookieExtractor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpXsrfCookieExtractor, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: XSRF_COOKIE_NAME }], target: i0.ɵɵFactoryTarget.Injectable });
2088
+ HttpXsrfCookieExtractor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpXsrfCookieExtractor });
2089
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpXsrfCookieExtractor, decorators: [{
2090
2090
  type: Injectable
2091
2091
  }], ctorParameters: function () {
2092
2092
  return [{ type: undefined, decorators: [{
@@ -2129,9 +2129,9 @@ class HttpXsrfInterceptor {
2129
2129
  return this.injector.runInContext(() => xsrfInterceptorFn(initialRequest, downstreamRequest => next.handle(downstreamRequest)));
2130
2130
  }
2131
2131
  }
2132
- HttpXsrfInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpXsrfInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
2133
- HttpXsrfInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpXsrfInterceptor });
2134
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpXsrfInterceptor, decorators: [{
2132
+ HttpXsrfInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpXsrfInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
2133
+ HttpXsrfInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpXsrfInterceptor });
2134
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpXsrfInterceptor, decorators: [{
2135
2135
  type: Injectable
2136
2136
  }], ctorParameters: function () { return [{ type: i0.EnvironmentInjector }]; } });
2137
2137
 
@@ -2142,6 +2142,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.2", ng
2142
2142
  * Use of this source code is governed by an MIT-style license that can be
2143
2143
  * found in the LICENSE file at https://angular.io/license
2144
2144
  */
2145
+ /**
2146
+ * Identifies a particular kind of `HttpFeature`.
2147
+ *
2148
+ * @publicApi
2149
+ */
2145
2150
  var HttpFeatureKind;
2146
2151
  (function (HttpFeatureKind) {
2147
2152
  HttpFeatureKind[HttpFeatureKind["Interceptors"] = 0] = "Interceptors";
@@ -2157,6 +2162,21 @@ function makeHttpFeature(kind, providers) {
2157
2162
  ɵproviders: providers,
2158
2163
  };
2159
2164
  }
2165
+ /**
2166
+ * Configures Angular's `HttpClient` service to be available for injection.
2167
+ *
2168
+ * By default, `HttpClient` will be configured for injection with its default options for XSRF
2169
+ * protection of outgoing requests. Additional configuration options can be provided by passing
2170
+ * feature functions to `provideHttpClient`. For example, HTTP interceptors can be added using the
2171
+ * `withInterceptors(...)` feature.
2172
+ *
2173
+ * @see withInterceptors
2174
+ * @see withInterceptorsFromDi
2175
+ * @see withXsrfConfiguration
2176
+ * @see withNoXsrfProtection
2177
+ * @see withJsonpSupport
2178
+ * @see withRequestsMadeViaParent
2179
+ */
2160
2180
  function provideHttpClient(...features) {
2161
2181
  if (ngDevMode) {
2162
2182
  const featureKinds = new Set(features.map(f => f.ɵkind));
@@ -2186,6 +2206,14 @@ function provideHttpClient(...features) {
2186
2206
  }
2187
2207
  return makeEnvironmentProviders(providers);
2188
2208
  }
2209
+ /**
2210
+ * Adds one or more functional-style HTTP interceptors to the configuration of the `HttpClient`
2211
+ * instance.
2212
+ *
2213
+ * @see HttpInterceptorFn
2214
+ * @see provideHttpClient
2215
+ * @publicApi
2216
+ */
2189
2217
  function withInterceptors(interceptorFns) {
2190
2218
  return makeHttpFeature(HttpFeatureKind.Interceptors, interceptorFns.map(interceptorFn => {
2191
2219
  return {
@@ -2196,7 +2224,18 @@ function withInterceptors(interceptorFns) {
2196
2224
  }));
2197
2225
  }
2198
2226
  const LEGACY_INTERCEPTOR_FN = new InjectionToken('LEGACY_INTERCEPTOR_FN');
2199
- function withLegacyInterceptors() {
2227
+ /**
2228
+ * Includes class-based interceptors configured using a multi-provider in the current injector into
2229
+ * the configured `HttpClient` instance.
2230
+ *
2231
+ * Prefer `withInterceptors` and functional interceptors instead, as support for DI-provided
2232
+ * interceptors may be phased out in a later release.
2233
+ *
2234
+ * @see HttpInterceptor
2235
+ * @see HTTP_INTERCEPTORS
2236
+ * @see provideHttpClient
2237
+ */
2238
+ function withInterceptorsFromDi() {
2200
2239
  // Note: the legacy interceptor function is provided here via an intermediate token
2201
2240
  // (`LEGACY_INTERCEPTOR_FN`), using a pattern which guarantees that if these providers are
2202
2241
  // included multiple times, all of the multi-provider entries will have the same instance of the
@@ -2214,6 +2253,13 @@ function withLegacyInterceptors() {
2214
2253
  }
2215
2254
  ]);
2216
2255
  }
2256
+ /**
2257
+ * Customizes the XSRF protection for the configuration of the current `HttpClient` instance.
2258
+ *
2259
+ * This feature is incompatible with the `withNoXsrfProtection` feature.
2260
+ *
2261
+ * @see provideHttpClient
2262
+ */
2217
2263
  function withXsrfConfiguration({ cookieName, headerName }) {
2218
2264
  const providers = [];
2219
2265
  if (cookieName !== undefined) {
@@ -2224,6 +2270,13 @@ function withXsrfConfiguration({ cookieName, headerName }) {
2224
2270
  }
2225
2271
  return makeHttpFeature(HttpFeatureKind.CustomXsrfConfiguration, providers);
2226
2272
  }
2273
+ /**
2274
+ * Disables XSRF protection in the configuration of the current `HttpClient` instance.
2275
+ *
2276
+ * This feature is incompatible with the `withXsrfConfiguration` feature.
2277
+ *
2278
+ * @see provideHttpClient
2279
+ */
2227
2280
  function withNoXsrfProtection() {
2228
2281
  return makeHttpFeature(HttpFeatureKind.NoXsrfProtection, [
2229
2282
  {
@@ -2232,6 +2285,11 @@ function withNoXsrfProtection() {
2232
2285
  },
2233
2286
  ]);
2234
2287
  }
2288
+ /**
2289
+ * Add JSONP support to the configuration of the current `HttpClient` instance.
2290
+ *
2291
+ * @see provideHttpClient
2292
+ */
2235
2293
  function withJsonpSupport() {
2236
2294
  return makeHttpFeature(HttpFeatureKind.JsonpSupport, [
2237
2295
  JsonpClientBackend,
@@ -2240,6 +2298,23 @@ function withJsonpSupport() {
2240
2298
  ]);
2241
2299
  }
2242
2300
  /**
2301
+ * Configures the current `HttpClient` instance to make requests via the parent injector's
2302
+ * `HttpClient` instead of directly.
2303
+ *
2304
+ * By default, `provideHttpClient` configures `HttpClient` in its injector to be an independent
2305
+ * instance. For example, even if `HttpClient` is configured in the parent injector with
2306
+ * one or more interceptors, they will not intercept requests made via this instance.
2307
+ *
2308
+ * With this option enabled, once the request has passed through the current injector's
2309
+ * interceptors, it will be delegated to the parent injector's `HttpClient` chain instead of
2310
+ * dispatched directly, and interceptors in the parent configuration will be applied to the request.
2311
+ *
2312
+ * If there are several `HttpClient` instances in the injector hierarchy, it's possible for
2313
+ * `withRequestsMadeViaParent` to be used at multiple levels, which will cause the request to
2314
+ * "bubble up" until either reaching the root level or an `HttpClient` which was not configured with
2315
+ * this option.
2316
+ *
2317
+ * @see provideHttpClient
2243
2318
  * @developerPreview
2244
2319
  */
2245
2320
  function withRequestsMadeViaParent() {
@@ -2303,9 +2378,9 @@ class HttpClientXsrfModule {
2303
2378
  };
2304
2379
  }
2305
2380
  }
2306
- HttpClientXsrfModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpClientXsrfModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2307
- HttpClientXsrfModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpClientXsrfModule });
2308
- HttpClientXsrfModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpClientXsrfModule, providers: [
2381
+ HttpClientXsrfModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpClientXsrfModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2382
+ HttpClientXsrfModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpClientXsrfModule });
2383
+ HttpClientXsrfModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpClientXsrfModule, providers: [
2309
2384
  HttpXsrfInterceptor,
2310
2385
  { provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },
2311
2386
  { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },
@@ -2315,7 +2390,7 @@ HttpClientXsrfModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
2315
2390
  }).ɵproviders,
2316
2391
  { provide: XSRF_ENABLED, useValue: true },
2317
2392
  ] });
2318
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpClientXsrfModule, decorators: [{
2393
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpClientXsrfModule, decorators: [{
2319
2394
  type: NgModule,
2320
2395
  args: [{
2321
2396
  providers: [
@@ -2341,15 +2416,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.2", ng
2341
2416
  */
2342
2417
  class HttpClientModule {
2343
2418
  }
2344
- HttpClientModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpClientModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2345
- HttpClientModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpClientModule });
2346
- HttpClientModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpClientModule, providers: [
2347
- provideHttpClient(withLegacyInterceptors(), withXsrfConfiguration({
2419
+ HttpClientModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpClientModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2420
+ HttpClientModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpClientModule });
2421
+ HttpClientModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpClientModule, providers: [
2422
+ provideHttpClient(withInterceptorsFromDi(), withXsrfConfiguration({
2348
2423
  cookieName: XSRF_DEFAULT_COOKIE_NAME,
2349
2424
  headerName: XSRF_DEFAULT_HEADER_NAME,
2350
2425
  })),
2351
2426
  ] });
2352
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpClientModule, decorators: [{
2427
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpClientModule, decorators: [{
2353
2428
  type: NgModule,
2354
2429
  args: [{
2355
2430
  /**
@@ -2357,7 +2432,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.2", ng
2357
2432
  * with supporting services for HTTP communications.
2358
2433
  */
2359
2434
  providers: [
2360
- provideHttpClient(withLegacyInterceptors(), withXsrfConfiguration({
2435
+ provideHttpClient(withInterceptorsFromDi(), withXsrfConfiguration({
2361
2436
  cookieName: XSRF_DEFAULT_COOKIE_NAME,
2362
2437
  headerName: XSRF_DEFAULT_HEADER_NAME,
2363
2438
  })),
@@ -2374,12 +2449,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.2", ng
2374
2449
  */
2375
2450
  class HttpClientJsonpModule {
2376
2451
  }
2377
- HttpClientJsonpModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpClientJsonpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2378
- HttpClientJsonpModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpClientJsonpModule });
2379
- HttpClientJsonpModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpClientJsonpModule, providers: [
2452
+ HttpClientJsonpModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpClientJsonpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2453
+ HttpClientJsonpModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpClientJsonpModule });
2454
+ HttpClientJsonpModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpClientJsonpModule, providers: [
2380
2455
  withJsonpSupport().ɵproviders,
2381
2456
  ] });
2382
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.2", ngImport: i0, type: HttpClientJsonpModule, decorators: [{
2457
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-rc.3", ngImport: i0, type: HttpClientJsonpModule, decorators: [{
2383
2458
  type: NgModule,
2384
2459
  args: [{
2385
2460
  providers: [
@@ -2417,5 +2492,5 @@ const XhrFactory = XhrFactory$1;
2417
2492
  * Generated bundle index. Do not edit.
2418
2493
  */
2419
2494
 
2420
- export { HTTP_INTERCEPTORS, HttpBackend, HttpClient, HttpClientJsonpModule, HttpClientModule, HttpClientXsrfModule, HttpContext, HttpContextToken, HttpErrorResponse, HttpEventType, HttpFeatureKind, HttpHandler, HttpHeaderResponse, HttpHeaders, HttpParams, HttpRequest, HttpResponse, HttpResponseBase, HttpUrlEncodingCodec, HttpXhrBackend, HttpXsrfTokenExtractor, JsonpClientBackend, JsonpInterceptor, XhrFactory, provideHttpClient, withInterceptors, withJsonpSupport, withLegacyInterceptors, withNoXsrfProtection, withRequestsMadeViaParent, withXsrfConfiguration, HttpInterceptorHandler as ɵHttpInterceptingHandler, HttpInterceptorHandler as ɵHttpInterceptorHandler };
2495
+ export { HTTP_INTERCEPTORS, HttpBackend, HttpClient, HttpClientJsonpModule, HttpClientModule, HttpClientXsrfModule, HttpContext, HttpContextToken, HttpErrorResponse, HttpEventType, HttpFeatureKind, HttpHandler, HttpHeaderResponse, HttpHeaders, HttpParams, HttpRequest, HttpResponse, HttpResponseBase, HttpUrlEncodingCodec, HttpXhrBackend, HttpXsrfTokenExtractor, JsonpClientBackend, JsonpInterceptor, XhrFactory, provideHttpClient, withInterceptors, withInterceptorsFromDi, withJsonpSupport, withNoXsrfProtection, withRequestsMadeViaParent, withXsrfConfiguration, HttpInterceptorHandler as ɵHttpInterceptingHandler, HttpInterceptorHandler as ɵHttpInterceptorHandler };
2421
2496
  //# sourceMappingURL=http.mjs.map