@angular/common 16.1.0-next.1 → 16.1.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/http/src/client.mjs +3 -3
- package/esm2022/http/src/errors.mjs +9 -0
- package/esm2022/http/src/interceptor.mjs +13 -7
- package/esm2022/http/src/jsonp.mjs +6 -6
- package/esm2022/http/src/module.mjs +12 -12
- package/esm2022/http/src/transfer_cache.mjs +4 -7
- package/esm2022/http/src/xhr.mjs +7 -35
- 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 +6 -6
- 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/errors.mjs +1 -1
- 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 +16 -8
- 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 +128 -120
- package/fesm2022/common.mjs.map +1 -1
- package/fesm2022/http/testing.mjs +8 -8
- package/fesm2022/http.mjs +47 -73
- package/fesm2022/http.mjs.map +1 -1
- package/fesm2022/testing.mjs +10 -10
- package/fesm2022/upgrade.mjs +5 -5
- package/http/index.d.ts +2 -1
- package/http/testing/index.d.ts +1 -1
- package/index.d.ts +2 -2
- package/package.json +2 -2
- package/testing/index.d.ts +1 -1
- package/upgrade/index.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v16.1.0-next.
|
|
2
|
+
* @license Angular v16.1.0-next.3
|
|
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.1.0-next.
|
|
312
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
311
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpClientTestingBackend, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
312
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpClientTestingBackend }); }
|
|
313
313
|
}
|
|
314
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
314
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.3", 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.1.0-next.
|
|
340
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.0-next.
|
|
341
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
339
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpClientTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
340
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpClientTestingModule, imports: [HttpClientModule] }); }
|
|
341
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpClientTestingModule, providers: [
|
|
342
342
|
provideHttpClientTesting(),
|
|
343
343
|
], imports: [HttpClientModule] }); }
|
|
344
344
|
}
|
|
345
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
345
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpClientTestingModule, decorators: [{
|
|
346
346
|
type: NgModule,
|
|
347
347
|
args: [{
|
|
348
348
|
imports: [
|
package/fesm2022/http.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v16.1.0-next.
|
|
2
|
+
* @license Angular v16.1.0-next.3
|
|
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, ɵENABLED_SSR_FEATURES, APP_BOOTSTRAP_LISTENER, ApplicationRef
|
|
8
|
+
import { Injectable, InjectionToken, inject, ɵInitialRenderPendingTasks, Inject, ɵRuntimeError, PLATFORM_ID, makeEnvironmentProviders, NgModule, TransferState, makeStateKey, ɵENABLED_SSR_FEATURES, APP_BOOTSTRAP_LISTENER, ApplicationRef } from '@angular/core';
|
|
9
9
|
import { of, Observable, from } from 'rxjs';
|
|
10
|
-
import { concatMap, filter, map, switchMap, tap, first } from 'rxjs/operators';
|
|
10
|
+
import { concatMap, filter, map, finalize, switchMap, tap, first } from 'rxjs/operators';
|
|
11
11
|
import * as i1 from '@angular/common';
|
|
12
12
|
import { DOCUMENT, ɵparseCookieValue } from '@angular/common';
|
|
13
13
|
|
|
@@ -1371,10 +1371,10 @@ class HttpClient {
|
|
|
1371
1371
|
put(url, body, options = {}) {
|
|
1372
1372
|
return this.request('PUT', url, addBody(options, body));
|
|
1373
1373
|
}
|
|
1374
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
1375
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
1374
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpClient, deps: [{ token: HttpHandler }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1375
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpClient }); }
|
|
1376
1376
|
}
|
|
1377
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
1377
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpClient, decorators: [{
|
|
1378
1378
|
type: Injectable
|
|
1379
1379
|
}], ctorParameters: function () { return [{ type: HttpHandler }]; } });
|
|
1380
1380
|
|
|
@@ -1429,7 +1429,9 @@ function legacyInterceptorFnFactory() {
|
|
|
1429
1429
|
// out.
|
|
1430
1430
|
chain = interceptors.reduceRight(adaptLegacyInterceptorToChain, interceptorChainEndFn);
|
|
1431
1431
|
}
|
|
1432
|
-
|
|
1432
|
+
const pendingTasks = inject(ɵInitialRenderPendingTasks);
|
|
1433
|
+
const taskId = pendingTasks.add();
|
|
1434
|
+
return chain(req, handler).pipe(finalize(() => pendingTasks.remove(taskId)));
|
|
1433
1435
|
};
|
|
1434
1436
|
}
|
|
1435
1437
|
class HttpInterceptorHandler extends HttpHandler {
|
|
@@ -1438,6 +1440,7 @@ class HttpInterceptorHandler extends HttpHandler {
|
|
|
1438
1440
|
this.backend = backend;
|
|
1439
1441
|
this.injector = injector;
|
|
1440
1442
|
this.chain = null;
|
|
1443
|
+
this.pendingTasks = inject(ɵInitialRenderPendingTasks);
|
|
1441
1444
|
}
|
|
1442
1445
|
handle(initialRequest) {
|
|
1443
1446
|
if (this.chain === null) {
|
|
@@ -1451,12 +1454,14 @@ class HttpInterceptorHandler extends HttpHandler {
|
|
|
1451
1454
|
// out.
|
|
1452
1455
|
this.chain = dedupedInterceptorFns.reduceRight((nextSequencedFn, interceptorFn) => chainedInterceptorFn(nextSequencedFn, interceptorFn, this.injector), interceptorChainEndFn);
|
|
1453
1456
|
}
|
|
1454
|
-
|
|
1457
|
+
const taskId = this.pendingTasks.add();
|
|
1458
|
+
return this.chain(initialRequest, downstreamRequest => this.backend.handle(downstreamRequest))
|
|
1459
|
+
.pipe(finalize(() => this.pendingTasks.remove(taskId)));
|
|
1455
1460
|
}
|
|
1456
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
1457
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
1461
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpInterceptorHandler, deps: [{ token: HttpBackend }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1462
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpInterceptorHandler }); }
|
|
1458
1463
|
}
|
|
1459
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
1464
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpInterceptorHandler, decorators: [{
|
|
1460
1465
|
type: Injectable
|
|
1461
1466
|
}], ctorParameters: function () { return [{ type: HttpBackend }, { type: i0.EnvironmentInjector }]; } });
|
|
1462
1467
|
|
|
@@ -1658,10 +1663,10 @@ class JsonpClientBackend {
|
|
|
1658
1663
|
}
|
|
1659
1664
|
foreignDocument.adoptNode(script);
|
|
1660
1665
|
}
|
|
1661
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
1662
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
1666
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: JsonpClientBackend, deps: [{ token: JsonpCallbackContext }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1667
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: JsonpClientBackend }); }
|
|
1663
1668
|
}
|
|
1664
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
1669
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: JsonpClientBackend, decorators: [{
|
|
1665
1670
|
type: Injectable
|
|
1666
1671
|
}], ctorParameters: function () { return [{ type: JsonpCallbackContext }, { type: undefined, decorators: [{
|
|
1667
1672
|
type: Inject,
|
|
@@ -1699,10 +1704,10 @@ class JsonpInterceptor {
|
|
|
1699
1704
|
intercept(initialRequest, next) {
|
|
1700
1705
|
return this.injector.runInContext(() => jsonpInterceptorFn(initialRequest, downstreamRequest => next.handle(downstreamRequest)));
|
|
1701
1706
|
}
|
|
1702
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
1703
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
1707
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: JsonpInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1708
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: JsonpInterceptor }); }
|
|
1704
1709
|
}
|
|
1705
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
1710
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: JsonpInterceptor, decorators: [{
|
|
1706
1711
|
type: Injectable
|
|
1707
1712
|
}], ctorParameters: function () { return [{ type: i0.EnvironmentInjector }]; } });
|
|
1708
1713
|
|
|
@@ -1740,7 +1745,8 @@ class HttpXhrBackend {
|
|
|
1740
1745
|
// Quick check to give a better error message when a user attempts to use
|
|
1741
1746
|
// HttpClient.jsonp() without installing the HttpClientJsonpModule
|
|
1742
1747
|
if (req.method === 'JSONP') {
|
|
1743
|
-
throw new
|
|
1748
|
+
throw new ɵRuntimeError(-2800 /* RuntimeErrorCode.MISSING_JSONP_MODULE */, (typeof ngDevMode === 'undefined' || ngDevMode) &&
|
|
1749
|
+
`Cannot make a JSONP request without JSONP support. To fix the problem, either add the \`withJsonpSupport()\` call (if \`provideHttpClient()\` is used) or import the \`HttpClientJsonpModule\` in the root NgModule.`);
|
|
1744
1750
|
}
|
|
1745
1751
|
// Check whether this factory has a special function to load an XHR implementation
|
|
1746
1752
|
// for various non-browser environments. We currently limit it to only `ServerXhr`
|
|
@@ -1955,16 +1961,6 @@ class HttpXhrBackend {
|
|
|
1955
1961
|
xhr.upload.addEventListener('progress', onUpProgress);
|
|
1956
1962
|
}
|
|
1957
1963
|
}
|
|
1958
|
-
let macroTaskCanceller;
|
|
1959
|
-
/** Tear down logic to cancel the backround macrotask. */
|
|
1960
|
-
const onLoadStart = () => {
|
|
1961
|
-
macroTaskCanceller ??= createBackgroundMacroTask();
|
|
1962
|
-
};
|
|
1963
|
-
const onLoadEnd = () => {
|
|
1964
|
-
macroTaskCanceller?.();
|
|
1965
|
-
};
|
|
1966
|
-
xhr.addEventListener('loadstart', onLoadStart);
|
|
1967
|
-
xhr.addEventListener('loadend', onLoadEnd);
|
|
1968
1964
|
// Fire the request, and notify the event stream that it was fired.
|
|
1969
1965
|
xhr.send(reqBody);
|
|
1970
1966
|
observer.next({ type: HttpEventType.Sent });
|
|
@@ -1972,14 +1968,10 @@ class HttpXhrBackend {
|
|
|
1972
1968
|
// request cancellation handler.
|
|
1973
1969
|
return () => {
|
|
1974
1970
|
// On a cancellation, remove all registered event listeners.
|
|
1975
|
-
xhr.removeEventListener('loadstart', onLoadStart);
|
|
1976
|
-
xhr.removeEventListener('loadend', onLoadEnd);
|
|
1977
1971
|
xhr.removeEventListener('error', onError);
|
|
1978
1972
|
xhr.removeEventListener('abort', onError);
|
|
1979
1973
|
xhr.removeEventListener('load', onLoad);
|
|
1980
1974
|
xhr.removeEventListener('timeout', onError);
|
|
1981
|
-
// Cancel the background macrotask.
|
|
1982
|
-
macroTaskCanceller?.();
|
|
1983
1975
|
if (req.reportProgress) {
|
|
1984
1976
|
xhr.removeEventListener('progress', onDownProgress);
|
|
1985
1977
|
if (reqBody !== null && xhr.upload) {
|
|
@@ -1994,27 +1986,12 @@ class HttpXhrBackend {
|
|
|
1994
1986
|
});
|
|
1995
1987
|
}));
|
|
1996
1988
|
}
|
|
1997
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
1998
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
1989
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpXhrBackend, deps: [{ token: i1.XhrFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1990
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpXhrBackend }); }
|
|
1999
1991
|
}
|
|
2000
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
1992
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpXhrBackend, decorators: [{
|
|
2001
1993
|
type: Injectable
|
|
2002
1994
|
}], ctorParameters: function () { return [{ type: i1.XhrFactory }]; } });
|
|
2003
|
-
// Cannot use `Number.MAX_VALUE` as it does not fit into a 32-bit signed integer.
|
|
2004
|
-
const MAX_INT = 2147483647;
|
|
2005
|
-
/**
|
|
2006
|
-
* A method that creates a background macrotask of up to Number.MAX_VALUE.
|
|
2007
|
-
*
|
|
2008
|
-
* This is so that Zone.js can intercept HTTP calls, this is important for server rendering,
|
|
2009
|
-
* as the application is only rendered once the application is stabilized, meaning there are pending
|
|
2010
|
-
* macro and micro tasks.
|
|
2011
|
-
*
|
|
2012
|
-
* @returns a callback method to cancel the macrotask.
|
|
2013
|
-
*/
|
|
2014
|
-
function createBackgroundMacroTask() {
|
|
2015
|
-
const timeout = setTimeout(() => void 0, MAX_INT);
|
|
2016
|
-
return () => clearTimeout(timeout);
|
|
2017
|
-
}
|
|
2018
1995
|
|
|
2019
1996
|
const XSRF_ENABLED = new InjectionToken('XSRF_ENABLED');
|
|
2020
1997
|
const XSRF_DEFAULT_COOKIE_NAME = 'XSRF-TOKEN';
|
|
@@ -2061,10 +2038,10 @@ class HttpXsrfCookieExtractor {
|
|
|
2061
2038
|
}
|
|
2062
2039
|
return this.lastToken;
|
|
2063
2040
|
}
|
|
2064
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
2065
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
2041
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpXsrfCookieExtractor, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: XSRF_COOKIE_NAME }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2042
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpXsrfCookieExtractor }); }
|
|
2066
2043
|
}
|
|
2067
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
2044
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpXsrfCookieExtractor, decorators: [{
|
|
2068
2045
|
type: Injectable
|
|
2069
2046
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
2070
2047
|
type: Inject,
|
|
@@ -2104,10 +2081,10 @@ class HttpXsrfInterceptor {
|
|
|
2104
2081
|
intercept(initialRequest, next) {
|
|
2105
2082
|
return this.injector.runInContext(() => xsrfInterceptorFn(initialRequest, downstreamRequest => next.handle(downstreamRequest)));
|
|
2106
2083
|
}
|
|
2107
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
2108
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
2084
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpXsrfInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2085
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpXsrfInterceptor }); }
|
|
2109
2086
|
}
|
|
2110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
2087
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpXsrfInterceptor, decorators: [{
|
|
2111
2088
|
type: Injectable
|
|
2112
2089
|
}], ctorParameters: function () { return [{ type: i0.EnvironmentInjector }]; } });
|
|
2113
2090
|
|
|
@@ -2339,9 +2316,9 @@ class HttpClientXsrfModule {
|
|
|
2339
2316
|
providers: withXsrfConfiguration(options).ɵproviders,
|
|
2340
2317
|
};
|
|
2341
2318
|
}
|
|
2342
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
2343
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.0-next.
|
|
2344
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
2319
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpClientXsrfModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2320
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpClientXsrfModule }); }
|
|
2321
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpClientXsrfModule, providers: [
|
|
2345
2322
|
HttpXsrfInterceptor,
|
|
2346
2323
|
{ provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },
|
|
2347
2324
|
{ provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },
|
|
@@ -2352,7 +2329,7 @@ class HttpClientXsrfModule {
|
|
|
2352
2329
|
{ provide: XSRF_ENABLED, useValue: true },
|
|
2353
2330
|
] }); }
|
|
2354
2331
|
}
|
|
2355
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
2332
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpClientXsrfModule, decorators: [{
|
|
2356
2333
|
type: NgModule,
|
|
2357
2334
|
args: [{
|
|
2358
2335
|
providers: [
|
|
@@ -2377,13 +2354,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.1",
|
|
|
2377
2354
|
* @publicApi
|
|
2378
2355
|
*/
|
|
2379
2356
|
class HttpClientModule {
|
|
2380
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
2381
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.0-next.
|
|
2382
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
2357
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpClientModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2358
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpClientModule }); }
|
|
2359
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpClientModule, providers: [
|
|
2383
2360
|
provideHttpClient(withInterceptorsFromDi()),
|
|
2384
2361
|
] }); }
|
|
2385
2362
|
}
|
|
2386
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
2363
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpClientModule, decorators: [{
|
|
2387
2364
|
type: NgModule,
|
|
2388
2365
|
args: [{
|
|
2389
2366
|
/**
|
|
@@ -2404,13 +2381,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.1",
|
|
|
2404
2381
|
* @publicApi
|
|
2405
2382
|
*/
|
|
2406
2383
|
class HttpClientJsonpModule {
|
|
2407
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
2408
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.0-next.
|
|
2409
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
2384
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpClientJsonpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2385
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpClientJsonpModule }); }
|
|
2386
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpClientJsonpModule, providers: [
|
|
2410
2387
|
withJsonpSupport().ɵproviders,
|
|
2411
2388
|
] }); }
|
|
2412
2389
|
}
|
|
2413
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.
|
|
2390
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0-next.3", ngImport: i0, type: HttpClientJsonpModule, decorators: [{
|
|
2414
2391
|
type: NgModule,
|
|
2415
2392
|
args: [{
|
|
2416
2393
|
providers: [
|
|
@@ -2535,15 +2512,12 @@ function withHttpTransferCache() {
|
|
|
2535
2512
|
useFactory: () => {
|
|
2536
2513
|
const appRef = inject(ApplicationRef);
|
|
2537
2514
|
const cacheState = inject(CACHE_STATE);
|
|
2538
|
-
const pendingTasks = inject(ɵInitialRenderPendingTasks);
|
|
2539
2515
|
return () => {
|
|
2540
|
-
|
|
2541
|
-
isStablePromise.then(() => pendingTasks.whenAllTasksComplete).then(() => {
|
|
2516
|
+
appRef.isStable.pipe(first((isStable) => isStable)).toPromise().then(() => {
|
|
2542
2517
|
cacheState.isCacheActive = false;
|
|
2543
2518
|
});
|
|
2544
2519
|
};
|
|
2545
|
-
}
|
|
2546
|
-
deps: [ApplicationRef, CACHE_STATE, ɵInitialRenderPendingTasks]
|
|
2520
|
+
}
|
|
2547
2521
|
}
|
|
2548
2522
|
];
|
|
2549
2523
|
}
|