|
|
@ -4,20 +4,20 @@ |
|
|
|
* |
|
|
|
* To rebuild or modify this file with the latest versions of the included |
|
|
|
* software please visit: |
|
|
|
* https://datatables.net/download/#bs5/dt-1.13.4
|
|
|
|
* https://datatables.net/download/#bs5/dt-1.13.6
|
|
|
|
* |
|
|
|
* Included libraries: |
|
|
|
* DataTables 1.13.4 |
|
|
|
* DataTables 1.13.6 |
|
|
|
*/ |
|
|
|
|
|
|
|
/*! DataTables 1.13.4 |
|
|
|
/*! DataTables 1.13.6 |
|
|
|
* ©2008-2023 SpryMedia Ltd - datatables.net/license |
|
|
|
*/ |
|
|
|
|
|
|
|
/** |
|
|
|
* @summary DataTables |
|
|
|
* @description Paginate, search and order HTML tables |
|
|
|
* @version 1.13.4 |
|
|
|
* @version 1.13.6 |
|
|
|
* @author SpryMedia Ltd |
|
|
|
* @contact www.datatables.net |
|
|
|
* @copyright SpryMedia Ltd. |
|
|
@ -50,7 +50,7 @@ |
|
|
|
// returns a factory function that expects the window object
|
|
|
|
var jq = require('jquery'); |
|
|
|
|
|
|
|
if (typeof window !== 'undefined') { |
|
|
|
if (typeof window === 'undefined') { |
|
|
|
module.exports = function (root, $) { |
|
|
|
if ( ! root ) { |
|
|
|
// CommonJS environments without a window global must pass a
|
|
|
@ -1396,7 +1396,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
var _isNumber = function ( d, decimalPoint, formatted ) { |
|
|
|
let type = typeof d; |
|
|
|
var type = typeof d; |
|
|
|
var strType = type === 'string'; |
|
|
|
|
|
|
|
if ( type === 'number' || type === 'bigint') { |
|
|
@ -1530,7 +1530,9 @@ |
|
|
|
|
|
|
|
|
|
|
|
var _stripHtml = function ( d ) { |
|
|
|
return d.replace( _re_html, '' ); |
|
|
|
return d |
|
|
|
.replace( _re_html, '' ) // Complete tags
|
|
|
|
.replace(/<script/i, ''); // Safety for incomplete script tag
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -1904,7 +1906,10 @@ |
|
|
|
continue; |
|
|
|
} |
|
|
|
|
|
|
|
if ( data === null || data[ a[i] ] === undefined ) { |
|
|
|
if (data === null || data[ a[i] ] === null) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
else if ( data === undefined || data[ a[i] ] === undefined ) { |
|
|
|
return undefined; |
|
|
|
} |
|
|
|
|
|
|
@ -2351,6 +2356,12 @@ |
|
|
|
oCol.aDataSort = [ oOptions.iDataSort ]; |
|
|
|
} |
|
|
|
_fnMap( oCol, oOptions, "aDataSort" ); |
|
|
|
|
|
|
|
// Fall back to the aria-label attribute on the table header if no ariaTitle is
|
|
|
|
// provided.
|
|
|
|
if (! oCol.ariaTitle) { |
|
|
|
oCol.ariaTitle = th.attr("aria-label"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/* Cache the data get and set functions for speed */ |
|
|
@ -4075,11 +4086,16 @@ |
|
|
|
settings.iDraw++; |
|
|
|
_fnProcessingDisplay( settings, true ); |
|
|
|
|
|
|
|
// Keep track of drawHold state to handle scrolling after the Ajax call
|
|
|
|
var drawHold = settings._drawHold; |
|
|
|
|
|
|
|
_fnBuildAjax( |
|
|
|
settings, |
|
|
|
_fnAjaxParameters( settings ), |
|
|
|
function(json) { |
|
|
|
settings._drawHold = drawHold; |
|
|
|
_fnAjaxUpdateDraw( settings, json ); |
|
|
|
settings._drawHold = false; |
|
|
|
} |
|
|
|
); |
|
|
|
} |
|
|
@ -4343,7 +4359,7 @@ |
|
|
|
_fnThrottle( searchFn, searchDelay ) : |
|
|
|
searchFn |
|
|
|
) |
|
|
|
.on( 'mouseup', function(e) { |
|
|
|
.on( 'mouseup.DT', function(e) { |
|
|
|
// Edge fix! Edge 17 does not trigger anything other than mouse events when clicking
|
|
|
|
// on the clear icon (Edge bug 17584515). This is safe in other browsers as `searchFn`
|
|
|
|
// checks the value to see if it has changed. In other browsers it won't have.
|
|
|
@ -4409,7 +4425,7 @@ |
|
|
|
if ( _fnDataSource( oSettings ) != 'ssp' ) |
|
|
|
{ |
|
|
|
/* Global filter */ |
|
|
|
_fnFilter( oSettings, oInput.sSearch, iForce, fnRegex(oInput), oInput.bSmart, oInput.bCaseInsensitive, oInput.return ); |
|
|
|
_fnFilter( oSettings, oInput.sSearch, iForce, fnRegex(oInput), oInput.bSmart, oInput.bCaseInsensitive ); |
|
|
|
fnSaveFilter( oInput ); |
|
|
|
|
|
|
|
/* Now do the individual column filter */ |
|
|
@ -4578,11 +4594,15 @@ |
|
|
|
* |
|
|
|
* ^(?=.*?\bone\b)(?=.*?\btwo three\b)(?=.*?\bfour\b).*$ |
|
|
|
*/ |
|
|
|
var a = $.map( search.match( /"[^"]+"|[^ ]+/g ) || [''], function ( word ) { |
|
|
|
var a = $.map( search.match( /["\u201C][^"\u201D]+["\u201D]|[^ ]+/g ) || [''], function ( word ) { |
|
|
|
if ( word.charAt(0) === '"' ) { |
|
|
|
var m = word.match( /^"(.*)"$/ ); |
|
|
|
word = m ? m[1] : word; |
|
|
|
} |
|
|
|
else if ( word.charAt(0) === '\u201C' ) { |
|
|
|
var m = word.match( /^\u201C(.*)\u201D$/ ); |
|
|
|
word = m ? m[1] : word; |
|
|
|
} |
|
|
|
|
|
|
|
return word.replace('"', ''); |
|
|
|
} ); |
|
|
@ -9386,7 +9406,8 @@ |
|
|
|
* Set the jQuery or window object to be used by DataTables |
|
|
|
* |
|
|
|
* @param {*} module Library / container object |
|
|
|
* @param {string} type Library or container type `lib` or `win`. |
|
|
|
* @param {string} [type] Library or container type `lib`, `win` or `datetime`. |
|
|
|
* If not provided, automatic detection is attempted. |
|
|
|
*/ |
|
|
|
DataTable.use = function (module, type) { |
|
|
|
if (type === 'lib' || module.fn) { |
|
|
@ -9396,6 +9417,9 @@ |
|
|
|
window = module; |
|
|
|
document = module.document; |
|
|
|
} |
|
|
|
else if (type === 'datetime' || module.type === 'DateTime') { |
|
|
|
DataTable.DateTime = module; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -9755,7 +9779,9 @@ |
|
|
|
resolved._; |
|
|
|
} |
|
|
|
|
|
|
|
return resolved.replace( '%d', plural ); // nb: plural might be undefined,
|
|
|
|
return typeof resolved === 'string' |
|
|
|
? resolved.replace( '%d', plural ) // nb: plural might be undefined,
|
|
|
|
: resolved; |
|
|
|
} ); |
|
|
|
/** |
|
|
|
* Version string for plug-ins to check compatibility. Allowed format is |
|
|
@ -9765,7 +9791,7 @@ |
|
|
|
* @type string |
|
|
|
* @default Version number |
|
|
|
*/ |
|
|
|
DataTable.version = "1.13.4"; |
|
|
|
DataTable.version = "1.13.6"; |
|
|
|
|
|
|
|
/** |
|
|
|
* Private data store, containing all of the settings objects that are |
|
|
@ -14189,7 +14215,7 @@ |
|
|
|
* |
|
|
|
* @type string |
|
|
|
*/ |
|
|
|
build:"bs5/dt-1.13.4", |
|
|
|
build:"bs5/dt-1.13.6", |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
@ -14830,7 +14856,7 @@ |
|
|
|
var btnDisplay, btnClass; |
|
|
|
|
|
|
|
var attach = function( container, buttons ) { |
|
|
|
var i, ien, node, button, tabIndex; |
|
|
|
var i, ien, node, button; |
|
|
|
var disabledClass = classes.sPageButtonDisabled; |
|
|
|
var clickHandler = function ( e ) { |
|
|
|
_fnPageChange( settings, e.data.action, true ); |
|
|
@ -14845,9 +14871,10 @@ |
|
|
|
attach( inner, button ); |
|
|
|
} |
|
|
|
else { |
|
|
|
var disabled = false; |
|
|
|
|
|
|
|
btnDisplay = null; |
|
|
|
btnClass = button; |
|
|
|
tabIndex = settings.iTabIndex; |
|
|
|
|
|
|
|
switch ( button ) { |
|
|
|
case 'ellipsis': |
|
|
@ -14858,8 +14885,7 @@ |
|
|
|
btnDisplay = lang.sFirst; |
|
|
|
|
|
|
|
if ( page === 0 ) { |
|
|
|
tabIndex = -1; |
|
|
|
btnClass += ' ' + disabledClass; |
|
|
|
disabled = true; |
|
|
|
} |
|
|
|
break; |
|
|
|
|
|
|
@ -14867,8 +14893,7 @@ |
|
|
|
btnDisplay = lang.sPrevious; |
|
|
|
|
|
|
|
if ( page === 0 ) { |
|
|
|
tabIndex = -1; |
|
|
|
btnClass += ' ' + disabledClass; |
|
|
|
disabled = true; |
|
|
|
} |
|
|
|
break; |
|
|
|
|
|
|
@ -14876,8 +14901,7 @@ |
|
|
|
btnDisplay = lang.sNext; |
|
|
|
|
|
|
|
if ( pages === 0 || page === pages-1 ) { |
|
|
|
tabIndex = -1; |
|
|
|
btnClass += ' ' + disabledClass; |
|
|
|
disabled = true; |
|
|
|
} |
|
|
|
break; |
|
|
|
|
|
|
@ -14885,8 +14909,7 @@ |
|
|
|
btnDisplay = lang.sLast; |
|
|
|
|
|
|
|
if ( pages === 0 || page === pages-1 ) { |
|
|
|
tabIndex = -1; |
|
|
|
btnClass += ' ' + disabledClass; |
|
|
|
disabled = true; |
|
|
|
} |
|
|
|
break; |
|
|
|
|
|
|
@ -14899,18 +14922,20 @@ |
|
|
|
|
|
|
|
if ( btnDisplay !== null ) { |
|
|
|
var tag = settings.oInit.pagingTag || 'a'; |
|
|
|
var disabled = btnClass.indexOf(disabledClass) !== -1; |
|
|
|
|
|
|
|
|
|
|
|
if (disabled) { |
|
|
|
btnClass += ' ' + disabledClass; |
|
|
|
} |
|
|
|
|
|
|
|
node = $('<'+tag+'>', { |
|
|
|
'class': classes.sPageButton+' '+btnClass, |
|
|
|
'aria-controls': settings.sTableId, |
|
|
|
'aria-disabled': disabled ? 'true' : null, |
|
|
|
'aria-label': aria[ button ], |
|
|
|
'aria-role': 'link', |
|
|
|
'role': 'link', |
|
|
|
'aria-current': btnClass === classes.sPageButtonActive ? 'page' : null, |
|
|
|
'data-dt-idx': button, |
|
|
|
'tabindex': tabIndex, |
|
|
|
'tabindex': disabled ? -1 : settings.iTabIndex, |
|
|
|
'id': idx === 0 && typeof button === 'string' ? |
|
|
|
settings.sTableId +'_'+ button : |
|
|
|
null |
|
|
@ -15041,7 +15066,7 @@ |
|
|
|
return -Infinity; |
|
|
|
} |
|
|
|
|
|
|
|
let type = typeof d; |
|
|
|
var type = typeof d; |
|
|
|
|
|
|
|
if (type === 'number' || type === 'bigint') { |
|
|
|
return d; |
|
|
@ -15415,7 +15440,7 @@ |
|
|
|
var __thousands = ','; |
|
|
|
var __decimal = '.'; |
|
|
|
|
|
|
|
if (Intl) { |
|
|
|
if (window.Intl !== undefined) { |
|
|
|
try { |
|
|
|
var num = new Intl.NumberFormat().formatToParts(100000.1); |
|
|
|
|
|
|
@ -15718,7 +15743,7 @@ |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
if (typeof window !== 'undefined') { |
|
|
|
if (typeof window === 'undefined') { |
|
|
|
module.exports = function (root, $) { |
|
|
|
if ( ! root ) { |
|
|
|
// CommonJS environments without a window global must pass a
|
|
|
@ -15856,10 +15881,10 @@ DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, bu |
|
|
|
'aria-controls': settings.sTableId, |
|
|
|
'aria-disabled': disabled ? 'true' : null, |
|
|
|
'aria-label': aria[ button ], |
|
|
|
'aria-role': 'link', |
|
|
|
'role': 'link', |
|
|
|
'aria-current': btnClass === 'active' ? 'page' : null, |
|
|
|
'data-dt-idx': button, |
|
|
|
'tabindex': settings.iTabIndex, |
|
|
|
'tabindex': disabled ? -1 : settings.iTabIndex, |
|
|
|
'class': 'page-link' |
|
|
|
} ) |
|
|
|
.html( btnDisplay ) |
|
|
|