@angular/cdk-experimental 21.0.0-next.9 → 21.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,467 +8,546 @@ import { NG_VALUE_ACCESSOR } from '@angular/forms';
8
8
  import { CdkTable, CdkColumnDef, CdkCellDef, CdkHeaderCellDef, CdkTableModule } from '@angular/cdk/table';
9
9
  import { AsyncPipe } from '@angular/common';
10
10
 
11
- /**
12
- * Maintains a set of selected items. Support selecting and deselecting items, and checking if a
13
- * value is selected.
14
- * When constructed with a `trackByFn`, all the items will be identified by applying the `trackByFn`
15
- * on them. Because `trackByFn` requires the index of the item to be passed in, the `index` field is
16
- * expected to be set when calling `isSelected`, `select` and `deselect`.
17
- */
18
11
  class SelectionSet {
19
- _multiple;
20
- _trackByFn;
21
- _selectionMap = new Map();
22
- changed = new Subject();
23
- constructor(_multiple = false, _trackByFn) {
24
- this._multiple = _multiple;
25
- this._trackByFn = _trackByFn;
26
- }
27
- isSelected(value) {
28
- return this._selectionMap.has(this._getTrackedByValue(value));
29
- }
30
- select(...selects) {
31
- if (!this._multiple && selects.length > 1 && (typeof ngDevMode === 'undefined' || ngDevMode)) {
32
- throw Error('SelectionSet: not multiple selection');
33
- }
34
- const before = this._getCurrentSelection();
35
- if (!this._multiple) {
36
- this._selectionMap.clear();
37
- }
38
- for (const select of selects) {
39
- if (this.isSelected(select)) {
40
- continue;
41
- }
42
- this._markSelected(this._getTrackedByValue(select), select);
43
- }
44
- const after = this._getCurrentSelection();
45
- this.changed.next({ before, after });
46
- }
47
- deselect(...selects) {
48
- if (!this._multiple && selects.length > 1 && (typeof ngDevMode === 'undefined' || ngDevMode)) {
49
- throw Error('SelectionSet: not multiple selection');
50
- }
51
- const before = this._getCurrentSelection();
52
- for (const select of selects) {
53
- if (!this.isSelected(select)) {
54
- continue;
55
- }
56
- this._markDeselected(this._getTrackedByValue(select));
57
- }
58
- const after = this._getCurrentSelection();
59
- this.changed.next({ before, after });
60
- }
61
- _markSelected(key, toSelect) {
62
- this._selectionMap.set(key, toSelect);
63
- }
64
- _markDeselected(key) {
65
- this._selectionMap.delete(key);
66
- }
67
- _getTrackedByValue(select) {
68
- if (!this._trackByFn) {
69
- return select.value;
70
- }
71
- if (select.index == null && (typeof ngDevMode === 'undefined' || ngDevMode)) {
72
- throw Error('SelectionSet: index required when trackByFn is used.');
73
- }
74
- return this._trackByFn(select.index, select.value);
75
- }
76
- _getCurrentSelection() {
77
- return Array.from(this._selectionMap.values());
78
- }
12
+ _multiple;
13
+ _trackByFn;
14
+ _selectionMap = new Map();
15
+ changed = new Subject();
16
+ constructor(_multiple = false, _trackByFn) {
17
+ this._multiple = _multiple;
18
+ this._trackByFn = _trackByFn;
19
+ }
20
+ isSelected(value) {
21
+ return this._selectionMap.has(this._getTrackedByValue(value));
22
+ }
23
+ select(...selects) {
24
+ if (!this._multiple && selects.length > 1 && (typeof ngDevMode === 'undefined' || ngDevMode)) {
25
+ throw Error('SelectionSet: not multiple selection');
26
+ }
27
+ const before = this._getCurrentSelection();
28
+ if (!this._multiple) {
29
+ this._selectionMap.clear();
30
+ }
31
+ for (const select of selects) {
32
+ if (this.isSelected(select)) {
33
+ continue;
34
+ }
35
+ this._markSelected(this._getTrackedByValue(select), select);
36
+ }
37
+ const after = this._getCurrentSelection();
38
+ this.changed.next({
39
+ before,
40
+ after
41
+ });
42
+ }
43
+ deselect(...selects) {
44
+ if (!this._multiple && selects.length > 1 && (typeof ngDevMode === 'undefined' || ngDevMode)) {
45
+ throw Error('SelectionSet: not multiple selection');
46
+ }
47
+ const before = this._getCurrentSelection();
48
+ for (const select of selects) {
49
+ if (!this.isSelected(select)) {
50
+ continue;
51
+ }
52
+ this._markDeselected(this._getTrackedByValue(select));
53
+ }
54
+ const after = this._getCurrentSelection();
55
+ this.changed.next({
56
+ before,
57
+ after
58
+ });
59
+ }
60
+ _markSelected(key, toSelect) {
61
+ this._selectionMap.set(key, toSelect);
62
+ }
63
+ _markDeselected(key) {
64
+ this._selectionMap.delete(key);
65
+ }
66
+ _getTrackedByValue(select) {
67
+ if (!this._trackByFn) {
68
+ return select.value;
69
+ }
70
+ if (select.index == null && (typeof ngDevMode === 'undefined' || ngDevMode)) {
71
+ throw Error('SelectionSet: index required when trackByFn is used.');
72
+ }
73
+ return this._trackByFn(select.index, select.value);
74
+ }
75
+ _getCurrentSelection() {
76
+ return Array.from(this._selectionMap.values());
77
+ }
79
78
  }
80
79
 
