@angular/cdk 19.2.3 → 20.0.0-next.1

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 (180) hide show
  1. package/a11y/index.d.ts +12 -843
  2. package/a11y-module.d-7d03e079.d.ts +313 -0
  3. package/accordion/index.d.ts +1 -1
  4. package/activedescendant-key-manager.d-11921e3a.d.ts +31 -0
  5. package/bidi/index.d.ts +3 -52
  6. package/bidi-module.d-f8648621.d.ts +53 -0
  7. package/coercion/index.d.ts +2 -15
  8. package/collections/index.d.ts +10 -269
  9. package/data-source.d-7cab2c9d.d.ts +42 -0
  10. package/dialog/index.d.ts +17 -32
  11. package/drag-drop/index.d.ts +14 -18
  12. package/fesm2022/a11y-module-e6996d20.mjs +952 -0
  13. package/fesm2022/a11y-module-e6996d20.mjs.map +1 -0
  14. package/fesm2022/a11y.mjs +42 -2448
  15. package/fesm2022/a11y.mjs.map +1 -1
  16. package/fesm2022/accordion.mjs +12 -12
  17. package/fesm2022/accordion.mjs.map +1 -1
  18. package/fesm2022/activedescendant-key-manager-1351a9d3.mjs +16 -0
  19. package/fesm2022/activedescendant-key-manager-1351a9d3.mjs.map +1 -0
  20. package/fesm2022/array-ee3b4bab.mjs +6 -0
  21. package/fesm2022/array-ee3b4bab.mjs.map +1 -0
  22. package/fesm2022/backwards-compatibility-bcbe473e.mjs +25 -0
  23. package/fesm2022/backwards-compatibility-bcbe473e.mjs.map +1 -0
  24. package/fesm2022/bidi-module-0726b65c.mjs +78 -0
  25. package/fesm2022/bidi-module-0726b65c.mjs.map +1 -0
  26. package/fesm2022/bidi.mjs +4 -143
  27. package/fesm2022/bidi.mjs.map +1 -1
  28. package/fesm2022/breakpoints-observer-d4584b66.mjs +179 -0
  29. package/fesm2022/breakpoints-observer-d4584b66.mjs.map +1 -0
  30. package/fesm2022/cdk.mjs +1 -1
  31. package/fesm2022/cdk.mjs.map +1 -1
  32. package/fesm2022/clipboard.mjs +10 -10
  33. package/fesm2022/clipboard.mjs.map +1 -1
  34. package/fesm2022/coercion/private.mjs +2 -14
  35. package/fesm2022/coercion/private.mjs.map +1 -1
  36. package/fesm2022/coercion.mjs +5 -39
  37. package/fesm2022/coercion.mjs.map +1 -1
  38. package/fesm2022/collections.mjs +7 -472
  39. package/fesm2022/collections.mjs.map +1 -1
  40. package/fesm2022/css-pixel-value-286c9a60.mjs +10 -0
  41. package/fesm2022/css-pixel-value-286c9a60.mjs.map +1 -0
  42. package/fesm2022/data-source-5320b6fd.mjs +15 -0
  43. package/fesm2022/data-source-5320b6fd.mjs.map +1 -0
  44. package/fesm2022/dialog.mjs +37 -41
  45. package/fesm2022/dialog.mjs.map +1 -1
  46. package/fesm2022/directionality-7ea26429.mjs +72 -0
  47. package/fesm2022/directionality-7ea26429.mjs.map +1 -0
  48. package/fesm2022/dispose-view-repeater-strategy-b11b87ea.mjs +44 -0
  49. package/fesm2022/dispose-view-repeater-strategy-b11b87ea.mjs.map +1 -0
  50. package/fesm2022/drag-drop.mjs +48 -46
  51. package/fesm2022/drag-drop.mjs.map +1 -1
  52. package/fesm2022/element-705567fe.mjs +29 -0
  53. package/fesm2022/element-705567fe.mjs.map +1 -0
  54. package/fesm2022/fake-event-detection-7055b1bd.mjs +24 -0
  55. package/fesm2022/fake-event-detection-7055b1bd.mjs.map +1 -0
  56. package/fesm2022/focus-key-manager-58d29acd.mjs +22 -0
  57. package/fesm2022/focus-key-manager-58d29acd.mjs.map +1 -0
  58. package/fesm2022/focus-monitor-cebaa0d1.mjs +629 -0
  59. package/fesm2022/focus-monitor-cebaa0d1.mjs.map +1 -0
  60. package/fesm2022/id-generator-fba495fb.mjs +37 -0
  61. package/fesm2022/id-generator-fba495fb.mjs.map +1 -0
  62. package/fesm2022/keycodes-107cd3e4.mjs +122 -0
  63. package/fesm2022/keycodes-107cd3e4.mjs.map +1 -0
  64. package/fesm2022/keycodes.mjs +2 -132
  65. package/fesm2022/keycodes.mjs.map +1 -1
  66. package/fesm2022/layout.mjs +12 -180
  67. package/fesm2022/layout.mjs.map +1 -1
  68. package/fesm2022/list-key-manager-c7b5cefb.mjs +360 -0
  69. package/fesm2022/list-key-manager-c7b5cefb.mjs.map +1 -0
  70. package/fesm2022/listbox.mjs +21 -16
  71. package/fesm2022/listbox.mjs.map +1 -1
  72. package/fesm2022/menu.mjs +76 -56
  73. package/fesm2022/menu.mjs.map +1 -1
  74. package/fesm2022/modifiers-33a5859e.mjs +13 -0
  75. package/fesm2022/modifiers-33a5859e.mjs.map +1 -0
  76. package/fesm2022/observable-97c0792c.mjs +15 -0
  77. package/fesm2022/observable-97c0792c.mjs.map +1 -0
  78. package/fesm2022/observe-content-d2a6b5a0.mjs +210 -0
  79. package/fesm2022/observe-content-d2a6b5a0.mjs.map +1 -0
  80. package/fesm2022/observers/private.mjs +3 -3
  81. package/fesm2022/observers/private.mjs.map +1 -1
  82. package/fesm2022/observers.mjs +5 -209
  83. package/fesm2022/observers.mjs.map +1 -1
  84. package/fesm2022/overlay-module-863b82c9.mjs +3029 -0
  85. package/fesm2022/overlay-module-863b82c9.mjs.map +1 -0
  86. package/fesm2022/overlay.mjs +28 -3023
  87. package/fesm2022/overlay.mjs.map +1 -1
  88. package/fesm2022/passive-listeners-c0bdc49f.mjs +31 -0
  89. package/fesm2022/passive-listeners-c0bdc49f.mjs.map +1 -0
  90. package/fesm2022/platform-1be098b0.mjs +77 -0
  91. package/fesm2022/platform-1be098b0.mjs.map +1 -0
  92. package/fesm2022/platform.mjs +13 -289
  93. package/fesm2022/platform.mjs.map +1 -1
  94. package/fesm2022/portal-directives-c88fea11.mjs +615 -0
  95. package/fesm2022/portal-directives-c88fea11.mjs.map +1 -0
  96. package/fesm2022/portal.mjs +3 -675
  97. package/fesm2022/portal.mjs.map +1 -1
  98. package/fesm2022/private.mjs +3 -59
  99. package/fesm2022/private.mjs.map +1 -1
  100. package/fesm2022/recycle-view-repeater-strategy-c1712813.mjs +156 -0
  101. package/fesm2022/recycle-view-repeater-strategy-c1712813.mjs.map +1 -0
  102. package/fesm2022/scrolling-61955dd1.mjs +99 -0
  103. package/fesm2022/scrolling-61955dd1.mjs.map +1 -0
  104. package/fesm2022/scrolling-module-aa9eeac5.mjs +1463 -0
  105. package/fesm2022/scrolling-module-aa9eeac5.mjs.map +1 -0
  106. package/fesm2022/scrolling.mjs +12 -1459
  107. package/fesm2022/scrolling.mjs.map +1 -1
  108. package/fesm2022/selection-model-30243dba.mjs +221 -0
  109. package/fesm2022/selection-model-30243dba.mjs.map +1 -0
  110. package/fesm2022/shadow-dom-9f403d00.mjs +49 -0
  111. package/fesm2022/shadow-dom-9f403d00.mjs.map +1 -0
  112. package/fesm2022/stepper.mjs +32 -26
  113. package/fesm2022/stepper.mjs.map +1 -1
  114. package/fesm2022/style-loader-e14dc585.mjs +47 -0
  115. package/fesm2022/style-loader-e14dc585.mjs.map +1 -0
  116. package/fesm2022/table.mjs +87 -121
  117. package/fesm2022/table.mjs.map +1 -1
  118. package/fesm2022/test-environment-34eef1ee.mjs +19 -0
  119. package/fesm2022/test-environment-34eef1ee.mjs.map +1 -0
  120. package/fesm2022/testing/selenium-webdriver.mjs +2 -1
  121. package/fesm2022/testing/selenium-webdriver.mjs.map +1 -1
  122. package/fesm2022/testing/testbed.mjs +33 -34
  123. package/fesm2022/testing/testbed.mjs.map +1 -1
  124. package/fesm2022/testing.mjs +2 -697
  125. package/fesm2022/testing.mjs.map +1 -1
  126. package/fesm2022/text-field.mjs +20 -19
  127. package/fesm2022/text-field.mjs.map +1 -1
  128. package/fesm2022/text-filtering-b60ba8a2.mjs +698 -0
  129. package/fesm2022/text-filtering-b60ba8a2.mjs.map +1 -0
  130. package/fesm2022/tree-key-manager-2f20c79c.mjs +360 -0
  131. package/fesm2022/tree-key-manager-2f20c79c.mjs.map +1 -0
  132. package/fesm2022/tree.mjs +33 -29
  133. package/fesm2022/tree.mjs.map +1 -1
  134. package/fesm2022/typeahead-11ae39bd.mjs +88 -0
  135. package/fesm2022/typeahead-11ae39bd.mjs.map +1 -0
  136. package/fesm2022/unique-selection-dispatcher-1d6f91d8.mjs +49 -0
  137. package/fesm2022/unique-selection-dispatcher-1d6f91d8.mjs.map +1 -0
  138. package/fesm2022/visually-hidden-83aea4a0.mjs +18 -0
  139. package/fesm2022/visually-hidden-83aea4a0.mjs.map +1 -0
  140. package/focus-key-manager.d-415a6958.d.ts +33 -0
  141. package/focus-monitor.d-810a02e6.d.ts +209 -0
  142. package/harness-environment.d-4d615248.d.ts +619 -0
  143. package/list-key-manager.d-72e9a2e7.d.ts +164 -0
  144. package/listbox/index.d.ts +5 -4
  145. package/menu/index.d.ts +14 -6
  146. package/number-property.d-ce316715.d.ts +15 -0
  147. package/observe-content.d-c08bc882.d.ts +84 -0
  148. package/observers/index.d.ts +4 -84
  149. package/overlay/index.d.ts +16 -792
  150. package/overlay-module.d-5d06db8a.d.ts +790 -0
  151. package/package.json +3 -3
  152. package/platform/index.d.ts +2 -31
  153. package/platform.d-0a5b4792.d.ts +33 -0
  154. package/portal/index.d.ts +5 -266
  155. package/portal-directives.d-d345bd53.d.ts +210 -0
  156. package/private/index.d.ts +2 -19
  157. package/schematics/migration.json +4 -4
  158. package/schematics/ng-add/index.js +1 -1
  159. package/schematics/ng-add/index.mjs +1 -1
  160. package/schematics/ng-update/index.d.ts +2 -2
  161. package/schematics/ng-update/index.js +5 -5
  162. package/schematics/ng-update/index.mjs +5 -5
  163. package/schematics/update-tool/target-version.d.ts +1 -1
  164. package/schematics/update-tool/target-version.js +2 -2
  165. package/schematics/update-tool/target-version.mjs +2 -2
  166. package/scrolling/index.d.ts +7 -604
  167. package/scrolling-module.d-a08a462d.d.ts +551 -0
  168. package/selection-model.d-1a70542c.d.ts +111 -0
  169. package/stepper/index.d.ts +5 -3
  170. package/style-loader.d-19baab84.d.ts +21 -0
  171. package/table/index.d.ts +8 -19
  172. package/testing/index.d.ts +2 -618
  173. package/testing/selenium-webdriver/index.d.ts +1 -1
  174. package/testing/testbed/index.d.ts +1 -1
  175. package/text-field/index.d.ts +1 -1
  176. package/tree/index.d.ts +3 -2
  177. package/tree-key-manager-strategy.d-603161dd.d.ts +116 -0
  178. package/unique-selection-dispatcher.d-7993b9f5.d.ts +32 -0
  179. package/view-repeater.d-79039e1f.d.ts +88 -0
  180. package/viewport-ruler.d-f3d3e82f.d.ts +57 -0
