@angular/cdk 19.0.0-next.8 → 19.0.0-rc.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.
Files changed (56) hide show
  1. package/fesm2022/a11y.mjs +326 -282
  2. package/fesm2022/a11y.mjs.map +1 -1
  3. package/fesm2022/accordion.mjs +44 -49
  4. package/fesm2022/accordion.mjs.map +1 -1
  5. package/fesm2022/bidi.mjs +22 -23
  6. package/fesm2022/bidi.mjs.map +1 -1
  7. package/fesm2022/cdk.mjs +1 -1
  8. package/fesm2022/cdk.mjs.map +1 -1
  9. package/fesm2022/clipboard.mjs +34 -30
  10. package/fesm2022/clipboard.mjs.map +1 -1
  11. package/fesm2022/collections.mjs +31 -29
  12. package/fesm2022/collections.mjs.map +1 -1
  13. package/fesm2022/dialog.mjs +214 -135
  14. package/fesm2022/dialog.mjs.map +1 -1
  15. package/fesm2022/drag-drop.mjs +732 -494
  16. package/fesm2022/drag-drop.mjs.map +1 -1
  17. package/fesm2022/layout.mjs +21 -20
  18. package/fesm2022/layout.mjs.map +1 -1
  19. package/fesm2022/listbox.mjs +79 -67
  20. package/fesm2022/listbox.mjs.map +1 -1
  21. package/fesm2022/menu.mjs +247 -231
  22. package/fesm2022/menu.mjs.map +1 -1
  23. package/fesm2022/observers/private.mjs +16 -13
  24. package/fesm2022/observers/private.mjs.map +1 -1
  25. package/fesm2022/observers.mjs +26 -28
  26. package/fesm2022/observers.mjs.map +1 -1
  27. package/fesm2022/overlay.mjs +423 -293
  28. package/fesm2022/overlay.mjs.map +1 -1
  29. package/fesm2022/platform.mjs +51 -52
  30. package/fesm2022/platform.mjs.map +1 -1
  31. package/fesm2022/portal.mjs +115 -83
  32. package/fesm2022/portal.mjs.map +1 -1
  33. package/fesm2022/private.mjs +10 -11
  34. package/fesm2022/private.mjs.map +1 -1
  35. package/fesm2022/scrolling.mjs +191 -175
  36. package/fesm2022/scrolling.mjs.map +1 -1
  37. package/fesm2022/stepper.mjs +104 -78
  38. package/fesm2022/stepper.mjs.map +1 -1
  39. package/fesm2022/table.mjs +469 -279
  40. package/fesm2022/table.mjs.map +1 -1
  41. package/fesm2022/testing/selenium-webdriver.mjs +6 -0
  42. package/fesm2022/testing/selenium-webdriver.mjs.map +1 -1
  43. package/fesm2022/testing/testbed.mjs +16 -7
  44. package/fesm2022/testing/testbed.mjs.map +1 -1
  45. package/fesm2022/testing.mjs +7 -2
  46. package/fesm2022/testing.mjs.map +1 -1
  47. package/fesm2022/text-field.mjs +56 -49
  48. package/fesm2022/text-field.mjs.map +1 -1
  49. package/fesm2022/tree.mjs +243 -134
  50. package/fesm2022/tree.mjs.map +1 -1
  51. package/package.json +1 -1
  52. package/schematics/ng-add/index.js +1 -1
  53. package/schematics/ng-add/index.mjs +1 -1
  54. package/scrolling/index.d.ts +1 -1
  55. package/table/index.d.ts +21 -2
  56. package/tree/index.d.ts +3 -2
