datatables.net-select 2.0.5 → 3.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 +439 -72
- package/js/dataTables.select.min.js +2 -2
- package/js/dataTables.select.min.mjs +2 -2
- package/js/dataTables.select.mjs +439 -72
- package/package.json +1 -1
- package/types/types.d.ts +98 -3
package/package.json
CHANGED
package/types/types.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
/// <reference types="jquery" />
|
|
9
9
|
|
|
10
|
-
import DataTables from 'datatables.net';
|
|
10
|
+
import DataTables, {ObjectColumnRender} from 'datatables.net';
|
|
11
11
|
|
|
12
12
|
export default DataTables;
|
|
13
13
|
|
|
@@ -34,14 +34,24 @@ declare module 'datatables.net' {
|
|
|
34
34
|
|
|
35
35
|
interface ApiRowMethods<T> {
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Blur a row
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
blur(): Api<T>;
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Deselect a row
|
|
43
43
|
*/
|
|
44
44
|
deselect(): Api<T>;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Keyboard focus on a row
|
|
48
|
+
*/
|
|
49
|
+
focus(): Api<T>;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Select a row
|
|
53
|
+
*/
|
|
54
|
+
select(): Api<T>;
|
|
45
55
|
}
|
|
46
56
|
|
|
47
57
|
interface ApiRowsMethods<T> {
|
|
@@ -107,6 +117,73 @@ declare module 'datatables.net' {
|
|
|
107
117
|
version: string;
|
|
108
118
|
}
|
|
109
119
|
}
|
|
120
|
+
|
|
121
|
+
interface DataTablesStaticRender {
|
|
122
|
+
/**
|
|
123
|
+
* Display a checkbox in the column's cells to be used for and represent
|
|
124
|
+
* row selection.
|
|
125
|
+
*/
|
|
126
|
+
select(): ObjectColumnRender;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Display a checkbox in the column's cells to be used for and represent
|
|
130
|
+
* row selection, with the `value` and `name` attributes for the checkbox
|
|
131
|
+
* `input` being set by properties from the row's data object.
|
|
132
|
+
*
|
|
133
|
+
* @param valueProp Name of the data property where the `value` for the
|
|
134
|
+
* checkbox is.
|
|
135
|
+
* @param nameProp Name of the data property where the `name` for the
|
|
136
|
+
* checkbox is.
|
|
137
|
+
*/
|
|
138
|
+
select(valueProp: string, nameProp: string): ObjectColumnRender;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
interface Buttons {
|
|
142
|
+
/** Select all rows in the table */
|
|
143
|
+
selectAll: {
|
|
144
|
+
extend: 'selectAll';
|
|
145
|
+
selectorModifier?: ApiSelectorModifier;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** Change selection type to cells. Shows as active when cell selection is enabled */
|
|
149
|
+
selectCells: {
|
|
150
|
+
extend: 'selectCells';
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/** Change selection type to columns. Shows as active when cell selection is enabled */
|
|
154
|
+
selectColumns: {
|
|
155
|
+
extend: 'selectColumns';
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/** Button which is enabled only when one or more rows are selected. Provide your own action function. */
|
|
159
|
+
selected: {
|
|
160
|
+
extend: 'selected';
|
|
161
|
+
limitTo?: string[];
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** Button which is enabled only when a single row is selected. Provide your own action function. */
|
|
165
|
+
selectedSingle: {
|
|
166
|
+
extend: 'selected';
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/** Deselect all currently selected rows. */
|
|
170
|
+
selectNone: {
|
|
171
|
+
extend: 'selectNone';
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/** Change selection type to rows. Shows as active when cell selection is enabled */
|
|
175
|
+
selectRows: {
|
|
176
|
+
extend: 'selectRows';
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Toggle a filter that will reduce the rows displayed to just those which are selected. Uses
|
|
181
|
+
* its own action function - don't provide your own.
|
|
182
|
+
*/
|
|
183
|
+
showSelected: {
|
|
184
|
+
extend: 'showSelected';
|
|
185
|
+
}
|
|
186
|
+
}
|
|
110
187
|
}
|
|
111
188
|
|
|
112
189
|
interface ConfigSelect {
|
|
@@ -130,6 +207,9 @@ interface ConfigSelect {
|
|
|
130
207
|
*/
|
|
131
208
|
items?: string;
|
|
132
209
|
|
|
210
|
+
/** Set keyboard accessability (tab and arrow keys) */
|
|
211
|
+
keys?: boolean;
|
|
212
|
+
|
|
133
213
|
/**
|
|
134
214
|
* Set the element selector used for mouse event capture to select items
|
|
135
215
|
*/
|
|
@@ -194,6 +274,21 @@ interface ApiSelect<Api> {
|
|
|
194
274
|
*/
|
|
195
275
|
items(set: string): Api;
|
|
196
276
|
|
|
277
|
+
/**
|
|
278
|
+
* Get Select's keyboard navigation state
|
|
279
|
+
*
|
|
280
|
+
* @returns The keyboard navigation state of Select
|
|
281
|
+
*/
|
|
282
|
+
keys(): boolean;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Set Select's keyboard navigation state
|
|
286
|
+
*
|
|
287
|
+
* @param set Enable (true) or disable (false) row keyboard navigation
|
|
288
|
+
* @returns DataTables API instance for chaining.
|
|
289
|
+
*/
|
|
290
|
+
keys(set: boolean): Api;
|
|
291
|
+
|
|
197
292
|
/**
|
|
198
293
|
* Get the current item selector string applied to the table.
|
|
199
294
|
*
|