@@ -1,45 +1,12 @@
1
- import { Observable, Subject } from 'rxjs';
2
- import * as i0 from '@angular/core';
3
- import { TemplateRef, IterableChangeRecord, IterableChanges, ViewContainerRef, InjectionToken, OnDestroy } from '@angular/core';
4
-
5
- /** Represents a range of numbers with a specified start and end. */
6
- type ListRange = {
7
- start: number;
8
- end: number;
9
- };
10
- /**
11
- * Interface for any component that provides a view of some data collection and wants to provide
12
- * information regarding the view and any changes made.
13
- */
14
- interface CollectionViewer {
15
- /**
16
- * A stream that emits whenever the `CollectionViewer` starts looking at a new portion of the
17
- * data. The `start` index is inclusive, while the `end` is exclusive.
18
- */
19
- viewChange: Observable<ListRange>;
20
- }
21
-
22
- declare abstract class DataSource<T> {
23
- /**
24
- * Connects a collection viewer (such as a data-table) to this data source. Note that
25
- * the stream provided will be accessed during change detection and should not directly change
26
- * values that are bound in template views.
27
- * @param collectionViewer The component that exposes a view over the data provided by this
28
- * data source.
29
- * @returns Observable that emits a new value when the data changes.
30
- */
31
- abstract connect(collectionViewer: CollectionViewer): Observable<readonly T[]>;
32
- /**
33
- * Disconnects a collection viewer (such as a data-table) from this data source. Can be used
34
- * to perform any clean-up or tear-down operations when a view is being destroyed.
35
- *
36
- * @param collectionViewer The component that exposes a view over the data provided by this
37
- * data source.
38
- */
39
- abstract disconnect(collectionViewer: CollectionViewer): void;
40
- }
41
- /** Checks whether an object is a data source. */
42
- declare function isDataSource(value: any): value is DataSource<any>;
1
+ import { Observable } from 'rxjs';
2
+ import { D as DataSource } from '../data-source.d-7cab2c9d.js';
3
+ export { C as CollectionViewer, D as DataSource, L as ListRange, i as isDataSource } from '../data-source.d-7cab2c9d.js';
4
+ import { IterableChanges, ViewContainerRef } from '@angular/core';
5
+ import { _ as _ViewRepeaterItemContext, a as _ViewRepeater, b as _ViewRepeaterItemContextFactory, c as _ViewRepeaterItemValueResolver, d as _ViewRepeaterItemChanged } from '../view-repeater.d-79039e1f.js';
6
+ export { h as _VIEW_REPEATER_STRATEGY, a as _ViewRepeater, g as _ViewRepeaterItemChange, d as _ViewRepeaterItemChanged, _ as _ViewRepeaterItemContext, b as _ViewRepeaterItemContextFactory, e as _ViewRepeaterItemInsertArgs, c as _ViewRepeaterItemValueResolver, f as _ViewRepeaterOperation } from '../view-repeater.d-79039e1f.js';
7
+ import { S as SelectionModel } from '../selection-model.d-1a70542c.js';
8
+ export { a as SelectionChange, S as SelectionModel, g as getMultipleValuesInSingleSelectionError } from '../selection-model.d-1a70542c.js';
9
+ export { U as UniqueSelectionDispatcher, a as UniqueSelectionDispatcherListener } from '../unique-selection-dispatcher.d-7993b9f5.js';
43
10
 
