datatables.net-select 3.1.3 → 4.0.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/js/dataTables.select.js +1454 -1755
- package/js/dataTables.select.min.js +3 -3
- package/js/dataTables.select.min.mjs +3 -3
- package/js/dataTables.select.mjs +1437 -1737
- package/package.json +3 -15
- package/types/types.d.ts +371 -370
package/types/types.d.ts
CHANGED
|
@@ -1,382 +1,383 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// Project: https://datatables.net/extensions/select/, https://datatables.net
|
|
4
|
-
// Definitions by:
|
|
5
|
-
// SpryMedia
|
|
6
|
-
// Jared Szechy <https://github.com/szechyjs>
|
|
7
|
-
|
|
8
|
-
/// <reference types="jquery" />
|
|
9
|
-
|
|
10
|
-
import DataTables, {ObjectColumnRender} from 'datatables.net';
|
|
11
|
-
|
|
12
|
-
export default DataTables;
|
|
1
|
+
import DataTables, { CellIdx } from 'datatables.net';
|
|
2
|
+
export { default } from 'datatables.net';
|
|
13
3
|
|
|
14
4
|
type StyleType = 'api' | 'single' | 'multi' | 'os' | 'multi+shift';
|
|
15
|
-
|
|
5
|
+
type Selectable = (data: any, tr: HTMLElement, idx: number) => boolean;
|
|
6
|
+
type HeaderCheckbox = boolean | 'none' | 'select-all' | 'select-page';
|
|
16
7
|
declare module 'datatables.net' {
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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
|
-
|
|
8
|
+
interface Config {
|
|
9
|
+
select?: boolean | string | ConfigSelect;
|
|
10
|
+
}
|
|
11
|
+
interface Defaults {
|
|
12
|
+
select?: boolean | string | ConfigSelect;
|
|
13
|
+
}
|
|
14
|
+
interface ConfigLanguage {
|
|
15
|
+
/**
|
|
16
|
+
* Select language options
|
|
17
|
+
*/
|
|
18
|
+
select?: ConfigSelectLanguage;
|
|
19
|
+
}
|
|
20
|
+
interface Api<T> {
|
|
21
|
+
select: ApiSelect<Api<T>>;
|
|
22
|
+
}
|
|
23
|
+
interface ApiSelectorModifier {
|
|
24
|
+
/**
|
|
25
|
+
* Pick rows / columns / cells which are selected
|
|
26
|
+
*/
|
|
27
|
+
selected?: boolean | undefined;
|
|
28
|
+
}
|
|
29
|
+
interface ApiRowMethods<T> {
|
|
30
|
+
/**
|
|
31
|
+
* Blur a row
|
|
32
|
+
*/
|
|
33
|
+
blur(): ApiRowMethods<T>;
|
|
34
|
+
/**
|
|
35
|
+
* Deselect a row
|
|
36
|
+
*/
|
|
37
|
+
deselect(): ApiRowMethods<T>;
|
|
38
|
+
/**
|
|
39
|
+
* Keyboard focus on a row
|
|
40
|
+
*/
|
|
41
|
+
focus(): ApiRowMethods<T>;
|
|
42
|
+
/**
|
|
43
|
+
* Select a row
|
|
44
|
+
*/
|
|
45
|
+
select(): ApiRowMethods<T>;
|
|
46
|
+
/**
|
|
47
|
+
* Is a row selected
|
|
48
|
+
*/
|
|
49
|
+
selected(): boolean;
|
|
50
|
+
}
|
|
51
|
+
interface ApiRowsMethods<T> {
|
|
52
|
+
/**
|
|
53
|
+
* Select multiple rows
|
|
54
|
+
*
|
|
55
|
+
* @param toggle Can be false to deselect
|
|
56
|
+
*/
|
|
57
|
+
select(this: ApiRowsMethods<T>, toggle?: boolean): ApiRowsMethods<T>;
|
|
58
|
+
/**
|
|
59
|
+
* Deselect a row
|
|
60
|
+
*/
|
|
61
|
+
deselect(this: ApiRowsMethods<T>): ApiRowsMethods<T>;
|
|
62
|
+
}
|
|
63
|
+
interface ApiCellMethods<T> {
|
|
64
|
+
/**
|
|
65
|
+
* Select cell
|
|
66
|
+
*/
|
|
67
|
+
select(): ApiCellMethods<T>;
|
|
68
|
+
/**
|
|
69
|
+
* Deselect a cell
|
|
70
|
+
*/
|
|
71
|
+
deselect(): ApiCellMethods<T>;
|
|
72
|
+
}
|
|
73
|
+
interface ApiColumnsMethods<T> {
|
|
74
|
+
/**
|
|
75
|
+
* Select multiple columns
|
|
76
|
+
*
|
|
77
|
+
* @param toggle Can be false to deselect
|
|
78
|
+
*/
|
|
79
|
+
select(this: ApiColumnsMethods<T>, toggle?: boolean): ApiColumnsMethods<T>;
|
|
80
|
+
/**
|
|
81
|
+
* Deselect columns
|
|
82
|
+
*/
|
|
83
|
+
deselect(this: ApiColumnsMethods<T>): ApiColumnsMethods<T>;
|
|
84
|
+
}
|
|
85
|
+
interface ApiColumnMethods<T> {
|
|
86
|
+
/**
|
|
87
|
+
* Select a column
|
|
88
|
+
*/
|
|
89
|
+
select(): ApiColumnMethods<T>;
|
|
90
|
+
/**
|
|
91
|
+
* Deselect a column
|
|
92
|
+
*/
|
|
93
|
+
deselect(): ApiColumnMethods<T>;
|
|
94
|
+
}
|
|
95
|
+
interface ApiCellsMethods<T> {
|
|
96
|
+
/**
|
|
97
|
+
* Select multiple cells
|
|
98
|
+
*
|
|
99
|
+
* @param toggle Can be false to deselect
|
|
100
|
+
*/
|
|
101
|
+
select(this: ApiCellsMethods<T>, toggle?: boolean): ApiCellsMethods<T>;
|
|
102
|
+
/**
|
|
103
|
+
* Deselect cells
|
|
104
|
+
*/
|
|
105
|
+
deselect(this: ApiCellsMethods<T>): ApiCellsMethods<T>;
|
|
106
|
+
}
|
|
107
|
+
interface DataTablesStatic {
|
|
108
|
+
/**
|
|
109
|
+
* Select static methods
|
|
110
|
+
*/
|
|
111
|
+
select: {
|
|
112
|
+
/**
|
|
113
|
+
* Class names used by Select
|
|
114
|
+
*/
|
|
115
|
+
classes: {
|
|
116
|
+
/**
|
|
117
|
+
* Class name(s) to use for the checkbox. Space separated.
|
|
118
|
+
*/
|
|
119
|
+
checkbox: string;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* Initialise Select (for use on tables which were not in the document
|
|
123
|
+
* when they were initialised).
|
|
124
|
+
*/
|
|
125
|
+
init: <T = any>(api: Api<T>) => void;
|
|
126
|
+
/**
|
|
127
|
+
* Select version
|
|
128
|
+
*/
|
|
129
|
+
version: string;
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
interface DataTablesStaticRender {
|
|
133
|
+
/**
|
|
134
|
+
* Display a checkbox in the column's cells to be used for and represent
|
|
135
|
+
* row selection.
|
|
136
|
+
*/
|
|
137
|
+
select(): any;
|
|
138
|
+
/**
|
|
139
|
+
* Display a checkbox in the column's cells to be used for and represent
|
|
140
|
+
* row selection, with the `value` and `name` attributes for the checkbox
|
|
141
|
+
* `input` being set by properties from the row's data object.
|
|
142
|
+
*
|
|
143
|
+
* @param valueProp Name of the data property where the `value` for the
|
|
144
|
+
* checkbox is.
|
|
145
|
+
* @param nameProp Name of the data property where the `name` for the
|
|
146
|
+
* checkbox is.
|
|
147
|
+
*/
|
|
148
|
+
select(valueProp: string, nameProp: string): any;
|
|
149
|
+
}
|
|
150
|
+
interface Buttons {
|
|
151
|
+
/** Select all rows in the table */
|
|
152
|
+
selectAll: {
|
|
153
|
+
extend: 'selectAll';
|
|
154
|
+
selectorModifier?: ApiSelectorModifier;
|
|
155
|
+
};
|
|
156
|
+
/** Change selection type to cells. Shows as active when cell selection is enabled */
|
|
157
|
+
selectCells: {
|
|
158
|
+
extend: 'selectCells';
|
|
159
|
+
};
|
|
160
|
+
/** Change selection type to columns. Shows as active when cell selection is enabled */
|
|
161
|
+
selectColumns: {
|
|
162
|
+
extend: 'selectColumns';
|
|
163
|
+
};
|
|
164
|
+
/** Button which is enabled only when one or more rows are selected. Provide your own action function. */
|
|
165
|
+
selected: {
|
|
166
|
+
extend: 'selected';
|
|
167
|
+
limitTo?: string[];
|
|
168
|
+
};
|
|
169
|
+
/** Button which is enabled only when a single row is selected. Provide your own action function. */
|
|
170
|
+
selectedSingle: {
|
|
171
|
+
extend: 'selected';
|
|
172
|
+
};
|
|
173
|
+
/** Deselect all currently selected rows. */
|
|
174
|
+
selectNone: {
|
|
175
|
+
extend: 'selectNone';
|
|
176
|
+
};
|
|
177
|
+
/** Change selection type to rows. Shows as active when cell selection is enabled */
|
|
178
|
+
selectRows: {
|
|
179
|
+
extend: 'selectRows';
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* Toggle a filter that will reduce the rows displayed to just those which are selected. Uses
|
|
183
|
+
* its own action function - don't provide your own.
|
|
184
|
+
*/
|
|
185
|
+
showSelected: {
|
|
186
|
+
extend: 'showSelected';
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
interface Context {
|
|
190
|
+
_select_lastCell: CellIdx;
|
|
191
|
+
_select: {
|
|
192
|
+
blurable?: boolean;
|
|
193
|
+
className?: string;
|
|
194
|
+
info?: boolean;
|
|
195
|
+
infoEls: HTMLElement[];
|
|
196
|
+
items?: string;
|
|
197
|
+
keys?: boolean;
|
|
198
|
+
keysWrap?: boolean;
|
|
199
|
+
selector?: string;
|
|
200
|
+
selectable?: Selectable;
|
|
201
|
+
style?: string;
|
|
202
|
+
toggleable?: boolean;
|
|
203
|
+
};
|
|
204
|
+
_select_mode: 'additive' | 'subtractive';
|
|
205
|
+
_select_set: string[];
|
|
206
|
+
_select_init: boolean;
|
|
207
|
+
}
|
|
208
|
+
interface RowContext {
|
|
209
|
+
_select_selected: boolean;
|
|
210
|
+
_selected_cells: boolean[];
|
|
211
|
+
}
|
|
212
|
+
interface ColumnContext {
|
|
213
|
+
_select_selected: boolean;
|
|
214
|
+
}
|
|
194
215
|
}
|
|
195
|
-
|
|
196
216
|
interface ConfigSelect {
|
|
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
|
-
selector?: string;
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* Set the selection style for end user interaction with the table
|
|
236
|
-
*/
|
|
237
|
-
style?: StyleType;
|
|
238
|
-
|
|
239
|
-
/** Disable the deselection of selected rows when clicked */
|
|
240
|
-
toggleable?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Indicate if the selected items will be removed when clicking outside of the table
|
|
219
|
+
*/
|
|
220
|
+
blurable?: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* Set the class name that will be applied to selected items
|
|
223
|
+
*/
|
|
224
|
+
className?: string;
|
|
225
|
+
/** Control automatic addition of header checkbox */
|
|
226
|
+
headerCheckbox?: HeaderCheckbox;
|
|
227
|
+
/**
|
|
228
|
+
* Enable / disable the display for item selection information in the table summary
|
|
229
|
+
*/
|
|
230
|
+
info?: boolean;
|
|
231
|
+
/**
|
|
232
|
+
* Set which table items to select (rows, columns or cells)
|
|
233
|
+
*/
|
|
234
|
+
items?: string;
|
|
235
|
+
/** Set keyboard accessability (tab and arrow keys) */
|
|
236
|
+
keys?: boolean;
|
|
237
|
+
/** Allow keyboard navigation to wrap */
|
|
238
|
+
keysWrap?: boolean;
|
|
239
|
+
/** Set a function that will determine if a row should be selectable. */
|
|
240
|
+
selectable?: (data: any, tr: HTMLTableRowElement | null, index: number) => boolean;
|
|
241
|
+
/**
|
|
242
|
+
* Set the element selector used for mouse event capture to select items
|
|
243
|
+
*/
|
|
244
|
+
selector?: string;
|
|
245
|
+
/**
|
|
246
|
+
* Set the selection style for end user interaction with the table
|
|
247
|
+
*/
|
|
248
|
+
style?: StyleType;
|
|
249
|
+
/** Disable the deselection of selected rows when clicked */
|
|
250
|
+
toggleable?: boolean;
|
|
241
251
|
}
|
|
242
|
-
|
|
243
252
|
interface ConfigSelectLanguage {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
columns?: string | IPlural;
|
|
258
|
-
|
|
259
|
-
/** Table information summary string for the number of rows selected */
|
|
260
|
-
rows?: string | IPlural;
|
|
253
|
+
/** AIRA strings */
|
|
254
|
+
aria?: {
|
|
255
|
+
/** Text to use as the aria-label for the header checkbox */
|
|
256
|
+
headerCheckbox?: string;
|
|
257
|
+
/** Text to use as the aria-label for the row selection checkboxes */
|
|
258
|
+
rowCheckbox?: string;
|
|
259
|
+
};
|
|
260
|
+
/** Table information summary string for the number of cells selected */
|
|
261
|
+
cells?: string | IPlural;
|
|
262
|
+
/** Table information summary string for the number of columns selected */
|
|
263
|
+
columns?: string | IPlural;
|
|
264
|
+
/** Table information summary string for the number of rows selected */
|
|
265
|
+
rows?: string | IPlural;
|
|
261
266
|
}
|
|
262
|
-
|
|
263
267
|
interface ApiSelect<Api> {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
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
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
* @returns DataTables API instance for chaining.
|
|
372
|
-
*/
|
|
373
|
-
toggleable(set: boolean): Api;
|
|
268
|
+
/**
|
|
269
|
+
* Initialise Select for a DataTable after the DataTable has been constructed.
|
|
270
|
+
*
|
|
271
|
+
* @returns DataTables Api instance
|
|
272
|
+
*/
|
|
273
|
+
(): Api;
|
|
274
|
+
/**
|
|
275
|
+
* Get the blurable state for the table.
|
|
276
|
+
*
|
|
277
|
+
* @returns Current state - true if blurable, false otherwise. Note that if multiple tables are defined in the API's context, only the blurable state of the first table will be returned.
|
|
278
|
+
*/
|
|
279
|
+
blurable(): boolean;
|
|
280
|
+
/**
|
|
281
|
+
* Set the blurable state for the table's selection options.
|
|
282
|
+
*
|
|
283
|
+
* @param flag Value to set for the blurable option - true to enable, false to disable.
|
|
284
|
+
* @returns DataTables Api instance for chaining
|
|
285
|
+
*/
|
|
286
|
+
blurable(flag: boolean): Api;
|
|
287
|
+
/**
|
|
288
|
+
* Get the summary information display state for the table.
|
|
289
|
+
*
|
|
290
|
+
* @returns Current state - true if information summary shown, false otherwise. Note that if multiple tables are defined in the API's context, only the information state of the first table will be returned.
|
|
291
|
+
*/
|
|
292
|
+
info(): boolean;
|
|
293
|
+
/**
|
|
294
|
+
* Set the information summary display state for the table's selection options.
|
|
295
|
+
*
|
|
296
|
+
* @param flag Value to set for the information summary display state - true to enable, false to disable.
|
|
297
|
+
* @returns DataTables API instance for chaining.
|
|
298
|
+
*/
|
|
299
|
+
info(flag: boolean): Api;
|
|
300
|
+
/**
|
|
301
|
+
* Get the items that will be selected by user interaction (i.e. a click on the table).
|
|
302
|
+
*
|
|
303
|
+
* @returns The current item that will be selected when the user interacts with Select's event listeners - this will be the value row, column or cell.
|
|
304
|
+
*/
|
|
305
|
+
items(): string;
|
|
306
|
+
/**
|
|
307
|
+
* Set the item type that will be selected by user interaction.
|
|
308
|
+
*
|
|
309
|
+
* @param set Items to select - this must be one of row, column or cells.
|
|
310
|
+
* @returns DataTables API instance for chaining.
|
|
311
|
+
*/
|
|
312
|
+
items(set: string): Api;
|
|
313
|
+
/**
|
|
314
|
+
* Get Select's keyboard navigation state
|
|
315
|
+
*
|
|
316
|
+
* @returns The keyboard navigation state of Select
|
|
317
|
+
*/
|
|
318
|
+
keys(): boolean;
|
|
319
|
+
/**
|
|
320
|
+
* Set Select's keyboard navigation state
|
|
321
|
+
*
|
|
322
|
+
* @param set Enable (true) or disable (false) row keyboard navigation
|
|
323
|
+
* @param wrap Allow wrapping or not (default)
|
|
324
|
+
* @returns DataTables API instance for chaining.
|
|
325
|
+
*/
|
|
326
|
+
keys(set: boolean, wrap?: boolean): Api;
|
|
327
|
+
/**
|
|
328
|
+
* Get the function used to determine if a row should be selectable.
|
|
329
|
+
*/
|
|
330
|
+
selectable(): Selectable;
|
|
331
|
+
/**
|
|
332
|
+
* Set the function used to determine if a row should be selectable.
|
|
333
|
+
*
|
|
334
|
+
* @param set Function
|
|
335
|
+
*/
|
|
336
|
+
selectable(set: Selectable): Api;
|
|
337
|
+
/**
|
|
338
|
+
* Get the current item selector string applied to the table.
|
|
339
|
+
*
|
|
340
|
+
* @returns the item selector string being used for the table.
|
|
341
|
+
*/
|
|
342
|
+
selector(): string;
|
|
343
|
+
/**
|
|
344
|
+
* Set the table's item selector string. Note that any old selectors will be automatically removed if this is used as a selector to ensure that there are no memory leaks in unattached event listeners.
|
|
345
|
+
*
|
|
346
|
+
* @param set jQuery selector that will select the cells that can trigger item selection.
|
|
347
|
+
*/
|
|
348
|
+
selector(set: string): Api;
|
|
349
|
+
/**
|
|
350
|
+
* Get the current selection style applied to the table
|
|
351
|
+
*
|
|
352
|
+
* @returns The current selection style, this will be one of "api", "single", "multi" or "os".
|
|
353
|
+
*/
|
|
354
|
+
style(): StyleType;
|
|
355
|
+
/**
|
|
356
|
+
* Set the table's selection style
|
|
357
|
+
*
|
|
358
|
+
* @param s Selection style to set - this must be one of "api", "single", "multi" or "os".
|
|
359
|
+
* @returns DataTables API instance for chaining.
|
|
360
|
+
*/
|
|
361
|
+
style(s: StyleType): Api;
|
|
362
|
+
/**
|
|
363
|
+
* Get the toggle state of Select for the given DataTable.
|
|
364
|
+
*
|
|
365
|
+
* @returns true if the item can be deselected when clicked on, false if it cannot be.
|
|
366
|
+
*/
|
|
367
|
+
toggleable(): boolean;
|
|
368
|
+
/**
|
|
369
|
+
* Set the toggle state of Select for the DataTable.
|
|
370
|
+
*
|
|
371
|
+
* @param set true to allow item deselection, false to disallow.
|
|
372
|
+
* @returns DataTables API instance for chaining.
|
|
373
|
+
*/
|
|
374
|
+
toggleable(set: boolean): Api;
|
|
374
375
|
}
|
|
375
|
-
|
|
376
376
|
interface IPlural {
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
[num: number]: string;
|
|
377
|
+
/** Default if there is no specific number given. Use %d where you want the number to show */
|
|
378
|
+
_: string;
|
|
379
|
+
/** Specific replacement, e.g. for 0 or 1 commonly. */
|
|
380
|
+
[num: number]: string;
|
|
382
381
|
}
|
|
382
|
+
|
|
383
|
+
export type { HeaderCheckbox, Selectable, StyleType };
|