@ntlab/ntjs-assets 2.0.46 → 2.0.48

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.
@@ -1,11 +1,11 @@
1
- /*! DataTables 2.1.6
1
+ /*! DataTables 2.1.7
2
2
  * © SpryMedia Ltd - datatables.net/license
3
3
  */
4
4
 
5
5
  /**
6
6
  * @summary DataTables
7
7
  * @description Paginate, search and order HTML tables
8
- * @version 2.1.6
8
+ * @version 2.1.7
9
9
  * @author SpryMedia Ltd
10
10
  * @contact www.datatables.net
11
11
  * @copyright SpryMedia Ltd.
@@ -1318,8 +1318,11 @@
1318
1318
  }
1319
1319
 
1320
1320
  // It is faster to just run `normalize` than it is to check if
1321
- // we need to with a regex!
1322
- var res = str.normalize("NFD");
1321
+ // we need to with a regex! (Check as it isn't available in old
1322
+ // Safari)
1323
+ var res = str.normalize
1324
+ ? str.normalize("NFD")
1325
+ : str;
1323
1326
 
1324
1327
  // Equally, here we check if a regex is needed or not
1325
1328
  return res.length !== str.length
@@ -2157,11 +2160,7 @@
2157
2160
  for (var i=0 ; i<cols.length ; i++) {
2158
2161
  var width = _fnColumnsSumWidth(settings, [i], false, false);
2159
2162
 
2160
- // Need to set the min-width, otherwise the browser might try to collapse
2161
- // it further
2162
- cols[i].colEl
2163
- .css('width', width)
2164
- .css('min-width', width);
2163
+ cols[i].colEl.css('width', width);
2165
2164
  }
2166
2165
  }
2167
2166
 
@@ -2258,7 +2257,7 @@
2258
2257
  */
2259
2258
  function _typeResult (typeDetect, res) {
2260
2259
  return res === true
2261
- ? typeDetect.name
2260
+ ? typeDetect._name
2262
2261
  : res;
2263
2262
  }
2264
2263
 
@@ -3041,8 +3040,8 @@
3041
3040
  * @returns
3042
3041
  */
3043
3042
  function _fnGetRowDisplay (settings, rowIdx) {
3044
- let rowModal = settings.aoData[rowIdx];
3045
- let columns = settings.aoColumns;
3043
+ var rowModal = settings.aoData[rowIdx];
3044
+ var columns = settings.aoColumns;
3046
3045
 
3047
3046
  if (! rowModal.displayData) {
3048
3047
  // Need to render and cache
@@ -5408,11 +5407,7 @@
5408
5407
  var width = _fnColumnsSumWidth( settings, this, true, false );
5409
5408
 
5410
5409
  if ( width ) {
5411
- // Need to set the width and min-width, otherwise the browser
5412
- // will attempt to collapse the table beyond want might have
5413
- // been specified
5414
5410
  this.style.width = width;
5415
- this.style.minWidth = width;
5416
5411
 
5417
5412
  // For scrollX we need to force the column width otherwise the
5418
5413
  // browser will collapse it. If this width is smaller than the
@@ -7714,7 +7709,7 @@
7714
7709
  // Reduce the API instance to the first item found
7715
7710
  var _selector_first = function ( old )
7716
7711
  {
7717
- let inst = new _Api(old.context[0]);
7712
+ var inst = new _Api(old.context[0]);
7718
7713
 
7719
7714
  // Use a push rather than passing to the constructor, since it will
7720
7715
  // merge arrays down automatically, which isn't what is wanted here
@@ -9709,7 +9704,7 @@
9709
9704
  fn.call(this);
9710
9705
  }
9711
9706
  else {
9712
- this.on('init', function () {
9707
+ this.on('init.dt.DT', function () {
9713
9708
  fn.call(this);
9714
9709
  });
9715
9710
  }
@@ -9862,7 +9857,7 @@
9862
9857
  * @type string
9863
9858
  * @default Version number
9864
9859
  */
9865
- DataTable.version = "2.1.6";
9860
+ DataTable.version = "2.1.7";
9866
9861
 
9867
9862
  /**
9868
9863
  * Private data store, containing all of the settings objects that are
@@ -12426,7 +12421,7 @@
12426
12421
  return {
12427
12422
  className: _extTypes.className[name],
12428
12423
  detect: _extTypes.detect.find(function (fn) {
12429
- return fn.name === name;
12424
+ return fn._name === name;
12430
12425
  }),
12431
12426
  order: {
12432
12427
  pre: _extTypes.order[name + '-pre'],
@@ -12444,10 +12439,10 @@
12444
12439
  var setDetect = function (detect) {
12445
12440
  // `detect` can be a function or an object - we set a name
12446
12441
  // property for either - that is used for the detection
12447
- Object.defineProperty(detect, "name", {value: name});
12442
+ Object.defineProperty(detect, "_name", {value: name});
12448
12443
 
12449
12444
  var idx = _extTypes.detect.findIndex(function (item) {
12450
- return item.name === name;
12445
+ return item._name === name;
12451
12446
  });
12452
12447
 
12453
12448
  if (idx === -1) {
@@ -12510,13 +12505,13 @@
12510
12505
  // Get a list of types
12511
12506
  DataTable.types = function () {
12512
12507
  return _extTypes.detect.map(function (fn) {
12513
- return fn.name;
12508
+ return fn._name;
12514
12509
  });
12515
12510
  };
12516
12511
 
12517
12512
  var __diacriticSort = function (a, b) {
12518
- a = a.toString().toLowerCase();
12519
- b = b.toString().toLowerCase();
12513
+ a = a !== null && a !== undefined ? a.toString().toLowerCase() : '';
12514
+ b = b !== null && b !== undefined ? b.toString().toLowerCase() : '';
12520
12515
 
12521
12516
  // Checked for `navigator.languages` support in `oneOf` so this code can't execute in old
12522
12517
  // Safari and thus can disable this check
@@ -13230,15 +13225,17 @@
13230
13225
  all = len === -1,
13231
13226
  page = all ? 0 : Math.ceil( start / len ),
13232
13227
  pages = all ? 1 : Math.ceil( visRecords / len ),
13233
- buttons = plugin(opts)
13228
+ buttons = [],
13229
+ buttonEls = [],
13230
+ buttonsNested = plugin(opts)
13234
13231
  .map(function (val) {
13235
13232
  return val === 'numbers'
13236
13233
  ? _pagingNumbers(page, pages, opts.buttons, opts.boundaryNumbers)
13237
13234
  : val;
13238
- })
13239
- .flat();
13235
+ });
13240
13236
 
13241
- var buttonEls = [];
13237
+ // .flat() would be better, but not supported in old Safari
13238
+ buttons = buttons.concat.apply(buttons, buttonsNested);
13242
13239
 
13243
13240
  for (var i=0 ; i<buttons.length ; i++) {
13244
13241
  var button = buttons[i];
@@ -13517,14 +13514,14 @@
13517
13514
 
13518
13515
  // Save text node content for macro updating
13519
13516
  var textNodes = [];
13520
- div.find('label')[0].childNodes.forEach(function (el) {
13517
+ Array.from(div.find('label')[0].childNodes).forEach(function (el) {
13521
13518
  if (el.nodeType === Node.TEXT_NODE) {
13522
13519
  textNodes.push({
13523
13520
  el: el,
13524
13521
  text: el.textContent
13525
13522
  });
13526
13523
  }
13527
- })
13524
+ });
13528
13525
 
13529
13526
  // Update the label text in case it has an entries value
13530
13527
  var updateEntries = function (len) {