81
- /**
82
- * Manages the selection states of the items and provides methods to check and update the selection
83
- * states.
84
- * It must be applied to the parent element if `cdkSelectionToggle`, `cdkSelectAll`,
85
- * `cdkRowSelection` and `cdkSelectionColumn` are applied.
86
- */
87
80
  class CdkSelection {
88
- viewChange;
89
- get dataSource() {
90
- return this._dataSource;
91
- }
92
- set dataSource(dataSource) {
93
- if (this._dataSource !== dataSource) {
94
- this._switchDataSource(dataSource);
95
- }
96
- }
97
- _dataSource;
98
- trackByFn;
99
- /** Whether to support multiple selection */
100
- get multiple() {
101
- return this._multiple;
102
- }
103
- set multiple(multiple) {
104
- this._multiple = coerceBooleanProperty(multiple);
105
- }
106
- _multiple;
107
- /** Emits when selection changes. */
108
- change = new EventEmitter();
109
- /** Latest data provided by the data source. */
110
- _data;
111
- /** Subscription that listens for the data provided by the data source. */
112
- _renderChangeSubscription;
113
- _destroyed = new Subject();
114
- _selection;
115
- _switchDataSource(dataSource) {
116
- this._data = [];
117
- // TODO: Move this logic to a shared function in `cdk/collections`.
118
- if (isDataSource(this._dataSource)) {
119
- this._dataSource.disconnect(this);
120
- }
121
- if (this._renderChangeSubscription) {
122
- this._renderChangeSubscription.unsubscribe();
123
- this._renderChangeSubscription = null;
124
- }
125
- this._dataSource = dataSource;
126
- }
127
- _observeRenderChanges() {
128
- if (!this._dataSource) {
129
- return;
130
- }
131
- let dataStream;
132
- if (isDataSource(this._dataSource)) {
133
- dataStream = this._dataSource.connect(this);
134
- }
135
- else if (this._dataSource instanceof Observable) {
136
- dataStream = this._dataSource;
137
- }
138
- else if (Array.isArray(this._dataSource)) {
139
- dataStream = of(this._dataSource);
140
- }
141
- if (dataStream == null && (typeof ngDevMode === 'undefined' || ngDevMode)) {
142
- throw Error('Unknown data source');
143
- }
144
- this._renderChangeSubscription = dataStream
145
- .pipe(takeUntil(this._destroyed))
146
- .subscribe(data => {
147
- this._data = data || [];
148
- });
149
- }
150
- ngOnInit() {
151
- this._selection = new SelectionSet(this._multiple, this.trackByFn);
152
- this._selection.changed.pipe(takeUntil(this._destroyed)).subscribe(change => {
153
- this._updateSelectAllState();
154
- this.change.emit(change);
155
- });
156
- }
157
- ngAfterContentChecked() {
158
- if (this._dataSource && !this._renderChangeSubscription) {
159
- this._observeRenderChanges();
160
- }
161
- }
162
- ngOnDestroy() {
163
- this._destroyed.next();
164
- this._destroyed.complete();
165
- if (isDataSource(this._dataSource)) {
166
- this._dataSource.disconnect(this);
167
- }
168
- }
169
- /** Toggles selection for a given value. `index` is required if `trackBy` is used. */
170
- toggleSelection(value, index) {
171
- if (!!this.trackByFn && index == null && (typeof ngDevMode === 'undefined' || ngDevMode)) {
172
- throw Error('CdkSelection: index required when trackBy is used');
173
- }
174
- if (this.isSelected(value, index)) {
175
- this._selection.deselect({ value, index });
176
- }
177
- else {
178
- this._selection.select({ value, index });
179
- }
180
- }
181
- /**
182
- * Toggles select-all. If no value is selected, select all values. If all values or some of the
183
- * values are selected, de-select all values.
184
- */
185
- toggleSelectAll() {
186
- if (!this._multiple && (typeof ngDevMode === 'undefined' || ngDevMode)) {
187
- throw Error('CdkSelection: multiple selection not enabled');
188
- }
189
- if (this.selectAllState === 'none') {
190
- this._selectAll();
191
- }
192
- else {
193
- this._clearAll();
194
- }
195
- }
196
- /** Checks whether a value is selected. `index` is required if `trackBy` is used. */
197
- isSelected(value, index) {
198
- if (!!this.trackByFn && index == null && (typeof ngDevMode === 'undefined' || ngDevMode)) {
199
- throw Error('CdkSelection: index required when trackBy is used');
200
- }
201
- return this._selection.isSelected({ value, index });
202
- }
203
- /** Checks whether all values are selected. */
204
- isAllSelected() {
205
- return this._data.every((value, index) => this._selection.isSelected({ value, index }));
206
- }
207
- /** Checks whether partially selected. */
208
- isPartialSelected() {
209
- return (!this.isAllSelected() &&
210
- this._data.some((value, index) => this._selection.isSelected({ value, index })));
211
- }
212
- _selectAll() {
213
- const toSelect = [];
214
- this._data.forEach((value, index) => {
215
- toSelect.push({ value, index });
216
- });
217
- this._selection.select(...toSelect);
218
- }
219
- _clearAll() {
220
- const toDeselect = [];
221
- this._data.forEach((value, index) => {
222
- toDeselect.push({ value, index });
223
- });
224
- this._selection.deselect(...toDeselect);
225
- }
226
- _updateSelectAllState() {
227
- if (this.isAllSelected()) {
228
- this.selectAllState = 'all';
229
- }
230
- else if (this.isPartialSelected()) {
231
- this.selectAllState = 'partial';
232
- }
233
- else {
234
- this.selectAllState = 'none';
235
- }
236
- }
237
- selectAllState = 'none';
238
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkSelection, deps: [], target: i0.ɵɵFactoryTarget.Directive });
239
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: CdkSelection, isStandalone: true, selector: "[cdkSelection]", inputs: { dataSource: "dataSource", trackByFn: ["trackBy", "trackByFn"], multiple: ["cdkSelectionMultiple", "multiple"] }, outputs: { change: "cdkSelectionChange" }, exportAs: ["cdkSelection"], ngImport: i0 });
81
+ viewChange;
82
+ get dataSource() {
83
+ return this._dataSource;
84
+ }
85
+ set dataSource(dataSource) {
86
+ if (this._dataSource !== dataSource) {
87
+ this._switchDataSource(dataSource);
88
+ }
89
+ }
90
+ _dataSource;
91
+ trackByFn;
92
+ get multiple() {
93
+ return this._multiple;
94
+ }
95
+ set multiple(multiple) {
96
+ this._multiple = coerceBooleanProperty(multiple);
97
+ }
98
+ _multiple;
99
+ change = new EventEmitter();
100
+ _data;
101
+ _renderChangeSubscription;
102
+ _destroyed = new Subject();
103
+ _selection;
104
+ _switchDataSource(dataSource) {
105
+ this._data = [];
106
+ if (isDataSource(this._dataSource)) {
107
+ this._dataSource.disconnect(this);
108
+ }
109
+ if (this._renderChangeSubscription) {
110
+ this._renderChangeSubscription.unsubscribe();
111
+ this._renderChangeSubscription = null;
112
+ }
113
+ this._dataSource = dataSource;
114
+ }
115
+ _observeRenderChanges() {
116
+ if (!this._dataSource) {
117
+ return;
118
+ }
119
+ let dataStream;
120
+ if (isDataSource(this._dataSource)) {
121
+ dataStream = this._dataSource.connect(this);
122
+ } else if (this._dataSource instanceof Observable) {
123
+ dataStream = this._dataSource;
124
+ } else if (Array.isArray(this._dataSource)) {
125
+ dataStream = of(this._dataSource);
126
+ }
127
+ if (dataStream == null && (typeof ngDevMode === 'undefined' || ngDevMode)) {
128
+ throw Error('Unknown data source');
129
+ }
130
+ this._renderChangeSubscription = dataStream.pipe(takeUntil(this._destroyed)).subscribe(data => {
131
+ this._data = data || [];
132
+ });
133
+ }
134
+ ngOnInit() {
135
+ this._selection = new SelectionSet(this._multiple, this.trackByFn);
136
+ this._selection.changed.pipe(takeUntil(this._destroyed)).subscribe(change => {
137
+ this._updateSelectAllState();
138
+ this.change.emit(change);
139
+ });
140
+ }
141
+ ngAfterContentChecked() {
142
+ if (this._dataSource && !this._renderChangeSubscription) {
143
+ this._observeRenderChanges();
144
+ }
145
+ }
146
+ ngOnDestroy() {
147
+ this._destroyed.next();
148
+ this._destroyed.complete();
149
+ if (isDataSource(this._dataSource)) {
150
+ this._dataSource.disconnect(this);
151
+ }
152
+ }
153
+ toggleSelection(value, index) {
154
+ if (!!this.trackByFn && index == null && (typeof ngDevMode === 'undefined' || ngDevMode)) {
155
+ throw Error('CdkSelection: index required when trackBy is used');
156
+ }
157
+ if (this.isSelected(value, index)) {
158
+ this._selection.deselect({
159
+ value,
160
+ index
161
+ });
162
+ } else {
163
+ this._selection.select({
164
+ value,
165
+ index
166
+ });
167
+ }
168
+ }
169
+ toggleSelectAll() {
170
+ if (!this._multiple && (typeof ngDevMode === 'undefined' || ngDevMode)) {
171
+ throw Error('CdkSelection: multiple selection not enabled');
172
+ }
173
+ if (this.selectAllState === 'none') {
174
+ this._selectAll();
175
+ } else {
176
+ this._clearAll();
177
+ }
178
+ }
179
+ isSelected(value, index) {
180
+ if (!!this.trackByFn && index == null && (typeof ngDevMode === 'undefined' || ngDevMode)) {
181
+ throw Error('CdkSelection: index required when trackBy is used');
182
+ }
183
+ return this._selection.isSelected({
184
+ value,
185
+ index
186
+ });
187
+ }
188
+ isAllSelected() {
189
+ return this._data.every((value, index) => this._selection.isSelected({
190
+ value,
191
+ index
192
+ }));
193
+ }
194
+ isPartialSelected() {
195
+ return !this.isAllSelected() && this._data.some((value, index) => this._selection.isSelected({
196
+ value,
197
+ index
198
+ }));
199
+ }
200
+ _selectAll() {
201
+ const toSelect = [];
202
+ this._data.forEach((value, index) => {
203
+ toSelect.push({
204
+ value,
205
+ index
206
+ });
207
+ });
208
+ this._selection.select(...toSelect);
209
+ }
210
+ _clearAll() {
211
+ const toDeselect = [];
212
+ this._data.forEach((value, index) => {
213
+ toDeselect.push({
214
+ value,
215
+ index
216
+ });
217
+ });
218
+ this._selection.deselect(...toDeselect);
219
+ }
220
+ _updateSelectAllState() {
221
+ if (this.isAllSelected()) {
222
+ this.selectAllState = 'all';
223
+ } else if (this.isPartialSelected()) {
224
+ this.selectAllState = 'partial';
225
+ } else {
226
+ this.selectAllState = 'none';
227
+ }
228
+ }
229
+ selectAllState = 'none';
230
+ static ɵfac = i0.ɵɵngDeclareFactory({
231
+ minVersion: "12.0.0",
232
+ version: "20.2.0-next.2",
233
+ ngImport: i0,
234
+ type: CdkSelection,
235
+ deps: [],
236
+ target: i0.ɵɵFactoryTarget.Directive
237
+ });
238
+ static ɵdir = i0.ɵɵngDeclareDirective({
239
+ minVersion: "14.0.0",
240
+ version: "20.2.0-next.2",
241
+ type: CdkSelection,
242
+ isStandalone: true,
243
+ selector: "[cdkSelection]",
244
+ inputs: {
245
+ dataSource: "dataSource",
246
+ trackByFn: ["trackBy", "trackByFn"],
247
+ multiple: ["cdkSelectionMultiple", "multiple"]
248
+ },
249
+ outputs: {
250
+ change: "cdkSelectionChange"
251
+ },
252
+ exportAs: ["cdkSelection"],
253
+ ngImport: i0
254
+ });
240
255
  }
