@angular/cdk-experimental 14.0.0-next.10 → 14.0.0-next.13

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 (212) hide show
  1. package/column-resize/index.d.ts +419 -6
  2. package/combobox/index.d.ts +123 -8
  3. package/esm2020/column-resize/column-resize-directives/column-resize-flex.mjs +4 -4
  4. package/esm2020/column-resize/column-resize-directives/column-resize.mjs +4 -4
  5. package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize-flex.mjs +4 -4
  6. package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize.mjs +4 -4
  7. package/esm2020/column-resize/column-resize-module.mjs +9 -9
  8. package/esm2020/column-resize/column-resize-notifier.mjs +7 -7
  9. package/esm2020/column-resize/column-resize.mjs +4 -4
  10. package/esm2020/column-resize/column-size-store.mjs +4 -4
  11. package/esm2020/column-resize/event-dispatcher.mjs +4 -4
  12. package/esm2020/column-resize/overlay-handle.mjs +4 -4
  13. package/esm2020/column-resize/resizable.mjs +4 -4
  14. package/esm2020/column-resize/resize-strategy.mjs +10 -10
  15. package/esm2020/combobox/combobox-module.mjs +5 -5
  16. package/esm2020/combobox/combobox-popup.mjs +4 -4
  17. package/esm2020/combobox/combobox.mjs +4 -4
  18. package/esm2020/listbox/listbox-module.mjs +5 -5
  19. package/esm2020/listbox/listbox.mjs +7 -7
  20. package/esm2020/popover-edit/edit-event-dispatcher.mjs +4 -4
  21. package/esm2020/popover-edit/edit-ref.mjs +4 -4
  22. package/esm2020/popover-edit/edit-services.mjs +4 -4
  23. package/esm2020/popover-edit/focus-dispatcher.mjs +4 -4
  24. package/esm2020/popover-edit/focus-escape-notifier.mjs +4 -4
  25. package/esm2020/popover-edit/lens-directives.mjs +10 -10
  26. package/esm2020/popover-edit/popover-edit-module.mjs +6 -6
  27. package/esm2020/popover-edit/popover-edit-position-strategy-factory.mjs +7 -7
  28. package/esm2020/popover-edit/table-directives.mjs +16 -16
  29. package/esm2020/scrolling/auto-size-virtual-scroll.mjs +4 -4
  30. package/esm2020/scrolling/scrolling-module.mjs +5 -5
  31. package/esm2020/selection/row-selection.mjs +4 -4
  32. package/esm2020/selection/select-all.mjs +4 -4
  33. package/esm2020/selection/selection-column.mjs +10 -10
  34. package/esm2020/selection/selection-module.mjs +5 -5
  35. package/esm2020/selection/selection-toggle.mjs +4 -4
  36. package/esm2020/selection/selection.mjs +4 -4
  37. package/esm2020/table-scroll-container/table-scroll-container-module.mjs +5 -5
  38. package/esm2020/table-scroll-container/table-scroll-container.mjs +4 -4
  39. package/esm2020/version.mjs +1 -1
  40. package/fesm2015/cdk-experimental.mjs +1 -1
  41. package/fesm2015/cdk-experimental.mjs.map +1 -1
  42. package/fesm2015/column-resize.mjs +50 -50
  43. package/fesm2015/column-resize.mjs.map +1 -1
  44. package/fesm2015/combobox.mjs +10 -10
  45. package/fesm2015/combobox.mjs.map +1 -1
  46. package/fesm2015/listbox.mjs +10 -10
  47. package/fesm2015/listbox.mjs.map +1 -1
  48. package/fesm2015/popover-edit.mjs +50 -50
  49. package/fesm2015/popover-edit.mjs.map +1 -1
  50. package/fesm2015/scrolling.mjs +7 -7
  51. package/fesm2015/scrolling.mjs.map +1 -1
  52. package/fesm2015/selection.mjs +23 -23
  53. package/fesm2015/selection.mjs.map +1 -1
  54. package/fesm2015/table-scroll-container.mjs +7 -7
  55. package/fesm2015/table-scroll-container.mjs.map +1 -1
  56. package/fesm2020/cdk-experimental.mjs +1 -1
  57. package/fesm2020/cdk-experimental.mjs.map +1 -1
  58. package/fesm2020/column-resize.mjs +50 -50
  59. package/fesm2020/column-resize.mjs.map +1 -1
  60. package/fesm2020/combobox.mjs +10 -10
  61. package/fesm2020/combobox.mjs.map +1 -1
  62. package/fesm2020/listbox.mjs +10 -10
  63. package/fesm2020/listbox.mjs.map +1 -1
  64. package/fesm2020/popover-edit.mjs +50 -50
  65. package/fesm2020/popover-edit.mjs.map +1 -1
  66. package/fesm2020/scrolling.mjs +7 -7
  67. package/fesm2020/scrolling.mjs.map +1 -1
  68. package/fesm2020/selection.mjs +23 -23
  69. package/fesm2020/selection.mjs.map +1 -1
  70. package/fesm2020/table-scroll-container.mjs +7 -7
  71. package/fesm2020/table-scroll-container.mjs.map +1 -1
  72. package/index.d.ts +6 -8
  73. package/listbox/index.d.ts +197 -8
  74. package/package.json +9 -25
  75. package/popover-edit/index.d.ts +532 -5
  76. package/scrolling/index.d.ts +173 -6
  77. package/selection/index.d.ts +273 -5
  78. package/table-scroll-container/index.d.ts +61 -5
  79. package/column-resize/column-resize-directives/column-resize-flex.d.ts +0 -28
  80. package/column-resize/column-resize-directives/column-resize.d.ts +0 -28
  81. package/column-resize/column-resize-directives/constants.d.ts +0 -10
  82. package/column-resize/column-resize-directives/default-enabled-column-resize-flex.d.ts +0 -28
  83. package/column-resize/column-resize-directives/default-enabled-column-resize.d.ts +0 -28
  84. package/column-resize/column-resize-module.d.ts +0 -23
  85. package/column-resize/column-resize-notifier.d.ts +0 -49
  86. package/column-resize/column-resize.d.ts +0 -39
  87. package/column-resize/column-resize_public_index.d.ts +0 -4
  88. package/column-resize/column-size-store.d.ts +0 -12
  89. package/column-resize/event-dispatcher.d.ts +0 -44
  90. package/column-resize/overlay-handle.d.ts +0 -43
  91. package/column-resize/package.json +0 -9
  92. package/column-resize/public-api.d.ts +0 -20
  93. package/column-resize/resizable.d.ts +0 -69
  94. package/column-resize/resize-ref.d.ts +0 -17
  95. package/column-resize/resize-strategy.d.ts +0 -83
  96. package/column-resize/selectors.d.ts +0 -10
  97. package/combobox/combobox-module.d.ts +0 -9
  98. package/combobox/combobox-popup.d.ts +0 -27
  99. package/combobox/combobox.d.ts +0 -68
  100. package/combobox/combobox_public_index.d.ts +0 -4
  101. package/combobox/package.json +0 -9
  102. package/combobox/public-api.d.ts +0 -10
  103. package/dialog/dialog-config.d.ts +0 -82
  104. package/dialog/dialog-container.d.ts +0 -99
  105. package/dialog/dialog-injectors.d.ts +0 -30
  106. package/dialog/dialog-module.d.ts +0 -10
  107. package/dialog/dialog-ref.d.ts +0 -57
  108. package/dialog/dialog.d.ts +0 -100
  109. package/dialog/dialog_public_index.d.ts +0 -4
  110. package/dialog/index.d.ts +0 -8
  111. package/dialog/package.json +0 -9
  112. package/dialog/public-api.d.ts +0 -13
  113. package/esm2020/dialog/dialog-config.mjs +0 -43
  114. package/esm2020/dialog/dialog-container.mjs +0 -300
  115. package/esm2020/dialog/dialog-injectors.mjs +0 -30
  116. package/esm2020/dialog/dialog-module.mjs +0 -56
  117. package/esm2020/dialog/dialog-ref.mjs +0 -116
  118. package/esm2020/dialog/dialog.mjs +0 -252
  119. package/esm2020/dialog/dialog_public_index.mjs +0 -5
  120. package/esm2020/dialog/index.mjs +0 -9
  121. package/esm2020/dialog/public-api.mjs +0 -14
  122. package/esm2020/menu/context-menu-trigger.mjs +0 -227
  123. package/esm2020/menu/index.mjs +0 -9
  124. package/esm2020/menu/menu-aim.mjs +0 -204
  125. package/esm2020/menu/menu-bar.mjs +0 -159
  126. package/esm2020/menu/menu-base.mjs +0 -203
  127. package/esm2020/menu/menu-errors.mjs +0 -22
  128. package/esm2020/menu/menu-group.mjs +0 -30
  129. package/esm2020/menu/menu-interface.mjs +0 -11
  130. package/esm2020/menu/menu-item-checkbox.mjs +0 -48
  131. package/esm2020/menu/menu-item-radio.mjs +0 -114
  132. package/esm2020/menu/menu-item-selectable.mjs +0 -42
  133. package/esm2020/menu/menu-item.mjs +0 -289
  134. package/esm2020/menu/menu-module.mjs +0 -62
  135. package/esm2020/menu/menu-stack.mjs +0 -156
  136. package/esm2020/menu/menu-trigger-base.mjs +0 -114
  137. package/esm2020/menu/menu-trigger.mjs +0 -302
  138. package/esm2020/menu/menu.mjs +0 -168
  139. package/esm2020/menu/menu_public_index.mjs +0 -5
  140. package/esm2020/menu/pointer-focus-tracker.mjs +0 -51
  141. package/esm2020/menu/public-api.mjs +0 -24
  142. package/fesm2015/dialog.mjs +0 -803
  143. package/fesm2015/dialog.mjs.map +0 -1
  144. package/fesm2015/menu.mjs +0 -2131
  145. package/fesm2015/menu.mjs.map +0 -1
  146. package/fesm2020/dialog.mjs +0 -797
  147. package/fesm2020/dialog.mjs.map +0 -1
  148. package/fesm2020/menu.mjs +0 -2104
  149. package/fesm2020/menu.mjs.map +0 -1
  150. package/listbox/listbox-module.d.ts +0 -7
  151. package/listbox/listbox.d.ts +0 -172
  152. package/listbox/listbox_public_index.d.ts +0 -4
  153. package/listbox/package.json +0 -9
  154. package/listbox/public-api.d.ts +0 -9
  155. package/menu/context-menu-trigger.d.ts +0 -98
  156. package/menu/index.d.ts +0 -8
  157. package/menu/menu-aim.d.ts +0 -107
  158. package/menu/menu-bar.d.ts +0 -52
  159. package/menu/menu-base.d.ts +0 -104
  160. package/menu/menu-errors.d.ts +0 -17
  161. package/menu/menu-group.d.ts +0 -8
  162. package/menu/menu-interface.d.ts +0 -25
  163. package/menu/menu-item-checkbox.d.ts +0 -18
  164. package/menu/menu-item-radio.d.ts +0 -59
  165. package/menu/menu-item-selectable.d.ts +0 -21
  166. package/menu/menu-item.d.ts +0 -140
  167. package/menu/menu-module.d.ts +0 -17
  168. package/menu/menu-stack.d.ts +0 -122
  169. package/menu/menu-trigger-base.d.ts +0 -77
  170. package/menu/menu-trigger.d.ts +0 -104
  171. package/menu/menu.d.ts +0 -60
  172. package/menu/menu_public_index.d.ts +0 -4
  173. package/menu/package.json +0 -9
  174. package/menu/pointer-focus-tracker.d.ts +0 -47
  175. package/menu/public-api.d.ts +0 -23
  176. package/popover-edit/constants.d.ts +0 -19
  177. package/popover-edit/edit-event-dispatcher.d.ts +0 -99
  178. package/popover-edit/edit-ref.d.ts +0 -52
  179. package/popover-edit/edit-services.d.ts +0 -37
  180. package/popover-edit/focus-dispatcher.d.ts +0 -31
  181. package/popover-edit/focus-escape-notifier.d.ts +0 -40
  182. package/popover-edit/form-value-container.d.ts +0 -24
  183. package/popover-edit/lens-directives.d.ts +0 -82
  184. package/popover-edit/package.json +0 -9
  185. package/popover-edit/polyfill.d.ts +0 -9
  186. package/popover-edit/popover-edit-module.d.ts +0 -9
  187. package/popover-edit/popover-edit-position-strategy-factory.d.ts +0 -42
  188. package/popover-edit/popover-edit_public_index.d.ts +0 -4
  189. package/popover-edit/public-api.d.ts +0 -17
  190. package/popover-edit/table-directives.d.ts +0 -150
  191. package/public-api.d.ts +0 -8
  192. package/scrolling/auto-size-virtual-scroll.d.ts +0 -160
  193. package/scrolling/package.json +0 -9
  194. package/scrolling/public-api.d.ts +0 -9
  195. package/scrolling/scrolling-module.d.ts +0 -7
  196. package/scrolling/scrolling_public_index.d.ts +0 -4
  197. package/selection/package.json +0 -9
  198. package/selection/public-api.d.ts +0 -14
  199. package/selection/row-selection.d.ts +0 -27
  200. package/selection/select-all.d.ts +0 -52
  201. package/selection/selection-column.d.ts +0 -34
  202. package/selection/selection-module.d.ts +0 -13
  203. package/selection/selection-set.d.ts +0 -56
  204. package/selection/selection-toggle.d.ts +0 -46
  205. package/selection/selection.d.ts +0 -65
  206. package/selection/selection_public_index.d.ts +0 -4
  207. package/table-scroll-container/package.json +0 -9
  208. package/table-scroll-container/public-api.d.ts +0 -9
  209. package/table-scroll-container/table-scroll-container-module.d.ts +0 -7
  210. package/table-scroll-container/table-scroll-container.d.ts +0 -53
  211. package/table-scroll-container/table-scroll-container_public_index.d.ts +0 -4
  212. package/version.d.ts +0 -10
