diff --git a/demos/advanced-grid-editable.html b/demos/advanced-grid-editable.html index 47613e79..6d9b08b4 100644 --- a/demos/advanced-grid-editable.html +++ b/demos/advanced-grid-editable.html @@ -1,7 +1,7 @@ - tablefilter v0.0.11 - Editable Grid Demo + tablefilter v0.0.12 - Editable Grid Demo -

tablefilter v0.0.11

+

tablefilter v0.0.12

Editable grid demo

diff --git a/demos/advanced-grid-selection.html b/demos/advanced-grid-selection.html index f5dddc01..3a38ca03 100644 --- a/demos/advanced-grid-selection.html +++ b/demos/advanced-grid-selection.html @@ -1,7 +1,7 @@ - tablefilter v0.0.11 - Selection Grid Demo + tablefilter v0.0.12 - Selection Grid Demo -

tablefilter v0.0.11

+

tablefilter v0.0.12

Selection grid demo

diff --git a/demos/auto-filter.html b/demos/auto-filter.html index 4b97c372..91cd29f2 100644 --- a/demos/auto-filter.html +++ b/demos/auto-filter.html @@ -1,7 +1,7 @@ - tablefilter v0.0.11 - Auto-filter Demo + tablefilter v0.0.12 - Auto-filter Demo -

tablefilter v0.0.11

+

tablefilter v0.0.12

Auto-filter demo

This demo features the auto-filter behaviour, the table is filtered as soon diff --git a/demos/columns-visibility.html b/demos/columns-visibility.html index d6470f55..c8111ed0 100644 --- a/demos/columns-visibility.html +++ b/demos/columns-visibility.html @@ -1,7 +1,7 @@ - tablefilter v0.0.11 - Columns Visibility Extension Demo + tablefilter v0.0.12 - Columns Visibility Extension Demo -

tablefilter v0.0.11

+

tablefilter v0.0.12

Data types demo

This example features 3 date types and 2 numeric formatting for the currency diff --git a/demos/demo.html b/demos/demo.html index 2fa24001..5dbde930 100644 --- a/demos/demo.html +++ b/demos/demo.html @@ -1,7 +1,7 @@ - tablefilter v0.0.11 - Demo + tablefilter v0.0.12 - Demo -

tablefilter v0.0.11

+

tablefilter v0.0.12


diff --git a/demos/external-filters-visibility-commad.html b/demos/external-filters-visibility-commad.html
index b887916d..4ddff5af 100644
--- a/demos/external-filters-visibility-commad.html
+++ b/demos/external-filters-visibility-commad.html
@@ -1,7 +1,7 @@
 
 
 
-    tablefilter v0.0.11 - Filters Visibility Extension Demo
+    tablefilter v0.0.12 - Filters Visibility Extension Demo
     
 
 
 
-

tablefilter v0.0.11

+

tablefilter v0.0.12

Filters visibility extension demo

This demo features the filters visibility extension. diff --git a/demos/external-filters.html b/demos/external-filters.html index d5ccffc8..6c581ab5 100644 --- a/demos/external-filters.html +++ b/demos/external-filters.html @@ -1,7 +1,7 @@ - tablefilter v0.0.11 - External Filters Demo + tablefilter v0.0.12 - External Filters Demo -

tablefilter v0.0.11

+

tablefilter v0.0.12

External filters demo

This demo shows how generate the column filters in an external container. diff --git a/demos/filter-images.html b/demos/filter-images.html index d163330c..9aadeae0 100644 --- a/demos/filter-images.html +++ b/demos/filter-images.html @@ -1,7 +1,7 @@ - tablefilter v0.0.11 - Filter and Sort Images Demo + tablefilter v0.0.12 - Filter and Sort Images Demo -

tablefilter v0.0.11

+

tablefilter v0.0.12

Filter and sort images demo

This demo shows how to filter and sort a column containing images by using diff --git a/demos/filters-visibility.html b/demos/filters-visibility.html index c429a073..b294a4f6 100644 --- a/demos/filters-visibility.html +++ b/demos/filters-visibility.html @@ -1,7 +1,7 @@ - tablefilter v0.0.11 - Filters Visibility Extension Demo + tablefilter v0.0.12 - Filters Visibility Extension Demo -

tablefilter v0.0.11

+

tablefilter v0.0.12

Filters visibility extension demo

This demo features the filters visibility extension. diff --git a/demos/grid-layout.html b/demos/grid-layout.html index f02e4a6a..a53f647d 100644 --- a/demos/grid-layout.html +++ b/demos/grid-layout.html @@ -1,7 +1,7 @@ - tablefilter v0.0.11 - Grid Layout Demo + tablefilter v0.0.12 - Grid Layout Demo -

tablefilter v0.0.11

+

tablefilter v0.0.12

Grid layout demo


diff --git a/demos/grouped-headers.html b/demos/grouped-headers.html
index b80c339f..0711b95d 100644
--- a/demos/grouped-headers.html
+++ b/demos/grouped-headers.html
@@ -1,7 +1,7 @@
 
 
 
-    tablefilter v0.0.11 - Grouped Headers Demo
+    tablefilter v0.0.12 - Grouped Headers Demo
     
 
 
 
-

tablefilter v0.0.11

+

tablefilter v0.0.12

Grouped headers demo

With grouped and/or multi-line headers, to place the filters row at desired diff --git a/demos/linked-filters-disabled.html b/demos/linked-filters-disabled.html index 982578cb..636360ac 100644 --- a/demos/linked-filters-disabled.html +++ b/demos/linked-filters-disabled.html @@ -1,7 +1,7 @@ - tablefilter v0.0.11 - Linked filters Demo + tablefilter v0.0.12 - Linked filters Demo -

tablefilter v0.0.11

+

tablefilter v0.0.12

Linked filters with disabled options demo

This demo features the refresh filters behaviour. In this mode, the diff --git a/demos/linked-filters.html b/demos/linked-filters.html index cf1e2eab..d59d3aa0 100644 --- a/demos/linked-filters.html +++ b/demos/linked-filters.html @@ -1,7 +1,7 @@ - tablefilter v0.0.11 - Linked filters Demo + tablefilter v0.0.12 - Linked filters Demo -

tablefilter v0.0.11

+

tablefilter v0.0.12

Linked filters demo

This demo features the linked filters behaviour. In this mode, the drop-down diff --git a/demos/load-filters-on-demand.html b/demos/load-filters-on-demand.html index 394f1e20..f1e5a124 100644 --- a/demos/load-filters-on-demand.html +++ b/demos/load-filters-on-demand.html @@ -1,7 +1,7 @@ - tablefilter v0.0.11 - Load filters on demand Demo + tablefilter v0.0.12 - Load filters on demand Demo -

tablefilter v0.0.11

+

tablefilter v0.0.12

Load filters on demand demo

The filter options are loaded only when used for the first time. diff --git a/demos/pagination.html b/demos/pagination.html index b39434d8..9b64bf3f 100644 --- a/demos/pagination.html +++ b/demos/pagination.html @@ -1,7 +1,7 @@ - tablefilter v0.0.11 - Pagination Demo + tablefilter v0.0.12 - Pagination Demo -

tablefilter v0.0.11

+

tablefilter v0.0.12

Pagination demo


diff --git a/demos/requirejs-dev.html b/demos/requirejs-dev.html
index 22647114..18b5bc32 100644
--- a/demos/requirejs-dev.html
+++ b/demos/requirejs-dev.html
@@ -1,7 +1,7 @@
 
 
 
-    tablefilter v0.0.11 - Development workflow with RequireJs
+    tablefilter v0.0.12 - Development workflow with RequireJs
     
 
 
 
-

tablefilter v0.0.11

+

tablefilter v0.0.12

Development workflow with RequireJs

To take advantage of the RequireJs development workflow use the diff --git a/demos/requirejs.html b/demos/requirejs.html index b5d8e23a..e3a135e5 100644 --- a/demos/requirejs.html +++ b/demos/requirejs.html @@ -1,7 +1,7 @@ - tablefilter v0.0.11 - RequireJs demo + tablefilter v0.0.12 - RequireJs demo -

tablefilter v0.0.11

+

tablefilter v0.0.12

RequireJs Demo


diff --git a/demos/theme-roller.html b/demos/theme-roller.html
index 85f65ab1..46a5262e 100644
--- a/demos/theme-roller.html
+++ b/demos/theme-roller.html
@@ -1,7 +1,7 @@
 
 
 
-    tablefilter v0.0.11 - Theme Roller Demo
+    tablefilter v0.0.12 - Theme Roller Demo
     
 
 
 
-

tablefilter v0.0.11

+

tablefilter v0.0.12

Theme roller demo

This demo shows how to implement a theme roller. diff --git a/dist/starter.html b/dist/starter.html index e6313b6a..2e7b2e6b 100644 --- a/dist/starter.html +++ b/dist/starter.html @@ -1,10 +1,10 @@ - tablefilter v0.0.11 - Starter + tablefilter v0.0.12 - Starter -

tablefilter v0.0.11

+

tablefilter v0.0.12

