@ntlab/ntjs-assets 2.17.0 → 2.19.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/js/dataTables.js +45 -35
- 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,4 +1,4 @@
|
|
|
1
|
-
/*! DataTables 2.2.
|
|
1
|
+
/*! DataTables 2.2.1
|
|
2
2
|
* © SpryMedia Ltd - datatables.net/license
|
|
3
3
|
*/
|
|
4
4
|
|
|
@@ -5350,6 +5350,14 @@
|
|
|
5350
5350
|
i, column, columnIdx;
|
|
5351
5351
|
|
|
5352
5352
|
var styleWidth = table.style.width;
|
|
5353
|
+
var containerWidth = _fnWrapperWidth(settings);
|
|
5354
|
+
|
|
5355
|
+
// Don't re-run for the same width as the last time
|
|
5356
|
+
if (containerWidth === settings.containerWidth) {
|
|
5357
|
+
return false;
|
|
5358
|
+
}
|
|
5359
|
+
|
|
5360
|
+
settings.containerWidth = containerWidth;
|
|
5353
5361
|
|
|
5354
5362
|
// If there is no width applied as a CSS style or as an attribute, we assume that
|
|
5355
5363
|
// the width is intended to be 100%, which is usually is in CSS, but it is very
|
|
@@ -5477,15 +5485,15 @@
|
|
|
5477
5485
|
|
|
5478
5486
|
// If there is no width attribute or style, then allow the table to
|
|
5479
5487
|
// collapse
|
|
5480
|
-
if ( tmpTable.
|
|
5481
|
-
tmpTable.
|
|
5488
|
+
if ( tmpTable.outerWidth() < tableContainer.clientWidth && tableWidthAttr ) {
|
|
5489
|
+
tmpTable.outerWidth( tableContainer.clientWidth );
|
|
5482
5490
|
}
|
|
5483
5491
|
}
|
|
5484
5492
|
else if ( scrollY ) {
|
|
5485
|
-
tmpTable.
|
|
5493
|
+
tmpTable.outerWidth( tableContainer.clientWidth );
|
|
5486
5494
|
}
|
|
5487
5495
|
else if ( tableWidthAttr ) {
|
|
5488
|
-
tmpTable.
|
|
5496
|
+
tmpTable.outerWidth( tableWidthAttr );
|
|
5489
5497
|
}
|
|
5490
5498
|
|
|
5491
5499
|
// Get the width of each column in the constructed table
|
|
@@ -5518,46 +5526,33 @@
|
|
|
5518
5526
|
}
|
|
5519
5527
|
|
|
5520
5528
|
if ( (tableWidthAttr || scrollX) && ! settings._reszEvt ) {
|
|
5521
|
-
var wrapperWidth = function () {
|
|
5522
|
-
return $(settings.nTableWrapper).is(':visible')
|
|
5523
|
-
? $(settings.nTableWrapper).width()
|
|
5524
|
-
: 0;
|
|
5525
|
-
}
|
|
5526
|
-
|
|
5527
|
-
settings.containerWidth = wrapperWidth();
|
|
5528
|
-
|
|
5529
5529
|
var resize = DataTable.util.throttle( function () {
|
|
5530
|
-
var newWidth =
|
|
5530
|
+
var newWidth = _fnWrapperWidth(settings);
|
|
5531
5531
|
|
|
5532
|
-
// Don't do it if destroying
|
|
5533
|
-
|
|
5534
|
-
if (
|
|
5535
|
-
! settings.bDestroying &&
|
|
5536
|
-
settings.containerWidth !== newWidth &&
|
|
5537
|
-
newWidth !== 0
|
|
5538
|
-
) {
|
|
5539
|
-
// Do a resize
|
|
5532
|
+
// Don't do it if destroying or the container width is 0
|
|
5533
|
+
if (! settings.bDestroying && newWidth !== 0) {
|
|
5540
5534
|
_fnAdjustColumnSizing( settings );
|
|
5541
|
-
settings.containerWidth = newWidth;
|
|
5542
5535
|
}
|
|
5543
5536
|
} );
|
|
5544
5537
|
|
|
5545
5538
|
// For browsers that support it (~2020 onwards for wide support) we can watch for the
|
|
5546
5539
|
// container changing width.
|
|
5547
5540
|
if (window.ResizeObserver) {
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5541
|
+
// This is a tricky beast - if the element is visible when `.observe()` is called,
|
|
5542
|
+
// then the callback is immediately run. Which we don't want. If the element isn't
|
|
5543
|
+
// visible, then it isn't run, but we want it to run when it is then made visible.
|
|
5544
|
+
// This flag allows the above to be satisfied.
|
|
5545
|
+
var first = $(settings.nTableWrapper).is(':visible');
|
|
5553
5546
|
|
|
5554
|
-
|
|
5555
|
-
if (
|
|
5556
|
-
|
|
5547
|
+
settings.resizeObserver = new ResizeObserver(function (e) {
|
|
5548
|
+
if (first) {
|
|
5549
|
+
first = false;
|
|
5550
|
+
}
|
|
5551
|
+
else {
|
|
5552
|
+
resize();
|
|
5557
5553
|
}
|
|
5558
|
-
|
|
5559
|
-
resize();
|
|
5560
5554
|
});
|
|
5555
|
+
|
|
5561
5556
|
settings.resizeObserver.observe(settings.nTableWrapper);
|
|
5562
5557
|
}
|
|
5563
5558
|
else {
|
|
@@ -5569,6 +5564,17 @@
|
|
|
5569
5564
|
}
|
|
5570
5565
|
}
|
|
5571
5566
|
|
|
5567
|
+
/**
|
|
5568
|
+
* Get the width of the DataTables wrapper element
|
|
5569
|
+
*
|
|
5570
|
+
* @param {*} settings DataTables settings object
|
|
5571
|
+
* @returns Width
|
|
5572
|
+
*/
|
|
5573
|
+
function _fnWrapperWidth(settings) {
|
|
5574
|
+
return $(settings.nTableWrapper).is(':visible')
|
|
5575
|
+
? $(settings.nTableWrapper).width()
|
|
5576
|
+
: 0;
|
|
5577
|
+
}
|
|
5572
5578
|
|
|
5573
5579
|
/**
|
|
5574
5580
|
* Get the maximum strlen for each data column
|
|
@@ -8931,6 +8937,10 @@
|
|
|
8931
8937
|
|
|
8932
8938
|
_api_register( 'columns.adjust()', function () {
|
|
8933
8939
|
return this.iterator( 'table', function ( settings ) {
|
|
8940
|
+
// Force a column sizing to happen with a manual call - otherwise it can skip
|
|
8941
|
+
// if the size hasn't changed
|
|
8942
|
+
settings.containerWidth = -1;
|
|
8943
|
+
|
|
8934
8944
|
_fnAdjustColumnSizing( settings );
|
|
8935
8945
|
}, 1 );
|
|
8936
8946
|
} );
|
|
@@ -9984,7 +9994,7 @@
|
|
|
9984
9994
|
* @type string
|
|
9985
9995
|
* @default Version number
|
|
9986
9996
|
*/
|
|
9987
|
-
DataTable.version = "2.2.
|
|
9997
|
+
DataTable.version = "2.2.1";
|
|
9988
9998
|
|
|
9989
9999
|
/**
|
|
9990
10000
|
* Private data store, containing all of the settings objects that are
|
|
@@ -12093,7 +12103,7 @@
|
|
|
12093
12103
|
resizeObserver: null,
|
|
12094
12104
|
|
|
12095
12105
|
/** Keep a record of the last size of the container, so we can skip duplicates */
|
|
12096
|
-
containerWidth:
|
|
12106
|
+
containerWidth: -1
|
|
12097
12107
|
};
|
|
12098
12108
|
|
|
12099
12109
|
/**
|