@angular/common 20.3.12 → 20.3.14

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.3.12
2
+ * @license Angular v20.3.14
3
3
  * (c) 2010-2025 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -1696,10 +1696,10 @@ class HttpClient {
1696
1696
  put(url, body, options = {}) {
1697
1697
  return this.request('PUT', url, addBody(options, body));
1698
1698
  }
1699
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpClient, deps: [{ token: HttpHandler }], target: i0.ɵɵFactoryTarget.Injectable });
1700
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpClient });
1699
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpClient, deps: [{ token: HttpHandler }], target: i0.ɵɵFactoryTarget.Injectable });
1700
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpClient });
1701
1701
  }
1702
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpClient, decorators: [{
1702
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpClient, decorators: [{
1703
1703
  type: Injectable
1704
1704
  }], ctorParameters: () => [{ type: HttpHandler }] });
1705
1705
 
@@ -1986,10 +1986,10 @@ class FetchBackend {
1986
1986
  }
1987
1987
  return chunksAll;
1988
1988
  }
1989
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: FetchBackend, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1990
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: FetchBackend });
1989
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: FetchBackend, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1990
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: FetchBackend });
1991
1991
  }
1992
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: FetchBackend, decorators: [{
1992
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: FetchBackend, decorators: [{
1993
1993
  type: Injectable
1994
1994
  }] });
1995
1995
  /**
@@ -2135,10 +2135,10 @@ class HttpInterceptorHandler extends HttpHandler {
2135
2135
  return this.chain(initialRequest, (downstreamRequest) => this.backend.handle(downstreamRequest));
2136
2136
  }
2137
2137
  }
2138
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpInterceptorHandler, deps: [{ token: HttpBackend }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
2139
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpInterceptorHandler });
2138
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpInterceptorHandler, deps: [{ token: HttpBackend }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
2139
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpInterceptorHandler });
2140
2140
  }
2141
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpInterceptorHandler, decorators: [{
2141
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpInterceptorHandler, decorators: [{
2142
2142
  type: Injectable
2143
2143
  }], ctorParameters: () => [{ type: HttpBackend }, { type: i0.EnvironmentInjector }] });
2144
2144
 
@@ -2340,10 +2340,10 @@ class JsonpClientBackend {
2340
2340
  foreignDocument ??= this.document.implementation.createHTMLDocument();
2341
2341
  foreignDocument.adoptNode(script);
2342
2342
  }
2343
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: JsonpClientBackend, deps: [{ token: JsonpCallbackContext }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
2344
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: JsonpClientBackend });
2343
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: JsonpClientBackend, deps: [{ token: JsonpCallbackContext }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
2344
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: JsonpClientBackend });
2345
2345
  }
2346
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: JsonpClientBackend, decorators: [{
2346
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: JsonpClientBackend, decorators: [{
2347
2347
  type: Injectable
2348
2348
  }], ctorParameters: () => [{ type: JsonpCallbackContext }, { type: undefined, decorators: [{
2349
2349
  type: Inject,
@@ -2382,10 +2382,10 @@ class JsonpInterceptor {
2382
2382
  intercept(initialRequest, next) {
2383
2383
  return runInInjectionContext(this.injector, () => jsonpInterceptorFn(initialRequest, (downstreamRequest) => next.handle(downstreamRequest)));
2384
2384
  }
2385
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: JsonpInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
2386
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: JsonpInterceptor });
2385
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: JsonpInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
2386
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: JsonpInterceptor });
2387
2387
  }
2388
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: JsonpInterceptor, decorators: [{
2388
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: JsonpInterceptor, decorators: [{
2389
2389
  type: Injectable
2390
2390
  }], ctorParameters: () => [{ type: i0.EnvironmentInjector }] });
2391
2391
 
@@ -2737,10 +2737,10 @@ class HttpXhrBackend {
2737
2737
  });
2738
2738
  }));
2739
2739
  }
2740
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpXhrBackend, deps: [{ token: XhrFactory }], target: i0.ɵɵFactoryTarget.Injectable });
2741
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpXhrBackend });
2740
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpXhrBackend, deps: [{ token: XhrFactory }], target: i0.ɵɵFactoryTarget.Injectable });
2741
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpXhrBackend });
2742
2742
  }
2743
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpXhrBackend, decorators: [{
2743
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpXhrBackend, decorators: [{
2744
2744
  type: Injectable
2745
2745
  }], ctorParameters: () => [{ type: XhrFactory }] });
2746
2746
 
@@ -2790,10 +2790,10 @@ class HttpXsrfCookieExtractor {
2790
2790
  }
2791
2791
  return this.lastToken;
2792
2792
  }
2793
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpXsrfCookieExtractor, deps: [{ token: DOCUMENT }, { token: XSRF_COOKIE_NAME }], target: i0.ɵɵFactoryTarget.Injectable });
2794
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpXsrfCookieExtractor });
2793
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpXsrfCookieExtractor, deps: [{ token: DOCUMENT }, { token: XSRF_COOKIE_NAME }], target: i0.ɵɵFactoryTarget.Injectable });
2794
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpXsrfCookieExtractor });
2795
2795
  }
2796
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpXsrfCookieExtractor, decorators: [{
2796
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpXsrfCookieExtractor, decorators: [{
2797
2797
  type: Injectable
2798
2798
  }], ctorParameters: () => [{ type: undefined, decorators: [{
2799
2799
  type: Inject,
@@ -2802,8 +2802,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
2802
2802
  type: Inject,
2803
2803
  args: [XSRF_COOKIE_NAME]
2804
2804
  }] }] });
2805
+ /**
2806
+ * Regex to match absolute URLs, including protocol-relative URLs.
2807
+ */
2808
+ const ABSOLUTE_URL_REGEX = /^(?:https?:)?\/\//i;
2805
2809
  function xsrfInterceptorFn(req, next) {
2806
- const lcUrl = req.url.toLowerCase();
2807
2810
  // Skip both non-mutating requests and absolute URLs.
2808
2811
  // Non-mutating requests don't require a token, and absolute URLs require special handling
2809
2812
  // anyway as the cookie set
@@ -2811,8 +2814,7 @@ function xsrfInterceptorFn(req, next) {
2811
2814
  if (!inject(XSRF_ENABLED) ||
2812
2815
  req.method === 'GET' ||
2813
2816
  req.method === 'HEAD' ||
2814
- lcUrl.startsWith('http://') ||
2815
- lcUrl.startsWith('https://')) {
2817
+ ABSOLUTE_URL_REGEX.test(req.url)) {
2816
2818
  return next(req);
2817
2819
  }
2818
2820
  const token = inject(HttpXsrfTokenExtractor).getToken();
@@ -2834,10 +2836,10 @@ class HttpXsrfInterceptor {
2834
2836
  intercept(initialRequest, next) {
2835
2837
  return runInInjectionContext(this.injector, () => xsrfInterceptorFn(initialRequest, (downstreamRequest) => next.handle(downstreamRequest)));
2836
2838
  }
2837
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpXsrfInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
2838
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpXsrfInterceptor });
2839
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpXsrfInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
2840
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpXsrfInterceptor });
2839
2841
  }