241
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkSelection, decorators: [{
242
- type: Directive,
243
- args: [{
244
- selector: '[cdkSelection]',
245
- exportAs: 'cdkSelection',
246
- }]
247
- }], propDecorators: { dataSource: [{
248
- type: Input
249
- }], trackByFn: [{
250
- type: Input,
251
- args: ['trackBy']
252
- }], multiple: [{
253
- type: Input,
254
- args: ['cdkSelectionMultiple']
255
- }], change: [{
256
- type: Output,
257
- args: ['cdkSelectionChange']
258
- }] } });
256
+ i0.ɵɵngDeclareClassMetadata({
257
+ minVersion: "12.0.0",
258
+ version: "20.2.0-next.2",
259
+ ngImport: i0,
260
+ type: CdkSelection,
261
+ decorators: [{
262
+ type: Directive,
263
+ args: [{
264
+ selector: '[cdkSelection]',
265
+ exportAs: 'cdkSelection'
266
+ }]
267
+ }],
268
+ propDecorators: {
269
+ dataSource: [{
270
+ type: Input
271
+ }],
272
+ trackByFn: [{
273
+ type: Input,
274
+ args: ['trackBy']
275
+ }],
276
+ multiple: [{
277
+ type: Input,
278
+ args: ['cdkSelectionMultiple']
279
+ }],
280
+ change: [{
281
+ type: Output,
282
+ args: ['cdkSelectionChange']
283
+ }]
284
+ }
285
+ });
259
286
 
