@angular/common 16.0.0-next.7 → 16.0.0-rc.1
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/esm2022/http/src/client.mjs +3 -3
- package/esm2022/http/src/headers.mjs +16 -10
- package/esm2022/http/src/interceptor.mjs +3 -3
- package/esm2022/http/src/jsonp.mjs +6 -6
- package/esm2022/http/src/module.mjs +12 -12
- package/esm2022/http/src/transfer_cache.mjs +11 -5
- package/esm2022/http/src/xhr.mjs +8 -10
- package/esm2022/http/src/xsrf.mjs +6 -6
- package/esm2022/http/testing/src/backend.mjs +3 -3
- package/esm2022/http/testing/src/module.mjs +4 -4
- package/esm2022/src/common_module.mjs +4 -4
- package/esm2022/src/directives/ng_class.mjs +3 -3
- package/esm2022/src/directives/ng_component_outlet.mjs +3 -3
- package/esm2022/src/directives/ng_for_of.mjs +3 -3
- package/esm2022/src/directives/ng_if.mjs +3 -3
- package/esm2022/src/directives/ng_optimized_image/lcp_image_observer.mjs +3 -3
- package/esm2022/src/directives/ng_optimized_image/ng_optimized_image.mjs +3 -3
- package/esm2022/src/directives/ng_optimized_image/preconnect_link_checker.mjs +3 -3
- package/esm2022/src/directives/ng_optimized_image/preload-link-creator.mjs +3 -3
- package/esm2022/src/directives/ng_plural.mjs +6 -6
- package/esm2022/src/directives/ng_style.mjs +3 -3
- package/esm2022/src/directives/ng_switch.mjs +9 -9
- package/esm2022/src/directives/ng_template_outlet.mjs +3 -3
- package/esm2022/src/i18n/localization.mjs +6 -6
- package/esm2022/src/location/hash_location_strategy.mjs +3 -3
- package/esm2022/src/location/location.mjs +3 -3
- package/esm2022/src/location/location_strategy.mjs +6 -6
- package/esm2022/src/location/platform_location.mjs +6 -6
- package/esm2022/src/pipes/async_pipe.mjs +3 -3
- package/esm2022/src/pipes/case_conversion_pipes.mjs +9 -9
- package/esm2022/src/pipes/date_pipe.mjs +3 -3
- package/esm2022/src/pipes/i18n_plural_pipe.mjs +3 -3
- package/esm2022/src/pipes/i18n_select_pipe.mjs +3 -3
- package/esm2022/src/pipes/json_pipe.mjs +3 -3
- package/esm2022/src/pipes/keyvalue_pipe.mjs +3 -3
- package/esm2022/src/pipes/number_pipe.mjs +9 -9
- package/esm2022/src/pipes/slice_pipe.mjs +3 -3
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/location_mock.mjs +3 -3
- package/esm2022/testing/src/mock_location_strategy.mjs +3 -3
- package/esm2022/testing/src/mock_platform_location.mjs +3 -3
- package/esm2022/upgrade/src/location_upgrade_module.mjs +4 -4
- package/fesm2022/common.mjs +114 -114
- package/fesm2022/common.mjs.map +1 -1
- package/fesm2022/http/testing.mjs +8 -8
- package/fesm2022/http.mjs +63 -53
- package/fesm2022/http.mjs.map +1 -1
- package/fesm2022/testing.mjs +10 -10
- package/fesm2022/upgrade.mjs +5 -5
- package/http/index.d.ts +3 -6
- package/http/testing/index.d.ts +1 -1
- package/index.d.ts +1 -1
- package/package.json +3 -3
- package/testing/index.d.ts +1 -1
- package/upgrade/index.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v16.0.0-
|
|
2
|
+
* @license Angular v16.0.0-rc.1
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -308,10 +308,10 @@ class HttpClientTestingBackend {
|
|
|
308
308
|
return `Match by function: ${matcher.name}`;
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-
|
|
312
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-
|
|
311
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpClientTestingBackend, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
312
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpClientTestingBackend }); }
|
|
313
313
|
}
|
|
314
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-
|
|
314
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpClientTestingBackend, decorators: [{
|
|
315
315
|
type: Injectable
|
|
316
316
|
}] });
|
|
317
317
|
function describeRequest(testRequest) {
|
|
@@ -336,13 +336,13 @@ function provideHttpClientTesting() {
|
|
|
336
336
|
* @publicApi
|
|
337
337
|
*/
|
|
338
338
|
class HttpClientTestingModule {
|
|
339
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-
|
|
340
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-
|
|
341
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-
|
|
339
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpClientTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
340
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpClientTestingModule, imports: [HttpClientModule] }); }
|
|
341
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpClientTestingModule, providers: [
|
|
342
342
|
provideHttpClientTesting(),
|
|
343
343
|
], imports: [HttpClientModule] }); }
|
|
344
344
|
}
|
|
345
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-
|
|
345
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpClientTestingModule, decorators: [{
|
|
346
346
|
type: NgModule,
|
|
347
347
|
args: [{
|
|
348
348
|
imports: [
|
package/fesm2022/http.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v16.0.0-
|
|
2
|
+
* @license Angular v16.0.0-rc.1
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
|
-
import { Injectable, InjectionToken, inject, Inject, PLATFORM_ID, makeEnvironmentProviders, NgModule, TransferState, makeStateKey, APP_BOOTSTRAP_LISTENER, ApplicationRef, ɵInitialRenderPendingTasks } from '@angular/core';
|
|
8
|
+
import { Injectable, InjectionToken, inject, Inject, PLATFORM_ID, makeEnvironmentProviders, NgModule, TransferState, makeStateKey, ɵENABLED_SSR_FEATURES, APP_BOOTSTRAP_LISTENER, ApplicationRef, ɵInitialRenderPendingTasks } from '@angular/core';
|
|
9
9
|
import { of, Observable } from 'rxjs';
|
|
10
10
|
import { concatMap, filter, map, tap, first } from 'rxjs/operators';
|
|
11
11
|
import * as i1 from '@angular/common';
|
|
@@ -86,14 +86,20 @@ class HttpHeaders {
|
|
|
86
86
|
assertValidHeaders(headers);
|
|
87
87
|
}
|
|
88
88
|
this.headers = new Map();
|
|
89
|
-
Object.
|
|
90
|
-
let
|
|
91
|
-
const key = name.toLowerCase();
|
|
89
|
+
Object.entries(headers).forEach(([name, values]) => {
|
|
90
|
+
let headerValues;
|
|
92
91
|
if (typeof values === 'string') {
|
|
93
|
-
|
|
92
|
+
headerValues = [values];
|
|
94
93
|
}
|
|
95
|
-
if (values
|
|
96
|
-
|
|
94
|
+
else if (typeof values === 'number') {
|
|
95
|
+
headerValues = [values.toString()];
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
headerValues = values.map((value) => value.toString());
|
|
99
|
+
}
|
|
100
|
+
if (headerValues.length > 0) {
|
|
101
|
+
const key = name.toLowerCase();
|
|
102
|
+
this.headers.set(key, headerValues);
|
|
97
103
|
this.maybeSetNormalizedName(name, key);
|
|
98
104
|
}
|
|
99
105
|
});
|
|
@@ -264,14 +270,14 @@ class HttpHeaders {
|
|
|
264
270
|
}
|
|
265
271
|
/**
|
|
266
272
|
* Verifies that the headers object has the right shape: the values
|
|
267
|
-
* must be either strings or arrays. Throws an error if an invalid
|
|
273
|
+
* must be either strings, numbers or arrays. Throws an error if an invalid
|
|
268
274
|
* header value is present.
|
|
269
275
|
*/
|
|
270
276
|
function assertValidHeaders(headers) {
|
|
271
277
|
for (const [key, value] of Object.entries(headers)) {
|
|
272
|
-
if (typeof value
|
|
278
|
+
if (!(typeof value === 'string' || typeof value === 'number') && !Array.isArray(value)) {
|
|
273
279
|
throw new Error(`Unexpected value of the \`${key}\` header provided. ` +
|
|
274
|
-
`Expecting either a string or an array, but got: \`${value}\`.`);
|
|
280
|
+
`Expecting either a string, a number or an array, but got: \`${value}\`.`);
|
|
275
281
|
}
|
|
276
282
|
}
|
|
277
283
|
}
|
|
@@ -1365,10 +1371,10 @@ class HttpClient {
|
|
|
1365
1371
|
put(url, body, options = {}) {
|
|
1366
1372
|
return this.request('PUT', url, addBody(options, body));
|
|
1367
1373
|
}
|
|
1368
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-
|
|
1369
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-
|
|
1374
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpClient, deps: [{ token: HttpHandler }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1375
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpClient }); }
|
|
1370
1376
|
}
|
|
1371
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-
|
|
1377
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpClient, decorators: [{
|
|
1372
1378
|
type: Injectable
|
|
1373
1379
|
}], ctorParameters: function () { return [{ type: HttpHandler }]; } });
|
|
1374
1380
|
|
|
@@ -1447,10 +1453,10 @@ class HttpInterceptorHandler extends HttpHandler {
|
|
|
1447
1453
|
}
|
|
1448
1454
|
return this.chain(initialRequest, downstreamRequest => this.backend.handle(downstreamRequest));
|
|
1449
1455
|
}
|
|
1450
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-
|
|
1451
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-
|
|
1456
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpInterceptorHandler, deps: [{ token: HttpBackend }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1457
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpInterceptorHandler }); }
|
|
1452
1458
|
}
|
|
1453
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-
|
|
1459
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpInterceptorHandler, decorators: [{
|
|
1454
1460
|
type: Injectable
|
|
1455
1461
|
}], ctorParameters: function () { return [{ type: HttpBackend }, { type: i0.EnvironmentInjector }]; } });
|
|
1456
1462
|
|
|
@@ -1652,10 +1658,10 @@ class JsonpClientBackend {
|
|
|
1652
1658
|
}
|
|
1653
1659
|
foreignDocument.adoptNode(script);
|
|
1654
1660
|
}
|
|
1655
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-
|
|
1656
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-
|
|
1661
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: JsonpClientBackend, deps: [{ token: JsonpCallbackContext }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1662
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: JsonpClientBackend }); }
|
|
1657
1663
|
}
|
|
1658
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-
|
|
1664
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: JsonpClientBackend, decorators: [{
|
|
1659
1665
|
type: Injectable
|
|
1660
1666
|
}], ctorParameters: function () { return [{ type: JsonpCallbackContext }, { type: undefined, decorators: [{
|
|
1661
1667
|
type: Inject,
|
|
@@ -1693,10 +1699,10 @@ class JsonpInterceptor {
|
|
|
1693
1699
|
intercept(initialRequest, next) {
|
|
1694
1700
|
return this.injector.runInContext(() => jsonpInterceptorFn(initialRequest, downstreamRequest => next.handle(downstreamRequest)));
|
|
1695
1701
|
}
|
|
1696
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-
|
|
1697
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-
|
|
1702
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: JsonpInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1703
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: JsonpInterceptor }); }
|
|
1698
1704
|
}
|
|
1699
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-
|
|
1705
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: JsonpInterceptor, decorators: [{
|
|
1700
1706
|
type: Injectable
|
|
1701
1707
|
}], ctorParameters: function () { return [{ type: i0.EnvironmentInjector }]; } });
|
|
1702
1708
|
|
|
@@ -1940,12 +1946,13 @@ class HttpXhrBackend {
|
|
|
1940
1946
|
xhr.upload.addEventListener('progress', onUpProgress);
|
|
1941
1947
|
}
|
|
1942
1948
|
}
|
|
1949
|
+
let macroTaskCanceller;
|
|
1943
1950
|
/** Tear down logic to cancel the backround macrotask. */
|
|
1944
1951
|
const onLoadStart = () => {
|
|
1945
|
-
|
|
1952
|
+
macroTaskCanceller ??= createBackgroundMacroTask();
|
|
1946
1953
|
};
|
|
1947
1954
|
const onLoadEnd = () => {
|
|
1948
|
-
|
|
1955
|
+
macroTaskCanceller?.();
|
|
1949
1956
|
};
|
|
1950
1957
|
xhr.addEventListener('loadstart', onLoadStart);
|
|
1951
1958
|
xhr.addEventListener('loadend', onLoadEnd);
|
|
@@ -1963,7 +1970,7 @@ class HttpXhrBackend {
|
|
|
1963
1970
|
xhr.removeEventListener('load', onLoad);
|
|
1964
1971
|
xhr.removeEventListener('timeout', onError);
|
|
1965
1972
|
// Cancel the background macrotask.
|
|
1966
|
-
|
|
1973
|
+
macroTaskCanceller?.();
|
|
1967
1974
|
if (req.reportProgress) {
|
|
1968
1975
|
xhr.removeEventListener('progress', onDownProgress);
|
|
1969
1976
|
if (reqBody !== null && xhr.upload) {
|
|
@@ -1977,13 +1984,10 @@ class HttpXhrBackend {
|
|
|
1977
1984
|
};
|
|
1978
1985
|
});
|
|
1979
1986
|
}
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
}
|
|
1983
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: HttpXhrBackend, deps: [{ token: i1.XhrFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1984
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.7", ngImport: i0, type: HttpXhrBackend }); }
|
|
1987
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpXhrBackend, deps: [{ token: i1.XhrFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1988
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpXhrBackend }); }
|
|
1985
1989
|
}
|
|
1986
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-
|
|
1990
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpXhrBackend, decorators: [{
|
|
1987
1991
|
type: Injectable
|
|
1988
1992
|
}], ctorParameters: function () { return [{ type: i1.XhrFactory }]; } });
|
|
1989
1993
|
// Cannot use `Number.MAX_VALUE` as it does not fit into a 32-bit signed integer.
|
|
@@ -2047,10 +2051,10 @@ class HttpXsrfCookieExtractor {
|
|
|
2047
2051
|
}
|
|
2048
2052
|
return this.lastToken;
|
|
2049
2053
|
}
|
|
2050
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-
|
|
2051
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-
|
|
2054
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpXsrfCookieExtractor, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: XSRF_COOKIE_NAME }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2055
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpXsrfCookieExtractor }); }
|
|
2052
2056
|
}
|
|
2053
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-
|
|
2057
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpXsrfCookieExtractor, decorators: [{
|
|
2054
2058
|
type: Injectable
|
|
2055
2059
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
2056
2060
|
type: Inject,
|
|
@@ -2090,10 +2094,10 @@ class HttpXsrfInterceptor {
|
|
|
2090
2094
|
intercept(initialRequest, next) {
|
|
2091
2095
|
return this.injector.runInContext(() => xsrfInterceptorFn(initialRequest, downstreamRequest => next.handle(downstreamRequest)));
|
|
2092
2096
|
}
|
|
2093
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-
|
|
2094
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-
|
|
2097
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpXsrfInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2098
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpXsrfInterceptor }); }
|
|
2095
2099
|
}
|
|
2096
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-
|
|
2100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpXsrfInterceptor, decorators: [{
|
|
2097
2101
|
type: Injectable
|
|
2098
2102
|
}], ctorParameters: function () { return [{ type: i0.EnvironmentInjector }]; } });
|
|
2099
2103
|
|
|
@@ -2325,9 +2329,9 @@ class HttpClientXsrfModule {
|
|
|
2325
2329
|
providers: withXsrfConfiguration(options).ɵproviders,
|
|
2326
2330
|
};
|
|
2327
2331
|
}
|
|
2328
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-
|
|
2329
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-
|
|
2330
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-
|
|
2332
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpClientXsrfModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2333
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpClientXsrfModule }); }
|
|
2334
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpClientXsrfModule, providers: [
|
|
2331
2335
|
HttpXsrfInterceptor,
|
|
2332
2336
|
{ provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },
|
|
2333
2337
|
{ provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },
|
|
@@ -2338,7 +2342,7 @@ class HttpClientXsrfModule {
|
|
|
2338
2342
|
{ provide: XSRF_ENABLED, useValue: true },
|
|
2339
2343
|
] }); }
|
|
2340
2344
|
}
|
|
2341
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-
|
|
2345
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpClientXsrfModule, decorators: [{
|
|
2342
2346
|
type: NgModule,
|
|
2343
2347
|
args: [{
|
|
2344
2348
|
providers: [
|
|
@@ -2363,13 +2367,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.7",
|
|
|
2363
2367
|
* @publicApi
|
|
2364
2368
|
*/
|
|
2365
2369
|
class HttpClientModule {
|
|
2366
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-
|
|
2367
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-
|
|
2368
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-
|
|
2370
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpClientModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2371
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpClientModule }); }
|
|
2372
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpClientModule, providers: [
|
|
2369
2373
|
provideHttpClient(withInterceptorsFromDi()),
|
|
2370
2374
|
] }); }
|
|
2371
2375
|
}
|
|
2372
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-
|
|
2376
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpClientModule, decorators: [{
|
|
2373
2377
|
type: NgModule,
|
|
2374
2378
|
args: [{
|
|
2375
2379
|
/**
|
|
@@ -2390,13 +2394,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.7",
|
|
|
2390
2394
|
* @publicApi
|
|
2391
2395
|
*/
|
|
2392
2396
|
class HttpClientJsonpModule {
|
|
2393
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-
|
|
2394
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-
|
|
2395
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-
|
|
2397
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpClientJsonpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2398
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpClientJsonpModule }); }
|
|
2399
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpClientJsonpModule, providers: [
|
|
2396
2400
|
withJsonpSupport().ɵproviders,
|
|
2397
2401
|
] }); }
|
|
2398
2402
|
}
|
|
2399
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-
|
|
2403
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-rc.1", ngImport: i0, type: HttpClientJsonpModule, decorators: [{
|
|
2400
2404
|
type: NgModule,
|
|
2401
2405
|
args: [{
|
|
2402
2406
|
providers: [
|
|
@@ -2502,7 +2506,14 @@ function generateHash(value) {
|
|
|
2502
2506
|
*/
|
|
2503
2507
|
function withHttpTransferCache() {
|
|
2504
2508
|
return [
|
|
2505
|
-
{
|
|
2509
|
+
{
|
|
2510
|
+
provide: CACHE_STATE,
|
|
2511
|
+
useFactory: () => {
|
|
2512
|
+
inject(ɵENABLED_SSR_FEATURES).add('httpcache');
|
|
2513
|
+
return { isCacheActive: true };
|
|
2514
|
+
}
|
|
2515
|
+
},
|
|
2516
|
+
{
|
|
2506
2517
|
provide: HTTP_ROOT_INTERCEPTOR_FNS,
|
|
2507
2518
|
useValue: transferCacheInterceptorFn,
|
|
2508
2519
|
multi: true,
|
|
@@ -2517,8 +2528,7 @@ function withHttpTransferCache() {
|
|
|
2517
2528
|
const pendingTasks = inject(ɵInitialRenderPendingTasks);
|
|
2518
2529
|
return () => {
|
|
2519
2530
|
const isStablePromise = appRef.isStable.pipe(first((isStable) => isStable)).toPromise();
|
|
2520
|
-
|
|
2521
|
-
Promise.allSettled([isStablePromise, pendingTasksPromise]).then(() => {
|
|
2531
|
+
isStablePromise.then(() => pendingTasks.whenAllTasksComplete).then(() => {
|
|
2522
2532
|
cacheState.isCacheActive = false;
|
|
2523
2533
|
});
|
|
2524
2534
|
};
|