@angular/cdk 21.1.0-next.1 → 21.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.
Files changed (106) hide show
  1. package/fesm2022/_a11y-module-chunk.mjs +29 -31
  2. package/fesm2022/_a11y-module-chunk.mjs.map +1 -1
  3. package/fesm2022/_activedescendant-key-manager-chunk.mjs.map +1 -1
  4. package/fesm2022/_array-chunk.mjs.map +1 -1
  5. package/fesm2022/_breakpoints-observer-chunk.mjs +6 -6
  6. package/fesm2022/_breakpoints-observer-chunk.mjs.map +1 -1
  7. package/fesm2022/_css-pixel-value-chunk.mjs.map +1 -1
  8. package/fesm2022/_data-source-chunk.mjs.map +1 -1
  9. package/fesm2022/_directionality-chunk.mjs +3 -3
  10. package/fesm2022/_directionality-chunk.mjs.map +1 -1
  11. package/fesm2022/_dispose-view-repeater-strategy-chunk.mjs.map +1 -1
  12. package/fesm2022/_element-chunk.mjs.map +1 -1
  13. package/fesm2022/_fake-event-detection-chunk.mjs.map +1 -1
  14. package/fesm2022/_focus-key-manager-chunk.mjs.map +1 -1
  15. package/fesm2022/_focus-monitor-chunk.mjs +11 -13
  16. package/fesm2022/_focus-monitor-chunk.mjs.map +1 -1
  17. package/fesm2022/_id-generator-chunk.mjs +3 -3
  18. package/fesm2022/_id-generator-chunk.mjs.map +1 -1
  19. package/fesm2022/_keycodes-chunk.mjs.map +1 -1
  20. package/fesm2022/_list-key-manager-chunk.mjs +6 -6
  21. package/fesm2022/_list-key-manager-chunk.mjs.map +1 -1
  22. package/fesm2022/_overlay-module-chunk.mjs +54 -46
  23. package/fesm2022/_overlay-module-chunk.mjs.map +1 -1
  24. package/fesm2022/_passive-listeners-chunk.mjs.map +1 -1
  25. package/fesm2022/_platform-chunk.mjs +3 -3
  26. package/fesm2022/_platform-chunk.mjs.map +1 -1
  27. package/fesm2022/_recycle-view-repeater-strategy-chunk.mjs +1 -3
  28. package/fesm2022/_recycle-view-repeater-strategy-chunk.mjs.map +1 -1
  29. package/fesm2022/_scrolling-chunk.mjs.map +1 -1
  30. package/fesm2022/_selection-model-chunk.mjs +1 -1
  31. package/fesm2022/_selection-model-chunk.mjs.map +1 -1
  32. package/fesm2022/_shadow-dom-chunk.mjs.map +1 -1
  33. package/fesm2022/_style-loader-chunk.mjs +3 -3
  34. package/fesm2022/_style-loader-chunk.mjs.map +1 -1
  35. package/fesm2022/_test-environment-chunk.mjs.map +1 -1
  36. package/fesm2022/_tree-key-manager-chunk.mjs.map +1 -1
  37. package/fesm2022/_typeahead-chunk.mjs.map +1 -1
  38. package/fesm2022/_unique-selection-dispatcher-chunk.mjs +3 -3
  39. package/fesm2022/_unique-selection-dispatcher-chunk.mjs.map +1 -1
  40. package/fesm2022/a11y.mjs +9 -9
  41. package/fesm2022/a11y.mjs.map +1 -1
  42. package/fesm2022/accordion.mjs +10 -10
  43. package/fesm2022/accordion.mjs.map +1 -1
  44. package/fesm2022/bidi.mjs +8 -8
  45. package/fesm2022/bidi.mjs.map +1 -1
  46. package/fesm2022/cdk.mjs +1 -1
  47. package/fesm2022/cdk.mjs.map +1 -1
  48. package/fesm2022/clipboard.mjs +11 -11
  49. package/fesm2022/clipboard.mjs.map +1 -1
  50. package/fesm2022/coercion-private.mjs.map +1 -1
  51. package/fesm2022/coercion.mjs.map +1 -1
  52. package/fesm2022/collections.mjs +1 -1
  53. package/fesm2022/dialog.mjs +12 -12
  54. package/fesm2022/dialog.mjs.map +1 -1
  55. package/fesm2022/drag-drop.mjs +48 -48
  56. package/fesm2022/drag-drop.mjs.map +1 -1
  57. package/fesm2022/keycodes.mjs.map +1 -1
  58. package/fesm2022/layout.mjs +4 -4
  59. package/fesm2022/layout.mjs.map +1 -1
  60. package/fesm2022/listbox.mjs +11 -11
  61. package/fesm2022/listbox.mjs.map +1 -1
  62. package/fesm2022/menu.mjs +75 -61
  63. package/fesm2022/menu.mjs.map +1 -1
  64. package/fesm2022/observers-private.mjs +3 -3
  65. package/fesm2022/observers-private.mjs.map +1 -1
  66. package/fesm2022/observers.mjs +13 -13
  67. package/fesm2022/observers.mjs.map +1 -1
  68. package/fesm2022/overlay.mjs +3 -3
  69. package/fesm2022/overlay.mjs.map +1 -1
  70. package/fesm2022/platform.mjs +4 -4
  71. package/fesm2022/platform.mjs.map +1 -1
  72. package/fesm2022/portal.mjs +14 -14
  73. package/fesm2022/portal.mjs.map +1 -1
  74. package/fesm2022/private.mjs +3 -3
  75. package/fesm2022/private.mjs.map +1 -1
  76. package/fesm2022/scrolling.mjs +63 -58
  77. package/fesm2022/scrolling.mjs.map +1 -1
  78. package/fesm2022/stepper.mjs +22 -22
  79. package/fesm2022/stepper.mjs.map +1 -1
  80. package/fesm2022/table.mjs +217 -112
  81. package/fesm2022/table.mjs.map +1 -1
  82. package/fesm2022/testing-selenium-webdriver.mjs.map +1 -1
  83. package/fesm2022/testing-testbed.mjs +7 -1
  84. package/fesm2022/testing-testbed.mjs.map +1 -1
  85. package/fesm2022/testing.mjs +10 -13
  86. package/fesm2022/testing.mjs.map +1 -1
  87. package/fesm2022/text-field.mjs +17 -17
  88. package/fesm2022/text-field.mjs.map +1 -1
  89. package/fesm2022/tree.mjs +33 -37
  90. package/fesm2022/tree.mjs.map +1 -1
  91. package/package.json +2 -1
  92. package/schematics/ng-add/index.js +1 -1
  93. package/types/_harness-environment-chunk.d.ts +0 -2
  94. package/types/_overlay-module-chunk.d.ts +2 -1
  95. package/types/_scrolling-module-chunk.d.ts +11 -1
  96. package/types/_view-repeater-chunk.d.ts +2 -7
  97. package/types/collections.d.ts +1 -1
  98. package/types/menu.d.ts +8 -5
  99. package/types/scrolling.d.ts +1 -1
  100. package/types/table.d.ts +62 -11
  101. package/types/testing-testbed.d.ts +3 -0
  102. package/_adev_assets/cdk_drag_drop.json +0 -7221
  103. package/_adev_assets/cdk_testing.json +0 -7601
  104. package/_adev_assets/cdk_testing_protractor.json +0 -1747
  105. package/_adev_assets/cdk_testing_selenium_webdriver.json +0 -1801
  106. package/_adev_assets/cdk_testing_testbed.json +0 -1903
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/cdk",
3
- "version": "21.1.0-next.1",
3
+ "version": "21.1.0-next.3",
4
4
  "description": "Angular Material Component Development Kit",