diff --git a/dist/tablefilter/style/colsVisibility.css b/dist/tablefilter/style/colsVisibility.css index 9a0a9bf0..b8a338c3 100644 --- a/dist/tablefilter/style/colsVisibility.css +++ b/dist/tablefilter/style/colsVisibility.css @@ -1,6 +1,6 @@ /** - * tablefilter v0.0.11 by Max Guglielmi - * build date: 2015-11-21T07:50:21.705Z + * tablefilter v0.0.12 by Max Guglielmi + * build date: 2015-11-21T11:09:08.824Z * MIT License */ span.colVisSpan{text-align:left;}span.colVisSpan a.colVis{display:inline-block;padding:7px 5px 0;font-size:inherit;font-weight:inherit;vertical-align:top}div.colVisCont{position:relative;background:#fff;-webkit-box-shadow:3px 3px 2px #888;-moz-box-shadow:3px 3px 2px #888;box-shadow:3px 3px 2px #888;position:absolute;display:none;border:1px solid #ccc;height:auto;width:250px;background-color:#fff;margin:35px 0 0 -100px;z-index:10000;padding:10px 10px 10px 10px;text-align:left;font-size:12px;}div.colVisCont:after,div.colVisCont:before{bottom:100%;left:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}div.colVisCont:after{border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:10px;margin-left:-10px}div.colVisCont:before{border-color:rgba(255,255,255,0);border-bottom-color:#ccc;border-width:12px;margin-left:-12px}div.colVisCont p{margin:6px auto 6px auto}div.colVisCont a.colVis{display:initial;font-weight:inherit}ul.cols_checklist{padding:0;margin:0;list-style:none;}ul.cols_checklist label{display:block}ul.cols_checklist input{vertical-align:middle;margin:2px 5px 2px 1px}li.cols_checklist_item{padding:4px;margin:0;}li.cols_checklist_item:hover{background-color:#335ea8;color:#fff}.cols_checklist_slc_item{background-color:#335ea8;color:#fff} \ No newline at end of file diff --git a/dist/tablefilter/style/filtersVisibility.css b/dist/tablefilter/style/filtersVisibility.css index 6294aa66..f6ce9227 100644 --- a/dist/tablefilter/style/filtersVisibility.css +++ b/dist/tablefilter/style/filtersVisibility.css @@ -1,6 +1,6 @@ /** - * tablefilter v0.0.11 by Max Guglielmi - * build date: 2015-11-21T07:50:21.705Z + * tablefilter v0.0.12 by Max Guglielmi + * build date: 2015-11-21T11:09:08.824Z * MIT License */ span.expClpFlt a.btnExpClpFlt{width:35px;height:35px;display:inline-block;}span.expClpFlt a.btnExpClpFlt:hover{background-color:#f4f4f4}span.expClpFlt img{padding:8px 11px 11px 11px} \ No newline at end of file diff --git a/dist/tablefilter/style/tablefilter.css b/dist/tablefilter/style/tablefilter.css index 2e77510a..90a85983 100644 --- a/dist/tablefilter/style/tablefilter.css +++ b/dist/tablefilter/style/tablefilter.css @@ -1,6 +1,6 @@ /** - * tablefilter v0.0.11 by Max Guglielmi - * build date: 2015-11-21T07:50:21.705Z + * tablefilter v0.0.12 by Max Guglielmi + * build date: 2015-11-21T11:09:08.824Z * MIT License */ .activeHeader{background-color:#66afe9 !important;color:#fff !important} diff --git a/dist/tablefilter/style/themes/default/default.css b/dist/tablefilter/style/themes/default/default.css index 69010600..54b7c6c6 100644 --- a/dist/tablefilter/style/themes/default/default.css +++ b/dist/tablefilter/style/themes/default/default.css @@ -1,6 +1,6 @@ /** - * tablefilter v0.0.11 by Max Guglielmi - * build date: 2015-11-21T07:50:21.705Z + * tablefilter v0.0.12 by Max Guglielmi + * build date: 2015-11-21T11:09:08.824Z * MIT License */ table.TF{border-left:1px solid #ccc !important;border-top:none !important;border-right:none !important;border-bottom:none !important;}table.TF th{background:#ebecee url("images/bg_th.jpg") left top repeat-x !important;border-bottom:1px solid #d0d0d0 !important;border-right:1px solid #d0d0d0 !important;border-left:1px solid #fff !important;border-top:1px solid #fff !important;color:#333 !important}table.TF td{border-bottom:1px dotted #999 !important;padding:5px !important}.fltrow{background-color:#ebecee !important;}.fltrow th,.fltrow td{border-bottom:1px dotted #666 !important;padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #999 !important}input.flt{width:99% !important}.inf{height:$min-height;background:#d7d7d7 url("images/bg_infDiv.jpg") 0 0 repeat-x !important}input.reset{background:transparent url("images/btn_eraser.gif") center center no-repeat !important}.helpBtn:hover{background-color:transparent}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important;}.nextPage:hover{background:transparent url("images/btn_over_next_page.gif") center center no-repeat !important}.previousPage{background:transparent url("images/btn_previous_page.gif") center center no-repeat !important;}.previousPage:hover{background:transparent url("images/btn_over_previous_page.gif") center center no-repeat !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important;}.firstPage:hover{background:transparent url("images/btn_over_first_page.gif") center center no-repeat !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important;}.lastPage:hover{background:transparent url("images/btn_over_last_page.gif") center center no-repeat !important}div.grd_Cont{background-color:#ebecee !important;border:1px solid #ccc !important;padding:0 !important;}div.grd_Cont .even{background-color:#fff}div.grd_Cont .odd{background-color:#d5d5d5}div.grd_headTblCont{background-color:#ebecee !important;border-bottom:none !important;}div.grd_headTblCont table{border-right:none !important}div.grd_tblCont table th,div.grd_headTblCont table th,div.grd_headTblCont table td{background:#ebecee url("images/bg_th.jpg") left top repeat-x !important;border-bottom:1px solid #d0d0d0 !important;border-right:1px solid #d0d0d0 !important;border-left:1px solid #fff !important;border-top:1px solid #fff !important}div.grd_tblCont table td{border-bottom:1px solid #999 !important}.grd_inf{background:#d7d7d7 url("images/bg_infDiv.jpg") 0 0 repeat-x !important;border-top:1px solid #d0d0d0 !important}.loader{border:1px solid #999}.defaultLoader{width:32px;height:32px;background:transparent url("images/img_loading.gif") 0 0 no-repeat !important}.even{background-color:#fff}.odd{background-color:#d5d5d5}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important} \ No newline at end of file diff --git a/dist/tablefilter/style/themes/mytheme/mytheme.css b/dist/tablefilter/style/themes/mytheme/mytheme.css index 63950c75..b1675a34 100644 --- a/dist/tablefilter/style/themes/mytheme/mytheme.css +++ b/dist/tablefilter/style/themes/mytheme/mytheme.css @@ -1,6 +1,6 @@ /** - * tablefilter v0.0.11 by Max Guglielmi - * build date: 2015-11-21T07:50:21.705Z + * tablefilter v0.0.12 by Max Guglielmi + * build date: 2015-11-21T11:09:08.824Z * MIT License */ table.TF{border-left:1px dotted #81963b !important;border-top:none !important;border-right:0 !important;border-bottom:none !important;}table.TF th{background:#39424b url("images/bg_headers.jpg") left top repeat-x !important;border-bottom:0 !important;border-right:1px dotted #d0d0d0 !important;border-left:0 !important;border-top:0 !important;color:#fff !important}table.TF td{border-bottom:1px dotted #81963b;border-right:1px dotted #81963b;padding:5px !important}.fltrow{background-color:#81963b !important;}.fltrow th,.fltrow td{border-bottom:1px dotted #39424b !important;border-right:1px dotted #fff !important;border-left:0 !important;border-top:0 !important;padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #687830 !important}input.flt{width:99% !important}.inf{background:#d8d8d8;height:$min-height}input.reset{width:53px;background:transparent url("images/btn_filter.png") center center no-repeat !important}.helpBtn:hover{background-color:transparent}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important}.previousPage{background:transparent url("images/btn_previous_page.gif") center center no-repeat !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important}div.grd_Cont{background:#81963b url("images/bg_headers.jpg") left top repeat-x !important;border:1px solid #ccc !important;padding:0 1px 1px 1px !important;}div.grd_Cont .even{background-color:#bccd83}div.grd_Cont .odd{background-color:#fff}div.grd_headTblCont{background-color:#ebecee !important;border-bottom:none !important}div.grd_tblCont table{border-right:none !important;}div.grd_tblCont table td{border-bottom:1px dotted #81963b;border-right:1px dotted #81963b}div.grd_tblCont table th,div.grd_headTblCont table th{background:transparent url("images/bg_headers.jpg") 0 0 repeat-x !important;border-bottom:0 !important;border-right:1px dotted #d0d0d0 !important;border-left:0 !important;border-top:0 !important;padding:0 4px 0 4px !important;color:#fff !important;height:35px !important}div.grd_headTblCont table td{border-bottom:1px dotted #39424b !important;border-right:1px dotted #fff !important;border-left:0 !important;border-top:0 !important;background-color:#81963b !important;padding:1px 3px 1px 3px !important}.grd_inf{background-color:#d8d8d8;border-top:1px solid #d0d0d0 !important}.loader{border:0 !important;background:#81963b !important}.defaultLoader{width:32px;height:32px;background:transparent url("images/img_loading.gif") 0 0 no-repeat !important}.even{background-color:#bccd83}.odd{background-color:#fff}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important} \ No newline at end of file diff --git a/dist/tablefilter/style/themes/skyblue/skyblue.css b/dist/tablefilter/style/themes/skyblue/skyblue.css index 33698a76..8607a83b 100644 --- a/dist/tablefilter/style/themes/skyblue/skyblue.css +++ b/dist/tablefilter/style/themes/skyblue/skyblue.css @@ -1,6 +1,6 @@ /** - * tablefilter v0.0.11 by Max Guglielmi - * build date: 2015-11-21T07:50:21.705Z + * tablefilter v0.0.12 by Max Guglielmi + * build date: 2015-11-21T11:09:08.824Z * MIT License */ table.TF{padding:0;color:#000;border-right:1px solid #a4bed4;border-top:1px solid #a4bed4;border-left:1px solid #a4bed4;border-bottom:0;}table.TF th{margin:0;color:inherit;background:#d1e5fe url("images/bg_skyblue.gif") 0 0 repeat-x;border-color:#fdfdfd #a4bed4 #a4bed4 #fdfdfd;border-width:1px;border-style:solid}table.TF td{margin:0;padding:5px;color:inherit;border-bottom:1px solid #a4bed4;border-left:0;border-top:0;border-right:0}.fltrow{background-color:#d1e5fe !important;}.fltrow th,.fltrow td{padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #a4bed4 !important}input.flt{width:99% !important}.inf{background-color:#e3efff !important;border:1px solid #a4bed4;height:$min-height;color:#004a6f}div.tot,div.status{border-right:0 !important}.helpBtn:hover{background-color:transparent}input.reset{background:transparent url("images/icn_clear_filters.png") center center no-repeat !important}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.nextPage:hover{background:#ffe4ab url("images/btn_next_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.previousPage{background:transparent url("images/btn_prev_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.previousPage:hover{background:#ffe4ab url("images/btn_prev_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.firstPage:hover{background:#ffe4ab url("images/btn_first_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.lastPage:hover{background:#ffe4ab url("images/btn_last_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.activeHeader{background:#ffe4ab !important;border:1px solid #ffb552 !important;color:inherit !important}div.grd_Cont{background-color:#d9eaed !important;border:1px solid #9cc !important;padding:0 !important;}div.grd_Cont .even{background-color:#fff}div.grd_Cont .odd{background-color:#e3efff}div.grd_headTblCont{background-color:#d9eaed !important;border-bottom:none !important}div.grd_tblCont table{border-right:none !important}div.grd_tblCont table th,div.grd_headTblCont table th,div.grd_headTblCont table td{background:#d9eaed url("images/bg_skyblue.gif") left top repeat-x;border-bottom:1px solid #a4bed4;border-right:1px solid #a4bed4 !important;border-left:1px solid #fff !important;border-top:1px solid #fff !important}div.grd_tblCont table td{border-bottom:1px solid #a4bed4 !important;border-right:0 !important;border-left:0 !important;border-top:0 !important}.grd_inf{background-color:#cce2fe;color:#004a6f;border-top:1px solid #9cc !important;}.grd_inf a{text-decoration:none;font-weight:bold}.loader{background-color:#2d8eef;border:1px solid #cce2fe;border-radius:5px}.even{background-color:#fff}.odd{background-color:#e3efff}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important}.ezActiveRow{background-color:#ffdc61 !important;color:inherit}.ezSelectedRow{background-color:#ffe4ab !important;color:inherit}.ezActiveCell{background-color:#fff !important;color:#000 !important;font-weight:bold}.ezETSelectedCell{background-color:#fff !important;font-weight:bold;color:#000 !important} \ No newline at end of file diff --git a/dist/tablefilter/tablefilter.js b/dist/tablefilter/tablefilter.js index 11da8879..7699ad4f 100644 --- a/dist/tablefilter/tablefilter.js +++ b/dist/tablefilter/tablefilter.js @@ -1,10 +1,10 @@ /** - * tablefilter v0.0.11 by Max Guglielmi - * build date: 2015-11-21T07:50:21.627Z + * tablefilter v0.0.12 by Max Guglielmi + * build date: 2015-11-21T11:09:08.746Z * MIT License */ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var s=e();for(var i in s)("object"==typeof exports?exports:t)[i]=s[i]}}(this,function(){return function(t){function e(s){if(i[s])return i[s].exports;var a=i[s]={exports:{},id:s,loaded:!1};return t[s].call(a.exports,a,a.exports,e),a.loaded=!0,a.exports}var s=window.webpackJsonp;window.webpackJsonp=function(i,l){for(var n,r,o=0,h=[];ol;l++)i[l]=arguments[l];if(0!==i.length){if(this.id=null,this.version="0.0.11",this.year=(new Date).getFullYear(),this.tbl=null,this.startRow=null,this.refRow=null,this.headersRow=null,this.cfg={},this.nbFilterableRows=null,this.nbRows=null,this.nbCells=null,this._hasGrid=!1,i.forEach(function(t){var s=typeof t;"object"===s&&t&&"TABLE"===t.nodeName?(e.tbl=t,e.id=t.id||"tf_"+(new Date).getTime()+"_"):"string"===s?(e.id=t,e.tbl=h["default"].id(t)):"number"===s?e.startRow=t:"object"===s&&(e.cfg=t)}),!this.tbl||"TABLE"!=this.tbl.nodeName||0===this.getRowsNb())throw new Error("Could not instantiate TableFilter: HTML table not found.");var n=this.cfg;this.refRow=null===this.startRow?2:this.startRow+1;try{this.nbCells=this.getCellsNb(this.refRow)}catch(o){this.nbCells=this.getCellsNb(0)}this.basePath=n.base_path||"tablefilter/",this.fltTypeInp="input",this.fltTypeSlc="select",this.fltTypeMulti="multiple",this.fltTypeCheckList="checklist",this.fltTypeNone="none",this.fltGrid=n.grid===!1?!1:!0,this.gridLayout=Boolean(n.grid_layout),this.filtersRowIndex=isNaN(n.filters_row_index)?0:n.filters_row_index,this.headersRow=isNaN(n.headers_row_index)?0===this.filtersRowIndex?1:0:n.headers_row_index,this.gridLayout&&(this.headersRow>1?this.filtersRowIndex=this.headersRow+1:(this.filtersRowIndex=1,this.headersRow=0)),this.fltCellTag="th"!==n.filters_cell_tag||"td"!==n.filters_cell_tag?"td":n.filters_cell_tag,this.fltIds=[],this.fltElms=[],this.searchArgs=null,this.validRowsIndex=null,this.fltGridEl=null,this.isFirstLoad=!0,this.infDiv=null,this.lDiv=null,this.rDiv=null,this.mDiv=null,this.infDivCssClass=n.inf_div_css_class||"inf",this.lDivCssClass=n.left_div_css_class||"ldiv",this.rDivCssClass=n.right_div_css_class||"rdiv",this.mDivCssClass=n.middle_div_css_class||"mdiv",this.contDivCssClass=n.content_div_css_class||"cont",this.stylePath=n.style_path||this.basePath+"style/",this.stylesheet=n.stylesheet||this.stylePath+"tablefilter.css",this.stylesheetId=this.id+"_style",this.fltsRowCssClass=n.flts_row_css_class||"fltrow",this.enableIcons=n.enable_icons===!1?!1:!0,this.alternateRows=Boolean(n.alternate_rows),this.hasColWidths=g["default"].isArray(n.col_widths),this.colWidths=this.hasColWidths?n.col_widths:null,this.fltCssClass=n.flt_css_class||"flt",this.fltMultiCssClass=n.flt_multi_css_class||"flt_multi",this.fltSmallCssClass=n.flt_small_css_class||"flt_s",this.singleFltCssClass=n.single_flt_css_class||"single_flt",this.enterKey=n.enter_key===!1?!1:!0,this.onBeforeFilter=g["default"].isFn(n.on_before_filter)?n.on_before_filter:null,this.onAfterFilter=g["default"].isFn(n.on_after_filter)?n.on_after_filter:null,this.caseSensitive=Boolean(n.case_sensitive),this.hasExactMatchByCol=g["default"].isArray(n.columns_exact_match),this.exactMatchByCol=this.hasExactMatchByCol?n.columns_exact_match:[],this.exactMatch=Boolean(n.exact_match),this.linkedFilters=Boolean(n.linked_filters),this.disableExcludedOptions=Boolean(n.disable_excluded_options),this.activeFlt=null,this.activeFilterId=null,this.hasVisibleRows=Boolean(n.rows_always_visible),this.visibleRows=this.hasVisibleRows?n.rows_always_visible:[],this.isExternalFlt=Boolean(n.external_flt_grid),this.externalFltTgtIds=n.external_flt_grid_ids||null,this.externalFltEls=[],this.execDelay=isNaN(n.exec_delay)?100:parseInt(n.exec_delay,10),this.onFiltersLoaded=g["default"].isFn(n.on_filters_loaded)?n.on_filters_loaded:null,this.singleSearchFlt=Boolean(n.single_filter),this.onRowValidated=g["default"].isFn(n.on_row_validated)?n.on_row_validated:null,this.customCellDataCols=n.custom_cell_data_cols?n.custom_cell_data_cols:[],this.customCellData=g["default"].isFn(n.custom_cell_data)?n.custom_cell_data:null,this.watermark=n.watermark||"",this.isWatermarkArray=g["default"].isArray(this.watermark),this.toolBarTgtId=n.toolbar_target_id||null,this.help=g["default"].isUndef(n.help_instructions)?void 0:Boolean(n.help_instructions),this.popupFilters=Boolean(n.popup_filters),this.markActiveColumns=Boolean(n.mark_active_columns),this.activeColumnsCssClass=n.active_columns_css_class||"activeHeader",this.onBeforeActiveColumn=g["default"].isFn(n.on_before_active_column)?n.on_before_active_column:null,this.onAfterActiveColumn=g["default"].isFn(n.on_after_active_column)?n.on_after_active_column:null,this.displayAllText=n.display_all_text||"Clear",this.enableEmptyOption=Boolean(n.enable_empty_option),this.emptyText=n.empty_text||"(Empty)",this.enableNonEmptyOption=Boolean(n.enable_non_empty_option),this.nonEmptyText=n.non_empty_text||"(Non empty)",this.onSlcChange=n.on_change===!1?!1:!0,this.sortSlc=n.sort_select===!1?!1:!0,this.isSortNumAsc=Boolean(n.sort_num_asc),this.sortNumAsc=this.isSortNumAsc?n.sort_num_asc:null,this.isSortNumDesc=Boolean(n.sort_num_desc),this.sortNumDesc=this.isSortNumDesc?n.sort_num_desc:null,this.loadFltOnDemand=Boolean(n.load_filters_on_demand),this.hasCustomOptions=g["default"].isObj(n.custom_options),this.customOptions=n.custom_options,this.rgxOperator=n.regexp_operator||"rgx:",this.emOperator=n.empty_operator||"[empty]",this.nmOperator=n.nonempty_operator||"[nonempty]",this.orOperator=n.or_operator||"||",this.anOperator=n.and_operator||"&&",this.grOperator=n.greater_operator||">",this.lwOperator=n.lower_operator||"<",this.leOperator=n.lower_equal_operator||"<=",this.geOperator=n.greater_equal_operator||">=",this.dfOperator=n.different_operator||"!",this.lkOperator=n.like_operator||"*",this.eqOperator=n.equal_operator||"=",this.stOperator=n.start_with_operator||"{",this.enOperator=n.end_with_operator||"}",this.curExp=n.cur_exp||"^[¥£€$]",this.separator=n.separator||",",this.rowsCounter=Boolean(n.rows_counter),this.statusBar=Boolean(n.status_bar),this.loader=Boolean(n.loader),this.displayBtn=Boolean(n.btn),this.btnText=n.btn_text||(this.enableIcons?"":"Go"),this.btnCssClass=n.btn_css_class||(this.enableIcons?"btnflt_icon":"btnflt"),this.btnReset=Boolean(n.btn_reset),this.btnResetCssClass=n.btn_reset_css_class||"reset",this.onBeforeReset=g["default"].isFn(n.on_before_reset)?n.on_before_reset:null,this.onAfterReset=g["default"].isFn(n.on_after_reset)?n.on_after_reset:null,this.paging=Boolean(n.paging),this.nbVisibleRows=0,this.nbHiddenRows=0,this.autoFilter=Boolean(n.auto_filter),this.autoFilterDelay=isNaN(n.auto_filter_delay)?900:n.auto_filter_delay,this.isUserTyping=null,this.autoFilterTimer=null,this.highlightKeywords=Boolean(n.highlight_keywords),this.defaultDateType=n.default_date_type||"DMY",this.thousandsSeparator=n.thousands_separator||",",this.decimalSeparator=n.decimal_separator||".",this.hasColNbFormat=g["default"].isArray(n.col_number_format),this.colNbFormat=this.hasColNbFormat?n.col_number_format:null,this.hasColDateType=g["default"].isArray(n.col_date_type),this.colDateType=this.hasColDateType?n.col_date_type:null,this.msgFilter=n.msg_filter||"Filtering data...",this.msgPopulate=n.msg_populate||"Populating filter...",this.msgPopulateCheckList=n.msg_populate_checklist||"Populating list...",this.msgChangePage=n.msg_change_page||"Collecting paging data...",this.msgClear=n.msg_clear||"Clearing filters...",this.msgChangeResults=n.msg_change_results||"Changing results per page...",this.msgResetValues=n.msg_reset_grid_values||"Re-setting filters values...",this.msgResetPage=n.msg_reset_page||"Re-setting page...",this.msgResetPageLength=n.msg_reset_page_length||"Re-setting page length...",this.msgSort=n.msg_sort||"Sorting data...",this.msgLoadExtensions=n.msg_load_extensions||"Loading extensions...",this.msgLoadThemes=n.msg_load_themes||"Loading theme(s)...",this.prfxTf="TF",this.prfxFlt="flt",this.prfxValButton="btn",this.prfxInfDiv="inf_",this.prfxLDiv="ldiv_",this.prfxRDiv="rdiv_",this.prfxMDiv="mdiv_",this.prfxCookieFltsValues="tf_flts_",this.prfxCookiePageNb="tf_pgnb_",this.prfxCookiePageLen="tf_pglen_",this.hasStoredValues=!1,this.rememberGridValues=Boolean(n.remember_grid_values),this.fltsValuesCookie=this.prfxCookieFltsValues+this.id,this.rememberPageNb=this.paging&&n.remember_page_number,this.pgNbCookie=this.prfxCookiePageNb+this.id,this.rememberPageLen=this.paging&&n.remember_page_length,this.pgLenCookie=this.prfxCookiePageLen+this.id,this.extensions=n.extensions,this.hasExtensions=g["default"].isArray(this.extensions),this.enableDefaultTheme=Boolean(n.enable_default_theme),this.hasThemes=this.enableDefaultTheme||g["default"].isArray(n.themes),this.themes=n.themes||[],this.themesPath=n.themes_path||this.stylePath+"themes/",this.Mod={},this.ExtRegistry={},this.Evt={name:{filter:"Filter",dropdown:"DropDown",checklist:"CheckList",changepage:"ChangePage",clear:"Clear",changeresultsperpage:"ChangeResults",resetvalues:"ResetValues",resetpage:"ResetPage",resetpagelength:"ResetPageLength",loadextensions:"LoadExtensions",loadthemes:"LoadThemes"},detectKey:function(t){if(this.enterKey){var e=t||D.event;if(e){var s=r["default"].keyCode(e);13===s?(this.filter(),r["default"].cancel(e),r["default"].stop(e)):(this.isUserTyping=!0,D.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null)}}},onKeyUp:function(t){function e(){D.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null,this.isUserTyping||(this.filter(),this.isUserTyping=null)}if(this.autoFilter){var s=t||D.event,i=r["default"].keyCode(s);this.isUserTyping=!1,13!==i&&9!==i&&27!==i&&38!==i&&40!==i?null===this.autoFilterTimer&&(this.autoFilterTimer=D.setInterval(e.bind(this),this.autoFilterDelay)):(D.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null)}},onKeyDown:function(){this.autoFilter&&(this.isUserTyping=!0)},onInpBlur:function(){if(this.autoFilter&&(this.isUserTyping=!1,D.clearInterval(this.autoFilterTimer)),this.hasExtension("advancedGrid")){var t=this.extension("advancedGrid"),e=t._ezEditTable;t.cfg.editable&&e.Editable.Set(),t.cfg.selection&&e.Selection.Set()}},onInpFocus:function(t){var e=t||D.event,s=r["default"].target(e);if(this.activeFilterId=s.getAttribute("id"),this.activeFlt=h["default"].id(this.activeFilterId),this.popupFilters&&(r["default"].cancel(e),r["default"].stop(e)),this.hasExtension("advancedGrid")){var i=this.extension("advancedGrid"),a=i._ezEditTable;i.cfg.editable&&a.Editable.Remove(),i.cfg.selection&&a.Selection.Remove()}},onSlcFocus:function(t){var e=t||D.event,s=r["default"].target(e);if(this.activeFilterId=s.getAttribute("id"),this.activeFlt=h["default"].id(this.activeFilterId),this.loadFltOnDemand&&"0"===s.getAttribute("filled")){var i=s.getAttribute("ct");this.Mod.dropdown._build(i)}this.popupFilters&&(r["default"].cancel(e),r["default"].stop(e))},onSlcChange:function(t){if(this.activeFlt){var e=t||D.event;this.popupFilters&&r["default"].stop(e),this.onSlcChange&&this.filter()}},onCheckListClick:function(t){var e=t||D.event,s=r["default"].target(e);if(this.loadFltOnDemand&&"0"===s.getAttribute("filled")){var i=s.getAttribute("ct");this.Mod.checkList._build(i),this.Mod.checkList.checkListDiv[i].onclick=null,this.Mod.checkList.checkListDiv[i].title=""}},onBtnClick:function(){this.filter()}}}}return l(t,[{key:"init",value:function(){if(!this._hasGrid){this.tbl||(this.tbl=h["default"].id(this.id)),this.gridLayout&&(this.refRow=null===this.startRow?0:this.startRow),this.popupFilters&&(0===this.filtersRowIndex&&1===this.headersRow||this.gridLayout)&&(this.headersRow=0);var t=this.Mod,e=this.singleSearchFlt?1:this.nbCells,s=void 0;if(this["import"](this.stylesheetId,this.stylesheet,null,"link"),this.hasThemes&&this._loadThemes(),(this.rememberGridValues||this.rememberPageNb||this.rememberPageLen)&&(t.store=new w.Store(this)),this.gridLayout&&(t.gridLayout=new x.GridLayout(this),t.gridLayout.init()),this.loader&&(t.loader||(t.loader=new T.Loader(this),t.loader.init())),this.highlightKeywords&&(t.highlightKeyword=new k.HighlightKeyword(this)),this.popupFilters&&(t.popupFilter||(t.popupFilter=new P.PopupFilter(this)),t.popupFilter.init()),this.fltGrid)if(this.isFirstLoad){var i=void 0;if(!this.gridLayout){var a=h["default"].tag(this.tbl,"thead");i=a.length>0?a[0].insertRow(this.filtersRowIndex):this.tbl.insertRow(this.filtersRowIndex),this.headersRow>1&&this.filtersRowIndex<=this.headersRow&&!this.popupFilters&&this.headersRow++,this.popupFilters&&this.headersRow++,i.className=this.fltsRowCssClass,(this.isExternalFlt||this.popupFilters)&&(i.style.display="none")}this.nbFilterableRows=this.getRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=this.tbl.rows.length;for(var l=0;e>l;l++){this.popupFilters&&t.popupFilter.build(l);var n=h["default"].create(this.fltCellTag),o=this.getFilterType(l),d=this.isExternalFlt&&this.externalFltTgtIds?this.externalFltTgtIds[l]:null;if(this.singleSearchFlt&&(n.colSpan=this.nbCells),this.gridLayout||i.appendChild(n),s=l==e-1&&this.displayBtn?this.fltSmallCssClass:this.fltCssClass,this.singleSearchFlt&&(o=this.fltTypeInp,s=this.singleFltCssClass),o===this.fltTypeSlc||o===this.fltTypeMulti){t.dropdown||(t.dropdown=new F.Dropdown(this));var c=t.dropdown,f=h["default"].create(this.fltTypeSlc,["id",this.prfxFlt+l+"_"+this.id],["ct",l],["filled","0"]);if(o===this.fltTypeMulti&&(f.multiple=this.fltTypeMulti,f.title=c.multipleSlcTooltip),f.className=u["default"].lower(o)===this.fltTypeSlc?s:this.fltMultiCssClass,d?(h["default"].id(d).appendChild(f),this.externalFltEls.push(f)):n.appendChild(f),this.fltIds.push(this.prfxFlt+l+"_"+this.id),this.loadFltOnDemand||c._build(l),r["default"].add(f,"keypress",this.Evt.detectKey.bind(this)),r["default"].add(f,"change",this.Evt.onSlcChange.bind(this)),r["default"].add(f,"focus",this.Evt.onSlcFocus.bind(this)),this.loadFltOnDemand){var p=h["default"].createOpt(this.displayAllText,"");f.appendChild(p)}}else if(o===this.fltTypeCheckList){var g=void 0;t.checkList=new R.CheckList(this),g=t.checkList;var v=h["default"].create("div",["id",g.prfxCheckListDiv+l+"_"+this.id],["ct",l],["filled","0"]);v.className=g.checkListDivCssClass,d?(h["default"].id(d).appendChild(v),this.externalFltEls.push(v)):n.appendChild(v),g.checkListDiv[l]=v,this.fltIds.push(this.prfxFlt+l+"_"+this.id),this.loadFltOnDemand||g._build(l),this.loadFltOnDemand&&(r["default"].add(v,"click",this.Evt.onCheckListClick.bind(this)),v.appendChild(h["default"].text(g.activateCheckListTxt)))}else{var b=o===this.fltTypeInp?"text":"hidden",m=h["default"].create(this.fltTypeInp,["id",this.prfxFlt+l+"_"+this.id],["type",b],["ct",l]);if("hidden"!==b&&this.watermark&&m.setAttribute("placeholder",this.isWatermarkArray?this.watermark[l]||"":this.watermark),m.className=s,r["default"].add(m,"focus",this.Evt.onInpFocus.bind(this)),d?(h["default"].id(d).appendChild(m),this.externalFltEls.push(m)):n.appendChild(m),this.fltIds.push(this.prfxFlt+l+"_"+this.id),r["default"].add(m,"keypress",this.Evt.detectKey.bind(this)),r["default"].add(m,"keydown",this.Evt.onKeyDown.bind(this)),r["default"].add(m,"keyup",this.Evt.onKeyUp.bind(this)),r["default"].add(m,"blur",this.Evt.onInpBlur.bind(this)),this.rememberGridValues){var _=this.Mod.store.getFilterValues(this.fltsValuesCookie);" "!=_[l]&&this.setFilterValue(l,_[l],!1)}}if(l==e-1&&this.displayBtn){var y=h["default"].create(this.fltTypeInp,["id",this.prfxValButton+l+"_"+this.id],["type","button"],["value",this.btnText]);y.className=this.btnCssClass,d?h["default"].id(d).appendChild(y):n.appendChild(y),r["default"].add(y,"click",this.Evt.onBtnClick.bind(this))}}}else this._resetGrid();else this.refRow=this.refRow-1,this.gridLayout&&(this.refRow=0),this.nbFilterableRows=this.getRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=this.nbFilterableRows+this.refRow;this.hasVisibleRows&&this.enforceVisibility(),this.rowsCounter&&(t.rowsCounter=new O.RowsCounter(this),t.rowsCounter.init()),this.statusBar&&(t.statusBar=new I.StatusBar(this),t.statusBar.init()),(this.paging||t.paging)&&(t.paging||(t.paging=new S.Paging(this),t.paging.init()),t.paging.reset()),this.btnReset&&(t.clearButton=new E.ClearButton(this),t.clearButton.init()),this.help&&(t.help||(t.help=new L.Help(this)),t.help.init()),this.hasColWidths&&!this.gridLayout&&this.setColWidths(),this.alternateRows&&(t.alternateRows=new N.AlternateRows(this),t.alternateRows.init()),this.isFirstLoad=!1,this._hasGrid=!0,(this.rememberGridValues||this.rememberPageLen||this.rememberPageNb)&&this.resetValues(),this.gridLayout||h["default"].addClass(this.tbl,this.prfxTf),this.loader&&t.loader.show("none"),this.hasExtensions&&this.initExtensions(),this.onFiltersLoaded&&this.onFiltersLoaded.call(null,this)}}},{key:"EvtManager",value:function(t){function e(){var e=this.Evt.name;switch(t){case e.filter:this._filter();break;case e.dropdown:this.linkedFilters?r.dropdown._build(i,!0):r.dropdown._build(i,!1,a,l);break;case e.checklist:r.checkList._build(i,a,l);break;case e.changepage:r.paging._changePage(n);break;case e.clear:this._clearFilters(),this._filter();break;case e.changeresultsperpage:r.paging._changeResultsPerPage();break;case e.resetvalues:this._resetValues(),this._filter();break;case e.resetpage:r.paging._resetPage(this.pgNbCookie);break;case e.resetpagelength:r.paging._resetPageLength(this.pgLenCookie);break;case e.loadextensions:this._loadExtensions();break;case e.loadthemes:this._loadThemes()}this.statusBar&&r.statusBar.message(""),this.loader&&r.loader.show("none")}var s=arguments.length<=1||void 0===arguments[1]?{slcIndex:null,slcExternal:!1,slcId:null,pgIndex:null}:arguments[1],i=s.slcIndex,a=s.slcExternal,l=s.slcId,n=s.pgIndex,r=this.Mod;this.loader||this.statusBar||this.linkedFilters?(this.loader&&r.loader.show(""),this.statusBar&&r.statusBar.message(this["msg"+t]),D.setTimeout(e.bind(this),this.execDelay)):e.call(this)}},{key:"feature",value:function(t){return this.Mod[t]}},{key:"initExtensions",value:function(){for(var t=this.extensions,e=0,s=t.length;s>e;e++){var i=t[e];this.ExtRegistry[i.name]||this.loadExtension(i)}}},{key:"loadExtension",value:function(t){var e=this;if(t&&t.name){var i=t.name,a=t.path,l=void 0;i&&a?l=t.path+i:(i=i.replace(".js",""),l="extensions/{}/{}".replace(/{}/g,i)),s.p=this.basePath,s.e(1,function(s){var a=[s(24)("./"+l)];(function(s){var a=new s(e,t);a.init(),e.ExtRegistry[i]=a}).apply(null,a)})}}},{key:"extension",value:function(t){return this.ExtRegistry[t]}},{key:"hasExtension",value:function(t){return!g["default"].isEmpty(this.ExtRegistry[t])}},{key:"destroyExtensions",value:function(){for(var t=this.extensions,e=0,s=t.length;s>e;e++){var i=t[e],a=this.ExtRegistry[i.name];a&&(a.destroy(),this.ExtRegistry[i.name]=null)}}},{key:"loadThemes",value:function(){this.EvtManager(this.Evt.name.loadthemes)}},{key:"_loadThemes",value:function(){var t=this.themes;if(this.enableDefaultTheme){var e={name:"default"};this.themes.push(e)}if(g["default"].isArray(t))for(var s=0,i=t.length;i>s;s++){var a=t[s],l=a.name,n=a.path,r=this.prfxTf+l;l&&!n?n=this.themesPath+l+"/"+l+".css":!l&&a.path&&(l="theme{0}".replace("{0}",s)),this.isImported(n,"link")||this["import"](r,n,null,"link")}this.btnResetText=null,this.btnResetHtml='',this.btnPrevPageHtml='',this.btnNextPageHtml='',this.btnFirstPageHtml='',this.btnLastPageHtml='',this.loader=!0,this.loaderHtml='
',this.loaderText=null}},{key:"getStylesheet",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"default":arguments[0];return h["default"].id(this.prfxTf+t)}},{key:"destroy",value:function(){if(this._hasGrid){var t=this.tbl.rows,e=this.Mod;this._clearFilters(),this.isExternalFlt&&!this.popupFilters&&this.removeExternalFlts(),this.infDiv&&this.removeToolbar(),this.highlightKeywords&&e.highlightKeyword.unhighlightAll(),this.markActiveColumns&&this.clearActiveColumns(),this.hasExtensions&&this.destroyExtensions();for(var s=this.refRow;s0&&[].forEach.call(e,function(e){t.removeChild(e)})}}},{key:"removeExternalFlts",value:function(){if(this.isExternalFlt&&this.externalFltTgtIds)for(var t=this.externalFltTgtIds,e=t.length,s=0;e>s;s++){var i=t[s],a=h["default"].id(i);a&&(a.innerHTML="")}}},{key:"isCustomOptions",value:function(t){return this.hasCustomOptions&&-1!=this.customOptions.cols.indexOf(t)}},{key:"getCustomOptions",value:function(t){if(!g["default"].isEmpty(t)&&this.isCustomOptions(t)){for(var e=this.customOptions,s=e.cols,i=[],a=[],l=s.indexOf(t),n=e.values[l],r=e.texts[l],o=e.sorts[l],h=0,d=n.length;d>h;h++)a.push(n[h]),r[h]?i.push(r[h]):i.push(n[h]);return o&&(a.sort(),i.sort()),[a,i]}}},{key:"resetValues",value:function(){this.EvtManager(this.Evt.name.resetvalues)}},{key:"_resetValues",value:function(){this.rememberGridValues&&this.loadFltOnDemand&&this._resetGridValues(this.fltsValuesCookie),this.rememberPageLen&&this.Mod.paging&&this.Mod.paging.resetPageLength(this.pgLenCookie),this.rememberPageNb&&this.Mod.paging&&this.Mod.paging.resetPage(this.pgNbCookie)}},{key:"_resetGridValues",value:function(t){if(this.loadFltOnDemand){var e=this.Mod.store.getFilterValues(t),s=this.getFiltersByType(this.fltTypeSlc,!0),i=this.getFiltersByType(this.fltTypeMulti,!0);if(Number(e[e.length-1])===this.fltIds.length){for(var a=0;ad;d++)""!==l[d]&&(n=h["default"].createOpt(l[d],l[d],!0),o.appendChild(n),this.hasStoredValues=!0)}}else if(r===this.fltTypeCheckList){var c=this.Mod.checkList,f=c.checkListDiv[a];f.title=f.innerHTML,f.innerHTML="";var p=h["default"].create("ul",["id",this.fltIds[a]],["colIndex",a]);p.className=c.checkListCssClass;var g=h["default"].createCheckItem(this.fltIds[a]+"_0","",this.displayAllText);g.className=c.checkListItemCssClass,p.appendChild(g),f.appendChild(p),l=e[a].split(" "+this.orOperator+" ");for(var d=0,u=l.length;u>d;d++)if(""!==l[d]){var v=h["default"].createCheckItem(this.fltIds[a]+"_"+(d+1),l[d],l[d]);v.className=c.checkListItemCssClass,p.appendChild(v),v.check.checked=!0,c.setCheckListValues(v.check),this.hasStoredValues=!0}}}!this.hasStoredValues&&this.paging&&this.Mod.paging.setPagingInfo()}}}},{key:"filter",value:function(){this.EvtManager(this.Evt.name.filter)}},{key:"_filter",value:function(){function t(t,e,s){if(this.highlightKeywords&&e){t=t.replace(p,""),t=t.replace(g,""),t=t.replace(v,""),t=t.replace(b,"");var a=t;(r.test(t)||o.test(t)||d.test(t)||c.test(t)||f.test(t))&&(a=h["default"].getText(s)),""!==a&&i.highlightKeyword.highlight(s,a,i.highlightKeyword.highlightCssClass)}}function e(t,e,s){var i=void 0,a=C["default"].removeNbFormat,h=d.test(t),w=r.test(t),x=c.test(t),T=o.test(t),k=f.test(t),P=g.test(t),F=p.test(t),R=v.test(t),O=b.test(t),S=m===t,E=_===t,L=y.test(t),N=h&&M(t.replace(d,""),I),D=w&&M(t.replace(r,""),I),A=x&&M(t.replace(c,""),I),H=T&&M(t.replace(o,""),I),j=k&&M(t.replace(f,""),I),V=P&&M(t.replace(g,""),I),U=void 0,G=void 0;if(M(e,I))U=B(e,I),N?(G=B(t.replace(d,""),I),i=G>U):D?(G=B(t.replace(r,""),I),i=G>=U):H?(G=B(t.replace(o,""),I),i=U>=G):A?(G=B(t.replace(c,""),I),i=U>G):j?(G=B(t.replace(f,""),I),i=U.toString()!=G.toString()):V?(G=B(t.replace(g,""),I),i=U.toString()==G.toString()):p.test(t)?i=this._containsStr(t.replace(p,""),e,!1):M(t,I)?(G=B(t,I),i=U.toString()==G.toString()):S?i=u["default"].isEmpty(e):E&&(i=!u["default"].isEmpty(e));else if(this.hasColNbFormat&&this.colNbFormat[s]?(l=a(e,this.colNbFormat[s]),n=this.colNbFormat[s]):","===this.thousandsSeparator&&"."===this.decimalSeparator?(l=a(e,"us"),n="us"):(l=a(e,"eu"),n="eu"),w)i=l<=a(t.replace(r,""),n);else if(T)i=l>=a(t.replace(o,""),n);else if(h)i=la(t.replace(c,""),n);else if(k)i=this._containsStr(t.replace(f,""),e)?!1:!0;else if(F)i=this._containsStr(t.replace(p,""),e,!1);else if(P)i=this._containsStr(t.replace(g,""),e,!0);else if(R)i=0===e.indexOf(t.replace(v,""))?!0:!1;else if(O){var W=t.replace(b,"");i=e.lastIndexOf(W,e.length-1)===e.length-1-(W.length-1)&&e.lastIndexOf(W,e.length-1)>-1?!0:!1}else if(S)i=u["default"].isEmpty(e);else if(E)i=!u["default"].isEmpty(e);else if(L)try{var z=t.replace(y,""),$=new RegExp(z);i=$.test(e)}catch(K){i=!1}else i=this._containsStr(t,e,this.isExactMatch(s));return i}if(this.fltGrid&&(this._hasGrid||this.isFirstLoad)){this.onBeforeFilter&&this.onBeforeFilter.call(null,this);var s=this.tbl.rows,i=this.Mod,a=0;this.validRowsIndex=[],this.highlightKeywords&&i.highlightKeyword.unhighlightAll(),this.popupFilters&&i.popupFilter.buildIcons(),this.markActiveColumns&&this.clearActiveColumns(),this.searchArgs=this.getFiltersValue();for(var l,n,r=new RegExp(this.leOperator),o=new RegExp(this.geOperator),d=new RegExp(this.lwOperator),c=new RegExp(this.grOperator),f=new RegExp(this.dfOperator),p=new RegExp(u["default"].rgxEsc(this.lkOperator)),g=new RegExp(this.eqOperator),v=new RegExp(this.stOperator),b=new RegExp(this.enOperator),m=this.emOperator,_=this.nmOperator,y=new RegExp(u["default"].rgxEsc(this.rgxOperator)),w=this.refRow;wR;R++){var O=this.searchArgs[this.singleSearchFlt?0:R],I=this.hasColDateType?this.colDateType[R]:this.defaultDateType;if(""!==O){var S=u["default"].matchCase(this.getCellData(x[R]),this.caseSensitive),E=O.split(this.orOperator),L=E.length>1?!0:!1,N=O.split(this.anOperator),D=N.length>1?!0:!1;if(L||D){for(var A=void 0,H=!1,j=L?E:N,V=0,U=j.length;U>V&&(A=u["default"].trim(j[V]),H=e.call(this,A,S,R),t.call(this,A,H,x[R]),!L||!H)&&(!D||H);V++);k[R]=H}else k[R]=e.call(this,u["default"].trim(O),S,R),t.call(this,O,k[R],x[R]);k[R]||(P=!1),this.singleSearchFlt&&k[R]&&(F=!0),this.popupFilters&&i.popupFilter.buildIcon(R,!0),this.markActiveColumns&&w===this.refRow&&(this.onBeforeActiveColumn&&this.onBeforeActiveColumn.call(null,this,R),h["default"].addClass(this.getHeaderElement(R),this.activeColumnsCssClass),this.onAfterActiveColumn&&this.onAfterActiveColumn.call(null,this,R))}}this.singleSearchFlt&&F&&(P=!0),P?(this.validateRow(w,!0),this.validRowsIndex.push(w),this.alternateRows&&i.alternateRows.setRowBg(w,this.validRowsIndex.length),this.onRowValidated&&this.onRowValidated.call(null,this,w)):(this.validateRow(w,!1),i.alternateRows&&i.alternateRows.removeRowBg(w),this.hasVisibleRows&&-1!==this.visibleRows.indexOf(w)?this.validRowsIndex.push(w):a++)}}this.nbVisibleRows=this.validRowsIndex.length,this.nbHiddenRows=a,this.rememberGridValues&&i.store.saveFilterValues(this.fltsValuesCookie),this.paging?(i.paging.startPagingRow=0,i.paging.currentPageNb=1,i.paging.setPagingInfo(this.validRowsIndex)):this.applyProps(),this.onAfterFilter&&this.onAfterFilter.call(null,this)}}},{key:"applyProps",value:function(){var t=this.Mod;this.hasVisibleRows&&this.enforceVisibility(),this.hasExtension("colOps")&&this.extension("colOps").calc(),this.linkedFilters&&this.linkFilters(),this.rowsCounter&&t.rowsCounter.refresh(this.nbVisibleRows),this.popupFilters&&t.popupFilter.closeAll()}},{key:"getColValues",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],s=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],i=arguments.length<=3||void 0===arguments[3]?[]:arguments[3];if(this.fltGrid){var a=this.tbl.rows,l=[];e&&l.push(this.getHeadersText()[t]);for(var n=this.refRow;n0&&(r=-1!=i.indexOf(n));var o=a[n].cells,h=o.length;if(h===this.nbCells&&!r)for(var d=0;h>d;d++)if(d==t&&""===a[n].style.display){var u=this.getCellData(o[d]),c=this.colNbFormat?this.colNbFormat[t]:null,f=s?C["default"].removeNbFormat(u,c):u;l.push(f)}}return l}}},{key:"getFilterValue",value:function(t){if(this.fltGrid){var e=void 0,s=this.getFilterElement(t);if(!s)return"";var i=this.getFilterType(t);if(i!==this.fltTypeMulti&&i!==this.fltTypeCheckList)e=s.value;else if(i===this.fltTypeMulti){e="";for(var a=0,l=s.options.length;l>a;a++)s.options[a].selected&&(e=e.concat(s.options[a].value+" "+this.orOperator+" "));e=e.substr(0,e.length-4)}else i===this.fltTypeCheckList&&(null!==s.getAttribute("value")?(e=s.getAttribute("value"), +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var s=e();for(var i in s)("object"==typeof exports?exports:t)[i]=s[i]}}(this,function(){return function(t){function e(s){if(i[s])return i[s].exports;var a=i[s]={exports:{},id:s,loaded:!1};return t[s].call(a.exports,a,a.exports,e),a.loaded=!0,a.exports}var s=window.webpackJsonp;window.webpackJsonp=function(i,l){for(var n,r,o=0,h=[];ol;l++)i[l]=arguments[l];if(0!==i.length){if(this.id=null,this.version="0.0.12",this.year=(new Date).getFullYear(),this.tbl=null,this.startRow=null,this.refRow=null,this.headersRow=null,this.cfg={},this.nbFilterableRows=null,this.nbRows=null,this.nbCells=null,this._hasGrid=!1,i.forEach(function(t){var s=typeof t;"object"===s&&t&&"TABLE"===t.nodeName?(e.tbl=t,e.id=t.id||"tf_"+(new Date).getTime()+"_"):"string"===s?(e.id=t,e.tbl=h["default"].id(t)):"number"===s?e.startRow=t:"object"===s&&(e.cfg=t)}),!this.tbl||"TABLE"!=this.tbl.nodeName||0===this.getRowsNb())throw new Error("Could not instantiate TableFilter: HTML table not found.");var n=this.cfg;this.refRow=null===this.startRow?2:this.startRow+1;try{this.nbCells=this.getCellsNb(this.refRow)}catch(o){this.nbCells=this.getCellsNb(0)}this.basePath=n.base_path||"tablefilter/",this.fltTypeInp="input",this.fltTypeSlc="select",this.fltTypeMulti="multiple",this.fltTypeCheckList="checklist",this.fltTypeNone="none",this.fltGrid=n.grid===!1?!1:!0,this.gridLayout=Boolean(n.grid_layout),this.filtersRowIndex=isNaN(n.filters_row_index)?0:n.filters_row_index,this.headersRow=isNaN(n.headers_row_index)?0===this.filtersRowIndex?1:0:n.headers_row_index,this.gridLayout&&(this.headersRow>1?this.filtersRowIndex=this.headersRow+1:(this.filtersRowIndex=1,this.headersRow=0)),this.fltCellTag="th"!==n.filters_cell_tag||"td"!==n.filters_cell_tag?"td":n.filters_cell_tag,this.fltIds=[],this.fltElms=[],this.searchArgs=null,this.validRowsIndex=null,this.fltGridEl=null,this.isFirstLoad=!0,this.infDiv=null,this.lDiv=null,this.rDiv=null,this.mDiv=null,this.infDivCssClass=n.inf_div_css_class||"inf",this.lDivCssClass=n.left_div_css_class||"ldiv",this.rDivCssClass=n.right_div_css_class||"rdiv",this.mDivCssClass=n.middle_div_css_class||"mdiv",this.contDivCssClass=n.content_div_css_class||"cont",this.stylePath=n.style_path||this.basePath+"style/",this.stylesheet=n.stylesheet||this.stylePath+"tablefilter.css",this.stylesheetId=this.id+"_style",this.fltsRowCssClass=n.flts_row_css_class||"fltrow",this.enableIcons=n.enable_icons===!1?!1:!0,this.alternateRows=Boolean(n.alternate_rows),this.hasColWidths=g["default"].isArray(n.col_widths),this.colWidths=this.hasColWidths?n.col_widths:null,this.fltCssClass=n.flt_css_class||"flt",this.fltMultiCssClass=n.flt_multi_css_class||"flt_multi",this.fltSmallCssClass=n.flt_small_css_class||"flt_s",this.singleFltCssClass=n.single_flt_css_class||"single_flt",this.enterKey=n.enter_key===!1?!1:!0,this.onBeforeFilter=g["default"].isFn(n.on_before_filter)?n.on_before_filter:null,this.onAfterFilter=g["default"].isFn(n.on_after_filter)?n.on_after_filter:null,this.caseSensitive=Boolean(n.case_sensitive),this.hasExactMatchByCol=g["default"].isArray(n.columns_exact_match),this.exactMatchByCol=this.hasExactMatchByCol?n.columns_exact_match:[],this.exactMatch=Boolean(n.exact_match),this.linkedFilters=Boolean(n.linked_filters),this.disableExcludedOptions=Boolean(n.disable_excluded_options),this.activeFlt=null,this.activeFilterId=null,this.hasVisibleRows=Boolean(n.rows_always_visible),this.visibleRows=this.hasVisibleRows?n.rows_always_visible:[],this.isExternalFlt=Boolean(n.external_flt_grid),this.externalFltTgtIds=n.external_flt_grid_ids||null,this.externalFltEls=[],this.execDelay=isNaN(n.exec_delay)?100:parseInt(n.exec_delay,10),this.onFiltersLoaded=g["default"].isFn(n.on_filters_loaded)?n.on_filters_loaded:null,this.singleSearchFlt=Boolean(n.single_filter),this.onRowValidated=g["default"].isFn(n.on_row_validated)?n.on_row_validated:null,this.customCellDataCols=n.custom_cell_data_cols?n.custom_cell_data_cols:[],this.customCellData=g["default"].isFn(n.custom_cell_data)?n.custom_cell_data:null,this.watermark=n.watermark||"",this.isWatermarkArray=g["default"].isArray(this.watermark),this.toolBarTgtId=n.toolbar_target_id||null,this.help=g["default"].isUndef(n.help_instructions)?void 0:Boolean(n.help_instructions),this.popupFilters=Boolean(n.popup_filters),this.markActiveColumns=Boolean(n.mark_active_columns),this.activeColumnsCssClass=n.active_columns_css_class||"activeHeader",this.onBeforeActiveColumn=g["default"].isFn(n.on_before_active_column)?n.on_before_active_column:null,this.onAfterActiveColumn=g["default"].isFn(n.on_after_active_column)?n.on_after_active_column:null,this.displayAllText=n.display_all_text||"Clear",this.enableEmptyOption=Boolean(n.enable_empty_option),this.emptyText=n.empty_text||"(Empty)",this.enableNonEmptyOption=Boolean(n.enable_non_empty_option),this.nonEmptyText=n.non_empty_text||"(Non empty)",this.onSlcChange=n.on_change===!1?!1:!0,this.sortSlc=n.sort_select===!1?!1:!0,this.isSortNumAsc=Boolean(n.sort_num_asc),this.sortNumAsc=this.isSortNumAsc?n.sort_num_asc:null,this.isSortNumDesc=Boolean(n.sort_num_desc),this.sortNumDesc=this.isSortNumDesc?n.sort_num_desc:null,this.loadFltOnDemand=Boolean(n.load_filters_on_demand),this.hasCustomOptions=g["default"].isObj(n.custom_options),this.customOptions=n.custom_options,this.rgxOperator=n.regexp_operator||"rgx:",this.emOperator=n.empty_operator||"[empty]",this.nmOperator=n.nonempty_operator||"[nonempty]",this.orOperator=n.or_operator||"||",this.anOperator=n.and_operator||"&&",this.grOperator=n.greater_operator||">",this.lwOperator=n.lower_operator||"<",this.leOperator=n.lower_equal_operator||"<=",this.geOperator=n.greater_equal_operator||">=",this.dfOperator=n.different_operator||"!",this.lkOperator=n.like_operator||"*",this.eqOperator=n.equal_operator||"=",this.stOperator=n.start_with_operator||"{",this.enOperator=n.end_with_operator||"}",this.curExp=n.cur_exp||"^[¥£€$]",this.separator=n.separator||",",this.rowsCounter=Boolean(n.rows_counter),this.statusBar=Boolean(n.status_bar),this.loader=Boolean(n.loader),this.displayBtn=Boolean(n.btn),this.btnText=n.btn_text||(this.enableIcons?"":"Go"),this.btnCssClass=n.btn_css_class||(this.enableIcons?"btnflt_icon":"btnflt"),this.btnReset=Boolean(n.btn_reset),this.btnResetCssClass=n.btn_reset_css_class||"reset",this.onBeforeReset=g["default"].isFn(n.on_before_reset)?n.on_before_reset:null,this.onAfterReset=g["default"].isFn(n.on_after_reset)?n.on_after_reset:null,this.paging=Boolean(n.paging),this.nbVisibleRows=0,this.nbHiddenRows=0,this.autoFilter=Boolean(n.auto_filter),this.autoFilterDelay=isNaN(n.auto_filter_delay)?900:n.auto_filter_delay,this.isUserTyping=null,this.autoFilterTimer=null,this.highlightKeywords=Boolean(n.highlight_keywords),this.defaultDateType=n.default_date_type||"DMY",this.thousandsSeparator=n.thousands_separator||",",this.decimalSeparator=n.decimal_separator||".",this.hasColNbFormat=g["default"].isArray(n.col_number_format),this.colNbFormat=this.hasColNbFormat?n.col_number_format:null,this.hasColDateType=g["default"].isArray(n.col_date_type),this.colDateType=this.hasColDateType?n.col_date_type:null,this.msgFilter=n.msg_filter||"Filtering data...",this.msgPopulate=n.msg_populate||"Populating filter...",this.msgPopulateCheckList=n.msg_populate_checklist||"Populating list...",this.msgChangePage=n.msg_change_page||"Collecting paging data...",this.msgClear=n.msg_clear||"Clearing filters...",this.msgChangeResults=n.msg_change_results||"Changing results per page...",this.msgResetValues=n.msg_reset_grid_values||"Re-setting filters values...",this.msgResetPage=n.msg_reset_page||"Re-setting page...",this.msgResetPageLength=n.msg_reset_page_length||"Re-setting page length...",this.msgSort=n.msg_sort||"Sorting data...",this.msgLoadExtensions=n.msg_load_extensions||"Loading extensions...",this.msgLoadThemes=n.msg_load_themes||"Loading theme(s)...",this.prfxTf="TF",this.prfxFlt="flt",this.prfxValButton="btn",this.prfxInfDiv="inf_",this.prfxLDiv="ldiv_",this.prfxRDiv="rdiv_",this.prfxMDiv="mdiv_",this.prfxCookieFltsValues="tf_flts_",this.prfxCookiePageNb="tf_pgnb_",this.prfxCookiePageLen="tf_pglen_",this.hasStoredValues=!1,this.rememberGridValues=Boolean(n.remember_grid_values),this.fltsValuesCookie=this.prfxCookieFltsValues+this.id,this.rememberPageNb=this.paging&&n.remember_page_number,this.pgNbCookie=this.prfxCookiePageNb+this.id,this.rememberPageLen=this.paging&&n.remember_page_length,this.pgLenCookie=this.prfxCookiePageLen+this.id,this.extensions=n.extensions,this.hasExtensions=g["default"].isArray(this.extensions),this.enableDefaultTheme=Boolean(n.enable_default_theme),this.hasThemes=this.enableDefaultTheme||g["default"].isArray(n.themes),this.themes=n.themes||[],this.themesPath=n.themes_path||this.stylePath+"themes/",this.Mod={},this.ExtRegistry={},this.Evt={name:{filter:"Filter",dropdown:"DropDown",checklist:"CheckList",changepage:"ChangePage",clear:"Clear",changeresultsperpage:"ChangeResults",resetvalues:"ResetValues",resetpage:"ResetPage",resetpagelength:"ResetPageLength",loadextensions:"LoadExtensions",loadthemes:"LoadThemes"},detectKey:function(t){if(this.enterKey){var e=t||D.event;if(e){var s=r["default"].keyCode(e);13===s?(this.filter(),r["default"].cancel(e),r["default"].stop(e)):(this.isUserTyping=!0,D.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null)}}},onKeyUp:function(t){function e(){D.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null,this.isUserTyping||(this.filter(),this.isUserTyping=null)}if(this.autoFilter){var s=t||D.event,i=r["default"].keyCode(s);this.isUserTyping=!1,13!==i&&9!==i&&27!==i&&38!==i&&40!==i?null===this.autoFilterTimer&&(this.autoFilterTimer=D.setInterval(e.bind(this),this.autoFilterDelay)):(D.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null)}},onKeyDown:function(){this.autoFilter&&(this.isUserTyping=!0)},onInpBlur:function(){if(this.autoFilter&&(this.isUserTyping=!1,D.clearInterval(this.autoFilterTimer)),this.hasExtension("advancedGrid")){var t=this.extension("advancedGrid"),e=t._ezEditTable;t.cfg.editable&&e.Editable.Set(),t.cfg.selection&&e.Selection.Set()}},onInpFocus:function(t){var e=t||D.event,s=r["default"].target(e);if(this.activeFilterId=s.getAttribute("id"),this.activeFlt=h["default"].id(this.activeFilterId),this.popupFilters&&(r["default"].cancel(e),r["default"].stop(e)),this.hasExtension("advancedGrid")){var i=this.extension("advancedGrid"),a=i._ezEditTable;i.cfg.editable&&a.Editable.Remove(),i.cfg.selection&&a.Selection.Remove()}},onSlcFocus:function(t){var e=t||D.event,s=r["default"].target(e);if(this.activeFilterId=s.getAttribute("id"),this.activeFlt=h["default"].id(this.activeFilterId),this.loadFltOnDemand&&"0"===s.getAttribute("filled")){var i=s.getAttribute("ct");this.Mod.dropdown._build(i)}this.popupFilters&&(r["default"].cancel(e),r["default"].stop(e))},onSlcChange:function(t){if(this.activeFlt){var e=t||D.event;this.popupFilters&&r["default"].stop(e),this.onSlcChange&&this.filter()}},onCheckListClick:function(t){var e=t||D.event,s=r["default"].target(e);if(this.loadFltOnDemand&&"0"===s.getAttribute("filled")){var i=s.getAttribute("ct");this.Mod.checkList._build(i),this.Mod.checkList.checkListDiv[i].onclick=null,this.Mod.checkList.checkListDiv[i].title=""}},onBtnClick:function(){this.filter()}}}}return l(t,[{key:"init",value:function(){if(!this._hasGrid){this.tbl||(this.tbl=h["default"].id(this.id)),this.gridLayout&&(this.refRow=null===this.startRow?0:this.startRow),this.popupFilters&&(0===this.filtersRowIndex&&1===this.headersRow||this.gridLayout)&&(this.headersRow=0);var t=this.Mod,e=this.singleSearchFlt?1:this.nbCells,s=void 0;if(this["import"](this.stylesheetId,this.stylesheet,null,"link"),this.hasThemes&&this._loadThemes(),(this.rememberGridValues||this.rememberPageNb||this.rememberPageLen)&&(t.store=new w.Store(this)),this.gridLayout&&(t.gridLayout=new x.GridLayout(this),t.gridLayout.init()),this.loader&&(t.loader||(t.loader=new T.Loader(this),t.loader.init())),this.highlightKeywords&&(t.highlightKeyword=new k.HighlightKeyword(this)),this.popupFilters&&(t.popupFilter||(t.popupFilter=new P.PopupFilter(this)),t.popupFilter.init()),this.fltGrid)if(this.isFirstLoad){var i=void 0;if(!this.gridLayout){var a=h["default"].tag(this.tbl,"thead");i=a.length>0?a[0].insertRow(this.filtersRowIndex):this.tbl.insertRow(this.filtersRowIndex),this.headersRow>1&&this.filtersRowIndex<=this.headersRow&&!this.popupFilters&&this.headersRow++,this.popupFilters&&this.headersRow++,i.className=this.fltsRowCssClass,(this.isExternalFlt||this.popupFilters)&&(i.style.display="none")}this.nbFilterableRows=this.getRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=this.tbl.rows.length;for(var l=0;e>l;l++){this.popupFilters&&t.popupFilter.build(l);var n=h["default"].create(this.fltCellTag),o=this.getFilterType(l),d=this.isExternalFlt&&this.externalFltTgtIds?this.externalFltTgtIds[l]:null;if(this.singleSearchFlt&&(n.colSpan=this.nbCells),this.gridLayout||i.appendChild(n),s=l==e-1&&this.displayBtn?this.fltSmallCssClass:this.fltCssClass,this.singleSearchFlt&&(o=this.fltTypeInp,s=this.singleFltCssClass),o===this.fltTypeSlc||o===this.fltTypeMulti){t.dropdown||(t.dropdown=new F.Dropdown(this));var c=t.dropdown,f=h["default"].create(this.fltTypeSlc,["id",this.prfxFlt+l+"_"+this.id],["ct",l],["filled","0"]);if(o===this.fltTypeMulti&&(f.multiple=this.fltTypeMulti,f.title=c.multipleSlcTooltip),f.className=u["default"].lower(o)===this.fltTypeSlc?s:this.fltMultiCssClass,d?(h["default"].id(d).appendChild(f),this.externalFltEls.push(f)):n.appendChild(f),this.fltIds.push(this.prfxFlt+l+"_"+this.id),this.loadFltOnDemand||c._build(l),r["default"].add(f,"keypress",this.Evt.detectKey.bind(this)),r["default"].add(f,"change",this.Evt.onSlcChange.bind(this)),r["default"].add(f,"focus",this.Evt.onSlcFocus.bind(this)),this.loadFltOnDemand){var p=h["default"].createOpt(this.displayAllText,"");f.appendChild(p)}}else if(o===this.fltTypeCheckList){var g=void 0;t.checkList=new R.CheckList(this),g=t.checkList;var v=h["default"].create("div",["id",g.prfxCheckListDiv+l+"_"+this.id],["ct",l],["filled","0"]);v.className=g.checkListDivCssClass,d?(h["default"].id(d).appendChild(v),this.externalFltEls.push(v)):n.appendChild(v),g.checkListDiv[l]=v,this.fltIds.push(this.prfxFlt+l+"_"+this.id),this.loadFltOnDemand||g._build(l),this.loadFltOnDemand&&(r["default"].add(v,"click",this.Evt.onCheckListClick.bind(this)),v.appendChild(h["default"].text(g.activateCheckListTxt)))}else{var b=o===this.fltTypeInp?"text":"hidden",m=h["default"].create(this.fltTypeInp,["id",this.prfxFlt+l+"_"+this.id],["type",b],["ct",l]);if("hidden"!==b&&this.watermark&&m.setAttribute("placeholder",this.isWatermarkArray?this.watermark[l]||"":this.watermark),m.className=s,r["default"].add(m,"focus",this.Evt.onInpFocus.bind(this)),d?(h["default"].id(d).appendChild(m),this.externalFltEls.push(m)):n.appendChild(m),this.fltIds.push(this.prfxFlt+l+"_"+this.id),r["default"].add(m,"keypress",this.Evt.detectKey.bind(this)),r["default"].add(m,"keydown",this.Evt.onKeyDown.bind(this)),r["default"].add(m,"keyup",this.Evt.onKeyUp.bind(this)),r["default"].add(m,"blur",this.Evt.onInpBlur.bind(this)),this.rememberGridValues){var _=this.Mod.store.getFilterValues(this.fltsValuesCookie);" "!=_[l]&&this.setFilterValue(l,_[l],!1)}}if(l==e-1&&this.displayBtn){var y=h["default"].create(this.fltTypeInp,["id",this.prfxValButton+l+"_"+this.id],["type","button"],["value",this.btnText]);y.className=this.btnCssClass,d?h["default"].id(d).appendChild(y):n.appendChild(y),r["default"].add(y,"click",this.Evt.onBtnClick.bind(this))}}}else this._resetGrid();else this.refRow=this.refRow-1,this.gridLayout&&(this.refRow=0),this.nbFilterableRows=this.getRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=this.nbFilterableRows+this.refRow;this.hasVisibleRows&&this.enforceVisibility(),this.rowsCounter&&(t.rowsCounter=new O.RowsCounter(this),t.rowsCounter.init()),this.statusBar&&(t.statusBar=new I.StatusBar(this),t.statusBar.init()),(this.paging||t.paging)&&(t.paging||(t.paging=new S.Paging(this),t.paging.init()),t.paging.reset()),this.btnReset&&(t.clearButton=new E.ClearButton(this),t.clearButton.init()),this.help&&(t.help||(t.help=new L.Help(this)),t.help.init()),this.hasColWidths&&!this.gridLayout&&this.setColWidths(),this.alternateRows&&(t.alternateRows=new N.AlternateRows(this),t.alternateRows.init()),this.isFirstLoad=!1,this._hasGrid=!0,(this.rememberGridValues||this.rememberPageLen||this.rememberPageNb)&&this.resetValues(),this.gridLayout||h["default"].addClass(this.tbl,this.prfxTf),this.loader&&t.loader.show("none"),this.hasExtensions&&this.initExtensions(),this.onFiltersLoaded&&this.onFiltersLoaded.call(null,this)}}},{key:"EvtManager",value:function(t){function e(){var e=this.Evt.name;switch(t){case e.filter:this._filter();break;case e.dropdown:this.linkedFilters?r.dropdown._build(i,!0):r.dropdown._build(i,!1,a,l);break;case e.checklist:r.checkList._build(i,a,l);break;case e.changepage:r.paging._changePage(n);break;case e.clear:this._clearFilters(),this._filter();break;case e.changeresultsperpage:r.paging._changeResultsPerPage();break;case e.resetvalues:this._resetValues(),this._filter();break;case e.resetpage:r.paging._resetPage(this.pgNbCookie);break;case e.resetpagelength:r.paging._resetPageLength(this.pgLenCookie);break;case e.loadextensions:this._loadExtensions();break;case e.loadthemes:this._loadThemes()}this.statusBar&&r.statusBar.message(""),this.loader&&r.loader.show("none")}var s=arguments.length<=1||void 0===arguments[1]?{slcIndex:null,slcExternal:!1,slcId:null,pgIndex:null}:arguments[1],i=s.slcIndex,a=s.slcExternal,l=s.slcId,n=s.pgIndex,r=this.Mod;this.loader||this.statusBar||this.linkedFilters?(this.loader&&r.loader.show(""),this.statusBar&&r.statusBar.message(this["msg"+t]),D.setTimeout(e.bind(this),this.execDelay)):e.call(this)}},{key:"feature",value:function(t){return this.Mod[t]}},{key:"initExtensions",value:function(){for(var t=this.extensions,e=0,s=t.length;s>e;e++){var i=t[e];this.ExtRegistry[i.name]||this.loadExtension(i)}}},{key:"loadExtension",value:function(t){var e=this;if(t&&t.name){var i=t.name,a=t.path,l=void 0;i&&a?l=t.path+i:(i=i.replace(".js",""),l="extensions/{}/{}".replace(/{}/g,i)),s.p=this.basePath,s.e(1,function(s){var a=[s(24)("./"+l)];(function(s){var a=new s(e,t);a.init(),e.ExtRegistry[i]=a}).apply(null,a)})}}},{key:"extension",value:function(t){return this.ExtRegistry[t]}},{key:"hasExtension",value:function(t){return!g["default"].isEmpty(this.ExtRegistry[t])}},{key:"destroyExtensions",value:function(){for(var t=this.extensions,e=0,s=t.length;s>e;e++){var i=t[e],a=this.ExtRegistry[i.name];a&&(a.destroy(),this.ExtRegistry[i.name]=null)}}},{key:"loadThemes",value:function(){this.EvtManager(this.Evt.name.loadthemes)}},{key:"_loadThemes",value:function(){var t=this.themes;if(this.enableDefaultTheme){var e={name:"default"};this.themes.push(e)}if(g["default"].isArray(t))for(var s=0,i=t.length;i>s;s++){var a=t[s],l=a.name,n=a.path,r=this.prfxTf+l;l&&!n?n=this.themesPath+l+"/"+l+".css":!l&&a.path&&(l="theme{0}".replace("{0}",s)),this.isImported(n,"link")||this["import"](r,n,null,"link")}this.btnResetText=null,this.btnResetHtml='',this.btnPrevPageHtml='',this.btnNextPageHtml='',this.btnFirstPageHtml='',this.btnLastPageHtml='',this.loader=!0,this.loaderHtml='
',this.loaderText=null}},{key:"getStylesheet",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"default":arguments[0];return h["default"].id(this.prfxTf+t)}},{key:"destroy",value:function(){if(this._hasGrid){var t=this.tbl.rows,e=this.Mod;this._clearFilters(),this.isExternalFlt&&!this.popupFilters&&this.removeExternalFlts(),this.infDiv&&this.removeToolbar(),this.highlightKeywords&&e.highlightKeyword.unhighlightAll(),this.markActiveColumns&&this.clearActiveColumns(),this.hasExtensions&&this.destroyExtensions();for(var s=this.refRow;s0&&[].forEach.call(e,function(e){t.removeChild(e)})}}},{key:"removeExternalFlts",value:function(){if(this.isExternalFlt&&this.externalFltTgtIds)for(var t=this.externalFltTgtIds,e=t.length,s=0;e>s;s++){var i=t[s],a=h["default"].id(i);a&&(a.innerHTML="")}}},{key:"isCustomOptions",value:function(t){return this.hasCustomOptions&&-1!=this.customOptions.cols.indexOf(t)}},{key:"getCustomOptions",value:function(t){if(!g["default"].isEmpty(t)&&this.isCustomOptions(t)){for(var e=this.customOptions,s=e.cols,i=[],a=[],l=s.indexOf(t),n=e.values[l],r=e.texts[l],o=e.sorts[l],h=0,d=n.length;d>h;h++)a.push(n[h]),r[h]?i.push(r[h]):i.push(n[h]);return o&&(a.sort(),i.sort()),[a,i]}}},{key:"resetValues",value:function(){this.EvtManager(this.Evt.name.resetvalues)}},{key:"_resetValues",value:function(){this.rememberGridValues&&this.loadFltOnDemand&&this._resetGridValues(this.fltsValuesCookie),this.rememberPageLen&&this.Mod.paging&&this.Mod.paging.resetPageLength(this.pgLenCookie),this.rememberPageNb&&this.Mod.paging&&this.Mod.paging.resetPage(this.pgNbCookie)}},{key:"_resetGridValues",value:function(t){if(this.loadFltOnDemand){var e=this.Mod.store.getFilterValues(t),s=this.getFiltersByType(this.fltTypeSlc,!0),i=this.getFiltersByType(this.fltTypeMulti,!0);if(Number(e[e.length-1])===this.fltIds.length){for(var a=0;ad;d++)""!==l[d]&&(n=h["default"].createOpt(l[d],l[d],!0),o.appendChild(n),this.hasStoredValues=!0)}}else if(r===this.fltTypeCheckList){var c=this.Mod.checkList,f=c.checkListDiv[a];f.title=f.innerHTML,f.innerHTML="";var p=h["default"].create("ul",["id",this.fltIds[a]],["colIndex",a]);p.className=c.checkListCssClass;var g=h["default"].createCheckItem(this.fltIds[a]+"_0","",this.displayAllText);g.className=c.checkListItemCssClass,p.appendChild(g),f.appendChild(p),l=e[a].split(" "+this.orOperator+" ");for(var d=0,u=l.length;u>d;d++)if(""!==l[d]){var v=h["default"].createCheckItem(this.fltIds[a]+"_"+(d+1),l[d],l[d]);v.className=c.checkListItemCssClass,p.appendChild(v),v.check.checked=!0,c.setCheckListValues(v.check),this.hasStoredValues=!0}}}!this.hasStoredValues&&this.paging&&this.Mod.paging.setPagingInfo()}}}},{key:"filter",value:function(){this.EvtManager(this.Evt.name.filter)}},{key:"_filter",value:function(){function t(t,e,s){if(this.highlightKeywords&&e){t=t.replace(p,""),t=t.replace(g,""),t=t.replace(v,""),t=t.replace(b,"");var a=t;(r.test(t)||o.test(t)||d.test(t)||c.test(t)||f.test(t))&&(a=h["default"].getText(s)),""!==a&&i.highlightKeyword.highlight(s,a,i.highlightKeyword.highlightCssClass)}}function e(t,e,s){var i=void 0,a=C["default"].removeNbFormat,h=d.test(t),w=r.test(t),x=c.test(t),T=o.test(t),k=f.test(t),P=g.test(t),F=p.test(t),R=v.test(t),O=b.test(t),S=m===t,E=_===t,L=y.test(t),N=h&&M(t.replace(d,""),I),D=w&&M(t.replace(r,""),I),A=x&&M(t.replace(c,""),I),H=T&&M(t.replace(o,""),I),j=k&&M(t.replace(f,""),I),V=P&&M(t.replace(g,""),I),U=void 0,G=void 0;if(M(e,I))U=B(e,I),N?(G=B(t.replace(d,""),I),i=G>U):D?(G=B(t.replace(r,""),I),i=G>=U):H?(G=B(t.replace(o,""),I),i=U>=G):A?(G=B(t.replace(c,""),I),i=U>G):j?(G=B(t.replace(f,""),I),i=U.toString()!=G.toString()):V?(G=B(t.replace(g,""),I),i=U.toString()==G.toString()):p.test(t)?i=this._containsStr(t.replace(p,""),e,!1):M(t,I)?(G=B(t,I),i=U.toString()==G.toString()):S?i=u["default"].isEmpty(e):E&&(i=!u["default"].isEmpty(e));else if(this.hasColNbFormat&&this.colNbFormat[s]?(l=a(e,this.colNbFormat[s]),n=this.colNbFormat[s]):","===this.thousandsSeparator&&"."===this.decimalSeparator?(l=a(e,"us"),n="us"):(l=a(e,"eu"),n="eu"),w)i=l<=a(t.replace(r,""),n);else if(T)i=l>=a(t.replace(o,""),n);else if(h)i=la(t.replace(c,""),n);else if(k)i=this._containsStr(t.replace(f,""),e)?!1:!0;else if(F)i=this._containsStr(t.replace(p,""),e,!1);else if(P)i=this._containsStr(t.replace(g,""),e,!0);else if(R)i=0===e.indexOf(t.replace(v,""))?!0:!1;else if(O){var W=t.replace(b,"");i=e.lastIndexOf(W,e.length-1)===e.length-1-(W.length-1)&&e.lastIndexOf(W,e.length-1)>-1?!0:!1}else if(S)i=u["default"].isEmpty(e);else if(E)i=!u["default"].isEmpty(e);else if(L)try{var z=t.replace(y,""),$=new RegExp(z);i=$.test(e)}catch(K){i=!1}else i=this._containsStr(t,e,this.isExactMatch(s));return i}if(this.fltGrid&&(this._hasGrid||this.isFirstLoad)){this.onBeforeFilter&&this.onBeforeFilter.call(null,this);var s=this.tbl.rows,i=this.Mod,a=0;this.validRowsIndex=[],this.highlightKeywords&&i.highlightKeyword.unhighlightAll(),this.popupFilters&&i.popupFilter.buildIcons(),this.markActiveColumns&&this.clearActiveColumns(),this.searchArgs=this.getFiltersValue();for(var l,n,r=new RegExp(this.leOperator),o=new RegExp(this.geOperator),d=new RegExp(this.lwOperator),c=new RegExp(this.grOperator),f=new RegExp(this.dfOperator),p=new RegExp(u["default"].rgxEsc(this.lkOperator)),g=new RegExp(this.eqOperator),v=new RegExp(this.stOperator),b=new RegExp(this.enOperator),m=this.emOperator,_=this.nmOperator,y=new RegExp(u["default"].rgxEsc(this.rgxOperator)),w=this.refRow;wR;R++){var O=this.searchArgs[this.singleSearchFlt?0:R],I=this.hasColDateType?this.colDateType[R]:this.defaultDateType;if(""!==O){var S=u["default"].matchCase(this.getCellData(x[R]),this.caseSensitive),E=O.split(this.orOperator),L=E.length>1?!0:!1,N=O.split(this.anOperator),D=N.length>1?!0:!1;if(L||D){for(var A=void 0,H=!1,j=L?E:N,V=0,U=j.length;U>V&&(A=u["default"].trim(j[V]),H=e.call(this,A,S,R),t.call(this,A,H,x[R]),!L||!H)&&(!D||H);V++);k[R]=H}else k[R]=e.call(this,u["default"].trim(O),S,R),t.call(this,O,k[R],x[R]);k[R]||(P=!1),this.singleSearchFlt&&k[R]&&(F=!0),this.popupFilters&&i.popupFilter.buildIcon(R,!0),this.markActiveColumns&&w===this.refRow&&(this.onBeforeActiveColumn&&this.onBeforeActiveColumn.call(null,this,R),h["default"].addClass(this.getHeaderElement(R),this.activeColumnsCssClass),this.onAfterActiveColumn&&this.onAfterActiveColumn.call(null,this,R))}}this.singleSearchFlt&&F&&(P=!0),P?(this.validateRow(w,!0),this.validRowsIndex.push(w),this.alternateRows&&i.alternateRows.setRowBg(w,this.validRowsIndex.length),this.onRowValidated&&this.onRowValidated.call(null,this,w)):(this.validateRow(w,!1),i.alternateRows&&i.alternateRows.removeRowBg(w),this.hasVisibleRows&&-1!==this.visibleRows.indexOf(w)?this.validRowsIndex.push(w):a++)}}this.nbVisibleRows=this.validRowsIndex.length,this.nbHiddenRows=a,this.rememberGridValues&&i.store.saveFilterValues(this.fltsValuesCookie),this.paging?(i.paging.startPagingRow=0,i.paging.currentPageNb=1,i.paging.setPagingInfo(this.validRowsIndex)):this.applyProps(),this.onAfterFilter&&this.onAfterFilter.call(null,this)}}},{key:"applyProps",value:function(){var t=this.Mod;this.hasVisibleRows&&this.enforceVisibility(),this.hasExtension("colOps")&&this.extension("colOps").calc(),this.linkedFilters&&this.linkFilters(),this.rowsCounter&&t.rowsCounter.refresh(this.nbVisibleRows),this.popupFilters&&t.popupFilter.closeAll()}},{key:"getColValues",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],s=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],i=arguments.length<=3||void 0===arguments[3]?[]:arguments[3];if(this.fltGrid){var a=this.tbl.rows,l=[];e&&l.push(this.getHeadersText()[t]);for(var n=this.refRow;n0&&(r=-1!=i.indexOf(n));var o=a[n].cells,h=o.length;if(h===this.nbCells&&!r)for(var d=0;h>d;d++)if(d==t&&""===a[n].style.display){var u=this.getCellData(o[d]),c=this.colNbFormat?this.colNbFormat[t]:null,f=s?C["default"].removeNbFormat(u,c):u;l.push(f)}}return l}}},{key:"getFilterValue",value:function(t){if(this.fltGrid){var e=void 0,s=this.getFilterElement(t);if(!s)return"";var i=this.getFilterType(t);if(i!==this.fltTypeMulti&&i!==this.fltTypeCheckList)e=s.value;else if(i===this.fltTypeMulti){e="";for(var a=0,l=s.options.length;l>a;a++)s.options[a].selected&&(e=e.concat(s.options[a].value+" "+this.orOperator+" "));e=e.substr(0,e.length-4)}else i===this.fltTypeCheckList&&(null!==s.getAttribute("value")?(e=s.getAttribute("value"), e=e.substr(0,e.length-3)):e="");return e}}},{key:"getFiltersValue",value:function(){if(this.fltGrid){for(var t=[],e=0,s=this.fltIds.length;s>e;e++)t.push(u["default"].trim(u["default"].matchCase(this.getFilterValue(e),this.caseSensitive)));return t}}},{key:"getFilterId",value:function(t){return this.fltGrid?this.fltIds[t]:void 0}},{key:"getFiltersByType",value:function(t,e){if(this.fltGrid){for(var s=[],i=0,a=this.fltIds.length;a>i;i++){var l=this.getFilterType(i);if(l===u["default"].lower(t)){var n=e?i:this.fltIds[i];s.push(n)}}return s}}},{key:"getFilterElement",value:function(t){var e=this.fltIds[t];return h["default"].id(e)}},{key:"getCellsNb",value:function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],e=this.tbl.rows[t];return e.cells.length}},{key:"getRowsNb",value:function(t){var e=g["default"].isUndef(this.refRow)?0:this.refRow,s=this.tbl.rows.length;return t&&(e=0),parseInt(s-e,10)}},{key:"getCellData",value:function(t){var e=t.cellIndex;return this.customCellData&&-1!=this.customCellDataCols.indexOf(e)?this.customCellData.call(null,this,t,e):h["default"].getText(t)}},{key:"getTableData",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0],e=this.tbl.rows,s=[];t&&s.push([this.getHeadersRowIndex(),this.getHeadersText()]);for(var i=this.refRow;in;n++){var o=this.getCellData(l[n]);a[1].push(o)}s.push(a)}return s}},{key:"getFilteredData",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];if(!this.validRowsIndex)return[];var e=this.tbl.rows,s=[];t&&s.push([this.getHeadersRowIndex(),this.getHeadersText()]);for(var i=this.getValidRows(!0),a=0;aa;a++){var n=s[a],r=n[1],o=r[t];i.push(o)}return i}},{key:"getRowDisplay",value:function(t){return g["default"].isObj(t)?t.style.display:null}},{key:"validateRow",value:function(t,e){var s=this.tbl.rows[t];if(s&&"boolean"==typeof e){this.hasVisibleRows&&-1!==this.visibleRows.indexOf(t)&&(e=!0);var i=e?"":"none",a=e?"true":"false";s.style.display=i,this.paging&&s.setAttribute("validRow",a)}}},{key:"validateAllRows",value:function(){if(this._hasGrid){this.validRowsIndex=[];for(var t=this.refRow;tl;l++){var r=s.options[l];(""===a||""===a[0])&&(r.selected=!1),""===r.value&&(r.selected=!1),""!==r.value&&b["default"].has(a,r.value,!0)&&(r.selected=!0)}else if(i===this.fltTypeCheckList){e=u["default"].matchCase(e,this.caseSensitive);var o=e.split(" "+this.orOperator+" "),d=h["default"].tag(s,"li").length;s.setAttribute("value",""),s.setAttribute("indexes","");for(var c=0;d>c;c++){var f=h["default"].tag(s,"li")[c],p=h["default"].tag(f,"label")[0],g=h["default"].tag(f,"input")[0],v=u["default"].matchCase(h["default"].getText(p),this.caseSensitive);""!==v&&b["default"].has(o,v,!0)?(g.checked=!0,this.Mod.checkList.setCheckListValues(g)):(g.checked=!1,this.Mod.checkList.setCheckListValues(g))}}}}},{key:"setColWidths",value:function(t,e){function s(){for(var t=this.nbCells,s=this.colWidths,i=h["default"].tag(e,"col"),a=i.length>0,l=a?null:A.createDocumentFragment(),n=0;t>n;n++){var r=void 0;a?r=i[n]:(r=h["default"].create("col",["id",this.id+"_col_"+n]),l.appendChild(r)),r.style.width=s[n]}a||e.insertBefore(l,e.firstChild)}if(this.fltGrid&&this.hasColWidths){e=e||this.tbl;var i=void 0;i=void 0===t?"none"!=e.rows[0].style.display?0:1:t,s.call(this)}}},{key:"enforceVisibility",value:function(){if(this.hasVisibleRows)for(var t=0,e=this.visibleRows.length;e>t;t++){var s=this.visibleRows[t];s<=this.nbRows&&this.validateRow(s,!0)}}},{key:"clearFilters",value:function(){this.EvtManager(this.Evt.name.clear)}},{key:"_clearFilters",value:function(){if(this.fltGrid){this.onBeforeReset&&this.onBeforeReset.call(null,this,this.getFiltersValue());for(var t=0,e=this.fltIds.length;e>t;t++)this.setFilterValue(t,"");this.linkedFilters&&this.linkFilters(),this.rememberPageLen&&f["default"].remove(this.pgLenCookie),this.rememberPageNb&&f["default"].remove(this.pgNbCookie),this.onAfterReset&&this.onAfterReset.call(null,this)}}},{key:"clearActiveColumns",value:function(){for(var t=0,e=this.getCellsNb(this.headersRow);e>t;t++)h["default"].removeClass(this.getHeaderElement(t),this.activeColumnsCssClass)}},{key:"linkFilters",value:function(){if(this.activeFilterId){var t=this.getFiltersByType(this.fltTypeSlc,!0),e=this.getFiltersByType(this.fltTypeMulti,!0),s=this.getFiltersByType(this.fltTypeCheckList,!0),i=t.concat(e);i=i.concat(s);var a=this.activeFilterId.split("_")[0];a=a.split(this.prfxFlt)[1];for(var l=void 0,n=0,r=i.length;r>n;n++){var o=h["default"].id(this.fltIds[i[n]]);if(l=this.getFilterValue(i[n]),a!==i[n]||this.paging&&-1!=t.indexOf(i[n])&&a===i[n]||!this.paging&&(-1!=s.indexOf(i[n])||-1!=e.indexOf(i[n]))||l===this.displayAllText){if(-1!=s.indexOf(i[n])?this.Mod.checkList.checkListDiv[i[n]].innerHTML="":o.innerHTML="",this.loadFltOnDemand){var d=h["default"].createOpt(this.displayAllText,"");o&&o.appendChild(d)}-1!=s.indexOf(i[n])?this.Mod.checkList._build(i[n]):this.Mod.dropdown._build(i[n],!0),this.setFilterValue(i[n],l)}}}}},{key:"_resetGrid",value:function(){if(!this.isFirstLoad){var t=this.Mod,e=this.tbl,s=e.rows,i=this.filtersRowIndex,a=s[i];if(!this.gridLayout)if(e.tHead){var l=e.tHead.insertRow(this.filtersRowIndex);e.tHead.replaceChild(this.fltGridEl,l)}else a.parentNode.insertBefore(this.fltGridEl,a);if(this.isExternalFlt)for(var n=this.externalFltTgtIds,r=0,o=n.length;o>r;r++){var d=h["default"].id(n[r]);if(d){var u=this.externalFltEls[r];d.appendChild(u);var c=this.getFilterType(r);this.gridLayout&&""===u.innerHTML&&c!==this.fltTypeInp&&((c===this.fltTypeSlc||c===this.fltTypeMulti)&&t.dropdown.build(r),c===this.fltTypeCheckList&&t.checkList.build(r))}}this.nbFilterableRows=this.getRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=s.length,this.popupFilters&&(this.headersRow++,t.popupFilter.reset()),this.gridLayout||h["default"].addClass(this.tbl,this.prfxTf),this._hasGrid=!0}}},{key:"isExactMatch",value:function(t){var e=this.getFilterType(t);return this.exactMatchByCol[t]||this.exactMatch||e!==this.fltTypeInp}},{key:"_containsStr",value:function(t,e,s){var i=void 0,a=this.caseSensitive?"g":"gi";return i=s?new RegExp("(^\\s*)"+u["default"].rgxEsc(t)+"(\\s*$)",a):new RegExp(u["default"].rgxEsc(t),a),i.test(e)}},{key:"isImported",value:function(t,e){for(var s=!1,i=e?e:"script",a="script"==i?"src":"href",l=h["default"].tag(A,i),n=0,r=l.length;r>n;n++)if(void 0!==l[n][a]&&l[n][a].match(t)){s=!0;break}return s}},{key:"import",value:function(t,e,s,i){var a=i?i:"script",l=this.isImported(e,a);if(!l){var n=this,r=!1,o=void 0,d=h["default"].tag(A,"head")[0];o="link"===u["default"].lower(a)?h["default"].create("link",["id",t],["type","text/css"],["rel","stylesheet"],["href",e]):h["default"].create("script",["id",t],["type","text/javascript"],["src",e]),o.onload=o.onreadystatechange=function(){r||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(r=!0,"function"==typeof s&&s.call(null,n))},o.onerror=function(){throw new Error("TF script could not load: "+e)},d.appendChild(o)}}},{key:"hasGrid",value:function(){return this._hasGrid}},{key:"getFiltersId",value:function(){return this.fltIds||[]}},{key:"getValidRows",value:function(t){if(!t)return this.validRowsIndex;this.validRowsIndex=[];for(var e=this.refRow;e]+>/g,"");return e=e.replace(/^\s+/,"").replace(/\s+$/,"")},create:function(t){if(t&&""!==t){var e=document.createElement(t),s=arguments;if(s.length>1)for(var i=0;i0){var i=document.cookie,a=i.indexOf(s);if(-1!==a){a+=s.length;var l=i.indexOf(";",a);-1===l&&(l=i.length),e=unescape(i.substring(a,l))}}return e},remove:function(t){this.write(t,"",-1)},valueToArray:function(t,e){e||(e=",");var s=this.read(t),i=s.split(e);return i},getValueByIndex:function(t,e,s){s||(s=",");var i=this.valueToArray(t,s);return i[e]}},t.exports=e["default"]},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=void 0;e["default"]={isObj:function(t){var e=!1;return"string"==typeof t?window[t]&&"object"==typeof window[t]&&(e=!0):t&&"object"==typeof t&&(e=!0),e},isFn:function(t){return t&&t.constructor==Function},isArray:function(t){return t&&t.constructor==Array},isUndef:function(t){return t===s},isNull:function(t){return null===t},isEmpty:function(t){return this.isUndef(t)||this.isNull(t)||0===t.length}},t.exports=e["default"]},function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var a=s(3),l=i(a);e["default"]={has:function(t,e,s){for(var i=void 0===s?!1:s,a=0;a2)return t;var e=void 0;return 99>=t&&t>50&&(e="19"+t),(50>t||"00"===t)&&(e="20"+t),e}function i(t){if(void 0===t)return 0;for(var e=void 0,s=["january","february","march","april","may","june","july","august","september","october","november","december","jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],i=0;i11||23>e)&&(e-=12),1>e||e>12?0:e}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]={isValid:function(t,e){if(e||(e="DMY"),e=e.toUpperCase(),3!=e.length&&"DDMMMYYYY"===e){var s=this.format(t,e);t=s.getDate()+"/"+(s.getMonth()+1)+"/"+s.getFullYear(),e="DMY"}(-1===e.indexOf("M")||-1===e.indexOf("D")||-1===e.indexOf("Y"))&&(e="DMY");var i=void 0,a=void 0;if("Y"==e.substring(0,1)?(i=/^\d{2}(\-|\/|\.)\d{1,2}\1\d{1,2}$/,a=/^\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}$/):"Y"==e.substring(1,2)?(i=/^\d{1,2}(\-|\/|\.)\d{2}\1\d{1,2}$/,a=/^\d{1,2}(\-|\/|\.)\d{4}\1\d{1,2}$/):(i=/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{2}$/,a=/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/),i.test(t)===!1&&a.test(t)===!1)return!1;var l=t.split(RegExp.$1),n=void 0,r=void 0,o=void 0;n="M"===e.substring(0,1)?l[0]:"M"===e.substring(1,2)?l[1]:l[2],r="D"===e.substring(0,1)?l[0]:"D"===e.substring(1,2)?l[1]:l[2],o="Y"===e.substring(0,1)?l[0]:"Y"===e.substring(1,2)?l[1]:l[2],parseInt(o,10)<=50&&(o=(parseInt(o,10)+2e3).toString()),parseInt(o,10)<=99&&(o=(parseInt(o,10)+1900).toString());var h=new Date(parseInt(o,10),parseInt(n,10)-1,parseInt(r,10),0,0,0,0);return parseInt(r,10)!=h.getDate()?!1:parseInt(n,10)-1!=h.getMonth()?!1:!0},format:function(t,e){if(e||(e="DMY"),!t||""===t)return new Date(1001,0,1);var a=void 0,l=void 0;switch(e.toUpperCase()){case"DDMMMYYYY":l=t.replace(/[- \/.]/g," ").split(" "),a=new Date(s(l[2]),i(l[1])-1,l[0]);break;case"DMY":l=t.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),a=new Date(s(l[2]),l[1]-1,l[0]);break;case"MDY":l=t.replace(/^(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),a=new Date(s(l[2]),l[0]-1,l[1]);break;case"YMD":l=t.replace(/^((\d\d)?\d\d)([- \/.])(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])$/,"$1 $4 $6").split(" "),a=new Date(s(l[0]),l[1]-1,l[2]);break;default:l=t.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),a=new Date(s(l[2]),l[1]-1,l[0])}return a}},t.exports=e["default"]},function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var a=s(3),l=i(a);e["default"]={removeNbFormat:function(t,e){if(t){e||(e="us");var s=t;return s="us"===l["default"].lower(e)?+s.replace(/[^\d\.-]/g,""):+s.replace(/[^\d\,-]/g,"").replace(",",".")}}},t.exports=e["default"]},function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var s=0;s0&&i.removeChild(k[0]),this.headTbl.style.tableLayout="fixed",i.style.tableLayout="fixed",this.headTbl.cellPadding=i.cellPadding,this.headTbl.cellSpacing=i.cellSpacing,e.setColWidths(0,this.headTbl),i.style.width="",this.headTbl.style.width=i.clientWidth+"px",p["default"].add(this.tblCont,"scroll",function(e){var s=p["default"].target(e),i=s.scrollLeft;t.headTblCont.scrollLeft=i});var P=(s.extensions||[]).filter(function(t){return"sort"===t.name});1===P.length&&(P[0].async_sort=!0,P[0].trigger_ids=g),this.tblHasColTag=d["default"].tag(i,"col").length>0?!0:!1;var F=function(){for(var t=e.nbCells-1;t>=0;t--){var s=d["default"].create("col",["id",e.id+"_col_"+t]);i.insertBefore(s,i.firstChild),s.style.width=e.colWidths[t],this.gridColElms[t]=s}this.tblHasColTag=!0};if(this.tblHasColTag)for(var R=d["default"].tag(i,"col"),O=0;O',this.popUpDivCssClass=e.popup_div_css_class||"popUpFilter",this.onBeforePopUpOpen=d["default"].isFn(e.on_before_popup_filter_open)?e.on_before_popup_filter_open:null,this.onAfterPopUpOpen=d["default"].isFn(e.on_after_popup_filter_open)?e.on_after_popup_filter_open:null,this.onBeforePopUpClose=d["default"].isFn(e.on_before_popup_filter_close)?e.on_before_popup_filter_close:null, this.onAfterPopUpClose=d["default"].isFn(e.on_after_popup_filter_close)?e.on_after_popup_filter_close:null,this.popUpFltSpans=[],this.popUpFltImgs=[],this.popUpFltElms=this.popUpFltElmCache||[],this.popUpFltAdjustToContainer=!0,this.prfxPopUpSpan="popUpSpan_",this.prfxPopUpDiv="popUpDiv_"}return l(s,e),n(s,[{key:"onClick",value:function(e){var s=e||t.event,i=s.target.parentNode,a=parseInt(i.getAttribute("ci"),10);if(this.closeAll(a),this.toggle(a),this.popUpFltAdjustToContainer){var l=this.popUpFltElms[a],n=this.tf.getHeaderElement(a),r=.95*n.clientWidth;l.style.width=parseInt(r,10)+"px"}p["default"].cancel(s),p["default"].stop(s)}},{key:"init",value:function(){var t=this;if(!this.initialized){for(var e=this.tf,s=0;sC;C++)if(t===C&&(!e||e&&a.disableExcludedOptions)||t==C&&e&&(""===o[m].style.display&&!a.paging||a.paging&&(!a.validRowsIndex||a.validRowsIndex&&-1!=a.validRowsIndex.indexOf(m))&&(void 0===c||c==t||c!=t&&-1!=a.validRowsIndex.indexOf(m)))){var w=a.getCellData(_[C]),x=u["default"].matchCase(w,d);if(h["default"].has(this.opts,x,d)||this.opts.push(w),e&&a.disableExcludedOptions){var T=b[C];T||(T=a.getFilteredDataCol(C)),h["default"].has(T,x,d)||h["default"].has(v,x,d)||this.isFirstLoad||v.push(w)}}}if(this.isCustom){var k=a.getCustomOptions(t);this.opts=k[0],this.optsTxt=k[1]}if(a.sortSlc&&!this.isCustom&&(d?(this.opts.sort(),v&&v.sort()):(this.opts.sort(f["default"].ignoreCase),v&&v.sort(f["default"].ignoreCase))),a.sortNumAsc&&-1!=a.sortNumAsc.indexOf(t))try{this.opts.sort(numSortAsc),v&&v.sort(numSortAsc),this.isCustom&&this.optsTxt.sort(numSortAsc)}catch(P){this.opts.sort(),v&&v.sort(),this.isCustom&&this.optsTxt.sort()}if(a.sortNumDesc&&-1!=a.sortNumDesc.indexOf(t))try{this.opts.sort(numSortDesc),v&&v.sort(numSortDesc),this.isCustom&&this.optsTxt.sort(numSortDesc)}catch(P){this.opts.sort(),v&&v.sort(),this.isCustom&&this.optsTxt.sort()}this.addOptions(t,n,e,v,p,g)}}},{key:"addOptions",value:function(t,e,s,i,a,l){var n=this.tf,o=u["default"].lower(this.slcFillingMethod),d=e.value;e.innerHTML="",e=this.addFirstOption(e);for(var c=0;c"+p+""}else{var b;b=n.loadFltOnDemand&&d===this.opts[c]&&n.getFilterType(t)===n.fltTypeSlc?r["default"].createOpt(p,f,!0):n.getFilterType(t)!==n.fltTypeMulti?r["default"].createOpt(p,f," "!==a[t]&&f===a[t]?!0:!1):r["default"].createOpt(p,f,h["default"].has(l,u["default"].matchCase(this.opts[c],n.matchCase),n.matchCase)||-1!==l.toString().indexOf(f)?!0:!1),g&&(b.disabled=!0),e.appendChild(b)}}"innerhtml"===o&&(e.innerHTML+=this.slcInnerHtml),e.setAttribute("filled","1")}},{key:"addFirstOption",value:function(t){var e=this.tf,s=u["default"].lower(this.slcFillingMethod);if("innerhtml"===s)this.slcInnerHtml+='";else{var i=r["default"].createOpt(this.enableSlcResetFilter?e.displayAllText:"","");if(this.enableSlcResetFilter||(i.style.display="none"),t.appendChild(i),e.enableEmptyOption){var a=r["default"].createOpt(e.emptyText,e.emOperator);t.appendChild(a)}if(e.enableNonEmptyOption){var l=r["default"].createOpt(e.nonEmptyText,e.nmOperator);t.appendChild(l)}}return t}}]),t}();e.Dropdown=p},function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var a=s(3),l=i(a);e["default"]={ignoreCase:function(t,e){var s=l["default"].lower(t),i=l["default"].lower(e);return i>s?-1:s>i?1:0}},t.exports=e["default"]},function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var s=0;s_;_++)if(t===_&&(!a.linkedFilters||a.linkedFilters&&a.disableExcludedOptions)||t===_&&a.linkedFilters&&(""===d[v].style.display&&!a.paging||a.paging&&(!c||c===t||c!=t&&-1!=a.validRowsIndex.indexOf(v)))){var y=a.getCellData(b[_]),C=u["default"].matchCase(y,a.matchCase);h["default"].has(this.opts,C,a.matchCase)||this.opts.push(y);var w=p[_];a.linkedFilters&&a.disableExcludedOptions&&(w||(w=a.getFilteredDataCol(_)),h["default"].has(w,C,a.matchCase)||h["default"].has(this.excludedOpts,C,a.matchCase)||a.isFirstLoad||this.excludedOpts.push(y))}}if(this.isCustom){var x=a.getCustomOptions(t);this.opts=x[0],this.optsTxt=x[1]}if(a.sortSlc&&!this.isCustom&&(a.matchCase?(this.opts.sort(),this.excludedOpts&&this.excludedOpts.sort()):(this.opts.sort(f["default"].ignoreCase),this.excludedOpts&&this.excludedOpts.sort(f["default"].ignoreCase))),a.sortNumAsc&&-1!=a.sortNumAsc.indexOf(t))try{this.opts.sort(numSortAsc),this.excludedOpts&&this.excludedOpts.sort(numSortAsc),this.isCustom&&this.optsTxt.sort(numSortAsc)}catch(T){this.opts.sort(),this.excludedOpts&&this.excludedOpts.sort(),this.isCustom&&this.optsTxt.sort()}if(a.sortNumDesc&&-1!=a.sortNumDesc.indexOf(t))try{this.opts.sort(numSortDesc),this.excludedOpts&&this.excludedOpts.sort(numSortDesc),this.isCustom&&this.optsTxt.sort(numSortDesc)}catch(T){this.opts.sort(),this.excludedOpts&&this.excludedOpts.sort(),this.isCustom&&this.optsTxt.sort()}this.addChecks(t,o,a.separator),a.loadFltOnDemand&&(n.innerHTML=""),n.appendChild(o),n.setAttribute("filled","1")}}},{key:"addChecks",value:function(t,e){var s=this,i=this.tf,a=this.addTChecks(t,e),l=[],n=i.feature("store"),o=n?n.getFilterValues(i.fltsValuesCookie)[t]:null;o&&u["default"].trim(o).length>0&&(i.hasCustomSlcOptions&&-1!=i.customSlcOptions.cols.indexOf(t)?l.push(o):l=o.split(" "+i.orOperator+" "));for(var d=0;d0?1:0),l=a+i.pagingLength-1<=e.nbVisibleRows?a+i.pagingLength-1:e.nbVisibleRows;s=a+this.fromToTextSeparator+l+this.overText+e.nbVisibleRows}}else s=t&&""!==t?t:e.nbFilterableRows-e.nbHiddenRows;this.rowsCounterSpan.innerHTML=s,this.onAfterRefreshCounter&&this.onAfterRefreshCounter.call(null,e,this.rowsCounterSpan,s)}}},{key:"destroy",value:function(){this.initialized&&(!this.rowsCounterTgtId&&this.rowsCounterDiv?this.rowsCounterDiv.parentNode.removeChild(this.rowsCounterDiv):d["default"].id(this.rowsCounterTgtId).innerHTML="",this.rowsCounterSpan=null,this.rowsCounterDiv=null,this.disable(),this.initialized=!1)}}]),e}(o.Feature);e.RowsCounter=f},function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var s=0;s",this.btnPrevPageText=s.btn_prev_page_text||"<",this.btnLastPageText=s.btn_last_page_text||">|",this.btnFirstPageText=s.btn_first_page_text||"|<",this.btnNextPageHtml=s.btn_next_page_html||(t.enableIcons?'':null),this.btnPrevPageHtml=s.btn_prev_page_html||(t.enableIcons?'':null),this.btnFirstPageHtml=s.btn_first_page_html||(t.enableIcons?'':null),this.btnLastPageHtml=s.btn_last_page_html||(t.enableIcons?'':null),this.pageText=s.page_text||" Page ",this.ofText=s.of_text||" of ",this.nbPgSpanCssClass=s.nb_pages_css_class||"nbpg",this.hasPagingBtns=s.paging_btns===!1?!1:!0,this.pageSelectorType=s.page_selector_type||t.fltTypeSlc,this.onBeforeChangePage=c["default"].isFn(s.on_before_change_page)?s.on_before_change_page:null,this.onAfterChangePage=c["default"].isFn(s.on_after_change_page)?s.on_after_change_page:null,this.prfxSlcPages="slcPages_",this.prfxSlcResults="slcResults_",this.prfxSlcResultsTxt="slcResultsTxt_",this.prfxBtnNextSpan="btnNextSpan_",this.prfxBtnPrevSpan="btnPrevSpan_",this.prfxBtnLastSpan="btnLastSpan_",this.prfxBtnFirstSpan="btnFirstSpan_",this.prfxBtnNext="btnNext_",this.prfxBtnPrev="btnPrev_",this.prfxBtnLast="btnLast_",this.prfxBtnFirst="btnFirst_",this.prfxPgSpan="pgspan_",this.prfxPgBeforeSpan="pgbeforespan_",this.prfxPgAfterSpan="pgafterspan_";var i=this.refRow,l=this.nbRows;this.nbPages=Math.ceil((l-i)/this.pagingLength);var n=this;this.evt={slcIndex:function(){return n.pageSelectorType===t.fltTypeSlc?n.pagingSlc.options.selectedIndex:parseInt(n.pagingSlc.value,10)-1},nbOpts:function(){return n.pageSelectorType===t.fltTypeSlc?parseInt(n.pagingSlc.options.length,10)-1:n.nbPages-1},next:function(){var t=n.evt.slcIndex()0?n.evt.slcIndex()-1:n.evt.nbOpts();n.changePage(t)},last:function(){n.changePage(n.evt.nbOpts())},first:function(){n.changePage(0)},_detectKey:function(e){var s=v["default"].keyCode(e);13===s&&(t.sorted?(t.filter(),n.changePage(n.evt.slcIndex())):n.changePage(),this.blur())},slcPagesChange:null,nextEvt:null,prevEvt:null,lastEvt:null,firstEvt:null}}return l(e,t),n(e,[{key:"init",value:function(){var t,e=this,s=this.tf,i=this.evt;if(!this.initialized){this.hasResultsPerPage&&(this.resultsPerPage.length<2?this.hasResultsPerPage=!1:(this.pagingLength=this.resultsPerPage[1][0],this.setResultsPerPage())),i.slcPagesChange=function(t){var s=t.target;e.changePage(s.selectedIndex)},this.pageSelectorType===s.fltTypeSlc&&(t=d["default"].create(s.fltTypeSlc,["id",this.prfxSlcPages+s.id]),t.className=this.pgSlcCssClass,v["default"].add(t,"change",i.slcPagesChange)),this.pageSelectorType===s.fltTypeInp&&(t=d["default"].create(s.fltTypeInp,["id",this.prfxSlcPages+s.id],["value",this.currentPageNb]),t.className=this.pgInpCssClass,v["default"].add(t,"keypress",i._detectKey));var a=d["default"].create("span",["id",this.prfxBtnNextSpan+s.id]),l=d["default"].create("span",["id",this.prfxBtnPrevSpan+s.id]),n=d["default"].create("span",["id",this.prfxBtnLastSpan+s.id]),r=d["default"].create("span",["id",this.prfxBtnFirstSpan+s.id]);if(this.hasPagingBtns){if(this.btnNextPageHtml)a.innerHTML=this.btnNextPageHtml,v["default"].add(a,"click",i.next);else{var o=d["default"].create(s.fltTypeInp,["id",this.prfxBtnNext+s.id],["type","button"],["value",this.btnNextPageText],["title","Next"]);o.className=this.btnPageCssClass,v["default"].add(o,"click",i.next),a.appendChild(o)}if(this.btnPrevPageHtml)l.innerHTML=this.btnPrevPageHtml,v["default"].add(l,"click",i.prev);else{var h=d["default"].create(s.fltTypeInp,["id",this.prfxBtnPrev+s.id],["type","button"],["value",this.btnPrevPageText],["title","Previous"]);h.className=this.btnPageCssClass,v["default"].add(h,"click",i.prev),l.appendChild(h)}if(this.btnLastPageHtml)n.innerHTML=this.btnLastPageHtml,v["default"].add(n,"click",i.last);else{var u=d["default"].create(s.fltTypeInp,["id",this.prfxBtnLast+s.id],["type","button"],["value",this.btnLastPageText],["title","Last"]);u.className=this.btnPageCssClass,v["default"].add(u,"click",i.last),n.appendChild(u)}if(this.btnFirstPageHtml)r.innerHTML=this.btnFirstPageHtml,v["default"].add(r,"click",i.first);else{var c=d["default"].create(s.fltTypeInp,["id",this.prfxBtnFirst+s.id],["type","button"],["value",this.btnFirstPageText],["title","First"]);c.className=this.btnPageCssClass,v["default"].add(c,"click",i.first),r.appendChild(c)}}this.pagingTgtId||s.setToolbar();var f=this.pagingTgtId?d["default"].id(this.pagingTgtId):s.mDiv;f.appendChild(r),f.appendChild(l);var p=d["default"].create("span",["id",this.prfxPgBeforeSpan+s.id]);p.appendChild(d["default"].text(this.pageText)),p.className=this.nbPgSpanCssClass,f.appendChild(p),f.appendChild(t);var g=d["default"].create("span",["id",this.prfxPgAfterSpan+s.id]);g.appendChild(d["default"].text(this.ofText)),g.className=this.nbPgSpanCssClass,f.appendChild(g);var b=d["default"].create("span",["id",this.prfxPgSpan+s.id]);b.className=this.nbPgSpanCssClass,b.appendChild(d["default"].text(" "+this.nbPages+" ")),f.appendChild(b),f.appendChild(a),f.appendChild(n),this.pagingSlc=d["default"].id(this.prfxSlcPages+s.id),s.rememberGridValues||this.setPagingInfo(),s.fltGrid||(s.validateAllRows(),this.setPagingInfo(s.validRowsIndex)),this.initialized=!0}}},{key:"reset",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0],e=this.tf;e.hasGrid()&&!this.isEnabled()&&(this.enable(),this.init(),e.resetValues(),t&&e.filter())}},{key:"setPagingInfo",value:function(){var t=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],e=this.tf,s=e.tbl.rows,i=this.pagingTgtId?d["default"].id(this.pagingTgtId):e.mDiv,a=d["default"].id(this.prfxPgSpan+e.id);if(e.validRowsIndex=t,0===t.length)for(var l=e.refRow;l0)if(i.style.visibility="visible",this.pageSelectorType===e.fltTypeSlc)for(var o=0;ol;l++){var r=e.validRowsIndex[l],o=i[r],h=o.getAttribute("validRow");l>=this.startPagingRow&&a>l?((c["default"].isNull(h)||Boolean("true"===h))&&(o.style.display=""),e.alternateRows&&s&&s.setRowBg(r,l)):(o.style.display="none",e.alternateRows&&s&&s.removeRowBg(r))}e.nbVisibleRows=e.validRowsIndex.length,e.applyProps()}},{key:"getPage",value:function(){return this.currentPageNb}},{key:"setPage",value:function(t){var e=this.tf;if(e.hasGrid()&&this.isEnabled()){var s=this.evt,i=typeof t;if("string"===i)switch(p["default"].lower(t)){case"next":s.next();break;case"previous":s.prev();break;case"last":s.last();break;case"first":s.first();break;default:s.next()}else"number"===i&&this.changePage(t-1)}}},{key:"setResultsPerPage",value:function(){var t=this,e=this.tf,s=this.evt;if((e.hasGrid()||e.isFirstLoad)&&!this.resultsPerPageSlc&&this.resultsPerPage){s.slcResultsChange=function(e){t.changeResultsPerPage(),e.target.blur(); };var i=d["default"].create(e.fltTypeSlc,["id",this.prfxSlcResults+e.id]);i.className=this.resultsSlcCssClass;var a=this.resultsPerPage[0],l=this.resultsPerPage[1],n=d["default"].create("span",["id",this.prfxSlcResultsTxt+e.id]);n.className=this.resultsSpanCssClass,this.resultsPerPageTgtId||e.setToolbar();var r=this.resultsPerPageTgtId?d["default"].id(this.resultsPerPageTgtId):e.rDiv;n.appendChild(d["default"].text(a));var o=e.feature("help");o&&o.btn?(o.btn.parentNode.insertBefore(n,o.btn),o.btn.parentNode.insertBefore(i,o.btn)):(r.appendChild(n),r.appendChild(i));for(var h=0;h=0&&t<=this.nbPages-1&&(this.onBeforeChangePage&&this.onBeforeChangePage.call(null,this,t),this.currentPageNb=parseInt(t,10)+1,this.pageSelectorType===e.fltTypeSlc?this.pagingSlc.options[t].selected=!0:this.pagingSlc.value=this.currentPageNb,e.rememberPageNb&&e.feature("store").savePageNb(e.pgNbCookie),this.startPagingRow=this.pageSelectorType===e.fltTypeSlc?this.pagingSlc.value:t*this.pagingLength,this.groupByPage(),this.onAfterChangePage&&this.onAfterChangePage.call(null,this,t)))}},{key:"_changeResultsPerPage",value:function(){var t=this.tf;if(this.isEnabled()){var e=this.resultsPerPageSlc,s=this.pageSelectorType===t.fltTypeSlc?this.pagingSlc.selectedIndex:parseInt(this.pagingSlc.value-1,10);if(this.pagingLength=parseInt(e.options[e.selectedIndex].value,10),this.startPagingRow=this.pagingLength*s,!isNaN(this.pagingLength)){if(this.startPagingRow>=t.nbFilterableRows&&(this.startPagingRow=t.nbFilterableRows-this.pagingLength),this.setPagingInfo(),this.pageSelectorType===t.fltTypeSlc){var i=this.pagingSlc.options.length-1<=s?this.pagingSlc.options.length-1:s;this.pagingSlc.options[i].selected=!0}t.rememberPageLen&&t.feature("store").savePageLength(t.pgLenCookie)}}}},{key:"_resetPage",value:function(t){var e=this.tf,s=e.feature("store").getPageNb(t);""!==s&&this.changePage(s-1)}},{key:"_resetPageLength",value:function(t){var e=this.tf;if(this.isEnabled()){var s=e.feature("store").getPageLength(t);""!==s&&(this.resultsPerPageSlc.options[s].selected=!0,this.changeResultsPerPage())}}},{key:"destroy",value:function(){var t=this.tf;if(this.initialized){var e=d["default"].id(this.prfxBtnNextSpan+t.id),s=d["default"].id(this.prfxBtnPrevSpan+t.id),i=d["default"].id(this.prfxBtnLastSpan+t.id),a=d["default"].id(this.prfxBtnFirstSpan+t.id),l=d["default"].id(this.prfxPgBeforeSpan+t.id),n=d["default"].id(this.prfxPgAfterSpan+t.id),r=d["default"].id(this.prfxPgSpan+t.id),o=this.evt;this.pagingSlc&&(this.pageSelectorType===t.fltTypeSlc?v["default"].remove(this.pagingSlc,"change",o.slcPagesChange):this.pageSelectorType===t.fltTypeInp&&v["default"].remove(this.pagingSlc,"keypress",o._detectKey),this.pagingSlc.parentNode.removeChild(this.pagingSlc)),e&&(v["default"].remove(e,"click",o.next),e.parentNode.removeChild(e)),s&&(v["default"].remove(s,"click",o.prev),s.parentNode.removeChild(s)),i&&(v["default"].remove(i,"click",o.last),i.parentNode.removeChild(i)),a&&(v["default"].remove(a,"click",o.first),a.parentNode.removeChild(a)),l&&l.parentNode.removeChild(l),n&&n.parentNode.removeChild(n),r&&r.parentNode.removeChild(r),this.hasResultsPerPage&&this.removeResultsPerPage(),this.pagingSlc=null,this.nbPages=0,this.disable(),this.initialized=!1}}}]),e}(o.Feature);e.Paging=b},function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var s=0;s':null),this.prfxResetSpan="resetspan_"}return l(e,t),n(e,[{key:"onClick",value:function(){this.isEnabled()&&this.tf.clearFilters()}},{key:"init",value:function(){var t=this,e=this.tf;if(!this.initialized){var s=d["default"].create("span",["id",this.prfxResetSpan+e.id]);this.btnResetTgtId||e.setToolbar();var i=this.btnResetTgtId?d["default"].id(this.btnResetTgtId):e.rDiv;if(i.appendChild(s),this.btnResetHtml){s.innerHTML=this.btnResetHtml;var a=s.firstChild;c["default"].add(a,"click",function(){t.onClick()})}else{var l=d["default"].create("a",["href","javascript:void(0);"]);l.className=e.btnResetCssClass,l.appendChild(d["default"].text(this.btnResetText)),s.appendChild(l),c["default"].add(l,"click",function(){t.onClick()})}this.btnResetEl=s.firstChild,this.initialized=!0}}},{key:"destroy",value:function(){var t=this.tf;if(this.initialized){var e=d["default"].id(this.prfxResetSpan+t.id);e&&e.parentNode.removeChild(e),this.btnResetEl=null,this.disable(),this.initialized=!1}}}]),e}(o.Feature);e.ClearButton=f},function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var s=0;s<, <=, >, >=, =, *, !, {, }, ||,&&, [empty], [nonempty], rgx:
Learn more
',this.instrHtml=s.help_instructions_html||null,this.btnText=s.help_instructions_btn_text||"?",this.btnHtml=s.help_instructions_btn_html||null,this.btnCssClass=s.help_instructions_btn_css_class||"helpBtn",this.contCssClass=s.help_instructions_container_css_class||"helpCont",this.btn=null,this.cont=null,this.defaultHtml='

