@angular/cdk-experimental 21.0.0-next.8 → 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.
- package/fesm2022/_polyfill-chunk.mjs +8 -9
- package/fesm2022/_polyfill-chunk.mjs.map +1 -1
- package/fesm2022/cdk-experimental.mjs +1 -2
- package/fesm2022/cdk-experimental.mjs.map +1 -1
- package/fesm2022/column-resize.mjs +1115 -954
- package/fesm2022/column-resize.mjs.map +1 -1
- package/fesm2022/popover-edit.mjs +1125 -1061
- package/fesm2022/popover-edit.mjs.map +1 -1
- package/fesm2022/scrolling.mjs +292 -409
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/selection.mjs +698 -535
- package/fesm2022/selection.mjs.map +1 -1
- package/fesm2022/table-scroll-container.mjs +163 -113
- package/fesm2022/table-scroll-container.mjs.map +1 -1
- package/package.json +2 -2
package/fesm2022/selection.mjs
CHANGED
|
@@ -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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
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({
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
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
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
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({
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
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
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
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({
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
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
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
_name;
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
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
|
-
`,
|
|
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({
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
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
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
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
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
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({
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
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
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
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({
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
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
|