@@ -6,24 +6,30 @@ import { distinctUntilChanged, auditTime, filter, takeUntil, startWith, pairwise
6
6
  import { Platform, getRtlScrollAxisType, RtlScrollAxisType, supportsScrollBehavior } from '@angular/cdk/platform';
7
7
  import { DOCUMENT } from '@angular/common';
8
8
  import { Directionality, BidiModule } from '@angular/cdk/bidi';
9
- import { isDataSource, ArrayDataSource, _VIEW_REPEATER_STRATEGY, _RecycleViewRepeaterStrategy } from '@angular/cdk/collections';
9
+ import { _VIEW_REPEATER_STRATEGY, isDataSource, ArrayDataSource, _RecycleViewRepeaterStrategy } from '@angular/cdk/collections';
10
10
 
11
11
  /** The injection token used to specify the virtual scrolling strategy. */
12
12
  const VIRTUAL_SCROLL_STRATEGY = new InjectionToken('VIRTUAL_SCROLL_STRATEGY');
13
13
 
14
14
  /** Virtual scrolling strategy for lists with items of known fixed size. */
15
15
  class FixedSizeVirtualScrollStrategy {
16
+ _scrolledIndexChange = new Subject();
17
+ /** @docs-private Implemented as part of VirtualScrollStrategy. */
18
+ scrolledIndexChange = this._scrolledIndexChange.pipe(distinctUntilChanged());
19
+ /** The attached viewport. */
20
+ _viewport = null;
21
+ /** The size of the items in the virtually scrolling list. */
22
+ _itemSize;
23
+ /** The minimum amount of buffer rendered beyond the viewport (in pixels). */
24
+ _minBufferPx;
25
+ /** The number of buffer items to render beyond the edge of the viewport (in pixels). */
26
+ _maxBufferPx;
16
27
  /**
17
28
  * @param itemSize The size of the items in the virtually scrolling list.
18
29
  * @param minBufferPx The minimum amount of buffer (in pixels) before needing to render more
19
30
  * @param maxBufferPx The amount of buffer (in pixels) to render when rendering more.
20
31
  */
21
32
  constructor(itemSize, minBufferPx, maxBufferPx) {
22
- this._scrolledIndexChange = new Subject();
23
- /** @docs-private Implemented as part of VirtualScrollStrategy. */
24
- this.scrolledIndexChange = this._scrolledIndexChange.pipe(distinctUntilChanged());
25
- /** The attached viewport. */
26
- this._viewport = null;
27
33
  this._itemSize = itemSize;
28
34
  this._minBufferPx = minBufferPx;
29
35
  this._maxBufferPx = maxBufferPx;
@@ -150,13 +156,6 @@ function _fixedSizeVirtualScrollStrategyFactory(fixedSizeDir) {
150
156
  }
151
157
  /** A virtual scroll strategy that supports fixed-size items. */
152
158
  class CdkFixedSizeVirtualScroll {
153
- constructor() {
154
- this._itemSize = 20;
155
- this._minBufferPx = 100;
156
- this._maxBufferPx = 200;
157
- /** The scroll strategy used by this directive. */
158
- this._scrollStrategy = new FixedSizeVirtualScrollStrategy(this.itemSize, this.minBufferPx, this.maxBufferPx);
159
- }
160
159
  /** The size of the items in the list (in pixels). */
161
160
  get itemSize() {
162
161
  return this._itemSize;
@@ -164,6 +163,7 @@ class CdkFixedSizeVirtualScroll {
164
163
  set itemSize(value) {
165
164
  this._itemSize = coerceNumberProperty(value);
166
165
  }
166
+ _itemSize = 20;
167
167
  /**
168
168
  * The minimum amount of buffer rendered beyond the viewport (in pixels).
169
169
  * If the amount of buffer dips below this number, more items will be rendered. Defaults to 100px.
@@ -174,6 +174,7 @@ class CdkFixedSizeVirtualScroll {
174
174
  set minBufferPx(value) {
175
175
  this._minBufferPx = coerceNumberProperty(value);
176
176
  }
177
+ _minBufferPx = 100;
177
178
  /**
178
179
  * The number of pixels worth of buffer to render for when rendering new items. Defaults to 200px.
179
180
  */
@@ -183,23 +184,25 @@ class CdkFixedSizeVirtualScroll {
183
184
  set maxBufferPx(value) {
184
185
  this._maxBufferPx = coerceNumberProperty(value);
185
186
  }
187
+ _maxBufferPx = 200;
188
+ /** The scroll strategy used by this directive. */
189
+ _scrollStrategy = new FixedSizeVirtualScrollStrategy(this.itemSize, this.minBufferPx, this.maxBufferPx);
186
190
  ngOnChanges() {
187
191
  this._scrollStrategy.updateItemAndBufferSize(this.itemSize, this.minBufferPx, this.maxBufferPx);
188
192
  }
189
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: CdkFixedSizeVirtualScroll, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
190
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.8", type: CdkFixedSizeVirtualScroll, isStandalone: true, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: { itemSize: "itemSize", minBufferPx: "minBufferPx", maxBufferPx: "maxBufferPx" }, providers: [
193
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkFixedSizeVirtualScroll, deps: [], target: i0.ɵɵFactoryTarget.Directive });
194
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: CdkFixedSizeVirtualScroll, isStandalone: true, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: { itemSize: "itemSize", minBufferPx: "minBufferPx", maxBufferPx: "maxBufferPx" }, providers: [
191
195
  {
192
196
  provide: VIRTUAL_SCROLL_STRATEGY,
193
197
  useFactory: _fixedSizeVirtualScrollStrategyFactory,
194
198
  deps: [forwardRef(() => CdkFixedSizeVirtualScroll)],
195
199
  },
196
- ], usesOnChanges: true, ngImport: i0 }); }
200
+ ], usesOnChanges: true, ngImport: i0 });
197
201
  }