2840
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpXsrfInterceptor, decorators: [{
2842
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpXsrfInterceptor, decorators: [{
2841
2843
  type: Injectable
2842
2844
  }], ctorParameters: () => [{ type: i0.EnvironmentInjector }] });
2843
2845
 
@@ -3106,9 +3108,9 @@ class HttpClientXsrfModule {
3106
3108
  providers: withXsrfConfiguration(options).ɵproviders,
3107
3109
  };
3108
3110
  }
3109
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpClientXsrfModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3110
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: HttpClientXsrfModule });
3111
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpClientXsrfModule, providers: [
3111
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpClientXsrfModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3112
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.14", ngImport: i0, type: HttpClientXsrfModule });
3113
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpClientXsrfModule, providers: [
3112
3114
  HttpXsrfInterceptor,
3113
3115
  { provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },
3114
3116
  { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },
@@ -3119,7 +3121,7 @@ class HttpClientXsrfModule {
3119
3121
  { provide: XSRF_ENABLED, useValue: true },
3120
3122
  ] });
3121
3123
  }
3122
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpClientXsrfModule, decorators: [{
3124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpClientXsrfModule, decorators: [{
3123
3125
  type: NgModule,
3124
3126
  args: [{
3125
3127
  providers: [
@@ -3145,11 +3147,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
3145
3147
  * @deprecated use `provideHttpClient(withInterceptorsFromDi())` as providers instead
3146
3148
  */
3147
3149
  class HttpClientModule {
3148
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpClientModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3149
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: HttpClientModule });
3150
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpClientModule, providers: [provideHttpClient(withInterceptorsFromDi())] });
3150
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpClientModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3151
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.14", ngImport: i0, type: HttpClientModule });
3152
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpClientModule, providers: [provideHttpClient(withInterceptorsFromDi())] });
3151
3153
  }
3152
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpClientModule, decorators: [{
3154
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpClientModule, decorators: [{
3153
3155
  type: NgModule,
3154
3156
  args: [{
3155
3157
  /**
@@ -3169,11 +3171,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
3169
3171
  * @deprecated `withJsonpSupport()` as providers instead
3170
3172
  */
3171
3173
  class HttpClientJsonpModule {
3172
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpClientJsonpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3173
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: HttpClientJsonpModule });
3174
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpClientJsonpModule, providers: [withJsonpSupport().ɵproviders] });
3174
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpClientJsonpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3175
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.14", ngImport: i0, type: HttpClientJsonpModule });
3176
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpClientJsonpModule, providers: [withJsonpSupport().ɵproviders] });
3175
3177
  }
3176
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: HttpClientJsonpModule, decorators: [{
3178
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: HttpClientJsonpModule, decorators: [{
3177
3179
  type: NgModule,
3178
3180
  args: [{
3179
3181
  providers: [withJsonpSupport().ɵproviders],