@angular/common 20.0.0-next.8 → 20.0.0-next.9

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.0.0-next.8
2
+ * @license Angular v20.0.0-next.9
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -609,7 +609,7 @@ declare class NgForOfContext<T, U extends NgIterable<T> = NgIterable<T>> {
609
609
  * @ngModule CommonModule
610
610
  * @publicApi
611
611
  *
612
- * @deprecated Use the @for block instead. Intent to remove in v22
612
+ * @deprecated Use the `@for` block instead. Intent to remove in v22
613
613
  */
614
614
  declare class NgForOf<T, U extends NgIterable<T> = NgIterable<T>> implements DoCheck {
615
615
  private _viewContainer;
@@ -1,10 +1,10 @@
1
1
  /**
2
- * @license Angular v20.0.0-next.8
2
+ * @license Angular v20.0.0-next.9
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
- export { AsyncPipe, CommonModule, CurrencyPipe, DATE_PIPE_DEFAULT_OPTIONS, DATE_PIPE_DEFAULT_TIMEZONE, DatePipe, DecimalPipe, FormStyle, FormatWidth, HashLocationStrategy, I18nPluralPipe, I18nSelectPipe, JsonPipe, KeyValuePipe, LowerCasePipe, NgClass, NgComponentOutlet, NgForOf as NgFor, NgForOf, NgForOfContext, NgIf, NgIfContext, NgLocaleLocalization, NgLocalization, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NumberFormatStyle, NumberSymbol, PercentPipe, Plural, SlicePipe, TitleCasePipe, TranslationWidth, UpperCasePipe, WeekDay, formatCurrency, formatDate, formatNumber, formatPercent, getCurrencySymbol, getLocaleCurrencyCode, getLocaleCurrencyName, getLocaleCurrencySymbol, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleDayNames, getLocaleDayPeriods, getLocaleDirection, getLocaleEraNames, getLocaleExtraDayPeriodRules, getLocaleExtraDayPeriods, getLocaleFirstDayOfWeek, getLocaleId, getLocaleMonthNames, getLocaleNumberFormat, getLocaleNumberSymbol, getLocalePluralCase, getLocaleTimeFormat, getLocaleWeekEndRange, getNumberOfCurrencyDigits } from './common_module-Cz2TsVI9.mjs';
7
+ export { AsyncPipe, CommonModule, CurrencyPipe, DATE_PIPE_DEFAULT_OPTIONS, DATE_PIPE_DEFAULT_TIMEZONE, DatePipe, DecimalPipe, FormStyle, FormatWidth, HashLocationStrategy, I18nPluralPipe, I18nSelectPipe, JsonPipe, KeyValuePipe, LowerCasePipe, NgClass, NgComponentOutlet, NgForOf as NgFor, NgForOf, NgForOfContext, NgIf, NgIfContext, NgLocaleLocalization, NgLocalization, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NumberFormatStyle, NumberSymbol, PercentPipe, Plural, SlicePipe, TitleCasePipe, TranslationWidth, UpperCasePipe, WeekDay, formatCurrency, formatDate, formatNumber, formatPercent, getCurrencySymbol, getLocaleCurrencyCode, getLocaleCurrencyName, getLocaleCurrencySymbol, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleDayNames, getLocaleDayPeriods, getLocaleDirection, getLocaleEraNames, getLocaleExtraDayPeriodRules, getLocaleExtraDayPeriods, getLocaleFirstDayOfWeek, getLocaleId, getLocaleMonthNames, getLocaleNumberFormat, getLocaleNumberSymbol, getLocalePluralCase, getLocaleTimeFormat, getLocaleWeekEndRange, getNumberOfCurrencyDigits } from './common_module-96z1HarB.mjs';
8
8
  import * as i0 from '@angular/core';
9
9
  import { ɵregisterLocaleData as _registerLocaleData, Version, ɵɵdefineInjectable as __defineInjectable, inject, DOCUMENT, InjectionToken, ɵRuntimeError as _RuntimeError, ɵformatRuntimeError as _formatRuntimeError, PLATFORM_ID, Injectable, ɵIMAGE_CONFIG as _IMAGE_CONFIG, Renderer2, ElementRef, Injector, DestroyRef, ɵperformanceMarkFeature as _performanceMarkFeature, NgZone, ApplicationRef, booleanAttribute, numberAttribute, ChangeDetectorRef, ɵIMAGE_CONFIG_DEFAULTS as _IMAGE_CONFIG_DEFAULTS, ɵunwrapSafeValue as _unwrapSafeValue, Input, Directive } from '@angular/core';
10
10
  export { DOCUMENT, ɵIMAGE_CONFIG as IMAGE_CONFIG } from '@angular/core';
@@ -35,7 +35,7 @@ function registerLocaleData(data, localeId, extraData) {
35
35
  /**
36
36
  * @publicApi
37
37
  */
38
- const VERSION = new Version('20.0.0-next.8');
38
+ const VERSION = new Version('20.0.0-next.9');
39
39
 
40
40
  /**
41
41
  * Defines a scroll position manager. Implemented by `BrowserViewportScroller`.
@@ -90,8 +90,8 @@ class BrowserViewportScroller {
90
90
  * Sets the scroll position.
91
91
  * @param position The new position in screen coordinates.
92
92
  */
93
- scrollToPosition(position) {
94
- this.window.scrollTo(position[0], position[1]);
93
+ scrollToPosition(position, options) {
94
+ this.window.scrollTo({ ...options, left: position[0], top: position[1] });
95
95
  }
96
96
  /**
97
97
  * Scrolls to an element and attempts to focus the element.
@@ -104,10 +104,10 @@ class BrowserViewportScroller {
104
104
  * @see https://html.spec.whatwg.org/#the-indicated-part-of-the-document
105
105
  * @see https://html.spec.whatwg.org/#scroll-to-fragid
106
106
  */
107
- scrollToAnchor(target) {
107
+ scrollToAnchor(target, options) {
108
108
  const elSelected = findAnchorFromDocument(this.document, target);
109
109
  if (elSelected) {
110
- this.scrollToElement(elSelected);
110
+ this.scrollToElement(elSelected, options);
111
111
  // After scrolling to the element, the spec dictates that we follow the focus steps for the
112
112
  // target. Rather than following the robust steps, simply attempt focus.
113
113
  //
@@ -129,12 +129,16 @@ class BrowserViewportScroller {
129
129
  * The offset can be used when we know that there is a floating header and scrolling naively to an
130
130
  * element (ex: `scrollIntoView`) leaves the element hidden behind the floating header.
131
131
  */
132
- scrollToElement(el) {
132
+ scrollToElement(el, options) {
133
133
  const rect = el.getBoundingClientRect();
134
134
  const left = rect.left + this.window.pageXOffset;
135
135
  const top = rect.top + this.window.pageYOffset;
136
136
  const offset = this.offset();
137
- this.window.scrollTo(left - offset[0], top - offset[1]);
137
+ this.window.scrollTo({
138
+ ...options,
139
+ left: left - offset[0],
140
+ top: top - offset[1],
141
+ });
138
142
  }
139
143
  }
140
144
  function findAnchorFromDocument(document, target) {
@@ -645,10 +649,10 @@ class LCPImageObserver {
645
649
  this.observer.disconnect();
646
650
  this.images.clear();
647
651
  }
648
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.8", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
649
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.8", ngImport: i0, type: LCPImageObserver, providedIn: 'root' });
652
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
653
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: LCPImageObserver, providedIn: 'root' });
650
654
  }
651
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.8", ngImport: i0, type: LCPImageObserver, decorators: [{
655
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: LCPImageObserver, decorators: [{
652
656
  type: Injectable,
653
657
  args: [{ providedIn: 'root' }]
654
658
  }], ctorParameters: () => [] });
@@ -766,10 +770,10 @@ class PreconnectLinkChecker {
766
770
  this.preconnectLinks?.clear();
767
771
  this.alreadySeen.clear();
768
772
  }
769
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.8", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
770
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.8", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' });
773
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
774
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' });
771
775
  }
772
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.8", ngImport: i0, type: PreconnectLinkChecker, decorators: [{
776
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: PreconnectLinkChecker, decorators: [{
773
777
  type: Injectable,
774
778
  args: [{ providedIn: 'root' }]
775
779
  }], ctorParameters: () => [] });