@@ -1,8 +1,175 @@
1
+ import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
2
+ import * as i0 from '@angular/core';
3
+ import { ListRange } from '@angular/cdk/collections';
4
+ import { NumberInput } from '@angular/cdk/coercion';
5
+ import { Observable } from 'rxjs';
6
+ import { OnChanges } from '@angular/core';
7
+ import { VirtualScrollStrategy } from '@angular/cdk/scrolling';
8
+
9
+ /** Virtual scrolling strategy for lists with items of unknown or dynamic size. */
10
+ export declare class AutoSizeVirtualScrollStrategy implements VirtualScrollStrategy {
11
+ /** @docs-private Implemented as part of VirtualScrollStrategy. */
12
+ scrolledIndexChange: Observable<number>;
13
+ /** The attached viewport. */
14
+ private _viewport;
15
+ /** The minimum amount of buffer rendered beyond the viewport (in pixels). */
16
+ private _minBufferPx;
17
+ /** The number of buffer items to render beyond the edge of the viewport (in pixels). */
18
+ private _maxBufferPx;
19
+ /** The estimator used to estimate the size of unseen items. */
20
+ private _averager;
21
+ /** The last measured scroll offset of the viewport. */
22
+ private _lastScrollOffset;
23
+ /** The last measured size of the rendered content in the viewport. */
24
+ private _lastRenderedContentSize;
25
+ /** The last measured size of the rendered content in the viewport. */
26
+ private _lastRenderedContentOffset;
27
+ /**
28
+ * The number of consecutive cycles where removing extra items has failed. Failure here means that
29
+ * we estimated how many items we could safely remove, but our estimate turned out to be too much
30
+ * and it wasn't safe to remove that many elements.
31
+ */
32
+ private _removalFailures;
33
+ /**
34
+ * @param minBufferPx The minimum amount of buffer rendered beyond the viewport (in pixels).
35
+ * If the amount of buffer dips below this number, more items will be rendered.
36
+ * @param maxBufferPx The number of pixels worth of buffer to shoot for when rendering new items.
37
+ * If the actual amount turns out to be less it will not necessarily trigger an additional
38
+ * rendering cycle (as long as the amount of buffer is still greater than `minBufferPx`).
39
+ * @param averager The averager used to estimate the size of unseen items.
40
+ */
41
+ constructor(minBufferPx: number, maxBufferPx: number, averager?: ItemSizeAverager);
42
+ /**
43
+ * Attaches this scroll strategy to a viewport.
44
+ * @param viewport The viewport to attach this strategy to.
45
+ */
46
+ attach(viewport: CdkVirtualScrollViewport): void;
47
+ /** Detaches this scroll strategy from the currently attached viewport. */
48
+ detach(): void;
49
+ /** @docs-private Implemented as part of VirtualScrollStrategy. */
50
+ onContentScrolled(): void;
51
+ /** @docs-private Implemented as part of VirtualScrollStrategy. */
52
+ onDataLengthChanged(): void;
53
+ /** @docs-private Implemented as part of VirtualScrollStrategy. */
54
+ onContentRendered(): void;
55
+ /** @docs-private Implemented as part of VirtualScrollStrategy. */
56
+ onRenderedOffsetChanged(): void;
57
+ /** Scroll to the offset for the given index. */
58
+ scrollToIndex(): void;
59
+ /**
60
+ * Update the buffer parameters.
61
+ * @param minBufferPx The minimum amount of buffer rendered beyond the viewport (in pixels).
62
+ * @param maxBufferPx The number of buffer items to render beyond the edge of the viewport (in
63
+ * pixels).
64
+ */
65
+ updateBufferSize(minBufferPx: number, maxBufferPx: number): void;
66
+ /** Update the rendered content after the user scrolls. */
67
+ private _updateRenderedContentAfterScroll;
68
+ /**
69
+ * Checks the size of the currently rendered content and uses it to update the estimated item size
70
+ * and estimated total content size.
71
+ */
72
+ private _checkRenderedContentSize;
73
+ /** Checks the currently rendered content offset and saves the value for later use. */
74
+ private _checkRenderedContentOffset;
75
+ /**
76
+ * Recalculates the rendered content based on our estimate of what should be shown at the current
77
+ * scroll offset.
78
+ */
79
+ private _renderContentForCurrentOffset;
80
+ /**
81
+ * Gets the visible range of data for the given start index. If the start index is too close to
82
+ * the end of the list it may be backed up to ensure the estimated size of the range is enough to
83
+ * fill the viewport.
84
+ * Note: must not be called if `this._viewport` is null
85
+ * @param startIndex The index to start the range at
86
+ * @return a range estimated to be large enough to fill the viewport when rendered.
87
+ */
88
+ private _getVisibleRangeForIndex;
89
+ /**
90
+ * Expand the given range by the given amount in either direction.
91
+ * Note: must not be called if `this._viewport` is null
92
+ * @param range The range to expand
93
+ * @param expandStart The number of items to expand the start of the range by.
94
+ * @param expandEnd The number of items to expand the end of the range by.
95
+ * @return The expanded range.
96
+ */
97
+ private _expandRange;
98
+ /** Update the viewport's total content size. */
99
+ private _updateTotalContentSize;
100
+ }
101
+
1
102
  /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