260
- /**
261
- * Makes the element a select-all toggle.
262
- *
263
- * Must be used within a parent `CdkSelection` directive. It toggles the selection states
264
- * of all the selection toggles connected with the `CdkSelection` directive.
265
- * If the element implements `ControlValueAccessor`, e.g. `MatCheckbox`, the directive
266
- * automatically connects it with the select-all state provided by the `CdkSelection` directive. If
267
- * not, use `checked$` to get the checked state, `indeterminate$` to get the indeterminate state,
268
- * and `toggle()` to change the selection state.
269
- */
270
287
  class CdkSelectAll {
271
- _selection = inject(CdkSelection, { optional: true });
272
- _controlValueAccessor = inject(NG_VALUE_ACCESSOR, { optional: true, self: true });
273
- /**
274
- * The checked state of the toggle.
275
- * Resolves to `true` if all the values are selected, `false` if no value is selected.
276
- */
277
- checked;
278
- /**
279
- * The indeterminate state of the toggle.
280
- * Resolves to `true` if part (not all) of the values are selected, `false` if all values or no
281
- * value at all are selected.
282
- */
283
- indeterminate;
284
- /**
285
- * Toggles the select-all state.
286
- * @param event The click event if the toggle is triggered by a (mouse or keyboard) click. If
287
- * using with a native `<input type="checkbox">`, the parameter is required for the
288
- * indeterminate state to work properly.
289
- */
290
- toggle(event) {
291
- // This is needed when applying the directive on a native <input type="checkbox">
292
- // checkbox. The default behavior needs to be prevented in order to support the indeterminate
293
- // state. The timeout is also needed so the checkbox can show the latest state.
294
- if (event) {
295
- event.preventDefault();
296
- }
297
- setTimeout(() => {
298
- this._selection.toggleSelectAll();
299
- });
300
- }
301
- _destroyed = new Subject();
302
- constructor() {
303
- const _selection = this._selection;
304
- this.checked = _selection.change.pipe(switchMap(() => of(_selection.isAllSelected())));
305
- this.indeterminate = _selection.change.pipe(switchMap(() => of(_selection.isPartialSelected())));
306
- }
307
- ngOnInit() {
308
- this._assertValidParentSelection();
309
- this._configureControlValueAccessor();
310
- }
311
- _configureControlValueAccessor() {
312
- if (this._controlValueAccessor && this._controlValueAccessor.length) {
313
- this._controlValueAccessor[0].registerOnChange((e) => {
314
- if (e === true || e === false) {
315
- this.toggle();
316
- }
317
- });
318
- this.checked.pipe(takeUntil(this._destroyed)).subscribe(state => {
319
- this._controlValueAccessor[0].writeValue(state);
320
- });
321
- }
322
- }
323
- _assertValidParentSelection() {
324
- if (!this._selection && (typeof ngDevMode === 'undefined' || ngDevMode)) {
325
- throw Error('CdkSelectAll: missing CdkSelection in the parent');
326
- }
327
- if (!this._selection.multiple && (typeof ngDevMode === 'undefined' || ngDevMode)) {
328
- throw Error('CdkSelectAll: CdkSelection must have cdkSelectionMultiple set to true');
329
- }
330
- }
331
- ngOnDestroy() {
332
- this._destroyed.next();
333
- this._destroyed.complete();
334
- }
335
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkSelectAll, deps: [], target: i0.ɵɵFactoryTarget.Directive });
336
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: CdkSelectAll, isStandalone: true, selector: "[cdkSelectAll]", exportAs: ["cdkSelectAll"], ngImport: i0 });
288
+ _selection = inject(CdkSelection, {
289
+ optional: true
290
+ });
291
+ _controlValueAccessor = inject(NG_VALUE_ACCESSOR, {
292
+ optional: true,
293
+ self: true
294
+ });
295
+ checked;
296
+ indeterminate;
297
+ toggle(event) {
298
+ if (event) {
299
+ event.preventDefault();
300
+ }
301
+ setTimeout(() => {
302
+ this._selection.toggleSelectAll();
303
+ });
304
+ }
305
+ _destroyed = new Subject();
306
+ constructor() {
307
+ const _selection = this._selection;
308
+ this.checked = _selection.change.pipe(switchMap(() => of(_selection.isAllSelected())));
309
+ this.indeterminate = _selection.change.pipe(switchMap(() => of(_selection.isPartialSelected())));
310
+ }
311
+ ngOnInit() {
312
+ this._assertValidParentSelection();
313
+ this._configureControlValueAccessor();
314
+ }
315
+ _configureControlValueAccessor() {
316
+ if (this._controlValueAccessor && this._controlValueAccessor.length) {
317
+ this._controlValueAccessor[0].registerOnChange(e => {
318
+ if (e === true || e === false) {
319
+ this.toggle();
320
+ }
321
+ });
322
+ this.checked.pipe(takeUntil(this._destroyed)).subscribe(state => {
323
+ this._controlValueAccessor[0].writeValue(state);
324
+ });
325
+ }
326
+ }
327
+ _assertValidParentSelection() {
328
+ if (!this._selection && (typeof ngDevMode === 'undefined' || ngDevMode)) {
329
+ throw Error('CdkSelectAll: missing CdkSelection in the parent');
330
+ }
331
+ if (!this._selection.multiple && (typeof ngDevMode === 'undefined' || ngDevMode)) {
332
+ throw Error('CdkSelectAll: CdkSelection must have cdkSelectionMultiple set to true');
333
+ }
334
+ }
335
+ ngOnDestroy() {
336
+ this._destroyed.next();
337
+ this._destroyed.complete();
338
+ }
339
+ static ɵfac = i0.ɵɵngDeclareFactory({
340
+ minVersion: "12.0.0",
341
+ version: "20.2.0-next.2",
342
+ ngImport: i0,
343
+ type: CdkSelectAll,
344
+ deps: [],
345
+ target: i0.ɵɵFactoryTarget.Directive
346
+ });
347
+ static ɵdir = i0.ɵɵngDeclareDirective({
348
+ minVersion: "14.0.0",
349
+ version: "20.2.0-next.2",
350
+ type: CdkSelectAll,
351
+ isStandalone: true,
352
+ selector: "[cdkSelectAll]",
353
+ exportAs: ["cdkSelectAll"],
354
+ ngImport: i0
355
+ });
337
356
  }
