@angular/common 21.2.0 → 22.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/_common_module-chunk.mjs +86 -86
- package/fesm2022/_location-chunk.mjs +16 -16
- package/fesm2022/_module-chunk.mjs +59 -58
- package/fesm2022/_module-chunk.mjs.map +1 -1
- 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 +17 -17
- package/fesm2022/common.mjs.map +1 -1
- package/fesm2022/http-testing.mjs +8 -8
- package/fesm2022/http.mjs +227 -166
- package/fesm2022/http.mjs.map +1 -1
- package/fesm2022/testing.mjs +13 -13
- package/fesm2022/upgrade.mjs +5 -5
- package/package.json +3 -3
- package/types/_common_module-chunk.d.ts +1 -1
- package/types/_module-chunk.d.ts +6 -2
- package/types/_platform_location-chunk.d.ts +1 -1
- package/types/_xhr-chunk.d.ts +1 -1
- package/types/common.d.ts +1 -1
- package/types/http-testing.d.ts +1 -1
- package/types/http.d.ts +32 -21
- package/types/testing.d.ts +1 -1
- package/types/upgrade.d.ts +1 -1
package/types/http.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular
|
|
2
|
+
* @license Angular v22.0.0-next.0
|
|
3
3
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -8,7 +8,7 @@ import { Observable } from 'rxjs';
|
|
|
8
8
|
import { HttpRequest, HttpEvent, HttpHeaders, HttpContext, HttpParams, HttpResponse, HttpProgressEvent } from './_module-chunk.js';
|
|
9
9
|
export { HttpClientJsonpModule, HttpClientModule, HttpClientXsrfModule, HttpContextToken, HttpDownloadProgressEvent, HttpErrorResponse, HttpEventType, HttpHeaderResponse, HttpParameterCodec, HttpParamsOptions, HttpResponseBase, HttpSentEvent, HttpStatusCode, HttpUploadProgressEvent, HttpUrlEncodingCodec, HttpUserEvent } from './_module-chunk.js';
|
|
10
10
|
import * as i0 from '@angular/core';
|
|
11
|
-
import { EnvironmentInjector, InjectionToken, Provider, EnvironmentProviders, Injector, ValueEqualityFn, WritableResource, ResourceRef, Signal } from '@angular/core';
|
|
11
|
+
import { EnvironmentInjector, InjectionToken, Provider, EnvironmentProviders, Injector, ValueEqualityFn, WritableResource, ResourceRef, Signal, ResourceParamsContext } from '@angular/core';
|
|
12
12
|
import { XhrFactory } from './_xhr-chunk.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -4093,7 +4093,8 @@ declare enum HttpFeatureKind {
|
|
|
4093
4093
|
NoXsrfProtection = 3,
|
|
4094
4094
|
JsonpSupport = 4,
|
|
4095
4095
|
RequestsMadeViaParent = 5,
|
|
4096
|
-
Fetch = 6
|
|
4096
|
+
Fetch = 6,
|
|
4097
|
+
Xhr = 7
|
|
4097
4098
|
}
|
|
4098
4099
|
/**
|
|
4099
4100
|
* A feature for use when configuring `provideHttpClient`.
|
|
@@ -4131,7 +4132,7 @@ interface HttpFeature<KindT extends HttpFeatureKind> {
|
|
|
4131
4132
|
* @see {@link withNoXsrfProtection}
|
|
4132
4133
|
* @see {@link withJsonpSupport}
|
|
4133
4134
|
* @see {@link withRequestsMadeViaParent}
|
|
4134
|
-
* @see {@link
|
|
4135
|
+
* @see {@link withXhr}
|
|
4135
4136
|
*/
|
|
4136
4137
|
declare function provideHttpClient(...features: HttpFeature<HttpFeatureKind>[]): EnvironmentProviders;
|
|
4137
4138
|
/**
|
|
@@ -4210,8 +4211,18 @@ declare function withRequestsMadeViaParent(): HttpFeature<HttpFeatureKind.Reques
|
|
|
4210
4211
|
* @see [Advanced fetch Options](guide/http/making-requests#advanced-fetch-options)
|
|
4211
4212
|
*
|
|
4212
4213
|
* @publicApi
|
|
4214
|
+
* @deprecated `withFetch` is not required anymore. `FetchBackend` is the default `HttpBackend`.
|
|
4213
4215
|
*/
|
|
4214
4216
|
declare function withFetch(): HttpFeature<HttpFeatureKind.Fetch>;
|
|
4217
|
+
/**
|
|
4218
|
+
* Configures the current `HttpClient` instance to make requests using the Xhr API.
|
|
4219
|
+
*
|
|
4220
|
+
* Use this feature if you want to report progress on uploads as the Xhr API supports it.
|
|
4221
|
+
*
|
|
4222
|
+
* @see {@link provideHttpClient}
|
|
4223
|
+
* @publicApi
|
|
4224
|
+
*/
|
|
4225
|
+
declare function withXhr(): HttpFeature<HttpFeatureKind.Xhr>;
|
|
4215
4226
|
|
|
4216
4227
|
/**
|
|
4217
4228
|
* The structure of an `httpResource` request which will be sent to the backend.
|
|
@@ -4400,7 +4411,7 @@ interface HttpResourceFn {
|
|
|
4400
4411
|
*
|
|
4401
4412
|
* @experimental 19.2
|
|
4402
4413
|
*/
|
|
4403
|
-
<TResult = unknown>(url: () => string | undefined, options: HttpResourceOptions<TResult, unknown> & {
|
|
4414
|
+
<TResult = unknown>(url: (ctx: ResourceParamsContext) => string | undefined, options: HttpResourceOptions<TResult, unknown> & {
|
|
4404
4415
|
defaultValue: NoInfer<TResult>;
|
|
4405
4416
|
}): HttpResourceRef<TResult>;
|
|
4406
4417
|
/**
|
|
@@ -4414,7 +4425,7 @@ interface HttpResourceFn {
|
|
|
4414
4425
|
*
|
|
4415
4426
|
* @experimental 19.2
|
|
4416
4427
|
*/
|
|
4417
|
-
<TResult = unknown>(url: () => string | undefined, options?: HttpResourceOptions<TResult, unknown>): HttpResourceRef<TResult | undefined>;
|
|
4428
|
+
<TResult = unknown>(url: (ctx: ResourceParamsContext) => string | undefined, options?: HttpResourceOptions<TResult, unknown>): HttpResourceRef<TResult | undefined>;
|
|
4418
4429
|
/**
|
|
4419
4430
|
* Create a `Resource` that fetches data with the configured HTTP request.
|
|
4420
4431
|
*
|
|
@@ -4426,7 +4437,7 @@ interface HttpResourceFn {
|
|
|
4426
4437
|
*
|
|
4427
4438
|
* @experimental 19.2
|
|
4428
4439
|
*/
|
|
4429
|
-
<TResult = unknown>(request: () => HttpResourceRequest | undefined, options: HttpResourceOptions<TResult, unknown> & {
|
|
4440
|
+
<TResult = unknown>(request: (ctx: ResourceParamsContext) => HttpResourceRequest | undefined, options: HttpResourceOptions<TResult, unknown> & {
|
|
4430
4441
|
defaultValue: NoInfer<TResult>;
|
|
4431
4442
|
}): HttpResourceRef<TResult>;
|
|
4432
4443
|
/**
|
|
@@ -4440,7 +4451,7 @@ interface HttpResourceFn {
|
|
|
4440
4451
|
*
|
|
4441
4452
|
* @experimental 19.2
|
|
4442
4453
|
*/
|
|
4443
|
-
<TResult = unknown>(request: () => HttpResourceRequest | undefined, options?: HttpResourceOptions<TResult, unknown>): HttpResourceRef<TResult | undefined>;
|
|
4454
|
+
<TResult = unknown>(request: (ctx: ResourceParamsContext) => HttpResourceRequest | undefined, options?: HttpResourceOptions<TResult, unknown>): HttpResourceRef<TResult | undefined>;
|
|
4444
4455
|
/**
|
|
4445
4456
|
* Create a `Resource` that fetches data with the configured HTTP request.
|
|
4446
4457
|
*
|
|
@@ -4452,14 +4463,14 @@ interface HttpResourceFn {
|
|
|
4452
4463
|
* @experimental 19.2
|
|
4453
4464
|
*/
|
|
4454
4465
|
arrayBuffer: {
|
|
4455
|
-
<TResult = ArrayBuffer>(url: () => string | undefined, options: HttpResourceOptions<TResult, ArrayBuffer> & {
|
|
4466
|
+
<TResult = ArrayBuffer>(url: (ctx: ResourceParamsContext) => string | undefined, options: HttpResourceOptions<TResult, ArrayBuffer> & {
|
|
4456
4467
|
defaultValue: NoInfer<TResult>;
|
|
4457
4468
|
}): HttpResourceRef<TResult>;
|
|
4458
|
-
<TResult = ArrayBuffer>(url: () => string | undefined, options?: HttpResourceOptions<TResult, ArrayBuffer>): HttpResourceRef<TResult | undefined>;
|
|
4459
|
-
<TResult = ArrayBuffer>(request: () => HttpResourceRequest | undefined, options: HttpResourceOptions<TResult, ArrayBuffer> & {
|
|
4469
|
+
<TResult = ArrayBuffer>(url: (ctx: ResourceParamsContext) => string | undefined, options?: HttpResourceOptions<TResult, ArrayBuffer>): HttpResourceRef<TResult | undefined>;
|
|
4470
|
+
<TResult = ArrayBuffer>(request: (ctx: ResourceParamsContext) => HttpResourceRequest | undefined, options: HttpResourceOptions<TResult, ArrayBuffer> & {
|
|
4460
4471
|
defaultValue: NoInfer<TResult>;
|
|
4461
4472
|
}): HttpResourceRef<TResult>;
|
|
4462
|
-
<TResult = ArrayBuffer>(request: () => HttpResourceRequest | undefined, options?: HttpResourceOptions<TResult, ArrayBuffer>): HttpResourceRef<TResult | undefined>;
|
|
4473
|
+
<TResult = ArrayBuffer>(request: (ctx: ResourceParamsContext) => HttpResourceRequest | undefined, options?: HttpResourceOptions<TResult, ArrayBuffer>): HttpResourceRef<TResult | undefined>;
|
|
4463
4474
|
};
|
|
4464
4475
|
/**
|
|
4465
4476
|
* Create a `Resource` that fetches data with the configured HTTP request.
|
|
@@ -4472,14 +4483,14 @@ interface HttpResourceFn {
|
|
|
4472
4483
|
* @experimental 19.2
|
|
4473
4484
|
*/
|
|
4474
4485
|
blob: {
|
|
4475
|
-
<TResult = Blob>(url: () => string | undefined, options: HttpResourceOptions<TResult, Blob> & {
|
|
4486
|
+
<TResult = Blob>(url: (ctx: ResourceParamsContext) => string | undefined, options: HttpResourceOptions<TResult, Blob> & {
|
|
4476
4487
|
defaultValue: NoInfer<TResult>;
|
|
4477
4488
|
}): HttpResourceRef<TResult>;
|
|
4478
|
-
<TResult = Blob>(url: () => string | undefined, options?: HttpResourceOptions<TResult, Blob>): HttpResourceRef<TResult | undefined>;
|
|
4479
|
-
<TResult = Blob>(request: () => HttpResourceRequest | undefined, options: HttpResourceOptions<TResult, Blob> & {
|
|
4489
|
+
<TResult = Blob>(url: (ctx: ResourceParamsContext) => string | undefined, options?: HttpResourceOptions<TResult, Blob>): HttpResourceRef<TResult | undefined>;
|
|
4490
|
+
<TResult = Blob>(request: (ctx: ResourceParamsContext) => HttpResourceRequest | undefined, options: HttpResourceOptions<TResult, Blob> & {
|
|
4480
4491
|
defaultValue: NoInfer<TResult>;
|
|
4481
4492
|
}): HttpResourceRef<TResult>;
|
|
4482
|
-
<TResult = Blob>(request: () => HttpResourceRequest | undefined, options?: HttpResourceOptions<TResult, Blob>): HttpResourceRef<TResult | undefined>;
|
|
4493
|
+
<TResult = Blob>(request: (ctx: ResourceParamsContext) => HttpResourceRequest | undefined, options?: HttpResourceOptions<TResult, Blob>): HttpResourceRef<TResult | undefined>;
|
|
4483
4494
|
};
|
|
4484
4495
|
/**
|
|
4485
4496
|
* Create a `Resource` that fetches data with the configured HTTP request.
|
|
@@ -4492,14 +4503,14 @@ interface HttpResourceFn {
|
|
|
4492
4503
|
* @experimental 19.2
|
|
4493
4504
|
*/
|
|
4494
4505
|
text: {
|
|
4495
|
-
<TResult = string>(url: () => string | undefined, options: HttpResourceOptions<TResult, string> & {
|
|
4506
|
+
<TResult = string>(url: (ctx: ResourceParamsContext) => string | undefined, options: HttpResourceOptions<TResult, string> & {
|
|
4496
4507
|
defaultValue: NoInfer<TResult>;
|
|
4497
4508
|
}): HttpResourceRef<TResult>;
|
|
4498
|
-
<TResult = string>(url: () => string | undefined, options?: HttpResourceOptions<TResult, string>): HttpResourceRef<TResult | undefined>;
|
|
4499
|
-
<TResult = string>(request: () => HttpResourceRequest | undefined, options: HttpResourceOptions<TResult, string> & {
|
|
4509
|
+
<TResult = string>(url: (ctx: ResourceParamsContext) => string | undefined, options?: HttpResourceOptions<TResult, string>): HttpResourceRef<TResult | undefined>;
|
|
4510
|
+
<TResult = string>(request: (ctx: ResourceParamsContext) => HttpResourceRequest | undefined, options: HttpResourceOptions<TResult, string> & {
|
|
4500
4511
|
defaultValue: NoInfer<TResult>;
|
|
4501
4512
|
}): HttpResourceRef<TResult>;
|
|
4502
|
-
<TResult = string>(request: () => HttpResourceRequest | undefined, options?: HttpResourceOptions<TResult, string>): HttpResourceRef<TResult | undefined>;
|
|
4513
|
+
<TResult = string>(request: (ctx: ResourceParamsContext) => HttpResourceRequest | undefined, options?: HttpResourceOptions<TResult, string>): HttpResourceRef<TResult | undefined>;
|
|
4503
4514
|
};
|
|
4504
4515
|
}
|
|
4505
4516
|
/**
|
|
@@ -4616,5 +4627,5 @@ declare abstract class HttpXsrfTokenExtractor {
|
|
|
4616
4627
|
static ɵprov: i0.ɵɵInjectableDeclaration<HttpXsrfTokenExtractor>;
|
|
4617
4628
|
}
|
|
4618
4629
|
|
|
4619
|
-
export { FetchBackend, HTTP_INTERCEPTORS, HTTP_TRANSFER_CACHE_ORIGIN_MAP, HttpBackend, HttpClient, HttpContext, HttpEvent, HttpFeatureKind, HttpHandler, HttpHeaders, HttpParams, HttpProgressEvent, HttpRequest, HttpResponse, HttpXhrBackend, HttpXsrfTokenExtractor, JsonpClientBackend, JsonpInterceptor, httpResource, provideHttpClient, withFetch, withInterceptors, withInterceptorsFromDi, withJsonpSupport, withNoXsrfProtection, withRequestsMadeViaParent, withXsrfConfiguration, HTTP_ROOT_INTERCEPTOR_FNS as ɵHTTP_ROOT_INTERCEPTOR_FNS, HttpInterceptorHandler as ɵHttpInterceptingHandler, REQUESTS_CONTRIBUTE_TO_STABILITY as ɵREQUESTS_CONTRIBUTE_TO_STABILITY, withHttpTransferCache as ɵwithHttpTransferCache };
|
|
4630
|
+
export { FetchBackend, HTTP_INTERCEPTORS, HTTP_TRANSFER_CACHE_ORIGIN_MAP, HttpBackend, HttpClient, HttpContext, HttpEvent, HttpFeatureKind, HttpHandler, HttpHeaders, HttpParams, HttpProgressEvent, HttpRequest, HttpResponse, HttpXhrBackend, HttpXsrfTokenExtractor, JsonpClientBackend, JsonpInterceptor, httpResource, provideHttpClient, withFetch, withInterceptors, withInterceptorsFromDi, withJsonpSupport, withNoXsrfProtection, withRequestsMadeViaParent, withXhr, withXsrfConfiguration, HTTP_ROOT_INTERCEPTOR_FNS as ɵHTTP_ROOT_INTERCEPTOR_FNS, HttpInterceptorHandler as ɵHttpInterceptingHandler, REQUESTS_CONTRIBUTE_TO_STABILITY as ɵREQUESTS_CONTRIBUTE_TO_STABILITY, withHttpTransferCache as ɵwithHttpTransferCache };
|
|
4620
4631
|
export type { HttpFeature, HttpHandlerFn, HttpInterceptor, HttpInterceptorFn, HttpResourceFn, HttpResourceOptions, HttpResourceRef, HttpResourceRequest, HttpTransferCacheOptions };
|
package/types/testing.d.ts
CHANGED
package/types/upgrade.d.ts
CHANGED