103
+ * Provider factory for `AutoSizeVirtualScrollStrategy` that simply extracts the already created
104
+ * `AutoSizeVirtualScrollStrategy` from the given directive.
105
+ * @param autoSizeDir The instance of `CdkAutoSizeVirtualScroll` to extract the
106
+ * `AutoSizeVirtualScrollStrategy` from.
7
107
  */
8
- export * from './public-api';
108
+ export declare function _autoSizeVirtualScrollStrategyFactory(autoSizeDir: CdkAutoSizeVirtualScroll): AutoSizeVirtualScrollStrategy;
109
+
110
+ /** A virtual scroll strategy that supports unknown or dynamic size items. */
111
+ export declare class CdkAutoSizeVirtualScroll implements OnChanges {
112
+ /**
113
+ * The minimum amount of buffer rendered beyond the viewport (in pixels).
114
+ * If the amount of buffer dips below this number, more items will be rendered. Defaults to 100px.
115
+ */
116
+ get minBufferPx(): number;
117
+ set minBufferPx(value: NumberInput);
118
+ _minBufferPx: number;
119
+ /**
120
+ * The number of pixels worth of buffer to shoot for when rendering new items.
121
+ * If the actual amount turns out to be less it will not necessarily trigger an additional
122
+ * rendering cycle (as long as the amount of buffer is still greater than `minBufferPx`).
123
+ * Defaults to 200px.
124
+ */
125
+ get maxBufferPx(): number;
126
+ set maxBufferPx(value: NumberInput);
127
+ _maxBufferPx: number;
128
+ /** The scroll strategy used by this directive. */
129
+ _scrollStrategy: AutoSizeVirtualScrollStrategy;
130
+ ngOnChanges(): void;
131
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkAutoSizeVirtualScroll, never>;
132
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CdkAutoSizeVirtualScroll, "cdk-virtual-scroll-viewport[autosize]", never, { "minBufferPx": "minBufferPx"; "maxBufferPx": "maxBufferPx"; }, {}, never, never, false>;
133
+ }
134
+
135
+ declare namespace i1 {
136
+ export {
137
+ _autoSizeVirtualScrollStrategyFactory,
138
+ ItemSizeAverager,
139
+ AutoSizeVirtualScrollStrategy,
140
+ CdkAutoSizeVirtualScroll
141
+ }
142
+ }
143
+
144
+ /**
145
+ * A class that tracks the size of items that have been seen and uses it to estimate the average
146
+ * item size.
147
+ */
148
+ export declare class ItemSizeAverager {
149
+ /** The total amount of weight behind the current average. */
150
+ private _totalWeight;
151
+ /** The current average item size. */
152
+ private _averageItemSize;
153
+ /** The default size to use for items when no data is available. */
154
+ private _defaultItemSize;
155
+ /** @param defaultItemSize The default size to use for items when no data is available. */
156
+ constructor(defaultItemSize?: number);
157
+ /** Returns the average item size. */
158
+ getAverageItemSize(): number;
159
+ /**
160
+ * Adds a measurement sample for the estimator to consider.
161
+ * @param range The measured range.
162
+ * @param size The measured size of the given range in pixels.
163
+ */
164
+ addSample(range: ListRange, size: number): void;
165
+ /** Resets the averager. */
166
+ reset(): void;
167
+ }
168
+
169
+ export declare class ScrollingModule {
170
+ static ɵfac: i0.ɵɵFactoryDeclaration<ScrollingModule, never>;
171
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ScrollingModule, [typeof i1.CdkAutoSizeVirtualScroll], never, [typeof i1.CdkAutoSizeVirtualScroll]>;
172
+ static ɵinj: i0.ɵɵInjectorDeclaration<ScrollingModule>;
173
+ }
174
+
175
+ export { }
@@ -1,8 +1,276 @@
1
+ import { AfterContentChecked } from '@angular/core';
2
+ import { BooleanInput } from '@angular/cdk/coercion';
3
+ import { CdkTable } from '@angular/cdk/table';
4
+ import { CollectionViewer } from '@angular/cdk/collections';
5
+ import { ControlValueAccessor } from '@angular/forms';
6
+ import { DataSource } from '@angular/cdk/collections';
7
+ import { EventEmitter } from '@angular/core';
8
+ import * as i0 from '@angular/core';
9
+ import * as i6 from '@angular/common';
10
+ import * as i7 from '@angular/cdk/table';
11
+ import { ListRange } from '@angular/cdk/collections';
12
+ import { NumberInput } from '@angular/cdk/coercion';
13
+ import { Observable } from 'rxjs';
14
+ import { OnDestroy } from '@angular/core';
15
+ import { OnInit } from '@angular/core';
16
+ import { Subject } from 'rxjs';
17
+ import { TrackByFunction } from '@angular/core';
18
+
1
19
  /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