TableFilter v'+t.version+'

'+p+"
©2015-"+t.year+' Max Guglielmi
',this.prfxHelpSpan="helpSpan_",this.prfxHelpDiv="helpDiv_"}return l(e,t),n(e,[{key:"init",value:function(){var t=this;if(!this.initialized){var e=this.tf,s=d["default"].create("span",["id",this.prfxHelpSpan+e.id]),i=d["default"].create("div",["id",this.prfxHelpDiv+e.id]);this.tgtId||e.setToolbar();var a=this.tgtId?d["default"].id(this.tgtId):e.rDiv;a.appendChild(s);var l=this.contTgtId?d["default"].id(this.contTgtId):s;if(this.btnHtml){s.innerHTML=this.btnHtml;var n=s.firstChild;c["default"].add(n,"click",function(){t.toggle()}),l.appendChild(i)}else{l.appendChild(i);var r=d["default"].create("a",["href","javascript:void(0);"]);r.className=this.btnCssClass,r.appendChild(d["default"].text(this.btnText)),s.appendChild(r),c["default"].add(r,"click",function(){t.toggle()})}this.instrHtml?(this.contTgtId&&l.appendChild(i),i.innerHTML=this.instrHtml,this.contTgtId||(i.className=this.contCssClass,c["default"].add(i,"dblclick",function(){t.toggle()}))):(i.innerHTML=this.instrText,i.className=this.contCssClass,c["default"].add(i,"dblclick",function(){t.toggle()})),i.innerHTML+=this.defaultHtml,c["default"].add(i,"click",function(){t.toggle()}),this.cont=i,this.btn=s,this.initialized=!0}}},{key:"toggle",value:function(){if(this.enabled!==!1){var t=this.cont.style.display;""===t||"none"===t?this.cont.style.display="inline":this.cont.style.display="none"}}},{key:"destroy",value:function(){this.initialized&&(this.btn.parentNode.removeChild(this.btn),this.btn=null,this.cont&&(this.cont.parentNode.removeChild(this.cont),this.cont=null,this.disable(),this.initialized=!1))}}]),e}(o.Feature);e.Help=g},function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var s=0;sn;n++){var r=s?n:e[n];this.setRowBg(r,l),l++}this.initialized=!0}}},{key:"setRowBg",value:function(t,e){if(this.isEnabled()&&!isNaN(t)){var s=this.tf.tbl.rows,i=isNaN(e)?t:e;this.removeRowBg(t),d["default"].addClass(s[t],i%2?this.evenCss:this.oddCss)}}},{key:"removeRowBg",value:function(t){if(!isNaN(t)){var e=this.tf.tbl.rows;d["default"].removeClass(e[t],this.oddCss),d["default"].removeClass(e[t],this.evenCss)}}},{key:"destroy",value:function(){if(this.initialized){for(var t=this.tf.refRow;t0&&!s.startRow?void 0:s.startRow||e.refRow,s.base_path=s.base_path||e.basePath+"ezEditTable/";var n=s.editable,l=s.selection;l&&(s.default_selection=s.default_selection||"row"),s.active_cell_css=s.active_cell_css||"ezETSelectedCell";var a=0,o=0;if(l){var h=function(t,s,i){var n=t.Selection,l=function(i){if("row"===t.defaultSelection)n.SelectRowByIndex(i);else{t.ClearSelections();var l=s.cellIndex,a=e.tbl.rows[i];"both"===t.defaultSelection&&n.SelectRowByIndex(i),a&&n.SelectCell(a.cells[l])}if(e.validRowsIndex.length!==e.getRowsNb()){var r=e.tbl.rows[i];r&&r.scrollIntoView(!1),c&&(c.cellIndex===e.getCellsNb()-1&&e.gridLayout?e.tblCont.scrollLeft=1e8:0===c.cellIndex&&e.gridLayout?e.tblCont.scrollLeft=0:c.scrollIntoView(!1))}};if(e.validRowsIndex){var r,h=e.validRowsIndex,d=h.length,u="row"!==t.defaultSelection?s.parentNode:s,c="TD"===s.nodeName?s:null,f=void 0!==i?t.Event.GetKey(i):0,p=-1!==h.indexOf(u.rowIndex),g=e.feature("paging"),v=34===f||33===f?g&&g.pagingLength||t.nbRowsPerPage:1;if(p)34!==f&&33!==f?(a=h.indexOf(u.rowIndex),o=u.rowIndex):(r=34===f?d-1>=a+v?h[a+v]:[d-1]:a-v<=h[0]?h[0]:h[a-v],o=r,a=h.indexOf(r),l(r));else{if(u.rowIndex>o)if(u.rowIndex>=h[d-1])r=h[d-1];else{var b=a+v;r=b>d-1?h[d-1]:h[b]}else if(u.rowIndex<=h[0])r=h[0];else{var m=h[a-v];r=m?m:h[0]}o=u.rowIndex,l(r)}}},d=function(t,s){var i="row"!==t.defaultSelection?s.parentNode:s;if(e.paging&&e.feature("paging").nbPages>1){var n=e.feature("paging");t.nbRowsPerPage=n.pagingLength;var l=e.validRowsIndex,a=l.length,r=parseInt(n.startPagingRow,10)+parseInt(n.pagingLength,10),o=i.rowIndex;o===l[a-1]&&n.currentPageNb!==n.nbPages?n.setPage("last"):o==l[0]&&1!==n.currentPageNb?n.setPage("first"):o>l[r-1]&&ol[0]&&n.setPage("previous")}};if(e.paging&&(e.feature("paging").onAfterChangePage=function(t){var e=t.tf.extension("advancedGrid"),s=e._ezEditTable,i=s.Selection,n=i.GetActiveRow();n&&n.scrollIntoView(!1);var l=i.GetActiveCell();l&&l.scrollIntoView(!1)}),"row"===s.default_selection){var u=s.on_before_selected_row;s.on_before_selected_row=function(){d(arguments[0],arguments[1],arguments[2]),u&&u.call(null,arguments[0],arguments[1],arguments[2])};var c=s.on_after_selected_row;s.on_after_selected_row=function(){h(arguments[0],arguments[1],arguments[2]),c&&c.call(null,arguments[0],arguments[1],arguments[2])}}else{var f=s.on_before_selected_cell;s.on_before_selected_cell=function(){d(arguments[0],arguments[1],arguments[2]),f&&f.call(null,arguments[0],arguments[1],arguments[2])};var p=s.on_after_selected_cell;s.on_after_selected_cell=function(){h(arguments[0],arguments[1],arguments[2]),p&&p.call(null,arguments[0],arguments[1],arguments[2])}}}if(n){var g=s.on_added_dom_row;if(s.on_added_dom_row=function(){e.nbFilterableRows++,e.paging?(e.nbRows++,e.nbVisibleRows++,e.nbFilterableRows++,e.paging=!1,e.feature("paging").destroy(),e.feature("paging").reset()):e.feature("rowsCounter").refresh(),e.alternateRows&&e.feature("alternateRows").init(),g&&g.call(null,arguments[0],arguments[1],arguments[2])},s.actions&&s.actions["delete"]){var v=s.actions["delete"].on_after_submit;s.actions["delete"].on_after_submit=function(){e.nbFilterableRows--,e.paging?(e.nbRows--,e.nbVisibleRows--,e.nbFilterableRows--,e.paging=!1,e.feature("paging").destroy(),e.feature("paging").reset(!1)):e.feature("rowsCounter").refresh(),e.alternateRows&&e.feature("alternateRows").init(),v&&v.call(null,arguments[0],arguments[1])}}}try{this._ezEditTable=new EditTable(e.id,s,t),this._ezEditTable.Init()}catch(b){throw new Error(this.err)}this.initialized=!0}},{key:"reset",value:function(){var t=this._ezEditTable;t&&(this.cfg.selection&&t.Selection.Set(),this.cfg.editable&&t.Editable.Set())}},{key:"destroy",value:function(){var t=this._ezEditTable;t&&(this.cfg.selection&&(t.Selection.ClearSelections(),t.Selection.Remove()),this.cfg.editable&&t.Editable.Remove()),this.initialized=!1}}]),t}();e["default"]=o,t.exports=e["default"]},26:function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var n=s(25),l=i(n);e["default"]=l["default"],t.exports=e["default"]},27:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function t(t,e){for(var s=0;s=jj;jj++)ucolIndex[jj]===colIndex[ii]&&(saved=1);0===saved&&(ucolMax++,ucolIndex[ucolMax]=colIndex[ii])}if("object"==_string2["default"].lower(typeof labelId)&&"object"==_string2["default"].lower(typeof colIndex)&&"object"==_string2["default"].lower(typeof operation))for(var rows=tf.tbl.rows,colvalues=[],ucol=0;ucolMax>=ucol;ucol++){colvalues.push(tf.getColValues(ucolIndex[ucol],!1,!0,excludeRow));for(var result,nbvalues=0,temp,meanValue=0,sumValue=0,minValue=null,maxValue=null,q1Value=null,medValue=null,q3Value=null,meanFlag=0,sumFlag=0,minFlag=0,maxFlag=0,q1Flag=0,medFlag=0,q3Flag=0,theList=[],opsThisCol=[],decThisCol=[],labThisCol=[],oTypeThisCol=[],mThisCol=-1,k=0;kmaxValue?parseFloat(cvalue):maxValue))}if(1===meanFlag&&(meanValue=sumValue/nbvalues),1===medFlag){var aux=0;nbvalues%2===1?(aux=Math.floor(nbvalues/2),medValue=theList[aux]):medValue=(theList[nbvalues/2]+theList[nbvalues/2-1])/2}var posa;if(1===q1Flag&&(posa=0,posa=Math.floor(nbvalues/4),q1Value=4*posa==nbvalues?(theList[posa-1]+theList[posa])/2:theList[posa]),1===q3Flag){posa=0;var posb=0;posa=Math.floor(nbvalues/4),4*posa===nbvalues?(posb=3*posa,q3Value=(theList[posb]+theList[posb-1])/2):q3Value=theList[nbvalues-posa-1]}for(var i=0;mThisCol>=i;i++){switch(opsThisCol[i]){case"mean":result=meanValue;break;case"sum":result=sumValue;break;case"min":result=minValue;break;case"max":result=maxValue;break;case"median":result=medValue;break;case"q1":result=q1Value;break;case"q3":result=q3Value}var precision=isNaN(decThisCol[i])?2:decThisCol[i];if(oTypeThisCol&&result){if(result=result.toFixed(precision),_dom2["default"].id(labThisCol[i]))switch(_string2["default"].lower(oTypeThisCol)){case"innerhtml":isNaN(result)||!isFinite(result)||0===nbvalues?_dom2["default"].id(labThisCol[i]).innerHTML=".":_dom2["default"].id(labThisCol[i]).innerHTML=result;break;case"setvalue":_dom2["default"].id(labThisCol[i]).value=result;break;case"createtextnode":var oldnode=_dom2["default"].id(labThisCol[i]).firstChild,txtnode=_dom2["default"].text(result);_dom2["default"].id(labThisCol[i]).replaceChild(txtnode,oldnode)}}else try{isNaN(result)||!isFinite(result)||0===nbvalues?_dom2["default"].id(labThisCol[i]).innerHTML=".":_dom2["default"].id(labThisCol[i]).innerHTML=result.toFixed(precision)}catch(e){}}var totRow=totRowIndex&&totRowIndex[ucol]?rows[totRowIndex[ucol]]:null;totRow&&(totRow.style.display="")}this.onAfterOperation&&this.onAfterOperation.call(null,tf)}}},{key:"destroy",value:function(){}}]),ColOps}();exports["default"]=ColOps,module.exports=exports["default"]},28:function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var s=0;s0,this.onLoaded=h["default"].isFn(s.on_loaded)?s.on_loaded:null,this.onBeforeOpen=h["default"].isFn(s.on_before_open)?s.on_before_open:null,this.onAfterOpen=h["default"].isFn(s.on_after_open)?s.on_after_open:null,this.onBeforeClose=h["default"].isFn(s.on_before_close)?s.on_before_close:null,this.onAfterClose=h["default"].isFn(s.on_after_close)?s.on_after_close:null,this.onBeforeColHidden=h["default"].isFn(s.on_before_col_hidden)?s.on_before_col_hidden:null,this.onAfterColHidden=h["default"].isFn(s.on_after_col_hidden)?s.on_after_col_hidden:null,this.onBeforeColDisplayed=h["default"].isFn(s.on_before_col_displayed)?s.on_before_col_displayed:null,this.onAfterColDisplayed=h["default"].isFn(s.on_after_col_displayed)?s.on_after_col_displayed:null,e.gridLayout&&(this.headersTbl=e.feature("gridLayout").headTbl,this.headersIndex=0,this.onAfterColDisplayed=function(){},this.onAfterColHidden=function(){}),e["import"](s.name+"Style",e.stylePath+this.stylesheet,null,"link"),this.tf=e}return l(t,[{key:"toggle",value:function(){var t=this.contEl.style.display,e=this.onBeforeOpen,s=this.onBeforeClose,i=this.onAfterOpen,n=this.onAfterClose;e&&"inline"!==t&&e.call(null,this),s&&"inline"===t&&s.call(null,this),this.contEl.style.display="inline"===t?"none":"inline",i&&"inline"!==t&&i.call(null,this),n&&"inline"===t&&n.call(null,this)}},{key:"checkItem",value:function(t){var e=t.parentNode;if(e&&t){var s=t.firstChild.checked,i=t.firstChild.getAttribute("id").split("_")[1];i=parseInt(i,10),s?r["default"].addClass(e,this.listSlcItemCssClass):r["default"].removeClass(e,this.listSlcItemCssClass);var n=!1;(this.tickToHide&&s||!this.tickToHide&&!s)&&(n=!0),this.setHidden(i,n)}}},{key:"init",value:function(){this.manager&&(this.buildBtn(),this.buildManager(),this.initialized=!0)}},{key:"buildBtn",value:function(){var t=this;if(!this.btnEl){var e=this.tf,s=r["default"].create("span",["id",this.prfx+e.id]);s.className=this.spanCssClass,this.btnTgtId||e.setToolbar();var i=this.btnTgtId?r["default"].id(this.btnTgtId):e.rDiv;if(this.btnTgtId)i.appendChild(s);else{var n=i.firstChild;n.parentNode.insertBefore(s,n)}if(this.btnHtml){s.innerHTML=this.btnHtml;var l=s.firstChild;this.enableHover?u["default"].add(l,"mouseover",function(e){t.toggle(e)}):u["default"].add(l,"click",function(e){t.toggle(e)})}else{var a=r["default"].create("a",["href","javascript:;"]);a.className=this.btnCssClass,a.title=this.desc,a.innerHTML=this.btnText,s.appendChild(a),this.enableHover?u["default"].add(a,"mouseover",function(e){t.toggle(e)}):u["default"].add(a,"click",function(e){t.toggle(e)})}this.spanEl=s,this.btnEl=this.spanEl.firstChild,this.onLoaded&&this.onLoaded.call(null,this)}}},{key:"buildManager",value:function(){var t=this,e=this.tf,s=this.contElTgtId?r["default"].id(this.contElTgtId):r["default"].create("div",["id",this.prfxCont+e.id]);s.className=this.contCssClass;var i=r["default"].create("p");i.innerHTML=this.text,s.appendChild(i);var n=r["default"].create("ul",["id","ul"+this.name+"_"+e.id]);n.className=this.listCssClass;var l=this.headersTbl?this.headersTbl:e.tbl,a=this.headersTbl?this.headersIndex:e.getHeadersRowIndex(),o=l.rows[a];if(this.enableTickAll){var h=r["default"].createCheckItem("col__"+e.id,this.tickAllText,this.tickAllText);r["default"].addClass(h,this.listItemCssClass),n.appendChild(h),h.check.checked=!this.tickToHide,u["default"].add(h.check,"click",function(){for(var t=0;t',this.icnCollapseHtml='Collapse filters',this.defaultText="Toggle filters",this.targetId=s.target_id||null,this.enableIcon=s.enable_icon===!1?!1:!0,this.btnText=s.btn_text||"",this.collapseBtnHtml=this.enableIcon?this.icnCollapseHtml+this.btnText:this.btnText||this.defaultText,this.expandBtnHtml=this.enableIcon?this.icnExpandHtml+this.btnText:this.btnText||this.defaultText,this.btnHtml=s.btn_html||null,this.btnCssClass=s.btn_css_class||"btnExpClpFlt",this.contCssClass=s.cont_css_class||"expClpFlt",this.filtersRowIndex=h["default"].isUndef(s.filters_row_index)?e.getFiltersRowIndex():s.filters_row_index,this.visibleAtStart=h["default"].isUndef(s.visible_at_start)?!0:Boolean(s.visible_at_start),this.prfx="fltsVis_",this.onBeforeShow=h["default"].isFn(s.on_before_show)?s.on_before_show:null,this.onAfterShow=h["default"].isFn(s.on_after_show)?s.on_after_show:null,this.onBeforeHide=h["default"].isFn(s.on_before_hide)?s.on_before_hide:null,this.onAfterHide=h["default"].isFn(s.on_after_hide)?s.on_after_hide:null,e["import"](s.name+"Style",e.stylePath+this.stylesheet,null,"link"),this.tf=e}return l(t,[{key:"init",value:function(){this.initialized||(this.buildUI(),this.initialized=!0)}},{key:"buildUI",value:function(){var t=this,e=this.tf,s=r["default"].create("span",["id",this.prfx+e.id]);s.className=this.contCssClass,this.targetId||e.setToolbar();var i=this.targetId?r["default"].id(this.targetId):e.rDiv;if(this.targetId)i.appendChild(s);else{var n=i.firstChild;n.parentNode.insertBefore(s,n)}var l=void 0;this.btnHtml?(s.innerHTML=this.btnHtml,l=s.firstChild):(l=r["default"].create("a",["href","javascript:void(0);"]),l.className=this.btnCssClass,l.title=this.btnText||this.defaultText,l.innerHTML=this.collapseBtnHtml,s.appendChild(l)),u["default"].add(l,"click",function(){return t.toggle()}),this.contEl=s,this.btnEl=l,this.visibleAtStart||this.toggle()}},{key:"toggle",value:function(){var t=this.tf,e=t.gridLayout?t.feature("gridLayout").headTbl:t.tbl,s=e.rows[this.filtersRowIndex],i=s.style.display;this.onBeforeShow&&""!==i&&this.onBeforeShow.call(this,this),this.onBeforeHide&&""===i&&this.onBeforeHide.call(null,this),s.style.display=""===i?"none":"",this.enableIcon&&!this.btnHtml&&(this.btnEl.innerHTML=""===i?this.expandBtnHtml:this.collapseBtnHtml),this.onAfterShow&&""!==i&&this.onAfterShow.call(null,this),this.onAfterHide&&""===i&&this.onAfterHide.call(null,this)}},{key:"destroy",value:function(){(this.btnEl||this.contEl)&&(this.btnEl.innerHTML="",this.btnEl.parentNode.removeChild(this.btnEl),this.btnEl=null,this.contEl.innerHTML="",this.contEl.parentNode.removeChild(this.contEl),this.contEl=null,this.initialized=!1)}}]),t}();e["default"]=c,t.exports=e["default"]},30:function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t){return x["default"].removeNbFormat(t,"us")}function a(t){return x["default"].removeNbFormat(t,"eu")}function r(t,e){return w["default"].format(t,e)}function o(t){return r(t,"DMY")}function h(t){return r(t,"MDY")}function d(t){return r(t,"YMD")}function u(t){return r(t,"DDMMMYYYY")}function c(t){var e=t.split(".");for(var s in e){for(var i=e[s];3>i.length;)i="0"+i;e[s]=i}return e.join(".")}function f(t,e){var s=c(t.value.toLowerCase()),i=c(e.value.toLowerCase());return s==i?0:i>s?-1:1}Object.defineProperty(e,"__esModule",{value:!0});var p=function(){function t(t,e){for(var s=0;si;i++);return i},SortableTable.prototype.initHeader=function(s){var i=this;if(!i.tHead){if(!e.gridLayout)return;i.tHead=e.feature("gridLayout").headTbl.tHead}i.headersRow=e.headersRow;var n=i.tHead.rows[i.headersRow].cells;i.sortTypes=s||[];for(var l=n.length,a=void 0,r=void 0,o=0;l>o;o++)r=n[o],null!==i.sortTypes[o]&&"None"!==i.sortTypes[o]?(r.style.cursor="pointer",a=m["default"].create("img",["src",t.imgPath+t.imgBlank]),r.appendChild(a),null!==i.sortTypes[o]&&r.setAttribute("_sortType",i.sortTypes[o]),_["default"].add(r,"click",i._headerOnclick)):(r.setAttribute("_sortType",s[o]),r._sortType="None");i.updateHeaderArrows()},SortableTable.prototype.updateHeaderArrows=function(){var e=this,s=void 0,i=void 0,n=void 0;if(t.asyncSort&&t.triggerIds.length>0){var l=t.triggerIds;s=[],i=l.length;for(var a=0;ar;r++){var o=s[r].getAttribute("_sortType");null!==o&&"None"!==o&&(n=s[r].lastChild||s[r],"img"!==n.nodeName.toLowerCase()&&(n=m["default"].create("img",["src",t.imgPath+t.imgBlank]),s[r].appendChild(n)),r===e.sortColumn?n.className=t.imgClassName+" "+(this.descending?t.imgDescClassName:t.imgAscClassName):n.className=t.imgClassName)}},SortableTable.prototype.getRowValue=function(t,e,s){var i=this,n=i._sortTypeInfo[e];if(n&&n.getRowValue)return n.getRowValue(t,s);var l=t.cells[s],a=SortableTable.getInnerText(l);return i.getValueFromString(a,e)},SortableTable.getInnerText=function(e){return e?e.getAttribute(t.customKey)?e.getAttribute(t.customKey):m["default"].getText(e):void 0}}},{key:"addSortType",value:function(){var t=arguments;SortableTable.prototype.addSortType(t[0],t[1],t[2],t[3])}},{key:"setSortTypes",value:function(){for(var t=this,e=this.tf,s=this.sortTypes,i=[],n=0;n0&&!function(){for(var e=t.triggerIds,s=0;s descending, false -> ascending\r\nSortableTable.prototype.defaultDescending = false;\r\n\r\n// shared between all instances. This is intentional to allow external files\r\n// to modify the prototype\r\nSortableTable.prototype._sortTypeInfo = {};\r\n\r\nSortableTable.prototype.setTable = function (oTable) {\r\n if ( this.tHead )\r\n this.uninitHeader();\r\n this.element = oTable;\r\n this.setTHead( oTable.tHead );\r\n this.setTBody( oTable.tBodies[0] );\r\n};\r\n\r\nSortableTable.prototype.setTHead = function (oTHead) {\r\n if (this.tHead && this.tHead != oTHead )\r\n this.uninitHeader();\r\n this.tHead = oTHead;\r\n this.initHeader( this.sortTypes );\r\n};\r\n\r\nSortableTable.prototype.setTBody = function (oTBody) {\r\n this.tBody = oTBody;\r\n};\r\n\r\nSortableTable.prototype.setSortTypes = function ( oSortTypes ) {\r\n if ( this.tHead )\r\n this.uninitHeader();\r\n this.sortTypes = oSortTypes || [];\r\n if ( this.tHead )\r\n this.initHeader( this.sortTypes );\r\n};\r\n\r\n// adds arrow containers and events\r\n// also binds sort type to the header cells so that reordering columns does\r\n// not break the sort types\r\nSortableTable.prototype.initHeader = function (oSortTypes) {\r\n if (!this.tHead) return;\r\n var cells = this.tHead.rows[0].cells;\r\n var doc = this.tHead.ownerDocument || this.tHead.document;\r\n this.sortTypes = oSortTypes || [];\r\n var l = cells.length;\r\n var img, c;\r\n for (var i = 0; i < l; i++) {\r\n c = cells[i];\r\n if (this.sortTypes[i] != null && this.sortTypes[i] != "None") {\r\n img = doc.createElement("IMG");\r\n img.src = "images/blank.png";\r\n c.appendChild(img);\r\n if (this.sortTypes[i] != null)\r\n c._sortType = this.sortTypes[i];\r\n if (typeof c.addEventListener != "undefined")\r\n c.addEventListener("click", this._headerOnclick, false);\r\n else if (typeof c.attachEvent != "undefined")\r\n c.attachEvent("onclick", this._headerOnclick);\r\n else\r\n c.onclick = this._headerOnclick;\r\n }\r\n else\r\n {\r\n c.setAttribute( "_sortType", oSortTypes[i] );\r\n c._sortType = "None";\r\n }\r\n }\r\n this.updateHeaderArrows();\r\n};\r\n\r\n// remove arrows and events\r\nSortableTable.prototype.uninitHeader = function () {\r\n if (!this.tHead) return;\r\n var cells = this.tHead.rows[0].cells;\r\n var l = cells.length;\r\n var c;\r\n for (var i = 0; i < l; i++) {\r\n c = cells[i];\r\n if (c._sortType != null && c._sortType != "None") {\r\n c.removeChild(c.lastChild);\r\n if (typeof c.removeEventListener != "undefined")\r\n c.removeEventListener("click", this._headerOnclick, false);\r\n else if (typeof c.detachEvent != "undefined")\r\n c.detachEvent("onclick", this._headerOnclick);\r\n c._sortType = null;\r\n c.removeAttribute( "_sortType" );\r\n }\r\n }\r\n};\r\n\r\nSortableTable.prototype.updateHeaderArrows = function () {\r\n if (!this.tHead) return;\r\n var cells = this.tHead.rows[0].cells;\r\n var l = cells.length;\r\n var img;\r\n for (var i = 0; i < l; i++) {\r\n if (cells[i]._sortType != null && cells[i]._sortType != "None") {\r\n img = cells[i].lastChild;\r\n if (i == this.sortColumn)\r\n img.className = "sort-arrow " + (this.descending ? "descending" : "ascending");\r\n else\r\n img.className = "sort-arrow";\r\n }\r\n }\r\n};\r\n\r\nSortableTable.prototype.headerOnclick = function (e) {\r\n // find TD element\r\n var el = e.target || e.srcElement;\r\n while (el.tagName != "TD")\r\n el = el.parentNode;\r\n\r\n this.sort(SortableTable.msie ? SortableTable.getCellIndex(el) : el.cellIndex);\r\n};\r\n\r\n// IE returns wrong cellIndex when columns are hidden\r\nSortableTable.getCellIndex = function (oTd) {\r\n var cells = oTd.parentNode.childNodes\r\n var l = cells.length;\r\n var i;\r\n for (i = 0; cells[i] != oTd && i < l; i++)\r\n ;\r\n return i;\r\n};\r\n\r\nSortableTable.prototype.getSortType = function (nColumn) {\r\n return this.sortTypes[nColumn] || "String";\r\n};\r\n\r\n// only nColumn is required\r\n// if bDescending is left out the old value is taken into account\r\n// if sSortType is left out the sort type is found from the sortTypes array\r\n\r\nSortableTable.prototype.sort = function (nColumn, bDescending, sSortType) {\r\n if (!this.tBody) return;\r\n if (sSortType == null)\r\n sSortType = this.getSortType(nColumn);\r\n\r\n // exit if None\r\n if (sSortType == "None")\r\n return;\r\n\r\n if (bDescending == null) {\r\n if (this.sortColumn != nColumn)\r\n this.descending = this.defaultDescending;\r\n else\r\n this.descending = !this.descending;\r\n }\r\n else\r\n this.descending = bDescending;\r\n\r\n this.sortColumn = nColumn;\r\n\r\n if (typeof this.onbeforesort == "function")\r\n this.onbeforesort();\r\n\r\n var f = this.getSortFunction(sSortType, nColumn);\r\n var a = this.getCache(sSortType, nColumn);\r\n var tBody = this.tBody;\r\n\r\n a.sort(f);\r\n\r\n if (this.descending)\r\n a.reverse();\r\n\r\n if (SortableTable.removeBeforeSort) {\r\n // remove from doc\r\n var nextSibling = tBody.nextSibling;\r\n var p = tBody.parentNode;\r\n p.removeChild(tBody);\r\n }\r\n\r\n // insert in the new order\r\n var l = a.length;\r\n for (var i = 0; i < l; i++)\r\n tBody.appendChild(a[i].element);\r\n\r\n if (SortableTable.removeBeforeSort) {\r\n // insert into doc\r\n p.insertBefore(tBody, nextSibling);\r\n }\r\n\r\n this.updateHeaderArrows();\r\n\r\n this.destroyCache(a);\r\n\r\n if (typeof this.onsort == "function")\r\n this.onsort();\r\n};\r\n\r\nSortableTable.prototype.asyncSort = function (nColumn, bDescending, sSortType) {\r\n var oThis = this;\r\n this._asyncsort = function () {\r\n oThis.sort(nColumn, bDescending, sSortType);\r\n };\r\n window.setTimeout(this._asyncsort, 1);\r\n};\r\n\r\nSortableTable.prototype.getCache = function (sType, nColumn) {\r\n if (!this.tBody) return [];\r\n var rows = this.tBody.rows;\r\n var l = rows.length;\r\n var a = new Array(l);\r\n var r;\r\n for (var i = 0; i < l; i++) {\r\n r = rows[i];\r\n a[i] = {\r\n value: this.getRowValue(r, sType, nColumn),\r\n element: r\r\n };\r\n };\r\n return a;\r\n};\r\n\r\nSortableTable.prototype.destroyCache = function (oArray) {\r\n var l = oArray.length;\r\n for (var i = 0; i < l; i++) {\r\n oArray[i].value = null;\r\n oArray[i].element = null;\r\n oArray[i] = null;\r\n }\r\n};\r\n\r\nSortableTable.prototype.getRowValue = function (oRow, sType, nColumn) {\r\n // if we have defined a custom getRowValue use that\r\n if (this._sortTypeInfo[sType] && this._sortTypeInfo[sType].getRowValue)\r\n return this._sortTypeInfo[sType].getRowValue(oRow, nColumn);\r\n\r\n var s;\r\n var c = oRow.cells[nColumn];\r\n if (typeof c.innerText != "undefined")\r\n s = c.innerText;\r\n else\r\n s = SortableTable.getInnerText(c);\r\n return this.getValueFromString(s, sType);\r\n};\r\n\r\nSortableTable.getInnerText = function (oNode) {\r\n var s = "";\r\n var cs = oNode.childNodes;\r\n var l = cs.length;\r\n for (var i = 0; i < l; i++) {\r\n switch (cs[i].nodeType) {\r\n case 1: //ELEMENT_NODE\r\n s += SortableTable.getInnerText(cs[i]);\r\n break;\r\n case 3: //TEXT_NODE\r\n s += cs[i].nodeValue;\r\n break;\r\n }\r\n }\r\n return s;\r\n};\r\n\r\nSortableTable.prototype.getValueFromString = function (sText, sType) {\r\n if (this._sortTypeInfo[sType])\r\n return this._sortTypeInfo[sType].getValueFromString( sText );\r\n return sText;\r\n /*\r\n switch (sType) {\r\n case "Number":\r\n return Number(sText);\r\n case "CaseInsensitiveString":\r\n return sText.toUpperCase();\r\n case "Date":\r\n var parts = sText.split("-");\r\n var d = new Date(0);\r\n d.setFullYear(parts[0]);\r\n d.setDate(parts[2]);\r\n d.setMonth(parts[1] - 1);\r\n return d.valueOf();\r\n }\r\n return sText;\r\n */\r\n };\r\n\r\nSortableTable.prototype.getSortFunction = function (sType, nColumn) {\r\n if (this._sortTypeInfo[sType])\r\n return this._sortTypeInfo[sType].compare;\r\n return SortableTable.basicCompare;\r\n};\r\n\r\nSortableTable.prototype.destroy = function () {\r\n this.uninitHeader();\r\n var win = this.document.parentWindow;\r\n if (win && typeof win.detachEvent != "undefined") { // only IE needs this\r\n win.detachEvent("onunload", this._onunload);\r\n }\r\n this._onunload = null;\r\n this.element = null;\r\n this.tHead = null;\r\n this.tBody = null;\r\n this.document = null;\r\n this._headerOnclick = null;\r\n this.sortTypes = null;\r\n this._asyncsort = null;\r\n this.onsort = null;\r\n};\r\n\r\n// Adds a sort type to all instance of SortableTable\r\n// sType : String - the identifier of the sort type\r\n// fGetValueFromString : function ( s : string ) : T - A function that takes a\r\n// string and casts it to a desired format. If left out the string is just\r\n// returned\r\n// fCompareFunction : function ( n1 : T, n2 : T ) : Number - A normal JS sort\r\n// compare function. Takes two values and compares them. If left out less than,\r\n// <, compare is used\r\n// fGetRowValue : function( oRow : HTMLTRElement, nColumn : int ) : T - A function\r\n// that takes the row and the column index and returns the value used to compare.\r\n// If left out then the innerText is first taken for the cell and then the\r\n// fGetValueFromString is used to convert that string the desired value and type\r\n\r\nSortableTable.prototype.addSortType = function (sType, fGetValueFromString, fCompareFunction, fGetRowValue) {\r\n this._sortTypeInfo[sType] = {\r\n type: sType,\r\n getValueFromString: fGetValueFromString || SortableTable.idFunction,\r\n compare: fCompareFunction || SortableTable.basicCompare,\r\n getRowValue: fGetRowValue\r\n };\r\n};\r\n\r\n// this removes the sort type from all instances of SortableTable\r\nSortableTable.prototype.removeSortType = function (sType) {\r\n delete this._sortTypeInfo[sType];\r\n};\r\n\r\nSortableTable.basicCompare = function compare(n1, n2) {\r\n if (n1.value < n2.value)\r\n return -1;\r\n if (n2.value < n1.value)\r\n return 1;\r\n return 0;\r\n};\r\n\r\nSortableTable.idFunction = function (x) {\r\n return x;\r\n};\r\n\r\nSortableTable.toUpperCase = function (s) {\r\n return s.toUpperCase();\r\n};\r\n\r\nSortableTable.toDate = function (s) {\r\n var parts = s.split("-");\r\n var d = new Date(0);\r\n d.setFullYear(parts[0]);\r\n d.setDate(parts[2]);\r\n d.setMonth(parts[1] - 1);\r\n return d.valueOf();\r\n};\r\n\r\n\r\n// add sort types\r\nSortableTable.prototype.addSortType("Number", Number);\r\nSortableTable.prototype.addSortType("CaseInsensitiveString", SortableTable.toUpperCase);\r\nSortableTable.prototype.addSortType("Date", SortableTable.toDate);\r\nSortableTable.prototype.addSortType("String");\r\n// None is a special case\r\n'}}); \ No newline at end of file +webpackJsonp([1],{24:function(t,e,s){function i(t){return s(n(t))}function n(t){return l[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}var l={"./array":6,"./array.js":6,"./cookie":4,"./cookie.js":4,"./date":7,"./date.js":7,"./dom":2,"./dom.js":2,"./event":1,"./event.js":1,"./extensions/advancedGrid/adapterEzEditTable":25,"./extensions/advancedGrid/adapterEzEditTable.js":25,"./extensions/advancedGrid/advancedGrid":26,"./extensions/advancedGrid/advancedGrid.js":26,"./extensions/colOps/colOps":27,"./extensions/colOps/colOps.js":27,"./extensions/colsVisibility/colsVisibility":28,"./extensions/colsVisibility/colsVisibility.js":28,"./extensions/filtersVisibility/filtersVisibility":29,"./extensions/filtersVisibility/filtersVisibility.js":29,"./extensions/sort/adapterSortabletable":30,"./extensions/sort/adapterSortabletable.js":30,"./extensions/sort/sort":31,"./extensions/sort/sort.js":31,"./helpers":8,"./helpers.js":8,"./modules/alternateRows":23,"./modules/alternateRows.js":23,"./modules/checkList":17,"./modules/checkList.js":17,"./modules/clearButton":21,"./modules/clearButton.js":21,"./modules/dropdown":15,"./modules/dropdown.js":15,"./modules/feature":11,"./modules/feature.js":11,"./modules/gridLayout":10,"./modules/gridLayout.js":10,"./modules/help":22,"./modules/help.js":22,"./modules/highlightKeywords":13,"./modules/highlightKeywords.js":13,"./modules/loader":12,"./modules/loader.js":12,"./modules/paging":20,"./modules/paging.js":20,"./modules/popupFilter":14,"./modules/popupFilter.js":14,"./modules/rowsCounter":18,"./modules/rowsCounter.js":18,"./modules/statusBar":19,"./modules/statusBar.js":19,"./modules/store":9,"./modules/store.js":9,"./sort":16,"./sort.js":16,"./string":3,"./string.js":3,"./types":5,"./types.js":5};i.keys=function(){return Object.keys(l)},i.resolve=n,t.exports=i,i.id=24},25:function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var s=0;s0&&!s.startRow?void 0:s.startRow||e.refRow,s.base_path=s.base_path||e.basePath+"ezEditTable/";var n=s.editable,l=s.selection;l&&(s.default_selection=s.default_selection||"row"),s.active_cell_css=s.active_cell_css||"ezETSelectedCell";var a=0,o=0;if(l){var h=function(t,s,i){var n=t.Selection,l=function(i){if("row"===t.defaultSelection)n.SelectRowByIndex(i);else{t.ClearSelections();var l=s.cellIndex,a=e.tbl.rows[i];"both"===t.defaultSelection&&n.SelectRowByIndex(i),a&&n.SelectCell(a.cells[l])}if(e.validRowsIndex.length!==e.getRowsNb()){var r=e.tbl.rows[i];r&&r.scrollIntoView(!1),c&&(c.cellIndex===e.getCellsNb()-1&&e.gridLayout?e.tblCont.scrollLeft=1e8:0===c.cellIndex&&e.gridLayout?e.tblCont.scrollLeft=0:c.scrollIntoView(!1))}};if(e.validRowsIndex){var r,h=e.validRowsIndex,d=h.length,u="row"!==t.defaultSelection?s.parentNode:s,c="TD"===s.nodeName?s:null,f=void 0!==i?t.Event.GetKey(i):0,p=-1!==h.indexOf(u.rowIndex),g=e.feature("paging"),v=34===f||33===f?g&&g.pagingLength||t.nbRowsPerPage:1;if(p)34!==f&&33!==f?(a=h.indexOf(u.rowIndex),o=u.rowIndex):(r=34===f?d-1>=a+v?h[a+v]:[d-1]:a-v<=h[0]?h[0]:h[a-v],o=r,a=h.indexOf(r),l(r));else{if(u.rowIndex>o)if(u.rowIndex>=h[d-1])r=h[d-1];else{var b=a+v;r=b>d-1?h[d-1]:h[b]}else if(u.rowIndex<=h[0])r=h[0];else{var m=h[a-v];r=m?m:h[0]}o=u.rowIndex,l(r)}}},d=function(t,s){var i="row"!==t.defaultSelection?s.parentNode:s;if(e.paging&&e.feature("paging").nbPages>1){var n=e.feature("paging");t.nbRowsPerPage=n.pagingLength;var l=e.validRowsIndex,a=l.length,r=parseInt(n.startPagingRow,10)+parseInt(n.pagingLength,10),o=i.rowIndex;o===l[a-1]&&n.currentPageNb!==n.nbPages?n.setPage("last"):o==l[0]&&1!==n.currentPageNb?n.setPage("first"):o>l[r-1]&&ol[0]&&n.setPage("previous")}};if(e.paging&&(e.feature("paging").onAfterChangePage=function(t){var e=t.tf.extension("advancedGrid"),s=e._ezEditTable,i=s.Selection,n=i.GetActiveRow();n&&n.scrollIntoView(!1);var l=i.GetActiveCell();l&&l.scrollIntoView(!1)}),"row"===s.default_selection){var u=s.on_before_selected_row;s.on_before_selected_row=function(){d(arguments[0],arguments[1],arguments[2]),u&&u.call(null,arguments[0],arguments[1],arguments[2])};var c=s.on_after_selected_row;s.on_after_selected_row=function(){h(arguments[0],arguments[1],arguments[2]),c&&c.call(null,arguments[0],arguments[1],arguments[2])}}else{var f=s.on_before_selected_cell;s.on_before_selected_cell=function(){d(arguments[0],arguments[1],arguments[2]),f&&f.call(null,arguments[0],arguments[1],arguments[2])};var p=s.on_after_selected_cell;s.on_after_selected_cell=function(){h(arguments[0],arguments[1],arguments[2]),p&&p.call(null,arguments[0],arguments[1],arguments[2])}}}if(n){var g=s.on_added_dom_row;if(s.on_added_dom_row=function(){e.nbFilterableRows++,e.paging?(e.nbRows++,e.nbVisibleRows++,e.nbFilterableRows++,e.paging=!1,e.feature("paging").destroy(),e.feature("paging").reset()):e.feature("rowsCounter").refresh(),e.alternateRows&&e.feature("alternateRows").init(),g&&g.call(null,arguments[0],arguments[1],arguments[2])},s.actions&&s.actions["delete"]){var v=s.actions["delete"].on_after_submit;s.actions["delete"].on_after_submit=function(){e.nbFilterableRows--,e.paging?(e.nbRows--,e.nbVisibleRows--,e.nbFilterableRows--,e.paging=!1,e.feature("paging").destroy(),e.feature("paging").reset(!1)):e.feature("rowsCounter").refresh(),e.alternateRows&&e.feature("alternateRows").init(),v&&v.call(null,arguments[0],arguments[1])}}}try{this._ezEditTable=new EditTable(e.id,s,t),this._ezEditTable.Init()}catch(b){throw new Error(this.err)}this.initialized=!0}},{key:"reset",value:function(){var t=this._ezEditTable;t&&(this.cfg.selection&&t.Selection.Set(),this.cfg.editable&&t.Editable.Set())}},{key:"destroy",value:function(){var t=this._ezEditTable;t&&(this.cfg.selection&&(t.Selection.ClearSelections(),t.Selection.Remove()),this.cfg.editable&&t.Editable.Remove()),this.initialized=!1}}]),t}();e["default"]=o,t.exports=e["default"]},26:function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var n=s(25),l=i(n);e["default"]=l["default"],t.exports=e["default"]},27:function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function t(t,e){for(var s=0;s=jj;jj++)ucolIndex[jj]===colIndex[ii]&&(saved=1);0===saved&&(ucolMax++,ucolIndex[ucolMax]=colIndex[ii])}if("object"==_string2["default"].lower(typeof labelId)&&"object"==_string2["default"].lower(typeof colIndex)&&"object"==_string2["default"].lower(typeof operation))for(var rows=tf.tbl.rows,colvalues=[],ucol=0;ucolMax>=ucol;ucol++){colvalues.push(tf.getColValues(ucolIndex[ucol],!1,!0,excludeRow));for(var result,nbvalues=0,temp,meanValue=0,sumValue=0,minValue=null,maxValue=null,q1Value=null,medValue=null,q3Value=null,meanFlag=0,sumFlag=0,minFlag=0,maxFlag=0,q1Flag=0,medFlag=0,q3Flag=0,theList=[],opsThisCol=[],decThisCol=[],labThisCol=[],oTypeThisCol=[],mThisCol=-1,k=0;kmaxValue?parseFloat(cvalue):maxValue))}if(1===meanFlag&&(meanValue=sumValue/nbvalues),1===medFlag){var aux=0;nbvalues%2===1?(aux=Math.floor(nbvalues/2),medValue=theList[aux]):medValue=(theList[nbvalues/2]+theList[nbvalues/2-1])/2}var posa;if(1===q1Flag&&(posa=0,posa=Math.floor(nbvalues/4),q1Value=4*posa==nbvalues?(theList[posa-1]+theList[posa])/2:theList[posa]),1===q3Flag){posa=0;var posb=0;posa=Math.floor(nbvalues/4),4*posa===nbvalues?(posb=3*posa,q3Value=(theList[posb]+theList[posb-1])/2):q3Value=theList[nbvalues-posa-1]}for(var i=0;mThisCol>=i;i++){switch(opsThisCol[i]){case"mean":result=meanValue;break;case"sum":result=sumValue;break;case"min":result=minValue;break;case"max":result=maxValue;break;case"median":result=medValue;break;case"q1":result=q1Value;break;case"q3":result=q3Value}var precision=isNaN(decThisCol[i])?2:decThisCol[i];if(oTypeThisCol&&result){if(result=result.toFixed(precision),_dom2["default"].id(labThisCol[i]))switch(_string2["default"].lower(oTypeThisCol)){case"innerhtml":isNaN(result)||!isFinite(result)||0===nbvalues?_dom2["default"].id(labThisCol[i]).innerHTML=".":_dom2["default"].id(labThisCol[i]).innerHTML=result;break;case"setvalue":_dom2["default"].id(labThisCol[i]).value=result;break;case"createtextnode":var oldnode=_dom2["default"].id(labThisCol[i]).firstChild,txtnode=_dom2["default"].text(result);_dom2["default"].id(labThisCol[i]).replaceChild(txtnode,oldnode)}}else try{isNaN(result)||!isFinite(result)||0===nbvalues?_dom2["default"].id(labThisCol[i]).innerHTML=".":_dom2["default"].id(labThisCol[i]).innerHTML=result.toFixed(precision)}catch(e){}}var totRow=totRowIndex&&totRowIndex[ucol]?rows[totRowIndex[ucol]]:null;totRow&&(totRow.style.display="")}this.onAfterOperation&&this.onAfterOperation.call(null,tf)}}},{key:"destroy",value:function(){}}]),ColOps}();exports["default"]=ColOps,module.exports=exports["default"]},28:function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var s=0;s0,this.onLoaded=h["default"].isFn(s.on_loaded)?s.on_loaded:null,this.onBeforeOpen=h["default"].isFn(s.on_before_open)?s.on_before_open:null,this.onAfterOpen=h["default"].isFn(s.on_after_open)?s.on_after_open:null,this.onBeforeClose=h["default"].isFn(s.on_before_close)?s.on_before_close:null,this.onAfterClose=h["default"].isFn(s.on_after_close)?s.on_after_close:null,this.onBeforeColHidden=h["default"].isFn(s.on_before_col_hidden)?s.on_before_col_hidden:null,this.onAfterColHidden=h["default"].isFn(s.on_after_col_hidden)?s.on_after_col_hidden:null,this.onBeforeColDisplayed=h["default"].isFn(s.on_before_col_displayed)?s.on_before_col_displayed:null,this.onAfterColDisplayed=h["default"].isFn(s.on_after_col_displayed)?s.on_after_col_displayed:null,e.gridLayout&&(this.headersTbl=e.feature("gridLayout").headTbl,this.headersIndex=0,this.onAfterColDisplayed=function(){},this.onAfterColHidden=function(){}),e["import"](s.name+"Style",e.stylePath+this.stylesheet,null,"link"),this.tf=e}return l(t,[{key:"toggle",value:function(){var t=this.contEl.style.display,e=this.onBeforeOpen,s=this.onBeforeClose,i=this.onAfterOpen,n=this.onAfterClose;e&&"inline"!==t&&e.call(null,this),s&&"inline"===t&&s.call(null,this),this.contEl.style.display="inline"===t?"none":"inline",i&&"inline"!==t&&i.call(null,this),n&&"inline"===t&&n.call(null,this)}},{key:"checkItem",value:function(t){var e=t.parentNode;if(e&&t){var s=t.firstChild.checked,i=t.firstChild.getAttribute("id").split("_")[1];i=parseInt(i,10),s?r["default"].addClass(e,this.listSlcItemCssClass):r["default"].removeClass(e,this.listSlcItemCssClass);var n=!1;(this.tickToHide&&s||!this.tickToHide&&!s)&&(n=!0),this.setHidden(i,n)}}},{key:"init",value:function(){this.manager&&(this.buildBtn(),this.buildManager(),this.initialized=!0)}},{key:"buildBtn",value:function(){var t=this;if(!this.btnEl){var e=this.tf,s=r["default"].create("span",["id",this.prfx+e.id]);s.className=this.spanCssClass,this.btnTgtId||e.setToolbar();var i=this.btnTgtId?r["default"].id(this.btnTgtId):e.rDiv;if(this.btnTgtId)i.appendChild(s);else{var n=i.firstChild;n.parentNode.insertBefore(s,n)}if(this.btnHtml){s.innerHTML=this.btnHtml;var l=s.firstChild;this.enableHover?u["default"].add(l,"mouseover",function(e){t.toggle(e)}):u["default"].add(l,"click",function(e){t.toggle(e)})}else{var a=r["default"].create("a",["href","javascript:;"]);a.className=this.btnCssClass,a.title=this.desc,a.innerHTML=this.btnText,s.appendChild(a),this.enableHover?u["default"].add(a,"mouseover",function(e){t.toggle(e)}):u["default"].add(a,"click",function(e){t.toggle(e)})}this.spanEl=s,this.btnEl=this.spanEl.firstChild,this.onLoaded&&this.onLoaded.call(null,this)}}},{key:"buildManager",value:function(){var t=this,e=this.tf,s=this.contElTgtId?r["default"].id(this.contElTgtId):r["default"].create("div",["id",this.prfxCont+e.id]);s.className=this.contCssClass;var i=r["default"].create("p");i.innerHTML=this.text,s.appendChild(i);var n=r["default"].create("ul",["id","ul"+this.name+"_"+e.id]);n.className=this.listCssClass;var l=this.headersTbl?this.headersTbl:e.tbl,a=this.headersTbl?this.headersIndex:e.getHeadersRowIndex(),o=l.rows[a];if(this.enableTickAll){var h=r["default"].createCheckItem("col__"+e.id,this.tickAllText,this.tickAllText);r["default"].addClass(h,this.listItemCssClass),n.appendChild(h),h.check.checked=!this.tickToHide,u["default"].add(h.check,"click",function(){for(var t=0;t',this.icnCollapseHtml='Collapse filters',this.defaultText="Toggle filters",this.targetId=s.target_id||null,this.enableIcon=s.enable_icon===!1?!1:!0,this.btnText=s.btn_text||"",this.collapseBtnHtml=this.enableIcon?this.icnCollapseHtml+this.btnText:this.btnText||this.defaultText,this.expandBtnHtml=this.enableIcon?this.icnExpandHtml+this.btnText:this.btnText||this.defaultText,this.btnHtml=s.btn_html||null,this.btnCssClass=s.btn_css_class||"btnExpClpFlt",this.contCssClass=s.cont_css_class||"expClpFlt",this.filtersRowIndex=h["default"].isUndef(s.filters_row_index)?e.getFiltersRowIndex():s.filters_row_index,this.visibleAtStart=h["default"].isUndef(s.visible_at_start)?!0:Boolean(s.visible_at_start),this.prfx="fltsVis_",this.onBeforeShow=h["default"].isFn(s.on_before_show)?s.on_before_show:null,this.onAfterShow=h["default"].isFn(s.on_after_show)?s.on_after_show:null,this.onBeforeHide=h["default"].isFn(s.on_before_hide)?s.on_before_hide:null,this.onAfterHide=h["default"].isFn(s.on_after_hide)?s.on_after_hide:null,e["import"](s.name+"Style",e.stylePath+this.stylesheet,null,"link"),this.tf=e}return l(t,[{key:"init",value:function(){this.initialized||(this.buildUI(),this.initialized=!0)}},{key:"buildUI",value:function(){var t=this,e=this.tf,s=r["default"].create("span",["id",this.prfx+e.id]);s.className=this.contCssClass,this.targetId||e.setToolbar();var i=this.targetId?r["default"].id(this.targetId):e.rDiv;if(this.targetId)i.appendChild(s);else{var n=i.firstChild;n.parentNode.insertBefore(s,n)}var l=void 0;this.btnHtml?(s.innerHTML=this.btnHtml,l=s.firstChild):(l=r["default"].create("a",["href","javascript:void(0);"]),l.className=this.btnCssClass,l.title=this.btnText||this.defaultText,l.innerHTML=this.collapseBtnHtml,s.appendChild(l)),u["default"].add(l,"click",function(){return t.toggle()}),this.contEl=s,this.btnEl=l,this.visibleAtStart||this.toggle()}},{key:"toggle",value:function(){var t=this.tf,e=t.gridLayout?t.feature("gridLayout").headTbl:t.tbl,s=e.rows[this.filtersRowIndex],i=s.style.display;this.onBeforeShow&&""!==i&&this.onBeforeShow.call(this,this),this.onBeforeHide&&""===i&&this.onBeforeHide.call(null,this),s.style.display=""===i?"none":"",this.enableIcon&&!this.btnHtml&&(this.btnEl.innerHTML=""===i?this.expandBtnHtml:this.collapseBtnHtml),this.onAfterShow&&""!==i&&this.onAfterShow.call(null,this),this.onAfterHide&&""===i&&this.onAfterHide.call(null,this)}},{key:"destroy",value:function(){(this.btnEl||this.contEl)&&(this.btnEl.innerHTML="",this.btnEl.parentNode.removeChild(this.btnEl),this.btnEl=null,this.contEl.innerHTML="",this.contEl.parentNode.removeChild(this.contEl),this.contEl=null,this.initialized=!1)}}]),t}();e["default"]=c,t.exports=e["default"]},30:function(t,e,s){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t){return x["default"].removeNbFormat(t,"us")}function a(t){return x["default"].removeNbFormat(t,"eu")}function r(t,e){return w["default"].format(t,e)}function o(t){return r(t,"DMY")}function h(t){return r(t,"MDY")}function d(t){return r(t,"YMD")}function u(t){return r(t,"DDMMMYYYY")}function c(t){var e=t.split(".");for(var s in e){for(var i=e[s];3>i.length;)i="0"+i;e[s]=i}return e.join(".")}function f(t,e){var s=c(t.value.toLowerCase()),i=c(e.value.toLowerCase());return s==i?0:i>s?-1:1}Object.defineProperty(e,"__esModule",{value:!0});var p=function(){function t(t,e){for(var s=0;si;i++);return i},SortableTable.prototype.initHeader=function(s){var i=this;if(!i.tHead){if(!e.gridLayout)return;i.tHead=e.feature("gridLayout").headTbl.tHead}i.headersRow=e.headersRow;var n=i.tHead.rows[i.headersRow].cells;i.sortTypes=s||[];for(var l=n.length,a=void 0,r=void 0,o=0;l>o;o++)r=n[o],null!==i.sortTypes[o]&&"None"!==i.sortTypes[o]?(r.style.cursor="pointer",a=m["default"].create("img",["src",t.imgPath+t.imgBlank]),r.appendChild(a),null!==i.sortTypes[o]&&r.setAttribute("_sortType",i.sortTypes[o]),_["default"].add(r,"click",i._headerOnclick)):(r.setAttribute("_sortType",s[o]),r._sortType="None");i.updateHeaderArrows()},SortableTable.prototype.updateHeaderArrows=function(){var e=this,s=void 0,i=void 0,n=void 0;if(t.asyncSort&&t.triggerIds.length>0){var l=t.triggerIds;s=[],i=l.length;for(var a=0;ar;r++){var o=s[r].getAttribute("_sortType");null!==o&&"None"!==o&&(n=s[r].lastChild||s[r],"img"!==n.nodeName.toLowerCase()&&(n=m["default"].create("img",["src",t.imgPath+t.imgBlank]),s[r].appendChild(n)),r===e.sortColumn?n.className=t.imgClassName+" "+(this.descending?t.imgDescClassName:t.imgAscClassName):n.className=t.imgClassName)}},SortableTable.prototype.getRowValue=function(t,e,s){var i=this,n=i._sortTypeInfo[e];if(n&&n.getRowValue)return n.getRowValue(t,s);var l=t.cells[s],a=SortableTable.getInnerText(l);return i.getValueFromString(a,e)},SortableTable.getInnerText=function(e){return e?e.getAttribute(t.customKey)?e.getAttribute(t.customKey):m["default"].getText(e):void 0}}},{key:"addSortType",value:function(){var t=arguments;SortableTable.prototype.addSortType(t[0],t[1],t[2],t[3])}},{key:"setSortTypes",value:function(){for(var t=this,e=this.tf,s=this.sortTypes,i=[],n=0;n0&&!function(){for(var e=t.triggerIds,s=0;s descending, false -> ascending\r\nSortableTable.prototype.defaultDescending = false;\r\n\r\n// shared between all instances. This is intentional to allow external files\r\n// to modify the prototype\r\nSortableTable.prototype._sortTypeInfo = {};\r\n\r\nSortableTable.prototype.setTable = function (oTable) {\r\n if ( this.tHead )\r\n this.uninitHeader();\r\n this.element = oTable;\r\n this.setTHead( oTable.tHead );\r\n this.setTBody( oTable.tBodies[0] );\r\n};\r\n\r\nSortableTable.prototype.setTHead = function (oTHead) {\r\n if (this.tHead && this.tHead != oTHead )\r\n this.uninitHeader();\r\n this.tHead = oTHead;\r\n this.initHeader( this.sortTypes );\r\n};\r\n\r\nSortableTable.prototype.setTBody = function (oTBody) {\r\n this.tBody = oTBody;\r\n};\r\n\r\nSortableTable.prototype.setSortTypes = function ( oSortTypes ) {\r\n if ( this.tHead )\r\n this.uninitHeader();\r\n this.sortTypes = oSortTypes || [];\r\n if ( this.tHead )\r\n this.initHeader( this.sortTypes );\r\n};\r\n\r\n// adds arrow containers and events\r\n// also binds sort type to the header cells so that reordering columns does\r\n// not break the sort types\r\nSortableTable.prototype.initHeader = function (oSortTypes) {\r\n if (!this.tHead) return;\r\n var cells = this.tHead.rows[0].cells;\r\n var doc = this.tHead.ownerDocument || this.tHead.document;\r\n this.sortTypes = oSortTypes || [];\r\n var l = cells.length;\r\n var img, c;\r\n for (var i = 0; i < l; i++) {\r\n c = cells[i];\r\n if (this.sortTypes[i] != null && this.sortTypes[i] != "None") {\r\n img = doc.createElement("IMG");\r\n img.src = "images/blank.png";\r\n c.appendChild(img);\r\n if (this.sortTypes[i] != null)\r\n c._sortType = this.sortTypes[i];\r\n if (typeof c.addEventListener != "undefined")\r\n c.addEventListener("click", this._headerOnclick, false);\r\n else if (typeof c.attachEvent != "undefined")\r\n c.attachEvent("onclick", this._headerOnclick);\r\n else\r\n c.onclick = this._headerOnclick;\r\n }\r\n else\r\n {\r\n c.setAttribute( "_sortType", oSortTypes[i] );\r\n c._sortType = "None";\r\n }\r\n }\r\n this.updateHeaderArrows();\r\n};\r\n\r\n// remove arrows and events\r\nSortableTable.prototype.uninitHeader = function () {\r\n if (!this.tHead) return;\r\n var cells = this.tHead.rows[0].cells;\r\n var l = cells.length;\r\n var c;\r\n for (var i = 0; i < l; i++) {\r\n c = cells[i];\r\n if (c._sortType != null && c._sortType != "None") {\r\n c.removeChild(c.lastChild);\r\n if (typeof c.removeEventListener != "undefined")\r\n c.removeEventListener("click", this._headerOnclick, false);\r\n else if (typeof c.detachEvent != "undefined")\r\n c.detachEvent("onclick", this._headerOnclick);\r\n c._sortType = null;\r\n c.removeAttribute( "_sortType" );\r\n }\r\n }\r\n};\r\n\r\nSortableTable.prototype.updateHeaderArrows = function () {\r\n if (!this.tHead) return;\r\n var cells = this.tHead.rows[0].cells;\r\n var l = cells.length;\r\n var img;\r\n for (var i = 0; i < l; i++) {\r\n if (cells[i]._sortType != null && cells[i]._sortType != "None") {\r\n img = cells[i].lastChild;\r\n if (i == this.sortColumn)\r\n img.className = "sort-arrow " + (this.descending ? "descending" : "ascending");\r\n else\r\n img.className = "sort-arrow";\r\n }\r\n }\r\n};\r\n\r\nSortableTable.prototype.headerOnclick = function (e) {\r\n // find TD element\r\n var el = e.target || e.srcElement;\r\n while (el.tagName != "TD")\r\n el = el.parentNode;\r\n\r\n this.sort(SortableTable.msie ? SortableTable.getCellIndex(el) : el.cellIndex);\r\n};\r\n\r\n// IE returns wrong cellIndex when columns are hidden\r\nSortableTable.getCellIndex = function (oTd) {\r\n var cells = oTd.parentNode.childNodes\r\n var l = cells.length;\r\n var i;\r\n for (i = 0; cells[i] != oTd && i < l; i++)\r\n ;\r\n return i;\r\n};\r\n\r\nSortableTable.prototype.getSortType = function (nColumn) {\r\n return this.sortTypes[nColumn] || "String";\r\n};\r\n\r\n// only nColumn is required\r\n// if bDescending is left out the old value is taken into account\r\n// if sSortType is left out the sort type is found from the sortTypes array\r\n\r\nSortableTable.prototype.sort = function (nColumn, bDescending, sSortType) {\r\n if (!this.tBody) return;\r\n if (sSortType == null)\r\n sSortType = this.getSortType(nColumn);\r\n\r\n // exit if None\r\n if (sSortType == "None")\r\n return;\r\n\r\n if (bDescending == null) {\r\n if (this.sortColumn != nColumn)\r\n this.descending = this.defaultDescending;\r\n else\r\n this.descending = !this.descending;\r\n }\r\n else\r\n this.descending = bDescending;\r\n\r\n this.sortColumn = nColumn;\r\n\r\n if (typeof this.onbeforesort == "function")\r\n this.onbeforesort();\r\n\r\n var f = this.getSortFunction(sSortType, nColumn);\r\n var a = this.getCache(sSortType, nColumn);\r\n var tBody = this.tBody;\r\n\r\n a.sort(f);\r\n\r\n if (this.descending)\r\n a.reverse();\r\n\r\n if (SortableTable.removeBeforeSort) {\r\n // remove from doc\r\n var nextSibling = tBody.nextSibling;\r\n var p = tBody.parentNode;\r\n p.removeChild(tBody);\r\n }\r\n\r\n // insert in the new order\r\n var l = a.length;\r\n for (var i = 0; i < l; i++)\r\n tBody.appendChild(a[i].element);\r\n\r\n if (SortableTable.removeBeforeSort) {\r\n // insert into doc\r\n p.insertBefore(tBody, nextSibling);\r\n }\r\n\r\n this.updateHeaderArrows();\r\n\r\n this.destroyCache(a);\r\n\r\n if (typeof this.onsort == "function")\r\n this.onsort();\r\n};\r\n\r\nSortableTable.prototype.asyncSort = function (nColumn, bDescending, sSortType) {\r\n var oThis = this;\r\n this._asyncsort = function () {\r\n oThis.sort(nColumn, bDescending, sSortType);\r\n };\r\n window.setTimeout(this._asyncsort, 1);\r\n};\r\n\r\nSortableTable.prototype.getCache = function (sType, nColumn) {\r\n if (!this.tBody) return [];\r\n var rows = this.tBody.rows;\r\n var l = rows.length;\r\n var a = new Array(l);\r\n var r;\r\n for (var i = 0; i < l; i++) {\r\n r = rows[i];\r\n a[i] = {\r\n value: this.getRowValue(r, sType, nColumn),\r\n element: r\r\n };\r\n };\r\n return a;\r\n};\r\n\r\nSortableTable.prototype.destroyCache = function (oArray) {\r\n var l = oArray.length;\r\n for (var i = 0; i < l; i++) {\r\n oArray[i].value = null;\r\n oArray[i].element = null;\r\n oArray[i] = null;\r\n }\r\n};\r\n\r\nSortableTable.prototype.getRowValue = function (oRow, sType, nColumn) {\r\n // if we have defined a custom getRowValue use that\r\n if (this._sortTypeInfo[sType] && this._sortTypeInfo[sType].getRowValue)\r\n return this._sortTypeInfo[sType].getRowValue(oRow, nColumn);\r\n\r\n var s;\r\n var c = oRow.cells[nColumn];\r\n if (typeof c.innerText != "undefined")\r\n s = c.innerText;\r\n else\r\n s = SortableTable.getInnerText(c);\r\n return this.getValueFromString(s, sType);\r\n};\r\n\r\nSortableTable.getInnerText = function (oNode) {\r\n var s = "";\r\n var cs = oNode.childNodes;\r\n var l = cs.length;\r\n for (var i = 0; i < l; i++) {\r\n switch (cs[i].nodeType) {\r\n case 1: //ELEMENT_NODE\r\n s += SortableTable.getInnerText(cs[i]);\r\n break;\r\n case 3: //TEXT_NODE\r\n s += cs[i].nodeValue;\r\n break;\r\n }\r\n }\r\n return s;\r\n};\r\n\r\nSortableTable.prototype.getValueFromString = function (sText, sType) {\r\n if (this._sortTypeInfo[sType])\r\n return this._sortTypeInfo[sType].getValueFromString( sText );\r\n return sText;\r\n /*\r\n switch (sType) {\r\n case "Number":\r\n return Number(sText);\r\n case "CaseInsensitiveString":\r\n return sText.toUpperCase();\r\n case "Date":\r\n var parts = sText.split("-");\r\n var d = new Date(0);\r\n d.setFullYear(parts[0]);\r\n d.setDate(parts[2]);\r\n d.setMonth(parts[1] - 1);\r\n return d.valueOf();\r\n }\r\n return sText;\r\n */\r\n };\r\n\r\nSortableTable.prototype.getSortFunction = function (sType, nColumn) {\r\n if (this._sortTypeInfo[sType])\r\n return this._sortTypeInfo[sType].compare;\r\n return SortableTable.basicCompare;\r\n};\r\n\r\nSortableTable.prototype.destroy = function () {\r\n this.uninitHeader();\r\n var win = this.document.parentWindow;\r\n if (win && typeof win.detachEvent != "undefined") { // only IE needs this\r\n win.detachEvent("onunload", this._onunload);\r\n }\r\n this._onunload = null;\r\n this.element = null;\r\n this.tHead = null;\r\n this.tBody = null;\r\n this.document = null;\r\n this._headerOnclick = null;\r\n this.sortTypes = null;\r\n this._asyncsort = null;\r\n this.onsort = null;\r\n};\r\n\r\n// Adds a sort type to all instance of SortableTable\r\n// sType : String - the identifier of the sort type\r\n// fGetValueFromString : function ( s : string ) : T - A function that takes a\r\n// string and casts it to a desired format. If left out the string is just\r\n// returned\r\n// fCompareFunction : function ( n1 : T, n2 : T ) : Number - A normal JS sort\r\n// compare function. Takes two values and compares them. If left out less than,\r\n// <, compare is used\r\n// fGetRowValue : function( oRow : HTMLTRElement, nColumn : int ) : T - A function\r\n// that takes the row and the column index and returns the value used to compare.\r\n// If left out then the innerText is first taken for the cell and then the\r\n// fGetValueFromString is used to convert that string the desired value and type\r\n\r\nSortableTable.prototype.addSortType = function (sType, fGetValueFromString, fCompareFunction, fGetRowValue) {\r\n this._sortTypeInfo[sType] = {\r\n type: sType,\r\n getValueFromString: fGetValueFromString || SortableTable.idFunction,\r\n compare: fCompareFunction || SortableTable.basicCompare,\r\n getRowValue: fGetRowValue\r\n };\r\n};\r\n\r\n// this removes the sort type from all instances of SortableTable\r\nSortableTable.prototype.removeSortType = function (sType) {\r\n delete this._sortTypeInfo[sType];\r\n};\r\n\r\nSortableTable.basicCompare = function compare(n1, n2) {\r\n if (n1.value < n2.value)\r\n return -1;\r\n if (n2.value < n1.value)\r\n return 1;\r\n return 0;\r\n};\r\n\r\nSortableTable.idFunction = function (x) {\r\n return x;\r\n};\r\n\r\nSortableTable.toUpperCase = function (s) {\r\n return s.toUpperCase();\r\n};\r\n\r\nSortableTable.toDate = function (s) {\r\n var parts = s.split("-");\r\n var d = new Date(0);\r\n d.setFullYear(parts[0]);\r\n d.setDate(parts[2]);\r\n d.setMonth(parts[1] - 1);\r\n return d.valueOf();\r\n};\r\n\r\n\r\n// add sort types\r\nSortableTable.prototype.addSortType("Number", Number);\r\nSortableTable.prototype.addSortType("CaseInsensitiveString", SortableTable.toUpperCase);\r\nSortableTable.prototype.addSortType("Date", SortableTable.toDate);\r\nSortableTable.prototype.addSortType("String");\r\n// None is a special case\r\n'}}); \ No newline at end of file diff --git a/package.json b/package.json index f1e73477..ee0ae74e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tablefilter", - "version": "0.0.11", + "version": "0.0.12", "description": "A Javascript library making HTML tables filterable and a bit more", "license": "MIT", "author": { diff --git a/src/extensions/sort/adapterSortabletable.js b/src/extensions/sort/adapterSortabletable.js index 9b5e1993..914a7c4d 100644 --- a/src/extensions/sort/adapterSortabletable.js +++ b/src/extensions/sort/adapterSortabletable.js @@ -15,9 +15,6 @@ export default class AdapterSortableTable{ this.name = opts.name; this.desc = opts.description || 'Sortable table'; - //indicates if paging is enabled - this.isPaged = false; - //indicates if tables was sorted this.sorted = false; @@ -91,9 +88,7 @@ export default class AdapterSortableTable{ /*** sort behaviour for paging ***/ if(tf.paging){ - adpt.isPaged = true; - tf.paging = false; - tf.feature('paging').destroy(); + tf.feature('paging').disable(); } }; @@ -137,11 +132,10 @@ export default class AdapterSortableTable{ } } //sort behaviour for paging - if(adpt.isPaged){ + if(tf.paging){ let paginator = tf.feature('paging'); - paginator.reset(false); + paginator.enable(); paginator.setPage(paginator.getPage()); - adpt.isPaged = false; } if(adpt.onAfterSort){ diff --git a/test/test-integration-paging-sort.html b/test/test-integration-paging-sort.html new file mode 100644 index 00000000..def90342 --- /dev/null +++ b/test/test-integration-paging-sort.html @@ -0,0 +1,80 @@ + + + + + TableFilter paging-sort integration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FromDestinationRoad Distance (km)By Air (hrs)By Rail (hrs)
SydneyAdelaide14121.425.3
SydneyBrisbane9821.516
SydneyCanberra286.64.3
SydneyMelbourne8721.110.5
AdelaidePerth27813.138
AdelaideAlice Springs1533220.25
AdelaideBrisbane20452.1540
+ + + + +
+
+ + \ No newline at end of file diff --git a/test/test-integration-paging-sort.js b/test/test-integration-paging-sort.js new file mode 100644 index 00000000..608d172b --- /dev/null +++ b/test/test-integration-paging-sort.js @@ -0,0 +1,51 @@ + +var id = function (id){ return document.getElementById(id); }; + +var tf = new TableFilter('demo', { + base_path: '../dist/tablefilter/', + paging: true, + paging_length: 2, + remember_grid_values: true, + remember_page_number: true, + remember_page_length: true, + results_per_page: ['Results per page ', [2,4,6]], + extensions: [{ name: 'sort' }] +}); +tf.init(); + +var paging = tf.feature('paging'); + +module('Sanity checks'); +test('Paging component', function() { + notEqual(paging, null, 'Paging instanciated'); + deepEqual(paging.pagingLength, 2, 'Paging length'); + deepEqual(paging.nbPages, 4, 'Number of pages'); +}); +test('Sort extension', function() { + var sort = tf.extension('sort'); + notEqual(sort, null, 'Sort instanciated'); + deepEqual(sort.stt instanceof SortableTable, true, 'Sort type'); + deepEqual(sort.sorted, false, 'Table not sorted'); + deepEqual(sort.initialized, true, 'Sort initialized'); +}); + +module('Paging with persistence when a column is sorted'); +test('It contains options', function() { + var sort = tf.extension('sort'); + sort.sortByColumnIndex(0); + + deepEqual(paging.pagingSlc.options.length, 4, 'Expected options number'); +}); +test('Can select a page', function() { + var sort = tf.extension('sort'); + sort.sortByColumnIndex(1); + paging.setPage(3); + + deepEqual(paging.pagingSlc.selectedIndex, 2, 'Expected options number'); +}); + +module('Tear-down'); +test('can destroy TableFilter DOM elements', function() { + tf.destroy(); + deepEqual(tf.hasGrid(), false, 'Filters removed'); +}); diff --git a/test/test-sort-grid-layout.js b/test/test-sort-grid-layout.js index 5d1f90bc..09cb51b5 100644 --- a/test/test-sort-grid-layout.js +++ b/test/test-sort-grid-layout.js @@ -37,7 +37,6 @@ function startSimple(tf, sort){ sort.sortByColumnIndex(0); deepEqual(sort.sorted, true, 'Table column sorted'); - deepEqual(sort.isPaged, false, 'Table is not paged'); }); module('Destroy and re-init'); diff --git a/test/test-sort.js b/test/test-sort.js index 2e57e24f..b6eb3c8c 100644 --- a/test/test-sort.js +++ b/test/test-sort.js @@ -53,7 +53,6 @@ function startSimple(tf, sort){ sort.sortByColumnIndex(0); deepEqual(sort.sorted, true, 'Table column sorted'); - deepEqual(sort.isPaged, false, 'Table is not paged'); deepEqual( outputBefore[0] instanceof TableFilter, true,