@ntlab/ntjs-assets 2.94.0 → 2.95.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.
@@ -8,6 +8,11 @@ table.dataTable > tbody > tr > .dt-select {
8
8
  }
9
9
  table.dataTable > thead > tr > .dt-select {
10
10
  text-align: center;
11
+ vertical-align: middle;
12
+ }
13
+ table.dataTable > thead > tr > .dt-select input.dt-select-checkbox {
14
+ margin-left: auto;
15
+ margin-right: auto;
11
16
  }
12
17
  table.dataTable input.dt-select-checkbox {
13
18
  appearance: none;
@@ -1 +1 @@
1
- table.dataTable>tbody>tr>.selected{background-color:rgb(13, 110, 253);color:white}table.dataTable>tbody>tr>.dt-select{text-align:center;vertical-align:middle}table.dataTable>thead>tr>.dt-select{text-align:center}table.dataTable input.dt-select-checkbox{appearance:none;position:relative;display:inline-block;width:12px;height:12px;border:1px solid;border-radius:3px;vertical-align:middle;margin-top:1px;color:inherit;font-size:20px;line-height:1em}table.dataTable input.dt-select-checkbox:checked:after{display:block;content:"✓";margin-top:-8px}table.dataTable input.dt-select-checkbox:indeterminate:after{display:block;position:absolute;content:" ";top:3px;left:3px;height:4px;width:4px;background-color:black;border-radius:2px}table.dataTable>tbody>tr.selected input.dt-select-checkbox:checked{border:1px solid}table.dataTable>tbody>tr>td.select-checkbox,table.dataTable>tbody>tr>th.select-checkbox{position:relative}table.dataTable>tbody>tr>td.select-checkbox:before,table.dataTable>tbody>tr>th.select-checkbox:before{display:block;position:absolute;top:50%;left:50%;width:12px;height:12px;box-sizing:border-box;content:" ";margin-top:-6px;margin-left:-6px;border:1px solid;border-radius:3px}table.dataTable>tbody>tr.selected>td.select-checkbox:before,table.dataTable>tbody>tr.selected>th.select-checkbox:before{border:1px solid;content:"✓";font-size:20px;line-height:4px;text-align:center}table.dataTable.compact>tbody>tr>td.select-checkbox:before,table.dataTable.compact>tbody>tr>th.select-checkbox:before{margin-top:-12px}table.dataTable.compact>tbody>tr.selected>td.select-checkbox:after,table.dataTable.compact>tbody>tr.selected>th.select-checkbox:after{margin-top:-16px}div.dt-container span.select-info,div.dt-container span.select-item{margin-left:.5em}html.dark table.dataTable input.dt-select-checkbox:indeterminate:after,html[data-bs-theme=dark] table.dataTable input.dt-select-checkbox:indeterminate:after{background-color:white}@media screen and (max-width: 640px){div.dt-container span.select-info,div.dt-container span.select-item{margin-left:0;display:block}}table.dataTable.table-sm tbody td.select-checkbox::before{margin-top:-9px}
1
+ table.dataTable>tbody>tr>.selected{background-color:rgb(13, 110, 253);color:white}table.dataTable>tbody>tr>.dt-select{text-align:center;vertical-align:middle}table.dataTable>thead>tr>.dt-select{text-align:center;vertical-align:middle}table.dataTable>thead>tr>.dt-select input.dt-select-checkbox{margin-left:auto;margin-right:auto}table.dataTable input.dt-select-checkbox{appearance:none;position:relative;display:inline-block;width:12px;height:12px;border:1px solid;border-radius:3px;vertical-align:middle;margin-top:1px;color:inherit;font-size:20px;line-height:1em}table.dataTable input.dt-select-checkbox:checked:after{display:block;content:"✓";margin-top:-8px}table.dataTable input.dt-select-checkbox:indeterminate:after{display:block;position:absolute;content:" ";top:3px;left:3px;height:4px;width:4px;background-color:black;border-radius:2px}table.dataTable>tbody>tr.selected input.dt-select-checkbox:checked{border:1px solid}table.dataTable>tbody>tr>td.select-checkbox,table.dataTable>tbody>tr>th.select-checkbox{position:relative}table.dataTable>tbody>tr>td.select-checkbox:before,table.dataTable>tbody>tr>th.select-checkbox:before{display:block;position:absolute;top:50%;left:50%;width:12px;height:12px;box-sizing:border-box;content:" ";margin-top:-6px;margin-left:-6px;border:1px solid;border-radius:3px}table.dataTable>tbody>tr.selected>td.select-checkbox:before,table.dataTable>tbody>tr.selected>th.select-checkbox:before{border:1px solid;content:"✓";font-size:20px;line-height:4px;text-align:center}table.dataTable.compact>tbody>tr>td.select-checkbox:before,table.dataTable.compact>tbody>tr>th.select-checkbox:before{margin-top:-12px}table.dataTable.compact>tbody>tr.selected>td.select-checkbox:after,table.dataTable.compact>tbody>tr.selected>th.select-checkbox:after{margin-top:-16px}div.dt-container span.select-info,div.dt-container span.select-item{margin-left:.5em}html.dark table.dataTable input.dt-select-checkbox:indeterminate:after,html[data-bs-theme=dark] table.dataTable input.dt-select-checkbox:indeterminate:after{background-color:white}@media screen and (max-width: 640px){div.dt-container span.select-info,div.dt-container span.select-item{margin-left:0;display:block}}table.dataTable.table-sm tbody td.select-checkbox::before{margin-top:-9px}
@@ -8,6 +8,11 @@ table.dataTable > tbody > tr > .dt-select {
8
8
  }
9
9
  table.dataTable > thead > tr > .dt-select {
10
10
  text-align: center;
11
+ vertical-align: middle;
12
+ }
13
+ table.dataTable > thead > tr > .dt-select input.dt-select-checkbox {
14
+ margin-left: auto;
15
+ margin-right: auto;
11
16
  }
12
17
  table.dataTable input.dt-select-checkbox {
13
18
  appearance: none;
@@ -1 +1 @@
1
- table.dataTable>tbody>tr>.selected{background-color:rgba(13, 110, 253, 0.9);color:white}table.dataTable>tbody>tr>.dt-select{text-align:center;vertical-align:middle}table.dataTable>thead>tr>.dt-select{text-align:center}table.dataTable input.dt-select-checkbox{appearance:none;position:relative;display:inline-block;width:12px;height:12px;border:1px solid;border-radius:3px;vertical-align:middle;margin-top:1px;color:inherit;font-size:20px;line-height:1em}table.dataTable input.dt-select-checkbox:checked:after{display:block;content:"✓";margin-top:-8px}table.dataTable input.dt-select-checkbox:indeterminate:after{display:block;position:absolute;content:" ";top:3px;left:3px;height:4px;width:4px;background-color:black;border-radius:2px}table.dataTable>tbody>tr.selected input.dt-select-checkbox:checked{border:1px solid}table.dataTable>tbody>tr>td.select-checkbox,table.dataTable>tbody>tr>th.select-checkbox{position:relative}table.dataTable>tbody>tr>td.select-checkbox:before,table.dataTable>tbody>tr>th.select-checkbox:before{display:block;position:absolute;top:50%;left:50%;width:12px;height:12px;box-sizing:border-box;content:" ";margin-top:-6px;margin-left:-6px;border:1px solid;border-radius:3px}table.dataTable>tbody>tr.selected>td.select-checkbox:before,table.dataTable>tbody>tr.selected>th.select-checkbox:before{border:1px solid;content:"✓";font-size:20px;line-height:6px;text-align:center}table.dataTable.compact>tbody>tr>td.select-checkbox:before,table.dataTable.compact>tbody>tr>th.select-checkbox:before{margin-top:-12px}table.dataTable.compact>tbody>tr.selected>td.select-checkbox:after,table.dataTable.compact>tbody>tr.selected>th.select-checkbox:after{margin-top:-16px}div.dt-container span.select-info,div.dt-container span.select-item{margin-left:.5em}html.dark table.dataTable input.dt-select-checkbox:indeterminate:after,html[data-bs-theme=dark] table.dataTable input.dt-select-checkbox:indeterminate:after{background-color:white}@media screen and (max-width: 640px){div.dt-container span.select-info,div.dt-container span.select-item{margin-left:0;display:block}}
1
+ table.dataTable>tbody>tr>.selected{background-color:rgba(13, 110, 253, 0.9);color:white}table.dataTable>tbody>tr>.dt-select{text-align:center;vertical-align:middle}table.dataTable>thead>tr>.dt-select{text-align:center;vertical-align:middle}table.dataTable>thead>tr>.dt-select input.dt-select-checkbox{margin-left:auto;margin-right:auto}table.dataTable input.dt-select-checkbox{appearance:none;position:relative;display:inline-block;width:12px;height:12px;border:1px solid;border-radius:3px;vertical-align:middle;margin-top:1px;color:inherit;font-size:20px;line-height:1em}table.dataTable input.dt-select-checkbox:checked:after{display:block;content:"✓";margin-top:-8px}table.dataTable input.dt-select-checkbox:indeterminate:after{display:block;position:absolute;content:" ";top:3px;left:3px;height:4px;width:4px;background-color:black;border-radius:2px}table.dataTable>tbody>tr.selected input.dt-select-checkbox:checked{border:1px solid}table.dataTable>tbody>tr>td.select-checkbox,table.dataTable>tbody>tr>th.select-checkbox{position:relative}table.dataTable>tbody>tr>td.select-checkbox:before,table.dataTable>tbody>tr>th.select-checkbox:before{display:block;position:absolute;top:50%;left:50%;width:12px;height:12px;box-sizing:border-box;content:" ";margin-top:-6px;margin-left:-6px;border:1px solid;border-radius:3px}table.dataTable>tbody>tr.selected>td.select-checkbox:before,table.dataTable>tbody>tr.selected>th.select-checkbox:before{border:1px solid;content:"✓";font-size:20px;line-height:6px;text-align:center}table.dataTable.compact>tbody>tr>td.select-checkbox:before,table.dataTable.compact>tbody>tr>th.select-checkbox:before{margin-top:-12px}table.dataTable.compact>tbody>tr.selected>td.select-checkbox:after,table.dataTable.compact>tbody>tr.selected>th.select-checkbox:after{margin-top:-16px}div.dt-container span.select-info,div.dt-container span.select-item{margin-left:.5em}html.dark table.dataTable input.dt-select-checkbox:indeterminate:after,html[data-bs-theme=dark] table.dataTable input.dt-select-checkbox:indeterminate:after{background-color:white}@media screen and (max-width: 640px){div.dt-container span.select-info,div.dt-container span.select-item{margin-left:0;display:block}}
@@ -1,4 +1,4 @@
1
- /*! Select for DataTables 3.0.1
1
+ /*! Select for DataTables 3.1.0
2
2
  * © SpryMedia Ltd - datatables.net/license/mit
3
3
  */
4
4
 
@@ -56,7 +56,7 @@ DataTable.select.classes = {
56
56
  checkbox: 'dt-select-checkbox'
57
57
  };
58
58
 
59
- DataTable.select.version = '3.0.1';
59
+ DataTable.select.version = '3.1.0';
60
60
 
61
61
  DataTable.select.init = function (dt) {
62
62
  var ctx = dt.settings()[0];
@@ -133,6 +133,7 @@ DataTable.select.init = function (dt) {
133
133
  var headerCheckbox = true;
134
134
  var setStyle = false;
135
135
  var keys = false;
136
+ var keysWrap = false;
136
137
 
137
138
  ctx._select = {
138
139
  infoEls: []
@@ -192,6 +193,10 @@ DataTable.select.init = function (dt) {
192
193
  if (opts.keys !== undefined) {
193
194
  keys = opts.keys;
194
195
  }
196
+
197
+ if (opts.keysWrap !== undefined) {
198
+ keysWrap = opts.keysWrap;
199
+ }
195
200
  }
196
201
 
197
202
  dt.select.selector(selector);
@@ -200,7 +205,7 @@ DataTable.select.init = function (dt) {
200
205
  dt.select.blurable(blurable);
201
206
  dt.select.toggleable(toggleable);
202
207
  dt.select.info(info);
203
- dt.select.keys(keys);
208
+ dt.select.keys(keys, keysWrap);
204
209
  dt.select.selectable(selectable);
205
210
  ctx._select.className = className;
206
211
 
@@ -581,15 +586,24 @@ function info(api, node) {
581
586
  }
582
587
 
583
588
  var ctx = api.settings()[0];
584
- var rowSetLength = ctx._select_set.length;
585
- var rows = rowSetLength ? rowSetLength : api.rows({ selected: true }).count();
589
+ var rowSet = ctx._select_set;
590
+
591
+ // Check that the ids are still in ctx.aIds - row might have been deleted before it was
592
+ // unselected
593
+ for (var i=rowSet.length-1 ; i>=0 ; i--) {
594
+ if (! ctx.aIds[rowSet[i]]) {
595
+ rowSet.splice(i, 1);
596
+ }
597
+ }
598
+
599
+ var rows = rowSet.length ? rowSet.length : api.rows({ selected: true }).count();
586
600
  var columns = api.columns({ selected: true }).count();
587
601
  var cells = api.cells({ selected: true }).count();
588
602
 
589
603
  // If subtractive selection, then we need to take the number of rows and
590
604
  // subtract those that have been deselected
591
605
  if (ctx._select_mode === 'subtractive') {
592
- rows = api.page.info().recordsDisplay - rowSetLength;
606
+ rows = api.page.info().recordsDisplay - rowSet.length;
593
607
  }
594
608
 
595
609
  var add = function (el, name, num) {
@@ -654,7 +668,7 @@ function initCheckboxHeader( dt, headerCheckbox ) {
654
668
  // If no checkbox yet, insert one
655
669
  var input = $('<input>')
656
670
  .attr({
657
- class: checkboxClass(true),
671
+ class: checkboxClass(false),
658
672
  type: 'checkbox',
659
673
  'aria-label': dt.i18n('select.aria.headerCheckbox') || 'Select all rows'
660
674
  })
@@ -711,6 +725,7 @@ function initCheckboxHeader( dt, headerCheckbox ) {
711
725
  function keysSet(dt) {
712
726
  var ctx = dt.settings()[0];
713
727
  var flag = ctx._select.keys;
728
+ var wrap = ctx._select.keysWrap;
714
729
  var namespace = 'dts-keys-' + ctx.sTableId;
715
730
 
716
731
  if (flag) {
@@ -739,6 +754,7 @@ function keysSet(dt) {
739
754
  var nodes = dt.rows({page: 'current'}).nodes().toArray();
740
755
  var idx = nodes.indexOf(active);
741
756
  var preventDefault = true;
757
+ var pageInfo = dt.page.info();
742
758
 
743
759
  // Only take an action if a row has focus
744
760
  if (idx === -1) {
@@ -748,10 +764,10 @@ function keysSet(dt) {
748
764
  if (key === 9) {
749
765
  // Tab focus change
750
766
  if (e.shift === false && idx === nodes.length - 1) {
751
- keysPageDown(dt);
767
+ keysPageChange(dt, 'next', ':first-child');
752
768
  }
753
769
  else if (e.shift === true && idx === 0) {
754
- keysPageUp(dt);
770
+ keysPageChange(dt, 'previous', ':last-child');
755
771
  }
756
772
  else {
757
773
  // Browser will do it for us
@@ -774,8 +790,13 @@ function keysSet(dt) {
774
790
  if (idx > 0) {
775
791
  nodes[idx-1].focus();
776
792
  }
777
- else {
778
- keysPageUp(dt);
793
+ else if (pageInfo.start > 0) {
794
+ // Shift back to the previous page
795
+ keysPageChange(dt, 'previous', ':last-child');
796
+ }
797
+ else if (wrap) {
798
+ // Wrap
799
+ keysPageChange(dt, 'last', ':last-child');
779
800
  }
780
801
  }
781
802
  else {
@@ -783,8 +804,13 @@ function keysSet(dt) {
783
804
  if (idx < nodes.length -1) {
784
805
  nodes[idx+1].focus();
785
806
  }
786
- else {
787
- keysPageDown(dt);
807
+ else if (pageInfo.page < pageInfo.pages-1) {
808
+ // Move on to the next page
809
+ keysPageChange(dt, 'next', ':first-child');
810
+ }
811
+ else if (wrap) {
812
+ // Wrap
813
+ keysPageChange(dt, 'first', ':first-child');
788
814
  }
789
815
  }
790
816
 
@@ -805,41 +831,17 @@ function keysSet(dt) {
805
831
  }
806
832
 
807
833
  /**
808
- * Change to the next page and focus on the first row
834
+ * Change change to a new page and focus
809
835
  *
810
836
  * @param {DataTable.Api} dt DataTable instance
811
837
  */
812
- function keysPageDown(dt) {
813
- // Is there another page to turn to?
814
- var info = dt.page.info();
815
-
816
- if (info.page < info.pages - 1) {
817
- dt
818
- .one('draw', function () {
819
- dt.row(':first-child').node().focus();
820
- })
821
- .page('next')
822
- .draw(false);
823
- }
824
- }
825
-
826
- /**
827
- * Change to the previous page and focus on the last row
828
- *
829
- * @param {DataTable.Api} dt DataTable instance
830
- */
831
- function keysPageUp(dt) {
832
- // Is there another page to turn to?
833
- var info = dt.page.info();
834
-
835
- if (info.page > 0) {
836
- dt
837
- .one('draw', function () {
838
- dt.row(':last-child').node().focus();
839
- })
840
- .page('previous')
841
- .draw(false);
842
- }
838
+ function keysPageChange(dt, page, focus) {
839
+ dt
840
+ .one('draw', function () {
841
+ dt.row(focus).node().focus();
842
+ })
843
+ .page(page)
844
+ .draw(false);
843
845
  }
844
846
 
845
847
  /**
@@ -1315,7 +1317,7 @@ apiRegister('select.items()', function (items) {
1315
1317
  });
1316
1318
  });
1317
1319
 
1318
- apiRegister('select.keys()', function (flag) {
1320
+ apiRegister('select.keys()', function (flag, wrap) {
1319
1321
  if (flag === undefined) {
1320
1322
  return this.context[0]._select.keys;
1321
1323
  }
@@ -1326,6 +1328,7 @@ apiRegister('select.keys()', function (flag) {
1326
1328
  }
1327
1329
 
1328
1330
  ctx._select.keys = flag;
1331
+ ctx._select.keysWrap = wrap;
1329
1332
 
1330
1333
  keysSet(new DataTable.Api(ctx));
1331
1334
  });
@@ -1,4 +1,4 @@
1
- /*! Select for DataTables 3.0.1
1
+ /*! Select for DataTables 3.1.0
2
2
  * © SpryMedia Ltd - datatables.net/license/mit
3
3
  */
4
- (s=>{var l,c;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return s(e,window,document)}):"object"==typeof exports?(l=require("jquery"),c=function(e,t){t.fn.dataTable||require("datatables.net")(e,t)},"undefined"==typeof window?module.exports=function(e,t){return e=e||window,t=t||l(e),c(e,t),s(t,e,e.document)}:(c(window,l),module.exports=s(l,window,window.document))):s(jQuery,window,document)})(function(m,i,a){var v=m.fn.dataTable;function r(n,e,t){function s(t,s){s<t&&(e=s,s=t,t=e);var e,l=!1;return n.columns(":visible").indexes().filter(function(e){return e===t&&(l=!0),e===s?!(l=!1):l})}function l(t,s){var e,l=n.rows({search:"applied"}).indexes(),c=(l.indexOf(t)>l.indexOf(s)&&(e=s,s=t,t=e),!1);return l.filter(function(e){return e===t&&(c=!0),e===s?!(c=!1):c})}var c,t=n.cells({selected:!0}).any()||t?(c=s(t.column,e.column),l(t.row,e.row)):(c=s(0,e.column),l(0,e.row)),t=n.cells(t,c).flatten();n.cells(e,{selected:!0}).any()?n.cells(t).deselect():n.cells(t).select()}function w(e){var t=v.select.classes.checkbox;return e?t.replace(/ /g,"."):t}function n(e){var t=e.settings()[0]._select.selector;m(e.table().container()).off("mousedown.dtSelect",t).off("mouseup.dtSelect",t).off("click.dtSelect",t),m("body").off("click.dtSelect"+b(e.table().node()))}function c(o){var a,t=m(o.table().container()),s=o.settings()[0],l=s._select.selector;t.on("mousedown.dtSelect",l,function(e){(e.shiftKey||e.metaKey||e.ctrlKey)&&t.css("-moz-user-select","none").one("selectstart.dtSelect",l,function(){return!1}),i.getSelection&&(a=i.getSelection())}).on("mouseup.dtSelect",l,function(){t.css("-moz-user-select","")}).on("click.dtSelect",l,function(e){var t,s=o.select.items();if(a){var l=i.getSelection();if((!l.anchorNode||m(l.anchorNode).closest("table")[0]===o.table().node())&&l!==a)return}var c,l=o.settings()[0],n=o.table().container();m(e.target).closest("div.dt-container")[0]==n&&(n=o.cell(m(e.target).closest("td, th"))).any()&&(c=m.Event("user-select.dt"),d(o,c,[s,n,e]),c.isDefaultPrevented()||(c=n.index(),"row"===s?(t=c.row,p(e,o,l,"row",t)):"column"===s?(t=n.index().column,p(e,o,l,"column",t)):"cell"===s&&(t=n.index(),p(e,o,l,"cell",t)),l._select_lastCell=c))}),m("body").on("click.dtSelect"+b(o.table().node()),function(e){var t;!s._select.blurable||m(e.target).parents().filter(o.table().container()).length||0===m(e.target).parents("html").length||m(e.target).parents("div.DTE").length||(t=m.Event("select-blur.dt"),d(o,t,[e.target,e]),t.isDefaultPrevented())||_(s,!0)})}function d(e,t,s,l){l&&!e.flatten().length||("string"==typeof t&&(t+=".dt"),s.unshift(e),m(e.table().node()).trigger(t,s))}function g(e){return e.mRender&&"selectCheckbox"===e.mRender._name}function l(l,e){var t,s,c,n,o;"api"!==l.select.style()&&!1!==l.select.info()&&(o=(n=(c=l.settings()[0])._select_set.length)||l.rows({selected:!0}).count(),t=l.columns({selected:!0}).count(),s=l.cells({selected:!0}).count(),"subtractive"===c._select_mode&&(o=l.page.info().recordsDisplay-n),c=function(e,t,s){e.append(m('<span class="select-item"/>').append(l.i18n("select."+t+"s",{_:"%d "+t+"s selected",0:"",1:"1 "+t+" selected"},s)))},n=m(e),c(e=m('<span class="select-info"/>'),"row",o),c(e,"column",t),c(e,"cell",s),(o=n.children("span.select-info")).length&&o.remove(),""!==e.text())&&n.append(e)}function u(e){var t=e.page.info();t.page<t.pages-1&&e.one("draw",function(){e.row(":first-child").node().focus()}).page("next").draw(!1)}function f(e){0<e.page.info().page&&e.one("draw",function(){e.row(":last-child").node().focus()}).page("previous").draw(!1)}function o(o){var c,a=new v.Api(o);o._select_init=!0,o._select_mode="additive",o._select_set=[],o.aoRowCreatedCallback.push(function(e,t,s){var l,c,n=o.aoData[s],s=a.row(s).id();for((n._select_selected||"additive"===o._select_mode&&o._select_set.includes(s)||"subtractive"===o._select_mode&&!o._select_set.includes(s))&&(n._select_selected=!0,m(e).addClass(o._select.className).find("input."+w(!0)).prop("checked",!0)),l=0,c=o.aoColumns.length;l<c;l++)(o.aoColumns[l]._select_selected||n._selected_cells&&n._selected_cells[l])&&m(n.anCells[l]).addClass(o._select.className)}),(c=a).on("select",function(e,t,s,l){"row"===s&&("additive"===(s=c.settings()[0])._select_mode?y:x)(c,s._select_set,l)}),c.on("deselect",function(e,t,s,l){"row"===s&&("additive"===(s=c.settings()[0])._select_mode?x:y)(c,s._select_set,l)}),a.on("info.dt",function(e,t,s){t._select.infoEls.includes(s)||t._select.infoEls.push(s),l(a,s)}),a.on("select.dtSelect.dt deselect.dtSelect.dt",function(){o._select.infoEls.forEach(function(e){l(a,e)}),a.state.save()}),a.on("destroy.dtSelect",function(){m(a.rows({selected:!0}).nodes()).removeClass(a.settings()[0]._select.className),m("input."+w(!0),a.table().header()).remove(),n(a),a.off(".dtSelect"),m("body").off(".dtSelect"+b(a.table().node()))})}function h(e,t,s,l){var c,n=e[t+"s"]({search:"applied"}).indexes(),l=n.indexOf(l),o=n.indexOf(s);e[t+"s"]({selected:!0}).any()||-1!==l?(o<l&&(c=o,o=l,l=c),n.splice(o+1,n.length),n.splice(0,l)):n.splice(n.indexOf(s)+1,n.length),e[t](s,{selected:!0}).any()?(n.splice(n.indexOf(s),1),e[t+"s"](n).deselect()):e[t+"s"](n).select()}function _(e,t){!t&&"single"!==e._select.style||((t=new v.Api(e)).rows({selected:!0}).deselect(),t.columns({selected:!0}).deselect(),t.cells({selected:!0}).deselect())}function p(e,t,s,l,c){var n=t.select.style(),o=t.select.toggleable(),a=t[l](c,{selected:!0}).any();a&&!o||("os"===n?e.ctrlKey||e.metaKey?t[l](c).select(!a):e.shiftKey?"cell"===l?r(t,c,s._select_lastCell||null):h(t,l,c,s._select_lastCell?s._select_lastCell[l]:null):(o=t[l+"s"]({selected:!0}),a&&1===o.flatten().length?t[l](c).deselect():(o.deselect(),t[l](c).select())):"multi+shift"==n&&e.shiftKey?"cell"===l?r(t,c,s._select_lastCell||null):h(t,l,c,s._select_lastCell?s._select_lastCell[l]:null):t[l](c).select(!a))}function b(e){return e.id.replace(/[^a-zA-Z0-9\-\_]/g,"-")}function y(e,t,s){for(var l=0;l<s.length;l++){var c=e.row(s[l]).id();c&&"undefined"!==c&&!t.includes(c)&&t.push(c)}}function x(e,t,s){for(var l=0;l<s.length;l++){var c=e.row(s[l]).id(),c=t.indexOf(c);-1!==c&&t.splice(c,1)}}v.select={},v.select.classes={checkbox:"dt-select-checkbox"},v.select.version="3.0.1",v.select.init=function(a){var e,t,s,l,c,n,o,i,r,d,u,f,h,_,p=a.settings()[0];if(!v.versionCheck("2"))throw"Warning: Select requires DataTables 2 or newer";!p._select&&(e=a.state.loaded(),t=function(e,t,s){if(null!==s&&void 0!==s.select){if(a.rows({selected:!0}).any()&&a.rows().deselect(),void 0!==s.select.rows&&a.rows(s.select.rows).select(),a.columns({selected:!0}).any()&&a.columns().deselect(),void 0!==s.select.columns&&a.columns(s.select.columns).select(),a.cells({selected:!0}).any()&&a.cells().deselect(),void 0!==s.select.cells)for(var l=0;l<s.select.cells.length;l++)a.cell(s.select.cells[l].row,s.select.cells[l].column).select();a.state.save()}},a.on("stateSaveParams",function(e,t,s){s.select={},s.select.rows=a.rows({selected:!0}).ids(!0).toArray(),s.select.columns=a.columns({selected:!0})[0],s.select.cells=a.cells({selected:!0})[0].map(function(e){return{row:a.row(e.row).id(!0),column:e.column}})}).on("stateLoadParams",t).one("init",function(){t(0,0,e)}),l=p.oInit.select,s=v.defaults.select,s=void 0===l?s:l,l="row",o=!(n=!(c="api")),d="td, th",u="selected",_=h=!(f=r=!(i=null)),p._select={infoEls:[]},!0===s?(c="os",h=!0):"string"==typeof s?(c=s,h=!0):m.isPlainObject(s)&&(void 0!==s.blurable&&(n=s.blurable),void 0!==s.toggleable&&(o=s.toggleable),void 0!==s.info&&(r=s.info),void 0!==s.items&&(l=s.items),h=(c=void 0!==s.style?s.style:"os",!0),void 0!==s.selector&&(d=s.selector),void 0!==s.className&&(u=s.className),void 0!==s.headerCheckbox&&(f=s.headerCheckbox),void 0!==s.selectable&&(i=s.selectable),void 0!==s.keys)&&(_=s.keys),a.select.selector(d),a.select.items(l),a.select.style(c),a.select.blurable(n),a.select.toggleable(o),a.select.info(r),a.select.keys(_),a.select.selectable(i),p._select.className=u,!h&&m(a.table().node()).hasClass("selectable")&&a.select.style("os"),f||"select-page"===f||"select-all"===f)&&a.ready(function(){var c,n,o;n=f,o=(c=a).settings()[0].aoColumns,c.columns().iterator("column",function(e,t){var s,l;g(o[t])&&(t=c.column(t).header(),(s=m("div.dt-column-header",t)).length&&(t=s),m("input",t).length||(l=m("<input>").attr({class:w(!0),type:"checkbox","aria-label":c.i18n("select.aria.headerCheckbox")||"Select all rows"}).appendTo(t).on("change",function(){this.checked?("select-page"==n?c.rows({page:"current"}):c.rows({search:"applied"})).select():("select-page"==n?c.rows({page:"current",selected:!0}):c.rows({selected:!0})).deselect()}).on("click",function(e){e.stopPropagation()}),c.on("draw select deselect",function(e,t,s){"row"!==s&&s||((s=((e,t)=>{var s=e.settings()[0],l=s._select.selectable,c=0,n=("select-page"==t?e.rows({page:"current",selected:!0}):e.rows({selected:!0})).count(),o=("select-page"==t?e.rows({page:"current",selected:!0}):e.rows({search:"applied",selected:!0})).count();if(l)for(var a=("select-page"==t?e.rows({page:"current"}):e.rows({search:"applied"})).indexes(),i=0;i<a.length;i++){var r=s.aoData[a[i]];l(r._aData,r.nTr,a[i])&&c++}else c=("select-page"==t?e.rows({page:"current"}):e.rows({search:"applied"})).count();return{available:c,count:n,search:o}})(c,n)).search&&s.search<=s.count&&s.search===s.available?l.prop("checked",!0).prop("indeterminate",!1):0===s.search&&0===s.count?l.prop("checked",!1).prop("indeterminate",!1):l.prop("checked",!1).prop("indeterminate",!0))})))})})},m.each([{type:"row",prop:"aoData"},{type:"column",prop:"aoColumns"}],function(e,i){v.ext.selector[i.type].push(function(e,t,s){var l,c=t.selected,n=[];if(!0!==c&&!1!==c)return s;for(var o=0,a=s.length;o<a;o++)(l=e[i.prop][s[o]])&&(!0===c&&!0===l._select_selected||!1===c&&!l._select_selected)&&n.push(s[o]);return n})}),v.ext.selector.cell.push(function(e,t,s){var l,c=t.selected,n=[];if(void 0===c)return s;for(var o=0,a=s.length;o<a;o++)(l=e.aoData[s[o].row])&&(!0===c&&l._selected_cells&&!0===l._selected_cells[s[o].column]||!1===c&&(!l._selected_cells||!l._selected_cells[s[o].column]))&&n.push(s[o]);return n});var e=v.Api.register,t=v.Api.registerPlural;function s(t,s){return function(e){return e.i18n("buttons."+t,s)}}function C(e){e=e._eventNamespace;return"draw.dt.DT"+e+" select.dt.DT"+e+" deselect.dt.DT"+e}e("select()",function(){return this.iterator("table",function(e){v.select.init(new v.Api(e))})}),e("select.blurable()",function(t){return void 0===t?this.context[0]._select.blurable:this.iterator("table",function(e){e._select.blurable=t})}),e("select.toggleable()",function(t){return void 0===t?this.context[0]._select.toggleable:this.iterator("table",function(e){e._select.toggleable=t})}),e("select.info()",function(t){return void 0===t?this.context[0]._select.info:this.iterator("table",function(e){e._select.info=t})}),e("select.items()",function(t){return void 0===t?this.context[0]._select.items:this.iterator("table",function(e){e._select.items=t,d(new v.Api(e),"selectItems",[t])})}),e("select.keys()",function(s){return void 0===s?this.context[0]._select.keys:this.iterator("table",function(e){var o,t;e._select||v.select.init(new v.Api(e)),e._select.keys=s,o=new v.Api(e),t=(e=o.settings()[0])._select.keys,e="dts-keys-"+e.sTableId,t?(m(o.rows({page:"current"}).nodes()).attr("tabindex",0),o.on("draw."+e,function(){m(o.rows({page:"current"}).nodes()).attr("tabindex",0)}),m(a).on("keydown."+e,function(e){var t,s,l,c=e.keyCode,n=a.activeElement;[9,13,32,38,40].includes(c)&&(l=!0,-1!==(s=(t=o.rows({page:"current"}).nodes().toArray()).indexOf(n)))&&(9===c?!1===e.shift&&s===t.length-1?u(o):!0===e.shift&&0===s?f(o):l=!1:13===c||32===c?(n=o.row(n)).selected()?n.deselect():n.select():38===c?0<s?t[s-1].focus():f(o):s<t.length-1?t[s+1].focus():u(o),l)&&(e.stopPropagation(),e.preventDefault())})):(m(o.rows().nodes()).removeAttr("tabindex"),o.off("draw."+e),m(a).off("keydown."+e))})}),e("select.style()",function(s){return void 0===s?this.context[0]._select.style:this.iterator("table",function(e){e._select||v.select.init(new v.Api(e)),e._select_init||o(e),e._select.style=s;var t=new v.Api(e);"api"!==s?t.ready(function(){n(t),c(t)}):n(t),d(new v.Api(e),"selectStyle",[s])})}),e("select.selector()",function(l){return void 0===l?this.context[0]._select.selector:this.iterator("table",function(e){var t=new v.Api(e),s=e._select.style;n(t),e._select.selector=l,s&&"api"!==s?t.ready(function(){n(t),c(t)}):n(t)})}),e("select.selectable()",function(e){var t=this.context[0];return e?(t._select.selectable=e,this):t._select.selectable}),e("select.last()",function(e){var t=this.context[0];return e?(t._select_lastCell=e,this):t._select_lastCell}),e("select.cumulative()",function(l){var e;return l?this.iterator("table",function(e){var t,s;e._select_mode!==l&&(t=new v.Api(e),"subtractive"===l?(s=t.rows({selected:!1}).ids().toArray(),e._select_mode=l,e._select_set.length=0,e._select_set.push.apply(e._select_set,s)):(s=t.rows({selected:!0}).ids().toArray(),e._select_mode=l,e._select_set.length=0,e._select_set.push.apply(e._select_set,s)))}).draw(!1):(e=this.context[0])&&e._select_set?{mode:e._select_mode,rows:e._select_set}:null}),t("rows().select()","row().select()",function(e){var o=this,a=[];return!1===e?this.deselect():(this.iterator("row",function(e,t){_(e);var s=e.aoData[t],l=e.aoColumns;if(e._select.selectable&&!1===e._select.selectable(s._aData,s.nTr,t))return;m(s.nTr).addClass(e._select.className),s._select_selected=!0,a.push(t);for(var c=0;c<l.length;c++){var n=l[c];null===n.sType&&o.columns().types(),g(n)&&((n=s.anCells)&&n[c]&&m("input."+w(!0),n[c]).prop("checked",!0),null!==s._aSortData)&&(s._aSortData[c]=null)}}),this.iterator("table",function(e){d(o,"select",["row",a],!0)}),this)}),e("row().selected()",function(){var e=this.context[0];return!!(e&&this.length&&e.aoData[this[0]]&&e.aoData[this[0]]._select_selected)}),e("row().focus()",function(){var e=this.context[0];e&&this.length&&e.aoData[this[0]]&&e.aoData[this[0]].nTr&&e.aoData[this[0]].nTr.focus()}),e("row().blur()",function(){var e=this.context[0];e&&this.length&&e.aoData[this[0]]&&e.aoData[this[0]].nTr&&e.aoData[this[0]].nTr.blur()}),t("columns().select()","column().select()",function(e){var s=this;return!1===e?this.deselect():(this.iterator("column",function(e,t){_(e),e.aoColumns[t]._select_selected=!0;t=new v.Api(e).column(t);m(t.header()).addClass(e._select.className),m(t.footer()).addClass(e._select.className),t.nodes().to$().addClass(e._select.className)}),this.iterator("table",function(e,t){d(s,"select",["column",s[t]],!0)}),this)}),e("column().selected()",function(){var e=this.context[0];return!!(e&&this.length&&e.aoColumns[this[0]]&&e.aoColumns[this[0]]._select_selected)}),t("cells().select()","cell().select()",function(e){var s=this;return!1===e?this.deselect():(this.iterator("cell",function(e,t,s){_(e);t=e.aoData[t];void 0===t._selected_cells&&(t._selected_cells=[]),t._selected_cells[s]=!0,t.anCells&&m(t.anCells[s]).addClass(e._select.className)}),this.iterator("table",function(e,t){d(s,"select",["cell",s.cells(s[t]).indexes().toArray()],!0)}),this)}),e("cell().selected()",function(){var e=this.context[0];if(e&&this.length){e=e.aoData[this[0][0].row];if(e&&e._selected_cells&&e._selected_cells[this[0][0].column])return!0}return!1}),t("rows().deselect()","row().deselect()",function(){var o=this;return this.iterator("row",function(e,t){var s=e.aoData[t],l=e.aoColumns;m(s.nTr).removeClass(e._select.className),s._select_selected=!1,e._select_lastCell=null;for(var c=0;c<l.length;c++){var n=l[c];null===n.sType&&o.columns().types(),g(n)&&((n=s.anCells)&&n[c]&&m("input."+w(!0),s.anCells[c]).prop("checked",!1),null!==s._aSortData)&&(s._aSortData[c]=null)}}),this.iterator("table",function(e,t){d(o,"deselect",["row",o[t]],!0)}),this}),t("columns().deselect()","column().deselect()",function(){var s=this;return this.iterator("column",function(l,e){l.aoColumns[e]._select_selected=!1;var t=new v.Api(l),s=t.column(e);m(s.header()).removeClass(l._select.className),m(s.footer()).removeClass(l._select.className),t.cells(null,e).indexes().each(function(e){var t=l.aoData[e.row],s=t._selected_cells;!t.anCells||s&&s[e.column]||m(t.anCells[e.column]).removeClass(l._select.className)})}),this.iterator("table",function(e,t){d(s,"deselect",["column",s[t]],!0)}),this}),t("cells().deselect()","cell().deselect()",function(){var s=this;return this.iterator("cell",function(e,t,s){t=e.aoData[t];void 0!==t._selected_cells&&(t._selected_cells[s]=!1),t.anCells&&!e.aoColumns[s]._select_selected&&m(t.anCells[s]).removeClass(e._select.className)}),this.iterator("table",function(e,t){d(s,"deselect",["cell",s[t]],!0)}),this});var k=0;return m.extend(v.ext.buttons,{selected:{text:s("selected","Selected"),className:"buttons-selected",limitTo:["rows","columns","cells"],init:function(s,e,l){var c=this;l._eventNamespace=".select"+k++,s.on(C(l),function(){var e,t;c.enable((e=s,!(-1===(t=l).limitTo.indexOf("rows")||!e.rows({selected:!0}).any())||!(-1===t.limitTo.indexOf("columns")||!e.columns({selected:!0}).any())||!(-1===t.limitTo.indexOf("cells")||!e.cells({selected:!0}).any())))}),this.disable()},destroy:function(e,t,s){e.off(s._eventNamespace)}},selectedSingle:{text:s("selectedSingle","Selected single"),className:"buttons-selected-single",init:function(t,e,s){var l=this;s._eventNamespace=".select"+k++,t.on(C(s),function(){var e=t.rows({selected:!0}).flatten().length+t.columns({selected:!0}).flatten().length+t.cells({selected:!0}).flatten().length;l.enable(1===e)}),this.disable()},destroy:function(e,t,s){e.off(s._eventNamespace)}},selectAll:{text:s("selectAll","Select all"),className:"buttons-select-all",action:function(e,t,s,l){var c=this.select.items(),n=l.selectorModifier;(n?("function"==typeof n&&(n=n.call(t,e,t,s,l)),this[c+"s"](n)):this[c+"s"]()).select()}},selectNone:{text:s("selectNone","Deselect all"),className:"buttons-select-none",action:function(){_(this.settings()[0],!0)},init:function(t,e,s){var l=this;s._eventNamespace=".select"+k++,t.on(C(s),function(){var e=t.rows({selected:!0}).flatten().length+t.columns({selected:!0}).flatten().length+t.cells({selected:!0}).flatten().length;l.enable(0<e)}),this.disable()},destroy:function(e,t,s){e.off(s._eventNamespace)}},showSelected:{text:s("showSelected","Show only selected"),className:"buttons-show-selected",action:function(e,t){var l;t.search.fixed("dt-select")?(t.search.fixed("dt-select",null),this.active(!1)):(l=t.settings()[0].aoData,t.search.fixed("dt-select",function(e,t,s){return l[s]._select_selected}),this.active(!0)),t.draw()}}}),m.each(["Row","Column","Cell"],function(e,t){var c=t.toLowerCase();v.ext.buttons["select"+t+"s"]={text:s("select"+t+"s","Select "+c+"s"),className:"buttons-select-"+c+"s",action:function(){this.select.items(c)},init:function(e){var l=this;this.active(e.select.items()===c),e.on("selectItems.dt.DT",function(e,t,s){l.active(s===c)})}}}),v.type("select-checkbox",{className:"dt-select",detect:v.versionCheck("2.1")?{oneOf:function(){return!1},allOf:function(){return!1},init:function(e,t,s){return g(t)}}:function(e){return"select-checkbox"===e&&e},order:{pre:function(e){return"X"===e?-1:0}}}),m.extend(!0,v.defaults.oLanguage,{select:{aria:{rowCheckbox:"Select row"}}}),v.render.select=function(e,t){function s(e,t,s,l){var c=l.settings.aoData[l.row],n=c._select_selected,o=l.settings.oLanguage.select.aria.rowCheckbox,a=l.settings._select.selectable;return"display"!==t?"type"===t?"select-checkbox":"filter"!==t&&n?"X":"":a&&!1===a(s,c.nTr,l.row)?"":m("<input>").attr({"aria-label":o,class:w(),name:r?r(s):null,type:"checkbox",value:i?i(s):null,checked:n}).on("input",function(e){e.preventDefault(),this.checked=m(this).closest("tr").hasClass("selected")})[0]}var i=e?v.util.get(e):null,r=t?v.util.get(t):null;return s._name="selectCheckbox",s},v.ext.order["select-checkbox"]=function(t,e){return this.api().column(e,{order:"index"}).nodes().map(function(e){return"row"===t._select.items?m(e).parent().hasClass(t._select.className).toString():"cell"===t._select.items&&m(e).hasClass(t._select.className).toString()})},m.fn.DataTable.select=v.select,m(a).on("i18n.dt.dtSelect preInit.dt.dtSelect",function(e,t){"dt"===e.namespace&&v.select.init(new v.Api(t))}),v});
4
+ (s=>{var l,c;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return s(e,window,document)}):"object"==typeof exports?(l=require("jquery"),c=function(e,t){t.fn.dataTable||require("datatables.net")(e,t)},"undefined"==typeof window?module.exports=function(e,t){return e=e||window,t=t||l(e),c(e,t),s(t,e,e.document)}:(c(window,l),module.exports=s(l,window,window.document))):s(jQuery,window,document)})(function(v,i,r){var w=v.fn.dataTable;function d(n,e,t){function s(t,s){s<t&&(e=s,s=t,t=e);var e,l=!1;return n.columns(":visible").indexes().filter(function(e){return e===t&&(l=!0),e===s?!(l=!1):l})}function l(t,s){var e,l=n.rows({search:"applied"}).indexes(),c=(l.indexOf(t)>l.indexOf(s)&&(e=s,s=t,t=e),!1);return l.filter(function(e){return e===t&&(c=!0),e===s?!(c=!1):c})}var c,t=n.cells({selected:!0}).any()||t?(c=s(t.column,e.column),l(t.row,e.row)):(c=s(0,e.column),l(0,e.row)),t=n.cells(t,c).flatten();n.cells(e,{selected:!0}).any()?n.cells(t).deselect():n.cells(t).select()}function g(e){var t=w.select.classes.checkbox;return e?t.replace(/ /g,"."):t}function n(e){var t=e.settings()[0]._select.selector;v(e.table().container()).off("mousedown.dtSelect",t).off("mouseup.dtSelect",t).off("click.dtSelect",t),v("body").off("click.dtSelect"+m(e.table().node()))}function c(o){var a,t=v(o.table().container()),s=o.settings()[0],l=s._select.selector;t.on("mousedown.dtSelect",l,function(e){(e.shiftKey||e.metaKey||e.ctrlKey)&&t.css("-moz-user-select","none").one("selectstart.dtSelect",l,function(){return!1}),i.getSelection&&(a=i.getSelection())}).on("mouseup.dtSelect",l,function(){t.css("-moz-user-select","")}).on("click.dtSelect",l,function(e){var t,s=o.select.items();if(a){var l=i.getSelection();if((!l.anchorNode||v(l.anchorNode).closest("table")[0]===o.table().node())&&l!==a)return}var c,l=o.settings()[0],n=o.table().container();v(e.target).closest("div.dt-container")[0]==n&&(n=o.cell(v(e.target).closest("td, th"))).any()&&(c=v.Event("user-select.dt"),u(o,c,[s,n,e]),c.isDefaultPrevented()||(c=n.index(),"row"===s?(t=c.row,p(e,o,l,"row",t)):"column"===s?(t=n.index().column,p(e,o,l,"column",t)):"cell"===s&&(t=n.index(),p(e,o,l,"cell",t)),l._select_lastCell=c))}),v("body").on("click.dtSelect"+m(o.table().node()),function(e){var t;!s._select.blurable||v(e.target).parents().filter(o.table().container()).length||0===v(e.target).parents("html").length||v(e.target).parents("div.DTE").length||(t=v.Event("select-blur.dt"),u(o,t,[e.target,e]),t.isDefaultPrevented())||_(s,!0)})}function u(e,t,s,l){l&&!e.flatten().length||("string"==typeof t&&(t+=".dt"),s.unshift(e),v(e.table().node()).trigger(t,s))}function b(e){return e.mRender&&"selectCheckbox"===e.mRender._name}function l(l,e){if("api"!==l.select.style()&&!1!==l.select.info()){for(var t=l.settings()[0],s=t._select_set,c=s.length-1;0<=c;c--)t.aIds[s[c]]||s.splice(c,1);var n=s.length||l.rows({selected:!0}).count(),o=l.columns({selected:!0}).count(),a=l.cells({selected:!0}).count(),i=("subtractive"===t._select_mode&&(n=l.page.info().recordsDisplay-s.length),function(e,t,s){e.append(v('<span class="select-item"/>').append(l.i18n("select."+t+"s",{_:"%d "+t+"s selected",0:"",1:"1 "+t+" selected"},s)))}),e=v(e),r=v('<span class="select-info"/>'),n=(i(r,"row",n),i(r,"column",o),i(r,"cell",a),e.children("span.select-info"));n.length&&n.remove(),""!==r.text()&&e.append(r)}}function f(e,t,s){e.one("draw",function(){e.row(s).node().focus()}).page(t).draw(!1)}function o(o){var c,a=new w.Api(o);o._select_init=!0,o._select_mode="additive",o._select_set=[],o.aoRowCreatedCallback.push(function(e,t,s){var l,c,n=o.aoData[s],s=a.row(s).id();for((n._select_selected||"additive"===o._select_mode&&o._select_set.includes(s)||"subtractive"===o._select_mode&&!o._select_set.includes(s))&&(n._select_selected=!0,v(e).addClass(o._select.className).find("input."+g(!0)).prop("checked",!0)),l=0,c=o.aoColumns.length;l<c;l++)(o.aoColumns[l]._select_selected||n._selected_cells&&n._selected_cells[l])&&v(n.anCells[l]).addClass(o._select.className)}),(c=a).on("select",function(e,t,s,l){"row"===s&&("additive"===(s=c.settings()[0])._select_mode?y:x)(c,s._select_set,l)}),c.on("deselect",function(e,t,s,l){"row"===s&&("additive"===(s=c.settings()[0])._select_mode?x:y)(c,s._select_set,l)}),a.on("info.dt",function(e,t,s){t._select.infoEls.includes(s)||t._select.infoEls.push(s),l(a,s)}),a.on("select.dtSelect.dt deselect.dtSelect.dt",function(){o._select.infoEls.forEach(function(e){l(a,e)}),a.state.save()}),a.on("destroy.dtSelect",function(){v(a.rows({selected:!0}).nodes()).removeClass(a.settings()[0]._select.className),v("input."+g(!0),a.table().header()).remove(),n(a),a.off(".dtSelect"),v("body").off(".dtSelect"+m(a.table().node()))})}function h(e,t,s,l){var c,n=e[t+"s"]({search:"applied"}).indexes(),l=n.indexOf(l),o=n.indexOf(s);e[t+"s"]({selected:!0}).any()||-1!==l?(o<l&&(c=o,o=l,l=c),n.splice(o+1,n.length),n.splice(0,l)):n.splice(n.indexOf(s)+1,n.length),e[t](s,{selected:!0}).any()?(n.splice(n.indexOf(s),1),e[t+"s"](n).deselect()):e[t+"s"](n).select()}function _(e,t){!t&&"single"!==e._select.style||((t=new w.Api(e)).rows({selected:!0}).deselect(),t.columns({selected:!0}).deselect(),t.cells({selected:!0}).deselect())}function p(e,t,s,l,c){var n=t.select.style(),o=t.select.toggleable(),a=t[l](c,{selected:!0}).any();a&&!o||("os"===n?e.ctrlKey||e.metaKey?t[l](c).select(!a):e.shiftKey?"cell"===l?d(t,c,s._select_lastCell||null):h(t,l,c,s._select_lastCell?s._select_lastCell[l]:null):(o=t[l+"s"]({selected:!0}),a&&1===o.flatten().length?t[l](c).deselect():(o.deselect(),t[l](c).select())):"multi+shift"==n&&e.shiftKey?"cell"===l?d(t,c,s._select_lastCell||null):h(t,l,c,s._select_lastCell?s._select_lastCell[l]:null):t[l](c).select(!a))}function m(e){return e.id.replace(/[^a-zA-Z0-9\-\_]/g,"-")}function y(e,t,s){for(var l=0;l<s.length;l++){var c=e.row(s[l]).id();c&&"undefined"!==c&&!t.includes(c)&&t.push(c)}}function x(e,t,s){for(var l=0;l<s.length;l++){var c=e.row(s[l]).id(),c=t.indexOf(c);-1!==c&&t.splice(c,1)}}w.select={},w.select.classes={checkbox:"dt-select-checkbox"},w.select.version="3.1.0",w.select.init=function(a){var e,t,s,l,c,n,o,i,r,d,u,f,h,_,p,m=a.settings()[0];if(!w.versionCheck("2"))throw"Warning: Select requires DataTables 2 or newer";!m._select&&(e=a.state.loaded(),t=function(e,t,s){if(null!==s&&void 0!==s.select){if(a.rows({selected:!0}).any()&&a.rows().deselect(),void 0!==s.select.rows&&a.rows(s.select.rows).select(),a.columns({selected:!0}).any()&&a.columns().deselect(),void 0!==s.select.columns&&a.columns(s.select.columns).select(),a.cells({selected:!0}).any()&&a.cells().deselect(),void 0!==s.select.cells)for(var l=0;l<s.select.cells.length;l++)a.cell(s.select.cells[l].row,s.select.cells[l].column).select();a.state.save()}},a.on("stateSaveParams",function(e,t,s){s.select={},s.select.rows=a.rows({selected:!0}).ids(!0).toArray(),s.select.columns=a.columns({selected:!0})[0],s.select.cells=a.cells({selected:!0})[0].map(function(e){return{row:a.row(e.row).id(!0),column:e.column}})}).on("stateLoadParams",t).one("init",function(){t(0,0,e)}),l=m.oInit.select,s=w.defaults.select,s=void 0===l?s:l,l="row",o=!(n=!(c="api")),d="td, th",u="selected",p=_=h=!(f=r=!(i=null)),m._select={infoEls:[]},!0===s?(c="os",h=!0):"string"==typeof s?(c=s,h=!0):v.isPlainObject(s)&&(void 0!==s.blurable&&(n=s.blurable),void 0!==s.toggleable&&(o=s.toggleable),void 0!==s.info&&(r=s.info),void 0!==s.items&&(l=s.items),h=(c=void 0!==s.style?s.style:"os",!0),void 0!==s.selector&&(d=s.selector),void 0!==s.className&&(u=s.className),void 0!==s.headerCheckbox&&(f=s.headerCheckbox),void 0!==s.selectable&&(i=s.selectable),void 0!==s.keys&&(_=s.keys),void 0!==s.keysWrap)&&(p=s.keysWrap),a.select.selector(d),a.select.items(l),a.select.style(c),a.select.blurable(n),a.select.toggleable(o),a.select.info(r),a.select.keys(_,p),a.select.selectable(i),m._select.className=u,!h&&v(a.table().node()).hasClass("selectable")&&a.select.style("os"),f||"select-page"===f||"select-all"===f)&&a.ready(function(){var c,n,o;n=f,o=(c=a).settings()[0].aoColumns,c.columns().iterator("column",function(e,t){var s,l;b(o[t])&&(t=c.column(t).header(),(s=v("div.dt-column-header",t)).length&&(t=s),v("input",t).length||(l=v("<input>").attr({class:g(!1),type:"checkbox","aria-label":c.i18n("select.aria.headerCheckbox")||"Select all rows"}).appendTo(t).on("change",function(){this.checked?("select-page"==n?c.rows({page:"current"}):c.rows({search:"applied"})).select():("select-page"==n?c.rows({page:"current",selected:!0}):c.rows({selected:!0})).deselect()}).on("click",function(e){e.stopPropagation()}),c.on("draw select deselect",function(e,t,s){"row"!==s&&s||((s=((e,t)=>{var s=e.settings()[0],l=s._select.selectable,c=0,n=("select-page"==t?e.rows({page:"current",selected:!0}):e.rows({selected:!0})).count(),o=("select-page"==t?e.rows({page:"current",selected:!0}):e.rows({search:"applied",selected:!0})).count();if(l)for(var a=("select-page"==t?e.rows({page:"current"}):e.rows({search:"applied"})).indexes(),i=0;i<a.length;i++){var r=s.aoData[a[i]];l(r._aData,r.nTr,a[i])&&c++}else c=("select-page"==t?e.rows({page:"current"}):e.rows({search:"applied"})).count();return{available:c,count:n,search:o}})(c,n)).search&&s.search<=s.count&&s.search===s.available?l.prop("checked",!0).prop("indeterminate",!1):0===s.search&&0===s.count?l.prop("checked",!1).prop("indeterminate",!1):l.prop("checked",!1).prop("indeterminate",!0))})))})})},v.each([{type:"row",prop:"aoData"},{type:"column",prop:"aoColumns"}],function(e,i){w.ext.selector[i.type].push(function(e,t,s){var l,c=t.selected,n=[];if(!0!==c&&!1!==c)return s;for(var o=0,a=s.length;o<a;o++)(l=e[i.prop][s[o]])&&(!0===c&&!0===l._select_selected||!1===c&&!l._select_selected)&&n.push(s[o]);return n})}),w.ext.selector.cell.push(function(e,t,s){var l,c=t.selected,n=[];if(void 0===c)return s;for(var o=0,a=s.length;o<a;o++)(l=e.aoData[s[o].row])&&(!0===c&&l._selected_cells&&!0===l._selected_cells[s[o].column]||!1===c&&(!l._selected_cells||!l._selected_cells[s[o].column]))&&n.push(s[o]);return n});var e=w.Api.register,t=w.Api.registerPlural;function s(t,s){return function(e){return e.i18n("buttons."+t,s)}}function a(e){e=e._eventNamespace;return"draw.dt.DT"+e+" select.dt.DT"+e+" deselect.dt.DT"+e}e("select()",function(){return this.iterator("table",function(e){w.select.init(new w.Api(e))})}),e("select.blurable()",function(t){return void 0===t?this.context[0]._select.blurable:this.iterator("table",function(e){e._select.blurable=t})}),e("select.toggleable()",function(t){return void 0===t?this.context[0]._select.toggleable:this.iterator("table",function(e){e._select.toggleable=t})}),e("select.info()",function(t){return void 0===t?this.context[0]._select.info:this.iterator("table",function(e){e._select.info=t})}),e("select.items()",function(t){return void 0===t?this.context[0]._select.items:this.iterator("table",function(e){e._select.items=t,u(new w.Api(e),"selectItems",[t])})}),e("select.keys()",function(s,l){return void 0===s?this.context[0]._select.keys:this.iterator("table",function(e){var a,t,i;e._select||w.select.init(new w.Api(e)),e._select.keys=s,e._select.keysWrap=l,a=new w.Api(e),t=(e=a.settings()[0])._select.keys,i=e._select.keysWrap,e="dts-keys-"+e.sTableId,t?(v(a.rows({page:"current"}).nodes()).attr("tabindex",0),a.on("draw."+e,function(){v(a.rows({page:"current"}).nodes()).attr("tabindex",0)}),v(r).on("keydown."+e,function(e){var t,s,l,c,n=e.keyCode,o=r.activeElement;[9,13,32,38,40].includes(n)&&(s=(t=a.rows({page:"current"}).nodes().toArray()).indexOf(o),l=!0,c=a.page.info(),-1!==s)&&(9===n?!1===e.shift&&s===t.length-1?f(a,"next",":first-child"):!0===e.shift&&0===s?f(a,"previous",":last-child"):l=!1:13===n||32===n?(o=a.row(o)).selected()?o.deselect():o.select():38===n?0<s?t[s-1].focus():0<c.start?f(a,"previous",":last-child"):i&&f(a,"last",":last-child"):s<t.length-1?t[s+1].focus():c.page<c.pages-1?f(a,"next",":first-child"):i&&f(a,"first",":first-child"),l)&&(e.stopPropagation(),e.preventDefault())})):(v(a.rows().nodes()).removeAttr("tabindex"),a.off("draw."+e),v(r).off("keydown."+e))})}),e("select.style()",function(s){return void 0===s?this.context[0]._select.style:this.iterator("table",function(e){e._select||w.select.init(new w.Api(e)),e._select_init||o(e),e._select.style=s;var t=new w.Api(e);"api"!==s?t.ready(function(){n(t),c(t)}):n(t),u(new w.Api(e),"selectStyle",[s])})}),e("select.selector()",function(l){return void 0===l?this.context[0]._select.selector:this.iterator("table",function(e){var t=new w.Api(e),s=e._select.style;n(t),e._select.selector=l,s&&"api"!==s?t.ready(function(){n(t),c(t)}):n(t)})}),e("select.selectable()",function(e){var t=this.context[0];return e?(t._select.selectable=e,this):t._select.selectable}),e("select.last()",function(e){var t=this.context[0];return e?(t._select_lastCell=e,this):t._select_lastCell}),e("select.cumulative()",function(l){var e;return l?this.iterator("table",function(e){var t,s;e._select_mode!==l&&(t=new w.Api(e),"subtractive"===l?(s=t.rows({selected:!1}).ids().toArray(),e._select_mode=l,e._select_set.length=0,e._select_set.push.apply(e._select_set,s)):(s=t.rows({selected:!0}).ids().toArray(),e._select_mode=l,e._select_set.length=0,e._select_set.push.apply(e._select_set,s)))}).draw(!1):(e=this.context[0])&&e._select_set?{mode:e._select_mode,rows:e._select_set}:null}),t("rows().select()","row().select()",function(e){var o=this,a=[];return!1===e?this.deselect():(this.iterator("row",function(e,t){_(e);var s=e.aoData[t],l=e.aoColumns;if(e._select.selectable&&!1===e._select.selectable(s._aData,s.nTr,t))return;v(s.nTr).addClass(e._select.className),s._select_selected=!0,a.push(t);for(var c=0;c<l.length;c++){var n=l[c];null===n.sType&&o.columns().types(),b(n)&&((n=s.anCells)&&n[c]&&v("input."+g(!0),n[c]).prop("checked",!0),null!==s._aSortData)&&(s._aSortData[c]=null)}}),this.iterator("table",function(e){u(o,"select",["row",a],!0)}),this)}),e("row().selected()",function(){var e=this.context[0];return!!(e&&this.length&&e.aoData[this[0]]&&e.aoData[this[0]]._select_selected)}),e("row().focus()",function(){var e=this.context[0];e&&this.length&&e.aoData[this[0]]&&e.aoData[this[0]].nTr&&e.aoData[this[0]].nTr.focus()}),e("row().blur()",function(){var e=this.context[0];e&&this.length&&e.aoData[this[0]]&&e.aoData[this[0]].nTr&&e.aoData[this[0]].nTr.blur()}),t("columns().select()","column().select()",function(e){var s=this;return!1===e?this.deselect():(this.iterator("column",function(e,t){_(e),e.aoColumns[t]._select_selected=!0;t=new w.Api(e).column(t);v(t.header()).addClass(e._select.className),v(t.footer()).addClass(e._select.className),t.nodes().to$().addClass(e._select.className)}),this.iterator("table",function(e,t){u(s,"select",["column",s[t]],!0)}),this)}),e("column().selected()",function(){var e=this.context[0];return!!(e&&this.length&&e.aoColumns[this[0]]&&e.aoColumns[this[0]]._select_selected)}),t("cells().select()","cell().select()",function(e){var s=this;return!1===e?this.deselect():(this.iterator("cell",function(e,t,s){_(e);t=e.aoData[t];void 0===t._selected_cells&&(t._selected_cells=[]),t._selected_cells[s]=!0,t.anCells&&v(t.anCells[s]).addClass(e._select.className)}),this.iterator("table",function(e,t){u(s,"select",["cell",s.cells(s[t]).indexes().toArray()],!0)}),this)}),e("cell().selected()",function(){var e=this.context[0];if(e&&this.length){e=e.aoData[this[0][0].row];if(e&&e._selected_cells&&e._selected_cells[this[0][0].column])return!0}return!1}),t("rows().deselect()","row().deselect()",function(){var o=this;return this.iterator("row",function(e,t){var s=e.aoData[t],l=e.aoColumns;v(s.nTr).removeClass(e._select.className),s._select_selected=!1,e._select_lastCell=null;for(var c=0;c<l.length;c++){var n=l[c];null===n.sType&&o.columns().types(),b(n)&&((n=s.anCells)&&n[c]&&v("input."+g(!0),s.anCells[c]).prop("checked",!1),null!==s._aSortData)&&(s._aSortData[c]=null)}}),this.iterator("table",function(e,t){u(o,"deselect",["row",o[t]],!0)}),this}),t("columns().deselect()","column().deselect()",function(){var s=this;return this.iterator("column",function(l,e){l.aoColumns[e]._select_selected=!1;var t=new w.Api(l),s=t.column(e);v(s.header()).removeClass(l._select.className),v(s.footer()).removeClass(l._select.className),t.cells(null,e).indexes().each(function(e){var t=l.aoData[e.row],s=t._selected_cells;!t.anCells||s&&s[e.column]||v(t.anCells[e.column]).removeClass(l._select.className)})}),this.iterator("table",function(e,t){u(s,"deselect",["column",s[t]],!0)}),this}),t("cells().deselect()","cell().deselect()",function(){var s=this;return this.iterator("cell",function(e,t,s){t=e.aoData[t];void 0!==t._selected_cells&&(t._selected_cells[s]=!1),t.anCells&&!e.aoColumns[s]._select_selected&&v(t.anCells[s]).removeClass(e._select.className)}),this.iterator("table",function(e,t){u(s,"deselect",["cell",s[t]],!0)}),this});var C=0;return v.extend(w.ext.buttons,{selected:{text:s("selected","Selected"),className:"buttons-selected",limitTo:["rows","columns","cells"],init:function(s,e,l){var c=this;l._eventNamespace=".select"+C++,s.on(a(l),function(){var e,t;c.enable((e=s,!(-1===(t=l).limitTo.indexOf("rows")||!e.rows({selected:!0}).any())||!(-1===t.limitTo.indexOf("columns")||!e.columns({selected:!0}).any())||!(-1===t.limitTo.indexOf("cells")||!e.cells({selected:!0}).any())))}),this.disable()},destroy:function(e,t,s){e.off(s._eventNamespace)}},selectedSingle:{text:s("selectedSingle","Selected single"),className:"buttons-selected-single",init:function(t,e,s){var l=this;s._eventNamespace=".select"+C++,t.on(a(s),function(){var e=t.rows({selected:!0}).flatten().length+t.columns({selected:!0}).flatten().length+t.cells({selected:!0}).flatten().length;l.enable(1===e)}),this.disable()},destroy:function(e,t,s){e.off(s._eventNamespace)}},selectAll:{text:s("selectAll","Select all"),className:"buttons-select-all",action:function(e,t,s,l){var c=this.select.items(),n=l.selectorModifier;(n?("function"==typeof n&&(n=n.call(t,e,t,s,l)),this[c+"s"](n)):this[c+"s"]()).select()}},selectNone:{text:s("selectNone","Deselect all"),className:"buttons-select-none",action:function(){_(this.settings()[0],!0)},init:function(t,e,s){var l=this;s._eventNamespace=".select"+C++,t.on(a(s),function(){var e=t.rows({selected:!0}).flatten().length+t.columns({selected:!0}).flatten().length+t.cells({selected:!0}).flatten().length;l.enable(0<e)}),this.disable()},destroy:function(e,t,s){e.off(s._eventNamespace)}},showSelected:{text:s("showSelected","Show only selected"),className:"buttons-show-selected",action:function(e,t){var l;t.search.fixed("dt-select")?(t.search.fixed("dt-select",null),this.active(!1)):(l=t.settings()[0].aoData,t.search.fixed("dt-select",function(e,t,s){return l[s]._select_selected}),this.active(!0)),t.draw()}}}),v.each(["Row","Column","Cell"],function(e,t){var c=t.toLowerCase();w.ext.buttons["select"+t+"s"]={text:s("select"+t+"s","Select "+c+"s"),className:"buttons-select-"+c+"s",action:function(){this.select.items(c)},init:function(e){var l=this;this.active(e.select.items()===c),e.on("selectItems.dt.DT",function(e,t,s){l.active(s===c)})}}}),w.type("select-checkbox",{className:"dt-select",detect:w.versionCheck("2.1")?{oneOf:function(){return!1},allOf:function(){return!1},init:function(e,t,s){return b(t)}}:function(e){return"select-checkbox"===e&&e},order:{pre:function(e){return"X"===e?-1:0}}}),v.extend(!0,w.defaults.oLanguage,{select:{aria:{rowCheckbox:"Select row"}}}),w.render.select=function(e,t){function s(e,t,s,l){var c=l.settings.aoData[l.row],n=c._select_selected,o=l.settings.oLanguage.select.aria.rowCheckbox,a=l.settings._select.selectable;return"display"!==t?"type"===t?"select-checkbox":"filter"!==t&&n?"X":"":a&&!1===a(s,c.nTr,l.row)?"":v("<input>").attr({"aria-label":o,class:g(),name:r?r(s):null,type:"checkbox",value:i?i(s):null,checked:n}).on("input",function(e){e.preventDefault(),this.checked=v(this).closest("tr").hasClass("selected")})[0]}var i=e?w.util.get(e):null,r=t?w.util.get(t):null;return s._name="selectCheckbox",s},w.ext.order["select-checkbox"]=function(t,e){return this.api().column(e,{order:"index"}).nodes().map(function(e){return"row"===t._select.items?v(e).parent().hasClass(t._select.className).toString():"cell"===t._select.items&&v(e).hasClass(t._select.className).toString()})},v.fn.DataTable.select=w.select,v(r).on("i18n.dt.dtSelect preInit.dt.dtSelect",function(e,t){"dt"===e.namespace&&w.select.init(new w.Api(t))}),w});
@@ -53,7 +53,7 @@ var DataTable = $.fn.dataTable;
53
53
 
54
54
 
55
55
 
56
- DataTable.select.classes.checkbox = 'form-check-input';
56
+ DataTable.select.classes.checkbox = 'form-check-input dt-select-checkbox';
57
57
 
58
58
 
59
59
  return DataTable;
@@ -1,4 +1,4 @@
1
1
  /*! Bootstrap 5 styling wrapper for Select
2
2
  * © SpryMedia Ltd - datatables.net/license
3
3
  */
4
- (n=>{var o,d;"function"==typeof define&&define.amd?define(["jquery","datatables.net-bs5","datatables.net-select"],function(e){return n(e,window,document)}):"object"==typeof exports?(o=require("jquery"),d=function(e,t){t.fn.dataTable||require("datatables.net-bs5")(e,t),t.fn.dataTable.select||require("datatables.net-select")(e,t)},"undefined"==typeof window?module.exports=function(e,t){return e=e||window,t=t||o(e),d(e,t),n(t,0,e.document)}:(d(window,o),module.exports=n(o,window,window.document))):n(jQuery,window,document)})(function(e,t,n){e=e.fn.dataTable;return e.select.classes.checkbox="form-check-input",e});
4
+ (n=>{var o,d;"function"==typeof define&&define.amd?define(["jquery","datatables.net-bs5","datatables.net-select"],function(e){return n(e,window,document)}):"object"==typeof exports?(o=require("jquery"),d=function(e,t){t.fn.dataTable||require("datatables.net-bs5")(e,t),t.fn.dataTable.select||require("datatables.net-select")(e,t)},"undefined"==typeof window?module.exports=function(e,t){return e=e||window,t=t||o(e),d(e,t),n(t,0,e.document)}:(d(window,o),module.exports=n(o,window,window.document))):n(jQuery,window,document)})(function(e,t,n){e=e.fn.dataTable;return e.select.classes.checkbox="form-check-input dt-select-checkbox",e});
@@ -114,7 +114,7 @@
114
114
  "datatables-extension": "searchpanes"
115
115
  },
116
116
  "DataTables-Select": {
117
- "version": "3.0.1",
117
+ "version": "3.1.0",
118
118
  "datatables-extension": "select"
119
119
  },
120
120
  "DataTables-StateRestore": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ntlab/ntjs-assets",
3
- "version": "2.94.0",
3
+ "version": "2.95.0",
4
4
  "description": "Node Javascript assets",
5
5
  "main": "index.js",
6
6
  "scripts": {