20
+ * Applies `cdk-selected` class and `aria-selected` to an element.
4
21
  *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
22
+ * Must be used within a parent `CdkSelection` directive.
23
+ * Must be provided with the value. The index is required if `trackBy` is used on the `CdkSelection`
24
+ * directive.
7
25
  */
8
- export * from './public-api';
26
+ export declare class CdkRowSelection<T> {
27
+ readonly _selection: CdkSelection<T>;
28
+ value: T;
29
+ get index(): number | undefined;
30
+ set index(index: NumberInput);
31
+ protected _index?: number;
32
+ constructor(_selection: CdkSelection<T>);
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkRowSelection<any>, never>;
34
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CdkRowSelection<any>, "[cdkRowSelection]", never, { "value": "cdkRowSelectionValue"; "index": "cdkRowSelectionIndex"; }, {}, never, never, false>;
35
+ }
36
+
37
+ /**
38
+ * Makes the element a select-all toggle.
39
+ *
40
+ * Must be used within a parent `CdkSelection` directive. It toggles the selection states
41
+ * of all the selection toggles connected with the `CdkSelection` directive.
42
+ * If the element implements `ControlValueAccessor`, e.g. `MatCheckbox`, the directive
43
+ * automatically connects it with the select-all state provided by the `CdkSelection` directive. If
44
+ * not, use `checked$` to get the checked state, `indeterminate$` to get the indeterminate state,
45
+ * and `toggle()` to change the selection state.
46
+ */
47
+ export declare class CdkSelectAll<T> implements OnDestroy, OnInit {
48
+ private readonly _selection;
49
+ private readonly _controlValueAccessor;
50
+ /**
51
+ * The checked state of the toggle.
52
+ * Resolves to `true` if all the values are selected, `false` if no value is selected.
53
+ */
54
+ readonly checked: Observable<boolean>;
55
+ /**
56
+ * The indeterminate state of the toggle.
57
+ * Resolves to `true` if part (not all) of the values are selected, `false` if all values or no
58
+ * value at all are selected.
59
+ */
60
+ readonly indeterminate: Observable<boolean>;
61
+ /**
62
+ * Toggles the select-all state.
63
+ * @param event The click event if the toggle is triggered by a (mouse or keyboard) click. If
64
+ * using with a native `<input type="checkbox">`, the parameter is required for the
65
+ * indeterminate state to work properly.
66
+ */
67
+ toggle(event?: MouseEvent): void;
68
+ private readonly _destroyed;
69
+ constructor(_selection: CdkSelection<T>, _controlValueAccessor: ControlValueAccessor[]);
70
+ ngOnInit(): void;
71
+ private _configureControlValueAccessor;
72
+ private _assertValidParentSelection;
73
+ ngOnDestroy(): void;
74
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkSelectAll<any>, [{ optional: true; }, { optional: true; self: true; }]>;
75
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CdkSelectAll<any>, "[cdkSelectAll]", ["cdkSelectAll"], {}, {}, never, never, false>;
76
+ }
77
+
78
+ /**
79
+ * Manages the selection states of the items and provides methods to check and update the selection
80
+ * states.
81
+ * It must be applied to the parent element if `cdkSelectionToggle`, `cdkSelectAll`,
82
+ * `cdkRowSelection` and `cdkSelectionColumn` are applied.
83
+ */
84
+ export declare class CdkSelection<T> implements OnInit, AfterContentChecked, CollectionViewer, OnDestroy {
85
+ viewChange: Observable<ListRange>;
86
+ get dataSource(): TableDataSource<T>;
87
+ set dataSource(dataSource: TableDataSource<T>);
88
+ private _dataSource;
89
+ trackByFn: TrackByFunction<T>;
90
+ /** Whether to support multiple selection */
91
+ get multiple(): boolean;
92
+ set multiple(multiple: BooleanInput);
93
+ protected _multiple: boolean;
94
+ /** Emits when selection changes. */
95
+ readonly change: EventEmitter<SelectionChange<T>>;
96
+ /** Latest data provided by the data source. */
97
+ private _data;
98
+ /** Subscription that listens for the data provided by the data source. */
99
+ private _renderChangeSubscription;
100
+ private _destroyed;
101
+ private _selection;
102
+ private _switchDataSource;
103
+ private _observeRenderChanges;
104
+ ngOnInit(): void;
105
+ ngAfterContentChecked(): void;
106
+ ngOnDestroy(): void;
107
+ /** Toggles selection for a given value. `index` is required if `trackBy` is used. */
108
+ toggleSelection(value: T, index?: number): void;
109
+ /**
110
+ * Toggles select-all. If no value is selected, select all values. If all values or some of the
111
+ * values are selected, de-select all values.
112
+ */
113
+ toggleSelectAll(): void;
114
+ /** Checks whether a value is selected. `index` is required if `trackBy` is used. */
115
+ isSelected(value: T, index?: number): boolean;
116
+ /** Checks whether all values are selected. */
117
+ isAllSelected(): boolean;
118
+ /** Checks whether partially selected. */
119
+ isPartialSelected(): boolean;
120
+ private _selectAll;
121
+ private _clearAll;
122
+ private _updateSelectAllState;
123
+ selectAllState: SelectAllState;
124
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkSelection<any>, never>;
125
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CdkSelection<any>, "[cdkSelection]", ["cdkSelection"], { "dataSource": "dataSource"; "trackByFn": "trackBy"; "multiple": "cdkSelectionMultiple"; }, { "change": "cdkSelectionChange"; }, never, never, false>;
126
+ }
127
+
128
+ /**
129
+ * Column that adds row selecting checkboxes and a select-all checkbox if `cdkSelectionMultiple` is
130
+ * `true`.
131
+ *
132
+ * Must be used within a parent `CdkSelection` directive.
133
+ */
134
+ export declare class CdkSelectionColumn<T> implements OnInit, OnDestroy {
135
+ private _table;
136
+ readonly selection: CdkSelection<T>;
137
+ /** Column name that should be used to reference this column. */
138
+ get name(): string;
139
+ set name(name: string);
140
+ private _name;
141
+ private readonly _columnDef;
142
+ private readonly _cell;
143
+ private readonly _headerCell;
144
+ constructor(_table: CdkTable<T>, selection: CdkSelection<T>);
145
+ ngOnInit(): void;
146
+ ngOnDestroy(): void;
147
+ private _syncColumnDefName;
148
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkSelectionColumn<any>, [{ optional: true; }, { optional: true; }]>;
149
+ static ɵcmp: i0.ɵɵComponentDeclaration<CdkSelectionColumn<any>, "cdk-selection-column", never, { "name": "cdkSelectionColumnName"; }, {}, never, never, false>;
150
+ }
151
+
152
+ export declare class CdkSelectionModule {
153
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkSelectionModule, never>;
154
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CdkSelectionModule, [typeof i1.CdkSelection, typeof i2.CdkSelectionToggle, typeof i3.CdkSelectAll, typeof i4.CdkSelectionColumn, typeof i5.CdkRowSelection], [typeof i6.CommonModule, typeof i7.CdkTableModule], [typeof i1.CdkSelection, typeof i2.CdkSelectionToggle, typeof i3.CdkSelectAll, typeof i4.CdkSelectionColumn, typeof i5.CdkRowSelection]>;
155
+ static ɵinj: i0.ɵɵInjectorDeclaration<CdkSelectionModule>;
156
+ }
157
+
158
+ /**
159
+ * Makes the element a selection toggle.
160
+ *
161
+ * Must be used within a parent `CdkSelection` directive.
162
+ * Must be provided with the value. If `trackBy` is used on `CdkSelection`, the index of the value
163
+ * is required. If the element implements `ControlValueAccessor`, e.g. `MatCheckbox`, the directive
164
+ * automatically connects it with the selection state provided by the `CdkSelection` directive. If
165
+ * not, use `checked$` to get the checked state of the value, and `toggle()` to change the selection
166
+ * state.
167
+ */
168
+ export declare class CdkSelectionToggle<T> implements OnDestroy, OnInit {
169
+ private _selection;
170
+ private _controlValueAccessors;
171
+ /** The value that is associated with the toggle */
172
+ value: T;
173
+ /** The index of the value in the list. Required when used with `trackBy` */
174
+ get index(): number | undefined;
175
+ set index(index: NumberInput);
176
+ protected _index?: number;
177
+ /** The checked state of the selection toggle */
178
+ readonly checked: Observable<boolean>;
179
+ /** Toggles the selection */
180
+ toggle(): void;
181
+ private _destroyed;
182
+ constructor(_selection: CdkSelection<T>, _controlValueAccessors: ControlValueAccessor[]);
183
+ ngOnInit(): void;
184
+ ngOnDestroy(): void;
185
+ private _assertValidParentSelection;
186
+ private _configureControlValueAccessor;
187
+ private _isSelected;
188
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkSelectionToggle<any>, [{ optional: true; }, { optional: true; self: true; }]>;
189
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CdkSelectionToggle<any>, "[cdkSelectionToggle]", ["cdkSelectionToggle"], { "value": "cdkSelectionToggleValue"; "index": "cdkSelectionToggleIndex"; }, {}, never, never, false>;
190
+ }
191
+
192
+ declare namespace i1 {
193
+ export {
194
+ CdkSelection
195
+ }
196
+ }
197
+
198
+ declare namespace i2 {
199
+ export {
200
+ CdkSelectionToggle
201
+ }
202
+ }
203
+
204
+ declare namespace i3 {
205
+ export {
206
+ CdkSelectAll
207
+ }
208
+ }
209
+
210
+ declare namespace i4 {
211
+ export {
212
+ CdkSelectionColumn
213
+ }
214
+ }
215
+
216
+ declare namespace i5 {
217
+ export {
218
+ CdkRowSelection
219
+ }
220
+ }
221
+
222
+ /**
223
+ * A selectable value with an optional index. The index is required when the selection is used with
224
+ * `trackBy`.
225
+ */
226
+ export declare interface SelectableWithIndex<T> {
227
+ value: T;
228
+ index?: number;
229
+ }
230
+
231
+ declare type SelectAllState = 'all' | 'none' | 'partial';
232
+
233
+ /**
234
+ * Represents the change in the selection set.
235
+ */
236
+ export declare interface SelectionChange<T> {
237
+ before: SelectableWithIndex<T>[];
238
+ after: SelectableWithIndex<T>[];
239
+ }
240
+
241
+ /**
242
+ * Maintains a set of selected items. Support selecting and deselecting items, and checking if a
243
+ * value is selected.
244
+ * When constructed with a `trackByFn`, all the items will be identified by applying the `trackByFn`
245
+ * on them. Because `trackByFn` requires the index of the item to be passed in, the `index` field is
246
+ * expected to be set when calling `isSelected`, `select` and `deselect`.
247
+ */
248
+ export declare class SelectionSet<T> implements TrackBySelection<T> {
249
+ private _multiple;
250
+ private _trackByFn?;
251
+ private _selectionMap;
252
+ changed: Subject<SelectionChange<T>>;
253
+ constructor(_multiple?: boolean, _trackByFn?: TrackByFunction<T> | undefined);
254
+ isSelected(value: SelectableWithIndex<T>): boolean;
255
+ select(...selects: SelectableWithIndex<T>[]): void;
256
+ deselect(...selects: SelectableWithIndex<T>[]): void;
257
+ private _markSelected;
258
+ private _markDeselected;
259
+ private _getTrackedByValue;
260
+ private _getCurrentSelection;
261
+ }
262
+
263
+ declare type TableDataSource<T> = DataSource<T> | Observable<readonly T[]> | readonly T[];
264
+
265
+ /**
266
+ * Maintains a set of selected values. One or more values can be added to or removed from the
267
+ * selection.
268
+ */
269
+ declare interface TrackBySelection<T> {
270
+ isSelected(value: SelectableWithIndex<T>): boolean;
271
+ select(...values: SelectableWithIndex<T>[]): void;
272
+ deselect(...values: SelectableWithIndex<T>[]): void;
273
+ changed: Subject<SelectionChange<T>>;
274
+ }
275
+
276
+ export { }
@@ -1,8 +1,64 @@
1
+ import { Directionality } from '@angular/cdk/bidi';
2
+ import { ElementRef } from '@angular/core';
3
+ import * as i0 from '@angular/core';
4
+ import { OnDestroy } from '@angular/core';
5
+ import { OnInit } from '@angular/core';
6
+ import { StickyPositioningListener } from '@angular/cdk/table';
7
+ import { StickyUpdate } from '@angular/cdk/table';
8
+
1
9
  /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