198
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: CdkFixedSizeVirtualScroll, decorators: [{
202
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkFixedSizeVirtualScroll, decorators: [{
199
203
  type: Directive,
200
204
  args: [{
201
205
  selector: 'cdk-virtual-scroll-viewport[itemSize]',
202
- standalone: true,
203
206
  providers: [
204
207
  {
205
208
  provide: VIRTUAL_SCROLL_STRATEGY,
@@ -223,23 +226,22 @@ const DEFAULT_SCROLL_TIME = 20;
223
226
  * Scrollable references emit a scrolled event.
224
227
  */
225
228
  class ScrollDispatcher {
226
- constructor() {
227
- this._ngZone = inject(NgZone);
228
- this._platform = inject(Platform);
229
- /** Used to reference correct document/window */
230
- this._document = inject(DOCUMENT, { optional: true });
231
- /** Subject for notifying that a registered scrollable reference element has been scrolled. */
232
- this._scrolled = new Subject();
233
- /** Keeps track of the global `scroll` and `resize` subscriptions. */
234
- this._globalSubscription = null;
235
- /** Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards. */
236
- this._scrolledCount = 0;
237
- /**
238
- * Map of all the scrollable references that are registered with the service and their
239
- * scroll event subscriptions.
240
- */
241
- this.scrollContainers = new Map();
242
- }
229
+ _ngZone = inject(NgZone);
230
+ _platform = inject(Platform);
231
+ /** Used to reference correct document/window */
232
+ _document = inject(DOCUMENT, { optional: true });
233
+ constructor() { }
234
+ /** Subject for notifying that a registered scrollable reference element has been scrolled. */
235
+ _scrolled = new Subject();
236
+ /** Keeps track of the global `scroll` and `resize` subscriptions. */
237
+ _globalSubscription = null;
238
+ /** Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards. */
239
+ _scrolledCount = 0;
240
+ /**
241
+ * Map of all the scrollable references that are registered with the service and their
242
+ * scroll event subscriptions.
243
+ */
244
+ scrollContainers = new Map();
243
245
  /**
244
246
  * Registers a scrollable instance with the service and listens for its scrolled events. When the
245
247
  * scrollable is scrolled, the service emits the event to its scrolled observable.
@@ -352,10 +354,10 @@ class ScrollDispatcher {
352
354
  this._globalSubscription = null;
353
355
  }
354
356
  }
355
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: ScrollDispatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
356
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: ScrollDispatcher, providedIn: 'root' }); }
357
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: ScrollDispatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
358
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: ScrollDispatcher, providedIn: 'root' });
357
359
  }
358
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: ScrollDispatcher, decorators: [{
360
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: ScrollDispatcher, decorators: [{
359
361
  type: Injectable,
360
362
  args: [{ providedIn: 'root' }]
361
363
  }], ctorParameters: () => [] });
@@ -366,16 +368,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8",
366
368
  * can be listened to through the service.
367
369
  */
368
370
  class CdkScrollable {
369
- constructor() {
370
- this.elementRef = inject(ElementRef);
371
- this.scrollDispatcher = inject(ScrollDispatcher);
372
- this.ngZone = inject(NgZone);
373
- this.dir = inject(Directionality, { optional: true });
374
- this._destroyed = new Subject();
375
- this._elementScrolled = new Observable((observer) => this.ngZone.runOutsideAngular(() => fromEvent(this.elementRef.nativeElement, 'scroll')
376
- .pipe(takeUntil(this._destroyed))
377
- .subscribe(observer)));
378
- }
371
+ elementRef = inject(ElementRef);
372
+ scrollDispatcher = inject(ScrollDispatcher);
373
+ ngZone = inject(NgZone);
374
+ dir = inject(Directionality, { optional: true });
375
+ _destroyed = new Subject();
376
+ _elementScrolled = new Observable((observer) => this.ngZone.runOutsideAngular(() => fromEvent(this.elementRef.nativeElement, 'scroll')
377
+ .pipe(takeUntil(this._destroyed))
378
+ .subscribe(observer)));
379
+ constructor() { }
379
380
  ngOnInit() {
380
381
  this.scrollDispatcher.register(this);
381
382
  }
@@ -508,14 +509,13 @@ class CdkScrollable {
508
509
  }
509
510
  }
510
511
  }
511
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: CdkScrollable, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
512
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.8", type: CdkScrollable, isStandalone: true, selector: "[cdk-scrollable], [cdkScrollable]", ngImport: i0 }); }
512
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkScrollable, deps: [], target: i0.ɵɵFactoryTarget.Directive });
513
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: CdkScrollable, isStandalone: true, selector: "[cdk-scrollable], [cdkScrollable]", ngImport: i0 });
513
514
  }
514
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: CdkScrollable, decorators: [{
515
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkScrollable, decorators: [{
515
516
  type: Directive,
516
517
  args: [{
517
518
  selector: '[cdk-scrollable], [cdkScrollable]',
518
- standalone: true,
519
519
  }]
520
520
  }], ctorParameters: () => [] });
521
521
 
@@ -526,16 +526,18 @@ const DEFAULT_RESIZE_TIME = 20;
526
526
  * @docs-private
527
527
  */
528
528
  class ViewportRuler {
529
+ _platform = inject(Platform);
530
+ /** Cached viewport dimensions. */
531
+ _viewportSize;
532
+ /** Stream of viewport change events. */
533
+ _change = new Subject();
534
+ /** Event listener that will be used to handle the viewport change events. */
535
+ _changeListener = (event) => {
536
+ this._change.next(event);
537
+ };
538
+ /** Used to reference correct document/window */
539
+ _document = inject(DOCUMENT, { optional: true });
529
540
  constructor() {
530
- this._platform = inject(Platform);
531
- /** Stream of viewport change events. */
532
- this._change = new Subject();
533
- /** Event listener that will be used to handle the viewport change events. */
534
- this._changeListener = (event) => {
535
- this._change.next(event);
536
- };
537
- /** Used to reference correct document/window */
538
- this._document = inject(DOCUMENT, { optional: true });
539
541
  const ngZone = inject(NgZone);
540
542
  ngZone.runOutsideAngular(() => {
541
543
  if (this._platform.isBrowser) {
@@ -640,10 +642,10 @@ class ViewportRuler {
640
642
  ? { width: window.innerWidth, height: window.innerHeight }
641
643
  : { width: 0, height: 0 };
642
644
  }
643
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: ViewportRuler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
644
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: ViewportRuler, providedIn: 'root' }); }
645
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: ViewportRuler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
646
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: ViewportRuler, providedIn: 'root' });
645
647
  }
646
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: ViewportRuler, decorators: [{
648
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: ViewportRuler, decorators: [{
647
649
  type: Injectable,
648
650
  args: [{ providedIn: 'root' }]
649
651
  }], ctorParameters: () => [] });
@@ -665,10 +667,10 @@ class CdkVirtualScrollable extends CdkScrollable {
665
667
  const viewportEl = this.elementRef.nativeElement;
666
668
  return orientation === 'horizontal' ? viewportEl.clientWidth : viewportEl.clientHeight;
667
669
  }
668
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: CdkVirtualScrollable, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
669
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.8", type: CdkVirtualScrollable, usesInheritance: true, ngImport: i0 }); }
670
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkVirtualScrollable, deps: [], target: i0.ɵɵFactoryTarget.Directive });
671
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: CdkVirtualScrollable, isStandalone: true, usesInheritance: true, ngImport: i0 });
670
672
  }