338
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkSelectAll, decorators: [{
339
- type: Directive,
340
- args: [{
341
- selector: '[cdkSelectAll]',
342
- exportAs: 'cdkSelectAll',
343
- }]
344
- }], ctorParameters: () => [] });
357
+ i0.ɵɵngDeclareClassMetadata({
358
+ minVersion: "12.0.0",
359
+ version: "20.2.0-next.2",
360
+ ngImport: i0,
361
+ type: CdkSelectAll,
362
+ decorators: [{
363
+ type: Directive,
364
+ args: [{
365
+ selector: '[cdkSelectAll]',
366
+ exportAs: 'cdkSelectAll'
367
+ }]
368
+ }],
369
+ ctorParameters: () => []
370
+ });
345
371
 
346
- /**
347
- * Makes the element a selection toggle.
348
- *
349
- * Must be used within a parent `CdkSelection` directive.
350
- * Must be provided with the value. If `trackBy` is used on `CdkSelection`, the index of the value
351
- * is required. If the element implements `ControlValueAccessor`, e.g. `MatCheckbox`, the directive
352
- * automatically connects it with the selection state provided by the `CdkSelection` directive. If
353
- * not, use `checked$` to get the checked state of the value, and `toggle()` to change the selection
354
- * state.
355
- */
356
372
  class CdkSelectionToggle {
357
- _selection = inject(CdkSelection, { optional: true });
358
- _controlValueAccessors = inject(NG_VALUE_ACCESSOR, { optional: true, self: true });
359
- /** The value that is associated with the toggle */
360
- value;
361
- /** The index of the value in the list. Required when used with `trackBy` */
362
- get index() {
363
- return this._index;
364
- }
365
- set index(index) {
366
- this._index = coerceNumberProperty(index);
367
- }
368
- _index;
369
- /** The checked state of the selection toggle */
370
- checked;
371
- /** Toggles the selection */
372
- toggle() {
373
- this._selection.toggleSelection(this.value, this.index);
374
- }
375
- _destroyed = new Subject();
376
- constructor() {
377
- const _selection = this._selection;
378
- this.checked = _selection.change.pipe(switchMap(() => of(this._isSelected())), distinctUntilChanged());
379
- }
380
- ngOnInit() {
381
- this._assertValidParentSelection();
382
- this._configureControlValueAccessor();
383
- }
384
- ngOnDestroy() {
385
- this._destroyed.next();
386
- this._destroyed.complete();
387
- }
388
- _assertValidParentSelection() {
389
- if (!this._selection && (typeof ngDevMode === 'undefined' || ngDevMode)) {
390
- throw Error('CdkSelectAll: missing CdkSelection in the parent');
391
- }
392
- }
393
- _configureControlValueAccessor() {
394
- if (this._controlValueAccessors && this._controlValueAccessors.length) {
395
- this._controlValueAccessors[0].registerOnChange((e) => {
396
- if (typeof e === 'boolean') {
397
- this.toggle();
398
- }
399
- });
400
- this.checked.pipe(takeUntil(this._destroyed)).subscribe(state => {
401
- this._controlValueAccessors[0].writeValue(state);
402
- });
403
- }
404
- }
405
- _isSelected() {
406
- return this._selection.isSelected(this.value, this.index);
407
- }
408
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkSelectionToggle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
409
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: CdkSelectionToggle, isStandalone: true, selector: "[cdkSelectionToggle]", inputs: { value: ["cdkSelectionToggleValue", "value"], index: ["cdkSelectionToggleIndex", "index"] }, exportAs: ["cdkSelectionToggle"], ngImport: i0 });
373
+ _selection = inject(CdkSelection, {
374
+ optional: true
375
+ });
376
+ _controlValueAccessors = inject(NG_VALUE_ACCESSOR, {
377
+ optional: true,
378
+ self: true
379
+ });
380
+ value;
381
+ get index() {
382
+ return this._index;
383
+ }
384
+ set index(index) {
385
+ this._index = coerceNumberProperty(index);
386
+ }
387
+ _index;
388
+ checked;
389
+ toggle() {
390
+ this._selection.toggleSelection(this.value, this.index);
391
+ }
392
+ _destroyed = new Subject();
393
+ constructor() {
394
+ const _selection = this._selection;
395
+ this.checked = _selection.change.pipe(switchMap(() => of(this._isSelected())), distinctUntilChanged());
396
+ }
397
+ ngOnInit() {
398
+ this._assertValidParentSelection();
399
+ this._configureControlValueAccessor();
400
+ }
401
+ ngOnDestroy() {
402
+ this._destroyed.next();
403
+ this._destroyed.complete();
404
+ }
405
+ _assertValidParentSelection() {
406
+ if (!this._selection && (typeof ngDevMode === 'undefined' || ngDevMode)) {
407
+ throw Error('CdkSelectAll: missing CdkSelection in the parent');
408
+ }
409
+ }
410
+ _configureControlValueAccessor() {
411
+ if (this._controlValueAccessors && this._controlValueAccessors.length) {
412
+ this._controlValueAccessors[0].registerOnChange(e => {
413
+ if (typeof e === 'boolean') {
414
+ this.toggle();
415
+ }
416
+ });
417
+ this.checked.pipe(takeUntil(this._destroyed)).subscribe(state => {
418
+ this._controlValueAccessors[0].writeValue(state);
419
+ });
420
+ }
421
+ }
422
+ _isSelected() {
423
+ return this._selection.isSelected(this.value, this.index);
424
+ }
425
+ static ɵfac = i0.ɵɵngDeclareFactory({
426
+ minVersion: "12.0.0",
427
+ version: "20.2.0-next.2",
428
+ ngImport: i0,
429
+ type: CdkSelectionToggle,
430
+ deps: [],
431
+ target: i0.ɵɵFactoryTarget.Directive
432
+ });
433
+ static ɵdir = i0.ɵɵngDeclareDirective({
434
+ minVersion: "14.0.0",
435
+ version: "20.2.0-next.2",
436
+ type: CdkSelectionToggle,
437
+ isStandalone: true,
438
+ selector: "[cdkSelectionToggle]",
439
+ inputs: {
440
+ value: ["cdkSelectionToggleValue", "value"],
441
+ index: ["cdkSelectionToggleIndex", "index"]
442
+ },
443
+ exportAs: ["cdkSelectionToggle"],
444
+ ngImport: i0
445
+ });
410
446
  }