5
5
  "repository": {
6
6
  "type": "git",
@@ -160,6 +160,7 @@
160
160
  "peerDependencies": {
161
161
  "@angular/core": "^21.0.0-0 || ^21.1.0-0 || ^21.2.0-0 || ^21.3.0-0 || ^22.0.0-0",
162
162
  "@angular/common": "^21.0.0-0 || ^21.1.0-0 || ^21.2.0-0 || ^21.3.0-0 || ^22.0.0-0",
163
+ "@angular/platform-browser": "^21.0.0-0 || ^21.1.0-0 || ^21.2.0-0 || ^21.3.0-0 || ^22.0.0-0",
163
164
  "rxjs": "^6.5.3 || ^7.4.0"
164
165
  },
165
166
  "dependencies": {
@@ -26,6 +26,6 @@ function default_1() {
26
26
  // In order to align the CDK version with other Angular dependencies that are setup by
27
27
  // `@schematics/angular`, we use tilde instead of caret. This is default for Angular
28
28
  // dependencies in new CLI projects.
29
- return (0, utility_1.addDependency)('@angular/cdk', `~21.1.0-next.1`, { existing: utility_1.ExistingBehavior.Skip });
29
+ return (0, utility_1.addDependency)('@angular/cdk', `~21.1.0-next.3`, { existing: utility_1.ExistingBehavior.Skip });
30
30
  }
31
31
  //# sourceMappingURL=index.js.map
@@ -687,8 +687,6 @@ declare class HarnessPredicate<T extends ComponentHarness> {
687
687
  getDescription(): string;
688
688
  /** Gets the selector used to find candidate elements. */
689
689
  getSelector(): string;
690
- /** Adds base options common to all harness types. */
691
- private _addBaseOptions;
692
690
  }
693
691
 
694
692
  /**
@@ -119,6 +119,7 @@ declare class OverlayRef implements PortalOutlet {
119
119
  private _backdropRef;
120
120
  private _detachContentMutationObserver;
121
121
  private _detachContentAfterRenderRef;
122
+ private _disposed;
122
123
  /**
123
124
  * Reference to the parent of the `_host` at the time it was detached. Used to restore
124
125
  * the `_host` to its original position in the DOM when it gets re-attached.
@@ -392,7 +393,7 @@ declare function validateHorizontalPosition(property: string, value: HorizontalC
392
393
  /** Container inside which all overlays will render. */
393
394
  declare class OverlayContainer implements OnDestroy {
394
395
  protected _platform: Platform;
395
- protected _containerElement: HTMLElement;
396
+ protected _containerElement: HTMLElement | undefined;
396
397
  protected _document: Document;
397
398
  protected _styleLoader: _CdkPrivateStyleLoader;
398
399
  constructor(...args: unknown[]);
@@ -171,6 +171,11 @@ declare abstract class CdkVirtualScrollable extends CdkScrollable {
171
171
  static ɵdir: i0.ɵɵDirectiveDeclaration<CdkVirtualScrollable, never, never, {}, {}, never, never, true, never>;
172
172
  }
173
173
 
174
+ /**
175
+ * Lightweight token that can be used to inject the `CdkVirtualScrollViewport`
176
+ * without introducing a hard dependency on it.
177
+ */
178
+ declare const CDK_VIRTUAL_SCROLL_VIEWPORT: InjectionToken<CdkVirtualScrollViewport>;
174
179
  /** A viewport that virtualizes its scrolling with the help of `CdkVirtualForOf`. */
175
180
  declare class CdkVirtualScrollViewport extends CdkVirtualScrollable implements OnInit, OnDestroy {
176
181
  elementRef: ElementRef<HTMLElement>;
@@ -182,6 +187,7 @@ declare class CdkVirtualScrollViewport extends CdkVirtualScrollable implements O
182
187
  private readonly _detachedSubject;
183
188
  /** Emits when the rendered range changes. */
184
189
  private readonly _renderedRangeSubject;
190
+ private readonly _renderedContentOffsetSubject;
185
191
  /** The direction the viewport scrolls. */
186
192
  get orientation(): "horizontal" | "vertical";
187
193
  set orientation(orientation: 'horizontal' | 'vertical');
@@ -197,6 +203,10 @@ declare class CdkVirtualScrollViewport extends CdkVirtualScrollable implements O
197
203
  _contentWrapper: ElementRef<HTMLElement>;
198
204
  /** A stream that emits whenever the rendered range changes. */
199
205
  readonly renderedRangeStream: Observable<ListRange>;
206
+ /**
207
+ * Emits the offset from the start of the viewport to the start of the rendered data (in pixels).
208
+ */
209
+ readonly renderedContentOffset: Observable<number>;
200
210
  /**
201
211
  * The total size of all content (in pixels), including content that is not currently rendered.
202
212
  */
@@ -547,5 +557,5 @@ declare class ScrollingModule {
547
557
  static ɵinj: i0.ɵɵInjectorDeclaration<ScrollingModule>;
548
558
  }
549
559
 
550
- export { CdkFixedSizeVirtualScroll, CdkScrollable, CdkScrollableModule, CdkVirtualForOf, CdkVirtualScrollViewport, CdkVirtualScrollable, CdkVirtualScrollableElement, CdkVirtualScrollableWindow, DEFAULT_SCROLL_TIME, FixedSizeVirtualScrollStrategy, ScrollDispatcher, ScrollingModule, VIRTUAL_SCROLLABLE, VIRTUAL_SCROLL_STRATEGY, _fixedSizeVirtualScrollStrategyFactory };
560
+ export { CDK_VIRTUAL_SCROLL_VIEWPORT, CdkFixedSizeVirtualScroll, CdkScrollable, CdkScrollableModule, CdkVirtualForOf, CdkVirtualScrollViewport, CdkVirtualScrollable, CdkVirtualScrollableElement, CdkVirtualScrollableWindow, DEFAULT_SCROLL_TIME, FixedSizeVirtualScrollStrategy, ScrollDispatcher, ScrollingModule, VIRTUAL_SCROLLABLE, VIRTUAL_SCROLL_STRATEGY, _fixedSizeVirtualScrollStrategyFactory };
551
561
  export type { CdkVirtualForOfContext, CdkVirtualScrollRepeater, ExtendedScrollToOptions, VirtualScrollStrategy, _Bottom, _End, _Left, _Right, _Start, _Top, _Without, _XAxis, _XOR, _YAxis };
@@ -1,4 +1,4 @@
1
- import { TemplateRef, IterableChangeRecord, IterableChanges, ViewContainerRef, InjectionToken } from '@angular/core';
1
+ import { TemplateRef, IterableChangeRecord, IterableChanges, ViewContainerRef } from '@angular/core';
2
2
 
3
3
  /**
4
4
  * The context for an embedded view in the repeater's view container.
@@ -78,11 +78,6 @@ interface _ViewRepeater<T, R, C extends _ViewRepeaterItemContext<T>> {
78
78
  applyChanges(changes: IterableChanges<R>, viewContainerRef: ViewContainerRef, itemContextFactory: _ViewRepeaterItemContextFactory<T, R, C>, itemValueResolver: _ViewRepeaterItemValueResolver<T, R>, itemViewChanged?: _ViewRepeaterItemChanged<R, C>): void;
79
79
  detach(): void;
80
80
  }
81
- /**
82
- * Injection token for `_ViewRepeater`. This token is for use by Angular Material only.
83
- * @docs-private
84
- */
85
- declare const _VIEW_REPEATER_STRATEGY: InjectionToken<_ViewRepeater<unknown, unknown, _ViewRepeaterItemContext<unknown>>>;
86
81
 
87
- export { _VIEW_REPEATER_STRATEGY, _ViewRepeaterOperation };
82
+ export { _ViewRepeaterOperation };
88
83
  export type { _ViewRepeater, _ViewRepeaterItemChange, _ViewRepeaterItemChanged, _ViewRepeaterItemContext, _ViewRepeaterItemContextFactory, _ViewRepeaterItemInsertArgs, _ViewRepeaterItemValueResolver };
@@ -3,7 +3,7 @@ import { DataSource } from './_data-source-chunk.js';
3
3
  export { CollectionViewer, ListRange, isDataSource } from './_data-source-chunk.js';
4
4
  import { IterableChanges, ViewContainerRef } from '@angular/core';
5
5
  import { _ViewRepeaterItemContext, _ViewRepeater, _ViewRepeaterItemContextFactory, _ViewRepeaterItemValueResolver, _ViewRepeaterItemChanged } from './_view-repeater-chunk.js';
6
- export { _VIEW_REPEATER_STRATEGY, _ViewRepeaterItemChange, _ViewRepeaterItemInsertArgs, _ViewRepeaterOperation } from './_view-repeater-chunk.js';
6
+ export { _ViewRepeaterItemChange, _ViewRepeaterItemInsertArgs, _ViewRepeaterOperation } from './_view-repeater-chunk.js';
7
7
  import { SelectionModel } from './_selection-model-chunk.js';
8
8
  export { SelectionChange, getMultipleValuesInSingleSelectionError } from './_selection-model-chunk.js';
9
9
  export { UniqueSelectionDispatcher, UniqueSelectionDispatcherListener } from './_unique-selection-dispatcher-chunk.js';
package/types/menu.d.ts CHANGED
@@ -319,6 +319,11 @@ declare abstract class CdkMenuTriggerBase implements OnDestroy {
319
319
  menuTemplateRef: TemplateRef<unknown> | null;
320
320
  /** Context data to be passed along to the menu template */
321
321
  menuData: unknown;
322
+ /**
323
+ * Selector for the element on which to set the transform origin once the menu is open.
324
+ * This makes it easier to implement animations that start from the attachment point of the menu.
325
+ */
326
+ transformOriginSelector: string | null;
322
327
  /** Close the opened menu. */
323
328
  abstract close(): void;
324
329
  /** A reference to the overlay which manages the triggered menu */
@@ -342,7 +347,7 @@ declare abstract class CdkMenuTriggerBase implements OnDestroy {
342
347
  * Get the portal to be attached to the overlay which contains the menu. Allows for the menu
343
348
  * content to change dynamically and be reflected in the application.
344
349
  */
345
- protected getMenuContentPortal(): TemplatePortal<any>;
350
+ protected getMenuContentPortal(): TemplatePortal<any> | undefined;
346
351
  /**
347
352
  * Whether the given element is inside the scope of this trigger's menu stack.
348
353
  * @param element The element to check.
@@ -436,7 +441,7 @@ declare class CdkMenuTrigger extends CdkMenuTriggerBase implements OnChanges, On
436
441
  /** Sets thte `type` attribute of the trigger. */
437
442
  private _setType;
438
443
  static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuTrigger, never>;
439
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuTrigger, "[cdkMenuTriggerFor]", ["cdkMenuTriggerFor"], { "menuTemplateRef": { "alias": "cdkMenuTriggerFor"; "required": false; }; "menuPosition": { "alias": "cdkMenuPosition"; "required": false; }; "menuData": { "alias": "cdkMenuTriggerData"; "required": false; }; }, { "opened": "cdkMenuOpened"; "closed": "cdkMenuClosed"; }, never, never, true, never>;
444
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuTrigger, "[cdkMenuTriggerFor]", ["cdkMenuTriggerFor"], { "menuTemplateRef": { "alias": "cdkMenuTriggerFor"; "required": false; }; "menuPosition": { "alias": "cdkMenuPosition"; "required": false; }; "menuData": { "alias": "cdkMenuTriggerData"; "required": false; }; "transformOriginSelector": { "alias": "cdkMenuTriggerTransformOriginOn"; "required": false; }; }, { "opened": "cdkMenuOpened"; "closed": "cdkMenuClosed"; }, never, never, true, never>;
440
445
  }
441
446
 
442
447
  /**
@@ -739,8 +744,6 @@ declare class CdkMenuItemRadio extends CdkMenuItemSelectable implements OnDestro
739
744
  trigger(options?: {
740
745
  keepOpen: boolean;
741
746
  }): void;
742
- /** Configure the unique selection dispatcher listener in order to toggle the checked state */
743
- private _registerDispatcherListener;
744
747
  static ɵfac: i0.ɵɵFactoryDeclaration<CdkMenuItemRadio, never>;
745
748
  static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMenuItemRadio, "[cdkMenuItemRadio]", ["cdkMenuItemRadio"], {}, {}, never, never, true, never>;
746
749
  }
@@ -817,7 +820,7 @@ declare class CdkContextMenuTrigger extends CdkMenuTriggerBase implements OnDest
817
820
  */
818
821
  private _open;
819
822
  static ɵfac: i0.ɵɵFactoryDeclaration<CdkContextMenuTrigger, never>;
820
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkContextMenuTrigger, "[cdkContextMenuTriggerFor]", ["cdkContextMenuTriggerFor"], { "menuTemplateRef": { "alias": "cdkContextMenuTriggerFor"; "required": false; }; "menuPosition": { "alias": "cdkContextMenuPosition"; "required": false; }; "menuData": { "alias": "cdkContextMenuTriggerData"; "required": false; }; "disabled": { "alias": "cdkContextMenuDisabled"; "required": false; }; }, { "opened": "cdkContextMenuOpened"; "closed": "cdkContextMenuClosed"; }, never, never, true, never>;
823
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CdkContextMenuTrigger, "[cdkContextMenuTriggerFor]", ["cdkContextMenuTriggerFor"], { "menuTemplateRef": { "alias": "cdkContextMenuTriggerFor"; "required": false; }; "menuPosition": { "alias": "cdkContextMenuPosition"; "required": false; }; "menuData": { "alias": "cdkContextMenuTriggerData"; "required": false; }; "transformOriginSelector": { "alias": "cdkContextMenuTriggerTransformOriginOn"; "required": false; }; "disabled": { "alias": "cdkContextMenuDisabled"; "required": false; }; }, { "opened": "cdkContextMenuOpened"; "closed": "cdkContextMenuClosed"; }, never, never, true, never>;
821
824
  static ngAcceptInputType_disabled: unknown;
822
825
  }
823
826
 
@@ -1,4 +1,4 @@
1
- export { CdkFixedSizeVirtualScroll, CdkScrollable, CdkScrollableModule, CdkVirtualForOf, CdkVirtualForOfContext, CdkVirtualScrollRepeater, CdkVirtualScrollViewport, CdkVirtualScrollable, CdkVirtualScrollableElement, CdkVirtualScrollableWindow, DEFAULT_SCROLL_TIME, ExtendedScrollToOptions, FixedSizeVirtualScrollStrategy, ScrollDispatcher, ScrollingModule, VIRTUAL_SCROLLABLE, VIRTUAL_SCROLL_STRATEGY, VirtualScrollStrategy, _Bottom, _End, _Left, _Right, _Start, _Top, _Without, _XAxis, _XOR, _YAxis, _fixedSizeVirtualScrollStrategyFactory } from './_scrolling-module-chunk.js';
1
+ export { CDK_VIRTUAL_SCROLL_VIEWPORT, CdkFixedSizeVirtualScroll, CdkScrollable, CdkScrollableModule, CdkVirtualForOf, CdkVirtualForOfContext, CdkVirtualScrollRepeater, CdkVirtualScrollViewport, CdkVirtualScrollable, CdkVirtualScrollableElement, CdkVirtualScrollableWindow, DEFAULT_SCROLL_TIME, ExtendedScrollToOptions, FixedSizeVirtualScrollStrategy, ScrollDispatcher, ScrollingModule, VIRTUAL_SCROLLABLE, VIRTUAL_SCROLL_STRATEGY, VirtualScrollStrategy, _Bottom, _End, _Left, _Right, _Start, _Top, _Without, _XAxis, _XOR, _YAxis, _fixedSizeVirtualScrollStrategyFactory } from './_scrolling-module-chunk.js';
2
2
  import * as i0 from '@angular/core';
3
3
  import { OnDestroy } from '@angular/core';
4
4
  import { Observable } from 'rxjs';
package/types/table.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { Directionality } from './_bidi-module-chunk.js';
2
2
  import * as i0 from '@angular/core';
3
3
  import { TemplateRef, ElementRef, OnChanges, IterableDiffers, IterableDiffer, SimpleChanges, IterableChanges, OnDestroy, ViewContainerRef, InjectionToken, AfterContentInit, AfterContentChecked, OnInit, ChangeDetectorRef, TrackByFunction, EventEmitter, QueryList } from '@angular/core';
4
- import { Observable, BehaviorSubject } from 'rxjs';
5
- import { DataSource, CollectionViewer } from './_data-source-chunk.js';
4
+ import { Observable, Subject, BehaviorSubject } from 'rxjs';
5
+ import { DataSource, CollectionViewer, ListRange } from './_data-source-chunk.js';
6
6
  import { _ViewRepeater } from './_view-repeater-chunk.js';
7
7
  import { ScrollingModule } from './_scrolling-module-chunk.js';
8
8
  import './_number-property-chunk.js';
@@ -351,6 +351,9 @@ interface StickyPositioningListener {
351
351
  /**
352
352
  * Enables the recycle view repeater strategy, which reduces rendering latency. Not compatible with
353
353
  * tables that animate rows.
354
+ *
355
+ * @deprecated This directive is a no-op and will be removed.
356
+ * @breaking-change 23.0.0
354
357
  */
355
358
  declare class CdkRecycleRows {
356
359
  static ɵfac: i0.ɵɵFactoryDeclaration<CdkRecycleRows, never>;
@@ -437,18 +440,22 @@ interface RenderRow<T> {
437
440
  * as a data array, an Observable stream that emits the data array to render, or a DataSource with a
438
441
  * connect function that will return an Observable stream that emits the data array to render.
439
442
  */
440
- declare class CdkTable<T> implements AfterContentInit, AfterContentChecked, CollectionViewer, OnDestroy, OnInit {
443
+ declare class CdkTable<T> implements AfterContentInit, AfterContentChecked, CollectionViewer, OnDestroy, OnInit, StickyPositioningListener {
441
444
  protected readonly _differs: IterableDiffers;
442
445
  protected readonly _changeDetectorRef: ChangeDetectorRef;
443
446
  protected readonly _elementRef: ElementRef<any>;
444
447
  protected readonly _dir: Directionality | null;
445
448
  private _platform;
446
- protected readonly _viewRepeater: _ViewRepeater<T, RenderRow<T>, RowContext<T>>;
449
+ protected _viewRepeater: _ViewRepeater<T, RenderRow<T>, RowContext<T>>;
447
450
  private readonly _viewportRuler;
448
- protected readonly _stickyPositioningListener: StickyPositioningListener;
451
+ private _injector;
452
+ private _virtualScrollViewport;
453
+ private _positionListener;
449
454
  private _document;
450
455
  /** Latest data provided by the data source. */
451
456
  protected _data: readonly T[] | undefined;
457
+ /** Latest range of data rendered. */
458
+ protected _renderedRange?: ListRange;
452
459
  /** Subject that emits when the component has been destroyed. */
453
460
  private readonly _onDestroy;
454
461
  /** List of the rendered rows as identified by their `RenderRow` object. */
@@ -569,6 +576,17 @@ declare class CdkTable<T> implements AfterContentInit, AfterContentChecked, Coll
569
576
  private _hasAllOutlets;
570
577
  /** Whether the table is done initializing. */
571
578
  private _hasInitialized;
579
+ /** Emits when the header rows sticky state changes. */
580
+ private readonly _headerRowStickyUpdates;
581
+ /** Emits when the footer rows sticky state changes. */
582
+ private readonly _footerRowStickyUpdates;
583
+ /**
584
+ * Whether to explicitly disable virtual scrolling even if there is a virtual scroll viewport
585
+ * parent. This can't be changed externally, whereas internally it is turned into an input that
586
+ * we use to opt out existing apps that were implementing virtual scroll before we added support
587
+ * for it.
588
+ */
589
+ private readonly _disableVirtualScrolling;
572
590
  /** Aria role to apply to the table's cells based on the table's own role. */
573
591
  _getCellRole(): string | null;
574
592
  private _cellRoleInternal;
@@ -604,6 +622,10 @@ declare class CdkTable<T> implements AfterContentInit, AfterContentChecked, Coll
604
622
  get dataSource(): CdkTableDataSourceInput<T>;
605
623
  set dataSource(dataSource: CdkTableDataSourceInput<T>);
606
624
  private _dataSource;
625
+ /** Emits when the data source changes. */
626
+ readonly _dataSourceChanges: Subject<CdkTableDataSourceInput<T>>;
627
+ /** Observable that emits the data source's complete data set. */
628
+ readonly _dataStream: Subject<readonly T[]>;
607
629
  /**
608
630
  * Whether to allow multiple rows per data object by evaluating which rows evaluate their 'when'
609
631
  * predicate to true. If `multiTemplateDataRows` is false, which is the default value, then each
@@ -620,6 +642,11 @@ declare class CdkTable<T> implements AfterContentInit, AfterContentChecked, Coll
620
642
  get fixedLayout(): boolean;
621
643
  set fixedLayout(value: boolean);
622
644
  private _fixedLayout;
645
+ /**
646
+ * Whether rows should be recycled which reduces latency, but is not compatible with tables
647
+ * that animate rows. Note that this input cannot change after the table is initialized.
648
+ */
649
+ recycleRows: boolean;
623
650
  /**
624
651
  * Emits when the table completes rendering a set of data rows based on the latest data from the
625
652
  * data source, even if the set of rows is empty.
@@ -631,10 +658,7 @@ declare class CdkTable<T> implements AfterContentInit, AfterContentChecked, Coll
631
658
  *
632
659
  * @docs-private
633
660
  */
634
- readonly viewChange: BehaviorSubject<{
635
- start: number;
636
- end: number;
637
- }>;
661
+ readonly viewChange: BehaviorSubject<ListRange>;
638
662
  _rowOutlet: DataRowOutlet;
639
663
  _headerRowOutlet: HeaderRowOutlet;
640
664
  _footerRowOutlet: FooterRowOutlet;
@@ -652,7 +676,6 @@ declare class CdkTable<T> implements AfterContentInit, AfterContentChecked, Coll
652
676
  _contentFooterRowDefs: QueryList<CdkFooterRowDef>;
653
677
  /** Row definition that will only be rendered if there's no data in the table. */
654
678
  _noDataRow: CdkNoDataRow;
655
- private _injector;
656
679
  constructor(...args: unknown[]);
657
680
  ngOnInit(): void;
658
681
  ngAfterContentInit(): void;
@@ -711,6 +734,26 @@ declare class CdkTable<T> implements AfterContentInit, AfterContentChecked, Coll
711
734
  * input. May be called manually for cases where the cell content changes outside of these events.
712
735
  */
713
736
  updateStickyColumnStyles(): void;
737
+ /**
738
+ * Implemented as a part of `StickyPositioningListener`.
739
+ * @docs-private
740
+ */
741
+ stickyColumnsUpdated(update: StickyUpdate): void;
742
+ /**
743
+ * Implemented as a part of `StickyPositioningListener`.
744
+ * @docs-private
745
+ */
746
+ stickyEndColumnsUpdated(update: StickyUpdate): void;
747
+ /**
748
+ * Implemented as a part of `StickyPositioningListener`.
749
+ * @docs-private
750
+ */
751
+ stickyHeaderRowsUpdated(update: StickyUpdate): void;
752
+ /**
753
+ * Implemented as a part of `StickyPositioningListener`.
754
+ * @docs-private
755
+ */
756
+ stickyFooterRowsUpdated(update: StickyUpdate): void;
714
757
  /** Invoked whenever an outlet is created and has been assigned to the table. */
715
758
  _outletAssigned(): void;
716
759
  /** Whether the table has all the information to start rendering. */
@@ -801,14 +844,22 @@ declare class CdkTable<T> implements AfterContentInit, AfterContentChecked, Coll
801
844
  * stickiness when directionality changes.
802
845
  */
803
846
  private _setupStickyStyler;
847
+ private _setupVirtualScrolling;
804
848
  /** Filters definitions that belong to this table from a QueryList. */
805
849
  private _getOwnDefs;
806
850
  /** Creates or removes the no data row, depending on whether any data is being shown. */
807
851
  private _updateNoDataRow;
852
+ /**
853
+ * Measures the size of the rendered range in the table.
854
+ * This is used for virtual scrolling when auto-sizing is enabled.
855
+ */
856
+ private _measureRangeSize;
857
+ private _virtualScrollEnabled;
808
858
  static ɵfac: i0.ɵɵFactoryDeclaration<CdkTable<any>, never>;
809
- static ɵcmp: i0.ɵɵComponentDeclaration<CdkTable<any>, "cdk-table, table[cdk-table]", ["cdkTable"], { "trackBy": { "alias": "trackBy"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "multiTemplateDataRows": { "alias": "multiTemplateDataRows"; "required": false; }; "fixedLayout": { "alias": "fixedLayout"; "required": false; }; }, { "contentChanged": "contentChanged"; }, ["_noDataRow", "_contentColumnDefs", "_contentRowDefs", "_contentHeaderRowDefs", "_contentFooterRowDefs"], ["caption", "colgroup, col", "*"], true, never>;
859
+ static ɵcmp: i0.ɵɵComponentDeclaration<CdkTable<any>, "cdk-table, table[cdk-table]", ["cdkTable"], { "trackBy": { "alias": "trackBy"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "multiTemplateDataRows": { "alias": "multiTemplateDataRows"; "required": false; }; "fixedLayout": { "alias": "fixedLayout"; "required": false; }; "recycleRows": { "alias": "recycleRows"; "required": false; }; }, { "contentChanged": "contentChanged"; }, ["_noDataRow", "_contentColumnDefs", "_contentRowDefs", "_contentHeaderRowDefs", "_contentFooterRowDefs"], ["caption", "colgroup, col", "*"], true, never>;
810
860
  static ngAcceptInputType_multiTemplateDataRows: unknown;
811
861
  static ngAcceptInputType_fixedLayout: unknown;
862
+ static ngAcceptInputType_recycleRows: unknown;
812
863
  }
813
864
 
814
865
  /**
@@ -43,6 +43,9 @@ declare class TestbedHarnessEnvironment extends HarnessEnvironment<Element> {
43
43
  /**
44
44
  * Waits for all scheduled or running async tasks to complete. This allows harness
45
45
  * authors to wait for async tasks outside of the Angular zone.
46
+ *
47
+ * This only works when Zone.js is present _and_ patches are applied to the test framework
48
+ * by `zone.js/testing` (Jasmine and Jest only) or another script.
46
49
  */
47
50
  waitForTasksOutsideAngular(): Promise<void>;
48
51
  /** Gets the root element for the document. */