44
11
  /** DataSource wrapper for a native array. */
45
12
  declare class ArrayDataSource<T> extends DataSource<T> {
@@ -49,91 +16,6 @@ declare class ArrayDataSource<T> extends DataSource<T> {
49
16
  disconnect(): void;
50
17
  }
51
18
 
52
- /**
53
- * The context for an embedded view in the repeater's view container.
54
- *
55
- * @template T The type for the embedded view's $implicit property.
56
- */
57
- interface _ViewRepeaterItemContext<T> {
58
- $implicit?: T;
59
- }
60
- /**
61
- * The arguments needed to construct an embedded view for an item in a view
62
- * container.
63
- *
64
- * @template C The type for the context passed to each embedded view.
65
- */
66
- interface _ViewRepeaterItemInsertArgs<C> {
67
- templateRef: TemplateRef<C>;
68
- context?: C;
69
- index?: number;
70
- }
71
- /**
72
- * A factory that derives the embedded view context for an item in a view
73
- * container.
74
- *
75
- * @template T The type for the embedded view's $implicit property.
76
- * @template R The type for the item in each IterableDiffer change record.
77
- * @template C The type for the context passed to each embedded view.
78
- */
79
- type _ViewRepeaterItemContextFactory<T, R, C extends _ViewRepeaterItemContext<T>> = (record: IterableChangeRecord<R>, adjustedPreviousIndex: number | null, currentIndex: number | null) => _ViewRepeaterItemInsertArgs<C>;
80
- /**
81
- * Extracts the value of an item from an {@link IterableChangeRecord}.
82
- *
83
- * @template T The type for the embedded view's $implicit property.
84
- * @template R The type for the item in each IterableDiffer change record.
85
- */
86
- type _ViewRepeaterItemValueResolver<T, R> = (record: IterableChangeRecord<R>) => T;
87
- /** Indicates how a view was changed by a {@link _ViewRepeater}. */
88
- declare enum _ViewRepeaterOperation {
89
- /** The content of an existing view was replaced with another item. */
90
- REPLACED = 0,
91
- /** A new view was created with `createEmbeddedView`. */
92
- INSERTED = 1,
93
- /** The position of a view changed, but the content remains the same. */
94
- MOVED = 2,
95
- /** A view was detached from the view container. */
96
- REMOVED = 3
97
- }
98
- /**
99
- * Meta data describing the state of a view after it was updated by a
100
- * {@link _ViewRepeater}.
101
- *
102
- * @template R The type for the item in each IterableDiffer change record.
103
- * @template C The type for the context passed to each embedded view.
104
- */
105
- interface _ViewRepeaterItemChange<R, C> {
106
- /** The view's context after it was changed. */
107
- context?: C;
108
- /** Indicates how the view was changed. */
109
- operation: _ViewRepeaterOperation;
110
- /** The view's corresponding change record. */
111
- record: IterableChangeRecord<R>;
112
- }
113
- /**
114
- * Type for a callback to be executed after a view has changed.
115
- *
116
- * @template R The type for the item in each IterableDiffer change record.
117
- * @template C The type for the context passed to each embedded view.
118
- */
119
- type _ViewRepeaterItemChanged<R, C> = (change: _ViewRepeaterItemChange<R, C>) => void;
120
- /**
121
- * Describes a strategy for rendering items in a {@link ViewContainerRef}.
122
- *
123
- * @template T The type for the embedded view's $implicit property.
124
- * @template R The type for the item in each IterableDiffer change record.
125
- * @template C The type for the context passed to each embedded view.
126
- */
127
- interface _ViewRepeater<T, R, C extends _ViewRepeaterItemContext<T>> {
128
- applyChanges(changes: IterableChanges<R>, viewContainerRef: ViewContainerRef, itemContextFactory: _ViewRepeaterItemContextFactory<T, R, C>, itemValueResolver: _ViewRepeaterItemValueResolver<T, R>, itemViewChanged?: _ViewRepeaterItemChanged<R, C>): void;
129
- detach(): void;
130
- }
131
- /**
132
- * Injection token for {@link _ViewRepeater}. This token is for use by Angular Material only.
133
- * @docs-private
134
- */
135
- declare const _VIEW_REPEATER_STRATEGY: InjectionToken<_ViewRepeater<unknown, unknown, _ViewRepeaterItemContext<unknown>>>;
136
-
137
19
  /**
138
20
  * A repeater that destroys views when they are removed from a
139
21
  * {@link ViewContainerRef}. When new items are inserted into the container,
@@ -194,147 +76,6 @@ declare class _RecycleViewRepeaterStrategy<T, R, C extends _ViewRepeaterItemCont
194
76
  private _insertViewFromCache;
195
77
  }
196
78
 
197
- /**
198
- * Class to be used to power selecting one or more options from a list.
199
- */
200
- declare class SelectionModel<T> {
201
- private _multiple;
202
- private _emitChanges;
203
- compareWith?: ((o1: T, o2: T) => boolean) | undefined;
204
- /** Currently-selected values. */
205
- private _selection;
206
- /** Keeps track of the deselected options that haven't been emitted by the change event. */
207
- private _deselectedToEmit;
208
- /** Keeps track of the selected options that haven't been emitted by the change event. */
209
- private _selectedToEmit;
210
- /** Cache for the array value of the selected items. */
211
- private _selected;
212
- /** Selected values. */
213
- get selected(): T[];
214
- /** Event emitted when the value has changed. */
215
- readonly changed: Subject<SelectionChange<T>>;
216
- constructor(_multiple?: boolean, initiallySelectedValues?: T[], _emitChanges?: boolean, compareWith?: ((o1: T, o2: T) => boolean) | undefined);
217
- /**
218
- * Selects a value or an array of values.
219
- * @param values The values to select
220
- * @return Whether the selection changed as a result of this call
221
- * @breaking-change 16.0.0 make return type boolean
222
- */
223
- select(...values: T[]): boolean | void;
224
- /**
225
- * Deselects a value or an array of values.
226
- * @param values The values to deselect
227
- * @return Whether the selection changed as a result of this call
228
- * @breaking-change 16.0.0 make return type boolean
229
- */
230
- deselect(...values: T[]): boolean | void;
231
- /**
232
- * Sets the selected values
233
- * @param values The new selected values
234
- * @return Whether the selection changed as a result of this call
235
- * @breaking-change 16.0.0 make return type boolean
236
- */
237
- setSelection(...values: T[]): boolean | void;
238
- /**
239
- * Toggles a value between selected and deselected.
240
- * @param value The value to toggle
241
- * @return Whether the selection changed as a result of this call
242
- * @breaking-change 16.0.0 make return type boolean
243
- */
244
- toggle(value: T): boolean | void;
245
- /**
246
- * Clears all of the selected values.
247
- * @param flushEvent Whether to flush the changes in an event.
248
- * If false, the changes to the selection will be flushed along with the next event.
249
- * @return Whether the selection changed as a result of this call
250
- * @breaking-change 16.0.0 make return type boolean
251
- */
252
- clear(flushEvent?: boolean): boolean | void;
253
- /**
254
- * Determines whether a value is selected.
255
- */
256
- isSelected(value: T): boolean;
257
- /**
258
- * Determines whether the model does not have a value.
259
- */
260
- isEmpty(): boolean;
261
- /**
262
- * Determines whether the model has a value.
263
- */
264
- hasValue(): boolean;
265
- /**
266
- * Sorts the selected values based on a predicate function.
267
- */
268
- sort(predicate?: (a: T, b: T) => number): void;
269
- /**
270
- * Gets whether multiple values can be selected.
271
- */
272
- isMultipleSelection(): boolean;
273
- /** Emits a change event and clears the records of selected and deselected values. */
274
- private _emitChangeEvent;
275
- /** Selects a value. */
276
- private _markSelected;
277
- /** Deselects a value. */
278
- private _unmarkSelected;
279
- /** Clears out the selected values. */
280
- private _unmarkAll;
281
- /**
282
- * Verifies the value assignment and throws an error if the specified value array is
283
- * including multiple values while the selection model is not supporting multiple values.
284
- */
285
- private _verifyValueAssignment;
286
- /** Whether there are queued up change to be emitted. */
287
- private _hasQueuedChanges;
288
- /** Returns a value that is comparable to inputValue by applying compareWith function, returns the same inputValue otherwise. */
289
- private _getConcreteValue;
290
- }
291
- /**
292
- * Event emitted when the value of a MatSelectionModel has changed.
293
- * @docs-private
294
- */
295
- interface SelectionChange<T> {
296
- /** Model that dispatched the event. */
297
- source: SelectionModel<T>;
298
- /** Options that were added to the model. */
299
- added: T[];
300
- /** Options that were removed from the model. */
301
- removed: T[];
302
- }
303
- /**
304
- * Returns an error that reports that multiple values are passed into a selection model
305
- * with a single value.
306
- * @docs-private
307
- */
308
- declare function getMultipleValuesInSingleSelectionError(): Error;
309
-
310
- type UniqueSelectionDispatcherListener = (id: string, name: string) => void;
311
- /**
312
- * Class to coordinate unique selection based on name.
313
- * Intended to be consumed as an Angular service.
314
- * This service is needed because native radio change events are only fired on the item currently
315
- * being selected, and we still need to uncheck the previous selection.
316
- *
317
- * This service does not *store* any IDs and names because they may change at any time, so it is
318
- * less error-prone if they are simply passed through when the events occur.
319
- */
320
- declare class UniqueSelectionDispatcher implements OnDestroy {
321
- private _listeners;
322
- /**
323
- * Notify other items that selection for the given name has been set.
324
- * @param id ID of the item.
325
- * @param name Name of the item.
326
- */
327
- notify(id: string, name: string): void;
328
- /**
329
- * Listen for future changes to item selection.
330
- * @return Function used to deregister listener
331
- */
332
- listen(listener: UniqueSelectionDispatcherListener): () => void;
333
- ngOnDestroy(): void;
334
- static ɵfac: i0.ɵɵFactoryDeclaration<UniqueSelectionDispatcher, never>;
335
- static ɵprov: i0.ɵɵInjectableDeclaration<UniqueSelectionDispatcher>;
336
- }
337
-
338
79
  /**
339
80
  * Interface for a class that can flatten hierarchical structured data and re-expand the flattened
340
81
  * data back into its original structure. Should be used in conjunction with the cdk-tree.
@@ -354,4 +95,4 @@ interface TreeDataNodeFlattener<T> {
354
95
  nodeDescendents(node: T, nodes: T[], onlyExpandable: boolean): void;
355
96
  }
356
97
 
357
- export { ArrayDataSource, type CollectionViewer, DataSource, type ListRange, type SelectionChange, SelectionModel, type TreeDataNodeFlattener, UniqueSelectionDispatcher, type UniqueSelectionDispatcherListener, _DisposeViewRepeaterStrategy, _RecycleViewRepeaterStrategy, _VIEW_REPEATER_STRATEGY, type _ViewRepeater, type _ViewRepeaterItemChange, type _ViewRepeaterItemChanged, type _ViewRepeaterItemContext, type _ViewRepeaterItemContextFactory, type _ViewRepeaterItemInsertArgs, type _ViewRepeaterItemValueResolver, _ViewRepeaterOperation, getMultipleValuesInSingleSelectionError, isDataSource };
98
+ export { ArrayDataSource, type TreeDataNodeFlattener, _DisposeViewRepeaterStrategy, _RecycleViewRepeaterStrategy };
@@ -0,0 +1,42 @@
1
+ import { Observable } from 'rxjs';
2
+
3
+ /** Represents a range of numbers with a specified start and end. */
4
+ type ListRange = {
5
+ start: number;
6
+ end: number;
7
+ };
8
+ /**
9
+ * Interface for any component that provides a view of some data collection and wants to provide
10
+ * information regarding the view and any changes made.
11
+ */
12
+ interface CollectionViewer {
13
+ /**
14
+ * A stream that emits whenever the `CollectionViewer` starts looking at a new portion of the
15
+ * data. The `start` index is inclusive, while the `end` is exclusive.
16
+ */
17
+ viewChange: Observable<ListRange>;
18
+ }
19
+
20
+ declare abstract class DataSource<T> {
21
+ /**
22
+ * Connects a collection viewer (such as a data-table) to this data source. Note that
23
+ * the stream provided will be accessed during change detection and should not directly change
24
+ * values that are bound in template views.
25
+ * @param collectionViewer The component that exposes a view over the data provided by this
26
+ * data source.
27
+ * @returns Observable that emits a new value when the data changes.
28
+ */
29
+ abstract connect(collectionViewer: CollectionViewer): Observable<readonly T[]>;
30
+ /**
31
+ * Disconnects a collection viewer (such as a data-table) from this data source. Can be used
32
+ * to perform any clean-up or tear-down operations when a view is being destroyed.
33
+ *
34
+ * @param collectionViewer The component that exposes a view over the data provided by this
35
+ * data source.
36
+ */
37
+ abstract disconnect(collectionViewer: CollectionViewer): void;
38
+ }
39
+ /** Checks whether an object is a data source. */
40
+ declare function isDataSource(value: any): value is DataSource<any>;
41
+
42
+ export { type CollectionViewer as C, DataSource as D, type ListRange as L, isDataSource as i };
package/dialog/index.d.ts CHANGED
@@ -1,13 +1,20 @@
1
- import * as i3 from '@angular/cdk/a11y';
2
- import { FocusTrapFactory, FocusOrigin } from '@angular/cdk/a11y';
3
- import * as i2 from '@angular/cdk/portal';
4
- import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal, DomPortal } from '@angular/cdk/portal';
5
1
  import * as i0 from '@angular/core';
