datatables.net 1.13.3 → 1.13.4
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/jquery.dataTables.js +73 -17
- package/js/jquery.dataTables.min.js +2 -2
- package/js/jquery.dataTables.min.mjs +2 -2
- package/js/jquery.dataTables.mjs +53 -13
- package/package.json +1 -1
- package/types/types.d.ts +17 -5
package/js/jquery.dataTables.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/*! DataTables 1.13.
|
|
1
|
+
/*! DataTables 1.13.4
|
|
2
2
|
* ©2008-2023 SpryMedia Ltd - datatables.net/license
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @summary DataTables
|
|
7
7
|
* @description Paginate, search and order HTML tables
|
|
8
|
-
* @version 1.13.
|
|
8
|
+
* @version 1.13.4
|
|
9
9
|
* @author SpryMedia Ltd
|
|
10
10
|
* @contact www.datatables.net
|
|
11
11
|
* @copyright SpryMedia Ltd.
|
|
@@ -34,21 +34,28 @@
|
|
|
34
34
|
}
|
|
35
35
|
else if ( typeof exports === 'object' ) {
|
|
36
36
|
// CommonJS
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
// root. This will give an error otherwise
|
|
41
|
-
root = window;
|
|
42
|
-
}
|
|
37
|
+
// jQuery's factory checks for a global window - if it isn't present then it
|
|
38
|
+
// returns a factory function that expects the window object
|
|
39
|
+
var jq = require('jquery');
|
|
43
40
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
if (typeof window !== 'undefined') {
|
|
42
|
+
module.exports = function (root, $) {
|
|
43
|
+
if ( ! root ) {
|
|
44
|
+
// CommonJS environments without a window global must pass a
|
|
45
|
+
// root. This will give an error otherwise
|
|
46
|
+
root = window;
|
|
47
|
+
}
|
|
49
48
|
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
if ( ! $ ) {
|
|
50
|
+
$ = jq( root );
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return factory( $, root, root.document );
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
return factory( jq, window, window.document );
|
|
58
|
+
}
|
|
52
59
|
}
|
|
53
60
|
else {
|
|
54
61
|
// Browser
|
|
@@ -61,6 +68,12 @@
|
|
|
61
68
|
|
|
62
69
|
var DataTable = function ( selector, options )
|
|
63
70
|
{
|
|
71
|
+
// Check if called with a window or jQuery object for DOM less applications
|
|
72
|
+
// This is for backwards compatibility
|
|
73
|
+
if (DataTable.factory(selector, options)) {
|
|
74
|
+
return DataTable;
|
|
75
|
+
}
|
|
76
|
+
|
|
64
77
|
// When creating with `new`, create a new DataTable, returning the API instance
|
|
65
78
|
if (this instanceof DataTable) {
|
|
66
79
|
return $(selector).DataTable(options);
|
|
@@ -1165,6 +1178,7 @@
|
|
|
1165
1178
|
type: sort !== null ? i+'.@data-'+sort : undefined,
|
|
1166
1179
|
filter: filter !== null ? i+'.@data-'+filter : undefined
|
|
1167
1180
|
};
|
|
1181
|
+
col._isArrayHost = true;
|
|
1168
1182
|
|
|
1169
1183
|
_fnColumnOptions( oSettings, i );
|
|
1170
1184
|
}
|
|
@@ -2353,7 +2367,7 @@
|
|
|
2353
2367
|
|
|
2354
2368
|
// Indicate if DataTables should read DOM data as an object or array
|
|
2355
2369
|
// Used in _fnGetRowElements
|
|
2356
|
-
if ( typeof mDataSrc !== 'number' ) {
|
|
2370
|
+
if ( typeof mDataSrc !== 'number' && ! oCol._isArrayHost ) {
|
|
2357
2371
|
oSettings._rowReadObject = true;
|
|
2358
2372
|
}
|
|
2359
2373
|
|
|
@@ -9356,6 +9370,48 @@
|
|
|
9356
9370
|
|
|
9357
9371
|
|
|
9358
9372
|
|
|
9373
|
+
/**
|
|
9374
|
+
* Set the jQuery or window object to be used by DataTables
|
|
9375
|
+
*
|
|
9376
|
+
* @param {*} module Library / container object
|
|
9377
|
+
* @param {string} type Library or container type `lib` or `win`.
|
|
9378
|
+
*/
|
|
9379
|
+
DataTable.use = function (module, type) {
|
|
9380
|
+
if (type === 'lib' || module.fn) {
|
|
9381
|
+
$ = module;
|
|
9382
|
+
}
|
|
9383
|
+
else if (type == 'win' || module.document) {
|
|
9384
|
+
window = module;
|
|
9385
|
+
document = module.document;
|
|
9386
|
+
}
|
|
9387
|
+
}
|
|
9388
|
+
|
|
9389
|
+
/**
|
|
9390
|
+
* CommonJS factory function pass through. This will check if the arguments
|
|
9391
|
+
* given are a window object or a jQuery object. If so they are set
|
|
9392
|
+
* accordingly.
|
|
9393
|
+
* @param {*} root Window
|
|
9394
|
+
* @param {*} jq jQUery
|
|
9395
|
+
* @returns {boolean} Indicator
|
|
9396
|
+
*/
|
|
9397
|
+
DataTable.factory = function (root, jq) {
|
|
9398
|
+
var is = false;
|
|
9399
|
+
|
|
9400
|
+
// Test if the first parameter is a window object
|
|
9401
|
+
if (root && root.document) {
|
|
9402
|
+
window = root;
|
|
9403
|
+
document = root.document;
|
|
9404
|
+
}
|
|
9405
|
+
|
|
9406
|
+
// Test if the second parameter is a jQuery object
|
|
9407
|
+
if (jq && jq.fn && jq.fn.jquery) {
|
|
9408
|
+
$ = jq;
|
|
9409
|
+
is = true;
|
|
9410
|
+
}
|
|
9411
|
+
|
|
9412
|
+
return is;
|
|
9413
|
+
}
|
|
9414
|
+
|
|
9359
9415
|
/**
|
|
9360
9416
|
* Provide a common method for plug-ins to check the version of DataTables being
|
|
9361
9417
|
* used, in order to ensure compatibility.
|
|
@@ -9697,7 +9753,7 @@
|
|
|
9697
9753
|
* @type string
|
|
9698
9754
|
* @default Version number
|
|
9699
9755
|
*/
|
|
9700
|
-
DataTable.version = "1.13.
|
|
9756
|
+
DataTable.version = "1.13.4";
|
|
9701
9757
|
|
|
9702
9758
|
/**
|
|
9703
9759
|
* Private data store, containing all of the settings objects that are
|