Bootstrap 4.5.3 and dependencies update
This commit is contained in:
113
vendor/datatables/jquery.dataTables.js
vendored
113
vendor/datatables/jquery.dataTables.js
vendored
@@ -1,11 +1,11 @@
|
||||
/*! DataTables 1.10.21
|
||||
/*! DataTables 1.10.22
|
||||
* ©2008-2020 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @summary DataTables
|
||||
* @description Paginate, search and order HTML tables
|
||||
* @version 1.10.21
|
||||
* @version 1.10.22
|
||||
* @file jquery.dataTables.js
|
||||
* @author SpryMedia Ltd
|
||||
* @contact www.datatables.net
|
||||
@@ -251,7 +251,7 @@
|
||||
var api = this.api( true );
|
||||
|
||||
/* Check if we want to add multiple rows or not */
|
||||
var rows = $.isArray(data) && ( $.isArray(data[0]) || $.isPlainObject(data[0]) ) ?
|
||||
var rows = Array.isArray(data) && ( Array.isArray(data[0]) || $.isPlainObject(data[0]) ) ?
|
||||
api.rows.add( data ) :
|
||||
api.row.add( data );
|
||||
|
||||
@@ -975,7 +975,7 @@
|
||||
// If the length menu is given, but the init display length is not, use the length menu
|
||||
if ( oInit.aLengthMenu && ! oInit.iDisplayLength )
|
||||
{
|
||||
oInit.iDisplayLength = $.isArray( oInit.aLengthMenu[0] ) ?
|
||||
oInit.iDisplayLength = Array.isArray( oInit.aLengthMenu[0] ) ?
|
||||
oInit.aLengthMenu[0][0] : oInit.aLengthMenu[0];
|
||||
}
|
||||
|
||||
@@ -1066,7 +1066,7 @@
|
||||
if ( oInit.iDeferLoading !== null )
|
||||
{
|
||||
oSettings.bDeferLoading = true;
|
||||
var tmp = $.isArray( oInit.iDeferLoading );
|
||||
var tmp = Array.isArray( oInit.iDeferLoading );
|
||||
oSettings._iRecordsDisplay = tmp ? oInit.iDeferLoading[0] : oInit.iDeferLoading;
|
||||
oSettings._iRecordsTotal = tmp ? oInit.iDeferLoading[1] : oInit.iDeferLoading;
|
||||
}
|
||||
@@ -1356,7 +1356,7 @@
|
||||
// - Ƀ - Bitcoin
|
||||
// - Ξ - Ethereum
|
||||
// standards as thousands separators.
|
||||
var _re_formatted_numeric = /[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi;
|
||||
var _re_formatted_numeric = /['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi;
|
||||
|
||||
|
||||
var _empty = function ( d ) {
|
||||
@@ -1584,6 +1584,36 @@
|
||||
return out;
|
||||
};
|
||||
|
||||
// Surprisingly this is faster than [].concat.apply
|
||||
// https://jsperf.com/flatten-an-array-loop-vs-reduce/2
|
||||
var _flatten = function (out, val) {
|
||||
if (Array.isArray(val)) {
|
||||
for (var i=0 ; i<val.length ; i++) {
|
||||
_flatten(out, val[i]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
out.push(val);
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
// Array.isArray polyfill.
|
||||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray
|
||||
if (! Array.isArray) {
|
||||
Array.isArray = function(arg) {
|
||||
return Object.prototype.toString.call(arg) === '[object Array]';
|
||||
};
|
||||
}
|
||||
|
||||
// .trim() polyfill
|
||||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim
|
||||
if (!String.prototype.trim) {
|
||||
String.prototype.trim = function () {
|
||||
return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* DataTables utility methods
|
||||
@@ -1841,7 +1871,7 @@
|
||||
|
||||
// orderData can be given as an integer
|
||||
var dataSort = init.aDataSort;
|
||||
if ( typeof dataSort === 'number' && ! $.isArray( dataSort ) ) {
|
||||
if ( typeof dataSort === 'number' && ! Array.isArray( dataSort ) ) {
|
||||
init.aDataSort = [ dataSort ];
|
||||
}
|
||||
}
|
||||
@@ -2325,7 +2355,7 @@
|
||||
def.targets :
|
||||
def.aTargets;
|
||||
|
||||
if ( ! $.isArray( aTargets ) )
|
||||
if ( ! Array.isArray( aTargets ) )
|
||||
{
|
||||
aTargets = [ aTargets ];
|
||||
}
|
||||
@@ -2644,7 +2674,7 @@
|
||||
innerSrc = a.join('.');
|
||||
|
||||
// Traverse each entry in the array getting the properties requested
|
||||
if ( $.isArray( data ) ) {
|
||||
if ( Array.isArray( data ) ) {
|
||||
for ( var j=0, jLen=data.length ; j<jLen ; j++ ) {
|
||||
out.push( fetchData( data[j], type, innerSrc ) );
|
||||
}
|
||||
@@ -2732,6 +2762,11 @@
|
||||
|
||||
for ( var i=0, iLen=a.length-1 ; i<iLen ; i++ )
|
||||
{
|
||||
// Protect against prototype pollution
|
||||
if (a[i] === '__proto__') {
|
||||
throw new Error('Cannot set prototype values');
|
||||
}
|
||||
|
||||
// Check if we are dealing with an array notation request
|
||||
arrayNotation = a[i].match(__reArray);
|
||||
funcNotation = a[i].match(__reFn);
|
||||
@@ -2747,7 +2782,7 @@
|
||||
innerSrc = b.join('.');
|
||||
|
||||
// Traverse each entry in the array setting the properties requested
|
||||
if ( $.isArray( val ) )
|
||||
if ( Array.isArray( val ) )
|
||||
{
|
||||
for ( var j=0, jLen=val.length ; j<jLen ; j++ )
|
||||
{
|
||||
@@ -2994,7 +3029,7 @@
|
||||
var cellProcess = function ( cell ) {
|
||||
if ( colIdx === undefined || colIdx === i ) {
|
||||
col = columns[i];
|
||||
contents = $.trim(cell.innerHTML);
|
||||
contents = (cell.innerHTML).trim();
|
||||
|
||||
if ( col && col._bAttrSrc ) {
|
||||
var setter = _fnSetObjectDataFn( col.mData._ );
|
||||
@@ -3244,11 +3279,11 @@
|
||||
}
|
||||
|
||||
/* ARIA role for the rows */
|
||||
$(thead).find('>tr').attr('role', 'row');
|
||||
$(thead).children('tr').attr('role', 'row');
|
||||
|
||||
/* Deal with the footer - add classes if required */
|
||||
$(thead).find('>tr>th, >tr>td').addClass( classes.sHeaderTH );
|
||||
$(tfoot).find('>tr>th, >tr>td').addClass( classes.sFooterTH );
|
||||
$(thead).children('tr').children('th, td').addClass( classes.sHeaderTH );
|
||||
$(tfoot).children('tr').children('th, td').addClass( classes.sFooterTH );
|
||||
|
||||
// Cache the footer cells. Note that we only take the cells from the first
|
||||
// row in the footer. If there is more than one row the user wants to
|
||||
@@ -3834,7 +3869,7 @@
|
||||
|
||||
// Convert to object based for 1.10+ if using the old array scheme which can
|
||||
// come from server-side processing or serverParams
|
||||
if ( data && $.isArray(data) ) {
|
||||
if ( data && Array.isArray(data) ) {
|
||||
var tmp = {};
|
||||
var rbracket = /(.*?)\[\]$/;
|
||||
|
||||
@@ -4819,7 +4854,7 @@
|
||||
classes = settings.oClasses,
|
||||
tableId = settings.sTableId,
|
||||
menu = settings.aLengthMenu,
|
||||
d2 = $.isArray( menu[0] ),
|
||||
d2 = Array.isArray( menu[0] ),
|
||||
lengths = d2 ? menu[0] : menu,
|
||||
language = d2 ? menu[1] : menu;
|
||||
|
||||
@@ -5865,7 +5900,7 @@
|
||||
fixedObj = $.isPlainObject( fixed ),
|
||||
nestedSort = [],
|
||||
add = function ( a ) {
|
||||
if ( a.length && ! $.isArray( a[0] ) ) {
|
||||
if ( a.length && ! Array.isArray( a[0] ) ) {
|
||||
// 1D array
|
||||
nestedSort.push( a );
|
||||
}
|
||||
@@ -5877,7 +5912,7 @@
|
||||
|
||||
// Build the sort array, with pre-fix and post-fix options if they have been
|
||||
// specified
|
||||
if ( $.isArray( fixed ) ) {
|
||||
if ( Array.isArray( fixed ) ) {
|
||||
add( fixed );
|
||||
}
|
||||
|
||||
@@ -6506,9 +6541,9 @@
|
||||
*/
|
||||
function _fnMap( ret, src, name, mappedName )
|
||||
{
|
||||
if ( $.isArray( name ) ) {
|
||||
if ( Array.isArray( name ) ) {
|
||||
$.each( name, function (i, val) {
|
||||
if ( $.isArray( val ) ) {
|
||||
if ( Array.isArray( val ) ) {
|
||||
_fnMap( ret, src, val[0], val[1] );
|
||||
}
|
||||
else {
|
||||
@@ -6560,7 +6595,7 @@
|
||||
}
|
||||
$.extend( true, out[prop], val );
|
||||
}
|
||||
else if ( breakRefs && prop !== 'data' && prop !== 'aaData' && $.isArray(val) ) {
|
||||
else if ( breakRefs && prop !== 'data' && prop !== 'aaData' && Array.isArray(val) ) {
|
||||
out[prop] = val.slice();
|
||||
}
|
||||
else {
|
||||
@@ -6904,7 +6939,7 @@
|
||||
}
|
||||
};
|
||||
|
||||
if ( $.isArray( context ) ) {
|
||||
if ( Array.isArray( context ) ) {
|
||||
for ( var i=0, ien=context.length ; i<ien ; i++ ) {
|
||||
ctxSettings( context[i] );
|
||||
}
|
||||
@@ -7262,7 +7297,7 @@
|
||||
|
||||
_Api.register = _api_register = function ( name, val )
|
||||
{
|
||||
if ( $.isArray( name ) ) {
|
||||
if ( Array.isArray( name ) ) {
|
||||
for ( var j=0, jen=name.length ; j<jen ; j++ ) {
|
||||
_Api.register( name[j], val );
|
||||
}
|
||||
@@ -7332,7 +7367,7 @@
|
||||
// New API instance returned, want the value from the first item
|
||||
// in the returned array for the singular result.
|
||||
return ret.length ?
|
||||
$.isArray( ret[0] ) ?
|
||||
Array.isArray( ret[0] ) ?
|
||||
new _Api( ret.context, ret[0] ) : // Array results are 'enhanced'
|
||||
ret[0] :
|
||||
undefined;
|
||||
@@ -7355,7 +7390,7 @@
|
||||
*/
|
||||
var __table_selector = function ( selector, a )
|
||||
{
|
||||
if ( $.isArray(selector) ) {
|
||||
if ( Array.isArray(selector) ) {
|
||||
return $.map( selector, function (item) {
|
||||
return __table_selector(item, a);
|
||||
} );
|
||||
@@ -7744,7 +7779,7 @@
|
||||
[ selector[i] ];
|
||||
|
||||
for ( j=0, jen=a.length ; j<jen ; j++ ) {
|
||||
res = selectFn( typeof a[j] === 'string' ? $.trim(a[j]) : a[j] );
|
||||
res = selectFn( typeof a[j] === 'string' ? (a[j]).trim() : a[j] );
|
||||
|
||||
if ( res && res.length ) {
|
||||
out = out.concat( res );
|
||||
@@ -8170,7 +8205,7 @@
|
||||
row._aData = data;
|
||||
|
||||
// If the DOM has an id, and the data source is an array
|
||||
if ( $.isArray( data ) && row.nTr && row.nTr.id ) {
|
||||
if ( Array.isArray( data ) && row.nTr && row.nTr.id ) {
|
||||
_fnSetObjectDataFn( ctx[0].rowId )( data, row.nTr.id );
|
||||
}
|
||||
|
||||
@@ -8216,7 +8251,7 @@
|
||||
var rows = [];
|
||||
var addRow = function ( r, k ) {
|
||||
// Recursion to allow for arrays of jQuery objects
|
||||
if ( $.isArray( r ) || r instanceof $ ) {
|
||||
if ( Array.isArray( r ) || r instanceof $ ) {
|
||||
for ( var i=0, ien=r.length ; i<ien ; i++ ) {
|
||||
addRow( r[i], k );
|
||||
}
|
||||
@@ -8230,7 +8265,7 @@
|
||||
}
|
||||
else {
|
||||
// Otherwise create a row with a wrapper
|
||||
var created = $('<tr><td/></tr>').addClass( k );
|
||||
var created = $('<tr><td></td></tr>').addClass( k );
|
||||
$('td', created)
|
||||
.addClass( k )
|
||||
.html( r )
|
||||
@@ -8726,14 +8761,12 @@
|
||||
return _selector_first( this.columns( selector, opts ) );
|
||||
} );
|
||||
|
||||
|
||||
|
||||
var __cell_selector = function ( settings, selector, opts )
|
||||
{
|
||||
var data = settings.aoData;
|
||||
var rows = _selector_row_indexes( settings, opts );
|
||||
var cells = _removeEmpty( _pluck_order( data, rows, 'anCells' ) );
|
||||
var allCells = $( [].concat.apply([], cells) );
|
||||
var allCells = $(_flatten( [], cells ));
|
||||
var row;
|
||||
var columns = settings.aoColumns.length;
|
||||
var a, i, ien, j, o, host;
|
||||
@@ -9005,7 +9038,7 @@
|
||||
// Simple column / direction passed in
|
||||
order = [ [ order, dir ] ];
|
||||
}
|
||||
else if ( order.length && ! $.isArray( order[0] ) ) {
|
||||
else if ( order.length && ! Array.isArray( order[0] ) ) {
|
||||
// Arguments passed in (list of 1D arrays)
|
||||
order = Array.prototype.slice.call( arguments );
|
||||
}
|
||||
@@ -9041,7 +9074,7 @@
|
||||
ctx[0].aaSortingFixed :
|
||||
undefined;
|
||||
|
||||
return $.isArray( fixed ) ?
|
||||
return Array.isArray( fixed ) ?
|
||||
{ pre: fixed } :
|
||||
fixed;
|
||||
}
|
||||
@@ -9501,7 +9534,7 @@
|
||||
* @type string
|
||||
* @default Version number
|
||||
*/
|
||||
DataTable.version = "1.10.21";
|
||||
DataTable.version = "1.10.22";
|
||||
|
||||
/**
|
||||
* Private data store, containing all of the settings objects that are
|
||||
@@ -9919,8 +9952,8 @@
|
||||
* version is still, internally the primary interface, but is is not documented
|
||||
* - hence the @name tags in each doc comment. This allows a Javascript function
|
||||
* to create a map from Hungarian notation to camel case (going the other direction
|
||||
* would require each property to be listed, which would at around 3K to the size
|
||||
* of DataTables, while this method is about a 0.5K hit.
|
||||
* would require each property to be listed, which would add around 3K to the size
|
||||
* of DataTables, while this method is about a 0.5K hit).
|
||||
*
|
||||
* Ultimately this does pave the way for Hungarian notation to be dropped
|
||||
* completely, but that is a massive amount of work and will break current
|
||||
@@ -14575,7 +14608,7 @@
|
||||
for ( i=0, ien=buttons.length ; i<ien ; i++ ) {
|
||||
button = buttons[i];
|
||||
|
||||
if ( $.isArray( button ) ) {
|
||||
if ( Array.isArray( button ) ) {
|
||||
var inner = $( '<'+(button.DT_el || 'div')+'/>' )
|
||||
.appendTo( container );
|
||||
attach( inner, button );
|
||||
@@ -14620,14 +14653,14 @@
|
||||
case 'last':
|
||||
btnDisplay = lang.sLast;
|
||||
|
||||
if ( page === pages-1 ) {
|
||||
if ( pages === 0 || page === pages-1 ) {
|
||||
tabIndex = -1;
|
||||
btnClass += ' ' + disabledClass;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
btnDisplay = button + 1;
|
||||
btnDisplay = settings.fnFormatNumber( button + 1 );
|
||||
btnClass = page === button ?
|
||||
classes.sPageButtonActive : '';
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user