6
2
  import { ViewContainerRef, Injector, StaticProvider, Type, OnDestroy, ElementRef, NgZone, ChangeDetectorRef, ComponentRef, EmbeddedViewRef, TemplateRef, InjectionToken } from '@angular/core';
7
- import { Direction } from '@angular/cdk/bidi';
8
- import * as i1 from '@angular/cdk/overlay';
9
- import { PositionStrategy, ScrollStrategy, OverlayRef, ComponentType, Overlay } from '@angular/cdk/overlay';
3
+ import { F as FocusOrigin } from '../focus-monitor.d-810a02e6.js';
4
+ import { a as FocusTrapFactory, h as A11yModule } from '../a11y-module.d-7d03e079.js';
5
+ import { B as BasePortalOutlet, C as CdkPortalOutlet, a as ComponentPortal, T as TemplatePortal, D as DomPortal, b as ComponentType, P as PortalModule } from '../portal-directives.d-d345bd53.js';
6
+ import { a as Direction } from '../bidi-module.d-f8648621.js';
7
+ import { P as PositionStrategy, S as ScrollStrategy, O as OverlayRef, a as OverlayModule } from '../overlay-module.d-5d06db8a.js';
10
8
  import { Observable, Subject } from 'rxjs';
9
+ import * as _angular_cdk_portal from '@angular/cdk/portal';
10
+ import '../observe-content.d-c08bc882.js';
11
+ import '../number-property.d-ce316715.js';
12
+ import '../scrolling-module.d-a08a462d.js';
13
+ import '../data-source.d-7cab2c9d.js';
14
+ import '@angular/common';
15
+ import '../viewport-ruler.d-f3d3e82f.js';
16
+ import '../platform.d-0a5b4792.js';
17
+ import '../style-loader.d-19baab84.js';
11
18
 