671
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: CdkVirtualScrollable, decorators: [{
673
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkVirtualScrollable, decorators: [{
672
674
  type: Directive
673
675
  }], ctorParameters: () => [] });
674
676
 
@@ -684,6 +686,17 @@ function rangesEqual(r1, r2) {
684
686
  const SCROLL_SCHEDULER = typeof requestAnimationFrame !== 'undefined' ? animationFrameScheduler : asapScheduler;
685
687
  /** A viewport that virtualizes its scrolling with the help of `CdkVirtualForOf`. */
686
688
  class CdkVirtualScrollViewport extends CdkVirtualScrollable {
689
+ elementRef = inject(ElementRef);
690
+ _changeDetectorRef = inject(ChangeDetectorRef);
691
+ _scrollStrategy = inject(VIRTUAL_SCROLL_STRATEGY, {
692
+ optional: true,
693
+ });
694
+ scrollable = inject(VIRTUAL_SCROLLABLE, { optional: true });
695
+ _platform = inject(Platform);
696
+ /** Emits when the viewport is detached from a CdkVirtualForOf. */
697
+ _detachedSubject = new Subject();
698
+ /** Emits when the rendered range changes. */
699
+ _renderedRangeSubject = new Subject();
687
700
  /** The direction the viewport scrolls. */
688
701
  get orientation() {
689
702
  return this._orientation;
@@ -694,62 +707,60 @@ class CdkVirtualScrollViewport extends CdkVirtualScrollable {
694
707
  this._calculateSpacerSize();
695
708
  }
696
709
  }
710
+ _orientation = 'vertical';
711
+ /**
712
+ * Whether rendered items should persist in the DOM after scrolling out of view. By default, items
713
+ * will be removed.
714
+ */
715
+ appendOnly = false;
716
+ // Note: we don't use the typical EventEmitter here because we need to subscribe to the scroll
717
+ // strategy lazily (i.e. only if the user is actually listening to the events). We do this because
718
+ // depending on how the strategy calculates the scrolled index, it may come at a cost to
719
+ // performance.
720
+ /** Emits when the index of the first element visible in the viewport changes. */
721
+ scrolledIndexChange = new Observable((observer) => this._scrollStrategy.scrolledIndexChange.subscribe(index => Promise.resolve().then(() => this.ngZone.run(() => observer.next(index)))));
722
+ /** The element that wraps the rendered content. */
723
+ _contentWrapper;
724
+ /** A stream that emits whenever the rendered range changes. */
725
+ renderedRangeStream = this._renderedRangeSubject;
726
+ /**
727
+ * The total size of all content (in pixels), including content that is not currently rendered.
728
+ */
729
+ _totalContentSize = 0;
730
+ /** A string representing the `style.width` property value to be used for the spacer element. */
731
+ _totalContentWidth = '';
732
+ /** A string representing the `style.height` property value to be used for the spacer element. */
733
+ _totalContentHeight = '';
734
+ /**
735
+ * The CSS transform applied to the rendered subset of items so that they appear within the bounds
736
+ * of the visible viewport.
737
+ */
738
+ _renderedContentTransform;
739
+ /** The currently rendered range of indices. */
740
+ _renderedRange = { start: 0, end: 0 };
741
+ /** The length of the data bound to this viewport (in number of items). */
742
+ _dataLength = 0;
743
+ /** The size of the viewport (in pixels). */
744
+ _viewportSize = 0;
745
+ /** the currently attached CdkVirtualScrollRepeater. */
746
+ _forOf;
747
+ /** The last rendered content offset that was set. */
748
+ _renderedContentOffset = 0;
749
+ /**
750
+ * Whether the last rendered content offset was to the end of the content (and therefore needs to
751
+ * be rewritten as an offset to the start of the content).
752
+ */
753
+ _renderedContentOffsetNeedsRewrite = false;
754
+ /** Whether there is a pending change detection cycle. */
755
+ _isChangeDetectionPending = false;
756
+ /** A list of functions to run after the next change detection cycle. */
757
+ _runAfterChangeDetection = [];
758
+ /** Subscription to changes in the viewport size. */
759
+ _viewportChanges = Subscription.EMPTY;
760
+ _injector = inject(Injector);
761
+ _isDestroyed = false;
697
762
  constructor() {
698
763
  super();
699
- this.elementRef = inject(ElementRef);
700
- this._changeDetectorRef = inject(ChangeDetectorRef);
701
- this._scrollStrategy = inject(VIRTUAL_SCROLL_STRATEGY, {
702
- optional: true,
703
- });
704
- this.scrollable = inject(VIRTUAL_SCROLLABLE, { optional: true });
705
- this._platform = inject(Platform);
706
- /** Emits when the viewport is detached from a CdkVirtualForOf. */
707
- this._detachedSubject = new Subject();
708
- /** Emits when the rendered range changes. */
709
- this._renderedRangeSubject = new Subject();
710
- this._orientation = 'vertical';
711
- /**
712
- * Whether rendered items should persist in the DOM after scrolling out of view. By default, items
713
- * will be removed.
714
- */
715
- this.appendOnly = false;
716
- // Note: we don't use the typical EventEmitter here because we need to subscribe to the scroll
717
- // strategy lazily (i.e. only if the user is actually listening to the events). We do this because
718
- // depending on how the strategy calculates the scrolled index, it may come at a cost to
719
- // performance.
720
- /** Emits when the index of the first element visible in the viewport changes. */
721
- this.scrolledIndexChange = new Observable((observer) => this._scrollStrategy.scrolledIndexChange.subscribe(index => Promise.resolve().then(() => this.ngZone.run(() => observer.next(index)))));
722
- /** A stream that emits whenever the rendered range changes. */
723
- this.renderedRangeStream = this._renderedRangeSubject;
724
- /**
725
- * The total size of all content (in pixels), including content that is not currently rendered.
726
- */
727
- this._totalContentSize = 0;
728
- /** A string representing the `style.width` property value to be used for the spacer element. */
729
- this._totalContentWidth = '';
730
- /** A string representing the `style.height` property value to be used for the spacer element. */
731
- this._totalContentHeight = '';
732
- /** The currently rendered range of indices. */
733
- this._renderedRange = { start: 0, end: 0 };
734
- /** The length of the data bound to this viewport (in number of items). */
735
- this._dataLength = 0;
736
- /** The size of the viewport (in pixels). */
737
- this._viewportSize = 0;
738
- /** The last rendered content offset that was set. */
739
- this._renderedContentOffset = 0;
740
- /**
741
- * Whether the last rendered content offset was to the end of the content (and therefore needs to
742
- * be rewritten as an offset to the start of the content).
743
- */
744
- this._renderedContentOffsetNeedsRewrite = false;
745
- /** Whether there is a pending change detection cycle. */
746
- this._isChangeDetectionPending = false;
747
- /** A list of functions to run after the next change detection cycle. */
748
- this._runAfterChangeDetection = [];
749
- /** Subscription to changes in the viewport size. */
750
- this._viewportChanges = Subscription.EMPTY;
751
- this._injector = inject(Injector);
752
- this._isDestroyed = false;
753
764
  const viewportRuler = inject(ViewportRuler);
754
765
  if (!this._scrollStrategy && (typeof ngDevMode === 'undefined' || ngDevMode)) {
755
766
  throw Error('Error: cdk-virtual-scroll-viewport requires the "itemSize" property to be set.');
@@ -1052,22 +1063,22 @@ class CdkVirtualScrollViewport extends CdkVirtualScrollable {
1052
1063
  this._totalContentWidth =
1053
1064
  this.orientation === 'horizontal' ? `${this._totalContentSize}px` : '';
1054
1065
  }
1055
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: CdkVirtualScrollViewport, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1056
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.0.0-next.8", type: CdkVirtualScrollViewport, isStandalone: true, selector: "cdk-virtual-scroll-viewport", inputs: { orientation: "orientation", appendOnly: ["appendOnly", "appendOnly", booleanAttribute] }, outputs: { scrolledIndexChange: "scrolledIndexChange" }, host: { properties: { "class.cdk-virtual-scroll-orientation-horizontal": "orientation === \"horizontal\"", "class.cdk-virtual-scroll-orientation-vertical": "orientation !== \"horizontal\"" }, classAttribute: "cdk-virtual-scroll-viewport" }, providers: [
1066
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkVirtualScrollViewport, deps: [], target: i0.ɵɵFactoryTarget.Component });
1067
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.0.0-next.10", type: CdkVirtualScrollViewport, isStandalone: true, selector: "cdk-virtual-scroll-viewport", inputs: { orientation: "orientation", appendOnly: ["appendOnly", "appendOnly", booleanAttribute] }, outputs: { scrolledIndexChange: "scrolledIndexChange" }, host: { properties: { "class.cdk-virtual-scroll-orientation-horizontal": "orientation === \"horizontal\"", "class.cdk-virtual-scroll-orientation-vertical": "orientation !== \"horizontal\"" }, classAttribute: "cdk-virtual-scroll-viewport" }, providers: [
1057
1068
  {
1058
1069
  provide: CdkScrollable,
1059
1070
  useFactory: (virtualScrollable, viewport) => virtualScrollable || viewport,
1060
1071
  deps: [[new Optional(), new Inject(VIRTUAL_SCROLLABLE)], CdkVirtualScrollViewport],
1061
1072
  },
1062
- ], viewQueries: [{ propertyName: "_contentWrapper", first: true, predicate: ["contentWrapper"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<!--\n Wrap the rendered content in an element that will be used to offset it based on the scroll\n position.\n-->\n<div #contentWrapper class=\"cdk-virtual-scroll-content-wrapper\">\n <ng-content></ng-content>\n</div>\n<!--\n Spacer used to force the scrolling container to the correct size for the *total* number of items\n so that the scrollbar captures the size of the entire data set.\n-->\n<div class=\"cdk-virtual-scroll-spacer\"\n [style.width]=\"_totalContentWidth\" [style.height]=\"_totalContentHeight\"></div>\n", styles: ["cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1073
+ ], viewQueries: [{ propertyName: "_contentWrapper", first: true, predicate: ["contentWrapper"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<!--\n Wrap the rendered content in an element that will be used to offset it based on the scroll\n position.\n-->\n<div #contentWrapper class=\"cdk-virtual-scroll-content-wrapper\">\n <ng-content></ng-content>\n</div>\n<!--\n Spacer used to force the scrolling container to the correct size for the *total* number of items\n so that the scrollbar captures the size of the entire data set.\n-->\n<div class=\"cdk-virtual-scroll-spacer\"\n [style.width]=\"_totalContentWidth\" [style.height]=\"_totalContentHeight\"></div>\n", styles: ["cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1063
1074
  }
1064
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: CdkVirtualScrollViewport, decorators: [{
1075
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkVirtualScrollViewport, decorators: [{
1065
1076
  type: Component,
1066
1077
  args: [{ selector: 'cdk-virtual-scroll-viewport', host: {
1067
1078
  'class': 'cdk-virtual-scroll-viewport',
1068
1079
  '[class.cdk-virtual-scroll-orientation-horizontal]': 'orientation === "horizontal"',
1069
1080
  '[class.cdk-virtual-scroll-orientation-vertical]': 'orientation !== "horizontal"',
1070
- }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, providers: [
1081
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
1071
1082
  {
1072
1083
  provide: CdkScrollable,
1073
1084
  useFactory: (virtualScrollable, viewport) => virtualScrollable || viewport,
@@ -1103,6 +1114,15 @@ function getOffset(orientation, direction, node) {
1103
1114
  * container.
1104
1115
  */
1105
1116
  class CdkVirtualForOf {
1117
+ _viewContainerRef = inject(ViewContainerRef);
1118
+ _template = inject(TemplateRef);
1119
+ _differs = inject(IterableDiffers);
1120
+ _viewRepeater = inject(_VIEW_REPEATER_STRATEGY);
1121
+ _viewport = inject(CdkVirtualScrollViewport, { skipSelf: true });
1122
+ /** Emits when the rendered view of the data changes. */
1123
+ viewChange = new Subject();
1124
+ /** Subject that emits when a new DataSource instance is given. */
1125
+ _dataSourceChanges = new Subject();
1106
1126
  /** The DataSource to display. */
1107
1127
  get cdkVirtualForOf() {
1108
1128
  return this._cdkVirtualForOf;
@@ -1117,6 +1137,7 @@ class CdkVirtualForOf {
1117
1137
  this._dataSourceChanges.next(new ArrayDataSource(isObservable(value) ? value : Array.from(value || [])));
1118
1138
  }
1119
1139
  }
1140
+ _cdkVirtualForOf;
1120
1141
  /**
1121
1142
  * The `TrackByFunction` to use for tracking changes. The `TrackByFunction` takes the index and
1122
1143
  * the item and produces a value to be used as the item's identity when tracking changes.
@@ -1130,6 +1151,7 @@ class CdkVirtualForOf {
1130
1151
  ? (index, item) => fn(index + (this._renderedRange ? this._renderedRange.start : 0), item)
1131
1152
  : undefined;
1132
1153
  }
1154
+ _cdkVirtualForTrackBy;
1133
1155
  /** The template used to stamp out new elements. */
1134
1156
  set cdkVirtualForTemplate(value) {
1135
1157
  if (value) {
@@ -1147,33 +1169,30 @@ class CdkVirtualForOf {
1147
1169
  set cdkVirtualForTemplateCacheSize(size) {
1148
1170
  this._viewRepeater.viewCacheSize = coerceNumberProperty(size);
1149
1171
  }
1172
+ /** Emits whenever the data in the current DataSource changes. */
1173
+ dataStream = this._dataSourceChanges.pipe(
1174
+ // Start off with null `DataSource`.
1175
+ startWith(null),
1176
+ // Bundle up the previous and current data sources so we can work with both.
1177
+ pairwise(),
1178
+ // Use `_changeDataSource` to disconnect from the previous data source and connect to the
1179
+ // new one, passing back a stream of data changes which we run through `switchMap` to give
1180
+ // us a data stream that emits the latest data from whatever the current `DataSource` is.
1181
+ switchMap(([prev, cur]) => this._changeDataSource(prev, cur)),
1182
+ // Replay the last emitted data when someone subscribes.
1183
+ shareReplay(1));
1184
+ /** The differ used to calculate changes to the data. */
1185
+ _differ = null;
1186
+ /** The most recent data emitted from the DataSource. */
1187
+ _data;
1188
+ /** The currently rendered items. */
1189
+ _renderedItems;
1190
+ /** The currently rendered range of indices. */
1191
+ _renderedRange;
1192
+ /** Whether the rendered data should be updated during the next ngDoCheck cycle. */
1193
+ _needsUpdate = false;
1194
+ _destroyed = new Subject();
1150
1195
  constructor() {
1151
- this._viewContainerRef = inject(ViewContainerRef);
1152
- this._template = inject(TemplateRef);
1153
- this._differs = inject(IterableDiffers);
1154
- this._viewRepeater = inject(_VIEW_REPEATER_STRATEGY);
1155
- this._viewport = inject(CdkVirtualScrollViewport, { skipSelf: true });
1156
- /** Emits when the rendered view of the data changes. */
1157
- this.viewChange = new Subject();
1158
- /** Subject that emits when a new DataSource instance is given. */
1159
- this._dataSourceChanges = new Subject();
1160
- /** Emits whenever the data in the current DataSource changes. */
1161
- this.dataStream = this._dataSourceChanges.pipe(
1162
- // Start off with null `DataSource`.
1163
- startWith(null),
1164
- // Bundle up the previous and current data sources so we can work with both.
1165
- pairwise(),
1166
- // Use `_changeDataSource` to disconnect from the previous data source and connect to the
1167
- // new one, passing back a stream of data changes which we run through `switchMap` to give
1168
- // us a data stream that emits the latest data from whatever the current `DataSource` is.
1169
- switchMap(([prev, cur]) => this._changeDataSource(prev, cur)),
1170
- // Replay the last emitted data when someone subscribes.
1171
- shareReplay(1));
1172
- /** The differ used to calculate changes to the data. */
1173
- this._differ = null;
1174
- /** Whether the rendered data should be updated during the next ngDoCheck cycle. */
1175
- this._needsUpdate = false;
1176
- this._destroyed = new Subject();
1177
1196
  const ngZone = inject(NgZone);
1178
1197
  this.dataStream.subscribe(data => {
1179
1198
  this._data = data;
@@ -1338,15 +1357,14 @@ class CdkVirtualForOf {
1338
1357
  static ngTemplateContextGuard(directive, context) {
1339
1358
  return true;
1340
1359
  }
1341
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: CdkVirtualForOf, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1342
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.8", type: CdkVirtualForOf, isStandalone: true, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: { cdkVirtualForOf: "cdkVirtualForOf", cdkVirtualForTrackBy: "cdkVirtualForTrackBy", cdkVirtualForTemplate: "cdkVirtualForTemplate", cdkVirtualForTemplateCacheSize: "cdkVirtualForTemplateCacheSize" }, providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }], ngImport: i0 }); }
1360
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkVirtualForOf, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1361
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: CdkVirtualForOf, isStandalone: true, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: { cdkVirtualForOf: "cdkVirtualForOf", cdkVirtualForTrackBy: "cdkVirtualForTrackBy", cdkVirtualForTemplate: "cdkVirtualForTemplate", cdkVirtualForTemplateCacheSize: "cdkVirtualForTemplateCacheSize" }, providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }], ngImport: i0 });
1343
1362
  }
1344
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: CdkVirtualForOf, decorators: [{
1363
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkVirtualForOf, decorators: [{
1345
1364
  type: Directive,
1346
1365
  args: [{
1347
1366
  selector: '[cdkVirtualFor][cdkVirtualForOf]',
1348
1367
  providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }],
1349
- standalone: true,
1350
1368
  }]
1351
1369
  }], ctorParameters: () => [], propDecorators: { cdkVirtualForOf: [{
1352
1370
  type: Input
@@ -1369,15 +1387,14 @@ class CdkVirtualScrollableElement extends CdkVirtualScrollable {
1369
1387
  return (this.getElementRef().nativeElement.getBoundingClientRect()[from] -
1370
1388
  this.measureScrollOffset(from));
1371
1389
  }
1372
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: CdkVirtualScrollableElement, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1373
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.8", type: CdkVirtualScrollableElement, isStandalone: true, selector: "[cdkVirtualScrollingElement]", host: { classAttribute: "cdk-virtual-scrollable" }, providers: [{ provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableElement }], usesInheritance: true, ngImport: i0 }); }
1390
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkVirtualScrollableElement, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1391
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: CdkVirtualScrollableElement, isStandalone: true, selector: "[cdkVirtualScrollingElement]", host: { classAttribute: "cdk-virtual-scrollable" }, providers: [{ provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableElement }], usesInheritance: true, ngImport: i0 });
1374
1392
  }
1375
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: CdkVirtualScrollableElement, decorators: [{
1393
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkVirtualScrollableElement, decorators: [{
1376
1394
  type: Directive,
1377
1395
  args: [{
1378
1396
  selector: '[cdkVirtualScrollingElement]',
1379
1397
  providers: [{ provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableElement }],
1380
- standalone: true,
1381
1398
  host: {
1382
1399
  'class': 'cdk-virtual-scrollable',
1383
1400
  },
@@ -1388,32 +1405,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8",
1388
1405
  * Provides as virtual scrollable for the global / window scrollbar.
1389
1406
  */
1390
1407
  class CdkVirtualScrollableWindow extends CdkVirtualScrollable {
1408
+ _elementScrolled = new Observable((observer) => this.ngZone.runOutsideAngular(() => fromEvent(document, 'scroll').pipe(takeUntil(this._destroyed)).subscribe(observer)));
1391
1409
  constructor() {
1392
1410
  super();
1393
- this._elementScrolled = new Observable((observer) => this.ngZone.runOutsideAngular(() => fromEvent(document, 'scroll').pipe(takeUntil(this._destroyed)).subscribe(observer)));
1394
1411
  this.elementRef = new ElementRef(document.documentElement);
1395
1412
  }
1396
1413
  measureBoundingClientRectWithScrollOffset(from) {
1397
1414
  return this.getElementRef().nativeElement.getBoundingClientRect()[from];
1398
1415
  }
1399
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: CdkVirtualScrollableWindow, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1400
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.8", type: CdkVirtualScrollableWindow, isStandalone: true, selector: "cdk-virtual-scroll-viewport[scrollWindow]", providers: [{ provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableWindow }], usesInheritance: true, ngImport: i0 }); }
1416
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkVirtualScrollableWindow, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1417
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: CdkVirtualScrollableWindow, isStandalone: true, selector: "cdk-virtual-scroll-viewport[scrollWindow]", providers: [{ provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableWindow }], usesInheritance: true, ngImport: i0 });
1401
1418
  }
1402
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: CdkVirtualScrollableWindow, decorators: [{
1419
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkVirtualScrollableWindow, decorators: [{
1403
1420
  type: Directive,
1404
1421
  args: [{
1405
1422
  selector: 'cdk-virtual-scroll-viewport[scrollWindow]',
1406
1423
  providers: [{ provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableWindow }],
1407
- standalone: true,
1408
1424
  }]
1409
1425
  }], ctorParameters: () => [] });
1410
1426
 
1411
1427
  class CdkScrollableModule {
1412
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: CdkScrollableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1413
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.8", ngImport: i0, type: CdkScrollableModule, imports: [CdkScrollable], exports: [CdkScrollable] }); }
1414
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: CdkScrollableModule }); }
1428
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkScrollableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1429
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkScrollableModule, imports: [CdkScrollable], exports: [CdkScrollable] });
1430
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkScrollableModule });
1415
1431
  }
1416
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: CdkScrollableModule, decorators: [{
1432
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: CdkScrollableModule, decorators: [{
1417
1433
  type: NgModule,
1418
1434
  args: [{
1419
1435
  exports: [CdkScrollable],
@@ -1424,8 +1440,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8",
1424
1440
  * @docs-primary-export
1425
1441
  */
1426
1442
  class ScrollingModule {
1427
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: ScrollingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1428
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.8", ngImport: i0, type: ScrollingModule, imports: [BidiModule, CdkScrollableModule, CdkVirtualScrollViewport,
1443
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: ScrollingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1444
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.10", ngImport: i0, type: ScrollingModule, imports: [BidiModule, CdkScrollableModule, CdkVirtualScrollViewport,
1429
1445
  CdkFixedSizeVirtualScroll,
1430
1446
  CdkVirtualForOf,
1431
1447
  CdkVirtualScrollableWindow,
@@ -1433,11 +1449,11 @@ class ScrollingModule {
1433
1449
  CdkVirtualForOf,
1434
1450
  CdkVirtualScrollViewport,
1435
1451
  CdkVirtualScrollableWindow,
1436
- CdkVirtualScrollableElement] }); }
1437
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: ScrollingModule, imports: [BidiModule,
1438
- CdkScrollableModule, BidiModule, CdkScrollableModule] }); }
1452
+ CdkVirtualScrollableElement] });
1453
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: ScrollingModule, imports: [BidiModule,
1454
+ CdkScrollableModule, BidiModule, CdkScrollableModule] });
1439
1455
  }
1440
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8", ngImport: i0, type: ScrollingModule, decorators: [{
1456
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: ScrollingModule, decorators: [{
1441
1457
  type: NgModule,
1442
1458
  args: [{
1443
1459
  imports: [