From 8768f653ac87f0dd13b39c3ce33e3458db42badd Mon Sep 17 00:00:00 2001 From: Max Guglielmi Date: Sat, 6 Jun 2015 20:06:15 +1000 Subject: [PATCH] Started filtersVisibility extension --- Gruntfile.js | 14 +- dist/tablefilter/1-926cf2bd1a254bbaafde.js | 3 + dist/tablefilter/1-9803ed6151473186f605.js | 3 - dist/tablefilter/filtersVisibility.css | 22 + dist/tablefilter/icn_clp.png | Bin 0 -> 441 bytes dist/tablefilter/icn_exp.png | Bin 0 -> 469 bytes dist/tablefilter/tablefilter.js | 2 +- examples/dev.html | 13 +- .../TFExt_ColsVisibility.css | 47 -- .../TFExt_ColsVisibility.js | 498 ------------------ .../TFExt_FiltersRowVisibility.css | 22 + .../TFExt_FiltersRowVisibility.js | 190 +++++++ libs/TFExt_FiltersRowVisibility/icn_clp.png | Bin 0 -> 441 bytes libs/TFExt_FiltersRowVisibility/icn_exp.png | Bin 0 -> 469 bytes {src-es6 => src}/array.js | 0 {src-es6 => src}/cookie.js | 0 {src-es6 => src}/date.js | 0 {src-es6 => src}/dom.js | 0 {src-es6 => src}/event.js | 0 .../advancedGrid/adapterEzEditTable.js | 0 .../extensions/advancedGrid/advancedGrid.js | 0 .../colsVisibility/colsVisibility.js | 26 +- .../filtersVisibility/filtersVisibility.js | 174 ++++++ .../extensions/sort/adapterSortabletable.js | 0 {src-es6 => src}/extensions/sort/sort.js | 0 {src-es6 => src}/helpers.js | 0 {src-es6 => src}/modules/alternateRows.js | 0 {src-es6 => src}/modules/checkList.js | 0 {src-es6 => src}/modules/clearButton.js | 0 {src-es6 => src}/modules/colOps.js | 0 {src-es6 => src}/modules/dropdown.js | 0 {src-es6 => src}/modules/gridLayout.js | 18 +- {src-es6 => src}/modules/help.js | 0 {src-es6 => src}/modules/highlightKeywords.js | 0 {src-es6 => src}/modules/loader.js | 0 {src-es6 => src}/modules/paging.js | 0 {src-es6 => src}/modules/popupFilter.js | 0 {src-es6 => src}/modules/rowsCounter.js | 0 {src-es6 => src}/modules/statusBar.js | 0 {src-es6 => src}/modules/store.js | 0 {src-es6 => src}/sort.js | 0 {src-es6 => src}/string.js | 0 {src-es6 => src}/tablefilter.js | 65 +-- {src-es6 => src}/types.js | 0 static/style/filtersVisibility.css | 26 + static/style/icn_clp.png | Bin 0 -> 441 bytes static/style/icn_exp.png | Bin 0 -> 469 bytes webpack.config.js | 10 +- 48 files changed, 515 insertions(+), 618 deletions(-) create mode 100644 dist/tablefilter/1-926cf2bd1a254bbaafde.js delete mode 100644 dist/tablefilter/1-9803ed6151473186f605.js create mode 100644 dist/tablefilter/filtersVisibility.css create mode 100644 dist/tablefilter/icn_clp.png create mode 100644 dist/tablefilter/icn_exp.png delete mode 100644 libs/TFExt_ColsVisibility/TFExt_ColsVisibility.css delete mode 100644 libs/TFExt_ColsVisibility/TFExt_ColsVisibility.js create mode 100644 libs/TFExt_FiltersRowVisibility/TFExt_FiltersRowVisibility.css create mode 100644 libs/TFExt_FiltersRowVisibility/TFExt_FiltersRowVisibility.js create mode 100644 libs/TFExt_FiltersRowVisibility/icn_clp.png create mode 100644 libs/TFExt_FiltersRowVisibility/icn_exp.png rename {src-es6 => src}/array.js (100%) rename {src-es6 => src}/cookie.js (100%) rename {src-es6 => src}/date.js (100%) rename {src-es6 => src}/dom.js (100%) rename {src-es6 => src}/event.js (100%) rename {src-es6 => src}/extensions/advancedGrid/adapterEzEditTable.js (100%) rename {src-es6 => src}/extensions/advancedGrid/advancedGrid.js (100%) rename {src-es6 => src}/extensions/colsVisibility/colsVisibility.js (96%) create mode 100644 src/extensions/filtersVisibility/filtersVisibility.js rename {src-es6 => src}/extensions/sort/adapterSortabletable.js (100%) rename {src-es6 => src}/extensions/sort/sort.js (100%) rename {src-es6 => src}/helpers.js (100%) rename {src-es6 => src}/modules/alternateRows.js (100%) rename {src-es6 => src}/modules/checkList.js (100%) rename {src-es6 => src}/modules/clearButton.js (100%) rename {src-es6 => src}/modules/colOps.js (100%) rename {src-es6 => src}/modules/dropdown.js (100%) rename {src-es6 => src}/modules/gridLayout.js (97%) rename {src-es6 => src}/modules/help.js (100%) rename {src-es6 => src}/modules/highlightKeywords.js (100%) rename {src-es6 => src}/modules/loader.js (100%) rename {src-es6 => src}/modules/paging.js (100%) rename {src-es6 => src}/modules/popupFilter.js (100%) rename {src-es6 => src}/modules/rowsCounter.js (100%) rename {src-es6 => src}/modules/statusBar.js (100%) rename {src-es6 => src}/modules/store.js (100%) rename {src-es6 => src}/sort.js (100%) rename {src-es6 => src}/string.js (100%) rename {src-es6 => src}/tablefilter.js (98%) rename {src-es6 => src}/types.js (100%) create mode 100644 static/style/filtersVisibility.css create mode 100644 static/style/icn_clp.png create mode 100644 static/style/icn_exp.png diff --git a/Gruntfile.js b/Gruntfile.js index c3ed8885..b72afec4 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -15,7 +15,7 @@ module.exports = function (grunt) { src: [ 'Gruntfile.js', 'webpack.config.js', - 'src-es6/**/*.js' + 'src/**/*.js' ], options: { jshintrc: '.jshintrc' @@ -70,11 +70,11 @@ module.exports = function (grunt) { dist: webpackConfig.dist, build: webpackConfig.build // 'dev': { - // entry: __dirname + '/src-es6/tablefilter.js', + // entry: __dirname + '/src/tablefilter.js', // // entry: { - // // tablefilter: __dirname + '/src-es6/tablefilter.js', + // // tablefilter: __dirname + '/src/tablefilter.js', // // colsVisibility: __dirname + - // // '/src-es6/extensions/colsVisibility/colsVisibility.js' + // // '/src/extensions/colsVisibility/colsVisibility.js' // // }, // output: { // publicPath: '/src/', @@ -88,7 +88,7 @@ module.exports = function (grunt) { // }, // module: { // loaders: [{ - // test: path.join(__dirname, 'src-es6'), + // test: path.join(__dirname, 'src'), // exclude: /node_modules/, // query: { // compact: false @@ -103,7 +103,7 @@ module.exports = function (grunt) { watch: { app: { - files: ["src-es6/**/*"], + files: ["src/**/*"], tasks: ["dev"], options: { spawn: false @@ -120,7 +120,7 @@ module.exports = function (grunt) { dist: { files: [{ expand: true, - cwd: 'src-es6', + cwd: 'src', src: ['**/*.js'], dest: 'build/tablefilter' }] diff --git a/dist/tablefilter/1-926cf2bd1a254bbaafde.js b/dist/tablefilter/1-926cf2bd1a254bbaafde.js new file mode 100644 index 00000000..a7679267 --- /dev/null +++ b/dist/tablefilter/1-926cf2bd1a254bbaafde.js @@ -0,0 +1,3 @@ +webpackJsonp([1],[,function(t,e,s){function i(t){return s(l(t))}function l(t){return a[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}var a={"./array":7,"./array.js":7,"./cookie":5,"./cookie.js":5,"./date":8,"./date.js":8,"./dom":3,"./dom.js":3,"./event":2,"./event.js":2,"./extensions/advancedGrid/adapterEzEditTable":25,"./extensions/advancedGrid/adapterEzEditTable.js":25,"./extensions/advancedGrid/advancedGrid":26,"./extensions/advancedGrid/advancedGrid.js":26,"./extensions/colsVisibility/colsVisibility":27,"./extensions/colsVisibility/colsVisibility.js":27,"./extensions/filtersVisibility/filtersVisibility":28,"./extensions/filtersVisibility/filtersVisibility.js":28,"./extensions/sort/adapterSortabletable":29,"./extensions/sort/adapterSortabletable.js":29,"./extensions/sort/sort":30,"./extensions/sort/sort.js":30,"./helpers":9,"./helpers.js":9,"./modules/alternateRows":22,"./modules/alternateRows.js":22,"./modules/checkList":16,"./modules/checkList.js":16,"./modules/clearButton":20,"./modules/clearButton.js":20,"./modules/colOps":23,"./modules/colOps.js":23,"./modules/dropdown":15,"./modules/dropdown.js":15,"./modules/gridLayout":11,"./modules/gridLayout.js":11,"./modules/help":21,"./modules/help.js":21,"./modules/highlightKeywords":13,"./modules/highlightKeywords.js":13,"./modules/loader":12,"./modules/loader.js":12,"./modules/paging":19,"./modules/paging.js":19,"./modules/popupFilter":14,"./modules/popupFilter.js":14,"./modules/rowsCounter":17,"./modules/rowsCounter.js":17,"./modules/statusBar":18,"./modules/statusBar.js":18,"./modules/store":10,"./modules/store.js":10,"./sort":24,"./sort.js":24,"./string":4,"./string.js":4,"./types":6,"./types.js":6};i.keys=function(){return Object.keys(a)},i.resolve=l,t.exports=i,i.id=1},,,,,,,,,,,,,,,,,,,,,,,,function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}},l=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a=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 l=s.editable,a=s.selectable;s.selection=a,a&&(s.default_selection=s.default_selection||"row"),s.active_cell_css=s.active_cell_css||"ezETSelectedCell";var n=0,o=0;if(a){var d=function(t,s,i){var l=t.Selection,a=function(i){if("row"===t.defaultSelection)l.SelectRowByIndex(i);else{t.ClearSelections();var a=s.cellIndex,n=e.tbl.rows[i];"both"===t.defaultSelection&&l.SelectRowByIndex(i),n&&l.SelectCell(n.cells[a])}if(e.validRowsIndex.length!==e.getRowsNb()){var r=e.tbl.rows[i];r&&r.scrollIntoView(!1),f&&(f.cellIndex===e.getCellsNb()-1&&e.gridLayout?e.tblCont.scrollLeft=1e8:0===f.cellIndex&&e.gridLayout?e.tblCont.scrollLeft=0:f.scrollIntoView(!1))}};if(e.validRowsIndex){var r,d=e.validRowsIndex,u=d.length,c="row"!==t.defaultSelection?s.parentNode:s,f="TD"===s.nodeName?s:null,p=void 0!==i?t.Event.GetKey(i):0,g=h["default"].has(d,c.rowIndex),v=34===p||33===p?e.Cpt.paging.pagingLength||t.nbRowsPerPage:1;if(g)34!==p&&33!==p?(n=h["default"].indexByValue(d,c.rowIndex),o=c.rowIndex):(r=34===p?u-1>=n+v?d[n+v]:[u-1]:n-v<=d[0]?d[0]:d[n-v],o=r,n=h["default"].indexByValue(d,r),a(r));else{if(c.rowIndex>o)if(c.rowIndex>=d[u-1])r=d[u-1];else{var b=n+v;r=b>u-1?d[u-1]:d[b]}else if(c.rowIndex<=d[0])r=d[0];else{var m=d[n-v];r=m?m:d[0]}o=c.rowIndex,a(r)}}},u=function(t,s){var i="row"!==t.defaultSelection?s.parentNode:s;if(e.paging&&e.Cpt.paging.nbPages>1){var l=e.Cpt.paging;t.nbRowsPerPage=l.pagingLength;var a=e.validRowsIndex,n=a.length,r=parseInt(l.startPagingRow,10)+parseInt(l.pagingLength,10),o=i.rowIndex;o===a[n-1]&&l.currentPageNb!==l.nbPages?l.setPage("last"):o==a[0]&&1!==l.currentPageNb?l.setPage("first"):o>a[r-1]&&oa[0]&&l.setPage("previous")}};if(e.paging&&(e.Cpt.paging.onAfterChangePage=function(t){var e=t.tf.ExtRegistry.advancedGrid,s=e._ezEditTable,i=s.Selection,l=i.GetActiveRow();l&&l.scrollIntoView(!1);var a=i.GetActiveCell();a&&a.scrollIntoView(!1)}),"row"===s.default_selection){var c=s.on_before_selected_row;s.on_before_selected_row=function(){u(arguments[0],arguments[1],arguments[2]),c&&c.call(null,arguments[0],arguments[1],arguments[2])};var f=s.on_after_selected_row;s.on_after_selected_row=function(){d(arguments[0],arguments[1],arguments[2]),f&&f.call(null,arguments[0],arguments[1],arguments[2])}}else{var p=s.on_before_selected_cell;s.on_before_selected_cell=function(){u(arguments[0],arguments[1],arguments[2]),p&&p.call(null,arguments[0],arguments[1],arguments[2])};var g=s.on_after_selected_cell;s.on_after_selected_cell=function(){d(arguments[0],arguments[1],arguments[2]),g&&g.call(null,arguments[0],arguments[1],arguments[2])}}}if(l){var v=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.Cpt.paging.destroy(),e.Cpt.paging.addPaging()):e.Cpt.rowsCounter.refresh(),e.alternateBgs&&e.Cpt.alternateRows.init(),v&&v.call(null,arguments[0],arguments[1],arguments[2])},s.actions&&s.actions["delete"]){var b=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.Cpt.paging.destroy(),e.Cpt.paging.addPaging(!1)):e.Cpt.rowsCounter.refresh(),e.alternateBgs&&e.Cpt.alternateRows.init(),b&&b.call(null,arguments[0],arguments[1])}}}try{this._ezEditTable=new EditTable(e.id,s,t),this._ezEditTable.Init()}catch(m){throw new Error(this.err)}}},{key:"reset",value:function(){var t=this._ezEditTable;t&&(this.cfg.selectable&&t.Selection.Set(),this.cfg.editable&&t.Editable.Set())}},{key:"destroy",value:function(){var t=this._ezEditTable;t&&(this.cfg.selectable&&(t.Selection.ClearSelections(),t.Selection.Remove()),this.cfg.editable&&t.Editable.Remove())}}]),t}();e["default"]=d,t.exports=e["default"]},function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(e,"__esModule",{value:!0});var l=s(25),a=i(l);e["default"]=a["default"],t.exports=e["default"]},function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}},l=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a=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.Cpt.gridLayout.headTbl,this.headersIndex=0,this.onAfterColDisplayed=function(){},this.onAfterColHidden=function(){}),e["import"](s.name+"Style",e.basePath+this.stylesheet,null,"link"),this.tf=e}return a(t,[{key:"toggle",value:function(){var t=this.contEl.style.display,e=this.onBeforeOpen,s=this.onBeforeClose,i=this.onAfterOpen,l=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),l&&"inline"===t&&l.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 l=!1;(this.tickToHide&&s||!this.tickToHide&&!s)&&(l=!0),this.setHidden(i,l)}}},{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 l=i.firstChild;l.parentNode.insertBefore(s,l)}if(this.btnHtml){s.innerHTML=this.btnHtml;var a=s.firstChild;this.enableHover?u["default"].add(a,"mouseover",function(e){t.toggle(e)}):u["default"].add(a,"click",function(e){t.toggle(e)})}else{var n=r["default"].create("a",["href","javascript:;"]);n.className=this.btnCssClass,n.title=this.desc,n.innerHTML=this.btnText,s.appendChild(n),this.enableHover?u["default"].add(n,"mouseover",function(e){t.toggle(e)}):u["default"].add(n,"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 l=r["default"].create("ul",["id","ul"+this.name+"_"+e.id]);l.className=this.listCssClass;var a=this.headersTbl?this.headersTbl:e.tbl,n=this.headersTbl?this.headersIndex:e.getHeadersRowIndex(),o=a.rows[n];if(this.enableTickAll){var h=r["default"].createCheckItem("col__"+e.id,this.tickAllText,this.tickAllText);r["default"].addClass(h,this.listItemCssClass),l.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="Expand/Collapse filters",this.tgtId=s.target_id||null,this.enableIcon=s.enable_icon===!1?!1:!0,this.btnText=s.btn_text||this.defaultText,this.collapseBtnHtml=this.enableIcon?this.icnCollapseHtml:this.btnText,this.expandBtnHtml=this.enableIcon?this.icnExpandHtml:this.btnText,this.btnHtml=s.btn_html||null,this.btnCssClass=s.btn_css_class||"btnExpClpFlt",this.contCssClass=s.cont_css_class||"expClpFlt",this.externalTblId=s.external_table_id,this.externalTbl=h["default"].isUndef(this.externalTblId)?null:r["default"].id(this.externalTblId),this.externalFiltersRowIndex=h["default"].isUndef(s.external_filters_row_index)?1:s.external_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.basePath+this.stylesheet,null,"link"),this.tf=e}return a(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.tgtId&&e.setToolbar();var i=this.tgtId?r["default"].id(this.tgtId):e.rDiv;if(this.tgtId)i.appendChild(s);else{var l=i.firstChild;l.parentNode.insertBefore(s,l)}var a=void 0;this.btnHtml?(s.innerHTML=this.btnHtml,a=s.firstChild,u["default"].add(a,"click",function(){t.toggle()})):(a=r["default"].create("a",["href","javascript:void(0);"]),a.className=this.btnCssClass,a.title=this.defaultText,a.innerHTML=this.collapseBtnHtml,s.appendChild(a),u["default"].add(a,"click",function(){t.toggle()})),this.cont=s,this.btnEl=a,this.visibleAtStart||this.toggle()}},{key:"toggle",value:function(){var t=this.tf,e=this.externalTbl||t.tbl,s=this.externalFiltersRowIndex||t.getFiltersRowIndex(),i=e.rows[s],l=i.style.display;this.onBeforeShow&&""!=l&&this.onBeforeShow.call(this,this),this.onBeforeHide&&""===l&&this.onBeforeHide.call(null,this),i.style.display=""===l?"none":"",this.enableIcon&&!this.btnHtml&&(this.btnEl.innerHTML=""===l?this.expandBtnHtml:this.collapseBtnHtml),this.onAfterShow&&""!=l&&this.onAfterShow.call(null,this),this.onAfterHide&&""===l&&this.onAfterHide.call(null,this)}},{key:"destroy",value:function(){(this.btnEl||this.contEl)&&(this.contEl.innerHTML="",this.contEl.parentNode.removeChild(this.contEl),this.contEl=null,this.btnEl.innerHTML="",this.btnEl.parentNode.removeChild(this.btnEl),this.btnEl=null,this.initialized=!1)}}]),t}();e["default"]=c,t.exports=e["default"]},function(t,e,s){"use strict";function i(t){return I["default"].removeNbFormat(t,"us")}function l(t){return I["default"].removeNbFormat(t,"eu")}function a(t,e){return x["default"].format(t,e)}function n(t){return a(t,"DMY")}function r(t){return a(t,"MDY")}function o(t){return a(t,"YMD")}function h(t){return a(t,"DDMMMYYYY")}function d(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 u(t,e){var s=d(t.value.toLowerCase()),i=d(e.value.toLowerCase());return s==i?0:i>s?-1:1}var c=function(t){return t&&t.__esModule?t:{"default":t}},f=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},p=function(){function t(t,e){for(var s=0;se;e++);return e},SortableTable.prototype.initHeader=function(s){var i=this;if(i.tHead){i.headersRow=e.headersRow;var l=i.tHead.rows[i.headersRow].cells;i.sortTypes=s||[];for(var a,n,r=l.length,o=0;r>o;o++)n=l[o],null!==i.sortTypes[o]&&"None"!==i.sortTypes[o]?(n.style.cursor="pointer",a=m["default"].create("img",["src",t.sortImgPath+t.sortImgBlank]),n.appendChild(a),null!==i.sortTypes[o]&&n.setAttribute("_sortType",i.sortTypes[o]),w["default"].add(n,"click",i._headerOnclick)):(n.setAttribute("_sortType",s[o]),n._sortType="None");i.updateHeaderArrows()}},SortableTable.prototype.updateHeaderArrows=function(){var s,i,l,a=this;if(e.sortConfig.asyncSort&&null!==e.sortConfig.triggerIds){var n=e.sortConfig.triggerIds;s=[],i=n.length;for(var r=0;ro;o++){var h=s[o].getAttribute("_sortType");null!==h&&"None"!==h&&(l=s[o].lastChild||s[o],"img"!==l.nodeName.toLowerCase()&&(l=m["default"].create("img",["src",t.sortImgPath+t.sortImgBlank]),s[o].appendChild(l)),o===a.sortColumn?l.className=t.sortImgClassName+" "+(this.descending?t.sortImgDescClassName:t.sortImgAscClassName):l.className=t.sortImgClassName)}},SortableTable.prototype.getRowValue=function(t,e,s){var i=this,l=i._sortTypeInfo[e];if(l&&l.getRowValue)return l.getRowValue(t,s);var a=t.cells[s],n=SortableTable.getInnerText(a);return i.getValueFromString(n,e)},SortableTable.getInnerText=function(e){return e?e.getAttribute(t.sortCustomKey)?e.getAttribute(t.sortCustomKey):m["default"].getText(e):void 0}}},{key:"addSortType",value:function(){SortableTable.prototype.addSortType(arguments[0],arguments[1],arguments[2],arguments[3])}},{key:"setSortTypes",value:function(){for(var t=this,e=this.tf,s=e.sortConfig,a=s.sortTypes,c=[],f=0;f 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/dist/tablefilter/1-9803ed6151473186f605.js b/dist/tablefilter/1-9803ed6151473186f605.js deleted file mode 100644 index c0e0a214..00000000 --- a/dist/tablefilter/1-9803ed6151473186f605.js +++ /dev/null @@ -1,3 +0,0 @@ -webpackJsonp([1],[,function(t,e,s){function i(t){return s(l(t))}function l(t){return a[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}var a={"./array":7,"./array.js":7,"./cookie":5,"./cookie.js":5,"./date":8,"./date.js":8,"./dom":3,"./dom.js":3,"./event":2,"./event.js":2,"./extensions/advancedGrid/adapterEzEditTable":25,"./extensions/advancedGrid/adapterEzEditTable.js":25,"./extensions/advancedGrid/advancedGrid":26,"./extensions/advancedGrid/advancedGrid.js":26,"./extensions/colsVisibility/colsVisibility":27,"./extensions/colsVisibility/colsVisibility.js":27,"./extensions/sort/adapterSortabletable":28,"./extensions/sort/adapterSortabletable.js":28,"./extensions/sort/sort":29,"./extensions/sort/sort.js":29,"./helpers":9,"./helpers.js":9,"./modules/alternateRows":22,"./modules/alternateRows.js":22,"./modules/checkList":16,"./modules/checkList.js":16,"./modules/clearButton":20,"./modules/clearButton.js":20,"./modules/colOps":23,"./modules/colOps.js":23,"./modules/dropdown":15,"./modules/dropdown.js":15,"./modules/gridLayout":11,"./modules/gridLayout.js":11,"./modules/help":21,"./modules/help.js":21,"./modules/highlightKeywords":13,"./modules/highlightKeywords.js":13,"./modules/loader":12,"./modules/loader.js":12,"./modules/paging":19,"./modules/paging.js":19,"./modules/popupFilter":14,"./modules/popupFilter.js":14,"./modules/rowsCounter":17,"./modules/rowsCounter.js":17,"./modules/statusBar":18,"./modules/statusBar.js":18,"./modules/store":10,"./modules/store.js":10,"./sort":24,"./sort.js":24,"./string":4,"./string.js":4,"./types":6,"./types.js":6};i.keys=function(){return Object.keys(a)},i.resolve=l,t.exports=i,i.id=1},,,,,,,,,,,,,,,,,,,,,,,,function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}},l=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a=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 l=s.editable,a=s.selectable;s.selection=a,a&&(s.default_selection=s.default_selection||"row"),s.active_cell_css=s.active_cell_css||"ezETSelectedCell";var n=0,o=0;if(a){var d=function(t,s,i){var l=t.Selection,a=function(i){if("row"===t.defaultSelection)l.SelectRowByIndex(i);else{t.ClearSelections();var a=s.cellIndex,n=e.tbl.rows[i];"both"===t.defaultSelection&&l.SelectRowByIndex(i),n&&l.SelectCell(n.cells[a])}if(e.validRowsIndex.length!==e.getRowsNb()){var r=e.tbl.rows[i];r&&r.scrollIntoView(!1),f&&(f.cellIndex===e.getCellsNb()-1&&e.gridLayout?e.tblCont.scrollLeft=1e8:0===f.cellIndex&&e.gridLayout?e.tblCont.scrollLeft=0:f.scrollIntoView(!1))}};if(e.validRowsIndex){var r,d=e.validRowsIndex,u=d.length,c="row"!==t.defaultSelection?s.parentNode:s,f="TD"===s.nodeName?s:null,p=void 0!==i?t.Event.GetKey(i):0,g=h["default"].has(d,c.rowIndex),v=34===p||33===p?e.Cpt.paging.pagingLength||t.nbRowsPerPage:1;if(g)34!==p&&33!==p?(n=h["default"].indexByValue(d,c.rowIndex),o=c.rowIndex):(r=34===p?u-1>=n+v?d[n+v]:[u-1]:n-v<=d[0]?d[0]:d[n-v],o=r,n=h["default"].indexByValue(d,r),a(r));else{if(c.rowIndex>o)if(c.rowIndex>=d[u-1])r=d[u-1];else{var b=n+v;r=b>u-1?d[u-1]:d[b]}else if(c.rowIndex<=d[0])r=d[0];else{var m=d[n-v];r=m?m:d[0]}o=c.rowIndex,a(r)}}},u=function(t,s){var i="row"!==t.defaultSelection?s.parentNode:s;if(e.paging&&e.Cpt.paging.nbPages>1){var l=e.Cpt.paging;t.nbRowsPerPage=l.pagingLength;var a=e.validRowsIndex,n=a.length,r=parseInt(l.startPagingRow,10)+parseInt(l.pagingLength,10),o=i.rowIndex;o===a[n-1]&&l.currentPageNb!==l.nbPages?l.setPage("last"):o==a[0]&&1!==l.currentPageNb?l.setPage("first"):o>a[r-1]&&oa[0]&&l.setPage("previous")}};if(e.paging&&(e.Cpt.paging.onAfterChangePage=function(t){var e=t.tf.ExtRegistry.advancedGrid,s=e._ezEditTable,i=s.Selection,l=i.GetActiveRow();l&&l.scrollIntoView(!1);var a=i.GetActiveCell();a&&a.scrollIntoView(!1)}),"row"===s.default_selection){var c=s.on_before_selected_row;s.on_before_selected_row=function(){u(arguments[0],arguments[1],arguments[2]),c&&c.call(null,arguments[0],arguments[1],arguments[2])};var f=s.on_after_selected_row;s.on_after_selected_row=function(){d(arguments[0],arguments[1],arguments[2]),f&&f.call(null,arguments[0],arguments[1],arguments[2])}}else{var p=s.on_before_selected_cell;s.on_before_selected_cell=function(){u(arguments[0],arguments[1],arguments[2]),p&&p.call(null,arguments[0],arguments[1],arguments[2])};var g=s.on_after_selected_cell;s.on_after_selected_cell=function(){d(arguments[0],arguments[1],arguments[2]),g&&g.call(null,arguments[0],arguments[1],arguments[2])}}}if(l){var v=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.Cpt.paging.destroy(),e.Cpt.paging.addPaging()):e.Cpt.rowsCounter.refresh(),e.alternateBgs&&e.Cpt.alternateRows.init(),v&&v.call(null,arguments[0],arguments[1],arguments[2])},s.actions&&s.actions["delete"]){var b=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.Cpt.paging.destroy(),e.Cpt.paging.addPaging(!1)):e.Cpt.rowsCounter.refresh(),e.alternateBgs&&e.Cpt.alternateRows.init(),b&&b.call(null,arguments[0],arguments[1])}}}try{this._ezEditTable=new EditTable(e.id,s,t),this._ezEditTable.Init()}catch(m){throw new Error(this.err)}}},{key:"reset",value:function(){var t=this._ezEditTable;t&&(this.cfg.selectable&&t.Selection.Set(),this.cfg.editable&&t.Editable.Set())}},{key:"destroy",value:function(){var t=this._ezEditTable;t&&(this.cfg.selectable&&(t.Selection.ClearSelections(),t.Selection.Remove()),this.cfg.editable&&t.Editable.Remove())}}]),t}();e["default"]=d,t.exports=e["default"]},function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(e,"__esModule",{value:!0});var l=s(25),a=i(l);e["default"]=a["default"],t.exports=e["default"]},function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}},l=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a=function(){function t(t,e){for(var s=0;s0,this.onLoaded=h["default"].isFn(i.on_loaded)?i.on_loaded:null,this.onBeforeOpen=h["default"].isFn(i.on_before_open)?i.on_before_open:null,this.onAfterOpen=h["default"].isFn(i.on_after_open)?i.on_after_open:null,this.onBeforeClose=h["default"].isFn(i.on_before_close)?i.on_before_close:null,this.onAfterClose=h["default"].isFn(i.on_after_close)?i.on_after_close:null,this.onBeforeColHidden=h["default"].isFn(i.on_before_col_hidden)?i.on_before_col_hidden:null,this.onAfterColHidden=h["default"].isFn(i.on_after_col_hidden)?i.on_after_col_hidden:null,this.onBeforeColDisplayed=h["default"].isFn(i.on_before_col_displayed)?i.on_before_col_displayed:null,this.onAfterColDisplayed=h["default"].isFn(i.on_after_col_displayed)?i.on_after_col_displayed:null,e.gridLayout&&(this.headersTbl=e.Cpt.gridLayout.headTbl,this.headersIndex=0,this.onAfterColDisplayed=function(){},this.onAfterColHidden=function(){}),e["import"](i.name+"Style",e.basePath+this.stylesheet,null,"link"),this.tf=e}return a(t,[{key:"toggle",value:function(){var t=this.contEl.style.display,e=this.onBeforeOpen,s=this.onBeforeClose,i=this.onAfterOpen,l=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),l&&"inline"===t&&l.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 l=!1;(this.tickToHide&&s||!this.tickToHide&&!s)&&(l=!0),this.setHidden(i,l)}}},{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 l=i.firstChild;l.parentNode.insertBefore(s,l)}if(this.btnHtml){s.innerHTML=this.btnHtml;var a=s.firstChild;this.enableHover?u["default"].add(a,"mouseover",function(e){t.toggle(e)}):u["default"].add(a,"click",function(e){t.toggle(e)})}else{var n=r["default"].create("a",["href","javascript:;"]);n.className=this.btnCssClass,n.title=this.extDesc,n.innerHTML=this.btnText,s.appendChild(n),this.enableHover?u["default"].add(n,"mouseover",function(e){t.toggle(e)}):u["default"].add(n,"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 l=r["default"].create("ul",["id","ul"+this.extName+"_"+e.id]);l.className=this.listCssClass;var a=this.headersTbl?this.headersTbl:e.tbl,n=this.headersTbl?this.headersIndex:e.getHeadersRowIndex(),o=a.rows[n];if(this.enableTickAll){var h=r["default"].createCheckItem("col__"+e.id,this.tickAllText,this.tickAllText);r["default"].addClass(h,this.listItemCssClass),l.appendChild(h),h.check.checked=!this.tickToHide,u["default"].add(h.check,"click",function(){for(var t=0;ti.length;)i="0"+i;e[s]=i}return e.join(".")}function u(t,e){var s=d(t.value.toLowerCase()),i=d(e.value.toLowerCase());return s==i?0:i>s?-1:1}var c=function(t){return t&&t.__esModule?t:{"default":t}},f=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},p=function(){function t(t,e){for(var s=0;se;e++);return e},SortableTable.prototype.initHeader=function(s){var i=this;if(i.tHead){i.headersRow=e.headersRow;var l=i.tHead.rows[i.headersRow].cells;i.sortTypes=s||[];for(var a,n,r=l.length,o=0;r>o;o++)n=l[o],null!==i.sortTypes[o]&&"None"!==i.sortTypes[o]?(n.style.cursor="pointer",a=m["default"].create("img",["src",t.sortImgPath+t.sortImgBlank]),n.appendChild(a),null!==i.sortTypes[o]&&n.setAttribute("_sortType",i.sortTypes[o]),w["default"].add(n,"click",i._headerOnclick)):(n.setAttribute("_sortType",s[o]),n._sortType="None");i.updateHeaderArrows()}},SortableTable.prototype.updateHeaderArrows=function(){var s,i,l,a=this;if(e.sortConfig.asyncSort&&null!==e.sortConfig.triggerIds){var n=e.sortConfig.triggerIds;s=[],i=n.length;for(var r=0;ro;o++){var h=s[o].getAttribute("_sortType");null!==h&&"None"!==h&&(l=s[o].lastChild||s[o],"img"!==l.nodeName.toLowerCase()&&(l=m["default"].create("img",["src",t.sortImgPath+t.sortImgBlank]),s[o].appendChild(l)),o===a.sortColumn?l.className=t.sortImgClassName+" "+(this.descending?t.sortImgDescClassName:t.sortImgAscClassName):l.className=t.sortImgClassName)}},SortableTable.prototype.getRowValue=function(t,e,s){var i=this,l=i._sortTypeInfo[e];if(l&&l.getRowValue)return l.getRowValue(t,s);var a=t.cells[s],n=SortableTable.getInnerText(a);return i.getValueFromString(n,e)},SortableTable.getInnerText=function(e){return e?e.getAttribute(t.sortCustomKey)?e.getAttribute(t.sortCustomKey):m["default"].getText(e):void 0}}},{key:"addSortType",value:function(){SortableTable.prototype.addSortType(arguments[0],arguments[1],arguments[2],arguments[3])}},{key:"setSortTypes",value:function(){for(var t=this,e=this.tf,s=e.sortConfig,a=s.sortTypes,c=[],f=0;f 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/dist/tablefilter/filtersVisibility.css b/dist/tablefilter/filtersVisibility.css new file mode 100644 index 00000000..020bad1c --- /dev/null +++ b/dist/tablefilter/filtersVisibility.css @@ -0,0 +1,22 @@ +/*==================================================== + - HTML Table Filter Generator + - Filters Row Visibility Manager Extension v1.1 + - do not hesitate to edit classes below to + change extension appearance +=====================================================*/ + +/* container */ +span.expClpFlt{ } + +/* icon */ +span.expClpFlt img{ + vertical-align:middle; + border:1px solid #ccc; + padding:1px 1px 1px 1px; + margin:1px 1px 1px 1px; + background:#f4f4f4; +} +span.expClpFlt img:hover{ background:#fff; border:1px solid #666; } + +/* button */ +.btnExpClpFlt{ margin:0 5px 0 5px; } \ No newline at end of file diff --git a/dist/tablefilter/icn_clp.png b/dist/tablefilter/icn_clp.png new file mode 100644 index 0000000000000000000000000000000000000000..d259393426c9583252ca5282d82e76aa084dc1d8 GIT binary patch literal 441 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vkfZU=0pAc7* z@=b@XK1-WUF!d(72=IyehFB8wRq zxITa|qthCb89+gW64!{5;QX|b^2DN42H(WwqWs*{l*~j0x6Go{^8BLgVg=ub-4nG` zfNC2&T^vIy=JfX8=4*1`aXG#t>_BLkPPc}h){p=DGqhEO=Fgd)=2tbdsjkJ|VcD&~ zM@sW1H*I|t%G&WNk8O4X`);pSQ z`(^ih@m*lEaN_EHTbDf2*No?#>-zu4Q~lqq^WA>De#yIW0%!D#U$(n}Zej3r^>bP0 Hl+XkK*zn*V literal 0 HcmV?d00001 diff --git a/dist/tablefilter/icn_exp.png b/dist/tablefilter/icn_exp.png new file mode 100644 index 0000000000000000000000000000000000000000..13909c15d1c2c6650202ab43e0541ef0ce890c1f GIT binary patch literal 469 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vkfZWCapAgrX z3=B&S-ZClQ6y=qlH0|*J|No!t+t;n4fA!(p6E!tm8!qjSkGHPb`uy$ZrSkII&OY2^ zZ|~c&=gRCk1@liFy85ifEAiv!Z+D)(cWT_;xa!=LZCBSGzZc%OuXNF=-4`Cu-E$*t z=9zb&zCC^O=}dk7kDov7>$hEh{LZs=XU(!RNAErB*>qXZg3TT1810fEzhI#4|Nk?9 zNkYV)Gr}i<+Bge5B8wRqxITa|qthCb89+gW64!{5;QX|b^2DN42H(WwqWs*{l*~j0 zx6Go{^8BLgVg=ub-4nG`fNDEDT^vIy=CtBo!Y4%>yWwEAfzx1nvja~2mH{|67 zzdIAVZ}K)x!_QsI{)ql%zjjMicg1)for(var s=0,i=arguments.length;i>s;s++){var a=arguments[s],r=typeof a;switch(d["default"].lower(r)){case"number":this.startRow=a;break;case"object":this.cfg=a}}var o=this.cfg;this.refRow=null===this.startRow?2:this.startRow+1;try{this.nbCells=this.getCellsNb(this.refRow)}catch(u){this.nbCells=this.getCellsNb(0)}this.basePath=o.base_path||"tablefilter/",this.extensionsPath=o.extensions_path||this.basePath+"extensions/",this.fltTypeInp="input",this.fltTypeSlc="select",this.fltTypeMulti="multiple",this.fltTypeCheckList="checklist",this.fltTypeNone="none",this.fltGrid=o.grid===!1?!1:!0,this.gridLayout=Boolean(o.grid_layout),this.sourceTblHtml=null,this.gridLayout&&(this.sourceTblHtml=this.tbl.outerHTML),this.filtersRowIndex=o.filters_row_index||0,this.headersRow=o.headers_row_index||(0===this.filtersRowIndex?1:0),this.gridLayout&&(this.headersRow>1?this.filtersRowIndex=this.headersRow+1:(this.filtersRowIndex=1,this.headersRow=0)),this.fltCellTag="th"!==o.filters_cell_tag||"td"!==o.filters_cell_tag?"td":o.filters_cell_tag,this.fltIds=[],this.fltElms=[],this.searchArgs=null,this.tblData=[],this.validRowsIndex=null,this.fltGridEl=null,this.isFirstLoad=!0,this.infDiv=null,this.lDiv=null,this.rDiv=null,this.mDiv=null,this.contDiv=null,this.infDivCssClass=o.inf_div_css_class||"inf",this.lDivCssClass=o.left_div_css_class||"ldiv",this.rDivCssClass=o.right_div_css_class||"rdiv",this.mDivCssClass=o.middle_div_css_class||"mdiv",this.contDivCssClass=o.content_div_css_class||"cont",this.stylesheet=o.stylesheet||this.basePath+"tablefilter.css",this.stylesheetId=this.id+"_style",this.fltsRowCssClass=o.flts_row_css_class||"fltrow",this.enableIcons=o.enable_icons===!1?!1:!0,this.alternateBgs=Boolean(o.alternate_rows),this.hasColWidths=g["default"].isArray(o.col_widths),this.colWidths=this.hasColWidths?o.col_widths:null,this.tBodyH=isNaN(o.tbody_height)?200:o.tbody_height,this.fltCssClass=o.flt_css_class||"flt",this.fltMultiCssClass=o.flt_multi_css_class||"flt_multi",this.fltSmallCssClass=o.flt_small_css_class||"flt_s",this.singleFltCssClass=o.single_flt_css_class||"single_flt",this.isStartBgAlternate=!0,this.enterKey=o.enter_key===!1?!1:!0,this.onBeforeFilter=g["default"].isFn(o.on_before_filter)?o.on_before_filter:null,this.onAfterFilter=g["default"].isFn(o.on_after_filter)?o.on_after_filter:null,this.caseSensitive=Boolean(o.case_sensitive),this.exactMatch=Boolean(o.exact_match),this.linkedFilters=Boolean(o.linked_filters),this.disableExcludedOptions=Boolean(o.disable_excluded_options),this.activeFlt=null,this.activeFilterId=null,this.hasColOperation=Boolean(o.col_operation),this.colOperation=null,this.hasVisibleRows=Boolean(o.rows_always_visible),this.visibleRows=this.hasVisibleRows?o.rows_always_visible:[],this.searchType=o.search_type||"include",this.isExternalFlt=Boolean(o.external_flt_grid),this.externalFltTgtIds=o.external_flt_grid_ids||null,this.externalFltEls=[],this.execDelay=isNaN(o.exec_delay)?100:parseInt(o.exec_delay,10),this.onFiltersLoaded=g["default"].isFn(o.on_filters_loaded)?o.on_filters_loaded:null,this.singleSearchFlt=Boolean(o.single_search_filter),this.onRowValidated=g["default"].isFn(o.on_row_validated)?o.on_row_validated:null,this.customCellDataCols=o.custom_cell_data_cols?o.custom_cell_data_cols:[],this.customCellData=g["default"].isFn(o.custom_cell_data)?o.custom_cell_data:null,this.watermark=o.watermark||"",this.isWatermarkArray=g["default"].isArray(this.watermark),this.toolBarTgtId=o.toolbar_target_id||null,this.helpInstructions=g["default"].isUndef(o.help_instructions)?void 0:Boolean(o.help_instructions),this.popUpFilters=Boolean(o.popup_filters),this.markActiveColumns=Boolean(o.mark_active_columns),this.activeColumnsCssClass=o.active_columns_css_class||"activeHeader",this.onBeforeActiveColumn=g["default"].isFn(o.on_before_active_column)?o.on_before_active_column:null,this.onAfterActiveColumn=g["default"].isFn(o.on_after_active_column)?o.on_after_active_column:null,this.displayAllText=o.display_all_text||"",this.enableEmptyOption=Boolean(o.enable_empty_option),this.emptyText=o.empty_text||"(Empty)",this.enableNonEmptyOption=Boolean(o.enable_non_empty_option),this.nonEmptyText=o.non_empty_text||"(Non empty)",this.onSlcChange=o.on_change===!1?!1:!0,this.sortSlc=o.sort_select===!1?!1:!0,this.isSortNumAsc=Boolean(o.sort_num_asc),this.sortNumAsc=this.isSortNumAsc?o.sort_num_asc:null,this.isSortNumDesc=Boolean(o.sort_num_desc),this.sortNumDesc=this.isSortNumDesc?o.sort_num_desc:null,this.fillSlcOnDemand=Boolean(o.fill_slc_on_demand),this.hasCustomOptions=g["default"].isObj(o.custom_options),this.customOptions=o.custom_options,this.rgxOperator=o.regexp_operator||"rgx:",this.emOperator=o.empty_operator||"[empty]",this.nmOperator=o.nonempty_operator||"[nonempty]",this.orOperator=o.or_operator||"||",this.anOperator=o.and_operator||"&&",this.grOperator=o.greater_operator||">",this.lwOperator=o.lower_operator||"<",this.leOperator=o.lower_equal_operator||"<=",this.geOperator=o.greater_equal_operator||">=",this.dfOperator=o.different_operator||"!",this.lkOperator=o.like_operator||"*",this.eqOperator=o.equal_operator||"=",this.stOperator=o.start_with_operator||"{",this.enOperator=o.end_with_operator||"}",this.curExp=o.cur_exp||"^[¥£€$]",this.separator=o.separator||",",this.rowsCounter=Boolean(o.rows_counter),this.statusBar=Boolean(o.status_bar),this.loader=Boolean(o.loader),this.displayBtn=Boolean(o.btn),this.btnText=o.btn_text||(this.enableIcons?"":"Go"),this.btnCssClass=o.btn_css_class||(this.enableIcons?"btnflt_icon":"btnflt"),this.btnReset=Boolean(o.btn_reset),this.btnResetCssClass=o.btn_reset_css_class||"reset",this.onBeforeReset=g["default"].isFn(o.on_before_reset)?o.on_before_reset:null,this.onAfterReset=g["default"].isFn(o.on_after_reset)?o.on_after_reset:null,this.paging=Boolean(o.paging),this.nbVisibleRows=0,this.nbHiddenRows=0,this.sort=Boolean(o.sort),this.isSortEnabled=!1,this.sortConfig=o.sort_config||{},this.sortConfig.name=this.sortConfig.name||"sort",this.sortConfig.path=this.sortConfig.path||null,this.sortConfig.sortTypes=g["default"].isArray(this.sortConfig.sort_types)?this.sortConfig.sort_types:[],this.sortConfig.sortCol=this.sortConfig.sort_col||null,this.sortConfig.asyncSort=Boolean(this.sortConfig.async_sort),this.sortConfig.triggerIds=g["default"].isArray(this.sortConfig.sort_trigger_ids)?this.sortConfig.sort_trigger_ids:[],this.autoFilter=Boolean(o.auto_filter),this.autoFilterDelay=isNaN(o.auto_filter_delay)?900:o.auto_filter_delay,this.isUserTyping=null,this.autoFilterTimer=null,this.highlightKeywords=Boolean(o.highlight_keywords),this.defaultDateType=o.default_date_type||"DMY",this.thousandsSeparator=o.thousands_separator||",",this.decimalSeparator=o.decimal_separator||".",this.hasColNbFormat=Boolean(o.col_number_format),this.colNbFormat=g["default"].isArray(this.hasColNbFormat)?o.col_number_format:null,this.hasColDateType=g["default"].isArray(o.col_date_type),this.colDateType=this.hasColDateType?o.col_date_type:null,this.msgFilter=o.msg_filter||"Filtering data...",this.msgPopulate=o.msg_populate||"Populating filter...",this.msgPopulateCheckList=o.msg_populate_checklist||"Populating list...",this.msgChangePage=o.msg_change_page||"Collecting paging data...",this.msgClear=o.msg_clear||"Clearing filters...",this.msgChangeResults=o.msg_change_results||"Changing results per page...",this.msgResetValues=o.msg_reset_grid_values||"Re-setting filters values...",this.msgResetPage=o.msg_reset_page||"Re-setting page...",this.msgResetPageLength=o.msg_reset_page_length||"Re-setting page length...",this.msgSort=o.msg_sort||"Sorting data...",this.msgLoadExtensions=o.msg_load_extensions||"Loading extensions...",this.msgLoadThemes=o.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(o.remember_grid_values),this.fltsValuesCookie=this.prfxCookieFltsValues+this.id,this.rememberPageNb=this.paging&&o.remember_page_number,this.pgNbCookie=this.prfxCookiePageNb+this.id,this.rememberPageLen=this.paging&&o.remember_page_length,this.pgLenCookie=this.prfxCookiePageLen+this.id,this.extensions=o.extensions,this.hasExtensions=g["default"].isArray(this.extensions),this.enableDefaultTheme=Boolean(o.enable_default_theme),this.hasThemes=this.enableDefaultTheme||g["default"].isArray(o.themes),this.themes=o.themes||[],this.themesPath=o.themes_path||this.basePath+"themes/",this.Cpt={loader:null,alternateRows:null,colOps:null,rowsCounter:null,gridLayout:null,store:null,highlightKeywords:null,paging:null,checkList:null,dropdown:null,popupFilter:null,clearButton:null,help:null,statusBar:null},this.ExtRegistry={},this.Evt={name:{filter:"Filter",dropdown:"dropdown",checklist:"checkList",changepage:"changePage",clear:"Clear",changeresultsperpage:"changeResults",resetvalues:"ResetValues",resetpage:"resetPage",resetpagelength:"resetPageLength",sort:"Sort",loadextensions:"LoadExtensions",loadthemes:"loadThemes"},detectKey:function(t){if(this.enterKey){var e=t||O.event;if(e){var s=n["default"].keyCode(e);13===s?(this.filter(),n["default"].cancel(e),n["default"].stop(e)):(this.isUserTyping=!0,O.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null)}}},onKeyUp:function(t){function e(){O.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null,this.isUserTyping||(this.filter(),this.isUserTyping=null)}if(this.autoFilter){var s=t||O.event,i=n["default"].keyCode(s);this.isUserTyping=!1,13!==i&&9!==i&&27!==i&&38!==i&&40!==i?null===this.autoFilterTimer&&(this.autoFilterTimer=O.setInterval(e.bind(this),this.autoFilterDelay)):(O.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null)}},onKeyDown:function(){this.autoFilter&&(this.isUserTyping=!0)},onInpBlur:function(){this.autoFilter&&(this.isUserTyping=!1,O.clearInterval(this.autoFilterTimer))},onInpFocus:function(t){var e=t||O.event,s=n["default"].target(e);this.activeFilterId=s.getAttribute("id"),this.activeFlt=h["default"].id(this.activeFilterId),this.popUpFilters&&(n["default"].cancel(e),n["default"].stop(e))},onSlcFocus:function(t){var e=t||O.event,s=n["default"].target(e);if(this.activeFilterId=s.getAttribute("id"),this.activeFlt=h["default"].id(this.activeFilterId),this.fillSlcOnDemand&&"0"===s.getAttribute("filled")){var i=s.getAttribute("ct");this.Cpt.dropdown._build(i)}this.popUpFilters&&(n["default"].cancel(e),n["default"].stop(e))},onSlcChange:function(t){if(this.activeFlt){var e=t||O.event;this.popUpFilters&&n["default"].stop(e),this.onSlcChange&&this.filter()}},onCheckListClick:function(t){var e=t||O.event,s=n["default"].target(e);if(this.fillSlcOnDemand&&"0"===s.getAttribute("filled")){var i=s.getAttribute("ct");this.Cpt.checkList._build(i),this.Cpt.checkList.checkListDiv[i].onclick=null,this.Cpt.checkList.checkListDiv[i].title=""}},onBtnClick:function(){this.filter()}}}}return a(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.singleSearchFlt?1:this.nbCells,e=void 0;if(this["import"](this.stylesheetId,this.stylesheet,null,"link"),this.hasThemes&&this._loadThemes(),(this.rememberGridValues||this.rememberPageNb||this.rememberPageLen)&&(this.Cpt.store=new w.Store(this)),this.gridLayout&&(this.Cpt.gridLayout=new x.GridLayout(this),this.Cpt.gridLayout.init()),this.loader&&(this.Cpt.loader||(this.Cpt.loader=new T.Loader(this))),this.highlightKeywords&&(this.Cpt.highlightKeyword=new k.HighlightKeyword(this)),this.popUpFilters&&(this.Cpt.popupFilter||(this.Cpt.popupFilter=new I.PopupFilter(this)),this.Cpt.popupFilter.init()),this.fltGrid)if(this.isFirstLoad){var s=void 0;if(!this.gridLayout){var i=h["default"].tag(this.tbl,"thead");s=i.length>0?i[0].insertRow(this.filtersRowIndex):this.tbl.insertRow(this.filtersRowIndex),this.headersRow>1&&this.filtersRowIndex<=this.headersRow&&!this.popUpFilters&&this.headersRow++,this.popUpFilters&&this.headersRow++,s.className=this.fltsRowCssClass,!this.isExternalFlt||this.gridLayout&&!this.popUpFilters||(s.style.display="none")}this.nbFilterableRows=this.getRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=this.tbl.rows.length;for(var l=0;t>l;l++){this.popUpFilters&&this.Cpt.popupFilter.build(l);var a=h["default"].create(this.fltCellTag),r=this.getFilterType(l),o=this.isExternalFlt&&this.externalFltTgtIds?this.externalFltTgtIds[l]:null;if(this.singleSearchFlt&&(a.colSpan=this.nbCells),this.gridLayout||s.appendChild(a),e=l==t-1&&this.displayBtn?this.fltSmallCssClass:this.fltCssClass,this.singleSearchFlt&&(r=this.fltTypeInp,e=this.singleFltCssClass),r===this.fltTypeSlc||r===this.fltTypeMulti){this.Cpt.dropdown||(this.Cpt.dropdown=new F.Dropdown(this));var u=this.Cpt.dropdown,p=h["default"].create(this.fltTypeSlc,["id",this.prfxFlt+l+"_"+this.id],["ct",l],["filled","0"]);if(r===this.fltTypeMulti&&(p.multiple=this.fltTypeMulti,p.title=u.multipleSlcTooltip),p.className=d["default"].lower(r)===this.fltTypeSlc?e:this.fltMultiCssClass,o?(h["default"].id(o).appendChild(p),this.externalFltEls.push(p)):a.appendChild(p),this.fltIds.push(this.prfxFlt+l+"_"+this.id),this.fillSlcOnDemand||u._build(l),n["default"].add(p,"keypress",this.Evt.detectKey.bind(this)),n["default"].add(p,"change",this.Evt.onSlcChange.bind(this)),n["default"].add(p,"focus",this.Evt.onSlcFocus.bind(this)),this.fillSlcOnDemand){var f=h["default"].createOpt(this.displayAllText,"");p.appendChild(f)}}else if(r===this.fltTypeCheckList){var c=void 0;this.Cpt.checkList=new R.CheckList(this),c=this.Cpt.checkList;var g=h["default"].create("div",["id",c.prfxCheckListDiv+l+"_"+this.id],["ct",l],["filled","0"]);g.className=c.checkListDivCssClass,o?(h["default"].id(o).appendChild(g),this.externalFltEls.push(g)):a.appendChild(g),c.checkListDiv[l]=g,this.fltIds.push(this.prfxFlt+l+"_"+this.id),this.fillSlcOnDemand||c._build(l),this.fillSlcOnDemand&&(n["default"].add(g,"click",this.Evt.onCheckListClick.bind(this)),g.appendChild(h["default"].text(c.activateCheckListTxt)))}else{var v=r===this.fltTypeInp?"text":"hidden",C=h["default"].create(this.fltTypeInp,["id",this.prfxFlt+l+"_"+this.id],["type",v],["ct",l]);if("hidden"!==v&&this.watermark&&C.setAttribute("placeholder",this.isWatermarkArray?this.watermark[l]||"":this.watermark),C.className=e,n["default"].add(C,"focus",this.Evt.onInpFocus.bind(this)),o?(h["default"].id(o).appendChild(C),this.externalFltEls.push(C)):a.appendChild(C),this.fltIds.push(this.prfxFlt+l+"_"+this.id),n["default"].add(C,"keypress",this.Evt.detectKey.bind(this)),n["default"].add(C,"keydown",this.Evt.onKeyDown.bind(this)),n["default"].add(C,"keyup",this.Evt.onKeyUp.bind(this)),n["default"].add(C,"blur",this.Evt.onInpBlur.bind(this)),this.rememberGridValues){var b=this.Cpt.store.getFilterValues(this.fltsValuesCookie);" "!=b[l]&&this.setFilterValue(l,b[l],!1)}}if(l==t-1&&this.displayBtn){var m=h["default"].create(this.fltTypeInp,["id",this.prfxValButton+l+"_"+this.id],["type","button"],["value",this.btnText]);m.className=this.btnCssClass,o?h["default"].id(o).appendChild(m):a.appendChild(m),n["default"].add(m,"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.rowsCounter&&(this.Cpt.rowsCounter=new P.RowsCounter(this),this.Cpt.rowsCounter.init()),this.statusBar&&(this.Cpt.statusBar=new S.StatusBar(this),this.Cpt.statusBar.init()),(this.paging||this.Cpt.paging&&this.Cpt.paging.isPagingRemoved)&&(this.Cpt.paging=new L.Paging(this),this.Cpt.paging.init()),this.btnReset&&(this.Cpt.clearButton=new E.ClearButton(this),this.Cpt.clearButton.init()),this.helpInstructions&&(this.Cpt.help||(this.Cpt.help=new D.Help(this)),this.Cpt.help.init()),this.hasColWidths&&!this.gridLayout&&this.setColWidths(),this.alternateBgs&&(this.Cpt.alternateRows=new B.AlternateRows(this),this.Cpt.alternateRows.init()),this.hasColOperation&&(this.Cpt.colOps=new N.ColOps(this),this.Cpt.colOps.calc()),this.sort&&this.importSort(),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&&this.Cpt.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?n.dropdown._build(i,!0):n.dropdown._build(i,!1,l,a);break;case e.checklist:n.checkList._build(i,l,a);break;case e.changepage:n.paging._changePage(r);break;case e.clear:this._clearFilters(),this._filter();break;case e.changeresultsperpage:n.paging._changeResultsPerPage();break;case e.resetvalues:this._resetValues(),this._filter();break;case e.resetpage:n.paging._resetPage(this.pgNbCookie);break;case e.resetpagelength:n.paging._resetPageLength(this.pgLenCookie);break;case e.sort:break;case e.loadextensions:this._loadExtensions();break;case e.loadthemes:this._loadThemes()}this.statusBar&&n.statusBar.message(""),this.loader&&n.loader.show("none")}var s=void 0===arguments[1]?{slcIndex:null,slcExternal:!1,slcId:null,pgIndex:null}:arguments[1],i=s.slcIndex,l=s.slcExternal,a=s.slcId,r=s.pgIndex,n=this.Cpt;this.loader||this.statusBar?(this.loader&&n.loader.show(""),this.statusBar&&n.statusBar.message(this["msg"+t]),O.setTimeout(e.bind(this),this.execDelay)):e.call(this)}},{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,l=t.path,a=void 0;i&&l?a=t.path+i:(i=i.replace(".js",""),a="./extensions/{}/{}".replace(/{}/g,i)),s.e(1,function(s){var l=[s(1)(a)];(function(s){var l=new s(e,t);l.init(),e.ExtRegistry[i]=l}).apply(null,l)})}}},{key:"destroyExtensions",value:function(){for(var t=this.extensions,e=0,s=t.length;s>e;e++){var i=t[e],l=this.ExtRegistry[i.name];l&&(l.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 l=t[s],a=l.name,r=l.path;a&&!r?r=this.themesPath+a+"/"+a+".css":!a&&l.path&&(a="theme{0}".replace("{0}",s)),this.isImported(r,"link")||this["import"](a,r,null,"link")}this.btnResetText=null,this.btnResetHtml='',this.btnPrevPageHtml='',this.btnNextPageHtml='',this.btnFirstPageHtml='',this.btnLastPageHtml='',this.loader=!0,this.loaderHtml='
',this.loaderText=null}},{key:"destroy",value:function(){if(this._hasGrid){var t=this.tbl.rows,e=this.Cpt;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;ss;s++){var i=t[s],l=h["default"].id(i);l&&(l.innerHTML="")}}},{key:"importSort",value:function(){this.loadExtension({name:this.sortConfig.name,path:this.sortConfig.path})}},{key:"performSort",value:function(){this.EvtManager(this.Evt.name.sort)}},{key:"isCustomOptions",value:function(t){return this.hasCustomOptions&&-1!=this.customOptions.cols.indexOf(t)}},{key:"getCustomOptions",value:function(t){if(t&&this.isCustomOptions(t)){for(var e=this.customOptions,s=e.cols,i=[],l=[],a=C["default"].indexByValue(s,t),r=e.values[a],n=e.texts[a],o=e.sorts[a],h=0,u=r.length;u>h;h++)l.push(r[h]),i.push(n[h]?n[h]:r[h]);return o&&(l.sort(),i.sort()),[l,i]}}},{key:"resetValues",value:function(){this.EvtManager(this.Evt.name.resetvalues)}},{key:"_resetValues",value:function(){this.rememberGridValues&&this.fillSlcOnDemand&&this._resetGridValues(this.fltsValuesCookie),this.rememberPageLen&&this.Cpt.paging&&this.Cpt.paging.resetPageLength(this.pgLenCookie),this.rememberPageNb&&this.Cpt.paging&&this.Cpt.paging.resetPage(this.pgNbCookie)}},{key:"_resetGridValues",value:function(t){if(this.fillSlcOnDemand){var e=this.Cpt.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 l=0;lu;u++)""!==a[u]&&(r=h["default"].createOpt(a[u],a[u],!0),o.appendChild(r),this.hasStoredValues=!0)}}else if(n===this.fltTypeCheckList){var p=this.Cpt.checkList,f=p.checkListDiv[l];f.title=f.innerHTML,f.innerHTML="";var c=h["default"].create("ul",["id",this.fltIds[l]],["colIndex",l]);c.className=p.checkListCssClass;var g=h["default"].createCheckItem(this.fltIds[l]+"_0","",this.displayAllText);g.className=p.checkListItemCssClass,c.appendChild(g),f.appendChild(c),a=e[l].split(" "+this.orOperator+" ");for(var u=0,d=a.length;d>u;u++)if(""!==a[u]){var v=h["default"].createCheckItem(this.fltIds[l]+"_"+(u+1),a[u],a[u]);v.className=p.checkListItemCssClass,c.appendChild(v),v.check.checked=!0,p.setCheckListValues(v.check),this.hasStoredValues=!0}}}!this.hasStoredValues&&this.paging&&this.Cpt.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(c,""),t=t.replace(g,""),t=t.replace(v,""),t=t.replace(b,"");var l=t;(n.test(t)||o.test(t)||u.test(t)||p.test(t)||f.test(t))&&(l=h["default"].getText(s)),""!==l&&i.highlightKeyword.highlight(s,l,i.highlightKeyword.highlightCssClass)}}function e(t,e,s){var i=void 0,l=y["default"].removeNbFormat,h=u.test(t),C=n.test(t),x=p.test(t),T=o.test(t),k=f.test(t),I=g.test(t),F=c.test(t),R=v.test(t),P=b.test(t),S=m===t,E=_===t,D=w.test(t),B=h&&M(t.replace(u,""),L),N=C&&M(t.replace(n,""),L),O=x&&M(t.replace(p,""),L),H=T&&M(t.replace(o,""),L),V=k&&M(t.replace(f,""),L),U=I&&M(t.replace(g,""),L),j=void 0,G=void 0;if(M(e,L))j=A(e,L),B?(G=A(t.replace(u,""),L),i=G>j):N?(G=A(t.replace(n,""),L),i=G>=j):H?(G=A(t.replace(o,""),L),i=j>=G):O?(G=A(t.replace(p,""),L),i=j>G):V?(G=A(t.replace(f,""),L),i=j.toString()!=G.toString()):U?(G=A(t.replace(g,""),L),i=j.toString()==G.toString()):c.test(t)?i=this._containsStr(t.replace(c,""),e,null,!1):M(t,L)?(G=A(t,L),i=j.toString()==G.toString()):S?i=d["default"].isEmpty(e):E&&(i=!d["default"].isEmpty(e));else if(this.hasColNbFormat&&this.colNbFormat[s]?(a=l(e,this.colNbFormat[s]),r=this.colNbFormat[s]):","===this.thousandsSeparator&&"."===this.decimalSeparator?(a=l(e,"us"),r="us"):(a=l(e,"eu"),r="eu"),C)i=a<=l(t.replace(n,""),r);else if(T)i=a>=l(t.replace(o,""),r);else if(h)i=al(t.replace(p,""),r);else if(k)i=this._containsStr(t.replace(f,""),e)?!1:!0;else if(F)i=this._containsStr(t.replace(c,""),e,null,!1);else if(I)i=this._containsStr(t.replace(g,""),e,null,!0);else if(R)i=0===e.indexOf(t.replace(v,""))?!0:!1;else if(P){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=d["default"].isEmpty(e);else if(E)i=!d["default"].isEmpty(e);else if(D)try{var q=t.replace(w,""),$=new RegExp(q);i=$.test(e)}catch(K){i=!1}else i=this._containsStr(t,e,this.getFilterType(s));return i}if(this.fltGrid&&(this._hasGrid||this.isFirstLoad)){this.onBeforeFilter&&this.onBeforeFilter.call(null,this);var s=this.tbl.rows,i=this.Cpt,l=0;this.validRowsIndex=[],this.highlightKeywords&&i.highlightKeyword.unhighlightAll(),this.popUpFilters&&i.popupFilter.buildIcons(),this.markActiveColumns&&this.clearActiveColumns(),this.searchArgs=this.getFiltersValue();for(var a,r,n=new RegExp(this.leOperator),o=new RegExp(this.geOperator),u=new RegExp(this.lwOperator),p=new RegExp(this.grOperator),f=new RegExp(this.dfOperator),c=new RegExp(d["default"].rgxEsc(this.lkOperator)),g=new RegExp(this.eqOperator),v=new RegExp(this.stOperator),b=new RegExp(this.enOperator),m=this.emOperator,_=this.nmOperator,w=new RegExp(d["default"].rgxEsc(this.rgxOperator)),x=this.refRow;xP;P++){var S=this.searchArgs[this.singleSearchFlt?0:P],L=this.hasColDateType?this.colDateType[P]:this.defaultDateType;if(""!==S){var E=d["default"].matchCase(this.getCellData(P,T[P]),this.caseSensitive),D=S.split(this.orOperator),B=D.length>1?!0:!1,N=S.split(this.anOperator),O=N.length>1?!0:!1;if(B||O){for(var H=void 0,V=!1,U=B?D:N,j=0,G=U.length;G>j&&(H=d["default"].trim(U[j]),V=e.call(this,H,E,P),t.call(this,H,V,T[P]),!B||!V)&&(!O||V);j++);I[P]=V}else I[P]=e.call(this,d["default"].trim(S),E,P),t.call(this,S,I[P],T[P]);I[P]||(F="include"===this.searchType?!1:!0),this.singleSearchFlt&&I[P]&&(R=!0),this.popUpFilters&&i.popupFilter.buildIcon(P,!0),this.markActiveColumns&&x===this.refRow&&(this.onBeforeActiveColumn&&this.onBeforeActiveColumn.call(null,this,P),h["default"].addClass(this.getHeaderElement(P),this.activeColumnsCssClass),this.onAfterActiveColumn&&this.onAfterActiveColumn.call(null,this,P))}}this.singleSearchFlt&&R&&(F=!0),F?(this.validateRow(x,!0),this.validRowsIndex.push(x),this.alternateBgs&&i.alternateRows.setRowBg(x,this.validRowsIndex.length),this.onRowValidated&&this.onRowValidated.call(null,this,x)):(this.validateRow(x,!1),this.hasVisibleRows&&C["default"].has(this.visibleRows,x)&&!this.paging?this.validRowsIndex.push(x):l++)}}this.nbVisibleRows=this.validRowsIndex.length,this.nbHiddenRows=l,this.isStartBgAlternate=!1,this.rememberGridValues&&i.store.saveFilterValues(this.fltsValuesCookie),this.paging?(this.startPagingRow=0,this.currentPageNb=1,i.paging.setPagingInfo(this.validRowsIndex)):this.applyGridProps(),this.onAfterFilter&&this.onAfterFilter.call(null,this)}}},{key:"applyGridProps",value:function(){this.activeFlt&&d["default"].lower(this.activeFlt.nodeName)===this.fltTypeSlc&&!this.popUpFilters&&(this.activeFlt.blur(),this.activeFlt.parentNode&&this.activeFlt.parentNode.focus());var t=this.Cpt;this.visibleRows&&this.enforceVisibility(),this.hasColOperation&&t.colOps.calc(),this.linkedFilters&&this.linkFilters();var e=!this.paging&&this.hasVisibleRows?this.nbVisibleRows-this.visibleRows.length:this.nbVisibleRows;this.rowsCounter&&t.rowsCounter.refresh(e),this.popUpFilters&&t.popupFilter.closeAll()}},{key:"getColValues",value:function(t,e,s){if(this.fltGrid){for(var i=this.tbl.rows,l=[],a=this.refRow;ah;h++)if(h==t&&""==i[a].style.display){ +!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 l=i[s]={exports:{},id:s,loaded:!1};return t[s].call(l.exports,l,l.exports,e),l.loaded=!0,l.exports}var s=window.webpackJsonp;window.webpackJsonp=function(i,a){for(var r,n,o=0,h=[];o1)for(var s=0,i=arguments.length;i>s;s++){var a=arguments[s],r=typeof a;switch(d["default"].lower(r)){case"number":this.startRow=a;break;case"object":this.cfg=a}}var o=this.cfg;this.refRow=null===this.startRow?2:this.startRow+1;try{this.nbCells=this.getCellsNb(this.refRow)}catch(u){this.nbCells=this.getCellsNb(0)}this.basePath=o.base_path||"tablefilter/",this.extensionsPath=o.extensions_path||this.basePath+"extensions/",this.fltTypeInp="input",this.fltTypeSlc="select",this.fltTypeMulti="multiple",this.fltTypeCheckList="checklist",this.fltTypeNone="none",this.fltGrid=o.grid===!1?!1:!0,this.gridLayout=Boolean(o.grid_layout),this.sourceTblHtml=null,this.gridLayout&&(this.sourceTblHtml=this.tbl.outerHTML),this.filtersRowIndex=o.filters_row_index||0,this.headersRow=o.headers_row_index||(0===this.filtersRowIndex?1:0),this.gridLayout&&(this.headersRow>1?this.filtersRowIndex=this.headersRow+1:(this.filtersRowIndex=1,this.headersRow=0)),this.fltCellTag="th"!==o.filters_cell_tag||"td"!==o.filters_cell_tag?"td":o.filters_cell_tag,this.fltIds=[],this.fltElms=[],this.searchArgs=null,this.tblData=[],this.validRowsIndex=null,this.fltGridEl=null,this.isFirstLoad=!0,this.infDiv=null,this.lDiv=null,this.rDiv=null,this.mDiv=null,this.contDiv=null,this.infDivCssClass=o.inf_div_css_class||"inf",this.lDivCssClass=o.left_div_css_class||"ldiv",this.rDivCssClass=o.right_div_css_class||"rdiv",this.mDivCssClass=o.middle_div_css_class||"mdiv",this.contDivCssClass=o.content_div_css_class||"cont",this.stylesheet=o.stylesheet||this.basePath+"tablefilter.css",this.stylesheetId=this.id+"_style",this.fltsRowCssClass=o.flts_row_css_class||"fltrow",this.enableIcons=o.enable_icons===!1?!1:!0,this.alternateBgs=Boolean(o.alternate_rows),this.hasColWidths=g["default"].isArray(o.col_widths),this.colWidths=this.hasColWidths?o.col_widths:null,this.tBodyH=isNaN(o.tbody_height)?200:o.tbody_height,this.fltCssClass=o.flt_css_class||"flt",this.fltMultiCssClass=o.flt_multi_css_class||"flt_multi",this.fltSmallCssClass=o.flt_small_css_class||"flt_s",this.singleFltCssClass=o.single_flt_css_class||"single_flt",this.isStartBgAlternate=!0,this.enterKey=o.enter_key===!1?!1:!0,this.onBeforeFilter=g["default"].isFn(o.on_before_filter)?o.on_before_filter:null,this.onAfterFilter=g["default"].isFn(o.on_after_filter)?o.on_after_filter:null,this.caseSensitive=Boolean(o.case_sensitive),this.exactMatch=Boolean(o.exact_match),this.linkedFilters=Boolean(o.linked_filters),this.disableExcludedOptions=Boolean(o.disable_excluded_options),this.activeFlt=null,this.activeFilterId=null,this.hasColOperation=Boolean(o.col_operation),this.colOperation=null,this.hasVisibleRows=Boolean(o.rows_always_visible),this.visibleRows=this.hasVisibleRows?o.rows_always_visible:[],this.searchType=o.search_type||"include",this.isExternalFlt=Boolean(o.external_flt_grid),this.externalFltTgtIds=o.external_flt_grid_ids||null,this.externalFltEls=[],this.execDelay=isNaN(o.exec_delay)?100:parseInt(o.exec_delay,10),this.onFiltersLoaded=g["default"].isFn(o.on_filters_loaded)?o.on_filters_loaded:null,this.singleSearchFlt=Boolean(o.single_search_filter),this.onRowValidated=g["default"].isFn(o.on_row_validated)?o.on_row_validated:null,this.customCellDataCols=o.custom_cell_data_cols?o.custom_cell_data_cols:[],this.customCellData=g["default"].isFn(o.custom_cell_data)?o.custom_cell_data:null,this.watermark=o.watermark||"",this.isWatermarkArray=g["default"].isArray(this.watermark),this.toolBarTgtId=o.toolbar_target_id||null,this.helpInstructions=g["default"].isUndef(o.help_instructions)?void 0:Boolean(o.help_instructions),this.popUpFilters=Boolean(o.popup_filters),this.markActiveColumns=Boolean(o.mark_active_columns),this.activeColumnsCssClass=o.active_columns_css_class||"activeHeader",this.onBeforeActiveColumn=g["default"].isFn(o.on_before_active_column)?o.on_before_active_column:null,this.onAfterActiveColumn=g["default"].isFn(o.on_after_active_column)?o.on_after_active_column:null,this.displayAllText=o.display_all_text||"",this.enableEmptyOption=Boolean(o.enable_empty_option),this.emptyText=o.empty_text||"(Empty)",this.enableNonEmptyOption=Boolean(o.enable_non_empty_option),this.nonEmptyText=o.non_empty_text||"(Non empty)",this.onSlcChange=o.on_change===!1?!1:!0,this.sortSlc=o.sort_select===!1?!1:!0,this.isSortNumAsc=Boolean(o.sort_num_asc),this.sortNumAsc=this.isSortNumAsc?o.sort_num_asc:null,this.isSortNumDesc=Boolean(o.sort_num_desc),this.sortNumDesc=this.isSortNumDesc?o.sort_num_desc:null,this.fillSlcOnDemand=Boolean(o.fill_slc_on_demand),this.hasCustomOptions=g["default"].isObj(o.custom_options),this.customOptions=o.custom_options,this.rgxOperator=o.regexp_operator||"rgx:",this.emOperator=o.empty_operator||"[empty]",this.nmOperator=o.nonempty_operator||"[nonempty]",this.orOperator=o.or_operator||"||",this.anOperator=o.and_operator||"&&",this.grOperator=o.greater_operator||">",this.lwOperator=o.lower_operator||"<",this.leOperator=o.lower_equal_operator||"<=",this.geOperator=o.greater_equal_operator||">=",this.dfOperator=o.different_operator||"!",this.lkOperator=o.like_operator||"*",this.eqOperator=o.equal_operator||"=",this.stOperator=o.start_with_operator||"{",this.enOperator=o.end_with_operator||"}",this.curExp=o.cur_exp||"^[¥£€$]",this.separator=o.separator||",",this.rowsCounter=Boolean(o.rows_counter),this.statusBar=Boolean(o.status_bar),this.loader=Boolean(o.loader),this.displayBtn=Boolean(o.btn),this.btnText=o.btn_text||(this.enableIcons?"":"Go"),this.btnCssClass=o.btn_css_class||(this.enableIcons?"btnflt_icon":"btnflt"),this.btnReset=Boolean(o.btn_reset),this.btnResetCssClass=o.btn_reset_css_class||"reset",this.onBeforeReset=g["default"].isFn(o.on_before_reset)?o.on_before_reset:null,this.onAfterReset=g["default"].isFn(o.on_after_reset)?o.on_after_reset:null,this.paging=Boolean(o.paging),this.nbVisibleRows=0,this.nbHiddenRows=0,this.sort=Boolean(o.sort),this.isSortEnabled=!1,this.sortConfig=o.sort_config||{},this.sortConfig.name=this.sortConfig.name||"sort",this.sortConfig.path=this.sortConfig.path||null,this.sortConfig.sortTypes=g["default"].isArray(this.sortConfig.sort_types)?this.sortConfig.sort_types:[],this.sortConfig.sortCol=this.sortConfig.sort_col||null,this.sortConfig.asyncSort=Boolean(this.sortConfig.async_sort),this.sortConfig.triggerIds=g["default"].isArray(this.sortConfig.sort_trigger_ids)?this.sortConfig.sort_trigger_ids:[],this.autoFilter=Boolean(o.auto_filter),this.autoFilterDelay=isNaN(o.auto_filter_delay)?900:o.auto_filter_delay,this.isUserTyping=null,this.autoFilterTimer=null,this.highlightKeywords=Boolean(o.highlight_keywords),this.defaultDateType=o.default_date_type||"DMY",this.thousandsSeparator=o.thousands_separator||",",this.decimalSeparator=o.decimal_separator||".",this.hasColNbFormat=Boolean(o.col_number_format),this.colNbFormat=g["default"].isArray(this.hasColNbFormat)?o.col_number_format:null,this.hasColDateType=g["default"].isArray(o.col_date_type),this.colDateType=this.hasColDateType?o.col_date_type:null,this.msgFilter=o.msg_filter||"Filtering data...",this.msgPopulate=o.msg_populate||"Populating filter...",this.msgPopulateCheckList=o.msg_populate_checklist||"Populating list...",this.msgChangePage=o.msg_change_page||"Collecting paging data...",this.msgClear=o.msg_clear||"Clearing filters...",this.msgChangeResults=o.msg_change_results||"Changing results per page...",this.msgResetValues=o.msg_reset_grid_values||"Re-setting filters values...",this.msgResetPage=o.msg_reset_page||"Re-setting page...",this.msgResetPageLength=o.msg_reset_page_length||"Re-setting page length...",this.msgSort=o.msg_sort||"Sorting data...",this.msgLoadExtensions=o.msg_load_extensions||"Loading extensions...",this.msgLoadThemes=o.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(o.remember_grid_values),this.fltsValuesCookie=this.prfxCookieFltsValues+this.id,this.rememberPageNb=this.paging&&o.remember_page_number,this.pgNbCookie=this.prfxCookiePageNb+this.id,this.rememberPageLen=this.paging&&o.remember_page_length,this.pgLenCookie=this.prfxCookiePageLen+this.id,this.extensions=o.extensions,this.hasExtensions=g["default"].isArray(this.extensions),this.enableDefaultTheme=Boolean(o.enable_default_theme),this.hasThemes=this.enableDefaultTheme||g["default"].isArray(o.themes),this.themes=o.themes||[],this.themesPath=o.themes_path||this.basePath+"themes/",this.Cpt={loader:null,alternateRows:null,colOps:null,rowsCounter:null,gridLayout:null,store:null,highlightKeywords:null,paging:null,checkList:null,dropdown:null,popupFilter:null,clearButton:null,help:null,statusBar:null},this.ExtRegistry={},this.Evt={name:{filter:"Filter",dropdown:"dropdown",checklist:"checkList",changepage:"changePage",clear:"Clear",changeresultsperpage:"changeResults",resetvalues:"ResetValues",resetpage:"resetPage",resetpagelength:"resetPageLength",sort:"Sort",loadextensions:"LoadExtensions",loadthemes:"loadThemes"},detectKey:function(t){if(this.enterKey){var e=t||O.event;if(e){var s=n["default"].keyCode(e);13===s?(this.filter(),n["default"].cancel(e),n["default"].stop(e)):(this.isUserTyping=!0,O.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null)}}},onKeyUp:function(t){function e(){O.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null,this.isUserTyping||(this.filter(),this.isUserTyping=null)}if(this.autoFilter){var s=t||O.event,i=n["default"].keyCode(s);this.isUserTyping=!1,13!==i&&9!==i&&27!==i&&38!==i&&40!==i?null===this.autoFilterTimer&&(this.autoFilterTimer=O.setInterval(e.bind(this),this.autoFilterDelay)):(O.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null)}},onKeyDown:function(){this.autoFilter&&(this.isUserTyping=!0)},onInpBlur:function(){this.autoFilter&&(this.isUserTyping=!1,O.clearInterval(this.autoFilterTimer))},onInpFocus:function(t){var e=t||O.event,s=n["default"].target(e);this.activeFilterId=s.getAttribute("id"),this.activeFlt=h["default"].id(this.activeFilterId),this.popUpFilters&&(n["default"].cancel(e),n["default"].stop(e))},onSlcFocus:function(t){var e=t||O.event,s=n["default"].target(e);if(this.activeFilterId=s.getAttribute("id"),this.activeFlt=h["default"].id(this.activeFilterId),this.fillSlcOnDemand&&"0"===s.getAttribute("filled")){var i=s.getAttribute("ct");this.Cpt.dropdown._build(i)}this.popUpFilters&&(n["default"].cancel(e),n["default"].stop(e))},onSlcChange:function(t){if(this.activeFlt){var e=t||O.event;this.popUpFilters&&n["default"].stop(e),this.onSlcChange&&this.filter()}},onCheckListClick:function(t){var e=t||O.event,s=n["default"].target(e);if(this.fillSlcOnDemand&&"0"===s.getAttribute("filled")){var i=s.getAttribute("ct");this.Cpt.checkList._build(i),this.Cpt.checkList.checkListDiv[i].onclick=null,this.Cpt.checkList.checkListDiv[i].title=""}},onBtnClick:function(){this.filter()}}}}return a(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.singleSearchFlt?1:this.nbCells,e=void 0;if(this["import"](this.stylesheetId,this.stylesheet,null,"link"),this.hasThemes&&this._loadThemes(),(this.rememberGridValues||this.rememberPageNb||this.rememberPageLen)&&(this.Cpt.store=new w.Store(this)),this.gridLayout&&(this.Cpt.gridLayout=new x.GridLayout(this),this.Cpt.gridLayout.init()),this.loader&&(this.Cpt.loader||(this.Cpt.loader=new T.Loader(this))),this.highlightKeywords&&(this.Cpt.highlightKeyword=new k.HighlightKeyword(this)),this.popUpFilters&&(this.Cpt.popupFilter||(this.Cpt.popupFilter=new I.PopupFilter(this)),this.Cpt.popupFilter.init()),this.fltGrid)if(this.isFirstLoad){var s=void 0;if(!this.gridLayout){var i=h["default"].tag(this.tbl,"thead");s=i.length>0?i[0].insertRow(this.filtersRowIndex):this.tbl.insertRow(this.filtersRowIndex),this.headersRow>1&&this.filtersRowIndex<=this.headersRow&&!this.popUpFilters&&this.headersRow++,this.popUpFilters&&this.headersRow++,s.className=this.fltsRowCssClass,!this.isExternalFlt||this.gridLayout&&!this.popUpFilters||(s.style.display="none")}this.nbFilterableRows=this.getRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=this.tbl.rows.length;for(var l=0;t>l;l++){this.popUpFilters&&this.Cpt.popupFilter.build(l);var a=h["default"].create(this.fltCellTag),r=this.getFilterType(l),o=this.isExternalFlt&&this.externalFltTgtIds?this.externalFltTgtIds[l]:null;if(this.singleSearchFlt&&(a.colSpan=this.nbCells),this.gridLayout||s.appendChild(a),e=l==t-1&&this.displayBtn?this.fltSmallCssClass:this.fltCssClass,this.singleSearchFlt&&(r=this.fltTypeInp,e=this.singleFltCssClass),r===this.fltTypeSlc||r===this.fltTypeMulti){this.Cpt.dropdown||(this.Cpt.dropdown=new F.Dropdown(this));var u=this.Cpt.dropdown,p=h["default"].create(this.fltTypeSlc,["id",this.prfxFlt+l+"_"+this.id],["ct",l],["filled","0"]);if(r===this.fltTypeMulti&&(p.multiple=this.fltTypeMulti,p.title=u.multipleSlcTooltip),p.className=d["default"].lower(r)===this.fltTypeSlc?e:this.fltMultiCssClass,o?(h["default"].id(o).appendChild(p),this.externalFltEls.push(p)):a.appendChild(p),this.fltIds.push(this.prfxFlt+l+"_"+this.id),this.fillSlcOnDemand||u._build(l),n["default"].add(p,"keypress",this.Evt.detectKey.bind(this)),n["default"].add(p,"change",this.Evt.onSlcChange.bind(this)),n["default"].add(p,"focus",this.Evt.onSlcFocus.bind(this)),this.fillSlcOnDemand){var f=h["default"].createOpt(this.displayAllText,"");p.appendChild(f)}}else if(r===this.fltTypeCheckList){var c=void 0;this.Cpt.checkList=new R.CheckList(this),c=this.Cpt.checkList;var g=h["default"].create("div",["id",c.prfxCheckListDiv+l+"_"+this.id],["ct",l],["filled","0"]);g.className=c.checkListDivCssClass,o?(h["default"].id(o).appendChild(g),this.externalFltEls.push(g)):a.appendChild(g),c.checkListDiv[l]=g,this.fltIds.push(this.prfxFlt+l+"_"+this.id),this.fillSlcOnDemand||c._build(l),this.fillSlcOnDemand&&(n["default"].add(g,"click",this.Evt.onCheckListClick.bind(this)),g.appendChild(h["default"].text(c.activateCheckListTxt)))}else{var v=r===this.fltTypeInp?"text":"hidden",C=h["default"].create(this.fltTypeInp,["id",this.prfxFlt+l+"_"+this.id],["type",v],["ct",l]);if("hidden"!==v&&this.watermark&&C.setAttribute("placeholder",this.isWatermarkArray?this.watermark[l]||"":this.watermark),C.className=e,n["default"].add(C,"focus",this.Evt.onInpFocus.bind(this)),o?(h["default"].id(o).appendChild(C),this.externalFltEls.push(C)):a.appendChild(C),this.fltIds.push(this.prfxFlt+l+"_"+this.id),n["default"].add(C,"keypress",this.Evt.detectKey.bind(this)),n["default"].add(C,"keydown",this.Evt.onKeyDown.bind(this)),n["default"].add(C,"keyup",this.Evt.onKeyUp.bind(this)),n["default"].add(C,"blur",this.Evt.onInpBlur.bind(this)),this.rememberGridValues){var b=this.Cpt.store.getFilterValues(this.fltsValuesCookie);" "!=b[l]&&this.setFilterValue(l,b[l],!1)}}if(l==t-1&&this.displayBtn){var m=h["default"].create(this.fltTypeInp,["id",this.prfxValButton+l+"_"+this.id],["type","button"],["value",this.btnText]);m.className=this.btnCssClass,o?h["default"].id(o).appendChild(m):a.appendChild(m),n["default"].add(m,"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.rowsCounter&&(this.Cpt.rowsCounter=new P.RowsCounter(this),this.Cpt.rowsCounter.init()),this.statusBar&&(this.Cpt.statusBar=new S.StatusBar(this),this.Cpt.statusBar.init()),(this.paging||this.Cpt.paging&&this.Cpt.paging.isPagingRemoved)&&(this.Cpt.paging=new L.Paging(this),this.Cpt.paging.init()),this.btnReset&&(this.Cpt.clearButton=new E.ClearButton(this),this.Cpt.clearButton.init()),this.helpInstructions&&(this.Cpt.help||(this.Cpt.help=new D.Help(this)),this.Cpt.help.init()),this.hasColWidths&&!this.gridLayout&&this.setColWidths(),this.alternateBgs&&(this.Cpt.alternateRows=new B.AlternateRows(this),this.Cpt.alternateRows.init()),this.hasColOperation&&(this.Cpt.colOps=new N.ColOps(this),this.Cpt.colOps.calc()),this.sort&&this.importSort(),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&&this.Cpt.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?n.dropdown._build(i,!0):n.dropdown._build(i,!1,l,a);break;case e.checklist:n.checkList._build(i,l,a);break;case e.changepage:n.paging._changePage(r);break;case e.clear:this._clearFilters(),this._filter();break;case e.changeresultsperpage:n.paging._changeResultsPerPage();break;case e.resetvalues:this._resetValues(),this._filter();break;case e.resetpage:n.paging._resetPage(this.pgNbCookie);break;case e.resetpagelength:n.paging._resetPageLength(this.pgLenCookie);break;case e.sort:break;case e.loadextensions:this._loadExtensions();break;case e.loadthemes:this._loadThemes()}this.statusBar&&n.statusBar.message(""),this.loader&&n.loader.show("none")}var s=void 0===arguments[1]?{slcIndex:null,slcExternal:!1,slcId:null,pgIndex:null}:arguments[1],i=s.slcIndex,l=s.slcExternal,a=s.slcId,r=s.pgIndex,n=this.Cpt;this.loader||this.statusBar?(this.loader&&n.loader.show(""),this.statusBar&&n.statusBar.message(this["msg"+t]),O.setTimeout(e.bind(this),this.execDelay)):e.call(this)}},{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,l=t.path,a=void 0;i&&l?a=t.path+i:(i=i.replace(".js",""),a="./extensions/{}/{}".replace(/{}/g,i)),s.e(1,function(s){var l=[s(1)(a)];(function(s){var l=new s(e,t);l.init(),e.ExtRegistry[i]=l}).apply(null,l)})}}},{key:"destroyExtensions",value:function(){for(var t=this.extensions,e=0,s=t.length;s>e;e++){var i=t[e],l=this.ExtRegistry[i.name];l&&(l.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 l=t[s],a=l.name,r=l.path;a&&!r?r=this.themesPath+a+"/"+a+".css":!a&&l.path&&(a="theme{0}".replace("{0}",s)),this.isImported(r,"link")||this["import"](a,r,null,"link")}this.btnResetText=null,this.btnResetHtml='',this.btnPrevPageHtml='',this.btnNextPageHtml='',this.btnFirstPageHtml='',this.btnLastPageHtml='',this.loader=!0,this.loaderHtml='
',this.loaderText=null}},{key:"destroy",value:function(){if(this._hasGrid){var t=this.tbl.rows,e=this.Cpt;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;ss;s++){var i=t[s],l=h["default"].id(i);l&&(l.innerHTML="")}}},{key:"importSort",value:function(){this.loadExtension({name:this.sortConfig.name,path:this.sortConfig.path})}},{key:"performSort",value:function(){this.EvtManager(this.Evt.name.sort)}},{key:"isCustomOptions",value:function(t){return this.hasCustomOptions&&-1!=this.customOptions.cols.indexOf(t)}},{key:"getCustomOptions",value:function(t){if(t&&this.isCustomOptions(t)){for(var e=this.customOptions,s=e.cols,i=[],l=[],a=C["default"].indexByValue(s,t),r=e.values[a],n=e.texts[a],o=e.sorts[a],h=0,u=r.length;u>h;h++)l.push(r[h]),i.push(n[h]?n[h]:r[h]);return o&&(l.sort(),i.sort()),[l,i]}}},{key:"resetValues",value:function(){this.EvtManager(this.Evt.name.resetvalues)}},{key:"_resetValues",value:function(){this.rememberGridValues&&this.fillSlcOnDemand&&this._resetGridValues(this.fltsValuesCookie),this.rememberPageLen&&this.Cpt.paging&&this.Cpt.paging.resetPageLength(this.pgLenCookie),this.rememberPageNb&&this.Cpt.paging&&this.Cpt.paging.resetPage(this.pgNbCookie)}},{key:"_resetGridValues",value:function(t){if(this.fillSlcOnDemand){var e=this.Cpt.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 l=0;lu;u++)""!==a[u]&&(r=h["default"].createOpt(a[u],a[u],!0),o.appendChild(r),this.hasStoredValues=!0)}}else if(n===this.fltTypeCheckList){var p=this.Cpt.checkList,f=p.checkListDiv[l];f.title=f.innerHTML,f.innerHTML="";var c=h["default"].create("ul",["id",this.fltIds[l]],["colIndex",l]);c.className=p.checkListCssClass;var g=h["default"].createCheckItem(this.fltIds[l]+"_0","",this.displayAllText);g.className=p.checkListItemCssClass,c.appendChild(g),f.appendChild(c),a=e[l].split(" "+this.orOperator+" ");for(var u=0,d=a.length;d>u;u++)if(""!==a[u]){var v=h["default"].createCheckItem(this.fltIds[l]+"_"+(u+1),a[u],a[u]);v.className=p.checkListItemCssClass,c.appendChild(v),v.check.checked=!0,p.setCheckListValues(v.check),this.hasStoredValues=!0}}}!this.hasStoredValues&&this.paging&&this.Cpt.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(c,""),t=t.replace(g,""),t=t.replace(v,""),t=t.replace(b,"");var l=t;(n.test(t)||o.test(t)||u.test(t)||p.test(t)||f.test(t))&&(l=h["default"].getText(s)),""!==l&&i.highlightKeyword.highlight(s,l,i.highlightKeyword.highlightCssClass)}}function e(t,e,s){var i=void 0,l=y["default"].removeNbFormat,h=u.test(t),C=n.test(t),x=p.test(t),T=o.test(t),k=f.test(t),I=g.test(t),F=c.test(t),R=v.test(t),P=b.test(t),S=m===t,E=_===t,D=w.test(t),B=h&&M(t.replace(u,""),L),N=C&&M(t.replace(n,""),L),O=x&&M(t.replace(p,""),L),H=T&&M(t.replace(o,""),L),V=k&&M(t.replace(f,""),L),U=I&&M(t.replace(g,""),L),j=void 0,G=void 0;if(M(e,L))j=A(e,L),B?(G=A(t.replace(u,""),L),i=G>j):N?(G=A(t.replace(n,""),L),i=G>=j):H?(G=A(t.replace(o,""),L),i=j>=G):O?(G=A(t.replace(p,""),L),i=j>G):V?(G=A(t.replace(f,""),L),i=j.toString()!=G.toString()):U?(G=A(t.replace(g,""),L),i=j.toString()==G.toString()):c.test(t)?i=this._containsStr(t.replace(c,""),e,null,!1):M(t,L)?(G=A(t,L),i=j.toString()==G.toString()):S?i=d["default"].isEmpty(e):E&&(i=!d["default"].isEmpty(e));else if(this.hasColNbFormat&&this.colNbFormat[s]?(a=l(e,this.colNbFormat[s]),r=this.colNbFormat[s]):","===this.thousandsSeparator&&"."===this.decimalSeparator?(a=l(e,"us"),r="us"):(a=l(e,"eu"),r="eu"),C)i=a<=l(t.replace(n,""),r);else if(T)i=a>=l(t.replace(o,""),r);else if(h)i=al(t.replace(p,""),r);else if(k)i=this._containsStr(t.replace(f,""),e)?!1:!0;else if(F)i=this._containsStr(t.replace(c,""),e,null,!1);else if(I)i=this._containsStr(t.replace(g,""),e,null,!0);else if(R)i=0===e.indexOf(t.replace(v,""))?!0:!1;else if(P){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=d["default"].isEmpty(e);else if(E)i=!d["default"].isEmpty(e);else if(D)try{var q=t.replace(w,""),$=new RegExp(q);i=$.test(e)}catch(K){i=!1}else i=this._containsStr(t,e,this.getFilterType(s));return i}if(this.fltGrid&&(this._hasGrid||this.isFirstLoad)){this.onBeforeFilter&&this.onBeforeFilter.call(null,this);var s=this.tbl.rows,i=this.Cpt,l=0;this.validRowsIndex=[],this.highlightKeywords&&i.highlightKeyword.unhighlightAll(),this.popUpFilters&&i.popupFilter.buildIcons(),this.markActiveColumns&&this.clearActiveColumns(),this.searchArgs=this.getFiltersValue();for(var a,r,n=new RegExp(this.leOperator),o=new RegExp(this.geOperator),u=new RegExp(this.lwOperator),p=new RegExp(this.grOperator),f=new RegExp(this.dfOperator),c=new RegExp(d["default"].rgxEsc(this.lkOperator)),g=new RegExp(this.eqOperator),v=new RegExp(this.stOperator),b=new RegExp(this.enOperator),m=this.emOperator,_=this.nmOperator,w=new RegExp(d["default"].rgxEsc(this.rgxOperator)),x=this.refRow;xP;P++){var S=this.searchArgs[this.singleSearchFlt?0:P],L=this.hasColDateType?this.colDateType[P]:this.defaultDateType;if(""!==S){var E=d["default"].matchCase(this.getCellData(P,T[P]),this.caseSensitive),D=S.split(this.orOperator),B=D.length>1?!0:!1,N=S.split(this.anOperator),O=N.length>1?!0:!1;if(B||O){for(var H=void 0,V=!1,U=B?D:N,j=0,G=U.length;G>j&&(H=d["default"].trim(U[j]),V=e.call(this,H,E,P),t.call(this,H,V,T[P]),!B||!V)&&(!O||V);j++);I[P]=V}else I[P]=e.call(this,d["default"].trim(S),E,P),t.call(this,S,I[P],T[P]);I[P]||(F="include"===this.searchType?!1:!0),this.singleSearchFlt&&I[P]&&(R=!0),this.popUpFilters&&i.popupFilter.buildIcon(P,!0),this.markActiveColumns&&x===this.refRow&&(this.onBeforeActiveColumn&&this.onBeforeActiveColumn.call(null,this,P),h["default"].addClass(this.getHeaderElement(P),this.activeColumnsCssClass),this.onAfterActiveColumn&&this.onAfterActiveColumn.call(null,this,P))}}this.singleSearchFlt&&R&&(F=!0),F?(this.validateRow(x,!0),this.validRowsIndex.push(x),this.alternateBgs&&i.alternateRows.setRowBg(x,this.validRowsIndex.length),this.onRowValidated&&this.onRowValidated.call(null,this,x)):(this.validateRow(x,!1),this.hasVisibleRows&&C["default"].has(this.visibleRows,x)&&!this.paging?this.validRowsIndex.push(x):l++)}}this.nbVisibleRows=this.validRowsIndex.length,this.nbHiddenRows=l,this.isStartBgAlternate=!1,this.rememberGridValues&&i.store.saveFilterValues(this.fltsValuesCookie),this.paging?(this.startPagingRow=0,this.currentPageNb=1,i.paging.setPagingInfo(this.validRowsIndex)):this.applyGridProps(),this.onAfterFilter&&this.onAfterFilter.call(null,this)}}},{key:"applyGridProps",value:function(){this.activeFlt&&d["default"].lower(this.activeFlt.nodeName)===this.fltTypeSlc&&!this.popUpFilters&&(this.activeFlt.blur(),this.activeFlt.parentNode&&this.activeFlt.parentNode.focus());var t=this.Cpt;this.visibleRows&&this.enforceVisibility(),this.hasColOperation&&t.colOps.calc(),this.linkedFilters&&this.linkFilters();var e=!this.paging&&this.hasVisibleRows?this.nbVisibleRows-this.visibleRows.length:this.nbVisibleRows;this.rowsCounter&&t.rowsCounter.refresh(e),this.popUpFilters&&t.popupFilter.closeAll()}},{key:"getColValues",value:function(t,e,s){if(this.fltGrid){for(var i=this.tbl.rows,l=[],a=this.refRow;ah;h++)if(h==t&&""==i[a].style.display){ var u=d["default"].lower(this.getCellData(h,n[h])),p=this.colNbFormat?this.colNbFormat[t]:null,f=e?y["default"].removeNbFormat(u,p):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 l=0,a=s.options.length;a>l;l++)s.options[l].selected&&(e=e.concat(s.options[l].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(d["default"].trim(d["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,l=this.fltIds.length;l>i;i++){var a=this.getFilterType(i);if(a===d["default"].lower(t)){var r=e?i:this.fltIds[i];s.push(r)}}return s}}},{key:"getFilterElement",value:function(t){var e=this.fltIds[t];return h["default"].id(e)}},{key:"getCellsNb",value:function(){var t=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,e){return void 0!==t&&e?this.customCellData&&C["default"].has(this.customCellDataCols,t)?this.customCellData.call(null,this,e,t):h["default"].getText(e):""}},{key:"getTableData",value:function(){for(var t=this.tbl.rows,e=this.refRow;el;l++){var r=this.getCellData(l,i[l]);s[1].push(r)}this.tblData.push(s)}return this.tblData}},{key:"getFilteredData",value:function(t){if(!this.validRowsIndex)return[];var e=this.tbl.rows,s=[];if(t){for(var i=this.gridLayout?this.Cpt.gridLayout.headTbl:this.tbl,l=i.rows[this.headersRow],a=[l.rowIndex,[]],r=0;ri;i++){var a=e[i],r=a[1],n=r[t];s.push(n)}return s}},{key:"getRowDisplay",value:function(t){return this.fltGrid&&g["default"].isObj(t)?t.style.display:void 0}},{key:"validateRow",value:function(t,e){var s=this.tbl.rows[t];if(s&&"boolean"===d["default"].lower(typeof e)){this.hasVisibleRows&&C["default"].has(this.visibleRows,t)&&!this.paging&&(e=!0);var i=e?"":"none",l=e?"true":"false";s.style.display=i,this.paging&&s.setAttribute("validRow",l)}}},{key:"validateAllRows",value:function(){if(this._hasGrid){this.validRowsIndex=[];for(var t=this.refRow;ta;a++){var n=s.options[a];(""===l||""===l[0])&&(n.selected=!1),""===n.value&&(n.selected=!1),""!==n.value&&C["default"].has(l,n.value,!0)&&(n.selected=!0)}else if(i===this.fltTypeCheckList){e=d["default"].matchCase(e,this.caseSensitive);var o=e.split(" "+this.orOperator+" "),u=h["default"].tag(s,"li").length;s.setAttribute("value",""),s.setAttribute("indexes","");for(var p=0;u>p;p++){var f=h["default"].tag(s,"li")[p],c=h["default"].tag(f,"label")[0],g=h["default"].tag(f,"input")[0],v=d["default"].matchCase(h["default"].getText(c),this.caseSensitive);""!==v&&C["default"].has(o,v,!0)?(g.checked=!0,this.Cpt.checkList.setCheckListValues(g)):(g.checked=!1,this.Cpt.checkList.setCheckListValues(g))}}}}},{key:"setColWidths",value:function(t){function e(t){var e=this.nbCells,s=this.colWidths;if(e!=s.length||e!=t.cells.length)throw new Error("Columns number mismatch!");for(var i=0;e>i;i++)t.cells[i].style.width=s[i]}if(this.fltGrid&&this.hasColWidths){var s=void 0;s=void 0===t?"none"!=this.tbl.rows[0].style.display?0:1:t,e.call(this,this.tbl.rows[s])}}},{key:"enforceVisibility",value:function(){if(this._hasGrid&&this.hasVisibleRows&&!this.paging)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.activeFilterId="",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.fltIds.length;e>t;t++)h["default"].removeClass(this.getHeaderElement(t),this.activeColumnsCssClass)}},{key:"linkFilters",value:function(){var t=this.getFiltersByType(this.fltTypeSlc,!0),e=this.getFiltersByType(this.fltTypeMulti,!0),s=this.getFiltersByType(this.fltTypeCheckList,!0),i=t.concat(e);if(i=i.concat(s),this.activeFilterId){var l=this.activeFilterId.split("_")[0];l=l.split(this.prfxFlt)[1];for(var a=void 0,r=0,n=i.length;n>r;r++){var o=h["default"].id(this.fltIds[i[r]]);if(a=this.getFilterValue(i[r]),l!==i[r]||this.paging&&C["default"].has(t,i[r])&&l===i[r]||!this.paging&&(C["default"].has(s,i[r])||C["default"].has(e,i[r]))||a===this.displayAllText){if(C["default"].has(s,i[r])?this.Cpt.checkList.checkListDiv[i[r]].innerHTML="":o.innerHTML="",this.fillSlcOnDemand){var u=h["default"].createOpt(this.displayAllText,"");o&&o.appendChild(u)}C["default"].has(s,i[r])?this.Cpt.checkList._build(i[r]):this.Cpt.dropdown._build(i[r],!0),this.setFilterValue(i[r],a)}}}}},{key:"_resetGrid",value:function(){if(!this.isFirstLoad){var t=this.Cpt,e=this.tbl,s=e.rows,i=this.filtersRowIndex,l=s[i];if(this.gridLayout||l.parentNode.insertBefore(this.fltGridEl,l),this.isExternalFlt)for(var a=this.externalFltTgtIds,r=0,n=a.length;n>r;r++){var o=h["default"].id(a[r]);if(o){var u=this.externalFltEls[r];o.appendChild(u);var d=this.getFilterType(r);this.gridLayout&&""===u.innerHTML&&d!==this.fltTypeInp&&((d===this.fltTypeSlc||d===this.fltTypeMulti)&&t.dropdown.build(r),d===this.fltTypeCheckList&&t.checkList.build(r))}}this.nbFilterableRows=this.getRowsNb(),this.nbVisibleRows=this.nbFilterableRows,this.nbRows=s.length,this.isSortEnabled&&(this.sort=!0),this.popUpFilters&&(this.headersRow++,t.popupFilter.buildAll()),this.gridLayout||h["default"].addClass(this.tbl,this.prfxTf),this._hasGrid=!0}}},{key:"_containsStr",value:function(t,e,s,i){var l=void 0,a=this.caseSensitive?"g":"gi",r=i?i:this.exactMatch;return l=r||s!==this.fltTypeInp&&s?new RegExp("(^\\s*)"+d["default"].rgxEsc(t)+"(\\s*$)",a):new RegExp(d["default"].rgxEsc(t),a),l.test(e)}},{key:"isImported",value:function(t,e){for(var s=!1,i=e?e:"script",l="script"==i?"src":"href",a=h["default"].tag(H,i),r=0,n=a.length;n>r;r++)if(void 0!==a[r][l]&&a[r][l].match(t)){s=!0;break}return s}},{key:"import",value:function(t,e,s,i){var l=i?i:"script",a=this.isImported(e,l);if(!a){var r=this,n=!1,o=void 0,u=h["default"].tag(H,"head")[0];o="link"===d["default"].lower(l)?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(){n||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(n=!0,"function"==typeof s&&s.call(null,r))},o.onerror=function(){throw new Error("TF script could not load: "+e)},u.appendChild(o)}}},{key:"hasGrid",value:function(){return this._hasGrid}},{key:"getFiltersId",value:function(){return this.fltIds||[]}},{key:"getValidRows",value:function(t){if(this._hasGrid){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;ii;i++)e(s[i]);return t},matchCase:function(t,e){return e?t:this.lower(t)}},t.exports=e["default"]},function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]={write:function(t,e,s){var i="";s&&(i=new Date((new Date).getTime()+36e5*s),i="; expires="+i.toGMTString()),document.cookie=t+"="+escape(e)+i},read:function(t){var e="",s=t+"=";if(document.cookie.length>0){var i=document.cookie,l=i.indexOf(s);if(-1!==l){l+=s.length;var a=i.indexOf(";",l);-1===a&&(a=i.length),e=unescape(i.substring(l,a))}}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,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=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===i}},t.exports=e["default"]},function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(e,"__esModule",{value:!0});var l=s(4),a=i(l);e["default"]={has:function(t,e,s){for(var i=void 0===s?!1:s,l=0;l2)return t;var e=void 0;return 99>=t&&t>50&&(e="19"+t),(50>t||"00"===t)&&(e="20"+t),e}function l(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,l=void 0;if("Y"==e.substring(0,1)?(i=/^\d{2}(\-|\/|\.)\d{1,2}\1\d{1,2}$/,l=/^\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}$/):"Y"==e.substring(1,2)?(i=/^\d{1,2}(\-|\/|\.)\d{2}\1\d{1,2}$/,l=/^\d{1,2}(\-|\/|\.)\d{4}\1\d{1,2}$/):(i=/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{2}$/,l=/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/),i.test(t)===!1&&l.test(t)===!1)return!1;var a=t.split(RegExp.$1),r=void 0,n=void 0,o=void 0;r="M"===e.substring(0,1)?a[0]:"M"===e.substring(1,2)?a[1]:a[2],n="D"===e.substring(0,1)?a[0]:"D"===e.substring(1,2)?a[1]:a[2],o="Y"===e.substring(0,1)?a[0]:"Y"===e.substring(1,2)?a[1]:a[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(r,10)-1,parseInt(n,10),0,0,0,0);return parseInt(n,10)!=h.getDate()?!1:parseInt(r,10)-1!=h.getMonth()?!1:!0},format:function(t,e){if(e||(e="DMY"),!t||""===t)return new Date(1001,0,1);var s=void 0;switch(e.toUpperCase()){case"DDMMMYYYY":parts=t.replace(/[- \/.]/g," ").split(" "),s=new Date(i(parts[2]),l(parts[1])-1,parts[0]);break;case"DMY":parts=t.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),s=new Date(i(parts[2]),parts[1]-1,parts[0]);break;case"MDY":parts=t.replace(/^(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),s=new Date(i(parts[2]),parts[0]-1,parts[1]);break;case"YMD":parts=t.replace(/^((\d\d)?\d\d)([- \/.])(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])$/,"$1 $4 $6").split(" "),s=new Date(i(parts[0]),parts[1]-1,parts[2]);break;default:parts=t.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),s=new Date(i(parts[2]),parts[1]-1,parts[0])}return s}},t.exports=e["default"]},function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}};Object.defineProperty(e,"__esModule",{value:!0});var l=s(4),a=i(l);e["default"]={isIE:function(){return/msie|MSIE/.test(navigator.userAgent)},removeNbFormat:function(t,e){if(t){e||(e="us");var s=t;return s="us"===a["default"].lower(e)?+s.replace(/[^\d\.-]/g,""):+s.replace(/[^\d\,-]/g,"").replace(",",".")}}},t.exports=e["default"]},function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}},l=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a=function(){function t(t,e){for(var s=0;s0&&i.removeChild(I[0]),this.headTbl.style.tableLayout="fixed",i.style.tableLayout="fixed",this.headTbl.cellPadding=i.cellPadding,this.headTbl.cellSpacing=i.cellSpacing,e.setColWidths(),this.headTblCont.style.width=this.tblCont.clientWidth+"px",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}),s.sort!==!1&&(e.sort=!0,e.sortConfig.asyncSort=!0,e.sortConfig.triggerIds=v),this.tblHasColTag=n["default"].tag(i,"col").length>0?!0:!1;var F=function(t){if(t){for(var s=e.nbCells-1;s>=0;s--){var l=n["default"].create("col",["id",e.id+"_col_"+s]);i.firstChild.parentNode.insertBefore(l,i.firstChild),l.style.width=e.colWidths[s],t.gridColElms[s]=l}t.tblHasColTag=!0}};if(this.tblHasColTag)for(var R=n["default"].tag(i,"col"),P=0;P',this.popUpDivCssClass=s.popup_div_css_class||"popUpFilter",this.onBeforePopUpOpen=n["default"].isFn(s.on_before_popup_filter_open)?s.on_before_popup_filter_open:null,this.onAfterPopUpOpen=n["default"].isFn(s.on_after_popup_filter_open)?s.on_after_popup_filter_open:null,this.onBeforePopUpClose=n["default"].isFn(s.on_before_popup_filter_close)?s.on_before_popup_filter_close:null,this.onAfterPopUpClose=n["default"].isFn(s.on_after_popup_filter_close)?s.on_after_popup_filter_close:null,this.popUpFltSpans=[],this.popUpFltImgs=[],this.popUpFltElms=this.popUpFltElmCache||[],this.popUpFltAdjustToContainer=!0,this.prfxPopUpSpan="popUpSpan_",this.prfxPopUpDiv="popUpDiv_",this.tf=t}return a(e,[{key:"onClick",value:function(e){var s=e||t.event,i=s.target.parentNode,l=parseInt(i.getAttribute("ci"),10);if(this.closeAll(l),this.toggle(l),this.popUpFltAdjustToContainer){var a=this.popUpFltElms[l],r=this.tf.getHeaderElement(l),n=.95*r.clientWidth;if(f["default"].isIE()){var o=h["default"].position(r).left;a.style.left=o+"px"}a.style.width=parseInt(n,10)+"px"}d["default"].cancel(s),d["default"].stop(s)}},{key:"init",value:function(){for(var t=this,e=this.tf,s=0;sy;y++)if(t===y&&(!e||e&&l.disableExcludedOptions)||t==y&&e&&(""===o[b].style.display&&!l.paging||l.paging&&(!l.validRowsIndex||l.validRowsIndex&&h["default"].has(l.validRowsIndex,b))&&(void 0===p||p==t||p!=t&&h["default"].has(l.validRowsIndex,b)))){var w=l.getCellData(y,m[y]),x=d["default"].matchCase(w,u);if(h["default"].has(this.opts,x,u)||this.opts.push(w),e&&l.disableExcludedOptions){var T=C[y];T||(T=this.GetFilteredDataCol(y)),h["default"].has(T,x,u)||h["default"].has(v,x,u)||this.isFirstLoad||v.push(w)}}}if(this.isCustom){var k=l.getCustomOptions(t);this.opts=k[0],this.optsTxt=k[1]}if(l.sortSlc&&!this.isCustom&&(u?(this.opts.sort(),v&&v.sort()):(this.opts.sort(f["default"].ignoreCase),v&&v.sort(f["default"].ignoreCase))),l.sortNumAsc&&h["default"].has(l.sortNumAsc,t))try{this.opts.sort(numSortAsc),v&&v.sort(numSortAsc),this.isCustom&&this.optsTxt.sort(numSortAsc)}catch(I){this.opts.sort(),v&&v.sort(),this.isCustom&&this.optsTxt.sort()}if(l.sortNumDesc&&h["default"].has(l.sortNumDesc,t))try{this.opts.sort(numSortDesc),v&&v.sort(numSortDesc),this.isCustom&&this.optsTxt.sort(numSortDesc)}catch(I){this.opts.sort(),v&&v.sort(),this.isCustom&&this.optsTxt.sort()}this.addOptions(t,r,e,v,c,g)}}},{key:"addOptions",value:function(t,e,s,i,l,a){var r=this.tf,o=d["default"].lower(this.slcFillingMethod),u=e.value;e.innerHTML="",e=this.addFirstOption(e);for(var p=0;p"+c+""}else{var C;C=r.fillSlcOnDemand&&u===this.opts[p]&&r["col"+t]===r.fltTypeSlc?n["default"].createOpt(c,f,!0):r["col"+t]!==r.fltTypeMulti?n["default"].createOpt(c,f," "!==l[t]&&f===l[t]?!0:!1):n["default"].createOpt(c,f,h["default"].has(a,d["default"].matchCase(this.opts[p],r.matchCase),r.matchCase)||-1!==a.toString().indexOf(f)?!0:!1),g&&(C.disabled=!0),e.appendChild(C)}}"innerhtml"===o&&(e.innerHTML+=this.slcInnerHtml),e.setAttribute("filled","1")}},{key:"addFirstOption",value:function(t){var e=this.tf,s=d["default"].lower(this.slcFillingMethod);if("innerhtml"===s)this.slcInnerHtml+='";else{var i=n["default"].createOpt(this.enableSlcResetFilter?e.displayAllText:"","");if(this.enableSlcResetFilter||(i.style.display="none"),t.appendChild(i),e.enableEmptyOption){var l=n["default"].createOpt(e.emptyText,e.emOperator);t.appendChild(l)}if(e.enableNonEmptyOption){var a=n["default"].createOpt(e.nonEmptyText,e.nmOperator);t.appendChild(a)}}return t}}]),t}();e.Dropdown=c},function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}},l=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a=function(){function t(t,e){for(var s=0;s_;_++)if(t===_&&(!l.refreshFilters||l.refreshFilters&&l.disableExcludedOptions)||t===_&&l.refreshFilters&&(""===u[C].style.display&&!l.paging||l.paging&&(!p||p===t||p!=t&&h["default"].has(l.validRowsIndex,C)))){var y=l.getCellData(_,b[_]),w=d["default"].matchCase(y,l.matchCase);h["default"].has(this.opts,w,l.matchCase)||this.opts.push(y);var x=v[_];l.refreshFilters&&l.disableExcludedOptions&&(x||(v[_]=l.GetFilteredDataCol(_)),h["default"].has(x,w,l.matchCase)||h["default"].has(c,w,l.matchCase)||l.isFirstLoad||c.push(y))}}if(this.isCustom){var T=l.getCustomOptions(t);this.opts=T[0],this.optsTxt=T[1]}if(l.sortSlc&&!this.isCustom&&(l.matchCase?(this.opts.sort(),c&&c.sort()):(this.opts.sort(f["default"].ignoreCase),c&&c.sort(f["default"].ignoreCase))),l.sortNumAsc&&h["default"].has(l.sortNumAsc,t))try{this.opts.sort(numSortAsc),c&&c.sort(numSortAsc),this.isCustom&&this.optsTxt.sort(numSortAsc)}catch(k){this.opts.sort(),c&&c.sort(),this.isCustom&&this.optsTxt.sort()}if(l.sortNumDesc&&h["default"].has(l.sortNumDesc,t))try{this.opts.sort(numSortDesc),c&&c.sort(numSortDesc),this.isCustom&&this.optsTxt.sort(numSortDesc)}catch(k){this.opts.sort(),c&&c.sort(),this.isCustom&&this.optsTxt.sort()}this.addChecks(t,o,l.separator),l.fillSlcOnDemand&&(r.innerHTML=""),r.appendChild(o),r.setAttribute("filled","1")}}},{key:"addChecks",value:function(t,e){var s=this,i=this.tf,l=this.addTChecks(t,e),a=[],r=i.Cpt.store,o=r?r.getFilterValues(i.fltsValuesCookie)[t]:null;o&&d["default"].trim(o).length>0&&(i.hasCustomSlcOptions&&h["default"].has(i.customSlcOptions.cols,t)?a.push(o):a=o.split(" "+i.orOperator+" "));for(var u=0;u0?1:0),a=l+i.pagingLength-1<=e.nbVisibleRows?l+i.pagingLength-1:e.nbVisibleRows;s=l+this.fromToTextSeparator+a+this.overText+e.nbVisibleRows}}else s=t&&""!==t?t:e.nbFilterableRows-e.nbHiddenRows-(e.hasVisibleRows?e.visibleRows.length:0);this.rowsCounterSpan.innerHTML=s,this.onAfterRefreshCounter&&this.onAfterRefreshCounter.call(null,e,this.rowsCounterSpan,s)}}},{key:"destroy",value:function(){var t=this.tf;t.hasGrid()&&this.rowsCounterSpan&&(!this.rowsCounterTgtId&&this.rowsCounterDiv?d["default"].isIE()?this.rowsCounterDiv.outerHTML="":this.rowsCounterDiv.parentNode.removeChild(this.rowsCounterDiv):n["default"].id(this.rowsCounterTgtId).innerHTML="",this.rowsCounterSpan=null,this.rowsCounterDiv=null)}}]),t}();e.RowsCounter=p},function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}},l=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a=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||(e.enableIcons?'':null),this.btnPrevPageHtml=s.btn_prev_page_html||(e.enableIcons?'':null),this.btnFirstPageHtml=s.btn_first_page_html||(e.enableIcons?'':null),this.btnLastPageHtml=s.btn_last_page_html||(e.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||e.fltTypeSlc,this.onBeforeChangePage=h["default"].isFn(s.on_before_change_page)?s.on_before_change_page:null,this.onAfterChangePage=h["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,a=this.nbRows;this.nbPages=Math.ceil((a-i)/this.pagingLength);var r=this;this.evt={slcIndex:function(){return r.pageSelectorType===e.fltTypeSlc?r.pagingSlc.options.selectedIndex:parseInt(r.pagingSlc.value,10)-1},nbOpts:function(){return r.pageSelectorType===e.fltTypeSlc?parseInt(r.pagingSlc.options.length,10)-1:r.nbPages-1},next:function(){var t=r.evt.slcIndex()0?r.evt.slcIndex()-1:r.evt.nbOpts();r.changePage(t)},last:function(){r.changePage(r.evt.nbOpts())},first:function(){r.changePage(0)},_detectKey:function(t){var s=f["default"].keyCode(t);13===s&&(e.sorted?(e.filter(),r.changePage(r.evt.slcIndex())):r.changePage(),this.blur())},slcPagesChange:null,nextEvt:null,prevEvt:null,lastEvt:null,firstEvt:null},this.tf=e}return a(t,[{key:"init",value:function(){var t,e=this,s=this.tf,i=this.evt;this.hasResultsPerPage&&(this.resultsPerPage.length<2?this.hasResultsPerPage=!1:(this.pagingLength=this.resultsPerPage[1][0],this.setResultsPerPage())),i.slcPagesChange=function(t){e.changePage(),t.target.blur()},this.pageSelectorType===s.fltTypeSlc&&(t=n["default"].create(s.fltTypeSlc,["id",this.prfxSlcPages+s.id]),t.className=this.pgSlcCssClass,f["default"].add(t,"change",i.slcPagesChange)),this.pageSelectorType===s.fltTypeInp&&(t=n["default"].create(s.fltTypeInp,["id",this.prfxSlcPages+s.id],["value",this.currentPageNb]),t.className=this.pgInpCssClass,f["default"].add(t,"keypress",i._detectKey));var l=n["default"].create("span",["id",this.prfxBtnNextSpan+s.id]),a=n["default"].create("span",["id",this.prfxBtnPrevSpan+s.id]),r=n["default"].create("span",["id",this.prfxBtnLastSpan+s.id]),o=n["default"].create("span",["id",this.prfxBtnFirstSpan+s.id]);if(this.hasPagingBtns){if(this.btnNextPageHtml)l.innerHTML=this.btnNextPageHtml,f["default"].add(l,"click",i.next);else{var h=n["default"].create(s.fltTypeInp,["id",this.prfxBtnNext+s.id],["type","button"],["value",this.btnNextPageText],["title","Next"]);h.className=this.btnPageCssClass,f["default"].add(h,"click",i.next),l.appendChild(h)}if(this.btnPrevPageHtml)a.innerHTML=this.btnPrevPageHtml,f["default"].add(a,"click",i.prev);else{var u=n["default"].create(s.fltTypeInp,["id",this.prfxBtnPrev+s.id],["type","button"],["value",this.btnPrevPageText],["title","Previous"]);u.className=this.btnPageCssClass,f["default"].add(u,"click",i.prev),a.appendChild(u)}if(this.btnLastPageHtml)r.innerHTML=this.btnLastPageHtml,f["default"].add(r,"click",i.last);else{var d=n["default"].create(s.fltTypeInp,["id",this.prfxBtnLast+s.id],["type","button"],["value",this.btnLastPageText],["title","Last"]);d.className=this.btnPageCssClass,f["default"].add(d,"click",i.last),r.appendChild(d)}if(this.btnFirstPageHtml)o.innerHTML=this.btnFirstPageHtml,f["default"].add(o,"click",i.first);else{var p=n["default"].create(s.fltTypeInp,["id",this.prfxBtnFirst+s.id],["type","button"],["value",this.btnFirstPageText],["title","First"]);p.className=this.btnPageCssClass,f["default"].add(p,"click",i.first),o.appendChild(p)}}this.pagingTgtId||s.setToolbar();var c=this.pagingTgtId?n["default"].id(this.pagingTgtId):s.mDiv;c.appendChild(o),c.appendChild(a);var g=n["default"].create("span",["id",this.prfxPgBeforeSpan+s.id]);g.appendChild(n["default"].text(this.pageText)),g.className=this.nbPgSpanCssClass,c.appendChild(g),c.appendChild(t);var v=n["default"].create("span",["id",this.prfxPgAfterSpan+s.id]);v.appendChild(n["default"].text(this.ofText)),v.className=this.nbPgSpanCssClass,c.appendChild(v);var C=n["default"].create("span",["id",this.prfxPgSpan+s.id]);C.className=this.nbPgSpanCssClass,C.appendChild(n["default"].text(" "+this.nbPages+" ")),c.appendChild(C),c.appendChild(l),c.appendChild(r),this.pagingSlc=n["default"].id(this.prfxSlcPages+s.id),(!s.rememberGridValues||this.isPagingRemoved)&&this.setPagingInfo(),s.fltGrid||(s.validateAllRows(),this.setPagingInfo(s.validRowsIndex)),this.isPagingRemoved=!1}},{key:"addPaging",value:function(){var t=void 0===arguments[0]?!1:arguments[0],e=this.tf;e.hasGrid()&&!e.paging&&(e.paging=!0,this.isPagingRemoved=!0,this.init(),e.resetValues(),t&&e.filter())}},{key:"setPagingInfo",value:function(t){var e=this.tf,s=e.tbl.rows,i=this.pagingTgtId?n["default"].id(this.pagingTgtId):e.mDiv,l=n["default"].id(this.prfxPgSpan+e.id);if(t&&t.length>0)e.validRowsIndex=t;else{e.validRowsIndex=[];for(var a=e.refRow;a0)if(i.style.visibility="visible",this.pageSelectorType===e.fltTypeSlc)for(var h=0;h=this.startPagingRow&&i>l?("true"!==a.getAttribute("validRow")&&a.getAttribute("validRow")||(a.style.display=""),e.alternateBgs&&e.Cpt.alternateRows&&e.Cpt.alternateRows.setRowBg(e.validRowsIndex[l],l)):(a.style.display="none",e.alternateBgs&&e.Cpt.alternateRows&&e.Cpt.alternateRows.removeRowBg(e.validRowsIndex[l]))}e.nbVisibleRows=e.validRowsIndex.length,e.isStartBgAlternate=!1,e.applyGridProps()}},{key:"setPage",value:function(t){var e=this.tf;if(e.hasGrid()&&e.paging){var s=this.evt,i=typeof t;if("string"===i)switch(d["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=n["default"].create(e.fltTypeSlc,["id",this.prfxSlcResults+e.id]);i.className=e.resultsSlcCssClass;var l=this.resultsPerPage[0],a=this.resultsPerPage[1],r=n["default"].create("span",["id",this.prfxSlcResultsTxt+e.id]);r.className=this.resultsSpanCssClass,this.resultsPerPageTgtId||e.setToolbar();var o=this.resultsPerPageTgtId?n["default"].id(this.resultsPerPageTgtId):e.rDiv;r.appendChild(n["default"].text(l)),o.appendChild(r),o.appendChild(i),this.resultsPerPageSlc=n["default"].id(this.prfxSlcResults+e.id);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.Cpt.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(t.paging){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.Cpt.store.savePageLength(t.pgLenCookie)}}}},{key:"_resetPage",value:function(t){var e=this.tf,s=e.Cpt.store.getPageNb(t);""!==s&&this.changePage(s-1)}},{key:"_resetPageLength",value:function(t){var e=this.tf;if(e.paging){var s=e.Cpt.store.getPageLength(t);""!==s&&(this.resultsPerPageSlc.options[s].selected=!0,this.changeResultsPerPage())}}},{key:"destroy",value:function(){var t=this.tf;if(t.hasGrid()){var e,s,i,l,a,r,o;e=n["default"].id(this.prfxBtnNextSpan+t.id),s=n["default"].id(this.prfxBtnPrevSpan+t.id),i=n["default"].id(this.prfxBtnLastSpan+t.id),l=n["default"].id(this.prfxBtnFirstSpan+t.id),a=n["default"].id(this.prfxPgBeforeSpan+t.id),r=n["default"].id(this.prfxPgAfterSpan+t.id),o=n["default"].id(this.prfxPgSpan+t.id);var h=this.evt;this.pagingSlc&&(this.pageSelectorType===t.fltTypeSlc?f["default"].remove(this.pagingSlc,"change",h.slcPagesChange):this.pageSelectorType===t.fltTypeInp&&f["default"].remove(this.pagingSlc,"keypress",h._detectKey),this.pagingSlc.parentNode.removeChild(this.pagingSlc)),e&&(f["default"].remove(e,"click",h.next),e.parentNode.removeChild(e)),s&&(f["default"].remove(s,"click",h.prev),s.parentNode.removeChild(s)),i&&(f["default"].remove(i,"click",h.last),i.parentNode.removeChild(i)),l&&(f["default"].remove(l,"click",h.first),l.parentNode.removeChild(l)),a&&a.parentNode.removeChild(a),r&&r.parentNode.removeChild(r),o&&o.parentNode.removeChild(o),this.hasResultsPerPage&&this.removeResultsPerPage(),this.pagingSlc=null,this.nbPages=0,this.isPagingRemoved=!0,t.paging=!1}}}]),t}();e.Paging=c},function(t,e,s){"use strict";var i=function(t){return t&&t.__esModule?t:{"default":t}},l=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a=function(){function t(t,e){for(var s=0;s HTML Table Filter Generator + +
@@ -84,7 +86,6 @@ -