12
19
  /** Options for where to set focus to automatically on dialog open */
13
20
  type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';
@@ -107,12 +114,6 @@ declare class DialogConfig<D = unknown, R = unknown, C extends BasePortalOutlet
107
114
  * browser location changes.
108
115
  */
109
116
  closeOnOverlayDetachments?: boolean;
110
- /**
111
- * Alternate `ComponentFactoryResolver` to use when resolving the associated component.
112
- * @deprecated No longer used. Will be removed.
113
- * @breaking-change 20.0.0
114
- */
115
- componentFactoryResolver?: unknown;
116
117
  /**
117
118
  * Providers that will be exposed to the contents of the dialog. Can also
118
119
  * be provided as a function in order to generate the providers lazily.
@@ -386,7 +387,7 @@ declare class Dialog implements OnDestroy {
386
387
 
387
388
  declare class DialogModule {
388
389
  static ɵfac: i0.ɵɵFactoryDeclaration<DialogModule, never>;
389
- static ɵmod: i0.ɵɵNgModuleDeclaration<DialogModule, never, [typeof i1.OverlayModule, typeof i2.PortalModule, typeof i3.A11yModule, typeof CdkDialogContainer], [typeof i2.PortalModule, typeof CdkDialogContainer]>;
390
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DialogModule, never, [typeof OverlayModule, typeof PortalModule, typeof A11yModule, typeof CdkDialogContainer], [typeof PortalModule, typeof CdkDialogContainer]>;
390
391
  static ɵinj: i0.ɵɵInjectorDeclaration<DialogModule>;
391
392
  }
392
393
 
@@ -395,22 +396,6 @@ declare const DIALOG_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
395
396
  /** Injection token for the Dialog's Data. */
