datatables.net 1.13.0 → 1.13.2
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 +37 -13
- package/js/jquery.dataTables.min.js +3 -3
- package/js/jquery.dataTables.min.mjs +3 -3
- package/js/jquery.dataTables.mjs +36 -12
- package/package.json +1 -1
- package/types/types.d.ts +7 -2
package/js/jquery.dataTables.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! DataTables 1.13.
|
|
2
|
-
* ©2008-
|
|
1
|
+
/*! DataTables 1.13.2
|
|
2
|
+
* ©2008-2023 SpryMedia Ltd - datatables.net/license
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import jQuery from 'jquery';
|
|
@@ -1320,7 +1320,12 @@ var _numToDecimal = function ( num, decimalPoint ) {
|
|
|
1320
1320
|
|
|
1321
1321
|
|
|
1322
1322
|
var _isNumber = function ( d, decimalPoint, formatted ) {
|
|
1323
|
-
|
|
1323
|
+
let type = typeof d;
|
|
1324
|
+
var strType = type === 'string';
|
|
1325
|
+
|
|
1326
|
+
if ( type === 'number' || type === 'bigint') {
|
|
1327
|
+
return true;
|
|
1328
|
+
}
|
|
1324
1329
|
|
|
1325
1330
|
// If empty return immediately so there must be a number if it is a
|
|
1326
1331
|
// formatted string (this stops the string "k", or "kr", etc being detected
|
|
@@ -6727,8 +6732,15 @@ function _fnCallbackFire( settings, callbackArr, eventName, args )
|
|
|
6727
6732
|
|
|
6728
6733
|
if ( eventName !== null ) {
|
|
6729
6734
|
var e = $.Event( eventName+'.dt' );
|
|
6735
|
+
var table = $(settings.nTable);
|
|
6730
6736
|
|
|
6731
|
-
|
|
6737
|
+
table.trigger( e, args );
|
|
6738
|
+
|
|
6739
|
+
// If not yet attached to the document, trigger the event
|
|
6740
|
+
// on the body directly to sort of simulate the bubble
|
|
6741
|
+
if (table.parents('body').length === 0) {
|
|
6742
|
+
$('body').trigger( e, args );
|
|
6743
|
+
}
|
|
6732
6744
|
|
|
6733
6745
|
ret.push( e.result );
|
|
6734
6746
|
}
|
|
@@ -7194,7 +7206,7 @@ $.extend( _Api.prototype, {
|
|
|
7194
7206
|
|
|
7195
7207
|
pluck: function ( prop )
|
|
7196
7208
|
{
|
|
7197
|
-
|
|
7209
|
+
var fn = DataTable.util.get(prop);
|
|
7198
7210
|
|
|
7199
7211
|
return this.map( function ( el ) {
|
|
7200
7212
|
return fn(el);
|
|
@@ -8291,10 +8303,9 @@ _api_register( 'row.add()', function ( row ) {
|
|
|
8291
8303
|
|
|
8292
8304
|
$(document).on('plugin-init.dt', function (e, context) {
|
|
8293
8305
|
var api = new _Api( context );
|
|
8294
|
-
|
|
8295
|
-
|
|
8296
|
-
|
|
8297
|
-
const destroyEvent = `destroy.${namespace}`;
|
|
8306
|
+
var namespace = 'on-plugin-init';
|
|
8307
|
+
var stateSaveParamsEvent = 'stateSaveParams.' + namespace;
|
|
8308
|
+
var destroyEvent = 'destroy. ' + namespace;
|
|
8298
8309
|
|
|
8299
8310
|
api.on( stateSaveParamsEvent, function ( e, settings, d ) {
|
|
8300
8311
|
// This could be more compact with the API, but it is a lot faster as a simple
|
|
@@ -8313,7 +8324,7 @@ $(document).on('plugin-init.dt', function (e, context) {
|
|
|
8313
8324
|
});
|
|
8314
8325
|
|
|
8315
8326
|
api.on( destroyEvent, function () {
|
|
8316
|
-
api.off(
|
|
8327
|
+
api.off(stateSaveParamsEvent + ' ' + destroyEvent);
|
|
8317
8328
|
});
|
|
8318
8329
|
|
|
8319
8330
|
var loaded = api.state.loaded();
|
|
@@ -9635,7 +9646,7 @@ _api_register( 'i18n()', function ( token, def, plural ) {
|
|
|
9635
9646
|
* @type string
|
|
9636
9647
|
* @default Version number
|
|
9637
9648
|
*/
|
|
9638
|
-
DataTable.version = "1.13.
|
|
9649
|
+
DataTable.version = "1.13.2";
|
|
9639
9650
|
|
|
9640
9651
|
/**
|
|
9641
9652
|
* Private data store, containing all of the settings objects that are
|
|
@@ -14768,10 +14779,17 @@ $.extend( true, DataTable.ext.renderer, {
|
|
|
14768
14779
|
}
|
|
14769
14780
|
|
|
14770
14781
|
if ( btnDisplay !== null ) {
|
|
14771
|
-
|
|
14782
|
+
var tag = settings.oInit.pagingTag || 'a';
|
|
14783
|
+
var disabled = btnClass.indexOf(disabledClass) !== -1;
|
|
14784
|
+
|
|
14785
|
+
|
|
14786
|
+
node = $('<'+tag+'>', {
|
|
14772
14787
|
'class': classes.sPageButton+' '+btnClass,
|
|
14773
14788
|
'aria-controls': settings.sTableId,
|
|
14789
|
+
'aria-disabled': disabled ? 'true' : null,
|
|
14774
14790
|
'aria-label': aria[ button ],
|
|
14791
|
+
'aria-role': 'link',
|
|
14792
|
+
'aria-current': btnClass === classes.sPageButtonActive ? 'page' : null,
|
|
14775
14793
|
'data-dt-idx': button,
|
|
14776
14794
|
'tabindex': tabIndex,
|
|
14777
14795
|
'id': idx === 0 && typeof button === 'string' ?
|
|
@@ -14903,6 +14921,12 @@ var __numericReplace = function ( d, decimalPlace, re1, re2 ) {
|
|
|
14903
14921
|
if ( d !== 0 && (!d || d === '-') ) {
|
|
14904
14922
|
return -Infinity;
|
|
14905
14923
|
}
|
|
14924
|
+
|
|
14925
|
+
let type = typeof d;
|
|
14926
|
+
|
|
14927
|
+
if (type === 'number' || type === 'bigint') {
|
|
14928
|
+
return d;
|
|
14929
|
+
}
|
|
14906
14930
|
|
|
14907
14931
|
// If a decimal place other than `.` is used, it needs to be given to the
|
|
14908
14932
|
// function so we can detect it and replace with a `.` which is the only
|
package/package.json
CHANGED
package/types/types.d.ts
CHANGED
|
@@ -521,12 +521,16 @@ export interface ConfigColumns {
|
|
|
521
521
|
width?: string;
|
|
522
522
|
}
|
|
523
523
|
|
|
524
|
-
export
|
|
524
|
+
export type ConfigColumnDefs = ConfigColumnDefsMultiple | ConfigColumnDefsSingle;
|
|
525
|
+
|
|
526
|
+
export interface ConfigColumnDefsMultiple extends ConfigColumns {
|
|
525
527
|
/**
|
|
526
528
|
* Target column(s). Either this or `target` must be specified.
|
|
527
529
|
*/
|
|
528
|
-
targets
|
|
530
|
+
targets: string | number | Array<(number | string)>;
|
|
531
|
+
}
|
|
529
532
|
|
|
533
|
+
export interface ConfigColumnDefsSingle extends ConfigColumns {
|
|
530
534
|
/**
|
|
531
535
|
* Single column target. Either this or `targets` must be specified. Since: 1.12
|
|
532
536
|
*/
|
|
@@ -2324,6 +2328,7 @@ export interface ApiStaticExt {
|
|
|
2324
2328
|
legacy: object;
|
|
2325
2329
|
oApi: object;
|
|
2326
2330
|
order: object;
|
|
2331
|
+
oSort: object;
|
|
2327
2332
|
pager: object;
|
|
2328
2333
|
renderer: object;
|
|
2329
2334
|
search: any[];
|