411
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkSelectionToggle, decorators: [{
412
- type: Directive,
413
- args: [{
414
- selector: '[cdkSelectionToggle]',
415
- exportAs: 'cdkSelectionToggle',
416
- }]
417
- }], ctorParameters: () => [], propDecorators: { value: [{
418
- type: Input,
419
- args: ['cdkSelectionToggleValue']
420
- }], index: [{
421
- type: Input,
422
- args: ['cdkSelectionToggleIndex']
423
- }] } });
447
+ i0.ɵɵngDeclareClassMetadata({
448
+ minVersion: "12.0.0",
449
+ version: "20.2.0-next.2",
450
+ ngImport: i0,
451
+ type: CdkSelectionToggle,
452
+ decorators: [{
453
+ type: Directive,
454
+ args: [{
455
+ selector: '[cdkSelectionToggle]',
456
+ exportAs: 'cdkSelectionToggle'
457
+ }]
458
+ }],
459
+ ctorParameters: () => [],
460
+ propDecorators: {
461
+ value: [{
462
+ type: Input,
463
+ args: ['cdkSelectionToggleValue']
464
+ }],
465
+ index: [{
466
+ type: Input,
467
+ args: ['cdkSelectionToggleIndex']
468
+ }]
469
+ }
470
+ });
424
471
 