396
397
  declare const DIALOG_DATA: InjectionToken<any>;
397
398
  /** Injection token that can be used to provide default options for the dialog module. */
398
- declare const DEFAULT_DIALOG_CONFIG: InjectionToken<DialogConfig<unknown, unknown, i2.BasePortalOutlet>>;
399
- /**
400
- * @docs-private
401
- * @deprecated No longer used. To be removed.
402
- * @breaking-change 19.0.0
403
- */
404
- declare function DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => ScrollStrategy;
405
- /**
406
- * @docs-private
407
- * @deprecated No longer used. To be removed.
408
- * @breaking-change 19.0.0
409
- */
410
- declare const DIALOG_SCROLL_STRATEGY_PROVIDER: {
411
- provide: InjectionToken<() => ScrollStrategy>;
412
- deps: (typeof Overlay)[];
413
- useFactory: typeof DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY;
414
- };
399
+ declare const DEFAULT_DIALOG_CONFIG: InjectionToken<DialogConfig<unknown, unknown, _angular_cdk_portal.BasePortalOutlet>>;
415
400
 
416
- export { type AutoFocusTarget, CdkDialogContainer, DEFAULT_DIALOG_CONFIG, DIALOG_DATA, DIALOG_SCROLL_STRATEGY, DIALOG_SCROLL_STRATEGY_PROVIDER, DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY, Dialog, type DialogCloseOptions, DialogConfig, DialogModule, DialogRef, type DialogRole, throwDialogContentAlreadyAttachedError };
401
+ export { type AutoFocusTarget, CdkDialogContainer, DEFAULT_DIALOG_CONFIG, DIALOG_DATA, DIALOG_SCROLL_STRATEGY, Dialog, type DialogCloseOptions, DialogConfig, DialogModule, DialogRef, type DialogRole, throwDialogContentAlreadyAttachedError };
@@ -1,10 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { InjectionToken, ElementRef, NgZone, OnDestroy, EventEmitter, AfterViewInit, TemplateRef, OnChanges, SimpleChanges, ViewContainerRef, Renderer2 } from '@angular/core';
3
- import { Direction } from '@angular/cdk/bidi';
4
- import * as i3 from '@angular/cdk/scrolling';
5
- import { ViewportRuler } from '@angular/cdk/scrolling';
3
+ import { a as Direction } from '../bidi-module.d-f8648621.js';
6
4
  import { Subject, Observable } from 'rxjs';
