datatables.net 2.3.2 → 2.3.3
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.js +119 -117
- package/js/dataTables.min.js +2 -2
- package/js/dataTables.min.mjs +2 -2
- package/js/dataTables.mjs +119 -117
- package/package.json +1 -1
- package/types/types.d.ts +32 -32
package/package.json
CHANGED
package/types/types.d.ts
CHANGED
|
@@ -133,7 +133,7 @@ export interface Feature {
|
|
|
133
133
|
/** Class name for the div */
|
|
134
134
|
className?: string;
|
|
135
135
|
|
|
136
|
-
/**
|
|
136
|
+
/** ID to give the div */
|
|
137
137
|
id?: string;
|
|
138
138
|
|
|
139
139
|
/** HTML content for the div (cannot be used as well as textContent) */
|
|
@@ -218,13 +218,13 @@ type LayoutElement = {
|
|
|
218
218
|
/** Class to apply to the CELL in the layout grid */
|
|
219
219
|
className?: string;
|
|
220
220
|
|
|
221
|
-
/**
|
|
221
|
+
/** ID to apply to the CELL in the layout grid */
|
|
222
222
|
id?: string;
|
|
223
223
|
|
|
224
224
|
/** Class to apply to the ROW in the layout grid */
|
|
225
225
|
rowClass?: string;
|
|
226
226
|
|
|
227
|
-
/**
|
|
227
|
+
/** ID to apply to the ROW in the layout grid */
|
|
228
228
|
rowId?: string;
|
|
229
229
|
|
|
230
230
|
/** List of features to show in this cell */
|
|
@@ -846,7 +846,7 @@ export interface Api<T=any> {
|
|
|
846
846
|
|
|
847
847
|
/**
|
|
848
848
|
* Get a boolean value to indicate if there are any entries in the API instance's result set (i.e. any data, selected rows, etc).
|
|
849
|
-
* @returns true if there
|
|
849
|
+
* @returns true if there are one or more items in the result set, false otherwise.
|
|
850
850
|
*/
|
|
851
851
|
any(): boolean;
|
|
852
852
|
|
|
@@ -1012,13 +1012,13 @@ export interface Api<T=any> {
|
|
|
1012
1012
|
* @param returns Indicate if the callback function will return values or not. If set to true a new API instance will be returns with the return values from the callback function in its result set. If not set, or false the original instance will be returned for chaining, if no values are returned by the callback method.
|
|
1013
1013
|
* @returns Original API instance if the callback returns no result (i.e. undefined) or a new API instance with the result set being the results from the callback, in order of execution.
|
|
1014
1014
|
*/
|
|
1015
|
-
iterator(type: 'table', callback:
|
|
1016
|
-
iterator(type: 'cell', callback:
|
|
1017
|
-
iterator(type: 'column-rows', callback:
|
|
1018
|
-
iterator(type: 'column', callback:
|
|
1019
|
-
iterator(type: 'columns', callback:
|
|
1020
|
-
iterator(type: 'row', callback:
|
|
1021
|
-
iterator(type: 'rows', callback:
|
|
1015
|
+
iterator(type: 'table', callback: IteratorTable, returns?: boolean): Api<any>;
|
|
1016
|
+
iterator(type: 'cell', callback: IteratorCell, returns?: boolean): Api<any>;
|
|
1017
|
+
iterator(type: 'column-rows', callback: IteratorColumnRows, returns?: boolean): Api<any>;
|
|
1018
|
+
iterator(type: 'column', callback: IteratorColumn, returns?: boolean): Api<any>;
|
|
1019
|
+
iterator(type: 'columns', callback: IteratorColumns, returns?: boolean): Api<any>;
|
|
1020
|
+
iterator(type: 'row', callback: IteratorRow, returns?: boolean): Api<any>;
|
|
1021
|
+
iterator(type: 'rows', callback: IteratorRows, returns?: boolean): Api<any>;
|
|
1022
1022
|
|
|
1023
1023
|
/**
|
|
1024
1024
|
* Iterate over a result set of table, row, column or cell indexes
|
|
@@ -1029,13 +1029,13 @@ export interface Api<T=any> {
|
|
|
1029
1029
|
* @param returns Indicate if the callback function will return values or not. If set to true a new API instance will be returns with the return values from the callback function in its result set. If not set, or false the original instance will be returned for chaining, if no values are returned by the callback method.
|
|
1030
1030
|
* @returns Original API instance if the callback returns no result (i.e. undefined) or a new API instance with the result set being the results from the callback, in order of execution.
|
|
1031
1031
|
*/
|
|
1032
|
-
iterator(flatten: boolean, type: 'table', callback:
|
|
1033
|
-
iterator(flatten: boolean, type: 'cell', callback:
|
|
1034
|
-
iterator(flatten: boolean, type: 'column-rows', callback:
|
|
1035
|
-
iterator(flatten: boolean, type: 'column', callback:
|
|
1036
|
-
iterator(flatten: boolean, type: 'columns', callback:
|
|
1037
|
-
iterator(flatten: boolean, type: 'row', callback:
|
|
1038
|
-
iterator(flatten: boolean, type: 'rows', callback:
|
|
1032
|
+
iterator(flatten: boolean, type: 'table', callback: IteratorTable, returns?: boolean): Api<any>;
|
|
1033
|
+
iterator(flatten: boolean, type: 'cell', callback: IteratorCell, returns?: boolean): Api<any>;
|
|
1034
|
+
iterator(flatten: boolean, type: 'column-rows', callback: IteratorColumnRows, returns?: boolean): Api<any>;
|
|
1035
|
+
iterator(flatten: boolean, type: 'column', callback: IteratorColumn, returns?: boolean): Api<any>;
|
|
1036
|
+
iterator(flatten: boolean, type: 'columns', callback: IteratorColumns, returns?: boolean): Api<any>;
|
|
1037
|
+
iterator(flatten: boolean, type: 'row', callback: IteratorRow, returns?: boolean): Api<any>;
|
|
1038
|
+
iterator(flatten: boolean, type: 'rows', callback: IteratorRows, returns?: boolean): Api<any>;
|
|
1039
1039
|
|
|
1040
1040
|
/**
|
|
1041
1041
|
* Join the elements in the result set into a string.
|
|
@@ -1237,7 +1237,7 @@ export interface Api<T=any> {
|
|
|
1237
1237
|
/**
|
|
1238
1238
|
* Sort the elements of the API instance's result set.
|
|
1239
1239
|
*
|
|
1240
|
-
* @param fn This is a standard
|
|
1240
|
+
* @param fn This is a standard JavaScript sort comparison function. It accepts two parameters.
|
|
1241
1241
|
* @returns The original API instance with the result set sorted as defined by the sorting conditions used.
|
|
1242
1242
|
*/
|
|
1243
1243
|
sort(fn?: ((value1: any, value2: any) => number)): Api<Array<any>>;
|
|
@@ -1281,9 +1281,9 @@ export interface Api<T=any> {
|
|
|
1281
1281
|
to$(): JQuery;
|
|
1282
1282
|
|
|
1283
1283
|
/**
|
|
1284
|
-
* Create a native
|
|
1284
|
+
* Create a native JavaScript array object from an API instance.
|
|
1285
1285
|
*
|
|
1286
|
-
* @returns
|
|
1286
|
+
* @returns JavaScript array which contains the values from the API instance's result set.
|
|
1287
1287
|
*/
|
|
1288
1288
|
toArray(): any[];
|
|
1289
1289
|
|
|
@@ -1452,7 +1452,7 @@ export interface State {
|
|
|
1452
1452
|
* @param settings Table settings object
|
|
1453
1453
|
* @param counter Loop counter
|
|
1454
1454
|
*/
|
|
1455
|
-
type
|
|
1455
|
+
type IteratorTable = (settings: InternalSettings, counter: number) => any;
|
|
1456
1456
|
|
|
1457
1457
|
/**
|
|
1458
1458
|
* "cell" - loop over each table and cell in the result set
|
|
@@ -1463,7 +1463,7 @@ type InteratorTable = (settings: InternalSettings, counter: number) => any;
|
|
|
1463
1463
|
* @param tableCounter Table counter (outer)
|
|
1464
1464
|
* @param cellCounter Cell counter (inner)
|
|
1465
1465
|
*/
|
|
1466
|
-
type
|
|
1466
|
+
type IteratorCell = (settings: InternalSettings, rowIndex: number, columnIndex: number, tableCounter: number, cellCounter: number) => any;
|
|
1467
1467
|
|
|
1468
1468
|
/**
|
|
1469
1469
|
* "columns" - loop over each item in the result set
|
|
@@ -1472,7 +1472,7 @@ type InteratorCell = (settings: InternalSettings, rowIndex: number, columnIndex:
|
|
|
1472
1472
|
* @param resultItem Result set item
|
|
1473
1473
|
* @param counter Loop counter
|
|
1474
1474
|
*/
|
|
1475
|
-
type
|
|
1475
|
+
type IteratorColumns = (settings: InternalSettings, resultItem: any, counter: number) => any;
|
|
1476
1476
|
|
|
1477
1477
|
/**
|
|
1478
1478
|
* "column" - loop over each table and column in the result set
|
|
@@ -1482,7 +1482,7 @@ type InteratorColumns = (settings: InternalSettings, resultItem: any, counter: n
|
|
|
1482
1482
|
* @param tableCounter Table counter (outer)
|
|
1483
1483
|
* @param columnCounter Column counter (inner)
|
|
1484
1484
|
*/
|
|
1485
|
-
type
|
|
1485
|
+
type IteratorColumn = (settings: InternalSettings, columnIndex: number, tableCounter: number, columnCounter: number) => any;
|
|
1486
1486
|
|
|
1487
1487
|
/**
|
|
1488
1488
|
* "column-rows" - loop over each table, column and row in the result set applying selector-modifier.
|
|
@@ -1493,7 +1493,7 @@ type InteratorColumn = (settings: InternalSettings, columnIndex: number, tableCo
|
|
|
1493
1493
|
* @param columnCounter Column counter (inner)
|
|
1494
1494
|
* @param rowIndexes Row indexes
|
|
1495
1495
|
*/
|
|
1496
|
-
type
|
|
1496
|
+
type IteratorColumnRows = (settings: InternalSettings, columnIndex: number, tableCounter: number, columnCounter: number, rowIndexes: number[]) => any;
|
|
1497
1497
|
|
|
1498
1498
|
/**
|
|
1499
1499
|
* "row" - loop over each table and row in the result set
|
|
@@ -1503,7 +1503,7 @@ type InteratorColumnRows = (settings: InternalSettings, columnIndex: number, tab
|
|
|
1503
1503
|
* @param tableCounter Table counter (outer)
|
|
1504
1504
|
* @param rowCounter Row counter (inner)
|
|
1505
1505
|
*/
|
|
1506
|
-
type
|
|
1506
|
+
type IteratorRow = (settings: InternalSettings, rowIndex: number, tableCounter: number, rowCounter: number) => any;
|
|
1507
1507
|
|
|
1508
1508
|
/**
|
|
1509
1509
|
* "rows" - loop over each item in the result set
|
|
@@ -1512,7 +1512,7 @@ type InteratorRow = (settings: InternalSettings, rowIndex: number, tableCounter:
|
|
|
1512
1512
|
* @param resultItem Result set item
|
|
1513
1513
|
* @param counter Loop counter
|
|
1514
1514
|
*/
|
|
1515
|
-
type
|
|
1515
|
+
type IteratorRows = (settings: InternalSettings, resultItem: any, counter: number) => any;
|
|
1516
1516
|
|
|
1517
1517
|
export interface ApiAjax {
|
|
1518
1518
|
/**
|
|
@@ -2420,7 +2420,7 @@ export interface ApiRow<T> {
|
|
|
2420
2420
|
/**
|
|
2421
2421
|
* Add a new row to the table using the given data
|
|
2422
2422
|
*
|
|
2423
|
-
* @param data Data to use for the new row. This may be an array, object or
|
|
2423
|
+
* @param data Data to use for the new row. This may be an array, object or JavaScript object instance, but must be in the same format as the other data in the table+
|
|
2424
2424
|
* @returns DataTables API instance with the newly added row in its result set.
|
|
2425
2425
|
*/
|
|
2426
2426
|
add(data: any[] | object): ApiRowMethods<T>;
|
|
@@ -2828,7 +2828,7 @@ export interface DataTablesStatic {
|
|
|
2828
2828
|
use(library: any): void;
|
|
2829
2829
|
|
|
2830
2830
|
/**
|
|
2831
|
-
* Set the libraries that DataTables uses, or the global objects, explicity
|
|
2831
|
+
* Set the libraries that DataTables uses, or the global objects, explicity stating
|
|
2832
2832
|
* what library is to be considered. Used for module loading environments.
|
|
2833
2833
|
*
|
|
2834
2834
|
* @param type Indicate the library that is being loaded.
|
|
@@ -3404,7 +3404,7 @@ type FunctionFormatNumber = (this: JQueryDataTables, formatNumber: number) => vo
|
|
|
3404
3404
|
|
|
3405
3405
|
type FunctionHeaderCallback = (this: JQueryDataTables, tr: HTMLTableRowElement, data: any[], start: number, end: number, display: any[]) => void;
|
|
3406
3406
|
|
|
3407
|
-
type FunctionInfoCallback = (this: JQueryDataTables, settings: InternalSettings, start: number, end: number,
|
|
3407
|
+
type FunctionInfoCallback = (this: JQueryDataTables, settings: InternalSettings, start: number, end: number, max: number, total: number, pre: string) => void;
|
|
3408
3408
|
|
|
3409
3409
|
type FunctionInitComplete = (this: JQueryDataTables, settings: InternalSettings, json: object) => void;
|
|
3410
3410
|
|
|
@@ -3412,7 +3412,7 @@ type FunctionPreDrawCallback = (this: JQueryDataTables, settings: InternalSettin
|
|
|
3412
3412
|
|
|
3413
3413
|
type FunctionRowCallback = (this: JQueryDataTables, row: HTMLTableRowElement, data: any[] | object, index: number) => void;
|
|
3414
3414
|
|
|
3415
|
-
type FunctionStateLoadCallback = (this: JQueryDataTables, settings: InternalSettings, callback: ((state: State) => void)) =>
|
|
3415
|
+
type FunctionStateLoadCallback = (this: JQueryDataTables, settings: InternalSettings, callback: ((state: State) => void)) => undefined | null | object;
|
|
3416
3416
|
|
|
3417
3417
|
type FunctionStateLoaded = (this: JQueryDataTables, settings: InternalSettings, data: object) => void;
|
|
3418
3418
|
|