425
- /**
426
- * Column that adds row selecting checkboxes and a select-all checkbox if `cdkSelectionMultiple` is
427
- * `true`.
428
- *
429
- * Must be used within a parent `CdkSelection` directive.
430
- */
431
472
  class CdkSelectionColumn {
432
- _table = inject(CdkTable, { optional: true });
433
- selection = inject(CdkSelection, { optional: true });
434
- /** Column name that should be used to reference this column. */
435
- get name() {
436
- return this._name;
437
- }
438
- set name(name) {
439
- this._name = name;
440
- this._syncColumnDefName();
441
- }
442
- _name;
443
- _columnDef;
444
- _cell;
445
- _headerCell;
446
- ngOnInit() {
447
- if (!this.selection && (typeof ngDevMode === 'undefined' || ngDevMode)) {
448
- throw Error('CdkSelectionColumn: missing CdkSelection in the parent');
449
- }
450
- this._syncColumnDefName();
451
- if (this._table) {
452
- this._columnDef.cell = this._cell;
453
- this._columnDef.headerCell = this._headerCell;
454
- this._table.addColumnDef(this._columnDef);
455
- }
456
- else if (typeof ngDevMode === 'undefined' || ngDevMode) {
457
- throw Error('CdkSelectionColumn: missing parent table');
458
- }
459
- }
460
- ngOnDestroy() {
461
- if (this._table) {
462
- this._table.removeColumnDef(this._columnDef);
463
- }
464
- }
465
- _syncColumnDefName() {
466
- if (this._columnDef) {
467
- this._columnDef.name = this._name;
468
- }
469
- }
470
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkSelectionColumn, deps: [], target: i0.ɵɵFactoryTarget.Component });
471
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.0-next.2", type: CdkSelectionColumn, isStandalone: true, selector: "cdk-selection-column", inputs: { name: ["cdkSelectionColumnName", "name"] }, viewQueries: [{ propertyName: "_columnDef", first: true, predicate: CdkColumnDef, descendants: true, static: true }, { propertyName: "_cell", first: true, predicate: CdkCellDef, descendants: true, static: true }, { propertyName: "_headerCell", first: true, predicate: CdkHeaderCellDef, descendants: true, static: true }], ngImport: i0, template: `
473
+ _table = inject(CdkTable, {
474
+ optional: true
475
+ });
476
+ selection = inject(CdkSelection, {
477
+ optional: true
478
+ });
479
+ get name() {
480
+ return this._name;
481
+ }
482
+ set name(name) {
483
+ this._name = name;
484
+ this._syncColumnDefName();
485
+ }
486
+ _name;
487
+ _columnDef;
488
+ _cell;
489
+ _headerCell;
490
+ ngOnInit() {
491
+ if (!this.selection && (typeof ngDevMode === 'undefined' || ngDevMode)) {
492
+ throw Error('CdkSelectionColumn: missing CdkSelection in the parent');
493
+ }
494
+ this._syncColumnDefName();
495
+ if (this._table) {
496
+ this._columnDef.cell = this._cell;
497
+ this._columnDef.headerCell = this._headerCell;
498
+ this._table.addColumnDef(this._columnDef);
499
+ } else if (typeof ngDevMode === 'undefined' || ngDevMode) {
500
+ throw Error('CdkSelectionColumn: missing parent table');
501
+ }
502
+ }
503
+ ngOnDestroy() {
504
+ if (this._table) {
505
+ this._table.removeColumnDef(this._columnDef);
506
+ }
507
+ }
508
+ _syncColumnDefName() {
509
+ if (this._columnDef) {
510
+ this._columnDef.name = this._name;
511
+ }
512
+ }
513
+ static ɵfac = i0.ɵɵngDeclareFactory({
514
+ minVersion: "12.0.0",
515
+ version: "20.2.0-next.2",
516
+ ngImport: i0,
517
+ type: CdkSelectionColumn,
518
+ deps: [],
519
+ target: i0.ɵɵFactoryTarget.Component
520
+ });
521
+ static ɵcmp = i0.ɵɵngDeclareComponent({
522
+ minVersion: "17.0.0",
523
+ version: "20.2.0-next.2",
524
+ type: CdkSelectionColumn,
525
+ isStandalone: true,
526
+ selector: "cdk-selection-column",
527
+ inputs: {
528
+ name: ["cdkSelectionColumnName", "name"]
529
+ },
530
+ viewQueries: [{
531
+ propertyName: "_columnDef",
532
+ first: true,
533
+ predicate: CdkColumnDef,
534
+ descendants: true,
535
+ static: true
536
+ }, {
537
+ propertyName: "_cell",
538
+ first: true,
539
+ predicate: CdkCellDef,
540
+ descendants: true,
541
+ static: true
542
+ }, {
543
+ propertyName: "_headerCell",
544
+ first: true,
545
+ predicate: CdkHeaderCellDef,
546
+ descendants: true,
547
+ static: true
548
+ }],
549
+ ngImport: i0,
550
+ template: `
472
551
  <ng-container cdkColumnDef>
473
552
  <th cdkHeaderCell *cdkHeaderCellDef>
474
553
  @if (selection && selection.multiple) {
@@ -490,13 +569,51 @@ class CdkSelectionColumn {
490
569
  [checked]="toggler.checked | async">
491
570
  </td>
492
571
  </ng-container>
493
- `, isInline: true, dependencies: [{ kind: "directive", type: CdkColumnDef, selector: "[cdkColumnDef]", inputs: ["cdkColumnDef", "sticky", "stickyEnd"] }, { kind: "directive", type: CdkHeaderCellDef, selector: "[cdkHeaderCellDef]" }, { kind: "directive", type: CdkSelectAll, selector: "[cdkSelectAll]", exportAs: ["cdkSelectAll"] }, { kind: "directive", type: CdkCellDef, selector: "[cdkCellDef]" }, { kind: "directive", type: CdkSelectionToggle, selector: "[cdkSelectionToggle]", inputs: ["cdkSelectionToggleValue", "cdkSelectionToggleIndex"], exportAs: ["cdkSelectionToggle"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
572
+ `,
573
+ isInline: true,
574
+ dependencies: [{
575
+ kind: "directive",
576
+ type: CdkColumnDef,
577
+ selector: "[cdkColumnDef]",
578
+ inputs: ["cdkColumnDef", "sticky", "stickyEnd"]
579
+ }, {
580
+ kind: "directive",
581
+ type: CdkHeaderCellDef,
582
+ selector: "[cdkHeaderCellDef]"
583
+ }, {
584
+ kind: "directive",
585
+ type: CdkSelectAll,
586
+ selector: "[cdkSelectAll]",
587
+ exportAs: ["cdkSelectAll"]
588
+ }, {
589
+ kind: "directive",
590
+ type: CdkCellDef,
591
+ selector: "[cdkCellDef]"
592
+ }, {
593
+ kind: "directive",
594
+ type: CdkSelectionToggle,
595
+ selector: "[cdkSelectionToggle]",
596
+ inputs: ["cdkSelectionToggleValue", "cdkSelectionToggleIndex"],
597
+ exportAs: ["cdkSelectionToggle"]
598
+ }, {
599
+ kind: "pipe",
600
+ type: AsyncPipe,
601
+ name: "async"
602
+ }],
603
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
604
+ encapsulation: i0.ViewEncapsulation.None
605
+ });
494
606
  }
495
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkSelectionColumn, decorators: [{
496
- type: Component,
497
- args: [{
498
- selector: 'cdk-selection-column',
499
- template: `
607
+ i0.ɵɵngDeclareClassMetadata({
608
+ minVersion: "12.0.0",
609
+ version: "20.2.0-next.2",
610
+ ngImport: i0,
611
+ type: CdkSelectionColumn,
612
+ decorators: [{
613
+ type: Component,
614
+ args: [{
615
+ selector: 'cdk-selection-column',
616
+ template: `
500
617
  <ng-container cdkColumnDef>
501
618
  <th cdkHeaderCell *cdkHeaderCellDef>
502
619
  @if (selection && selection.multiple) {
@@ -519,93 +636,139 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2",
519
636
  </td>
520
637
  </ng-container>
521
638
  `,
522
- changeDetection: ChangeDetectionStrategy.OnPush,
523
- encapsulation: ViewEncapsulation.None,
524
- imports: [
525
- CdkColumnDef,
526
- CdkHeaderCellDef,
527
- CdkSelectAll,
528
- CdkCellDef,
529
- CdkSelectionToggle,
530
- AsyncPipe,
531
- ],
532
- }]
533
- }], propDecorators: { name: [{
534
- type: Input,
535
- args: ['cdkSelectionColumnName']
536
- }], _columnDef: [{
537
- type: ViewChild,
538
- args: [CdkColumnDef, { static: true }]
539
- }], _cell: [{
540
- type: ViewChild,
541
- args: [CdkCellDef, { static: true }]
542
- }], _headerCell: [{
543
- type: ViewChild,
544
- args: [CdkHeaderCellDef, { static: true }]
545
- }] } });
639
+ changeDetection: ChangeDetectionStrategy.OnPush,
640
+ encapsulation: ViewEncapsulation.None,
641
+ imports: [CdkColumnDef, CdkHeaderCellDef, CdkSelectAll, CdkCellDef, CdkSelectionToggle, AsyncPipe]
642
+ }]
643
+ }],
644
+ propDecorators: {
645
+ name: [{
646
+ type: Input,
647
+ args: ['cdkSelectionColumnName']
648
+ }],
649
+ _columnDef: [{
650
+ type: ViewChild,
651
+ args: [CdkColumnDef, {
652
+ static: true
653
+ }]
654
+ }],
655
+ _cell: [{
656
+ type: ViewChild,
657
+ args: [CdkCellDef, {
658
+ static: true
659
+ }]
660
+ }],
661
+ _headerCell: [{
662
+ type: ViewChild,
663
+ args: [CdkHeaderCellDef, {
664
+ static: true
665
+ }]
666
+ }]
667
+ }
668
+ });
546
669
 