7
- import { NumberInput } from '@angular/cdk/coercion';
5
+ import { V as ViewportRuler } from '../viewport-ruler.d-f3d3e82f.js';
6
+ import { N as NumberInput } from '../number-property.d-ce316715.js';
7
+ import { a as CdkScrollableModule } from '../scrolling-module.d-a08a462d.js';
8
+ import '../data-source.d-7cab2c9d.js';
8
9
 
9
10
  /** Possible values that can be used to configure the drag start delay. */
10
11
  type DragStartDelay = number | {
@@ -13,8 +14,6 @@ type DragStartDelay = number | {
13
14
  };
14
15
  /** Possible axis along which dragging can be locked. */
15
16
  type DragAxis = 'x' | 'y';
16
- /** Function that can be used to constrain the position of a dragged element. */
17
- type DragConstrainPosition = (point: Point, dragRef: DragRef) => Point;
18
17
  /** Possible orientations for a drop list. */
19
18
  type DropListOrientation = 'horizontal' | 'vertical' | 'mixed';
20
19
  /**
@@ -663,7 +662,7 @@ declare class CdkDrag<T = any> implements AfterViewInit, OnChanges, OnDestroy {
663
662
  * of the user's pointer on the page, a reference to the item being dragged and its dimensions.
664
663
  * Should return a point describing where the item should be rendered.
665
664
  */
666
- constrainPosition?: (userPointerPosition: Point, dragRef: DragRef, dimensions: DOMRect, pickupPositionInElement: Point) => Point;
665
+ constrainPosition?: DragConstrainPosition;
667
666
  /** Class to be added to the preview element. */
668
667
  previewClass: string | string[];
669
668
  /**
@@ -754,12 +753,13 @@ declare class CdkDrag<T = any> implements AfterViewInit, OnChanges, OnDestroy {
754
753
  * instances, and manages global event listeners on the `document`.
755
754
  * @docs-private
756
755
  */
757
- declare class DragDropRegistry<_ = unknown, __ = unknown> implements OnDestroy {
756
+ declare class DragDropRegistry implements OnDestroy {
758
757
  private _ngZone;
759
758
  private _document;
760
759
  private _styleLoader;
761
760
  private _renderer;
762
761
  private _cleanupDocumentTouchmove;
762
+ private _scroll;
763
763
  /** Registered drop container instances. */
764
764
  private _dropInstances;
765
765
  /** Registered drag item instances. */
@@ -789,12 +789,6 @@ declare class DragDropRegistry<_ = unknown, __ = unknown> implements OnDestroy {
789
789
  * while the user is dragging a drag item instance.
790
790
  */
791
791
  readonly pointerUp: Subject<TouchEvent | MouseEvent>;
792
- /**
793
- * Emits when the viewport has been scrolled while the user is dragging an item.
794
- * @deprecated To be turned into a private member. Use the `scrolled` method instead.
795
- * @breaking-change 13.0.0
796
- */
797
- readonly scroll: Subject<Event>;
798
792
  constructor(...args: unknown[]);
799
793
  /** Adds a drop container to the registry. */
800
794
  registerDropContainer(drop: DropListRef): void;
@@ -848,8 +842,8 @@ declare class DragDropRegistry<_ = unknown, __ = unknown> implements OnDestroy {
848
842
  private _persistentTouchmoveListener;
849
843
  /** Clears out the global event listeners from the `document`. */
850
844
  private _clearGlobalListeners;
851
- static ɵfac: i0.ɵɵFactoryDeclaration<DragDropRegistry<any, any>, never>;
852
- static ɵprov: i0.ɵɵInjectableDeclaration<DragDropRegistry<any, any>>;
845
+ static ɵfac: i0.ɵɵFactoryDeclaration<DragDropRegistry, never>;
846
+ static ɵprov: i0.ɵɵInjectableDeclaration<DragDropRegistry>;
853
847
  }
854
848
 
855
849
  /** Template that can be used to create a drag preview element. */
@@ -877,6 +871,8 @@ interface DragRefConfig {
877
871
  /** Ref that the current drag item is nested in. */
878
872
  parentDragRef?: DragRef;
879
873
  }
874
+ /** Function that can be used to constrain the position of a dragged element. */
875
+ type DragConstrainPosition = (userPointerPosition: Point, dragRef: DragRef, dimensions: DOMRect, pickupPositionInElement: Point) => Point;
880
876
  /** Template that can be used to create a drag helper element (e.g. a preview or a placeholder). */
881
877
  interface DragHelperTemplate<T = any> {
882
878
  template: TemplateRef<T> | null;
@@ -1110,7 +1106,7 @@ declare class DragRef<T = any> {
1110
1106
  * of the user's pointer on the page, a reference to the item being dragged and its dimensions.
1111
1107
  * Should return a point describing where the item should be rendered.
1112
1108
  */
1113
- constrainPosition?: (userPointerPosition: Point, dragRef: DragRef, dimensions: DOMRect, pickupPositionInElement: Point) => Point;
1109
+ constrainPosition?: DragConstrainPosition;
1114
1110
  constructor(element: ElementRef<HTMLElement> | HTMLElement, _config: DragRefConfig, _document: Document, _ngZone: NgZone, _viewportRuler: ViewportRuler, _dragDropRegistry: DragDropRegistry, _renderer: Renderer2);
1115
1111
  /**
1116
1112
  * Returns the element that is being used as a placeholder
@@ -1371,7 +1367,7 @@ declare class CdkDropListGroup<T> implements OnDestroy {
1371
1367
 
1372
1368
  declare class DragDropModule {
1373
1369
  static ɵfac: i0.ɵɵFactoryDeclaration<DragDropModule, never>;
1374
- static ɵmod: i0.ɵɵNgModuleDeclaration<DragDropModule, never, [typeof CdkDropList, typeof CdkDropListGroup, typeof CdkDrag, typeof CdkDragHandle, typeof CdkDragPreview, typeof CdkDragPlaceholder], [typeof i3.CdkScrollableModule, typeof CdkDropList, typeof CdkDropListGroup, typeof CdkDrag, typeof CdkDragHandle, typeof CdkDragPreview, typeof CdkDragPlaceholder]>;
1370
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DragDropModule, never, [typeof CdkDropList, typeof CdkDropListGroup, typeof CdkDrag, typeof CdkDragHandle, typeof CdkDragPreview, typeof CdkDragPlaceholder], [typeof CdkScrollableModule, typeof CdkDropList, typeof CdkDropListGroup, typeof CdkDrag, typeof CdkDragHandle, typeof CdkDragPreview, typeof CdkDragPlaceholder]>;
1375
1371
  static ɵinj: i0.ɵɵInjectorDeclaration<DragDropModule>;
1376
1372
  }
1377
1373