@ntlab/ntjs-assets 2.16.0 → 2.18.0
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/assets/js/DataTables/DataTables/css/dataTables.bootstrap5.css +8 -5
- package/assets/js/DataTables/DataTables/css/dataTables.bootstrap5.min.css +1 -1
- package/assets/js/DataTables/DataTables/css/dataTables.dataTables.css +33 -46
- package/assets/js/DataTables/DataTables/css/dataTables.dataTables.min.css +1 -1
- package/assets/js/DataTables/DataTables/js/dataTables.bootstrap5.js +0 -35
- package/assets/js/DataTables/DataTables/js/dataTables.js +298 -98
- package/assets/js/DataTables/DataTables/js/dataTables.min.js +2 -2
- package/assets/js/DataTables/Extensions/DateTime/css/dataTables.dateTime.css +54 -16
- package/assets/js/DataTables/Extensions/DateTime/css/dataTables.dateTime.min.css +1 -1
- package/assets/js/DataTables/Extensions/DateTime/js/dataTables.dateTime.js +46 -10
- package/assets/js/DataTables/Extensions/DateTime/js/dataTables.dateTime.min.js +2 -2
- package/assets/js/DataTables/Extensions/Select/js/dataTables.select.js +245 -15
- package/assets/js/DataTables/Extensions/Select/js/dataTables.select.min.js +2 -2
- package/assets/js/cdn.json +3 -3
- package/package.json +1 -1
|
@@ -1,25 +1,7 @@
|
|
|
1
|
-
/*! DataTables 2.
|
|
1
|
+
/*! DataTables 2.2.0
|
|
2
2
|
* © SpryMedia Ltd - datatables.net/license
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* @summary DataTables
|
|
7
|
-
* @description Paginate, search and order HTML tables
|
|
8
|
-
* @version 2.1.8
|
|
9
|
-
* @author SpryMedia Ltd
|
|
10
|
-
* @contact www.datatables.net
|
|
11
|
-
* @copyright SpryMedia Ltd.
|
|
12
|
-
*
|
|
13
|
-
* This source file is free software, available under the following license:
|
|
14
|
-
* MIT license - https://datatables.net/license
|
|
15
|
-
*
|
|
16
|
-
* This source file is distributed in the hope that it will be useful, but
|
|
17
|
-
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
18
|
-
* or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
|
|
19
|
-
*
|
|
20
|
-
* For details please refer to: https://www.datatables.net
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
5
|
(function( factory ) {
|
|
24
6
|
"use strict";
|
|
25
7
|
|
|
@@ -429,7 +411,6 @@
|
|
|
429
411
|
thead = $('<thead/>').appendTo($this);
|
|
430
412
|
}
|
|
431
413
|
oSettings.nTHead = thead[0];
|
|
432
|
-
$('tr', thead).addClass(oClasses.thead.row);
|
|
433
414
|
|
|
434
415
|
var tbody = $this.children('tbody');
|
|
435
416
|
if ( tbody.length === 0 ) {
|
|
@@ -444,7 +425,6 @@
|
|
|
444
425
|
tfoot = $('<tfoot/>').appendTo($this);
|
|
445
426
|
}
|
|
446
427
|
oSettings.nTFoot = tfoot[0];
|
|
447
|
-
$('tr', tfoot).addClass(oClasses.tfoot.row);
|
|
448
428
|
|
|
449
429
|
// Copy the data index array
|
|
450
430
|
oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
|
|
@@ -2161,6 +2141,10 @@
|
|
|
2161
2141
|
var width = _fnColumnsSumWidth(settings, [i], false, false);
|
|
2162
2142
|
|
|
2163
2143
|
cols[i].colEl.css('width', width);
|
|
2144
|
+
|
|
2145
|
+
if (settings.oScroll.sX) {
|
|
2146
|
+
cols[i].colEl.css('min-width', width);
|
|
2147
|
+
}
|
|
2164
2148
|
}
|
|
2165
2149
|
}
|
|
2166
2150
|
|
|
@@ -3228,9 +3212,13 @@
|
|
|
3228
3212
|
|
|
3229
3213
|
// Add the number of cells needed to make up to the number of columns
|
|
3230
3214
|
if (row.length === 1) {
|
|
3231
|
-
var
|
|
3215
|
+
var cellCount = 0;
|
|
3216
|
+
|
|
3217
|
+
$('td, th', row).each(function () {
|
|
3218
|
+
cellCount += this.colSpan;
|
|
3219
|
+
});
|
|
3232
3220
|
|
|
3233
|
-
for ( i=
|
|
3221
|
+
for ( i=cellCount, ien=columns.length ; i<ien ; i++ ) {
|
|
3234
3222
|
$('<th/>')
|
|
3235
3223
|
.html( columns[i][titleProp] || '' )
|
|
3236
3224
|
.appendTo( row );
|
|
@@ -3242,9 +3230,11 @@
|
|
|
3242
3230
|
|
|
3243
3231
|
if (side === 'header') {
|
|
3244
3232
|
settings.aoHeader = detected;
|
|
3233
|
+
$('tr', target).addClass(classes.thead.row);
|
|
3245
3234
|
}
|
|
3246
3235
|
else {
|
|
3247
3236
|
settings.aoFooter = detected;
|
|
3237
|
+
$('tr', target).addClass(classes.tfoot.row);
|
|
3248
3238
|
}
|
|
3249
3239
|
|
|
3250
3240
|
// Every cell needs to be passed through the renderer
|
|
@@ -4507,7 +4497,7 @@
|
|
|
4507
4497
|
// So the array reference doesn't break set the results into the
|
|
4508
4498
|
// existing array
|
|
4509
4499
|
displayRows.length = 0;
|
|
4510
|
-
|
|
4500
|
+
_fnArrayApply(displayRows, rows);
|
|
4511
4501
|
}
|
|
4512
4502
|
}
|
|
4513
4503
|
|
|
@@ -5235,8 +5225,11 @@
|
|
|
5235
5225
|
// [].find, but it wasn't supported in Chrome until Sept 2015, and DT has 10 year
|
|
5236
5226
|
// browser support
|
|
5237
5227
|
var firstTr = null;
|
|
5228
|
+
var start = _fnDataSource( settings ) !== 'ssp'
|
|
5229
|
+
? settings._iDisplayStart
|
|
5230
|
+
: 0;
|
|
5238
5231
|
|
|
5239
|
-
for (i=
|
|
5232
|
+
for (i=start ; i<start + settings.aiDisplay.length ; i++) {
|
|
5240
5233
|
var idx = settings.aiDisplay[i];
|
|
5241
5234
|
var tr = settings.aoData[idx].nTr;
|
|
5242
5235
|
|
|
@@ -5251,7 +5244,7 @@
|
|
|
5251
5244
|
return {
|
|
5252
5245
|
idx: _fnVisibleToColumnIndex(settings, vis),
|
|
5253
5246
|
width: $(this).outerWidth()
|
|
5254
|
-
}
|
|
5247
|
+
};
|
|
5255
5248
|
});
|
|
5256
5249
|
|
|
5257
5250
|
// Check against what the colgroup > col is set to and correct if needed
|
|
@@ -5261,6 +5254,10 @@
|
|
|
5261
5254
|
|
|
5262
5255
|
if (colWidth !== colSizes[i].width) {
|
|
5263
5256
|
colEl.style.width = colSizes[i].width + 'px';
|
|
5257
|
+
|
|
5258
|
+
if (scroll.sX) {
|
|
5259
|
+
colEl.style.minWidth = colSizes[i].width + 'px';
|
|
5260
|
+
}
|
|
5264
5261
|
}
|
|
5265
5262
|
}
|
|
5266
5263
|
}
|
|
@@ -5410,6 +5407,8 @@
|
|
|
5410
5407
|
// browser will collapse it. If this width is smaller than the
|
|
5411
5408
|
// width the column requires, then it will have no effect
|
|
5412
5409
|
if ( scrollX ) {
|
|
5410
|
+
this.style.minWidth = width;
|
|
5411
|
+
|
|
5413
5412
|
$( this ).append( $('<div/>').css( {
|
|
5414
5413
|
width: width,
|
|
5415
5414
|
margin: 0,
|
|
@@ -5519,15 +5518,52 @@
|
|
|
5519
5518
|
}
|
|
5520
5519
|
|
|
5521
5520
|
if ( (tableWidthAttr || scrollX) && ! settings._reszEvt ) {
|
|
5522
|
-
var
|
|
5523
|
-
$(
|
|
5524
|
-
|
|
5525
|
-
|
|
5521
|
+
var wrapperWidth = function () {
|
|
5522
|
+
return $(settings.nTableWrapper).is(':visible')
|
|
5523
|
+
? $(settings.nTableWrapper).width()
|
|
5524
|
+
: 0;
|
|
5525
|
+
}
|
|
5526
|
+
|
|
5527
|
+
settings.containerWidth = wrapperWidth();
|
|
5528
|
+
|
|
5529
|
+
var resize = DataTable.util.throttle( function () {
|
|
5530
|
+
var newWidth = wrapperWidth();
|
|
5531
|
+
|
|
5532
|
+
// Don't do it if destroying, is the same size as last time, or the container
|
|
5533
|
+
// width is 0
|
|
5534
|
+
if (
|
|
5535
|
+
! settings.bDestroying &&
|
|
5536
|
+
settings.containerWidth !== newWidth &&
|
|
5537
|
+
newWidth !== 0
|
|
5538
|
+
) {
|
|
5539
|
+
// Do a resize
|
|
5540
|
+
_fnAdjustColumnSizing( settings );
|
|
5541
|
+
settings.containerWidth = newWidth;
|
|
5542
|
+
}
|
|
5543
|
+
} );
|
|
5544
|
+
|
|
5545
|
+
// For browsers that support it (~2020 onwards for wide support) we can watch for the
|
|
5546
|
+
// container changing width.
|
|
5547
|
+
if (window.ResizeObserver) {
|
|
5548
|
+
settings.resizeObserver = new ResizeObserver(function (e) {
|
|
5549
|
+
var box = e[0].contentBoxSize;
|
|
5550
|
+
var size = Array.isArray(box)
|
|
5551
|
+
? box[0].inlineSize // Spec
|
|
5552
|
+
: box.inlineSize; // Old Firefox
|
|
5553
|
+
|
|
5554
|
+
// Under this condition a resize will trigger its own resize, causing an error.
|
|
5555
|
+
if (size < settings.containerWidth) {
|
|
5556
|
+
return;
|
|
5526
5557
|
}
|
|
5527
|
-
} ) );
|
|
5528
|
-
};
|
|
5529
5558
|
|
|
5530
|
-
|
|
5559
|
+
resize();
|
|
5560
|
+
});
|
|
5561
|
+
settings.resizeObserver.observe(settings.nTableWrapper);
|
|
5562
|
+
}
|
|
5563
|
+
else {
|
|
5564
|
+
// For old browsers, the best we can do is listen for a window resize
|
|
5565
|
+
$(window).on('resize.DT-'+settings.sInstance, resize);
|
|
5566
|
+
}
|
|
5531
5567
|
|
|
5532
5568
|
settings._reszEvt = true;
|
|
5533
5569
|
}
|
|
@@ -6141,15 +6177,26 @@
|
|
|
6141
6177
|
return;
|
|
6142
6178
|
}
|
|
6143
6179
|
|
|
6180
|
+
// Sort state saving uses [[idx, order]] structure.
|
|
6181
|
+
var sorting = [];
|
|
6182
|
+
_fnSortResolve(settings, sorting, settings.aaSorting );
|
|
6183
|
+
|
|
6144
6184
|
/* Store the interesting variables */
|
|
6185
|
+
var columns = settings.aoColumns;
|
|
6145
6186
|
var state = {
|
|
6146
6187
|
time: +new Date(),
|
|
6147
6188
|
start: settings._iDisplayStart,
|
|
6148
6189
|
length: settings._iDisplayLength,
|
|
6149
|
-
order:
|
|
6190
|
+
order: sorting.map(function (sort) {
|
|
6191
|
+
// If a column name is available, use it
|
|
6192
|
+
return columns[sort[0]] && columns[sort[0]].sName
|
|
6193
|
+
? [ columns[sort[0]].sName, sort[1] ]
|
|
6194
|
+
: sort.slice();
|
|
6195
|
+
} ),
|
|
6150
6196
|
search: $.extend({}, settings.oPreviousSearch),
|
|
6151
6197
|
columns: settings.aoColumns.map( function ( col, i ) {
|
|
6152
6198
|
return {
|
|
6199
|
+
name: col.sName,
|
|
6153
6200
|
visible: col.bVisible,
|
|
6154
6201
|
search: $.extend({}, settings.aoPreSearchCols[i])
|
|
6155
6202
|
};
|
|
@@ -6197,6 +6244,8 @@
|
|
|
6197
6244
|
function _fnImplementState ( settings, s, callback) {
|
|
6198
6245
|
var i, ien;
|
|
6199
6246
|
var columns = settings.aoColumns;
|
|
6247
|
+
var currentNames = _pluck(settings.aoColumns, 'sName');
|
|
6248
|
+
|
|
6200
6249
|
settings._bLoadingState = true;
|
|
6201
6250
|
|
|
6202
6251
|
// When StateRestore was introduced the state could now be implemented at any time
|
|
@@ -6226,13 +6275,6 @@
|
|
|
6226
6275
|
return;
|
|
6227
6276
|
}
|
|
6228
6277
|
|
|
6229
|
-
// Number of columns have changed - all bets are off, no restore of settings
|
|
6230
|
-
if ( s.columns && columns.length !== s.columns.length ) {
|
|
6231
|
-
settings._bLoadingState = false;
|
|
6232
|
-
callback();
|
|
6233
|
-
return;
|
|
6234
|
-
}
|
|
6235
|
-
|
|
6236
6278
|
// Store the saved state so it might be accessed at any time
|
|
6237
6279
|
settings.oLoadedState = $.extend( true, {}, s );
|
|
6238
6280
|
|
|
@@ -6266,10 +6308,23 @@
|
|
|
6266
6308
|
if ( s.order !== undefined ) {
|
|
6267
6309
|
settings.aaSorting = [];
|
|
6268
6310
|
$.each( s.order, function ( i, col ) {
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
)
|
|
6311
|
+
var set = [ col[0], col[1] ];
|
|
6312
|
+
|
|
6313
|
+
// A column name was stored and should be used for restore
|
|
6314
|
+
if (typeof col[0] === 'string') {
|
|
6315
|
+
var idx = currentNames.indexOf(col[0]);
|
|
6316
|
+
|
|
6317
|
+
// Find the name from the current list of column names, or fallback to index 0
|
|
6318
|
+
set[0] = idx >= 0
|
|
6319
|
+
? idx
|
|
6320
|
+
: 0;
|
|
6321
|
+
}
|
|
6322
|
+
else if (set[0] >= columns.length) {
|
|
6323
|
+
// If a column name, but it is out of bounds, set to 0
|
|
6324
|
+
set[0] = 0;
|
|
6325
|
+
}
|
|
6326
|
+
|
|
6327
|
+
settings.aaSorting.push(set);
|
|
6273
6328
|
} );
|
|
6274
6329
|
}
|
|
6275
6330
|
|
|
@@ -6280,30 +6335,64 @@
|
|
|
6280
6335
|
|
|
6281
6336
|
// Columns
|
|
6282
6337
|
if ( s.columns ) {
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6338
|
+
var set = s.columns;
|
|
6339
|
+
var incoming = _pluck(s.columns, 'name');
|
|
6340
|
+
|
|
6341
|
+
// Check if it is a 2.2 style state object with a `name` property for the columns, and if
|
|
6342
|
+
// the name was defined. If so, then create a new array that will map the state object
|
|
6343
|
+
// given, to the current columns (don't bother if they are already matching tho).
|
|
6344
|
+
if (incoming.join('').length && incoming.join('') !== currentNames.join('')) {
|
|
6345
|
+
set = [];
|
|
6346
|
+
|
|
6347
|
+
// For each column, try to find the name in the incoming array
|
|
6348
|
+
for (i=0 ; i<currentNames.length ; i++) {
|
|
6349
|
+
if (currentNames[i] != '') {
|
|
6350
|
+
var idx = incoming.indexOf(currentNames[i]);
|
|
6351
|
+
|
|
6352
|
+
if (idx >= 0) {
|
|
6353
|
+
set.push(s.columns[idx]);
|
|
6354
|
+
}
|
|
6355
|
+
else {
|
|
6356
|
+
// No matching column name in the state's columns, so this might be a new
|
|
6357
|
+
// column and thus can't have a state already.
|
|
6358
|
+
set.push({});
|
|
6359
|
+
}
|
|
6292
6360
|
}
|
|
6293
6361
|
else {
|
|
6294
|
-
columns
|
|
6362
|
+
// If no name, but other columns did have a name, then there is no knowing
|
|
6363
|
+
// where this one came from originally so it can't be restored.
|
|
6364
|
+
set.push({});
|
|
6295
6365
|
}
|
|
6296
6366
|
}
|
|
6367
|
+
}
|
|
6297
6368
|
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6369
|
+
// If the number of columns to restore is different from current, then all bets are off.
|
|
6370
|
+
if (set.length === columns.length) {
|
|
6371
|
+
for ( i=0, ien=set.length ; i<ien ; i++ ) {
|
|
6372
|
+
var col = set[i];
|
|
6373
|
+
|
|
6374
|
+
// Visibility
|
|
6375
|
+
if ( col.visible !== undefined ) {
|
|
6376
|
+
// If the api is defined, the table has been initialised so we need to use it rather than internal settings
|
|
6377
|
+
if (api) {
|
|
6378
|
+
// Don't redraw the columns on every iteration of this loop, we will do this at the end instead
|
|
6379
|
+
api.column(i).visible(col.visible, false);
|
|
6380
|
+
}
|
|
6381
|
+
else {
|
|
6382
|
+
columns[i].bVisible = col.visible;
|
|
6383
|
+
}
|
|
6384
|
+
}
|
|
6385
|
+
|
|
6386
|
+
// Search
|
|
6387
|
+
if ( col.search !== undefined ) {
|
|
6388
|
+
$.extend( settings.aoPreSearchCols[i], col.search );
|
|
6389
|
+
}
|
|
6390
|
+
}
|
|
6391
|
+
|
|
6392
|
+
// If the api is defined then we need to adjust the columns once the visibility has been changed
|
|
6393
|
+
if (api) {
|
|
6394
|
+
api.columns.adjust();
|
|
6301
6395
|
}
|
|
6302
|
-
}
|
|
6303
|
-
|
|
6304
|
-
// If the api is defined then we need to adjust the columns once the visibility has been changed
|
|
6305
|
-
if (api) {
|
|
6306
|
-
api.columns.adjust();
|
|
6307
6396
|
}
|
|
6308
6397
|
}
|
|
6309
6398
|
|
|
@@ -6621,6 +6710,30 @@
|
|
|
6621
6710
|
replace(/_ENTRIES-TOTAL_/g, settings.api.i18n('entries', '', vis) );
|
|
6622
6711
|
}
|
|
6623
6712
|
|
|
6713
|
+
/**
|
|
6714
|
+
* Add elements to an array as quickly as possible, but stack stafe.
|
|
6715
|
+
*
|
|
6716
|
+
* @param {*} arr Array to add the data to
|
|
6717
|
+
* @param {*} data Data array that is to be added
|
|
6718
|
+
* @returns
|
|
6719
|
+
*/
|
|
6720
|
+
function _fnArrayApply(arr, data) {
|
|
6721
|
+
if (! data) {
|
|
6722
|
+
return;
|
|
6723
|
+
}
|
|
6724
|
+
|
|
6725
|
+
// Chrome can throw a max stack error if apply is called with
|
|
6726
|
+
// too large an array, but apply is faster.
|
|
6727
|
+
if (data.length < 10000) {
|
|
6728
|
+
arr.push.apply(arr, data);
|
|
6729
|
+
}
|
|
6730
|
+
else {
|
|
6731
|
+
for (i=0 ; i<data.length ; i++) {
|
|
6732
|
+
arr.push(data[i]);
|
|
6733
|
+
}
|
|
6734
|
+
}
|
|
6735
|
+
}
|
|
6736
|
+
|
|
6624
6737
|
|
|
6625
6738
|
|
|
6626
6739
|
/**
|
|
@@ -6813,18 +6926,7 @@
|
|
|
6813
6926
|
: settings;
|
|
6814
6927
|
|
|
6815
6928
|
// Initial data
|
|
6816
|
-
|
|
6817
|
-
// Chrome can throw a max stack error if apply is called with
|
|
6818
|
-
// too large an array, but apply is faster.
|
|
6819
|
-
if (data.length < 10000) {
|
|
6820
|
-
this.push.apply(this, data);
|
|
6821
|
-
}
|
|
6822
|
-
else {
|
|
6823
|
-
for (i=0 ; i<data.length ; i++) {
|
|
6824
|
-
this.push(data[i]);
|
|
6825
|
-
}
|
|
6826
|
-
}
|
|
6827
|
-
}
|
|
6929
|
+
_fnArrayApply(this, data);
|
|
6828
6930
|
|
|
6829
6931
|
// selector
|
|
6830
6932
|
this.selector = {
|
|
@@ -7205,7 +7307,7 @@
|
|
|
7205
7307
|
selector.forEach(function (sel) {
|
|
7206
7308
|
var inner = __table_selector(sel, a);
|
|
7207
7309
|
|
|
7208
|
-
|
|
7310
|
+
_fnArrayApply(result, inner);
|
|
7209
7311
|
});
|
|
7210
7312
|
|
|
7211
7313
|
return result.filter( function (item) {
|
|
@@ -8059,7 +8161,7 @@
|
|
|
8059
8161
|
// Return an Api.rows() extended instance, so rows().nodes() etc can be used
|
|
8060
8162
|
var modRows = this.rows( -1 );
|
|
8061
8163
|
modRows.pop();
|
|
8062
|
-
|
|
8164
|
+
_fnArrayApply(modRows, newRows);
|
|
8063
8165
|
|
|
8064
8166
|
return modRows;
|
|
8065
8167
|
} );
|
|
@@ -8572,7 +8674,10 @@
|
|
|
8572
8674
|
.map( function () {
|
|
8573
8675
|
return _fnColumnsFromHeader( this ); // `nodes` is column index complete and in order
|
|
8574
8676
|
} )
|
|
8575
|
-
.toArray()
|
|
8677
|
+
.toArray()
|
|
8678
|
+
.sort(function (a, b) {
|
|
8679
|
+
return a - b;
|
|
8680
|
+
});
|
|
8576
8681
|
|
|
8577
8682
|
if ( jqResult.length || ! s.nodeName ) {
|
|
8578
8683
|
return jqResult;
|
|
@@ -9391,6 +9496,10 @@
|
|
|
9391
9496
|
} );
|
|
9392
9497
|
} );
|
|
9393
9498
|
|
|
9499
|
+
// Can be assigned in DateTable.use() - note luxon and moment vars are in helpers.js
|
|
9500
|
+
var __bootstrap;
|
|
9501
|
+
var __foundation;
|
|
9502
|
+
|
|
9394
9503
|
/**
|
|
9395
9504
|
* Set the libraries that DataTables uses, or the global objects.
|
|
9396
9505
|
* Note that the arguments can be either way around (legacy support)
|
|
@@ -9424,6 +9533,14 @@
|
|
|
9424
9533
|
case 'moment':
|
|
9425
9534
|
return __moment;
|
|
9426
9535
|
|
|
9536
|
+
case 'bootstrap':
|
|
9537
|
+
// Use local if set, otherwise try window, which could be undefined
|
|
9538
|
+
return __bootstrap || window.bootstrap;
|
|
9539
|
+
|
|
9540
|
+
case 'foundation':
|
|
9541
|
+
// Ditto
|
|
9542
|
+
return __foundation || window.Foundation;
|
|
9543
|
+
|
|
9427
9544
|
default:
|
|
9428
9545
|
return null;
|
|
9429
9546
|
}
|
|
@@ -9433,7 +9550,7 @@
|
|
|
9433
9550
|
if (type === 'lib' || type === 'jq' || (module && module.fn && module.fn.jquery)) {
|
|
9434
9551
|
$ = module;
|
|
9435
9552
|
}
|
|
9436
|
-
else if (type
|
|
9553
|
+
else if (type === 'win' || (module && module.document)) {
|
|
9437
9554
|
window = module;
|
|
9438
9555
|
document = module.document;
|
|
9439
9556
|
}
|
|
@@ -9446,6 +9563,14 @@
|
|
|
9446
9563
|
else if (type === 'moment' || (module && module.isMoment)) {
|
|
9447
9564
|
__moment = module;
|
|
9448
9565
|
}
|
|
9566
|
+
else if (type === 'bootstrap' || (module && module.Modal && module.Modal.NAME === 'modal'))
|
|
9567
|
+
{
|
|
9568
|
+
// This is currently for BS5 only. BS3/4 attach to jQuery, so no need to use `.use()`
|
|
9569
|
+
__bootstrap = module;
|
|
9570
|
+
}
|
|
9571
|
+
else if (type === 'foundation' || (module && module.Reveal)) {
|
|
9572
|
+
__foundation = module;
|
|
9573
|
+
}
|
|
9449
9574
|
}
|
|
9450
9575
|
|
|
9451
9576
|
/**
|
|
@@ -9736,6 +9861,11 @@
|
|
|
9736
9861
|
new _Api( settings ).columns().visible( true );
|
|
9737
9862
|
}
|
|
9738
9863
|
|
|
9864
|
+
// Container width change listener
|
|
9865
|
+
if (settings.resizeObserver) {
|
|
9866
|
+
settings.resizeObserver.disconnect();
|
|
9867
|
+
}
|
|
9868
|
+
|
|
9739
9869
|
// Blitz all `DT` namespaced events (these are internal events, the
|
|
9740
9870
|
// lowercase, `dt` events are user subscribed and they are responsible
|
|
9741
9871
|
// for removing them
|
|
@@ -9854,7 +9984,7 @@
|
|
|
9854
9984
|
* @type string
|
|
9855
9985
|
* @default Version number
|
|
9856
9986
|
*/
|
|
9857
|
-
DataTable.version = "2.
|
|
9987
|
+
DataTable.version = "2.2.0";
|
|
9858
9988
|
|
|
9859
9989
|
/**
|
|
9860
9990
|
* Private data store, containing all of the settings objects that are
|
|
@@ -11957,7 +12087,13 @@
|
|
|
11957
12087
|
deferLoading: null,
|
|
11958
12088
|
|
|
11959
12089
|
/** Allow auto type detection */
|
|
11960
|
-
typeDetect: true
|
|
12090
|
+
typeDetect: true,
|
|
12091
|
+
|
|
12092
|
+
/** ResizeObserver for the container div */
|
|
12093
|
+
resizeObserver: null,
|
|
12094
|
+
|
|
12095
|
+
/** Keep a record of the last size of the container, so we can skip duplicates */
|
|
12096
|
+
containerWidth: 0
|
|
11961
12097
|
};
|
|
11962
12098
|
|
|
11963
12099
|
/**
|
|
@@ -12099,8 +12235,8 @@
|
|
|
12099
12235
|
|
|
12100
12236
|
|
|
12101
12237
|
var __mlWarning = false;
|
|
12102
|
-
var __luxon; // Can be assigned in
|
|
12103
|
-
var __moment; // Can be assigned in
|
|
12238
|
+
var __luxon; // Can be assigned in DateTable.use()
|
|
12239
|
+
var __moment; // Can be assigned in DateTable.use()
|
|
12104
12240
|
|
|
12105
12241
|
/**
|
|
12106
12242
|
*
|
|
@@ -12136,7 +12272,7 @@
|
|
|
12136
12272
|
return null;
|
|
12137
12273
|
}
|
|
12138
12274
|
|
|
12139
|
-
dt.setLocale(locale);
|
|
12275
|
+
dt = dt.setLocale(locale);
|
|
12140
12276
|
}
|
|
12141
12277
|
else if (! format) {
|
|
12142
12278
|
// No format given, must be ISO
|
|
@@ -12519,6 +12655,13 @@
|
|
|
12519
12655
|
});
|
|
12520
12656
|
}
|
|
12521
12657
|
|
|
12658
|
+
var __diacriticHtmlSort = function (a, b) {
|
|
12659
|
+
a = _stripHtml(a);
|
|
12660
|
+
b = _stripHtml(b);
|
|
12661
|
+
|
|
12662
|
+
return __diacriticSort(a, b);
|
|
12663
|
+
}
|
|
12664
|
+
|
|
12522
12665
|
//
|
|
12523
12666
|
// Built in data types
|
|
12524
12667
|
//
|
|
@@ -12589,6 +12732,31 @@
|
|
|
12589
12732
|
});
|
|
12590
12733
|
|
|
12591
12734
|
|
|
12735
|
+
DataTable.type('html-utf8', {
|
|
12736
|
+
detect: {
|
|
12737
|
+
allOf: function ( d ) {
|
|
12738
|
+
return _empty( d ) || (typeof d === 'string' && d.indexOf('<') !== -1);
|
|
12739
|
+
},
|
|
12740
|
+
oneOf: function ( d ) {
|
|
12741
|
+
// At least one data point must contain a `<` and a non-ASCII character
|
|
12742
|
+
// eslint-disable-next-line compat/compat
|
|
12743
|
+
return navigator.languages &&
|
|
12744
|
+
! _empty( d ) &&
|
|
12745
|
+
typeof d === 'string' &&
|
|
12746
|
+
d.indexOf('<') !== -1 &&
|
|
12747
|
+
typeof d === 'string' && d.match(/[^\x00-\x7F]/);
|
|
12748
|
+
}
|
|
12749
|
+
},
|
|
12750
|
+
order: {
|
|
12751
|
+
asc: __diacriticHtmlSort,
|
|
12752
|
+
desc: function (a, b) {
|
|
12753
|
+
return __diacriticHtmlSort(a, b) * -1;
|
|
12754
|
+
}
|
|
12755
|
+
},
|
|
12756
|
+
search: _filterString(true, true)
|
|
12757
|
+
});
|
|
12758
|
+
|
|
12759
|
+
|
|
12592
12760
|
DataTable.type('date', {
|
|
12593
12761
|
className: 'dt-type-date',
|
|
12594
12762
|
detect: {
|
|
@@ -12799,6 +12967,7 @@
|
|
|
12799
12967
|
var indexes = columns.indexes();
|
|
12800
12968
|
var sortDirs = columns.orderable(true).flatten();
|
|
12801
12969
|
var orderedColumns = _pluck(sorting, 'col');
|
|
12970
|
+
var tabIndex = settings.iTabIndex;
|
|
12802
12971
|
|
|
12803
12972
|
cell
|
|
12804
12973
|
.removeClass(
|
|
@@ -12863,8 +13032,13 @@
|
|
|
12863
13032
|
|
|
12864
13033
|
// Make the headers tab-able for keyboard navigation
|
|
12865
13034
|
if (orderable) {
|
|
12866
|
-
cell.find('.dt-column-
|
|
12867
|
-
|
|
13035
|
+
var orderSpan = cell.find('.dt-column-order');
|
|
13036
|
+
|
|
13037
|
+
orderSpan.attr('role', 'button');
|
|
13038
|
+
|
|
13039
|
+
if (tabIndex !== -1) {
|
|
13040
|
+
orderSpan.attr('tabindex', tabIndex);
|
|
13041
|
+
}
|
|
12868
13042
|
}
|
|
12869
13043
|
} );
|
|
12870
13044
|
}
|
|
@@ -12878,7 +13052,7 @@
|
|
|
12878
13052
|
.addClass(items.className || classes.row)
|
|
12879
13053
|
.appendTo( container );
|
|
12880
13054
|
|
|
12881
|
-
|
|
13055
|
+
DataTable.ext.renderer.layout._forLayoutRow(items, function (key, val) {
|
|
12882
13056
|
if (key === 'id' || key === 'className') {
|
|
12883
13057
|
return;
|
|
12884
13058
|
}
|
|
@@ -12909,7 +13083,31 @@
|
|
|
12909
13083
|
})
|
|
12910
13084
|
.append( val.contents )
|
|
12911
13085
|
.appendTo( row );
|
|
12912
|
-
}
|
|
13086
|
+
});
|
|
13087
|
+
},
|
|
13088
|
+
|
|
13089
|
+
// Shared for use by the styling frameworks
|
|
13090
|
+
_forLayoutRow: function (items, fn) {
|
|
13091
|
+
// As we are inserting dom elements, we need start / end in a
|
|
13092
|
+
// specific order, this function is used for sorting the layout
|
|
13093
|
+
// keys.
|
|
13094
|
+
var layoutEnum = function (x) {
|
|
13095
|
+
switch (x) {
|
|
13096
|
+
case '': return 0;
|
|
13097
|
+
case 'start': return 1;
|
|
13098
|
+
case 'end': return 2;
|
|
13099
|
+
default: return 3;
|
|
13100
|
+
}
|
|
13101
|
+
};
|
|
13102
|
+
|
|
13103
|
+
Object
|
|
13104
|
+
.keys(items)
|
|
13105
|
+
.sort(function (a, b) {
|
|
13106
|
+
return layoutEnum(a) - layoutEnum(b);
|
|
13107
|
+
})
|
|
13108
|
+
.forEach(function (key) {
|
|
13109
|
+
fn(key, items[key]);
|
|
13110
|
+
});
|
|
12913
13111
|
}
|
|
12914
13112
|
}
|
|
12915
13113
|
} );
|
|
@@ -13261,7 +13459,7 @@
|
|
|
13261
13459
|
'data-dt-idx': button,
|
|
13262
13460
|
'tabIndex': btnInfo.disabled
|
|
13263
13461
|
? -1
|
|
13264
|
-
: settings.iTabIndex
|
|
13462
|
+
: settings.iTabIndex && btn.clicker[0].nodeName.toLowerCase() !== 'span'
|
|
13265
13463
|
? settings.iTabIndex
|
|
13266
13464
|
: null, // `0` doesn't need a tabIndex since it is the default
|
|
13267
13465
|
});
|
|
@@ -13295,12 +13493,16 @@
|
|
|
13295
13493
|
|
|
13296
13494
|
// Responsive - check if the buttons are over two lines based on the
|
|
13297
13495
|
// height of the buttons and the container.
|
|
13298
|
-
if (
|
|
13299
|
-
|
|
13300
|
-
|
|
13301
|
-
|
|
13302
|
-
|
|
13303
|
-
|
|
13496
|
+
if (buttonEls.length) {
|
|
13497
|
+
var outerHeight = $(buttonEls[0]).outerHeight();
|
|
13498
|
+
|
|
13499
|
+
if (
|
|
13500
|
+
opts.buttons > 1 && // prevent infinite
|
|
13501
|
+
outerHeight > 0 && // will be 0 if hidden
|
|
13502
|
+
$(host).height() >= (outerHeight * 2) - 10
|
|
13503
|
+
) {
|
|
13504
|
+
_pagingDraw(settings, host, $.extend({}, opts, { buttons: opts.buttons - 2 }));
|
|
13505
|
+
}
|
|
13304
13506
|
}
|
|
13305
13507
|
}
|
|
13306
13508
|
|
|
@@ -13324,7 +13526,6 @@
|
|
|
13324
13526
|
switch ( button ) {
|
|
13325
13527
|
case 'ellipsis':
|
|
13326
13528
|
o.display = '…';
|
|
13327
|
-
o.disabled = true;
|
|
13328
13529
|
break;
|
|
13329
13530
|
|
|
13330
13531
|
case 'first':
|
|
@@ -13511,7 +13712,7 @@
|
|
|
13511
13712
|
|
|
13512
13713
|
// Save text node content for macro updating
|
|
13513
13714
|
var textNodes = [];
|
|
13514
|
-
Array.
|
|
13715
|
+
Array.prototype.slice.call(div.find('label')[0].childNodes).forEach(function (el) {
|
|
13515
13716
|
if (el.nodeType === Node.TEXT_NODE) {
|
|
13516
13717
|
textNodes.push({
|
|
13517
13718
|
el: el,
|
|
@@ -13529,7 +13730,6 @@
|
|
|
13529
13730
|
|
|
13530
13731
|
// Next, the select itself, along with the options
|
|
13531
13732
|
var select = $('<select/>', {
|
|
13532
|
-
'name': tableId+'_length',
|
|
13533
13733
|
'aria-controls': tableId,
|
|
13534
13734
|
'class': classes.select
|
|
13535
13735
|
} );
|