547
- /**
548
- * Applies `cdk-selected` class and `aria-selected` to an element.
549
- *
550
- * Must be used within a parent `CdkSelection` directive.
551
- * Must be provided with the value. The index is required if `trackBy` is used on the `CdkSelection`
552
- * directive.
553
- */
554
670
  class CdkRowSelection {
555
- _selection = inject(CdkSelection);
556
- // We need an initializer here to avoid a TS error.
557
- value = undefined;
558
- get index() {
559
- return this._index;
560
- }
561
- set index(index) {
562
- this._index = coerceNumberProperty(index);
563
- }
564
- _index;
565
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkRowSelection, deps: [], target: i0.ɵɵFactoryTarget.Directive });
566
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: CdkRowSelection, isStandalone: true, selector: "[cdkRowSelection]", inputs: { value: ["cdkRowSelectionValue", "value"], index: ["cdkRowSelectionIndex", "index"] }, host: { properties: { "class.cdk-selected": "_selection.isSelected(this.value, this.index)", "attr.aria-selected": "_selection.isSelected(this.value, this.index)" } }, ngImport: i0 });
671
+ _selection = inject(CdkSelection);
672
+ value = undefined;
673
+ get index() {
674
+ return this._index;
675
+ }
676
+ set index(index) {
677
+ this._index = coerceNumberProperty(index);
678
+ }
679
+ _index;
680
+ static ɵfac = i0.ɵɵngDeclareFactory({
681
+ minVersion: "12.0.0",
682
+ version: "20.2.0-next.2",
683
+ ngImport: i0,
684
+ type: CdkRowSelection,
685
+ deps: [],
686
+ target: i0.ɵɵFactoryTarget.Directive
687
+ });
688
+ static ɵdir = i0.ɵɵngDeclareDirective({
689
+ minVersion: "14.0.0",
690
+ version: "20.2.0-next.2",
691
+ type: CdkRowSelection,
692
+ isStandalone: true,
693
+ selector: "[cdkRowSelection]",
694
+ inputs: {
695
+ value: ["cdkRowSelectionValue", "value"],
696
+ index: ["cdkRowSelectionIndex", "index"]
697
+ },
698
+ host: {
699
+ properties: {
700
+ "class.cdk-selected": "_selection.isSelected(this.value, this.index)",
701
+ "attr.aria-selected": "_selection.isSelected(this.value, this.index)"
702
+ }
703
+ },
704
+ ngImport: i0
705
+ });
567
706
  }
568
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkRowSelection, decorators: [{
569
- type: Directive,
570
- args: [{
571
- selector: '[cdkRowSelection]',
572
- host: {
573
- '[class.cdk-selected]': '_selection.isSelected(this.value, this.index)',
574
- '[attr.aria-selected]': '_selection.isSelected(this.value, this.index)',
575
- },
576
- }]
577
- }], propDecorators: { value: [{
578
- type: Input,
579
- args: ['cdkRowSelectionValue']
580
- }], index: [{
581
- type: Input,
582
- args: ['cdkRowSelectionIndex']
583
- }] } });
707
+ i0.ɵɵngDeclareClassMetadata({
708
+ minVersion: "12.0.0",
709
+ version: "20.2.0-next.2",
710
+ ngImport: i0,
711
+ type: CdkRowSelection,
712
+ decorators: [{
713
+ type: Directive,
714
+ args: [{
715
+ selector: '[cdkRowSelection]',
716
+ host: {
717
+ '[class.cdk-selected]': '_selection.isSelected(this.value, this.index)',
718
+ '[attr.aria-selected]': '_selection.isSelected(this.value, this.index)'
719
+ }
720
+ }]
721
+ }],
722
+ propDecorators: {
723
+ value: [{
724
+ type: Input,
725
+ args: ['cdkRowSelectionValue']
726
+ }],
727
+ index: [{
728
+ type: Input,
729
+ args: ['cdkRowSelectionIndex']
730
+ }]
731
+ }
732
+ });
584
733
 
585
734
  class CdkSelectionModule {
586
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkSelectionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
587
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkSelectionModule, imports: [CdkTableModule,
588
- CdkSelection,
589
- CdkSelectionToggle,
590
- CdkSelectAll,
591
- CdkSelectionColumn,
592
- CdkRowSelection], exports: [CdkSelection, CdkSelectionToggle, CdkSelectAll, CdkSelectionColumn, CdkRowSelection] });
593
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkSelectionModule, imports: [CdkTableModule] });
735
+ static ɵfac = i0.ɵɵngDeclareFactory({
736
+ minVersion: "12.0.0",
737
+ version: "20.2.0-next.2",
738
+ ngImport: i0,
739
+ type: CdkSelectionModule,
740
+ deps: [],
741
+ target: i0.ɵɵFactoryTarget.NgModule
742
+ });
743
+ static ɵmod = i0.ɵɵngDeclareNgModule({
744
+ minVersion: "14.0.0",
745
+ version: "20.2.0-next.2",
746
+ ngImport: i0,
747
+ type: CdkSelectionModule,
748
+ imports: [CdkTableModule, CdkSelection, CdkSelectionToggle, CdkSelectAll, CdkSelectionColumn, CdkRowSelection],
749
+ exports: [CdkSelection, CdkSelectionToggle, CdkSelectAll, CdkSelectionColumn, CdkRowSelection]
750
+ });
751
+ static ɵinj = i0.ɵɵngDeclareInjector({
752
+ minVersion: "12.0.0",
753
+ version: "20.2.0-next.2",
754
+ ngImport: i0,
755
+ type: CdkSelectionModule,
756
+ imports: [CdkTableModule]
757
+ });
594
758
  }
595
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: CdkSelectionModule, decorators: [{
596
- type: NgModule,
597
- args: [{
598
- imports: [
599
- CdkTableModule,
600
- CdkSelection,
601
- CdkSelectionToggle,
602
- CdkSelectAll,
603
- CdkSelectionColumn,
604
- CdkRowSelection,
605
- ],
606
- exports: [CdkSelection, CdkSelectionToggle, CdkSelectAll, CdkSelectionColumn, CdkRowSelection],
607
- }]
608
- }] });
759
+ i0.ɵɵngDeclareClassMetadata({
760
+ minVersion: "12.0.0",
761
+ version: "20.2.0-next.2",
762
+ ngImport: i0,
763
+ type: CdkSelectionModule,
764
+ decorators: [{
765
+ type: NgModule,
766
+ args: [{
767
+ imports: [CdkTableModule, CdkSelection, CdkSelectionToggle, CdkSelectAll, CdkSelectionColumn, CdkRowSelection],
768
+ exports: [CdkSelection, CdkSelectionToggle, CdkSelectAll, CdkSelectionColumn, CdkRowSelection]
769
+ }]
770
+ }]
771
+ });
609
772
 
610
773
  export { CdkRowSelection, CdkSelectAll, CdkSelection, CdkSelectionColumn, CdkSelectionModule, CdkSelectionToggle, SelectionSet };
611
774
  //# sourceMappingURL=selection.mjs.map