10
+ * Applies styles to the host element that make its scrollbars match up with
11
+ * the non-sticky scrollable portions of the CdkTable contained within.
4
12
  *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
13
+ * This visual effect only works in Webkit and Blink based browsers (eg Chrome,
14
+ * Safari, Edge). Other browsers such as Firefox will gracefully degrade to
15
+ * normal scrollbar appearance.
16
+ * Further note: These styles have no effect when the browser is using OS-default
17
+ * scrollbars. The easiest way to force them into custom mode is to specify width
18
+ * and height for the scrollbar and thumb.
7
19
  */
8
- export * from './public-api';
20
+ export declare class CdkTableScrollContainer implements StickyPositioningListener, OnDestroy, OnInit {
21
+ private readonly _elementRef;
22
+ private readonly _document;
23
+ private readonly _directionality?;
24
+ private readonly _uniqueClassName;
25
+ private _styleRoot;
26
+ private _styleElement?;
27
+ /** The most recent sticky column size values from the CdkTable. */
28
+ private _startSizes;
29
+ private _endSizes;
30
+ private _headerSizes;
31
+ private _footerSizes;
32
+ constructor(_elementRef: ElementRef<HTMLElement>, _document: Document, _directionality?: Directionality | undefined);
33
+ ngOnInit(): void;
34
+ ngOnDestroy(): void;
35
+ stickyColumnsUpdated({ sizes }: StickyUpdate): void;
36
+ stickyEndColumnsUpdated({ sizes }: StickyUpdate): void;
37
+ stickyHeaderRowsUpdated({ sizes }: StickyUpdate): void;
38
+ stickyFooterRowsUpdated({ sizes }: StickyUpdate): void;
39
+ /**
40
+ * Set padding on the scrollbar track based on the sticky states from CdkTable.
41
+ */
42
+ private _updateScrollbar;
43
+ /** Gets the stylesheet for the scrollbar styles and creates it if need be. */
44
+ private _getStyleSheet;
45
+ /** Updates the stylesheet with the specified scrollbar style. */
46
+ private _applyCss;
47
+ private _clearCss;
48
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkTableScrollContainer, [null, null, { optional: true; }]>;
49
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CdkTableScrollContainer, "[cdkTableScrollContainer]", never, {}, {}, never, never, false>;
50
+ }
51
+
52
+ export declare class CdkTableScrollContainerModule {
53
+ static ɵfac: i0.ɵɵFactoryDeclaration<CdkTableScrollContainerModule, never>;
54
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CdkTableScrollContainerModule, [typeof i1.CdkTableScrollContainer], never, [typeof i1.CdkTableScrollContainer]>;
55
+ static ɵinj: i0.ɵɵInjectorDeclaration<CdkTableScrollContainerModule>;
56
+ }
57
+
58
+ declare namespace i1 {
59
+ export {
60
+ CdkTableScrollContainer
61
+ }
62
+ }
63
+
64
+ export { }
@@ -1,28 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { ElementRef, NgZone } from '@angular/core';
9
- import { CdkTable } from '@angular/cdk/table';
10
- import { ColumnResize } from '../column-resize';
11
- import { ColumnResizeNotifier, ColumnResizeNotifierSource } from '../column-resize-notifier';
12
- import { HeaderRowEventDispatcher } from '../event-dispatcher';
13
- import * as i0 from "@angular/core";
14
- /**
15
- * Explicitly enables column resizing for a flexbox-based cdk-table.
16
- * Individual columns must be annotated specifically.
17
- */
18
- export declare class CdkColumnResizeFlex extends ColumnResize {
19
- readonly columnResizeNotifier: ColumnResizeNotifier;
20
- readonly elementRef: ElementRef<HTMLElement>;
21
- protected readonly eventDispatcher: HeaderRowEventDispatcher;
22
- protected readonly ngZone: NgZone;
23
- protected readonly notifier: ColumnResizeNotifierSource;
24
- protected readonly table: CdkTable<unknown>;
25
- constructor(columnResizeNotifier: ColumnResizeNotifier, elementRef: ElementRef<HTMLElement>, eventDispatcher: HeaderRowEventDispatcher, ngZone: NgZone, notifier: ColumnResizeNotifierSource, table: CdkTable<unknown>);
26
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkColumnResizeFlex, never>;
27
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkColumnResizeFlex, "cdk-table[columnResize]", never, {}, {}, never>;
28
- }
@@ -1,28 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { ElementRef, NgZone } from '@angular/core';
9
- import { CdkTable } from '@angular/cdk/table';
10
- import { ColumnResize } from '../column-resize';
11
- import { ColumnResizeNotifier, ColumnResizeNotifierSource } from '../column-resize-notifier';
12
- import { HeaderRowEventDispatcher } from '../event-dispatcher';
13
- import * as i0 from "@angular/core";
14
- /**
15
- * Explicitly enables column resizing for a table-based cdk-table.
16
- * Individual columns must be annotated specifically.
17
- */
18
- export declare class CdkColumnResize extends ColumnResize {
19
- readonly columnResizeNotifier: ColumnResizeNotifier;
20
- readonly elementRef: ElementRef<HTMLElement>;
21
- protected readonly eventDispatcher: HeaderRowEventDispatcher;
22
- protected readonly ngZone: NgZone;
23
- protected readonly notifier: ColumnResizeNotifierSource;
24
- protected readonly table: CdkTable<unknown>;
25
- constructor(columnResizeNotifier: ColumnResizeNotifier, elementRef: ElementRef<HTMLElement>, eventDispatcher: HeaderRowEventDispatcher, ngZone: NgZone, notifier: ColumnResizeNotifierSource, table: CdkTable<unknown>);
26
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkColumnResize, never>;
27
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkColumnResize, "table[cdk-table][columnResize]", never, {}, {}, never>;
28
- }
@@ -1,10 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { Provider } from '@angular/core';
9
- export declare const TABLE_PROVIDERS: Provider[];
10
- export declare const FLEX_PROVIDERS: Provider[];
@@ -1,28 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { ElementRef, NgZone } from '@angular/core';
9
- import { CdkTable } from '@angular/cdk/table';
10
- import { ColumnResize } from '../column-resize';
11
- import { ColumnResizeNotifier, ColumnResizeNotifierSource } from '../column-resize-notifier';
12
- import { HeaderRowEventDispatcher } from '../event-dispatcher';
13
- import * as i0 from "@angular/core";
14
- /**
15
- * Implicitly enables column resizing for a flex cdk-table.
16
- * Individual columns will be resizable unless opted out.
17
- */
18
- export declare class CdkDefaultEnabledColumnResizeFlex extends ColumnResize {
19
- readonly columnResizeNotifier: ColumnResizeNotifier;
20
- readonly elementRef: ElementRef<HTMLElement>;
21
- protected readonly eventDispatcher: HeaderRowEventDispatcher;
22
- protected readonly ngZone: NgZone;
23
- protected readonly notifier: ColumnResizeNotifierSource;
24
- protected readonly table: CdkTable<unknown>;
25
- constructor(columnResizeNotifier: ColumnResizeNotifier, elementRef: ElementRef<HTMLElement>, eventDispatcher: HeaderRowEventDispatcher, ngZone: NgZone, notifier: ColumnResizeNotifierSource, table: CdkTable<unknown>);
26
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkDefaultEnabledColumnResizeFlex, never>;
27
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkDefaultEnabledColumnResizeFlex, "cdk-table", never, {}, {}, never>;
28
- }
@@ -1,28 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { ElementRef, NgZone } from '@angular/core';
9
- import { CdkTable } from '@angular/cdk/table';
10
- import { ColumnResize } from '../column-resize';
11
- import { ColumnResizeNotifier, ColumnResizeNotifierSource } from '../column-resize-notifier';
12
- import { HeaderRowEventDispatcher } from '../event-dispatcher';
13
- import * as i0 from "@angular/core";
14
- /**
15
- * Implicitly enables column resizing for a table-based cdk-table.
16
- * Individual columns will be resizable unless opted out.
17
- */
18
- export declare class CdkDefaultEnabledColumnResize extends ColumnResize {
19
- readonly columnResizeNotifier: ColumnResizeNotifier;
20
- readonly elementRef: ElementRef<HTMLElement>;
21
- protected readonly eventDispatcher: HeaderRowEventDispatcher;
22
- protected readonly ngZone: NgZone;
23
- protected readonly notifier: ColumnResizeNotifierSource;
24
- protected readonly table: CdkTable<unknown>;
25
- constructor(columnResizeNotifier: ColumnResizeNotifier, elementRef: ElementRef<HTMLElement>, eventDispatcher: HeaderRowEventDispatcher, ngZone: NgZone, notifier: ColumnResizeNotifierSource, table: CdkTable<unknown>);
26
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkDefaultEnabledColumnResize, never>;
27
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkDefaultEnabledColumnResize, "table[cdk-table]", never, {}, {}, never>;
28
- }