@@ -857,10 +861,10 @@ class PreloadLinkCreator {
857
861
  }
858
862
  renderer.appendChild(this.document.head, preload);
859
863
  }
860
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.8", ngImport: i0, type: PreloadLinkCreator, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
861
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.8", ngImport: i0, type: PreloadLinkCreator, providedIn: 'root' });
864
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: PreloadLinkCreator, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
865
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: PreloadLinkCreator, providedIn: 'root' });
862
866
  }
863
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.8", ngImport: i0, type: PreloadLinkCreator, decorators: [{
867
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: PreloadLinkCreator, decorators: [{
864
868
  type: Injectable,
865
869
  args: [{ providedIn: 'root' }]
866
870
  }] });
@@ -1428,10 +1432,10 @@ class NgOptimizedImage {
1428
1432
  setHostAttribute(name, value) {
1429
1433
  this.renderer.setAttribute(this.imgElement, name, value);
1430
1434
  }
1431
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.8", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1432
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.0.0-next.8", type: NgOptimizedImage, isStandalone: true, selector: "img[ngSrc]", inputs: { ngSrc: ["ngSrc", "ngSrc", unwrapSafeUrl], ngSrcset: "ngSrcset", sizes: "sizes", width: ["width", "width", numberAttribute], height: ["height", "height", numberAttribute], loading: "loading", priority: ["priority", "priority", booleanAttribute], loaderParams: "loaderParams", disableOptimizedSrcset: ["disableOptimizedSrcset", "disableOptimizedSrcset", booleanAttribute], fill: ["fill", "fill", booleanAttribute], placeholder: ["placeholder", "placeholder", booleanOrUrlAttribute], placeholderConfig: "placeholderConfig", src: "src", srcset: "srcset" }, host: { properties: { "style.position": "fill ? \"absolute\" : null", "style.width": "fill ? \"100%\" : null", "style.height": "fill ? \"100%\" : null", "style.inset": "fill ? \"0\" : null", "style.background-size": "placeholder ? \"cover\" : null", "style.background-position": "placeholder ? \"50% 50%\" : null", "style.background-repeat": "placeholder ? \"no-repeat\" : null", "style.background-image": "placeholder ? generatePlaceholder(placeholder) : null", "style.filter": "placeholder && shouldBlurPlaceholder(placeholderConfig) ? \"blur(15px)\" : null" } }, usesOnChanges: true, ngImport: i0 });
1435
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1436
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.0.0-next.9", type: NgOptimizedImage, isStandalone: true, selector: "img[ngSrc]", inputs: { ngSrc: ["ngSrc", "ngSrc", unwrapSafeUrl], ngSrcset: "ngSrcset", sizes: "sizes", width: ["width", "width", numberAttribute], height: ["height", "height", numberAttribute], loading: "loading", priority: ["priority", "priority", booleanAttribute], loaderParams: "loaderParams", disableOptimizedSrcset: ["disableOptimizedSrcset", "disableOptimizedSrcset", booleanAttribute], fill: ["fill", "fill", booleanAttribute], placeholder: ["placeholder", "placeholder", booleanOrUrlAttribute], placeholderConfig: "placeholderConfig", src: "src", srcset: "srcset" }, host: { properties: { "style.position": "fill ? \"absolute\" : null", "style.width": "fill ? \"100%\" : null", "style.height": "fill ? \"100%\" : null", "style.inset": "fill ? \"0\" : null", "style.background-size": "placeholder ? \"cover\" : null", "style.background-position": "placeholder ? \"50% 50%\" : null", "style.background-repeat": "placeholder ? \"no-repeat\" : null", "style.background-image": "placeholder ? generatePlaceholder(placeholder) : null", "style.filter": "placeholder && shouldBlurPlaceholder(placeholderConfig) ? \"blur(15px)\" : null" } }, usesOnChanges: true, ngImport: i0 });
1433
1437
  }
1434
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.8", ngImport: i0, type: NgOptimizedImage, decorators: [{
1438
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: NgOptimizedImage, decorators: [{
1435
1439
  type: Directive,
1436
1440
  args: [{
1437
1441
  selector: 'img[ngSrc]',