@angular/material-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/column-resize.mjs +521 -257
- package/fesm2022/column-resize.mjs.map +1 -1
- package/fesm2022/material-experimental.mjs +1 -2
- package/fesm2022/material-experimental.mjs.map +1 -1
- package/fesm2022/menubar.mjs +182 -60
- package/fesm2022/menubar.mjs.map +1 -1
- package/fesm2022/popover-edit.mjs +351 -178
- package/fesm2022/popover-edit.mjs.map +1 -1
- package/fesm2022/selection.mjs +418 -201
- package/fesm2022/selection.mjs.map +1 -1
- package/package.json +4 -4
package/fesm2022/selection.mjs
CHANGED
|
@@ -6,140 +6,249 @@ import { MatTable, MatColumnDef, MatCellDef, MatHeaderCellDef, MatHeaderCell, Ma
|
|
|
6
6
|
import { AsyncPipe } from '@angular/common';
|
|
7
7
|
import { MatCheckbox, MatCheckboxModule } from '@angular/material/checkbox';
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
* Manages the selection states of the items and provides methods to check and update the selection
|
|
11
|
-
* states.
|
|
12
|
-
* It must be applied to the parent element if `matSelectionToggle`, `matSelectAll`,
|
|
13
|
-
* `matRowSelection` and `matSelectionColumn` are applied.
|
|
14
|
-
*/
|
|
15
|
-
// tslint:disable-next-line: coercion-types
|
|
16
9
|
class MatSelection extends CdkSelection {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
10
|
+
get multiple() {
|
|
11
|
+
return this._multiple;
|
|
12
|
+
}
|
|
13
|
+
set multiple(multiple) {
|
|
14
|
+
this._multiple = coerceBooleanProperty(multiple);
|
|
15
|
+
}
|
|
16
|
+
change = new EventEmitter();
|
|
17
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
18
|
+
minVersion: "12.0.0",
|
|
19
|
+
version: "20.2.0-next.2",
|
|
20
|
+
ngImport: i0,
|
|
21
|
+
type: MatSelection,
|
|
22
|
+
deps: null,
|
|
23
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
24
|
+
});
|
|
25
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
26
|
+
minVersion: "14.0.0",
|
|
27
|
+
version: "20.2.0-next.2",
|
|
28
|
+
type: MatSelection,
|
|
29
|
+
isStandalone: true,
|
|
30
|
+
selector: "[matSelection]",
|
|
31
|
+
inputs: {
|
|
32
|
+
multiple: ["matSelectionMultiple", "multiple"]
|
|
33
|
+
},
|
|
34
|
+
outputs: {
|
|
35
|
+
change: "matSelectionChange"
|
|
36
|
+
},
|
|
37
|
+
providers: [{
|
|
38
|
+
provide: CdkSelection,
|
|
39
|
+
useExisting: MatSelection
|
|
40
|
+
}],
|
|
41
|
+
exportAs: ["matSelection"],
|
|
42
|
+
usesInheritance: true,
|
|
43
|
+
ngImport: i0
|
|
44
|
+
});
|
|
28
45
|
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
47
|
+
minVersion: "12.0.0",
|
|
48
|
+
version: "20.2.0-next.2",
|
|
49
|
+
ngImport: i0,
|
|
50
|
+
type: MatSelection,
|
|
51
|
+
decorators: [{
|
|
52
|
+
type: Directive,
|
|
53
|
+
args: [{
|
|
54
|
+
selector: '[matSelection]',
|
|
55
|
+
exportAs: 'matSelection',
|
|
56
|
+
providers: [{
|
|
57
|
+
provide: CdkSelection,
|
|
58
|
+
useExisting: MatSelection
|
|
59
|
+
}]
|
|
60
|
+
}]
|
|
61
|
+
}],
|
|
62
|
+
propDecorators: {
|
|
63
|
+
multiple: [{
|
|
64
|
+
type: Input,
|
|
65
|
+
args: ['matSelectionMultiple']
|
|
66
|
+
}],
|
|
67
|
+
change: [{
|
|
68
|
+
type: Output,
|
|
69
|
+
args: ['matSelectionChange']
|
|
70
|
+
}]
|
|
71
|
+
}
|
|
72
|
+
});
|
|
43
73
|
|
|
44
|
-
/**
|
|
45
|
-
* Makes the element a select-all toggle.
|
|
46
|
-
*
|
|
47
|
-
* Must be used within a parent `MatSelection` directive. It toggles the selection states
|
|
48
|
-
* of all the selection toggles connected with the `MatSelection` directive.
|
|
49
|
-
* If the element implements `ControlValueAccessor`, e.g. `MatCheckbox`, the directive
|
|
50
|
-
* automatically connects it with the select-all state provided by the `MatSelection` directive. If
|
|
51
|
-
* not, use `checked` to get the checked state, `indeterminate` to get the indeterminate state,
|
|
52
|
-
* and `toggle()` to change the selection state.
|
|
53
|
-
*/
|
|
54
74
|
class MatSelectAll extends CdkSelectAll {
|
|
55
|
-
|
|
56
|
-
|
|
75
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
76
|
+
minVersion: "12.0.0",
|
|
77
|
+
version: "20.2.0-next.2",
|
|
78
|
+
ngImport: i0,
|
|
79
|
+
type: MatSelectAll,
|
|
80
|
+
deps: null,
|
|
81
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
82
|
+
});
|
|
83
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
84
|
+
minVersion: "14.0.0",
|
|
85
|
+
version: "20.2.0-next.2",
|
|
86
|
+
type: MatSelectAll,
|
|
87
|
+
isStandalone: true,
|
|
88
|
+
selector: "[matSelectAll]",
|
|
89
|
+
providers: [{
|
|
90
|
+
provide: CdkSelectAll,
|
|
91
|
+
useExisting: MatSelectAll
|
|
92
|
+
}],
|
|
93
|
+
exportAs: ["matSelectAll"],
|
|
94
|
+
usesInheritance: true,
|
|
95
|
+
ngImport: i0
|
|
96
|
+
});
|
|
57
97
|
}
|
|
58
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
99
|
+
minVersion: "12.0.0",
|
|
100
|
+
version: "20.2.0-next.2",
|
|
101
|
+
ngImport: i0,
|
|
102
|
+
type: MatSelectAll,
|
|
103
|
+
decorators: [{
|
|
104
|
+
type: Directive,
|
|
105
|
+
args: [{
|
|
106
|
+
selector: '[matSelectAll]',
|
|
107
|
+
exportAs: 'matSelectAll',
|
|
108
|
+
providers: [{
|
|
109
|
+
provide: CdkSelectAll,
|
|
110
|
+
useExisting: MatSelectAll
|
|
111
|
+
}]
|
|
112
|
+
}]
|
|
113
|
+
}]
|
|
114
|
+
});
|
|
66
115
|
|
|
67
|
-
/**
|
|
68
|
-
* Makes the element a selection toggle.
|
|
69
|
-
*
|
|
70
|
-
* Must be used within a parent `MatSelection` directive.
|
|
71
|
-
* Must be provided with the value. If `trackBy` is used on `MatSelection`, the index of the value
|
|
72
|
-
* is required. If the element implements `ControlValueAccessor`, e.g. `MatCheckbox`, the directive
|
|
73
|
-
* automatically connects it with the selection state provided by the `MatSelection` directive. If
|
|
74
|
-
* not, use `checked$` to get the checked state of the value, and `toggle()` to change the selection
|
|
75
|
-
* state.
|
|
76
|
-
*/
|
|
77
116
|
class MatSelectionToggle extends CdkSelectionToggle {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
117
|
+
value = undefined;
|
|
118
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
119
|
+
minVersion: "12.0.0",
|
|
120
|
+
version: "20.2.0-next.2",
|
|
121
|
+
ngImport: i0,
|
|
122
|
+
type: MatSelectionToggle,
|
|
123
|
+
deps: null,
|
|
124
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
125
|
+
});
|
|
126
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
127
|
+
minVersion: "14.0.0",
|
|
128
|
+
version: "20.2.0-next.2",
|
|
129
|
+
type: MatSelectionToggle,
|
|
130
|
+
isStandalone: true,
|
|
131
|
+
selector: "[matSelectionToggle]",
|
|
132
|
+
inputs: {
|
|
133
|
+
index: ["matSelectionToggleIndex", "index"],
|
|
134
|
+
value: ["matSelectionToggleValue", "value"]
|
|
135
|
+
},
|
|
136
|
+
providers: [{
|
|
137
|
+
provide: CdkSelectionToggle,
|
|
138
|
+
useExisting: MatSelectionToggle
|
|
139
|
+
}],
|
|
140
|
+
exportAs: ["matSelectionToggle"],
|
|
141
|
+
usesInheritance: true,
|
|
142
|
+
ngImport: i0
|
|
143
|
+
});
|
|
82
144
|
}
|
|
83
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
145
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
146
|
+
minVersion: "12.0.0",
|
|
147
|
+
version: "20.2.0-next.2",
|
|
148
|
+
ngImport: i0,
|
|
149
|
+
type: MatSelectionToggle,
|
|
150
|
+
decorators: [{
|
|
151
|
+
type: Directive,
|
|
152
|
+
args: [{
|
|
153
|
+
selector: '[matSelectionToggle]',
|
|
154
|
+
exportAs: 'matSelectionToggle',
|
|
155
|
+
inputs: [{
|
|
156
|
+
name: 'index',
|
|
157
|
+
alias: 'matSelectionToggleIndex'
|
|
158
|
+
}],
|
|
159
|
+
providers: [{
|
|
160
|
+
provide: CdkSelectionToggle,
|
|
161
|
+
useExisting: MatSelectionToggle
|
|
162
|
+
}]
|
|
163
|
+
}]
|
|
164
|
+
}],
|
|
165
|
+
propDecorators: {
|
|
166
|
+
value: [{
|
|
167
|
+
type: Input,
|
|
168
|
+
args: ['matSelectionToggleValue']
|
|
169
|
+
}]
|
|
170
|
+
}
|
|
171
|
+
});
|
|
95
172
|
|
|
96
|
-
/**
|
|
97
|
-
* Column that adds row selecting checkboxes and a select-all checkbox if `matSelectionMultiple` is
|
|
98
|
-
* `true`.
|
|
99
|
-
*
|
|
100
|
-
* Must be used within a parent `MatSelection` directive.
|
|
101
|
-
*/
|
|
102
173
|
class MatSelectionColumn {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
174
|
+
_table = inject(MatTable, {
|
|
175
|
+
optional: true
|
|
176
|
+
});
|
|
177
|
+
selection = inject(MatSelection, {
|
|
178
|
+
optional: true
|
|
179
|
+
});
|
|
180
|
+
get name() {
|
|
181
|
+
return this._name;
|
|
182
|
+
}
|
|
183
|
+
set name(name) {
|
|
184
|
+
this._name = name;
|
|
185
|
+
this._syncColumnDefName();
|
|
186
|
+
}
|
|
187
|
+
_name;
|
|
188
|
+
_columnDef;
|
|
189
|
+
_cell;
|
|
190
|
+
_headerCell;
|
|
191
|
+
ngOnInit() {
|
|
192
|
+
if (!this.selection && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
193
|
+
throw Error('MatSelectionColumn: missing MatSelection in the parent');
|
|
108
194
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
_headerCell;
|
|
117
|
-
ngOnInit() {
|
|
118
|
-
if (!this.selection && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
119
|
-
throw Error('MatSelectionColumn: missing MatSelection in the parent');
|
|
120
|
-
}
|
|
121
|
-
this._syncColumnDefName();
|
|
122
|
-
if (this._table) {
|
|
123
|
-
this._columnDef.cell = this._cell;
|
|
124
|
-
this._columnDef.headerCell = this._headerCell;
|
|
125
|
-
this._table.addColumnDef(this._columnDef);
|
|
126
|
-
}
|
|
127
|
-
else if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
128
|
-
throw Error('MatSelectionColumn: missing parent table');
|
|
129
|
-
}
|
|
195
|
+
this._syncColumnDefName();
|
|
196
|
+
if (this._table) {
|
|
197
|
+
this._columnDef.cell = this._cell;
|
|
198
|
+
this._columnDef.headerCell = this._headerCell;
|
|
199
|
+
this._table.addColumnDef(this._columnDef);
|
|
200
|
+
} else if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
201
|
+
throw Error('MatSelectionColumn: missing parent table');
|
|
130
202
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
203
|
+
}
|
|
204
|
+
ngOnDestroy() {
|
|
205
|
+
if (this._table) {
|
|
206
|
+
this._table.removeColumnDef(this._columnDef);
|
|
135
207
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
208
|
+
}
|
|
209
|
+
_syncColumnDefName() {
|
|
210
|
+
if (this._columnDef) {
|
|
211
|
+
this._columnDef.name = this._name;
|
|
140
212
|
}
|
|
141
|
-
|
|
142
|
-
|
|
213
|
+
}
|
|
214
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
215
|
+
minVersion: "12.0.0",
|
|
216
|
+
version: "20.2.0-next.2",
|
|
217
|
+
ngImport: i0,
|
|
218
|
+
type: MatSelectionColumn,
|
|
219
|
+
deps: [],
|
|
220
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
221
|
+
});
|
|
222
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
223
|
+
minVersion: "17.0.0",
|
|
224
|
+
version: "20.2.0-next.2",
|
|
225
|
+
type: MatSelectionColumn,
|
|
226
|
+
isStandalone: true,
|
|
227
|
+
selector: "mat-selection-column",
|
|
228
|
+
inputs: {
|
|
229
|
+
name: "name"
|
|
230
|
+
},
|
|
231
|
+
viewQueries: [{
|
|
232
|
+
propertyName: "_columnDef",
|
|
233
|
+
first: true,
|
|
234
|
+
predicate: MatColumnDef,
|
|
235
|
+
descendants: true,
|
|
236
|
+
static: true
|
|
237
|
+
}, {
|
|
238
|
+
propertyName: "_cell",
|
|
239
|
+
first: true,
|
|
240
|
+
predicate: MatCellDef,
|
|
241
|
+
descendants: true,
|
|
242
|
+
static: true
|
|
243
|
+
}, {
|
|
244
|
+
propertyName: "_headerCell",
|
|
245
|
+
first: true,
|
|
246
|
+
predicate: MatHeaderCellDef,
|
|
247
|
+
descendants: true,
|
|
248
|
+
static: true
|
|
249
|
+
}],
|
|
250
|
+
ngImport: i0,
|
|
251
|
+
template: `
|
|
143
252
|
<ng-container matColumnDef>
|
|
144
253
|
<th mat-header-cell *matHeaderCellDef class="mat-selection-column-header">
|
|
145
254
|
@if (selection && selection.multiple) {
|
|
@@ -156,11 +265,67 @@ class MatSelectionColumn {
|
|
|
156
265
|
[matSelectionToggleIndex]="i"></mat-checkbox>
|
|
157
266
|
</td>
|
|
158
267
|
</ng-container>
|
|
159
|
-
`,
|
|
268
|
+
`,
|
|
269
|
+
isInline: true,
|
|
270
|
+
styles: ["th.mat-selection-column-header,td.mat-selection-column-cell{text-align:center;width:48px}\n"],
|
|
271
|
+
dependencies: [{
|
|
272
|
+
kind: "directive",
|
|
273
|
+
type: MatColumnDef,
|
|
274
|
+
selector: "[matColumnDef]",
|
|
275
|
+
inputs: ["matColumnDef"]
|
|
276
|
+
}, {
|
|
277
|
+
kind: "directive",
|
|
278
|
+
type: MatHeaderCellDef,
|
|
279
|
+
selector: "[matHeaderCellDef]"
|
|
280
|
+
}, {
|
|
281
|
+
kind: "directive",
|
|
282
|
+
type: MatHeaderCell,
|
|
283
|
+
selector: "mat-header-cell, th[mat-header-cell]"
|
|
284
|
+
}, {
|
|
285
|
+
kind: "component",
|
|
286
|
+
type: MatCheckbox,
|
|
287
|
+
selector: "mat-checkbox",
|
|
288
|
+
inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"],
|
|
289
|
+
outputs: ["change", "indeterminateChange"],
|
|
290
|
+
exportAs: ["matCheckbox"]
|
|
291
|
+
}, {
|
|
292
|
+
kind: "directive",
|
|
293
|
+
type: MatSelectAll,
|
|
294
|
+
selector: "[matSelectAll]",
|
|
295
|
+
exportAs: ["matSelectAll"]
|
|
296
|
+
}, {
|
|
297
|
+
kind: "directive",
|
|
298
|
+
type: MatCellDef,
|
|
299
|
+
selector: "[matCellDef]"
|
|
300
|
+
}, {
|
|
301
|
+
kind: "directive",
|
|
302
|
+
type: MatCell,
|
|
303
|
+
selector: "mat-cell, td[mat-cell]"
|
|
304
|
+
}, {
|
|
305
|
+
kind: "directive",
|
|
306
|
+
type: MatSelectionToggle,
|
|
307
|
+
selector: "[matSelectionToggle]",
|
|
308
|
+
inputs: ["matSelectionToggleIndex", "matSelectionToggleValue"],
|
|
309
|
+
exportAs: ["matSelectionToggle"]
|
|
310
|
+
}, {
|
|
311
|
+
kind: "pipe",
|
|
312
|
+
type: AsyncPipe,
|
|
313
|
+
name: "async"
|
|
314
|
+
}],
|
|
315
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
316
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
317
|
+
});
|
|
160
318
|
}
|
|
161
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
162
|
-
|
|
163
|
-
|
|
319
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
320
|
+
minVersion: "12.0.0",
|
|
321
|
+
version: "20.2.0-next.2",
|
|
322
|
+
ngImport: i0,
|
|
323
|
+
type: MatSelectionColumn,
|
|
324
|
+
decorators: [{
|
|
325
|
+
type: Component,
|
|
326
|
+
args: [{
|
|
327
|
+
selector: 'mat-selection-column',
|
|
328
|
+
template: `
|
|
164
329
|
<ng-container matColumnDef>
|
|
165
330
|
<th mat-header-cell *matHeaderCellDef class="mat-selection-column-header">
|
|
166
331
|
@if (selection && selection.multiple) {
|
|
@@ -177,89 +342,141 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2",
|
|
|
177
342
|
[matSelectionToggleIndex]="i"></mat-checkbox>
|
|
178
343
|
</td>
|
|
179
344
|
</ng-container>
|
|
180
|
-
`,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
345
|
+
`,
|
|
346
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
347
|
+
encapsulation: ViewEncapsulation.None,
|
|
348
|
+
imports: [MatColumnDef, MatHeaderCellDef, MatHeaderCell, MatCheckbox, MatSelectAll, MatCellDef, MatCell, MatSelectionToggle, AsyncPipe],
|
|
349
|
+
styles: ["th.mat-selection-column-header,td.mat-selection-column-cell{text-align:center;width:48px}\n"]
|
|
350
|
+
}]
|
|
351
|
+
}],
|
|
352
|
+
propDecorators: {
|
|
353
|
+
name: [{
|
|
354
|
+
type: Input
|
|
355
|
+
}],
|
|
356
|
+
_columnDef: [{
|
|
357
|
+
type: ViewChild,
|
|
358
|
+
args: [MatColumnDef, {
|
|
359
|
+
static: true
|
|
360
|
+
}]
|
|
361
|
+
}],
|
|
362
|
+
_cell: [{
|
|
363
|
+
type: ViewChild,
|
|
364
|
+
args: [MatCellDef, {
|
|
365
|
+
static: true
|
|
366
|
+
}]
|
|
367
|
+
}],
|
|
368
|
+
_headerCell: [{
|
|
369
|
+
type: ViewChild,
|
|
370
|
+
args: [MatHeaderCellDef, {
|
|
371
|
+
static: true
|
|
372
|
+
}]
|
|
373
|
+
}]
|
|
374
|
+
}
|
|
375
|
+
});
|
|
203
376
|
|
|
204
|
-
/**
|
|
205
|
-
* Applies `mat-selected` class and `aria-selected` to an element.
|
|
206
|
-
*
|
|
207
|
-
* Must be used within a parent `MatSelection` directive.
|
|
208
|
-
* Must be provided with the value. The index is required if `trackBy` is used on the `CdkSelection`
|
|
209
|
-
* directive.
|
|
210
|
-
*/
|
|
211
377
|
class MatRowSelection extends CdkRowSelection {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
378
|
+
value = undefined;
|
|
379
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
380
|
+
minVersion: "12.0.0",
|
|
381
|
+
version: "20.2.0-next.2",
|
|
382
|
+
ngImport: i0,
|
|
383
|
+
type: MatRowSelection,
|
|
384
|
+
deps: null,
|
|
385
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
386
|
+
});
|
|
387
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
388
|
+
minVersion: "14.0.0",
|
|
389
|
+
version: "20.2.0-next.2",
|
|
390
|
+
type: MatRowSelection,
|
|
391
|
+
isStandalone: true,
|
|
392
|
+
selector: "[matRowSelection]",
|
|
393
|
+
inputs: {
|
|
394
|
+
index: ["matRowSelectionIndex", "index"],
|
|
395
|
+
value: ["matRowSelectionValue", "value"]
|
|
396
|
+
},
|
|
397
|
+
host: {
|
|
398
|
+
properties: {
|
|
399
|
+
"class.mat-selected": "_selection.isSelected(this.value, this.index)",
|
|
400
|
+
"attr.aria-selected": "_selection.isSelected(this.value, this.index)"
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
providers: [{
|
|
404
|
+
provide: CdkRowSelection,
|
|
405
|
+
useExisting: MatRowSelection
|
|
406
|
+
}],
|
|
407
|
+
usesInheritance: true,
|
|
408
|
+
ngImport: i0
|
|
409
|
+
});
|
|
216
410
|
}
|
|
217
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
411
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
412
|
+
minVersion: "12.0.0",
|
|
413
|
+
version: "20.2.0-next.2",
|
|
414
|
+
ngImport: i0,
|
|
415
|
+
type: MatRowSelection,
|
|
416
|
+
decorators: [{
|
|
417
|
+
type: Directive,
|
|
418
|
+
args: [{
|
|
419
|
+
selector: '[matRowSelection]',
|
|
420
|
+
host: {
|
|
421
|
+
'[class.mat-selected]': '_selection.isSelected(this.value, this.index)',
|
|
422
|
+
'[attr.aria-selected]': '_selection.isSelected(this.value, this.index)'
|
|
423
|
+
},
|
|
424
|
+
providers: [{
|
|
425
|
+
provide: CdkRowSelection,
|
|
426
|
+
useExisting: MatRowSelection
|
|
427
|
+
}],
|
|
428
|
+
inputs: [{
|
|
429
|
+
name: 'index',
|
|
430
|
+
alias: 'matRowSelectionIndex'
|
|
431
|
+
}]
|
|
432
|
+
}]
|
|
433
|
+
}],
|
|
434
|
+
propDecorators: {
|
|
435
|
+
value: [{
|
|
436
|
+
type: Input,
|
|
437
|
+
args: ['matRowSelectionValue']
|
|
438
|
+
}]
|
|
439
|
+
}
|
|
440
|
+
});
|
|
232
441
|
|
|
233
|
-
// TODO(yifange): Move the table-specific code to a separate module from the other selection
|
|
234
|
-
// behaviors once we move it out of experimental.
|
|
235
442
|
class MatSelectionModule {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
443
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
444
|
+
minVersion: "12.0.0",
|
|
445
|
+
version: "20.2.0-next.2",
|
|
446
|
+
ngImport: i0,
|
|
447
|
+
type: MatSelectionModule,
|
|
448
|
+
deps: [],
|
|
449
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
450
|
+
});
|
|
451
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
452
|
+
minVersion: "14.0.0",
|
|
453
|
+
version: "20.2.0-next.2",
|
|
454
|
+
ngImport: i0,
|
|
455
|
+
type: MatSelectionModule,
|
|
456
|
+
imports: [MatTableModule, MatCheckboxModule, MatSelectAll, MatSelection, MatSelectionToggle, MatSelectionColumn, MatRowSelection],
|
|
457
|
+
exports: [MatSelectAll, MatSelection, MatSelectionToggle, MatSelectionColumn, MatRowSelection]
|
|
458
|
+
});
|
|
459
|
+
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
460
|
+
minVersion: "12.0.0",
|
|
461
|
+
version: "20.2.0-next.2",
|
|
462
|
+
ngImport: i0,
|
|
463
|
+
type: MatSelectionModule,
|
|
464
|
+
imports: [MatTableModule, MatCheckboxModule, MatSelectionColumn]
|
|
465
|
+
});
|
|
247
466
|
}
|
|
248
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
}]
|
|
262
|
-
}] });
|
|
467
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
468
|
+
minVersion: "12.0.0",
|
|
469
|
+
version: "20.2.0-next.2",
|
|
470
|
+
ngImport: i0,
|
|
471
|
+
type: MatSelectionModule,
|
|
472
|
+
decorators: [{
|
|
473
|
+
type: NgModule,
|
|
474
|
+
args: [{
|
|
475
|
+
imports: [MatTableModule, MatCheckboxModule, MatSelectAll, MatSelection, MatSelectionToggle, MatSelectionColumn, MatRowSelection],
|
|
476
|
+
exports: [MatSelectAll, MatSelection, MatSelectionToggle, MatSelectionColumn, MatRowSelection]
|
|
477
|
+
}]
|
|
478
|
+
}]
|
|
479
|
+
});
|
|
263
480
|
|
|
264
481
|
export { MatRowSelection, MatSelectAll, MatSelection, MatSelectionColumn, MatSelectionModule, MatSelectionToggle };
|
|
265
482
|
//# sourceMappingURL=selection.mjs.map
|