diff --git a/dist/tablefilter/style/colsVisibility.css b/dist/tablefilter/style/colsVisibility.css index 222c0e33..82c2e083 100644 --- a/dist/tablefilter/style/colsVisibility.css +++ b/dist/tablefilter/style/colsVisibility.css @@ -1,6 +1,6 @@ /** * tablefilter v0.2.35 by Max Guglielmi - * build date: 2016-06-02T03:28:29.388Z + * build date: 2016-06-02T04:09:12.677Z * MIT License */ span.colVisSpan{text-align:left;}span.colVisSpan a.colVis{display:inline-block;padding:7px 5px 0;font-size:inherit;font-weight:inherit;vertical-align:top}div.colVisCont{position:relative;background:#fff;-webkit-box-shadow:3px 3px 2px #888;-moz-box-shadow:3px 3px 2px #888;box-shadow:3px 3px 2px #888;position:absolute;display:none;border:1px solid #ccc;height:auto;width:250px;background-color:#fff;margin:35px 0 0 -100px;z-index:10000;padding:10px 10px 10px 10px;text-align:left;font-size:12px;}div.colVisCont:after,div.colVisCont:before{bottom:100%;left:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}div.colVisCont:after{border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:10px;margin-left:-10px}div.colVisCont:before{border-color:rgba(255,255,255,0);border-bottom-color:#ccc;border-width:12px;margin-left:-12px}div.colVisCont p{margin:6px auto 6px auto}div.colVisCont a.colVis{display:initial;font-weight:inherit}ul.cols_checklist{padding:0;margin:0;list-style:none;}ul.cols_checklist label{display:block}ul.cols_checklist input{vertical-align:middle;margin:2px 5px 2px 1px}li.cols_checklist_item{padding:4px;margin:0;}li.cols_checklist_item:hover{background-color:#335ea8;color:#fff}.cols_checklist_slc_item{background-color:#335ea8;color:#fff} \ No newline at end of file diff --git a/dist/tablefilter/style/filtersVisibility.css b/dist/tablefilter/style/filtersVisibility.css index e2e11a5c..504a4ae5 100644 --- a/dist/tablefilter/style/filtersVisibility.css +++ b/dist/tablefilter/style/filtersVisibility.css @@ -1,6 +1,6 @@ /** * tablefilter v0.2.35 by Max Guglielmi - * build date: 2016-06-02T03:28:29.388Z + * build date: 2016-06-02T04:09:12.677Z * MIT License */ span.expClpFlt a.btnExpClpFlt{width:35px;height:35px;display:inline-block;}span.expClpFlt a.btnExpClpFlt:hover{background-color:#f4f4f4}span.expClpFlt img{padding:8px 11px 11px 11px} \ No newline at end of file diff --git a/dist/tablefilter/style/tablefilter.css b/dist/tablefilter/style/tablefilter.css index 7a8f1631..115d0b2e 100644 --- a/dist/tablefilter/style/tablefilter.css +++ b/dist/tablefilter/style/tablefilter.css @@ -1,6 +1,6 @@ /** * tablefilter v0.2.35 by Max Guglielmi - * build date: 2016-06-02T03:28:29.388Z + * build date: 2016-06-02T04:09:12.677Z * MIT License */ .activeHeader{background-color:#66afe9 !important;color:#fff !important} diff --git a/dist/tablefilter/style/themes/default/default.css b/dist/tablefilter/style/themes/default/default.css index 3be23d57..27bd0a26 100644 --- a/dist/tablefilter/style/themes/default/default.css +++ b/dist/tablefilter/style/themes/default/default.css @@ -1,6 +1,6 @@ /** * tablefilter v0.2.35 by Max Guglielmi - * build date: 2016-06-02T03:28:29.388Z + * build date: 2016-06-02T04:09:12.677Z * MIT License */ table.TF{border-left:1px solid #ccc;border-top:none;border-right:none;border-bottom:none;}table.TF th{background:#ebecee url("images/bg_th.jpg") left top repeat-x;border-bottom:1px solid #d0d0d0;border-right:1px solid #d0d0d0;border-left:1px solid #fff;border-top:1px solid #fff;color:#333}table.TF td{border-bottom:1px dotted #999;padding:5px}.fltrow{background-color:#ebecee !important;}.fltrow th,.fltrow td{border-bottom:1px dotted #666 !important;padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #999 !important}input.flt{width:99% !important}.inf{height:$min-height;background:#d7d7d7 url("images/bg_infDiv.jpg") 0 0 repeat-x !important}input.reset{background:transparent url("images/btn_eraser.gif") center center no-repeat !important}.helpBtn:hover{background-color:transparent}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important;}.nextPage:hover{background:transparent url("images/btn_over_next_page.gif") center center no-repeat !important}.previousPage{background:transparent url("images/btn_previous_page.gif") center center no-repeat !important;}.previousPage:hover{background:transparent url("images/btn_over_previous_page.gif") center center no-repeat !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important;}.firstPage:hover{background:transparent url("images/btn_over_first_page.gif") center center no-repeat !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important;}.lastPage:hover{background:transparent url("images/btn_over_last_page.gif") center center no-repeat !important}div.grd_Cont{background-color:#ebecee !important;border:1px solid #ccc !important;padding:0 !important;}div.grd_Cont .even{background-color:#fff}div.grd_Cont .odd{background-color:#d5d5d5}div.grd_headTblCont{background-color:#ebecee !important;border-bottom:none !important;}div.grd_headTblCont table{border-right:none !important}div.grd_tblCont table th,div.grd_headTblCont table th,div.grd_headTblCont table td{background:#ebecee url("images/bg_th.jpg") left top repeat-x !important;border-bottom:1px solid #d0d0d0 !important;border-right:1px solid #d0d0d0 !important;border-left:1px solid #fff !important;border-top:1px solid #fff !important}div.grd_tblCont table td{border-bottom:1px solid #999 !important}.grd_inf{background:#d7d7d7 url("images/bg_infDiv.jpg") 0 0 repeat-x !important;border-top:1px solid #d0d0d0 !important}.loader{border:1px solid #999}.defaultLoader{width:32px;height:32px;background:transparent url("images/img_loading.gif") 0 0 no-repeat !important}.even{background-color:#fff}.odd{background-color:#d5d5d5}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important}.activeHeader{background:#999 !important} \ No newline at end of file diff --git a/dist/tablefilter/style/themes/mytheme/mytheme.css b/dist/tablefilter/style/themes/mytheme/mytheme.css index a118c8a6..e9207ddb 100644 --- a/dist/tablefilter/style/themes/mytheme/mytheme.css +++ b/dist/tablefilter/style/themes/mytheme/mytheme.css @@ -1,6 +1,6 @@ /** * tablefilter v0.2.35 by Max Guglielmi - * build date: 2016-06-02T03:28:29.388Z + * build date: 2016-06-02T04:09:12.677Z * MIT License */ table.TF{border-left:1px dotted #81963b;border-top:none;border-right:0;border-bottom:none;}table.TF th{background:#39424b url("images/bg_headers.jpg") left top repeat-x;border-bottom:0;border-right:1px dotted #d0d0d0;border-left:0;border-top:0;color:#fff}table.TF td{border-bottom:1px dotted #81963b;border-right:1px dotted #81963b;padding:5px}.fltrow{background-color:#81963b !important;}.fltrow th,.fltrow td{border-bottom:1px dotted #39424b !important;border-right:1px dotted #fff !important;border-left:0 !important;border-top:0 !important;padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #687830 !important}input.flt{width:99% !important}.inf{background:#d8d8d8;height:$min-height}input.reset{width:53px;background:transparent url("images/btn_filter.png") center center no-repeat !important}.helpBtn:hover{background-color:transparent}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important}.previousPage{background:transparent url("images/btn_previous_page.gif") center center no-repeat !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important}div.grd_Cont{background:#81963b url("images/bg_headers.jpg") left top repeat-x !important;border:1px solid #ccc !important;padding:0 1px 1px 1px !important;}div.grd_Cont .even{background-color:#bccd83}div.grd_Cont .odd{background-color:#fff}div.grd_headTblCont{background-color:#ebecee !important;border-bottom:none !important}div.grd_tblCont table{border-right:none !important;}div.grd_tblCont table td{border-bottom:1px dotted #81963b;border-right:1px dotted #81963b}div.grd_tblCont table th,div.grd_headTblCont table th{background:transparent url("images/bg_headers.jpg") 0 0 repeat-x !important;border-bottom:0 !important;border-right:1px dotted #d0d0d0 !important;border-left:0 !important;border-top:0 !important;padding:0 4px 0 4px !important;color:#fff !important;height:35px !important}div.grd_headTblCont table td{border-bottom:1px dotted #39424b !important;border-right:1px dotted #fff !important;border-left:0 !important;border-top:0 !important;background-color:#81963b !important;padding:1px 3px 1px 3px !important}.grd_inf{background-color:#d8d8d8;border-top:1px solid #d0d0d0 !important}.loader{border:0 !important;background:#81963b !important}.defaultLoader{width:32px;height:32px;background:transparent url("images/img_loading.gif") 0 0 no-repeat !important}.even{background-color:#bccd83}.odd{background-color:#fff}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important}.activeHeader{background:#81963b !important} \ No newline at end of file diff --git a/dist/tablefilter/style/themes/skyblue/skyblue.css b/dist/tablefilter/style/themes/skyblue/skyblue.css index eda1429e..c5033491 100644 --- a/dist/tablefilter/style/themes/skyblue/skyblue.css +++ b/dist/tablefilter/style/themes/skyblue/skyblue.css @@ -1,6 +1,6 @@ /** * tablefilter v0.2.35 by Max Guglielmi - * build date: 2016-06-02T03:28:29.388Z + * build date: 2016-06-02T04:09:12.677Z * MIT License */ table.TF{padding:0;color:#000;border-right:1px solid #a4bed4;border-top:1px solid #a4bed4;border-left:1px solid #a4bed4;border-bottom:0;}table.TF th{margin:0;color:inherit;background:#d1e5fe url("images/bg_skyblue.gif") 0 0 repeat-x;border-color:#fdfdfd #a4bed4 #a4bed4 #fdfdfd;border-width:1px;border-style:solid}table.TF td{margin:0;padding:5px;color:inherit;border-bottom:1px solid #a4bed4;border-left:0;border-top:0;border-right:0}.fltrow{background-color:#d1e5fe !important;}.fltrow th,.fltrow td{padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #a4bed4 !important}input.flt{width:99% !important}.inf{background-color:#e3efff !important;border:1px solid #a4bed4;height:$min-height;color:#004a6f}div.tot,div.status{border-right:0 !important}.helpBtn:hover{background-color:transparent}input.reset{background:transparent url("images/icn_clear_filters.png") center center no-repeat !important}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.nextPage:hover{background:#ffe4ab url("images/btn_next_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.previousPage{background:transparent url("images/btn_prev_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.previousPage:hover{background:#ffe4ab url("images/btn_prev_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.firstPage:hover{background:#ffe4ab url("images/btn_first_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.lastPage:hover{background:#ffe4ab url("images/btn_last_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.activeHeader{background:#ffe4ab !important;border:1px solid #ffb552 !important;color:inherit !important}div.grd_Cont{background-color:#d9eaed !important;border:1px solid #9cc !important;padding:0 !important;}div.grd_Cont .even{background-color:#fff}div.grd_Cont .odd{background-color:#e3efff}div.grd_headTblCont{background-color:#d9eaed !important;border-bottom:none !important}div.grd_tblCont table{border-right:none !important}div.grd_tblCont table th,div.grd_headTblCont table th,div.grd_headTblCont table td{background:#d9eaed url("images/bg_skyblue.gif") left top repeat-x;border-bottom:1px solid #a4bed4;border-right:1px solid #a4bed4 !important;border-left:1px solid #fff !important;border-top:1px solid #fff !important}div.grd_tblCont table td{border-bottom:1px solid #a4bed4 !important;border-right:0 !important;border-left:0 !important;border-top:0 !important}.grd_inf{background-color:#cce2fe;color:#004a6f;border-top:1px solid #9cc !important;}.grd_inf a{text-decoration:none;font-weight:bold}.loader{background-color:#2d8eef;border:1px solid #cce2fe;border-radius:5px}.even{background-color:#fff}.odd{background-color:#e3efff}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important}.ezActiveRow{background-color:#ffdc61 !important;color:inherit}.ezSelectedRow{background-color:#ffe4ab !important;color:inherit}.ezActiveCell{background-color:#fff !important;color:#000 !important;font-weight:bold}.ezETSelectedCell{background-color:#fff !important;font-weight:bold;color:#000 !important} \ No newline at end of file diff --git a/dist/tablefilter/tablefilter.js b/dist/tablefilter/tablefilter.js index f8aa3a9e..0343e16b 100644 --- a/dist/tablefilter/tablefilter.js +++ b/dist/tablefilter/tablefilter.js @@ -1,10 +1,10 @@ /** * tablefilter v0.2.35 by Max Guglielmi - * build date: 2016-06-02T03:28:29.372Z + * build date: 2016-06-02T04:09:12.661Z * MIT License */ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i=e();for(var s in i)("object"==typeof exports?exports:t)[s]=i[s]}}(this,function(){return function(t){function e(i){if(s[i])return s[i].exports;var n=s[i]={exports:{},id:i,loaded:!1};return t[i].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var i=window.webpackJsonp;window.webpackJsonp=function(s,r){for(var o,l,a=0,h=[];ao;o++)s[o]=arguments[o];if(s.forEach(function(t){"object"===("undefined"==typeof t?"undefined":r(t))&&"TABLE"===t.nodeName?(e.tbl=t,e.id=t.id||"tf_"+(new Date).getTime()+"_"):(0,c.isString)(t)?(e.id=t,e.tbl=(0,a.elm)(t)):(0,c.isNumber)(t)?e.startRow=t:(0,c.isObj)(t)&&(e.cfg=t)}),!this.tbl||"TABLE"!==this.tbl.nodeName||0===this.getRowsNb())throw new Error("Could not instantiate TableFilter: HTML table\n DOM element not found.");var l=this.cfg;this.emitter=new d.Emitter,this.refRow=null===this.startRow?2:this.startRow+1;try{this.nbCells=this.getCellsNb(this.refRow)}catch(h){this.nbCells=this.getCellsNb(0)}this.basePath=l.base_path||"tablefilter/",this.fltGrid=l.grid!==!1,this.gridLayout=Boolean(l.grid_layout),this.filtersRowIndex=isNaN(l.filters_row_index)?0:l.filters_row_index,this.headersRow=isNaN(l.headers_row_index)?0===this.filtersRowIndex?1:0:l.headers_row_index,this.fltCellTag=(0,c.isString)(l.filters_cell_tag)?l.filters_cell_tag:R.CELL_TAG,this.fltIds=[],this.validRowsIndex=[],this.infDiv=null,this.lDiv=null,this.rDiv=null,this.mDiv=null,this.infDivCssClass=l.inf_div_css_class||"inf",this.lDivCssClass=l.left_div_css_class||"ldiv",this.rDivCssClass=l.right_div_css_class||"rdiv",this.mDivCssClass=l.middle_div_css_class||"mdiv",this.contDivCssClass=l.content_div_css_class||"cont",this.stylePath=l.style_path||this.basePath+"style/",this.stylesheet=l.stylesheet||this.stylePath+"tablefilter.css",this.stylesheetId=this.id+"_style",this.fltsRowCssClass=l.flts_row_css_class||"fltrow",this.enableIcons=l.enable_icons!==!1,this.alternateRows=Boolean(l.alternate_rows),this.hasColWidths=(0,c.isArray)(l.col_widths),this.colWidths=this.hasColWidths?l.col_widths:null,this.fltCssClass=l.flt_css_class||"flt",this.fltMultiCssClass=l.flt_multi_css_class||"flt_multi",this.fltSmallCssClass=l.flt_small_css_class||"flt_s",this.singleFltCssClass=l.single_flt_css_class||"single_flt",this.enterKey=l.enter_key!==!1,this.onBeforeFilter=(0,c.isFn)(l.on_before_filter)?l.on_before_filter:null,this.onAfterFilter=(0,c.isFn)(l.on_after_filter)?l.on_after_filter:null,this.caseSensitive=Boolean(l.case_sensitive),this.hasExactMatchByCol=(0,c.isArray)(l.columns_exact_match),this.exactMatchByCol=this.hasExactMatchByCol?l.columns_exact_match:[],this.exactMatch=Boolean(l.exact_match),this.linkedFilters=Boolean(l.linked_filters),this.disableExcludedOptions=Boolean(l.disable_excluded_options),this.activeFilterId=null,this.hasVisibleRows=Boolean(l.rows_always_visible),this.visibleRows=this.hasVisibleRows?l.rows_always_visible:[],this.isExternalFlt=Boolean(l.external_flt_grid),this.externalFltTgtIds=l.external_flt_grid_ids||[],this.externalFltEls=[],this.onFiltersLoaded=(0,c.isFn)(l.on_filters_loaded)?l.on_filters_loaded:null,this.singleSearchFlt=Boolean(l.single_filter),this.onRowValidated=(0,c.isFn)(l.on_row_validated)?l.on_row_validated:null,this.customCellDataCols=l.custom_cell_data_cols?l.custom_cell_data_cols:[],this.customCellData=(0,c.isFn)(l.custom_cell_data)?l.custom_cell_data:null,this.watermark=l.watermark||"",this.isWatermarkArray=(0,c.isArray)(this.watermark),this.toolBarTgtId=l.toolbar_target_id||null,this.help=(0,c.isUndef)(l.help_instructions)?void 0:Boolean(l.help_instructions),this.popupFilters=Boolean(l.popup_filters),this.markActiveColumns=Boolean(l.mark_active_columns),this.activeColumnsCssClass=l.active_columns_css_class||"activeHeader",this.onBeforeActiveColumn=(0,c.isFn)(l.on_before_active_column)?l.on_before_active_column:null,this.onAfterActiveColumn=(0,c.isFn)(l.on_after_active_column)?l.on_after_active_column:null,this.displayAllText=l.display_all_text||"Clear",this.enableEmptyOption=Boolean(l.enable_empty_option),this.emptyText=l.empty_text||"(Empty)",this.enableNonEmptyOption=Boolean(l.enable_non_empty_option),this.nonEmptyText=l.non_empty_text||"(Non empty)",this.onSlcChange=l.on_change!==!1,this.sortSlc=l.sort_select!==!1,this.isSortNumAsc=Boolean(l.sort_num_asc),this.sortNumAsc=this.isSortNumAsc?l.sort_num_asc:[],this.isSortNumDesc=Boolean(l.sort_num_desc),this.sortNumDesc=this.isSortNumDesc?l.sort_num_desc:[],this.loadFltOnDemand=Boolean(l.load_filters_on_demand),this.hasCustomOptions=(0,c.isObj)(l.custom_options),this.customOptions=l.custom_options,this.rgxOperator=l.regexp_operator||"rgx:",this.emOperator=l.empty_operator||"[empty]",this.nmOperator=l.nonempty_operator||"[nonempty]",this.orOperator=l.or_operator||"||",this.anOperator=l.and_operator||"&&",this.grOperator=l.greater_operator||">",this.lwOperator=l.lower_operator||"<",this.leOperator=l.lower_equal_operator||"<=",this.geOperator=l.greater_equal_operator||">=",this.dfOperator=l.different_operator||"!",this.lkOperator=l.like_operator||"*",this.eqOperator=l.equal_operator||"=",this.stOperator=l.start_with_operator||"{",this.enOperator=l.end_with_operator||"}",this.curExp=l.cur_exp||"^[¥£€$]",this.separator=l.separator||",",this.rowsCounter=Boolean(l.rows_counter),this.statusBar=Boolean(l.status_bar),this.loader=Boolean(l.loader),this.displayBtn=Boolean(l.btn),this.btnText=l.btn_text||(this.enableIcons?"":"Go"),this.btnCssClass=l.btn_css_class||(this.enableIcons?"btnflt_icon":"btnflt"),this.btnReset=Boolean(l.btn_reset),this.btnResetCssClass=l.btn_reset_css_class||"reset",this.onBeforeReset=(0,c.isFn)(l.on_before_reset)?l.on_before_reset:null,this.onAfterReset=(0,c.isFn)(l.on_after_reset)?l.on_after_reset:null,this.paging=Boolean(l.paging),this.nbHiddenRows=0,this.autoFilter=Boolean(l.auto_filter),this.autoFilterDelay=isNaN(l.auto_filter_delay)?R.AUTO_FILTER_DELAY:l.auto_filter_delay,this.isUserTyping=null,this.autoFilterTimer=null,this.highlightKeywords=Boolean(l.highlight_keywords),this.noResults=(0,c.isObj)(l.no_results_message)||Boolean(l.no_results_message),this.state=(0,c.isObj)(l.state)||Boolean(l.state),this.defaultDateType=l.default_date_type||"DMY",this.thousandsSeparator=l.thousands_separator||",",this.decimalSeparator=l.decimal_separator||".",this.hasColNbFormat=(0,c.isArray)(l.col_number_format),this.colNbFormat=this.hasColNbFormat?l.col_number_format:null,this.hasColDateType=(0,c.isArray)(l.col_date_type),this.colDateType=this.hasColDateType?l.col_date_type:null,this.prfxTf="TF",this.prfxFlt="flt",this.prfxValButton="btn",this.prfxInfDiv="inf_",this.prfxLDiv="ldiv_",this.prfxRDiv="rdiv_",this.prfxMDiv="mdiv_",this.prfxResponsive="resp",this.extensions=l.extensions,this.hasExtensions=(0,c.isArray)(this.extensions),this.enableDefaultTheme=Boolean(l.enable_default_theme),this.hasThemes=this.enableDefaultTheme||(0,c.isArray)(l.themes),this.themes=l.themes||[],this.themesPath=l.themes_path||this.stylePath+"themes/",this.responsive=Boolean(l.responsive),this.Mod={},this.ExtRegistry={}}return t.prototype.init=function(){var t=this;if(!this.initialized){var e=this.Mod,i=this.singleSearchFlt?1:this.nbCells,s=void 0;if(this["import"](this.stylesheetId,this.stylesheet,null,"link"),this.hasThemes&&this.loadThemes(),e.help||(e.help=new T.Help(this)),this.help&&e.help.init(),this.state&&(e.state||(e.state=new S.State(this)),e.state.init()),this.gridLayout&&(e.gridLayout||(e.gridLayout=new g.GridLayout(this)),e.gridLayout.init()),this.loader&&(e.loader||(e.loader=new m.Loader(this)),e.loader.init()),this.highlightKeywords&&(e.highlightKeyword=new v.HighlightKeyword(this),e.highlightKeyword.init()),this.popupFilters&&(e.popupFilter||(e.popupFilter=new b.PopupFilter(this)),e.popupFilter.init()),this.fltGrid){var n=this._insertFiltersRow();this.nbFilterableRows=this.getRowsNb();for(var r=0;i>r;r++){this.emitter.emit("before-filter-init",this,r);var o=(0,a.createElm)(this.fltCellTag),l=this.getFilterType(r);this.singleSearchFlt&&(o.colSpan=this.nbCells),this.gridLayout||n.appendChild(o),s=r===i-1&&this.displayBtn?this.fltSmallCssClass:this.fltCssClass,this.singleSearchFlt&&(l=R.INPUT,s=this.singleFltCssClass),l===R.SELECT||l===R.MULTIPLE?(e.dropdown||(e.dropdown=new y.Dropdown(this)),e.dropdown.init(r,this.isExternalFlt,o)):l===R.CHECKLIST?(e.checkList||(e.checkList=new _.CheckList(this)),e.checkList.init(r,this.isExternalFlt,o)):this._buildInputFilter(r,s,o),r===i-1&&this.displayBtn&&this._buildSubmitButton(r,o),this.emitter.emit("after-filter-init",this,r)}this.emitter.on(["filter-focus"],function(e,i){return t.setActiveFilterId(i.id)})}else this._initNoFilters();this.hasVisibleRows&&(this.emitter.on(["after-filtering"],function(){return t.enforceVisibility()}),this.enforceVisibility()),this.rowsCounter&&(e.rowsCounter=new C.RowsCounter(this),e.rowsCounter.init()),this.statusBar&&(e.statusBar=new x.StatusBar(this),e.statusBar.init()),this.paging&&(e.paging?e.paging.reset():(e.paging=new w.Paging(this),e.paging.init())),this.btnReset&&(e.clearButton=new E.ClearButton(this),e.clearButton.init()),this.hasColWidths&&!this.gridLayout&&this.setColWidths(),this.alternateRows&&(e.alternateRows=new F.AlternateRows(this),e.alternateRows.init()),this.noResults&&(e.noResults||(e.noResults=new P.NoResults(this)),e.noResults.init()),this.gridLayout||((0,a.addClass)(this.tbl,this.prfxTf),this.responsive&&(0,a.addClass)(this.tbl,this.prfxResponsive)),this.hasExtensions&&this.initExtensions(),this.markActiveColumns&&(this.emitter.on(["before-filtering"],function(){return t.clearActiveColumns()}),this.emitter.on(["cell-processed"],function(e,i){return t.markActiveColumn(i)})),this.linkedFilters&&this.emitter.on(["after-filtering"],function(){return t.linkFilters()}),this.onFiltersLoaded&&this.onFiltersLoaded.call(null,this),this.initialized=!0,this.emitter.emit("initialized",this)}},t.prototype.detectKey=function(t){if(this.enterKey&&t){var e=l["default"].keyCode(t);e===R.ENTER_KEY?(this.filter(),l["default"].cancel(t),l["default"].stop(t)):(this.isUserTyping=!0,f.root.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null)}},t.prototype.onKeyUp=function(t){function e(){f.root.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null,this.isUserTyping||(this.filter(),this.isUserTyping=null)}if(this.autoFilter){var i=l["default"].keyCode(t);this.isUserTyping=!1,i!==R.ENTER_KEY&&i!==R.TAB_KEY&&i!==R.ESC_KEY&&i!==R.UP_ARROW_KEY&&i!==R.DOWN_ARROW_KEY?null===this.autoFilterTimer&&(this.autoFilterTimer=f.root.setInterval(e.bind(this),this.autoFilterDelay)):(f.root.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null)}},t.prototype.onKeyDown=function(){this.autoFilter&&(this.isUserTyping=!0)},t.prototype.onInpFocus=function(t){var e=l["default"].target(t);this.emitter.emit("filter-focus",this,e)},t.prototype.onInpBlur=function(){this.autoFilter&&(this.isUserTyping=!1,f.root.clearInterval(this.autoFilterTimer)),this.emitter.emit("filter-blur",this)},t.prototype._insertFiltersRow=function(){if(!this.gridLayout){var t=void 0,e=(0,a.tag)(this.tbl,"thead");return t=e.length>0?e[0].insertRow(this.filtersRowIndex):this.tbl.insertRow(this.filtersRowIndex),t.className=this.fltsRowCssClass,this.isExternalFlt&&(t.style.display=R.NONE),this.emitter.emit("filters-row-inserted",this,t),t}},t.prototype._initNoFilters=function(){this.fltGrid||(this.refRow=this.refRow>0?this.refRow-1:0,this.nbFilterableRows=this.getRowsNb())},t.prototype._buildInputFilter=function(t,e,i){var s=this,n=this.getFilterType(t),r=this.isExternalFlt?this.externalFltTgtIds[t]:null,o=n===R.INPUT?"text":"hidden",h=(0,a.createElm)(R.INPUT,["id",this.prfxFlt+t+"_"+this.id],["type",o],["ct",t]);"hidden"!==o&&this.watermark&&h.setAttribute("placeholder",this.isWatermarkArray?this.watermark[t]||"":this.watermark),h.className=e||this.fltCssClass,l["default"].add(h,"focus",function(t){return s.onInpFocus(t)}),r?((0,a.elm)(r).appendChild(h),this.externalFltEls.push(h)):i.appendChild(h),this.fltIds.push(h.id),l["default"].add(h,"keypress",function(t){return s.detectKey(t)}),l["default"].add(h,"keydown",function(){return s.onKeyDown()}),l["default"].add(h,"keyup",function(t){return s.onKeyUp(t)}),l["default"].add(h,"blur",function(){return s.onInpBlur()})},t.prototype._buildSubmitButton=function(t,e){var i=this,s=this.isExternalFlt?this.externalFltTgtIds[t]:null,n=(0,a.createElm)(R.INPUT,["id",this.prfxValButton+t+"_"+this.id],["type","button"],["value",this.btnText]);n.className=this.btnCssClass,s?(0,a.elm)(s).appendChild(n):e.appendChild(n),l["default"].add(n,"click",function(){return i.filter()})},t.prototype.feature=function(t){return this.Mod[t]},t.prototype.initExtensions=function(){var t=this.extensions;i.p=this.basePath,this.emitter.emit("before-loading-extensions",this);for(var e=0,s=t.length;s>e;e++){var n=t[e];this.ExtRegistry[n.name]||this.loadExtension(n)}this.emitter.emit("after-loading-extensions",this)},t.prototype.loadExtension=function(t){var e=this;if(t&&t.name){var s=t.name,n=t.path,r=void 0;s&&n?r=t.path+s:(s=s.replace(".js",""),r="extensions/{}/{}".replace(/{}/g,s)),i.e(1,function(i){var n=[i(30)("./"+r)];(function(i){var n=new i["default"](e,t);n.init(),e.ExtRegistry[s]=n}).apply(null,n)})}},t.prototype.extension=function(t){return this.ExtRegistry[t]},t.prototype.hasExtension=function(t){return!(0,c.isEmpty)(this.ExtRegistry[t])},t.prototype.destroyExtensions=function(){for(var t=this.extensions,e=0,i=t.length;i>e;e++){var s=t[e],n=this.ExtRegistry[s.name];n&&(n.destroy(),this.ExtRegistry[s.name]=void 0)}},t.prototype.loadThemes=function(){var t=this.themes;if(this.emitter.emit("before-loading-themes",this),this.enableDefaultTheme){var e={name:"default"};this.themes.push(e)}if((0,c.isArray)(t))for(var i=0,s=t.length;s>i;i++){var n=t[i],r=n.name,o=n.path,l=this.prfxTf+r;r&&!o?o=this.themesPath+r+"/"+r+".css":!r&&n.path&&(r="theme{0}".replace("{0}",i)),this.isImported(o,"link")||this["import"](l,o,null,"link")}this.btnResetText=null,this.btnResetHtml='',this.btnPrevPageHtml='',this.btnNextPageHtml='',this.btnFirstPageHtml='',this.btnLastPageHtml='',this.loader=!0,this.loaderHtml='
',this.loaderText=null,this.emitter.emit("after-loading-themes",this)},t.prototype.getStylesheet=function(){var t=arguments.length<=0||void 0===arguments[0]?"default":arguments[0];return(0,a.elm)(this.prfxTf+t)},t.prototype.destroy=function(){var t=this;if(this.initialized){var e=this.Mod,i=this.emitter;this.isExternalFlt&&!this.popupFilters&&this.removeExternalFlts(),this.infDiv&&this.removeToolbar(),this.markActiveColumns&&(this.clearActiveColumns(),i.off(["before-filtering"],function(){return t.clearActiveColumns()}),i.off(["cell-processed"],function(e,i){return t.markActiveColumn(i)})),this.hasExtensions&&this.destroyExtensions(),this.validateAllRows(),this.fltGrid&&!this.gridLayout&&this.tbl.deleteRow(this.filtersRowIndex),i.emit("destroy",this),Object.keys(e).forEach(function(t){var i=e[t];i&&(0,c.isFn)(i.destroy)&&i.destroy()}),this.hasVisibleRows&&i.off(["after-filtering"],function(){return t.enforceVisibility()}),this.linkedFilters&&i.off(["after-filtering"],function(){return t.linkFilters()}),this.emitter.off(["filter-focus"],function(e,i){return t.setActiveFilterId(i.id)}),(0,a.removeClass)(this.tbl,this.prfxTf),(0,a.removeClass)(this.tbl,this.prfxResponsive),this.nbHiddenRows=0,this.validRowsIndex=[],this.fltIds=[],this.initialized=!1}},t.prototype.setToolbar=function(){if(!this.infDiv){var t=(0,a.createElm)("div",["id",this.prfxInfDiv+this.id]);if(t.className=this.infDivCssClass,this.toolBarTgtId)(0,a.elm)(this.toolBarTgtId).appendChild(t);else if(this.gridLayout){var e=this.Mod.gridLayout;e.tblMainCont.appendChild(t),t.className=e.gridInfDivCssClass}else{var i=(0,a.createElm)("caption");i.appendChild(t),this.tbl.insertBefore(i,this.tbl.firstChild)}this.infDiv=(0,a.elm)(this.prfxInfDiv+this.id);var s=(0,a.createElm)("div",["id",this.prfxLDiv+this.id]);s.className=this.lDivCssClass,t.appendChild(s),this.lDiv=(0,a.elm)(this.prfxLDiv+this.id);var n=(0,a.createElm)("div",["id",this.prfxRDiv+this.id]);n.className=this.rDivCssClass,t.appendChild(n),this.rDiv=(0,a.elm)(this.prfxRDiv+this.id);var r=(0,a.createElm)("div",["id",this.prfxMDiv+this.id]);r.className=this.mDivCssClass,t.appendChild(r),this.mDiv=(0,a.elm)(this.prfxMDiv+this.id),(0,c.isUndef)(this.help)&&(this.Mod.help.enabled=!0,this.emitter.emit("init-help",this))}},t.prototype.removeToolbar=function(){if(this.infDiv){(0,a.removeElm)(this.infDiv),this.infDiv=null;var t=this.tbl,e=(0,a.tag)(t,"caption");e.length>0&&[].forEach.call(e,function(e){return t.removeChild(e)})}},t.prototype.removeExternalFlts=function(){if(this.isExternalFlt)for(var t=this.externalFltTgtIds,e=t.length,i=0;e>i;i++){var s=t[i],n=(0,a.elm)(s);n&&(n.innerHTML="")}},t.prototype.isCustomOptions=function(t){return this.hasCustomOptions&&-1!==this.customOptions.cols.indexOf(t)},t.prototype.getCustomOptions=function(t){if(!(0,c.isEmpty)(t)&&this.isCustomOptions(t)){for(var e=this.customOptions,i=e.cols,s=[],n=[],r=i.indexOf(t),o=e.values[r],l=e.texts[r],a=e.sorts[r],h=0,p=o.length;p>h;h++)n.push(o[h]),l[h]?s.push(l[h]):s.push(o[h]);return a&&(n.sort(),s.sort()),[n,s]}},t.prototype.filter=function(){function t(t,e,i){if(this.highlightKeywords&&e){t=t.replace(b,""),t=t.replace(y,""),t=t.replace(_,""),t=t.replace(C,"");var s=t;(f.test(t)||d.test(t)||g.test(t)||m.test(t)||v.test(t))&&(s=(0,a.getText)(i)),""!==s&&this.emitter.emit("highlight-keyword",this,i,s)}}function e(t,e,i){t=(0,h.matchCase)(t,this.caseSensitive);var s=void 0,n=this.hasColDateType?this.colDateType[i]:this.defaultDateType,r=g.test(t),a=f.test(t),c=m.test(t),T=d.test(t),F=v.test(t),P=y.test(t),S=b.test(t),R=_.test(t),I=C.test(t),O=x===t,N=w===t,L=E.test(t),k=r&&(0,p.isValidDate)(t.replace(g,""),n),D=a&&(0,p.isValidDate)(t.replace(f,""),n),B=c&&(0,p.isValidDate)(t.replace(m,""),n),A=T&&(0,p.isValidDate)(t.replace(d,""),n),M=F&&(0,p.isValidDate)(t.replace(v,""),n),H=P&&(0,p.isValidDate)(t.replace(y,""),n),j=void 0,U=void 0;if((0,p.isValidDate)(e,n))j=(0,p.formatDate)(e,n),k?(U=(0,p.formatDate)(t.replace(g,""),n),s=U>j):D?(U=(0,p.formatDate)(t.replace(f,""),n),s=U>=j):A?(U=(0,p.formatDate)(t.replace(d,""),n),s=j>=U):B?(U=(0,p.formatDate)(t.replace(m,""),n),s=j>U):M?(U=(0,p.formatDate)(t.replace(v,""),n),s=j.toString()!==U.toString()):H?(U=(0,p.formatDate)(t.replace(y,""),n),s=j.toString()===U.toString()):b.test(t)?s=(0,h.contains)(t.replace(b,""),e,!1,this.caseSensitive):(0,p.isValidDate)(t,n)?(U=(0,p.formatDate)(t,n),s=j.toString()===U.toString()):s=O?(0,h.isEmpty)(e):N?!(0,h.isEmpty)(e):(0,h.contains)(t,e,this.isExactMatch(i),this.caseSensitive);else if(this.hasColNbFormat&&this.colNbFormat[i]?(o=(0,u.removeNbFormat)(e,this.colNbFormat[i]),l=this.colNbFormat[i]):","===this.thousandsSeparator&&"."===this.decimalSeparator?(o=(0,u.removeNbFormat)(e,"us"),l="us"):(o=(0,u.removeNbFormat)(e,"eu"),l="eu"),a)s=o<=(0,u.removeNbFormat)(t.replace(f,""),l);else if(T)s=o>=(0,u.removeNbFormat)(t.replace(d,""),l);else if(r)s=o<(0,u.removeNbFormat)(t.replace(g,""),l);else if(c)s=o>(0,u.removeNbFormat)(t.replace(m,""),l);else if(F)s=!(0,h.contains)(t.replace(v,""),e,!1,this.caseSensitive);else if(S)s=(0,h.contains)(t.replace(b,""),e,!1,this.caseSensitive);else if(P)s=(0,h.contains)(t.replace(y,""),e,!0,this.caseSensitive);else if(R)s=0===e.indexOf(t.replace(_,""));else if(I){var V=t.replace(C,"");s=e.lastIndexOf(V,e.length-1)===e.length-1-(V.length-1)&&e.lastIndexOf(V,e.length-1)>-1}else if(O)s=(0,h.isEmpty)(e);else if(N)s=!(0,h.isEmpty)(e);else if(L)try{var z=t.replace(E,""),K=new RegExp(z);s=K.test(e)}catch(W){s=!1}else o&&this.hasColNbFormat&&this.colNbFormat[i]&&!this.singleSearchFlt?(t=(0,u.removeNbFormat)(t,l),s=o===t||(0,h.contains)(t.toString(),o.toString(),this.isExactMatch(i),this.caseSensitive)):s=(0,h.contains)(t,e,this.isExactMatch(i),this.caseSensitive);return s}if(this.fltGrid&&this.initialized){this.onBeforeFilter&&this.onBeforeFilter.call(null,this),this.emitter.emit("before-filtering",this);var i=this.tbl.rows,s=this.getRowsNb(!0),n=0;this.validRowsIndex=[];for(var r=this.getFiltersValue(),o=void 0,l=void 0,f=new RegExp(this.leOperator),d=new RegExp(this.geOperator),g=new RegExp(this.lwOperator),m=new RegExp(this.grOperator),v=new RegExp(this.dfOperator),b=new RegExp((0,h.rgxEsc)(this.lkOperator)),y=new RegExp(this.eqOperator),_=new RegExp(this.stOperator),C=new RegExp(this.enOperator),x=this.emOperator,w=this.nmOperator,E=new RegExp((0,h.rgxEsc)(this.rgxOperator)),T=this.refRow;s>T;T++){i[T].style.display="";var F=i[T].cells,P=F.length;if(P===this.nbCells){for(var S=[],R=!0,I=!1,O=0;P>O;O++){var N=r[this.singleSearchFlt?0:O];if(""!==N){var L=(0,h.matchCase)(this.getCellData(F[O]),this.caseSensitive),k=N.toString().split(this.orOperator),D=k.length>1,B=N.toString().split(this.anOperator),A=B.length>1;if((0,c.isArray)(N)||D||A){var M=void 0,H=void 0,j=!1;H=(0,c.isArray)(N)?N:D?k:B;for(var U=0,V=H.length;V>U&&(M=(0,h.trim)(H[U]),j=e.call(this,M,L,O),t.call(this,M,j,F[O]),!(D&&j||A&&!j))&&(!(0,c.isArray)(N)||!j);U++);S[O]=j}else S[O]=e.call(this,(0,h.trim)(N),L,O),t.call(this,N,S[O],F[O]);S[O]||(R=!1),this.singleSearchFlt&&S[O]&&(I=!0),this.emitter.emit("cell-processed",this,O,F[O])}}this.singleSearchFlt&&I&&(R=!0),R?this.validateRow(T,!0):(this.validateRow(T,!1),n++),this.emitter.emit("row-processed",this,T,this.validRowsIndex.length,R)}}this.nbHiddenRows=n,this.onAfterFilter&&this.onAfterFilter.call(null,this),this.emitter.emit("after-filtering",this,r)}},t.prototype.getColValues=function(t){var e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],s=arguments.length<=3||void 0===arguments[3]?[]:arguments[3];if(this.fltGrid){var n=this.tbl.rows,r=this.getRowsNb(!0),o=[];e&&o.push(this.getHeadersText()[t]);for(var l=this.refRow;r>l;l++){var a=!1;s.length>0&&(a=-1!==s.indexOf(l));var h=n[l].cells,c=h.length;if(c===this.nbCells&&!a)for(var p=0;c>p;p++)if(p===t&&""===n[l].style.display){var f=this.getCellData(h[p]),d=this.colNbFormat?this.colNbFormat[t]:void 0,g=i?(0,u.removeNbFormat)(f,d):f;o.push(g)}}return o}},t.prototype.getFilterValue=function(t){if(this.fltGrid){var e="",i=this.getFilterElement(t);if(!i)return e;var s=this.getFilterType(t);return s!==R.MULTIPLE&&s!==R.CHECKLIST?e=i.value:s===R.MULTIPLE?e=this.feature("dropdown").getValues(t):s===R.CHECKLIST&&(e=this.feature("checkList").getValues(t)),((0,c.isArray)(e)&&0===e.length||1===e.length&&""===e[0])&&(e=""),e}},t.prototype.getFiltersValue=function(){if(this.fltGrid){for(var t=[],e=0,i=this.fltIds.length;i>e;e++){var s=this.getFilterValue(e);(0,c.isArray)(s)?t.push(s):t.push((0,h.trim)(s))}return t}},t.prototype.getFilterId=function(t){return this.fltGrid?this.fltIds[t]:void 0},t.prototype.getFiltersByType=function(t,e){if(this.fltGrid){for(var i=[],s=0,n=this.fltIds.length;n>s;s++){var r=this.getFilterType(s);if(r===t.toLowerCase()){var o=e?s:this.fltIds[s];i.push(o)}}return i}},t.prototype.getFilterElement=function(t){var e=this.fltIds[t];return(0,a.elm)(e)},t.prototype.getCellsNb=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],e=this.tbl.rows[t];return e.cells.length},t.prototype.getRowsNb=function(t){var e=(0,c.isUndef)(this.refRow)?0:this.refRow,i=this.tbl.rows.length;return t&&(e=0),parseInt(i-e,10)},t.prototype.getCellData=function(t){var e=t.cellIndex;return this.customCellData&&-1!==this.customCellDataCols.indexOf(e)?this.customCellData.call(null,this,t,e):(0,a.getText)(t)},t.prototype.getTableData=function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0],e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i=this.tbl.rows,s=this.getRowsNb(!0),n=[];if(t){var r=this.getHeadersText(e);n.push([this.getHeadersRowIndex(),r])}for(var o=this.refRow;s>o;o++){for(var l=[o,[]],a=i[o].cells,h=0,c=a.length;c>h;h++)if(!(e&&this.hasExtension("colsVisibility")&&this.extension("colsVisibility").isColHidden(h))){var p=this.getCellData(a[h]);l[1].push(p)}n.push(l)}return n},t.prototype.getFilteredData=function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0],e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1];if(!this.validRowsIndex)return[];var i=this.tbl.rows,s=[];if(t){var n=this.getHeadersText(e);s.push([this.getHeadersRowIndex(),n])}for(var r=this.getValidRows(!0),o=0;on;n++){var o=i[n],l=o[1],a=l[t];s.push(a)}return s},t.prototype.getRowDisplay=function(t){return t.style.display},t.prototype.validateRow=function(t,e){var i=this.tbl.rows[t];if(i&&"boolean"==typeof e){this.hasVisibleRows&&-1!==this.visibleRows.indexOf(t)&&(e=!0);var s=e?"":R.NONE,n=e?"true":"false";i.style.display=s,this.paging&&i.setAttribute("validRow",n),e&&(-1===this.validRowsIndex.indexOf(t)&&this.validRowsIndex.push(t),this.onRowValidated&&this.onRowValidated.call(null,this,t),this.emitter.emit("row-validated",this,t))}},t.prototype.validateAllRows=function(){if(this.initialized){this.validRowsIndex=[];for(var t=this.refRow;t0,r=n?null:I.createDocumentFragment(),o=0;e>o;o++){var l=void 0;n?l=s[o]:(l=(0,a.createElm)("col",["id",this.id+"_col_"+o]),r.appendChild(l)),l.style.width=i[o]}n||t.insertBefore(r,t.firstChild)}this.hasColWidths&&(t=t||this.tbl,e.call(this))},t.prototype.enforceVisibility=function(){if(this.hasVisibleRows)for(var t=this.getRowsNb(!0),e=0,i=this.visibleRows.length;i>e;e++){var s=this.visibleRows[e];t>=s&&this.validateRow(s,!0)}},t.prototype.clearFilters=function(){if(this.fltGrid){this.emitter.emit("before-clearing-filters",this),this.onBeforeReset&&this.onBeforeReset.call(null,this,this.getFiltersValue());for(var t=0,e=this.fltIds.length;e>t;t++)this.setFilterValue(t,"");this.filter(),this.onAfterReset&&this.onAfterReset.call(null,this),this.emitter.emit("after-clearing-filters",this)}},t.prototype.clearActiveColumns=function(){for(var t=0,e=this.getCellsNb(this.headersRow);e>t;t++)(0,a.removeClass)(this.getHeaderElement(t),this.activeColumnsCssClass)},t.prototype.markActiveColumn=function(t){var e=this.getHeaderElement(t);(0,a.hasClass)(e,this.activeColumnsCssClass)||(this.onBeforeActiveColumn&&this.onBeforeActiveColumn.call(null,this,t),(0,a.addClass)(e,this.activeColumnsCssClass),this.onAfterActiveColumn&&this.onAfterActiveColumn.call(null,this,t))},t.prototype.getActiveFilterId=function(){return this.activeFilterId},t.prototype.setActiveFilterId=function(t){this.activeFilterId=t},t.prototype.getColumnIndexFromFilterId=function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=t.split("_")[0];return e=e.split(this.prfxFlt)[1],parseInt(e,10)},t.prototype.activateFilter=function(t){(0,c.isUndef)(t)||this.setActiveFilterId(this.getFilterId(t))},t.prototype.linkFilters=function(){if(this.linkedFilters&&this.activeFilterId){var t=this.getFiltersByType(R.SELECT,!0),e=this.getFiltersByType(R.MULTIPLE,!0),i=this.getFiltersByType(R.CHECKLIST,!0),s=t.concat(e);s=s.concat(i);for(var n=this.getColumnIndexFromFilterId(this.activeFilterId),r=0,o=s.length;o>r;r++){var l=(0,a.elm)(this.fltIds[s[r]]),h=this.getFilterValue(s[r]);if(n!==s[r]||this.paging&&-1!==t.indexOf(s[r])&&n===s[r]||!this.paging&&(-1!==i.indexOf(s[r])||-1!==e.indexOf(s[r]))||h===this.displayAllText){if(this.loadFltOnDemand){var c=(0,a.createOpt)(this.displayAllText,"");l.innerHTML="",l.appendChild(c)}-1!==i.indexOf(s[r])?this.emitter.emit("build-checklist-filter",this,s[r]):this.emitter.emit("build-select-filter",this,s[r],!0),this.setFilterValue(s[r],h)}}}},t.prototype.isExactMatch=function(t){var e=this.getFilterType(t);return this.exactMatchByCol[t]||this.exactMatch||e!==R.INPUT},t.prototype.isImported=function(t,e){for(var i=!1,s=e?e:"script",n="script"===s?"src":"href",r=(0,a.tag)(I,s),o=0,l=r.length;l>o;o++)if(void 0!==r[o][n]&&r[o][n].match(t)){i=!0;break}return i},t.prototype["import"]=function(t,e,i,s){var n=s?s:"script",r=this.isImported(e,n);if(!r){var o=this,l=!1,h=void 0,c=(0,a.tag)(I,"head")[0];h="link"===n.toLowerCase()?(0,a.createElm)("link",["id",t],["type","text/css"],["rel","stylesheet"],["href",e]):(0,a.createElm)("script",["id",t],["type","text/javascript"],["src",e]),h.onload=h.onreadystatechange=function(){l||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(l=!0,"function"==typeof i&&i.call(null,o))},h.onerror=function(){throw new Error("TableFilter could not load: "+e)},c.appendChild(h)}},t.prototype.isInitialized=function(){ -return this.initialized},t.prototype.getFiltersId=function(){return this.fltIds||[]},t.prototype.getValidRows=function(t){if(!t)return this.validRowsIndex;var e=this.getRowsNb(!0);this.validRowsIndex=[];for(var i=this.refRow;e>i;i++){var s=this.tbl.rows[i];this.paging?"true"!==s.getAttribute("validRow")&&null!==s.getAttribute("validRow")||this.validRowsIndex.push(s.rowIndex):this.getRowDisplay(s)!==R.NONE&&this.validRowsIndex.push(s.rowIndex)}return this.validRowsIndex},t.prototype.getFiltersRowIndex=function(){return this.filtersRowIndex},t.prototype.getHeadersRowIndex=function(){return this.headersRow},t.prototype.getStartRowIndex=function(){return this.refRow},t.prototype.getLastRowIndex=function(){var t=this.getRowsNb(!0);return t-1},t.prototype.getHeaderElement=function(t){for(var e=this.gridLayout?this.Mod.gridLayout.headTbl:this.tbl,i=(0,a.tag)(e,"thead"),s=this.headersRow,n=void 0,r=0;ri;i++)e[i]=arguments[i];var s=e[0];if(!(0,r.isString)(s))return null;for(var n=l.createElement(s),o=0;o2)return t;var e=void 0;return 99>=t&&t>50&&(e="19"+t),(50>t||"00"===t)&&(e="20"+t),e}function s(t){if(void 0===t)return 0;for(var e=void 0,i=["january","february","march","april","may","june","july","august","september","october","november","december","jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],s=0;s11||23>e)&&(e-=12),1>e||e>12?0:e}Object.defineProperty(e,"__esModule",{value:!0});var n=(e.isValidDate=function(t,e){if(e||(e="DMY"),e=e.toUpperCase(),3!==e.length&&"DDMMMYYYY"===e){var i=n(t,e);t=i.getDate()+"/"+(i.getMonth()+1)+"/"+i.getFullYear(),e="DMY"}-1!==e.indexOf("M")&&-1!==e.indexOf("D")&&-1!==e.indexOf("Y")||(e="DMY");var s=void 0,r=void 0;if("Y"===e.substring(0,1)?(s=/^\d{2}(\-|\/|\.)\d{1,2}\1\d{1,2}$/,r=/^\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}$/):"Y"===e.substring(1,2)?(s=/^\d{1,2}(\-|\/|\.)\d{2}\1\d{1,2}$/,r=/^\d{1,2}(\-|\/|\.)\d{4}\1\d{1,2}$/):(s=/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{2}$/,r=/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/),s.test(t)===!1&&r.test(t)===!1)return!1;var o=t.split(RegExp.$1),l=void 0,a=void 0,h=void 0;l="M"===e.substring(0,1)?o[0]:"M"===e.substring(1,2)?o[1]:o[2],a="D"===e.substring(0,1)?o[0]:"D"===e.substring(1,2)?o[1]:o[2],h="Y"===e.substring(0,1)?o[0]:"Y"===e.substring(1,2)?o[1]:o[2],parseInt(h,10)<=50&&(h=(parseInt(h,10)+2e3).toString()),parseInt(h,10)<=99&&(h=(parseInt(h,10)+1900).toString());var c=new Date(parseInt(h,10),parseInt(l,10)-1,parseInt(a,10),0,0,0,0);return parseInt(a,10)!==c.getDate()?!1:parseInt(l,10)-1===c.getMonth()},e.formatDate=function(t,e){if(e||(e="DMY"),!t||""===t)return new Date(1001,0,1);var n=void 0,r=void 0;switch(e.toUpperCase()){case"DDMMMYYYY":r=t.replace(/[- \/.]/g," ").split(" "),n=new Date(i(r[2]),s(r[1])-1,r[0]);break;case"DMY":r=t.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),n=new Date(i(r[2]),r[1]-1,r[0]);break;case"MDY":r=t.replace(/^(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),n=new Date(i(r[2]),r[0]-1,r[1]);break;case"YMD":r=t.replace(/^((\d\d)?\d\d)([- \/.])(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])$/,"$1 $4 $6").split(" "),n=new Date(i(r[0]),r[1]-1,r[2]);break;default:r=t.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),n=new Date(i(r[2]),r[1]-1,r[0])}return n})},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.removeNbFormat=function(t){var e=arguments.length<=1||void 0===arguments[1]?"us":arguments[1];if(t){var i=t;return i="us"===e.toLowerCase()?+i.replace(/[^\d\.-]/g,""):+i.replace(/[^\d\,-]/g,"").replace(",",".")}}},function(t,e){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});e.Emitter=function(){function t(){i(this,t),this.events={}}return t.prototype.on=function(t,e){var i=this;t.forEach(function(t){i.events[t]=i.events[t]||[],i.events[t].push(e)})},t.prototype.off=function(t,e){var i=this;t.forEach(function(t){t in i.events&&i.events[t].splice(i.events[t].indexOf(e),1)})},t.prototype.emit=function(t){if(t in this.events)for(var e=0;e0&&s.removeChild(P[0]),this.headTbl.style.tableLayout="fixed",s.style.tableLayout="fixed",this.headTbl.cellPadding=s.cellPadding,this.headTbl.cellSpacing=s.cellSpacing,e.setColWidths(this.headTbl),s.style.width="",this.headTbl.style.width=s.clientWidth+"px",p["default"].add(this.tblCont,"scroll",function(e){var i=p["default"].target(e),s=i.scrollLeft;t.headTblCont.scrollLeft=s});var S=(i.extensions||[]).filter(function(t){return"sort"===t.name});1===S.length&&(S[0].async_sort=!0,S[0].trigger_ids=v),this.tblHasColTag=(0,a.tag)(s,"col").length>0;var R=function(){for(var t=e.nbCells-1;t>=0;t--){var i=(0,a.createElm)("col",["id",e.id+"_col_"+t]);s.insertBefore(i,s.firstChild),i.style.width=e.colWidths[t],this.gridColElms[t]=i}this.tblHasColTag=!0};if(this.tblHasColTag)for(var I=(0,a.tag)(s,"col"),O=0;O',s.popUpDivCssClass=o.popup_div_css_class||"popUpFilter",s.onBeforePopUpOpen=(0,a.isFn)(o.on_before_popup_filter_open)?o.on_before_popup_filter_open:null,s.onAfterPopUpOpen=(0,a.isFn)(o.on_after_popup_filter_open)?o.on_after_popup_filter_open:null,s.onBeforePopUpClose=(0,a.isFn)(o.on_before_popup_filter_close)?o.on_before_popup_filter_close:null,s.onAfterPopUpClose=(0,a.isFn)(o.on_after_popup_filter_close)?o.on_after_popup_filter_close:null,s.popUpFltSpans=[],s.popUpFltImgs=[],s.popUpFltElms=s.popUpFltElmCache||[],s.popUpFltAdjustToContainer=!0,s.prfxPopUpSpan="popUpSpan_",s.prfxPopUpDiv="popUpDiv_",s}return o(e,t),e.prototype.onClick=function(t){var e=p["default"].target(t).parentNode,i=parseInt(e.getAttribute("ci"),10);if(this.closeAll(i),this.toggle(i),this.popUpFltAdjustToContainer){var s=this.popUpFltElms[i],n=this.tf.getHeaderElement(i),r=.95*n.clientWidth;s.style.width=parseInt(r,10)+"px"}p["default"].cancel(t),p["default"].stop(t)},e.prototype.init=function(){var t=this;if(!this.initialized){var e=this.tf;e.headersRow<=1&&(e.headersRow=0);for(var i=0;im;m++)if(!i.hasVisibleRows||-1===i.visibleRows.indexOf(m)){var v=r[m].cells,b=v.length;if(b===i.nbCells&&!this.isCustom)for(var y=0;b>y;y++)if(t===y&&(!e||e&&i.disableExcludedOptions)||t===y&&e&&(""===r[m].style.display&&!i.paging||i.paging&&(!i.validRowsIndex||i.validRowsIndex&&-1!==i.validRowsIndex.indexOf(m))&&(void 0===l||l===t||l!==t&&-1!==i.validRowsIndex.indexOf(m)))){var _=i.getCellData(v[y]),C=(0,c.matchCase)(_,i.caseSensitive);if((0,h.has)(this.opts,C,i.caseSensitive)||this.opts.push(_),e&&i.disableExcludedOptions){var x=d[y];x||(x=i.getFilteredDataCol(y)),(0,h.has)(x,C,i.caseSensitive)||(0,h.has)(f,C,i.caseSensitive)||f.push(_)}}}if(this.isCustom){var w=i.getCustomOptions(t);this.opts=w[0],this.optsTxt=w[1]}if(i.sortSlc&&!this.isCustom&&(i.caseSensitive?(this.opts.sort(),f&&f.sort()):(this.opts.sort(p.ignoreCase),f&&f.sort(p.ignoreCase))),-1!==i.sortNumAsc.indexOf(t))try{this.opts.sort(p.numSortAsc),f&&f.sort(p.numSortAsc),this.isCustom&&this.optsTxt.sort(p.numSortAsc)}catch(E){throw new Error(g.replace("{0}",t).replace("{1}","ascending"))}if(-1!==i.sortNumDesc.indexOf(t))try{this.opts.sort(p.numSortDesc),f&&f.sort(p.numSortDesc),this.isCustom&&this.optsTxt.sort(p.numSortDesc)}catch(E){throw new Error(g.replace("{0}",t).replace("{1}","ascending"))}this.addOptions(t,n,e,f),this.emitter.emit("after-populating-filter",i,t,n)},e.prototype.addOptions=function(t,e,i,s){var n=this.tf,r=e.value;e.innerHTML="",e=this.addFirstOption(e);for(var o=0;or;r++)if((0,s.matchCase)(t[r].toString(),n)===e)return!0;return!1}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.ignoreCase=function(t,e){var i=t.toLowerCase(),s=e.toLowerCase();return s>i?-1:i>s?1:0},e.numSortAsc=function(t,e){return t-e},e.numSortDesc=function(t,e){return e-t}},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.CheckList=void 0;var l=i(10),a=i(3),h=i(16),c=i(5),p=i(17),u=i(1),f=s(u),d=i(4),g=i(11),m="Filter options for column {0} cannot be sorted in {1} manner.";e.CheckList=function(t){function e(i){n(this,e);var s=r(this,t.call(this,i,"checkList")),o=i.config();return s.checkListDiv=[],s.checkListDivCssClass=o.div_checklist_css_class||"div_checklist",s.checkListCssClass=o.checklist_css_class||"flt_checklist",s.checkListItemCssClass=o.checklist_item_css_class||"flt_checklist_item",s.checkListSlcItemCssClass=o.checklist_selected_item_css_class||"flt_checklist_slc_item",s.activateCheckListTxt=o.activate_checklist_text||"Click to load filter data",s.checkListItemDisabledCssClass=o.checklist_item_disabled_css_class||"flt_checklist_item_disabled",s.enableCheckListResetFilter=o.enable_checklist_reset_filter!==!1,s.prfxCheckListDiv="chkdiv_",s.isCustom=null,s.opts=null,s.optsTxt=null,s.excludedOpts=null,s}return o(e,t),e.prototype.onChange=function(t){var e=f["default"].target(t),i=this.tf;this.emitter.emit("filter-focus",i,e),i.filter()},e.prototype.optionClick=function(t){this.setCheckListValues(t.target),this.onChange(t)},e.prototype.onCheckListClick=function(t){var e=this,i=f["default"].target(t);if(this.tf.loadFltOnDemand&&"0"===i.getAttribute("filled")){var s=i.getAttribute("ct"),n=this.checkListDiv[s];this.build(s),f["default"].remove(n,"click",function(t){return e.onCheckListClick(t)})}},e.prototype.init=function(t,e,i){var s=this,n=this.tf,r=e?n.externalFltTgtIds[t]:null,o=(0,a.createElm)("div",["id",this.prfxCheckListDiv+t+"_"+n.id],["ct",t],["filled","0"]);o.className=this.checkListDivCssClass,r?((0,a.elm)(r).appendChild(o),n.externalFltEls.push(o)):i.appendChild(o),this.checkListDiv[t]=o,n.fltIds.push(n.prfxFlt+t+"_"+n.id),n.loadFltOnDemand?(f["default"].add(o,"click",function(t){return s.onCheckListClick(t)}),o.appendChild((0,a.createText)(this.activateCheckListTxt))):this.build(t),this.emitter.on(["build-checklist-filter"],function(t,e,i){return s.build(e,i)}),this.emitter.on(["select-checklist-options"],function(t,e,i){return s.selectOptions(e,i)}),this.initialized=!0},e.prototype.build=function(t){var e=this,i=this.tf;t=parseInt(t,10),this.emitter.emit("before-populating-filter",i,t),this.opts=[],this.optsTxt=[];var s=this.checkListDiv[t],n=(0,a.createElm)("ul",["id",i.fltIds[t]],["colIndex",t]);n.className=this.checkListCssClass,f["default"].add(n,"change",function(t){return e.onChange(t)});var r=i.tbl.rows,o=i.getRowsNb(!0),l=i.caseSensitive;this.isCustom=i.isCustomOptions(t);var u=void 0,d=i.getActiveFilterId();i.linkedFilters&&d&&(u=i.getColumnIndexFromFilterId(d));var g=[];i.linkedFilters&&i.disableExcludedOptions&&(this.excludedOpts=[]),s.innerHTML="";for(var v=i.refRow;o>v;v++)if(!i.hasVisibleRows||-1===i.visibleRows.indexOf(v)){var b=r[v].cells,y=b.length;if(y===i.nbCells&&!this.isCustom)for(var _=0;y>_;_++)if(t===_&&(!i.linkedFilters||i.linkedFilters&&i.disableExcludedOptions)||t===_&&i.linkedFilters&&(""===r[v].style.display&&!i.paging||i.paging&&(!u||u===t||u!==t&&-1!==i.validRowsIndex.indexOf(v)))){var C=i.getCellData(b[_]),x=(0,c.matchCase)(C,l);(0,h.has)(this.opts,x,l)||this.opts.push(C);var w=g[_];i.linkedFilters&&i.disableExcludedOptions&&(w||(w=i.getFilteredDataCol(_)),(0,h.has)(w,x,l)||(0,h.has)(this.excludedOpts,x,l)||this.excludedOpts.push(C))}}if(this.isCustom){var E=i.getCustomOptions(t);this.opts=E[0],this.optsTxt=E[1]}if(i.sortSlc&&!this.isCustom&&(l?(this.opts.sort(),this.excludedOpts&&this.excludedOpts.sort()):(this.opts.sort(p.ignoreCase),this.excludedOpts&&this.excludedOpts.sort(p.ignoreCase))),-1!==i.sortNumAsc.indexOf(t))try{this.opts.sort(p.numSortAsc),this.excludedOpts&&this.excludedOpts.sort(p.numSortAsc),this.isCustom&&this.optsTxt.sort(p.numSortAsc)}catch(T){throw new Error(m.replace("{0}",t).replace("{1}","ascending"))}if(-1!==i.sortNumDesc.indexOf(t))try{this.opts.sort(p.numSortDesc),this.excludedOpts&&this.excludedOpts.sort(p.numSortDesc),this.isCustom&&this.optsTxt.sort(p.numSortDesc)}catch(T){throw new Error(m.replace("{0}",t).replace("{1}","descending"))}this.addChecks(t,n),i.loadFltOnDemand&&(s.innerHTML=""),s.appendChild(n),s.setAttribute("filled","1"),this.emitter.emit("after-populating-filter",i,t,s)},e.prototype.addChecks=function(t,e){for(var i=this,s=this.tf,n=this.addTChecks(t,e),r=0;rr;r++){var o=(0,a.tag)(s,"li")[r],l=(0,a.tag)(o,"label")[0],p=(0,a.tag)(o,"input")[0],u=(0,c.matchCase)((0,a.getText)(l),i.caseSensitive);""!==u&&(0,h.has)(e,u,i.caseSensitive)?(p.checked=!0,this.setCheckListValues(p)):(p.checked=!1,this.setCheckListValues(p))}}},e.prototype.getValues=function(t){var e=this.tf,i=e.getFilterElement(t),s=i.getAttribute("value"),n=(0,d.isEmpty)(s)?"":s;return n=n.substr(0,n.length-3),n=n.split(" "+e.orOperator+" ")},e.prototype.destroy=function(){var t=this;this.emitter.off(["build-checklist-filter"],function(e,i,s){return t.build(i,s)}),this.emitter.off(["select-checklist-options"],function(e,i,s){return t.selectOptions(i,s)})},e}(l.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.RowsCounter=void 0;var o=i(10),l=i(3),a=i(4);e.RowsCounter=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"rowsCounter")),o=r.config;return r.rowsCounterTgtId=o.rows_counter_target_id||null,r.rowsCounterDiv=null,r.rowsCounterSpan=null,r.rowsCounterText=o.rows_counter_text||"Rows: ",r.fromToTextSeparator=o.from_to_text_separator||"-",r.overText=o.over_text||" / ",r.totRowsCssClass=o.tot_rows_css_class||"tot",r.prfxCounter="counter_",r.prfxTotRows="totrows_span_",r.prfxTotRowsTxt="totRowsTextSpan_",r.onBeforeRefreshCounter=(0,a.isFn)(o.on_before_refresh_counter)?o.on_before_refresh_counter:null,r.onAfterRefreshCounter=(0,a.isFn)(o.on_after_refresh_counter)?o.on_after_refresh_counter:null,r}return r(e,t),e.prototype.init=function(){var t=this;if(!this.initialized){var e=this.tf,i=(0,l.createElm)("div",["id",this.prfxCounter+e.id]);i.className=this.totRowsCssClass;var s=(0,l.createElm)("span",["id",this.prfxTotRows+e.id]),n=(0,l.createElm)("span",["id",this.prfxTotRowsTxt+e.id]);n.appendChild((0,l.createText)(this.rowsCounterText)),this.rowsCounterTgtId||e.setToolbar();var r=this.rowsCounterTgtId?(0,l.elm)(this.rowsCounterTgtId):e.lDiv;this.rowsCounterTgtId?(r.appendChild(n),r.appendChild(s)):(i.appendChild(n),i.appendChild(s),r.appendChild(i)),this.rowsCounterDiv=i,this.rowsCounterSpan=s,this.emitter.on(["after-filtering","grouped-by-page"],function(){return t.refresh(e.getValidRowsNb())}),this.emitter.on(["rows-changed"],function(){return t.refresh()}),this.initialized=!0,this.refresh()}},e.prototype.refresh=function(t){if(this.initialized&&this.isEnabled()){var e=this.tf;this.onBeforeRefreshCounter&&this.onBeforeRefreshCounter.call(null,e,this.rowsCounterSpan);var i;if(e.paging){var s=e.feature("paging");if(s){var n=parseInt(s.startPagingRow,10)+(e.getValidRowsNb()>0?1:0),r=n+s.pagingLength-1<=e.getValidRowsNb()?n+s.pagingLength-1:e.getValidRowsNb();i=n+this.fromToTextSeparator+r+this.overText+e.getValidRowsNb()}}else i=t&&""!==t?t:e.getFilterableRowsNb()-e.nbHiddenRows;this.rowsCounterSpan.innerHTML=i,this.onAfterRefreshCounter&&this.onAfterRefreshCounter.call(null,e,this.rowsCounterSpan,i)}},e.prototype.destroy=function(){var t=this;this.initialized&&(!this.rowsCounterTgtId&&this.rowsCounterDiv?(0,l.removeElm)(this.rowsCounterDiv):(0,l.elm)(this.rowsCounterTgtId).innerHTML="",this.rowsCounterSpan=null,this.rowsCounterDiv=null,this.emitter.off(["after-filtering","grouped-by-page"],function(){return t.refresh(tf.getValidRowsNb())}),this.emitter.off(["rows-changed"],function(){return t.refresh()}),this.initialized=!1)},e}(o.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.StatusBar=void 0;var o=i(10),l=i(2),a=i(3),h=i(4);e.StatusBar=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"statusBar")),o=r.config;return r.statusBarTgtId=o.status_bar_target_id||null,r.statusBarDiv=null,r.statusBarSpan=null,r.statusBarSpanText=null,r.statusBarText=o.status_bar_text||"",r.statusBarCssClass=o.status_bar_css_class||"status",r.statusBarCloseDelay=250,r.onBeforeShowMsg=(0,h.isFn)(o.on_before_show_msg)?o.on_before_show_msg:null,r.onAfterShowMsg=(0,h.isFn)(o.on_after_show_msg)?o.on_after_show_msg:null,r.msgFilter=o.msg_filter||"Filtering data...",r.msgPopulate=o.msg_populate||"Populating filter...",r.msgPopulateCheckList=o.msg_populate_checklist||"Populating list...",r.msgChangePage=o.msg_change_page||"Collecting paging data...",r.msgClear=o.msg_clear||"Clearing filters...",r.msgChangeResults=o.msg_change_results||"Changing results per page...",r.msgResetPage=o.msg_reset_page||"Re-setting page...",r.msgResetPageLength=o.msg_reset_page_length||"Re-setting page length...",r.msgSort=o.msg_sort||"Sorting data...",r.msgLoadExtensions=o.msg_load_extensions||"Loading extensions...",r.msgLoadThemes=o.msg_load_themes||"Loading theme(s)...",r.prfxStatus="status_",r.prfxStatusSpan="statusSpan_",r.prfxStatusTxt="statusText_",r}return r(e,t),e.prototype.init=function(){var t=this;if(!this.initialized){var e=this.tf,i=this.emitter,s=(0,a.createElm)("div",["id",this.prfxStatus+e.id]);s.className=this.statusBarCssClass;var n=(0,a.createElm)("span",["id",this.prfxStatusSpan+e.id]),r=(0,a.createElm)("span",["id",this.prfxStatusTxt+e.id]);r.appendChild((0,a.createText)(this.statusBarText)),this.statusBarTgtId||e.setToolbar();var o=this.statusBarTgtId?(0,a.elm)(this.statusBarTgtId):e.lDiv;this.statusBarTgtId?(o.appendChild(r),o.appendChild(n)):(s.appendChild(r),s.appendChild(n),o.appendChild(s)),this.statusBarDiv=s,this.statusBarSpan=n,this.statusBarSpanText=r,i.on(["before-filtering"],function(){return t.message(t.msgFilter)}),i.on(["before-populating-filter"],function(){return t.message(t.msgPopulate)}),i.on(["before-page-change"],function(){return t.message(t.msgChangePage)}),i.on(["before-clearing-filters"],function(){return t.message(t.msgClear)}),i.on(["before-page-length-change"],function(){return t.message(t.msgChangeResults)}),i.on(["before-reset-page"],function(){return t.message(t.msgResetPage)}),i.on(["before-reset-page-length"],function(){return t.message(t.msgResetPageLength)}),i.on(["before-loading-extensions"],function(){return t.message(t.msgLoadExtensions)}),i.on(["before-loading-themes"],function(){return t.message(t.msgLoadThemes)}),i.on(["after-filtering","after-populating-filter","after-page-change","after-clearing-filters","after-page-length-change","after-reset-page","after-reset-page-length","after-loading-extensions","after-loading-themes"],function(){return t.message("")}),this.initialized=!0}},e.prototype.message=function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?"":arguments[0];if(this.isEnabled()){this.onBeforeShowMsg&&this.onBeforeShowMsg.call(null,this.tf,e);var i=""===e?this.statusBarCloseDelay:1;l.root.setTimeout(function(){t.initialized&&(t.statusBarSpan.innerHTML=e,t.onAfterShowMsg&&t.onAfterShowMsg.call(null,t.tf,e))},i)}},e.prototype.destroy=function(){var t=this;if(this.initialized){var e=this.emitter;this.statusBarDiv.innerHTML="",this.statusBarTgtId||(0,a.removeElm)(this.statusBarDiv),this.statusBarSpan=null,this.statusBarSpanText=null,this.statusBarDiv=null,e.off(["before-filtering"],function(){return t.message(t.msgFilter)}),e.off(["before-populating-filter"],function(){return t.message(t.msgPopulate)}),e.off(["before-page-change"],function(){return t.message(t.msgChangePage)}),e.off(["before-clearing-filters"],function(){return t.message(t.msgClear)}),e.off(["before-page-length-change"],function(){return t.message(t.msgChangeResults)}),e.off(["before-reset-page"],function(){return t.message(t.msgResetPage)}),e.off(["before-reset-page-length"],function(){return t.message(t.msgResetPageLength)}),e.off(["before-loading-extensions"],function(){return t.message(t.msgLoadExtensions)}),e.off(["before-loading-themes"],function(){return t.message(t.msgLoadThemes)}),e.off(["after-filtering","after-populating-filter","after-page-change","after-clearing-filters","after-page-length-change","after-reset-page","after-reset-page-length","after-loading-extensions","after-loading-themes"],function(){return t.message("")}),this.initialized=!1}},e}(o.Feature)},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.Paging=void 0;var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a=i(10),h=i(3),c=i(4),p=i(1),u=s(p),f=i(11);e.Paging=function(t){function e(i){n(this,e);var s=r(this,t.call(this,i,"paging")),o=s.config;s.btnPageCssClass=o.paging_btn_css_class||"pgInp",s.pagingSlc=null,s.resultsPerPageSlc=null,s.pagingTgtId=o.paging_target_id||null,s.pagingLength=isNaN(o.paging_length)?10:o.paging_length,s.resultsPerPageTgtId=o.results_per_page_target_id||null,s.pgSlcCssClass=o.paging_slc_css_class||"pgSlc",s.pgInpCssClass=o.paging_inp_css_class||"pgNbInp",s.resultsPerPage=o.results_per_page||null,s.hasResultsPerPage=(0,c.isArray)(s.resultsPerPage),s.resultsSlcCssClass=o.results_slc_css_class||"rspg",s.resultsSpanCssClass=o.results_span_css_class||"rspgSpan",s.startPagingRow=0,s.nbPages=0,s.currentPageNb=1,s.btnNextPageText=o.btn_next_page_text||">",s.btnPrevPageText=o.btn_prev_page_text||"<",s.btnLastPageText=o.btn_last_page_text||">|",s.btnFirstPageText=o.btn_first_page_text||"|<",s.btnNextPageHtml=o.btn_next_page_html||(i.enableIcons?'':null),s.btnPrevPageHtml=o.btn_prev_page_html||(i.enableIcons?'':null),s.btnFirstPageHtml=o.btn_first_page_html||(i.enableIcons?'':null),s.btnLastPageHtml=o.btn_last_page_html||(i.enableIcons?'':null),s.pageText=o.page_text||" Page ",s.ofText=o.of_text||" of ",s.nbPgSpanCssClass=o.nb_pages_css_class||"nbpg",s.hasPagingBtns=o.paging_btns!==!1,s.pageSelectorType=o.page_selector_type||f.SELECT,s.onBeforeChangePage=(0,c.isFn)(o.on_before_change_page)?o.on_before_change_page:null,s.onAfterChangePage=(0,c.isFn)(o.on_after_change_page)?o.on_after_change_page:null,s.prfxSlcPages="slcPages_",s.prfxSlcResults="slcResults_",s.prfxSlcResultsTxt="slcResultsTxt_",s.prfxBtnNextSpan="btnNextSpan_",s.prfxBtnPrevSpan="btnPrevSpan_",s.prfxBtnLastSpan="btnLastSpan_",s.prfxBtnFirstSpan="btnFirstSpan_",s.prfxBtnNext="btnNext_",s.prfxBtnPrev="btnPrev_",s.prfxBtnLast="btnLast_",s.prfxBtnFirst="btnFirst_",s.prfxPgSpan="pgspan_",s.prfxPgBeforeSpan="pgbeforespan_",s.prfxPgAfterSpan="pgafterspan_";var l=i.refRow,a=i.getRowsNb(!0);s.nbPages=Math.ceil((a-l)/s.pagingLength);var h=s;return s.evt={slcIndex:function(){return h.pageSelectorType===f.SELECT?h.pagingSlc.options.selectedIndex:parseInt(h.pagingSlc.value,10)-1},nbOpts:function(){return h.pageSelectorType===f.SELECT?parseInt(h.pagingSlc.options.length,10)-1:h.nbPages-1},next:function(){var t=h.evt.slcIndex()0?h.evt.slcIndex()-1:h.evt.nbOpts();h.changePage(t)},last:function(){h.changePage(h.evt.nbOpts())},first:function(){h.changePage(0)},_detectKey:function(t){var e=u["default"].keyCode(t);e===f.ENTER_KEY&&(i.sorted?(i.filter(),h.changePage(h.evt.slcIndex())):h.changePage(),this.blur())},slcPagesChange:null,nextEvt:null,prevEvt:null,lastEvt:null,firstEvt:null},s}return o(e,t),e.prototype.init=function(){var t,e=this,i=this.tf,s=this.evt;if(!this.initialized){this.hasResultsPerPage&&(this.resultsPerPage.length<2?this.hasResultsPerPage=!1:(this.pagingLength=this.resultsPerPage[1][0],this.setResultsPerPage())),s.slcPagesChange=function(t){var i=t.target;e.changePage(i.selectedIndex)},this.pageSelectorType===f.SELECT&&(t=(0,h.createElm)(f.SELECT,["id",this.prfxSlcPages+i.id]),t.className=this.pgSlcCssClass,u["default"].add(t,"change",s.slcPagesChange)),this.pageSelectorType===f.INPUT&&(t=(0,h.createElm)(f.INPUT,["id",this.prfxSlcPages+i.id],["value",this.currentPageNb]),t.className=this.pgInpCssClass,u["default"].add(t,"keypress",s._detectKey));var n=(0,h.createElm)("span",["id",this.prfxBtnNextSpan+i.id]),r=(0,h.createElm)("span",["id",this.prfxBtnPrevSpan+i.id]),o=(0,h.createElm)("span",["id",this.prfxBtnLastSpan+i.id]),l=(0,h.createElm)("span",["id",this.prfxBtnFirstSpan+i.id]);if(this.hasPagingBtns){if(this.btnNextPageHtml)n.innerHTML=this.btnNextPageHtml,u["default"].add(n,"click",s.next);else{var a=(0,h.createElm)(f.INPUT,["id",this.prfxBtnNext+i.id],["type","button"],["value",this.btnNextPageText],["title","Next"]);a.className=this.btnPageCssClass,u["default"].add(a,"click",s.next),n.appendChild(a)}if(this.btnPrevPageHtml)r.innerHTML=this.btnPrevPageHtml,u["default"].add(r,"click",s.prev);else{var c=(0,h.createElm)(f.INPUT,["id",this.prfxBtnPrev+i.id],["type","button"],["value",this.btnPrevPageText],["title","Previous"]);c.className=this.btnPageCssClass,u["default"].add(c,"click",s.prev),r.appendChild(c)}if(this.btnLastPageHtml)o.innerHTML=this.btnLastPageHtml,u["default"].add(o,"click",s.last);else{var p=(0,h.createElm)(f.INPUT,["id",this.prfxBtnLast+i.id],["type","button"],["value",this.btnLastPageText],["title","Last"]);p.className=this.btnPageCssClass,u["default"].add(p,"click",s.last),o.appendChild(p)}if(this.btnFirstPageHtml)l.innerHTML=this.btnFirstPageHtml,u["default"].add(l,"click",s.first);else{var d=(0,h.createElm)(f.INPUT,["id",this.prfxBtnFirst+i.id],["type","button"],["value",this.btnFirstPageText],["title","First"]);d.className=this.btnPageCssClass,u["default"].add(d,"click",s.first),l.appendChild(d)}}this.pagingTgtId||i.setToolbar();var g=this.pagingTgtId?(0,h.elm)(this.pagingTgtId):i.mDiv;g.appendChild(l),g.appendChild(r);var m=(0,h.createElm)("span",["id",this.prfxPgBeforeSpan+i.id]);m.appendChild((0,h.createText)(this.pageText)),m.className=this.nbPgSpanCssClass,g.appendChild(m),g.appendChild(t);var v=(0,h.createElm)("span",["id",this.prfxPgAfterSpan+i.id]);v.appendChild((0,h.createText)(this.ofText)),v.className=this.nbPgSpanCssClass,g.appendChild(v);var b=(0,h.createElm)("span",["id",this.prfxPgSpan+i.id]);b.className=this.nbPgSpanCssClass,b.appendChild((0,h.createText)(" "+this.nbPages+" ")),g.appendChild(b),g.appendChild(n),g.appendChild(o),this.pagingSlc=(0,h.elm)(this.prfxSlcPages+i.id),this.setPagingInfo(),i.fltGrid||(i.validateAllRows(),this.setPagingInfo(i.validRowsIndex)),this.emitter.on(["after-filtering"],function(){return e.resetPagingInfo()}),this.emitter.on(["change-page"],function(t,i){return e.setPage(i)}),this.emitter.on(["change-page-results"],function(t,i){return e.changeResultsPerPage(i)}),this.initialized=!0}},e.prototype.reset=function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0],e=this.tf;this.isEnabled()||(this.enable(),this.init(),t&&e.filter())},e.prototype.resetPagingInfo=function(){this.startPagingRow=0,this.currentPageNb=1,this.setPagingInfo(this.tf.validRowsIndex)},e.prototype.setPagingInfo=function(t){var e=this.tf,i=this.pagingTgtId?(0,h.elm)(this.pagingTgtId):e.mDiv,s=(0,h.elm)(this.prfxPgSpan+e.id);if(e.validRowsIndex=t||e.getValidRows(!0),this.nbPages=Math.ceil(e.validRowsIndex.length/this.pagingLength),s.innerHTML=this.nbPages,this.pageSelectorType===f.SELECT&&(this.pagingSlc.innerHTML=""),this.nbPages>0)if(i.style.visibility="visible",this.pageSelectorType===f.SELECT)for(var n=0;nr;r++){var l=e.validRowsIndex[r],a=i[l],h=a.getAttribute("validRow"),p=!1;r>=s&&n>r?((0,c.isNull)(h)||Boolean("true"===h))&&(a.style.display="",p=!0):a.style.display=f.NONE,this.emitter.emit("row-paged",e,l,r,p)}this.emitter.emit("grouped-by-page",e,this)},e.prototype.getPage=function(){return this.currentPageNb},e.prototype.setPage=function(t){var e=this.tf;if(e.isInitialized()&&this.isEnabled()){var i=this.evt,s="undefined"==typeof t?"undefined":l(t);if("string"===s)switch(t.toLowerCase()){case"next":i.next();break;case"previous":i.prev();break;case"last":i.last();break;case"first":i.first();break;default:i.next()}else"number"===s&&this.changePage(t-1)}},e.prototype.setResultsPerPage=function(){var t=this,e=this.tf,i=this.evt;if(!this.resultsPerPageSlc&&this.resultsPerPage){i.slcResultsChange=function(e){t.onChangeResultsPerPage(),e.target.blur()};var s=(0,h.createElm)(f.SELECT,["id",this.prfxSlcResults+e.id]);s.className=this.resultsSlcCssClass;var n=this.resultsPerPage[0],r=this.resultsPerPage[1],o=(0,h.createElm)("span",["id",this.prfxSlcResultsTxt+e.id]);o.className=this.resultsSpanCssClass,this.resultsPerPageTgtId||e.setToolbar();var l=this.resultsPerPageTgtId?(0,h.elm)(this.resultsPerPageTgtId):e.rDiv;o.appendChild((0,h.createText)(n));var a=e.feature("help");a&&a.btn?(a.btn.parentNode.insertBefore(o,a.btn),a.btn.parentNode.insertBefore(s,a.btn)):(l.appendChild(o),l.appendChild(s));for(var c=0;c=0&&t<=this.nbPages-1&&(this.onBeforeChangePage&&this.onBeforeChangePage.call(null,this,t+1),this.currentPageNb=parseInt(t,10)+1,this.pageSelectorType===f.SELECT?this.pagingSlc.options[t].selected=!0:this.pagingSlc.value=this.currentPageNb,this.startPagingRow=this.pageSelectorType===f.SELECT?this.pagingSlc.value:t*this.pagingLength,this.groupByPage(),this.onAfterChangePage&&this.onAfterChangePage.call(null,this,t+1)),this.emitter.emit("after-page-change",e,t+1))},e.prototype.changeResultsPerPage=function(t){this.isEnabled()&&!isNaN(t)&&(this.resultsPerPageSlc.value=t,this.onChangeResultsPerPage())},e.prototype.onChangeResultsPerPage=function(){var t=this.tf;if(this.isEnabled()){this.emitter.emit("before-page-length-change",t);var e=this.resultsPerPageSlc,i=e.selectedIndex,s=this.pageSelectorType===f.SELECT?this.pagingSlc.selectedIndex:parseInt(this.pagingSlc.value-1,10);if(this.pagingLength=parseInt(e.options[i].value,10),this.startPagingRow=this.pagingLength*s,!isNaN(this.pagingLength)&&(this.startPagingRow>=t.nbFilterableRows&&(this.startPagingRow=t.nbFilterableRows-this.pagingLength),this.setPagingInfo(),this.pageSelectorType===f.SELECT)){var n=this.pagingSlc.options.length-1<=s?this.pagingSlc.options.length-1:s;this.pagingSlc.options[n].selected=!0}this.emitter.emit("after-page-length-change",t,this.pagingLength)}},e.prototype.resetPage=function(){var t=this.tf;if(this.isEnabled()){this.emitter.emit("before-reset-page",t);var e=t.feature("store").getPageNb();""!==e&&this.changePage(e-1),this.emitter.emit("after-reset-page",t,e)}},e.prototype.resetPageLength=function(){var t=this.tf;if(this.isEnabled()){this.emitter.emit("before-reset-page-length",t);var e=t.feature("store").getPageLength();""!==e&&(this.resultsPerPageSlc.options[e].selected=!0,this.changeResultsPerPage()),this.emitter.emit("after-reset-page-length",t,e)}},e.prototype.destroy=function(){var t=this,e=this.tf;if(this.initialized){var i=(0,h.elm)(this.prfxBtnNextSpan+e.id),s=(0,h.elm)(this.prfxBtnPrevSpan+e.id),n=(0,h.elm)(this.prfxBtnLastSpan+e.id),r=(0,h.elm)(this.prfxBtnFirstSpan+e.id),o=(0,h.elm)(this.prfxPgBeforeSpan+e.id),l=(0,h.elm)(this.prfxPgAfterSpan+e.id),a=(0,h.elm)(this.prfxPgSpan+e.id),c=this.evt;this.pagingSlc&&(this.pageSelectorType===f.SELECT?u["default"].remove(this.pagingSlc,"change",c.slcPagesChange):this.pageSelectorType===f.INPUT&&u["default"].remove(this.pagingSlc,"keypress",c._detectKey),(0,h.removeElm)(this.pagingSlc)),i&&(u["default"].remove(i,"click",c.next),(0,h.removeElm)(i)),s&&(u["default"].remove(s,"click",c.prev),(0,h.removeElm)(s)),n&&(u["default"].remove(n,"click",c.last),(0,h.removeElm)(n)),r&&(u["default"].remove(r,"click",c.first),(0,h.removeElm)(r)),o&&(0,h.removeElm)(o),l&&(0,h.removeElm)(l),a&&(0,h.removeElm)(a),this.hasResultsPerPage&&this.removeResultsPerPage(),this.emitter.off(["after-filtering"],function(){return t.resetPagingInfo()}),this.emitter.off(["change-page"],function(e,i){return t.setPage(i)}),this.emitter.off(["change-page-results"],function(e,i){return t.changeResultsPerPage(i)}),this.pagingSlc=null,this.nbPages=0,this.disable(),this.initialized=!1}},e}(a.Feature)},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e); -t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.ClearButton=void 0;var l=i(10),a=i(3),h=i(1),c=s(h);e.ClearButton=function(t){function e(i){n(this,e);var s=r(this,t.call(this,i,"btnReset")),o=s.config;return s.btnResetTgtId=o.btn_reset_target_id||null,s.btnResetEl=null,s.btnResetText=o.btn_reset_text||"Reset",s.btnResetTooltip=o.btn_reset_tooltip||"Clear filters",s.btnResetHtml=o.btn_reset_html||(i.enableIcons?'':null),s.prfxResetSpan="resetspan_",s}return o(e,t),e.prototype.onClick=function(){this.isEnabled()&&this.tf.clearFilters()},e.prototype.init=function(){var t=this,e=this.tf;if(!this.initialized){var i=(0,a.createElm)("span",["id",this.prfxResetSpan+e.id]);this.btnResetTgtId||e.setToolbar();var s=this.btnResetTgtId?(0,a.elm)(this.btnResetTgtId):e.rDiv;if(s.appendChild(i),this.btnResetHtml){i.innerHTML=this.btnResetHtml;var n=i.firstChild;c["default"].add(n,"click",function(){t.onClick()})}else{var r=(0,a.createElm)("a",["href","javascript:voelm(0);"]);r.className=e.btnResetCssClass,r.appendChild((0,a.createText)(this.btnResetText)),i.appendChild(r),c["default"].add(r,"click",function(){t.onClick()})}this.btnResetEl=i.firstChild,this.initialized=!0}},e.prototype.destroy=function(){var t=this.tf;if(this.initialized){var e=(0,a.elm)(this.prfxResetSpan+t.id);e&&(0,a.removeElm)(e),this.btnResetEl=null,this.initialized=!1}},e}(l.Feature)},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.Help=void 0;var l=i(10),a=i(3),h=i(1),c=s(h),p=i(11),u="https://github.com/koalyptus/TableFilter/wiki/4.-Filter-operators",f="http://koalyptus.github.io/TableFilter/";e.Help=function(t){function e(i){n(this,e);var s=r(this,t.call(this,i,"help")),o=s.config;return s.tgtId=o.help_instructions_target_id||null,s.contTgtId=o.help_instructions_container_target_id||null,s.instrText=o.help_instructions_text?o.help_instructions_text:'Use the filters above each column to filter and limit table data. Advanced searches can be performed by using the following operators:
<, <=, >, >=, =, *, !, {, }, ||,&&, [empty], [nonempty], rgx:
Learn more
',s.instrHtml=o.help_instructions_html||null,s.btnText=o.help_instructions_btn_text||"?",s.btnHtml=o.help_instructions_btn_html||null,s.btnCssClass=o.help_instructions_btn_css_class||"helpBtn",s.contCssClass=o.help_instructions_container_css_class||"helpCont",s.btn=null,s.cont=null,s.defaultHtml='

TableFilter v'+i.version+'

'+f+"
©2015-"+i.year+' Max Guglielmi
',s.prfxHelpSpan="helpSpan_",s.prfxHelpDiv="helpDiv_",s.emitter.on(["init-help"],function(){return s.init()}),s}return o(e,t),e.prototype.init=function(){var t=this;if(!this.initialized){var e=this.tf,i=(0,a.createElm)("span",["id",this.prfxHelpSpan+e.id]),s=(0,a.createElm)("div",["id",this.prfxHelpDiv+e.id]);this.tgtId||e.setToolbar();var n=this.tgtId?(0,a.elm)(this.tgtId):e.rDiv;n.appendChild(i);var r=this.contTgtId?(0,a.elm)(this.contTgtId):i;if(this.btnHtml){i.innerHTML=this.btnHtml;var o=i.firstChild;c["default"].add(o,"click",function(){return t.toggle()}),r.appendChild(s)}else{r.appendChild(s);var l=(0,a.createElm)("a",["href","javascript:void(0);"]);l.className=this.btnCssClass,l.appendChild((0,a.createText)(this.btnText)),i.appendChild(l),c["default"].add(l,"click",function(){return t.toggle()})}this.instrHtml?(this.contTgtId&&r.appendChild(s),s.innerHTML=this.instrHtml,this.contTgtId||(s.className=this.contCssClass,c["default"].add(s,"dblclick",function(){return t.toggle()}))):(s.innerHTML=this.instrText,s.className=this.contCssClass,c["default"].add(s,"dblclick",function(){return t.toggle()})),s.innerHTML+=this.defaultHtml,c["default"].add(s,"click",function(){return t.toggle()}),this.cont=s,this.btn=i,this.initialized=!0}},e.prototype.toggle=function(){if(this.enabled!==!1){var t=this.cont.style.display;""===t||t===p.NONE?this.cont.style.display="inline":this.cont.style.display=p.NONE}},e.prototype.destroy=function(){this.initialized&&((0,a.removeElm)(this.btn),this.btn=null,this.cont&&((0,a.removeElm)(this.cont),this.cont=null,this.initialized=!1))},e}(l.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.AlternateRows=void 0;var o=i(10),l=i(3);e.AlternateRows=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"alternateRows")),o=r.config;return r.evenCss=o.even_row_css_class||"even",r.oddCss=o.odd_row_css_class||"odd",r}return r(e,t),e.prototype.init=function(){var t=this;this.initialized||(this.processAll(),this.emitter.on(["row-processed","row-paged"],function(e,i,s,n){return t.processRow(i,s,n)}),this.emitter.on(["column-sorted"],function(){return t.processAll()}),this.initialized=!0)},e.prototype.processAll=function(){if(this.isEnabled())for(var t=this.tf,e=t.getValidRows(!0),i=e.length,s=0,n=0;i>n;n++){var r=e[n];this.setRowBg(r,s),s++}},e.prototype.processRow=function(t,e,i){i?this.setRowBg(t,e):this.removeRowBg(t)},e.prototype.setRowBg=function(t,e){if(this.isEnabled()&&!isNaN(t)){var i=this.tf.tbl.rows,s=isNaN(e)?t:e;this.removeRowBg(t),(0,l.addClass)(i[t],s%2?this.evenCss:this.oddCss)}},e.prototype.removeRowBg=function(t){if(!isNaN(t)){var e=this.tf.tbl.rows;(0,l.removeClass)(e[t],this.oddCss),(0,l.removeClass)(e[t],this.evenCss)}},e.prototype.destroy=function(){var t=this;if(this.initialized){for(var e=this.tf.getRowsNb(!0),i=0;e>i;i++)this.removeRowBg(i);this.emitter.off(["row-processed","row-paged"],function(e,i,s,n){return t.processRow(i,s,n)}),this.emitter.off(["column-sorted"],function(){return t.processAll()}),this.initialized=!1}},e}(o.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.NoResults=void 0;var o=i(10),l=i(3),a=i(4),h=i(11);e.NoResults=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"noResults")),o=r.config.no_results_message;return r.content=o.content||"No results",r.customContainer=o.custom_container||null,r.customContainerId=o.custom_container_id||null,r.isExternal=!(0,a.isEmpty)(r.customContainer)||!(0,a.isEmpty)(r.customContainerId),r.cssClass=o.css_class||"no-results",r.cont=null,r.onBeforeShowMsg=(0,a.isFn)(o.on_before_show_msg)?o.on_before_show_msg:null,r.onAfterShowMsg=(0,a.isFn)(o.on_after_show_msg)?o.on_after_show_msg:null,r.onBeforeHideMsg=(0,a.isFn)(o.on_before_hide_msg)?o.on_before_hide_msg:null,r.onAfterHideMsg=(0,a.isFn)(o.on_after_hide_msg)?o.on_after_hide_msg:null,r.prfxNoResults="nores_",r}return r(e,t),e.prototype.init=function(){var t=this;if(!this.initialized){var e=this.tf,i=this.customContainer||(0,l.elm)(this.customContainerId)||e.tbl,s=(0,l.createElm)("div",["id",this.prfxNoResults+e.id]);s.className=this.cssClass,s.innerHTML=this.content,this.isExternal?i.appendChild(s):i.parentNode.insertBefore(s,i.nextSibling),this.cont=s,this.emitter.on(["after-filtering"],function(){return t.toggle()}),this.initialized=!0,this.hide()}},e.prototype.toggle=function(){this.tf.getValidRowsNb()>0?this.hide():this.show()},e.prototype.show=function(){this.initialized&&this.isEnabled()&&(this.onBeforeShowMsg&&this.onBeforeShowMsg.call(null,this.tf,this),this.setWidth(),this.cont.style.display="block",this.onAfterShowMsg&&this.onAfterShowMsg.call(null,this.tf,this))},e.prototype.hide=function(){this.initialized&&this.isEnabled()&&(this.onBeforeHideMsg&&this.onBeforeHideMsg.call(null,this.tf,this),this.cont.style.display=h.NONE,this.onBeforeHideMsg&&this.onBeforeHideMsg.call(null,this.tf,this))},e.prototype.setWidth=function(){if(this.initialized&&!this.isExternal&&this.isEnabled())if(this.tf.gridLayout){var t=this.tf.feature("gridLayout");this.cont.style.width=t.tblCont.clientWidth+"px"}else this.cont.style.width=this.tf.tbl.clientWidth+"px"},e.prototype.destroy=function(){var t=this;this.initialized&&((0,l.removeElm)(this.cont),this.cont=null,this.emitter.off(["after-filtering"],function(){return t.toggle()}),this.initialized=!1)},e}(o.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.State=void 0;var o=i(10),l=i(27),a=i(28),h=i(5),c=i(4);e.State=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"state")),o=r.config.state;return r.enableHash=o===!0||(0,c.isArray)(o.types)&&-1!==o.types.indexOf("hash"),r.enableLocalStorage=(0,c.isArray)(o.types)&&-1!==o.types.indexOf("local_storage"),r.enableCookie=(0,c.isArray)(o.types)&&-1!==o.types.indexOf("cookie"),r.persistFilters=o.filters!==!1,r.persistPageNumber=Boolean(o.page_number),r.persistPageLength=Boolean(o.page_length),r.persistSort=Boolean(o.sort),r.persistColsVisibility=Boolean(o.columns_visibility),r.persistFiltersVisibility=Boolean(o.filters_visibility),r.cookieDuration=isNaN(o.cookie_duration)?87600:parseInt(o.cookie_duration,10),r.enableStorage=r.enableLocalStorage||r.enableCookie,r.hash=null,r.pageNb=null,r.pageLength=null,r.sort=null,r.hiddenCols=null,r.filtersVisibility=null,r.state={},r.prfxCol="col_",r.pageNbKey="page",r.pageLengthKey="page_length",r.filtersVisKey="filters_visibility",r}return r(e,t),e.prototype.init=function(){var t=this;this.initialized||(this.emitter.on(["after-filtering"],function(){return t.update()}),this.emitter.on(["after-page-change","after-clearing-filters"],function(e,i){return t.updatePage(i)}),this.emitter.on(["after-page-length-change"],function(e,i){return t.updatePageLength(i)}),this.emitter.on(["column-sorted"],function(e,i,s){return t.updateSort(i,s)}),this.emitter.on(["sort-initialized"],function(){return t._syncSort()}),this.emitter.on(["columns-visibility-initialized"],function(){return t._syncColsVisibility()}),this.emitter.on(["column-shown","column-hidden"],function(e,i,s,n){return t.updateColsVisibility(n)}),this.emitter.on(["filters-visibility-initialized"],function(){return t._syncFiltersVisibility()}),this.emitter.on(["filters-toggled"],function(e,i,s){return t.updateFiltersVisibility(s)}),this.enableHash&&(this.hash=new l.Hash(this),this.hash.init()),this.enableStorage&&(this.storage=new a.Storage(this),this.storage.init()),this.initialized=!0)},e.prototype.update=function(){var t=this;if(this.isEnabled()){var e=this.state,i=this.tf;if(this.persistFilters){var s=i.getFiltersValue();s.forEach(function(i,s){var n=""+t.prfxCol+s;(0,c.isString)(i)&&(0,h.isEmpty)(i)?e.hasOwnProperty(n)&&(e[n].flt=void 0):(e[n]=e[n]||{},e[n].flt=i)})}if(this.persistPageNumber&&((0,c.isNull)(this.pageNb)?e[this.pageNbKey]=void 0:e[this.pageNbKey]=this.pageNb),this.persistPageLength&&((0,c.isNull)(this.pageLength)?e[this.pageLengthKey]=void 0:e[this.pageLengthKey]=this.pageLength),this.persistSort&&!(0,c.isNull)(this.sort)){Object.keys(e).forEach(function(i){-1!==i.indexOf(t.prfxCol)&&e[i]&&(e[i].sort=void 0)});var n=""+this.prfxCol+this.sort.column;e[n]=e[n]||{},e[n].sort={descending:this.sort.descending}}this.persistColsVisibility&&((0,c.isNull)(this.hiddenCols)||(Object.keys(e).forEach(function(i){-1!==i.indexOf(t.prfxCol)&&e[i]&&(e[i].hidden=void 0)}),this.hiddenCols.forEach(function(i){var s=""+t.prfxCol+i;e[s]=e[s]||{},e[s].hidden=!0}))),this.persistFiltersVisibility&&((0,c.isNull)(this.filtersVisibility)?e[this.filtersVisKey]=void 0:e[this.filtersVisKey]=this.filtersVisibility),this.emitter.emit("state-changed",i,e)}},e.prototype.updatePage=function(t){this.pageNb=t,this.update()},e.prototype.updatePageLength=function(t){this.pageLength=t,this.update()},e.prototype.updateSort=function(t,e){this.sort={column:t,descending:e},this.update()},e.prototype.updateColsVisibility=function(t){this.hiddenCols=t,this.update()},e.prototype.updateFiltersVisibility=function(t){this.filtersVisibility=t,this.update()},e.prototype.override=function(t){this.state=t},e.prototype.sync=function(){var t=this.state,e=this.tf;if(this._syncFilters(),this.persistPageNumber){var i=t[this.pageNbKey];this.emitter.emit("change-page",e,i)}if(this.persistPageLength){var s=t[this.pageLengthKey];this.emitter.emit("change-page-results",e,s)}this._syncSort(),this._syncColsVisibility(),this._syncFiltersVisibility()},e.prototype.overrideAndSync=function(t){this.disable(),this.override(t),this.sync(),this.enable()},e.prototype._syncFilters=function(){var t=this;if(this.persistFilters){var e=this.state,i=this.tf;Object.keys(e).forEach(function(s){if(-1!==s.indexOf(t.prfxCol)){var n=parseInt(s.replace(t.prfxCol,""),10),r=e[s].flt;i.setFilterValue(n,r)}}),i.filter()}},e.prototype._syncSort=function(){var t=this;if(this.persistSort){var e=this.state,i=this.tf;Object.keys(e).forEach(function(s){if(-1!==s.indexOf(t.prfxCol)){var n=parseInt(s.replace(t.prfxCol,""),10);if(!(0,c.isUndef)(e[s].sort)){var r=e[s].sort;t.emitter.emit("sort",i,n,r.descending)}}})}},e.prototype._syncColsVisibility=function(){var t=this;if(this.persistColsVisibility){var e=this.state,i=this.tf,s=[];Object.keys(e).forEach(function(i){if(-1!==i.indexOf(t.prfxCol)){var n=parseInt(i.replace(t.prfxCol,""),10);(0,c.isUndef)(e[i].hidden)||s.push(n)}}),s.forEach(function(e){t.emitter.emit("hide-column",i,e)})}},e.prototype._syncFiltersVisibility=function(){if(this.persistFiltersVisibility){var t=this.state,e=this.tf,i=t[this.filtersVisKey];this.filtersVisibility=i,this.emitter.emit("show-filters",e,i)}},e.prototype.destroy=function(){var t=this;this.initialized&&(this.state={},this.emitter.off(["after-filtering"],function(){return t.update()}),this.emitter.off(["after-page-change","after-clearing-filters"],function(e,i){return t.updatePage(i)}),this.emitter.off(["after-page-length-change"],function(e,i){return t.updatePageLength(i)}),this.emitter.off(["column-sorted"],function(e,i,s){return t.updateSort(i,s)}),this.emitter.off(["sort-initialized"],function(){return t._syncSort()}),this.emitter.off(["columns-visibility-initialized"],function(){return t._syncColsVisibility()}),this.emitter.off(["column-shown","column-hidden"],function(e,i,s,n){return t.updateColsVisibility(n)}),this.emitter.off(["filters-visibility-initialized"],function(){return t._syncFiltersVisibility()}),this.emitter.off(["filters-toggled"],function(e,i,s){return t.updateFiltersVisibility(s)}),this.enableHash&&(this.hash.destroy(),this.hash=null),this.enableStorage&&(this.storage.destroy(),this.storage=null),this.initialized=!1)},e}(o.Feature)},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.Hash=e.hasHashChange=void 0;var r=i(1),o=s(r),l=i(2),a=l.root.JSON,h=l.root.location,c=l.root.decodeURIComponent,p=e.hasHashChange=function(){var t=l.root.documentMode;return"onhashchange"in l.root&&(void 0===t||t>7)};e.Hash=function(){function t(e){n(this,t),this.state=e,this.lastHash=null,this.emitter=e.emitter}return t.prototype.init=function(){var t=this;p()&&(this.lastHash=h.hash,this.emitter.on(["state-changed"],function(e,i){return t.update(i)}),this.emitter.on(["initialized"],function(){return t.sync()}),o["default"].add(l.root,"hashchange",function(){return t.sync()}))},t.prototype.update=function(t){var e="#"+a.stringify(t);this.lastHash!==e&&(h.hash=e,this.lastHash=e)},t.prototype.parse=function(t){return-1===t.indexOf("#")?null:(t=t.substr(1),a.parse(c(t)))},t.prototype.sync=function(){var t=this.parse(h.hash);t&&this.state.overrideAndSync(t)},t.prototype.destroy=function(){var t=this;this.emitter.off(["state-changed"],function(e,i){return t.update(i)}),this.emitter.off(["initialized"],function(){return t.sync()}),o["default"].remove(l.root,"hashchange",function(){return t.sync()}),this.state=null,this.lastHash=null,this.emitter=null},t}()},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.Storage=e.hasStorage=void 0;var r=i(29),o=s(r),l=i(2),a=l.root.JSON,h=l.root.localStorage,c=l.root.location,p=e.hasStorage=function(){return"Storage"in l.root};e.Storage=function(){function t(e){n(this,t),this.state=e,this.tf=e.tf,this.enableLocalStorage=e.enableLocalStorage&&p(),this.enableCookie=e.enableCookie&&!this.enableLocalStorage,this.emitter=e.emitter,this.duration=e.cookieDuration}return t.prototype.init=function(){var t=this;this.emitter.on(["state-changed"],function(e,i){return t.save(i)}),this.emitter.on(["initialized"],function(){return t.sync()})},t.prototype.save=function(t){this.enableLocalStorage?h[this.getKey()]=a.stringify(t):o["default"].write(this.getKey(),a.stringify(t),this.duration)},t.prototype.retrieve=function(){var t=null;return t=this.enableLocalStorage?h[this.getKey()]:o["default"].read(this.getKey()),t?a.parse(t):null},t.prototype.remove=function(){this.enableLocalStorage?h.removeItem(this.getKey()):o["default"].remove(this.getKey())},t.prototype.sync=function(){var t=this.retrieve();t&&this.state.overrideAndSync(t)},t.prototype.getKey=function(){return a.stringify({key:this.tf.prfxTf+"_"+this.tf.id,path:c.pathname})},t.prototype.destroy=function(){var t=this;this.emitter.off(["state-changed"],function(e,i){return t.save(i)}),this.emitter.off(["initialized"],function(){return t.sync()}),this.remove(),this.state=null,this.emitter=null},t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i(2),n=s.root.document;e["default"]={write:function(t,e,i){var s="";i&&(s=new Date((new Date).getTime()+36e5*i),s="; expires="+s.toGMTString()),n.cookie=t+"="+escape(e)+s},read:function(t){var e="",i=t+"=";if(n.cookie.length>0){var s=n.cookie,r=s.indexOf(i);if(-1!==r){r+=i.length;var o=s.indexOf(";",r);-1===o&&(o=s.length),e=unescape(s.substring(r,o))}}return e},remove:function(t){this.write(t,"",-1)},valueToArray:function(t,e){e||(e=",");var i=this.read(t),s=i.split(e);return s},getValueByIndex:function(t,e,i){i||(i=",");var s=this.valueToArray(t,i);return s[e]}}}])}); \ No newline at end of file +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i=e();for(var s in i)("object"==typeof exports?exports:t)[s]=i[s]}}(this,function(){return function(t){function e(i){if(s[i])return s[i].exports;var n=s[i]={exports:{},id:i,loaded:!1};return t[i].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var i=window.webpackJsonp;window.webpackJsonp=function(s,r){for(var o,l,a=0,h=[];al;l++)r[l]=arguments[l];if(r.forEach(function(t){"object"===("undefined"==typeof t?"undefined":n(t))&&"TABLE"===t.nodeName?(e.tbl=t,e.id=t.id||"tf_"+(new Date).getTime()+"_"):(0,a.isString)(t)?(e.id=t,e.tbl=(0,o.elm)(t)):(0,a.isNumber)(t)?e.startRow=t:(0,a.isObj)(t)&&(e.cfg=t)}),!this.tbl||"TABLE"!==this.tbl.nodeName||0===this.getRowsNb())throw new Error("Could not instantiate TableFilter: HTML table\n DOM element not found.");var h=this.cfg;this.emitter=new f.Emitter,this.refRow=null===this.startRow?2:this.startRow+1;try{this.nbCells=this.getCellsNb(this.refRow)}catch(c){this.nbCells=this.getCellsNb(0)}this.basePath=h.base_path||"tablefilter/",this.fltGrid=h.grid!==!1,this.gridLayout=Boolean(h.grid_layout),this.filtersRowIndex=isNaN(h.filters_row_index)?0:h.filters_row_index,this.headersRow=isNaN(h.headers_row_index)?0===this.filtersRowIndex?1:0:h.headers_row_index,this.fltCellTag=(0,a.isString)(h.filters_cell_tag)?h.filters_cell_tag:P.CELL_TAG,this.fltIds=[],this.validRowsIndex=[],this.infDiv=null,this.lDiv=null,this.rDiv=null,this.mDiv=null,this.infDivCssClass=h.inf_div_css_class||"inf",this.lDivCssClass=h.left_div_css_class||"ldiv",this.rDivCssClass=h.right_div_css_class||"rdiv",this.mDivCssClass=h.middle_div_css_class||"mdiv",this.contDivCssClass=h.content_div_css_class||"cont",this.stylePath=h.style_path||this.basePath+"style/",this.stylesheet=h.stylesheet||this.stylePath+"tablefilter.css",this.stylesheetId=this.id+"_style",this.fltsRowCssClass=h.flts_row_css_class||"fltrow",this.enableIcons=h.enable_icons!==!1,this.alternateRows=Boolean(h.alternate_rows),this.hasColWidths=(0,a.isArray)(h.col_widths),this.colWidths=this.hasColWidths?h.col_widths:null,this.fltCssClass=h.flt_css_class||"flt",this.fltMultiCssClass=h.flt_multi_css_class||"flt_multi",this.fltSmallCssClass=h.flt_small_css_class||"flt_s",this.singleFltCssClass=h.single_flt_css_class||"single_flt",this.enterKey=h.enter_key!==!1,this.onBeforeFilter=(0,a.isFn)(h.on_before_filter)?h.on_before_filter:null,this.onAfterFilter=(0,a.isFn)(h.on_after_filter)?h.on_after_filter:null,this.caseSensitive=Boolean(h.case_sensitive),this.hasExactMatchByCol=(0,a.isArray)(h.columns_exact_match),this.exactMatchByCol=this.hasExactMatchByCol?h.columns_exact_match:[],this.exactMatch=Boolean(h.exact_match),this.linkedFilters=Boolean(h.linked_filters),this.disableExcludedOptions=Boolean(h.disable_excluded_options),this.activeFilterId=null,this.hasVisibleRows=Boolean(h.rows_always_visible),this.visibleRows=this.hasVisibleRows?h.rows_always_visible:[],this.isExternalFlt=Boolean(h.external_flt_grid),this.externalFltTgtIds=h.external_flt_grid_ids||[],this.externalFltEls=[],this.onFiltersLoaded=(0,a.isFn)(h.on_filters_loaded)?h.on_filters_loaded:null,this.singleSearchFlt=Boolean(h.single_filter),this.onRowValidated=(0,a.isFn)(h.on_row_validated)?h.on_row_validated:null,this.customCellDataCols=h.custom_cell_data_cols?h.custom_cell_data_cols:[],this.customCellData=(0,a.isFn)(h.custom_cell_data)?h.custom_cell_data:null,this.watermark=h.watermark||"",this.isWatermarkArray=(0,a.isArray)(this.watermark),this.toolBarTgtId=h.toolbar_target_id||null,this.help=(0,a.isUndef)(h.help_instructions)?void 0:Boolean(h.help_instructions),this.popupFilters=Boolean(h.popup_filters),this.markActiveColumns=Boolean(h.mark_active_columns),this.activeColumnsCssClass=h.active_columns_css_class||"activeHeader",this.onBeforeActiveColumn=(0,a.isFn)(h.on_before_active_column)?h.on_before_active_column:null,this.onAfterActiveColumn=(0,a.isFn)(h.on_after_active_column)?h.on_after_active_column:null,this.displayAllText=h.display_all_text||"Clear",this.enableEmptyOption=Boolean(h.enable_empty_option),this.emptyText=h.empty_text||"(Empty)",this.enableNonEmptyOption=Boolean(h.enable_non_empty_option),this.nonEmptyText=h.non_empty_text||"(Non empty)",this.onSlcChange=h.on_change!==!1,this.sortSlc=h.sort_select!==!1,this.isSortNumAsc=Boolean(h.sort_num_asc),this.sortNumAsc=this.isSortNumAsc?h.sort_num_asc:[],this.isSortNumDesc=Boolean(h.sort_num_desc),this.sortNumDesc=this.isSortNumDesc?h.sort_num_desc:[],this.loadFltOnDemand=Boolean(h.load_filters_on_demand),this.hasCustomOptions=(0,a.isObj)(h.custom_options),this.customOptions=h.custom_options,this.rgxOperator=h.regexp_operator||"rgx:",this.emOperator=h.empty_operator||"[empty]",this.nmOperator=h.nonempty_operator||"[nonempty]",this.orOperator=h.or_operator||"||",this.anOperator=h.and_operator||"&&",this.grOperator=h.greater_operator||">",this.lwOperator=h.lower_operator||"<",this.leOperator=h.lower_equal_operator||"<=",this.geOperator=h.greater_equal_operator||">=",this.dfOperator=h.different_operator||"!",this.lkOperator=h.like_operator||"*",this.eqOperator=h.equal_operator||"=",this.stOperator=h.start_with_operator||"{",this.enOperator=h.end_with_operator||"}",this.curExp=h.cur_exp||"^[¥£€$]",this.separator=h.separator||",",this.rowsCounter=Boolean(h.rows_counter),this.statusBar=Boolean(h.status_bar),this.loader=Boolean(h.loader),this.displayBtn=Boolean(h.btn),this.btnText=h.btn_text||(this.enableIcons?"":"Go"),this.btnCssClass=h.btn_css_class||(this.enableIcons?"btnflt_icon":"btnflt"),this.btnReset=Boolean(h.btn_reset),this.btnResetCssClass=h.btn_reset_css_class||"reset",this.onBeforeReset=(0,a.isFn)(h.on_before_reset)?h.on_before_reset:null,this.onAfterReset=(0,a.isFn)(h.on_after_reset)?h.on_after_reset:null,this.paging=Boolean(h.paging),this.nbHiddenRows=0,this.autoFilter=Boolean(h.auto_filter),this.autoFilterDelay=isNaN(h.auto_filter_delay)?P.AUTO_FILTER_DELAY:h.auto_filter_delay,this.isUserTyping=null,this.autoFilterTimer=null,this.highlightKeywords=Boolean(h.highlight_keywords),this.noResults=(0,a.isObj)(h.no_results_message)||Boolean(h.no_results_message),this.state=(0,a.isObj)(h.state)||Boolean(h.state),this.defaultDateType=h.default_date_type||"DMY",this.thousandsSeparator=h.thousands_separator||",",this.decimalSeparator=h.decimal_separator||".",this.hasColNbFormat=(0,a.isArray)(h.col_number_format),this.colNbFormat=this.hasColNbFormat?h.col_number_format:null,this.hasColDateType=(0,a.isArray)(h.col_date_type),this.colDateType=this.hasColDateType?h.col_date_type:null,this.prfxTf="TF",this.prfxFlt="flt",this.prfxValButton="btn",this.prfxInfDiv="inf_",this.prfxLDiv="ldiv_",this.prfxRDiv="rdiv_",this.prfxMDiv="mdiv_",this.prfxResponsive="resp",this.extensions=h.extensions,this.hasExtensions=(0,a.isArray)(this.extensions),this.enableDefaultTheme=Boolean(h.enable_default_theme),this.hasThemes=this.enableDefaultTheme||(0,a.isArray)(h.themes),this.themes=h.themes||[],this.themesPath=h.themes_path||this.stylePath+"themes/",this.responsive=Boolean(h.responsive),this.Mod={},this.ExtRegistry={}}return t.prototype.init=function(){var t=this;if(!this.initialized){var e=this.Mod,i=this.singleSearchFlt?1:this.nbCells,s=void 0;if(this["import"](this.stylesheetId,this.stylesheet,null,"link"),this.hasThemes&&this.loadThemes(),e.help||(e.help=new w.Help(this)),this.help&&e.help.init(),this.state&&(e.state||(e.state=new F.State(this)),e.state.init()),this.gridLayout&&(e.gridLayout||(e.gridLayout=new u.GridLayout(this)),e.gridLayout.init()),this.loader&&(e.loader||(e.loader=new d.Loader(this)),e.loader.init()),this.highlightKeywords&&(e.highlightKeyword=new g.HighlightKeyword(this),e.highlightKeyword.init()),this.popupFilters&&(e.popupFilter||(e.popupFilter=new v.PopupFilter(this)),e.popupFilter.init()),this.fltGrid){var n=this._insertFiltersRow();this.nbFilterableRows=this.getRowsNb();for(var r=0;i>r;r++){this.emitter.emit("before-filter-init",this,r);var l=(0,o.createElm)(this.fltCellTag),a=this.getFilterType(r);this.singleSearchFlt&&(l.colSpan=this.nbCells),this.gridLayout||n.appendChild(l),s=r===i-1&&this.displayBtn?this.fltSmallCssClass:this.fltCssClass,this.singleSearchFlt&&(a=P.INPUT,s=this.singleFltCssClass),a===P.SELECT||a===P.MULTIPLE?(e.dropdown||(e.dropdown=new m.Dropdown(this)),e.dropdown.init(r,this.isExternalFlt,l)):a===P.CHECKLIST?(e.checkList||(e.checkList=new b.CheckList(this)),e.checkList.init(r,this.isExternalFlt,l)):this._buildInputFilter(r,s,l),r===i-1&&this.displayBtn&&this._buildSubmitButton(r,l),this.emitter.emit("after-filter-init",this,r)}this.emitter.on(["filter-focus"],function(e,i){return t.setActiveFilterId(i.id)})}else this._initNoFilters();this.hasVisibleRows&&(this.emitter.on(["after-filtering"],function(){return t.enforceVisibility()}),this.enforceVisibility()),this.rowsCounter&&(e.rowsCounter=new y.RowsCounter(this),e.rowsCounter.init()),this.statusBar&&(e.statusBar=new _.StatusBar(this),e.statusBar.init()),this.paging&&(e.paging?e.paging.reset():(e.paging=new C.Paging(this),e.paging.init())),this.btnReset&&(e.clearButton=new x.ClearButton(this),e.clearButton.init()),this.hasColWidths&&!this.gridLayout&&this.setColWidths(),this.alternateRows&&(e.alternateRows=new E.AlternateRows(this),e.alternateRows.init()),this.noResults&&(e.noResults||(e.noResults=new T.NoResults(this)),e.noResults.init()),this.gridLayout||((0,o.addClass)(this.tbl,this.prfxTf),this.responsive&&(0,o.addClass)(this.tbl,this.prfxResponsive)),this.hasExtensions&&this.initExtensions(),this.markActiveColumns&&(this.emitter.on(["before-filtering"],function(){return t.clearActiveColumns()}),this.emitter.on(["cell-processed"],function(e,i){return t.markActiveColumn(i)})),this.linkedFilters&&this.emitter.on(["after-filtering"],function(){return t.linkFilters()}),this.onFiltersLoaded&&this.onFiltersLoaded.call(null,this),this.initialized=!0,this.emitter.emit("initialized",this)}},t.prototype.detectKey=function(t){if(this.enterKey&&t){var e=(0,r.keyCode)(t);e===P.ENTER_KEY?(this.filter(),(0,r.cancelEvt)(t),(0,r.stopEvt)(t)):(this.isUserTyping=!0,p.root.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null)}},t.prototype.onKeyUp=function(t){function e(){p.root.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null,this.isUserTyping||(this.filter(),this.isUserTyping=null)}if(this.autoFilter){var i=(0,r.keyCode)(t);this.isUserTyping=!1,i!==P.ENTER_KEY&&i!==P.TAB_KEY&&i!==P.ESC_KEY&&i!==P.UP_ARROW_KEY&&i!==P.DOWN_ARROW_KEY?null===this.autoFilterTimer&&(this.autoFilterTimer=p.root.setInterval(e.bind(this),this.autoFilterDelay)):(p.root.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null)}},t.prototype.onKeyDown=function(){this.autoFilter&&(this.isUserTyping=!0)},t.prototype.onInpFocus=function(t){var e=(0,r.targetEvt)(t);this.emitter.emit("filter-focus",this,e)},t.prototype.onInpBlur=function(){this.autoFilter&&(this.isUserTyping=!1,p.root.clearInterval(this.autoFilterTimer)),this.emitter.emit("filter-blur",this)},t.prototype._insertFiltersRow=function(){if(!this.gridLayout){var t=void 0,e=(0,o.tag)(this.tbl,"thead");return t=e.length>0?e[0].insertRow(this.filtersRowIndex):this.tbl.insertRow(this.filtersRowIndex),t.className=this.fltsRowCssClass,this.isExternalFlt&&(t.style.display=P.NONE),this.emitter.emit("filters-row-inserted",this,t),t}},t.prototype._initNoFilters=function(){this.fltGrid||(this.refRow=this.refRow>0?this.refRow-1:0,this.nbFilterableRows=this.getRowsNb())},t.prototype._buildInputFilter=function(t,e,i){var s=this,n=this.getFilterType(t),l=this.isExternalFlt?this.externalFltTgtIds[t]:null,a=n===P.INPUT?"text":"hidden",h=(0,o.createElm)(P.INPUT,["id",this.prfxFlt+t+"_"+this.id],["type",a],["ct",t]);"hidden"!==a&&this.watermark&&h.setAttribute("placeholder",this.isWatermarkArray?this.watermark[t]||"":this.watermark),h.className=e||this.fltCssClass,(0,r.addEvt)(h,"focus",function(t){return s.onInpFocus(t)}),l?((0,o.elm)(l).appendChild(h),this.externalFltEls.push(h)):i.appendChild(h),this.fltIds.push(h.id),(0,r.addEvt)(h,"keypress",function(t){return s.detectKey(t)}),(0,r.addEvt)(h,"keydown",function(){return s.onKeyDown()}),(0,r.addEvt)(h,"keyup",function(t){return s.onKeyUp(t)}),(0,r.addEvt)(h,"blur",function(){return s.onInpBlur()})},t.prototype._buildSubmitButton=function(t,e){var i=this,s=this.isExternalFlt?this.externalFltTgtIds[t]:null,n=(0,o.createElm)(P.INPUT,["id",this.prfxValButton+t+"_"+this.id],["type","button"],["value",this.btnText]);n.className=this.btnCssClass,s?(0,o.elm)(s).appendChild(n):e.appendChild(n),(0,r.addEvt)(n,"click",function(){return i.filter()})},t.prototype.feature=function(t){return this.Mod[t]},t.prototype.initExtensions=function(){var t=this.extensions;i.p=this.basePath,this.emitter.emit("before-loading-extensions",this);for(var e=0,s=t.length;s>e;e++){var n=t[e];this.ExtRegistry[n.name]||this.loadExtension(n)}this.emitter.emit("after-loading-extensions",this)},t.prototype.loadExtension=function(t){var e=this;if(t&&t.name){var s=t.name,n=t.path,r=void 0;s&&n?r=t.path+s:(s=s.replace(".js",""),r="extensions/{}/{}".replace(/{}/g,s)),i.e(1,function(i){var n=[i(30)("./"+r)];(function(i){var n=new i["default"](e,t);n.init(),e.ExtRegistry[s]=n}).apply(null,n)})}},t.prototype.extension=function(t){return this.ExtRegistry[t]},t.prototype.hasExtension=function(t){return!(0,a.isEmpty)(this.ExtRegistry[t])},t.prototype.destroyExtensions=function(){for(var t=this.extensions,e=0,i=t.length;i>e;e++){var s=t[e],n=this.ExtRegistry[s.name];n&&(n.destroy(),this.ExtRegistry[s.name]=void 0)}},t.prototype.loadThemes=function(){var t=this.themes;if(this.emitter.emit("before-loading-themes",this),this.enableDefaultTheme){var e={name:"default"};this.themes.push(e)}if((0,a.isArray)(t))for(var i=0,s=t.length;s>i;i++){var n=t[i],r=n.name,o=n.path,l=this.prfxTf+r;r&&!o?o=this.themesPath+r+"/"+r+".css":!r&&n.path&&(r="theme{0}".replace("{0}",i)),this.isImported(o,"link")||this["import"](l,o,null,"link")}this.btnResetText=null,this.btnResetHtml='',this.btnPrevPageHtml='',this.btnNextPageHtml='',this.btnFirstPageHtml='',this.btnLastPageHtml='',this.loader=!0,this.loaderHtml='
',this.loaderText=null,this.emitter.emit("after-loading-themes",this)},t.prototype.getStylesheet=function(){var t=arguments.length<=0||void 0===arguments[0]?"default":arguments[0];return(0,o.elm)(this.prfxTf+t)},t.prototype.destroy=function(){var t=this;if(this.initialized){var e=this.Mod,i=this.emitter;this.isExternalFlt&&!this.popupFilters&&this.removeExternalFlts(),this.infDiv&&this.removeToolbar(),this.markActiveColumns&&(this.clearActiveColumns(),i.off(["before-filtering"],function(){return t.clearActiveColumns()}),i.off(["cell-processed"],function(e,i){return t.markActiveColumn(i)})),this.hasExtensions&&this.destroyExtensions(),this.validateAllRows(),this.fltGrid&&!this.gridLayout&&this.tbl.deleteRow(this.filtersRowIndex),i.emit("destroy",this),Object.keys(e).forEach(function(t){var i=e[t];i&&(0,a.isFn)(i.destroy)&&i.destroy()}),this.hasVisibleRows&&i.off(["after-filtering"],function(){return t.enforceVisibility()}),this.linkedFilters&&i.off(["after-filtering"],function(){return t.linkFilters()}),this.emitter.off(["filter-focus"],function(e,i){return t.setActiveFilterId(i.id)}),(0,o.removeClass)(this.tbl,this.prfxTf),(0,o.removeClass)(this.tbl,this.prfxResponsive),this.nbHiddenRows=0,this.validRowsIndex=[],this.fltIds=[],this.initialized=!1}},t.prototype.setToolbar=function(){if(!this.infDiv){var t=(0,o.createElm)("div",["id",this.prfxInfDiv+this.id]);if(t.className=this.infDivCssClass,this.toolBarTgtId)(0,o.elm)(this.toolBarTgtId).appendChild(t);else if(this.gridLayout){var e=this.Mod.gridLayout;e.tblMainCont.appendChild(t),t.className=e.gridInfDivCssClass}else{var i=(0,o.createElm)("caption");i.appendChild(t),this.tbl.insertBefore(i,this.tbl.firstChild)}this.infDiv=(0,o.elm)(this.prfxInfDiv+this.id);var s=(0,o.createElm)("div",["id",this.prfxLDiv+this.id]);s.className=this.lDivCssClass,t.appendChild(s),this.lDiv=(0,o.elm)(this.prfxLDiv+this.id);var n=(0,o.createElm)("div",["id",this.prfxRDiv+this.id]);n.className=this.rDivCssClass,t.appendChild(n),this.rDiv=(0,o.elm)(this.prfxRDiv+this.id);var r=(0,o.createElm)("div",["id",this.prfxMDiv+this.id]);r.className=this.mDivCssClass,t.appendChild(r),this.mDiv=(0,o.elm)(this.prfxMDiv+this.id),(0,a.isUndef)(this.help)&&(this.Mod.help.enabled=!0,this.emitter.emit("init-help",this))}},t.prototype.removeToolbar=function(){if(this.infDiv){(0,o.removeElm)(this.infDiv),this.infDiv=null;var t=this.tbl,e=(0,o.tag)(t,"caption");e.length>0&&[].forEach.call(e,function(e){return t.removeChild(e)})}},t.prototype.removeExternalFlts=function(){if(this.isExternalFlt)for(var t=this.externalFltTgtIds,e=t.length,i=0;e>i;i++){var s=t[i],n=(0,o.elm)(s);n&&(n.innerHTML="")}},t.prototype.isCustomOptions=function(t){return this.hasCustomOptions&&-1!==this.customOptions.cols.indexOf(t)},t.prototype.getCustomOptions=function(t){if(!(0,a.isEmpty)(t)&&this.isCustomOptions(t)){for(var e=this.customOptions,i=e.cols,s=[],n=[],r=i.indexOf(t),o=e.values[r],l=e.texts[r],h=e.sorts[r],c=0,p=o.length;p>c;c++)n.push(o[c]),l[c]?s.push(l[c]):s.push(o[c]);return h&&(n.sort(),s.sort()),[n,s]}},t.prototype.filter=function(){function t(t,e,i){if(this.highlightKeywords&&e){t=t.replace(b,""),t=t.replace(y,""),t=t.replace(_,""),t=t.replace(C,"");var s=t;(u.test(t)||d.test(t)||g.test(t)||v.test(t)||m.test(t))&&(s=(0,o.getText)(i)),""!==s&&this.emitter.emit("highlight-keyword",this,i,s)}}function e(t,e,i){t=(0,l.matchCase)(t,this.caseSensitive);var s=void 0,n=this.hasColDateType?this.colDateType[i]:this.defaultDateType,r=g.test(t),o=u.test(t),a=v.test(t),T=d.test(t),F=m.test(t),P=y.test(t),S=b.test(t),R=_.test(t),I=C.test(t),O=x===t,N=w===t,L=E.test(t),k=r&&(0,h.isValidDate)(t.replace(g,""),n),D=o&&(0,h.isValidDate)(t.replace(u,""),n),B=a&&(0,h.isValidDate)(t.replace(v,""),n),A=T&&(0,h.isValidDate)(t.replace(d,""),n),H=F&&(0,h.isValidDate)(t.replace(m,""),n),M=P&&(0,h.isValidDate)(t.replace(y,""),n),j=void 0,U=void 0;if((0,h.isValidDate)(e,n))j=(0,h.formatDate)(e,n),k?(U=(0,h.formatDate)(t.replace(g,""),n),s=U>j):D?(U=(0,h.formatDate)(t.replace(u,""),n),s=U>=j):A?(U=(0,h.formatDate)(t.replace(d,""),n),s=j>=U):B?(U=(0,h.formatDate)(t.replace(v,""),n),s=j>U):H?(U=(0,h.formatDate)(t.replace(m,""),n),s=j.toString()!==U.toString()):M?(U=(0,h.formatDate)(t.replace(y,""),n),s=j.toString()===U.toString()):b.test(t)?s=(0,l.contains)(t.replace(b,""),e,!1,this.caseSensitive):(0,h.isValidDate)(t,n)?(U=(0,h.formatDate)(t,n),s=j.toString()===U.toString()):s=O?(0,l.isEmpty)(e):N?!(0,l.isEmpty)(e):(0,l.contains)(t,e,this.isExactMatch(i),this.caseSensitive);else if(this.hasColNbFormat&&this.colNbFormat[i]?(p=(0,c.removeNbFormat)(e,this.colNbFormat[i]),f=this.colNbFormat[i]):","===this.thousandsSeparator&&"."===this.decimalSeparator?(p=(0,c.removeNbFormat)(e,"us"),f="us"):(p=(0,c.removeNbFormat)(e,"eu"),f="eu"),o)s=p<=(0,c.removeNbFormat)(t.replace(u,""),f);else if(T)s=p>=(0,c.removeNbFormat)(t.replace(d,""),f);else if(r)s=p<(0,c.removeNbFormat)(t.replace(g,""),f);else if(a)s=p>(0,c.removeNbFormat)(t.replace(v,""),f);else if(F)s=!(0,l.contains)(t.replace(m,""),e,!1,this.caseSensitive);else if(S)s=(0,l.contains)(t.replace(b,""),e,!1,this.caseSensitive);else if(P)s=(0,l.contains)(t.replace(y,""),e,!0,this.caseSensitive);else if(R)s=0===e.indexOf(t.replace(_,""));else if(I){var V=t.replace(C,"");s=e.lastIndexOf(V,e.length-1)===e.length-1-(V.length-1)&&e.lastIndexOf(V,e.length-1)>-1}else if(O)s=(0,l.isEmpty)(e);else if(N)s=!(0,l.isEmpty)(e);else if(L)try{var z=t.replace(E,""),K=new RegExp(z);s=K.test(e)}catch(W){s=!1}else p&&this.hasColNbFormat&&this.colNbFormat[i]&&!this.singleSearchFlt?(t=(0,c.removeNbFormat)(t,f),s=p===t||(0,l.contains)(t.toString(),p.toString(),this.isExactMatch(i),this.caseSensitive)):s=(0,l.contains)(t,e,this.isExactMatch(i),this.caseSensitive);return s}if(this.fltGrid&&this.initialized){this.onBeforeFilter&&this.onBeforeFilter.call(null,this),this.emitter.emit("before-filtering",this);var i=this.tbl.rows,s=this.getRowsNb(!0),n=0;this.validRowsIndex=[];for(var r=this.getFiltersValue(),p=void 0,f=void 0,u=new RegExp(this.leOperator),d=new RegExp(this.geOperator),g=new RegExp(this.lwOperator),v=new RegExp(this.grOperator),m=new RegExp(this.dfOperator),b=new RegExp((0,l.rgxEsc)(this.lkOperator)),y=new RegExp(this.eqOperator),_=new RegExp(this.stOperator),C=new RegExp(this.enOperator),x=this.emOperator,w=this.nmOperator,E=new RegExp((0,l.rgxEsc)(this.rgxOperator)),T=this.refRow;s>T;T++){i[T].style.display="";var F=i[T].cells,P=F.length;if(P===this.nbCells){for(var S=[],R=!0,I=!1,O=0;P>O;O++){var N=r[this.singleSearchFlt?0:O];if(""!==N){var L=(0,l.matchCase)(this.getCellData(F[O]),this.caseSensitive),k=N.toString().split(this.orOperator),D=k.length>1,B=N.toString().split(this.anOperator),A=B.length>1;if((0,a.isArray)(N)||D||A){var H=void 0,M=void 0,j=!1;M=(0,a.isArray)(N)?N:D?k:B;for(var U=0,V=M.length;V>U&&(H=(0,l.trim)(M[U]),j=e.call(this,H,L,O),t.call(this,H,j,F[O]),!(D&&j||A&&!j))&&(!(0,a.isArray)(N)||!j);U++);S[O]=j}else S[O]=e.call(this,(0,l.trim)(N),L,O),t.call(this,N,S[O],F[O]);S[O]||(R=!1),this.singleSearchFlt&&S[O]&&(I=!0),this.emitter.emit("cell-processed",this,O,F[O])}}this.singleSearchFlt&&I&&(R=!0),R?this.validateRow(T,!0):(this.validateRow(T,!1),n++),this.emitter.emit("row-processed",this,T,this.validRowsIndex.length,R)}}this.nbHiddenRows=n,this.onAfterFilter&&this.onAfterFilter.call(null,this),this.emitter.emit("after-filtering",this,r)}},t.prototype.getColValues=function(t){var e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],s=arguments.length<=3||void 0===arguments[3]?[]:arguments[3];if(this.fltGrid){var n=this.tbl.rows,r=this.getRowsNb(!0),o=[];e&&o.push(this.getHeadersText()[t]);for(var l=this.refRow;r>l;l++){var a=!1;s.length>0&&(a=-1!==s.indexOf(l));var h=n[l].cells,p=h.length;if(p===this.nbCells&&!a)for(var f=0;p>f;f++)if(f===t&&""===n[l].style.display){var u=this.getCellData(h[f]),d=this.colNbFormat?this.colNbFormat[t]:void 0,g=i?(0,c.removeNbFormat)(u,d):u;o.push(g)}}return o}},t.prototype.getFilterValue=function(t){if(this.fltGrid){var e="",i=this.getFilterElement(t);if(!i)return e;var s=this.getFilterType(t);return s!==P.MULTIPLE&&s!==P.CHECKLIST?e=i.value:s===P.MULTIPLE?e=this.feature("dropdown").getValues(t):s===P.CHECKLIST&&(e=this.feature("checkList").getValues(t)),((0,a.isArray)(e)&&0===e.length||1===e.length&&""===e[0])&&(e=""),e}},t.prototype.getFiltersValue=function(){if(this.fltGrid){for(var t=[],e=0,i=this.fltIds.length;i>e;e++){var s=this.getFilterValue(e);(0,a.isArray)(s)?t.push(s):t.push((0,l.trim)(s))}return t}},t.prototype.getFilterId=function(t){return this.fltGrid?this.fltIds[t]:void 0},t.prototype.getFiltersByType=function(t,e){if(this.fltGrid){for(var i=[],s=0,n=this.fltIds.length;n>s;s++){var r=this.getFilterType(s);if(r===t.toLowerCase()){var o=e?s:this.fltIds[s];i.push(o)}}return i}},t.prototype.getFilterElement=function(t){var e=this.fltIds[t];return(0,o.elm)(e)},t.prototype.getCellsNb=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],e=this.tbl.rows[t];return e.cells.length},t.prototype.getRowsNb=function(t){var e=(0,a.isUndef)(this.refRow)?0:this.refRow,i=this.tbl.rows.length;return t&&(e=0),parseInt(i-e,10)},t.prototype.getCellData=function(t){var e=t.cellIndex;return this.customCellData&&-1!==this.customCellDataCols.indexOf(e)?this.customCellData.call(null,this,t,e):(0,o.getText)(t)},t.prototype.getTableData=function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0],e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i=this.tbl.rows,s=this.getRowsNb(!0),n=[];if(t){var r=this.getHeadersText(e);n.push([this.getHeadersRowIndex(),r])}for(var o=this.refRow;s>o;o++){for(var l=[o,[]],a=i[o].cells,h=0,c=a.length;c>h;h++)if(!(e&&this.hasExtension("colsVisibility")&&this.extension("colsVisibility").isColHidden(h))){var p=this.getCellData(a[h]);l[1].push(p)}n.push(l)}return n},t.prototype.getFilteredData=function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0],e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1];if(!this.validRowsIndex)return[];var i=this.tbl.rows,s=[];if(t){var n=this.getHeadersText(e);s.push([this.getHeadersRowIndex(),n])}for(var r=this.getValidRows(!0),o=0;on;n++){var o=i[n],l=o[1],h=l[t];s.push(h)}return s},t.prototype.getRowDisplay=function(t){return t.style.display},t.prototype.validateRow=function(t,e){var i=this.tbl.rows[t];if(i&&"boolean"==typeof e){this.hasVisibleRows&&-1!==this.visibleRows.indexOf(t)&&(e=!0);var s=e?"":P.NONE,n=e?"true":"false";i.style.display=s,this.paging&&i.setAttribute("validRow",n),e&&(-1===this.validRowsIndex.indexOf(t)&&this.validRowsIndex.push(t),this.onRowValidated&&this.onRowValidated.call(null,this,t),this.emitter.emit("row-validated",this,t))}},t.prototype.validateAllRows=function(){if(this.initialized){this.validRowsIndex=[];for(var t=this.refRow;t0,r=n?null:S.createDocumentFragment(),l=0;e>l;l++){var a=void 0;n?a=s[l]:(a=(0,o.createElm)("col",["id",this.id+"_col_"+l]),r.appendChild(a)),a.style.width=i[l]}n||t.insertBefore(r,t.firstChild)}this.hasColWidths&&(t=t||this.tbl,e.call(this))},t.prototype.enforceVisibility=function(){if(this.hasVisibleRows)for(var t=this.getRowsNb(!0),e=0,i=this.visibleRows.length;i>e;e++){var s=this.visibleRows[e];t>=s&&this.validateRow(s,!0)}},t.prototype.clearFilters=function(){if(this.fltGrid){this.emitter.emit("before-clearing-filters",this),this.onBeforeReset&&this.onBeforeReset.call(null,this,this.getFiltersValue());for(var t=0,e=this.fltIds.length;e>t;t++)this.setFilterValue(t,"");this.filter(),this.onAfterReset&&this.onAfterReset.call(null,this),this.emitter.emit("after-clearing-filters",this)}},t.prototype.clearActiveColumns=function(){for(var t=0,e=this.getCellsNb(this.headersRow);e>t;t++)(0,o.removeClass)(this.getHeaderElement(t),this.activeColumnsCssClass)},t.prototype.markActiveColumn=function(t){var e=this.getHeaderElement(t);(0,o.hasClass)(e,this.activeColumnsCssClass)||(this.onBeforeActiveColumn&&this.onBeforeActiveColumn.call(null,this,t),(0,o.addClass)(e,this.activeColumnsCssClass),this.onAfterActiveColumn&&this.onAfterActiveColumn.call(null,this,t))},t.prototype.getActiveFilterId=function(){return this.activeFilterId},t.prototype.setActiveFilterId=function(t){this.activeFilterId=t},t.prototype.getColumnIndexFromFilterId=function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=t.split("_")[0];return e=e.split(this.prfxFlt)[1],parseInt(e,10)},t.prototype.activateFilter=function(t){(0,a.isUndef)(t)||this.setActiveFilterId(this.getFilterId(t))},t.prototype.linkFilters=function(){if(this.linkedFilters&&this.activeFilterId){var t=this.getFiltersByType(P.SELECT,!0),e=this.getFiltersByType(P.MULTIPLE,!0),i=this.getFiltersByType(P.CHECKLIST,!0),s=t.concat(e);s=s.concat(i);for(var n=this.getColumnIndexFromFilterId(this.activeFilterId),r=0,l=s.length;l>r;r++){var a=(0,o.elm)(this.fltIds[s[r]]),h=this.getFilterValue(s[r]);if(n!==s[r]||this.paging&&-1!==t.indexOf(s[r])&&n===s[r]||!this.paging&&(-1!==i.indexOf(s[r])||-1!==e.indexOf(s[r]))||h===this.displayAllText){if(this.loadFltOnDemand){var c=(0,o.createOpt)(this.displayAllText,"");a.innerHTML="",a.appendChild(c)}-1!==i.indexOf(s[r])?this.emitter.emit("build-checklist-filter",this,s[r]):this.emitter.emit("build-select-filter",this,s[r],!0),this.setFilterValue(s[r],h)}}}},t.prototype.isExactMatch=function(t){var e=this.getFilterType(t);return this.exactMatchByCol[t]||this.exactMatch||e!==P.INPUT},t.prototype.isImported=function(t,e){for(var i=!1,s=e?e:"script",n="script"===s?"src":"href",r=(0,o.tag)(S,s),l=0,a=r.length;a>l;l++)if(void 0!==r[l][n]&&r[l][n].match(t)){i=!0;break}return i},t.prototype["import"]=function(t,e,i,s){var n=s?s:"script",r=this.isImported(e,n);if(!r){var l=this,a=!1,h=void 0,c=(0,o.tag)(S,"head")[0];h="link"===n.toLowerCase()?(0,o.createElm)("link",["id",t],["type","text/css"],["rel","stylesheet"],["href",e]):(0,o.createElm)("script",["id",t],["type","text/javascript"],["src",e]),h.onload=h.onreadystatechange=function(){a||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(a=!0,"function"==typeof i&&i.call(null,l))},h.onerror=function(){throw new Error("TableFilter could not load: "+e)},c.appendChild(h)}},t.prototype.isInitialized=function(){return this.initialized},t.prototype.getFiltersId=function(){return this.fltIds||[]; +},t.prototype.getValidRows=function(t){if(!t)return this.validRowsIndex;var e=this.getRowsNb(!0);this.validRowsIndex=[];for(var i=this.refRow;e>i;i++){var s=this.tbl.rows[i];this.paging?"true"!==s.getAttribute("validRow")&&null!==s.getAttribute("validRow")||this.validRowsIndex.push(s.rowIndex):this.getRowDisplay(s)!==P.NONE&&this.validRowsIndex.push(s.rowIndex)}return this.validRowsIndex},t.prototype.getFiltersRowIndex=function(){return this.filtersRowIndex},t.prototype.getHeadersRowIndex=function(){return this.headersRow},t.prototype.getStartRowIndex=function(){return this.refRow},t.prototype.getLastRowIndex=function(){var t=this.getRowsNb(!0);return t-1},t.prototype.getHeaderElement=function(t){for(var e=this.gridLayout?this.Mod.gridLayout.headTbl:this.tbl,i=(0,o.tag)(e,"thead"),s=this.headersRow,n=void 0,r=0;ri;i++)e[i]=arguments[i];var s=e[0];if(!(0,r.isString)(s))return null;for(var n=l.createElement(s),o=0;o2)return t;var e=void 0;return 99>=t&&t>50&&(e="19"+t),(50>t||"00"===t)&&(e="20"+t),e}function s(t){if(void 0===t)return 0;for(var e=void 0,i=["january","february","march","april","may","june","july","august","september","october","november","december","jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],s=0;s11||23>e)&&(e-=12),1>e||e>12?0:e}Object.defineProperty(e,"__esModule",{value:!0});var n=(e.isValidDate=function(t,e){if(e||(e="DMY"),e=e.toUpperCase(),3!==e.length&&"DDMMMYYYY"===e){var i=n(t,e);t=i.getDate()+"/"+(i.getMonth()+1)+"/"+i.getFullYear(),e="DMY"}-1!==e.indexOf("M")&&-1!==e.indexOf("D")&&-1!==e.indexOf("Y")||(e="DMY");var s=void 0,r=void 0;if("Y"===e.substring(0,1)?(s=/^\d{2}(\-|\/|\.)\d{1,2}\1\d{1,2}$/,r=/^\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}$/):"Y"===e.substring(1,2)?(s=/^\d{1,2}(\-|\/|\.)\d{2}\1\d{1,2}$/,r=/^\d{1,2}(\-|\/|\.)\d{4}\1\d{1,2}$/):(s=/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{2}$/,r=/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/),s.test(t)===!1&&r.test(t)===!1)return!1;var o=t.split(RegExp.$1),l=void 0,a=void 0,h=void 0;l="M"===e.substring(0,1)?o[0]:"M"===e.substring(1,2)?o[1]:o[2],a="D"===e.substring(0,1)?o[0]:"D"===e.substring(1,2)?o[1]:o[2],h="Y"===e.substring(0,1)?o[0]:"Y"===e.substring(1,2)?o[1]:o[2],parseInt(h,10)<=50&&(h=(parseInt(h,10)+2e3).toString()),parseInt(h,10)<=99&&(h=(parseInt(h,10)+1900).toString());var c=new Date(parseInt(h,10),parseInt(l,10)-1,parseInt(a,10),0,0,0,0);return parseInt(a,10)!==c.getDate()?!1:parseInt(l,10)-1===c.getMonth()},e.formatDate=function(t,e){if(e||(e="DMY"),!t||""===t)return new Date(1001,0,1);var n=void 0,r=void 0;switch(e.toUpperCase()){case"DDMMMYYYY":r=t.replace(/[- \/.]/g," ").split(" "),n=new Date(i(r[2]),s(r[1])-1,r[0]);break;case"DMY":r=t.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),n=new Date(i(r[2]),r[1]-1,r[0]);break;case"MDY":r=t.replace(/^(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),n=new Date(i(r[2]),r[0]-1,r[1]);break;case"YMD":r=t.replace(/^((\d\d)?\d\d)([- \/.])(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])$/,"$1 $4 $6").split(" "),n=new Date(i(r[0]),r[1]-1,r[2]);break;default:r=t.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),n=new Date(i(r[2]),r[1]-1,r[0])}return n})},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.removeNbFormat=function(t){var e=arguments.length<=1||void 0===arguments[1]?"us":arguments[1];if(t){var i=t;return i="us"===e.toLowerCase()?+i.replace(/[^\d\.-]/g,""):+i.replace(/[^\d\,-]/g,"").replace(",",".")}}},function(t,e){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});e.Emitter=function(){function t(){i(this,t),this.events={}}return t.prototype.on=function(t,e){var i=this;t.forEach(function(t){i.events[t]=i.events[t]||[],i.events[t].push(e)})},t.prototype.off=function(t,e){var i=this;t.forEach(function(t){t in i.events&&i.events[t].splice(i.events[t].indexOf(e),1)})},t.prototype.emit=function(t){if(t in this.events)for(var e=0;e0&&s.removeChild(P[0]),this.headTbl.style.tableLayout="fixed",s.style.tableLayout="fixed",this.headTbl.cellPadding=s.cellPadding,this.headTbl.cellSpacing=s.cellSpacing,e.setColWidths(this.headTbl),s.style.width="",this.headTbl.style.width=s.clientWidth+"px",(0,h.addEvt)(this.tblCont,"scroll",function(e){var i=(0,h.targetEvt)(e),s=i.scrollLeft;t.headTblCont.scrollLeft=s});var S=(i.extensions||[]).filter(function(t){return"sort"===t.name});1===S.length&&(S[0].async_sort=!0,S[0].trigger_ids=m),this.tblHasColTag=(0,l.tag)(s,"col").length>0;var R=function(){for(var t=e.nbCells-1;t>=0;t--){var i=(0,l.createElm)("col",["id",e.id+"_col_"+t]);s.insertBefore(i,s.firstChild),i.style.width=e.colWidths[t],this.gridColElms[t]=i}this.tblHasColTag=!0};if(this.tblHasColTag)for(var I=(0,l.tag)(s,"col"),O=0;O',r.popUpDivCssClass=o.popup_div_css_class||"popUpFilter",r.onBeforePopUpOpen=(0,l.isFn)(o.on_before_popup_filter_open)?o.on_before_popup_filter_open:null,r.onAfterPopUpOpen=(0,l.isFn)(o.on_after_popup_filter_open)?o.on_after_popup_filter_open:null,r.onBeforePopUpClose=(0,l.isFn)(o.on_before_popup_filter_close)?o.on_before_popup_filter_close:null,r.onAfterPopUpClose=(0,l.isFn)(o.on_after_popup_filter_close)?o.on_after_popup_filter_close:null,r.popUpFltSpans=[],r.popUpFltImgs=[],r.popUpFltElms=r.popUpFltElmCache||[],r.popUpFltAdjustToContainer=!0,r.prfxPopUpSpan="popUpSpan_",r.prfxPopUpDiv="popUpDiv_",r}return r(e,t),e.prototype.onClick=function(t){var e=(0,h.targetEvt)(t).parentNode,i=parseInt(e.getAttribute("ci"),10);if(this.closeAll(i),this.toggle(i),this.popUpFltAdjustToContainer){var s=this.popUpFltElms[i],n=this.tf.getHeaderElement(i),r=.95*n.clientWidth;s.style.width=parseInt(r,10)+"px"}(0,h.cancelEvt)(t),(0,h.stopEvt)(t)},e.prototype.init=function(){var t=this;if(!this.initialized){var e=this.tf;e.headersRow<=1&&(e.headersRow=0);for(var i=0;iv;v++)if(!i.hasVisibleRows||-1===i.visibleRows.indexOf(v)){var m=r[v].cells,b=m.length;if(b===i.nbCells&&!this.isCustom)for(var y=0;b>y;y++)if(t===y&&(!e||e&&i.disableExcludedOptions)||t===y&&e&&(""===r[v].style.display&&!i.paging||i.paging&&(!i.validRowsIndex||i.validRowsIndex&&-1!==i.validRowsIndex.indexOf(v))&&(void 0===p||p===t||p!==t&&-1!==i.validRowsIndex.indexOf(v)))){var _=i.getCellData(m[y]),C=(0,h.matchCase)(_,i.caseSensitive);if((0,a.has)(this.opts,C,i.caseSensitive)||this.opts.push(_),e&&i.disableExcludedOptions){var x=g[y];x||(x=i.getFilteredDataCol(y)),(0,a.has)(x,C,i.caseSensitive)||(0,a.has)(d,C,i.caseSensitive)||d.push(_)}}}if(this.isCustom){var w=i.getCustomOptions(t);this.opts=w[0],this.optsTxt=w[1]}if(i.sortSlc&&!this.isCustom&&(i.caseSensitive?(this.opts.sort(),d&&d.sort()):(this.opts.sort(c.ignoreCase),d&&d.sort(c.ignoreCase))),-1!==i.sortNumAsc.indexOf(t))try{this.opts.sort(c.numSortAsc),d&&d.sort(c.numSortAsc),this.isCustom&&this.optsTxt.sort(c.numSortAsc)}catch(E){throw new Error(u.replace("{0}",t).replace("{1}","ascending"))}if(-1!==i.sortNumDesc.indexOf(t))try{this.opts.sort(c.numSortDesc),d&&d.sort(c.numSortDesc),this.isCustom&&this.optsTxt.sort(c.numSortDesc)}catch(E){throw new Error(u.replace("{0}",t).replace("{1}","ascending"))}this.addOptions(t,n,e,d),this.emitter.emit("after-populating-filter",i,t,n)},e.prototype.addOptions=function(t,e,i,s){var n=this.tf,r=e.value;e.innerHTML="",e=this.addFirstOption(e);for(var o=0;or;r++)if((0,s.matchCase)(t[r].toString(),n)===e)return!0;return!1}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.ignoreCase=function(t,e){var i=t.toLowerCase(),s=e.toLowerCase();return s>i?-1:i>s?1:0},e.numSortAsc=function(t,e){return t-e},e.numSortDesc=function(t,e){return e-t}},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.CheckList=void 0;var o=i(10),l=i(3),a=i(16),h=i(5),c=i(17),p=i(1),f=i(4),u=i(11),d="Filter options for column {0} cannot be sorted in {1} manner.";e.CheckList=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"checkList")),o=i.config();return r.checkListDiv=[],r.checkListDivCssClass=o.div_checklist_css_class||"div_checklist",r.checkListCssClass=o.checklist_css_class||"flt_checklist",r.checkListItemCssClass=o.checklist_item_css_class||"flt_checklist_item",r.checkListSlcItemCssClass=o.checklist_selected_item_css_class||"flt_checklist_slc_item",r.activateCheckListTxt=o.activate_checklist_text||"Click to load filter data",r.checkListItemDisabledCssClass=o.checklist_item_disabled_css_class||"flt_checklist_item_disabled",r.enableCheckListResetFilter=o.enable_checklist_reset_filter!==!1,r.prfxCheckListDiv="chkdiv_",r.isCustom=null,r.opts=null,r.optsTxt=null,r.excludedOpts=null,r}return r(e,t),e.prototype.onChange=function(t){var e=(0,p.targetEvt)(t),i=this.tf;this.emitter.emit("filter-focus",i,e),i.filter()},e.prototype.optionClick=function(t){this.setCheckListValues(t.target),this.onChange(t)},e.prototype.onCheckListClick=function(t){var e=this,i=(0,p.targetEvt)(t);if(this.tf.loadFltOnDemand&&"0"===i.getAttribute("filled")){var s=i.getAttribute("ct"),n=this.checkListDiv[s];this.build(s),(0,p.removeEvt)(n,"click",function(t){return e.onCheckListClick(t)})}},e.prototype.init=function(t,e,i){var s=this,n=this.tf,r=e?n.externalFltTgtIds[t]:null,o=(0,l.createElm)("div",["id",this.prfxCheckListDiv+t+"_"+n.id],["ct",t],["filled","0"]);o.className=this.checkListDivCssClass,r?((0,l.elm)(r).appendChild(o),n.externalFltEls.push(o)):i.appendChild(o),this.checkListDiv[t]=o,n.fltIds.push(n.prfxFlt+t+"_"+n.id),n.loadFltOnDemand?((0,p.addEvt)(o,"click",function(t){return s.onCheckListClick(t)}),o.appendChild((0,l.createText)(this.activateCheckListTxt))):this.build(t),this.emitter.on(["build-checklist-filter"],function(t,e,i){return s.build(e,i)}),this.emitter.on(["select-checklist-options"],function(t,e,i){return s.selectOptions(e,i)}),this.initialized=!0},e.prototype.build=function(t){var e=this,i=this.tf;t=parseInt(t,10),this.emitter.emit("before-populating-filter",i,t),this.opts=[],this.optsTxt=[];var s=this.checkListDiv[t],n=(0,l.createElm)("ul",["id",i.fltIds[t]],["colIndex",t]);n.className=this.checkListCssClass,(0,p.addEvt)(n,"change",function(t){return e.onChange(t)});var r=i.tbl.rows,o=i.getRowsNb(!0),f=i.caseSensitive;this.isCustom=i.isCustomOptions(t);var u=void 0,g=i.getActiveFilterId();i.linkedFilters&&g&&(u=i.getColumnIndexFromFilterId(g));var v=[];i.linkedFilters&&i.disableExcludedOptions&&(this.excludedOpts=[]),s.innerHTML="";for(var m=i.refRow;o>m;m++)if(!i.hasVisibleRows||-1===i.visibleRows.indexOf(m)){var b=r[m].cells,y=b.length;if(y===i.nbCells&&!this.isCustom)for(var _=0;y>_;_++)if(t===_&&(!i.linkedFilters||i.linkedFilters&&i.disableExcludedOptions)||t===_&&i.linkedFilters&&(""===r[m].style.display&&!i.paging||i.paging&&(!u||u===t||u!==t&&-1!==i.validRowsIndex.indexOf(m)))){var C=i.getCellData(b[_]),x=(0,h.matchCase)(C,f);(0,a.has)(this.opts,x,f)||this.opts.push(C);var w=v[_];i.linkedFilters&&i.disableExcludedOptions&&(w||(w=i.getFilteredDataCol(_)),(0,a.has)(w,x,f)||(0,a.has)(this.excludedOpts,x,f)||this.excludedOpts.push(C))}}if(this.isCustom){var E=i.getCustomOptions(t);this.opts=E[0],this.optsTxt=E[1]}if(i.sortSlc&&!this.isCustom&&(f?(this.opts.sort(),this.excludedOpts&&this.excludedOpts.sort()):(this.opts.sort(c.ignoreCase),this.excludedOpts&&this.excludedOpts.sort(c.ignoreCase))),-1!==i.sortNumAsc.indexOf(t))try{this.opts.sort(c.numSortAsc),this.excludedOpts&&this.excludedOpts.sort(c.numSortAsc),this.isCustom&&this.optsTxt.sort(c.numSortAsc)}catch(T){throw new Error(d.replace("{0}",t).replace("{1}","ascending"))}if(-1!==i.sortNumDesc.indexOf(t))try{this.opts.sort(c.numSortDesc),this.excludedOpts&&this.excludedOpts.sort(c.numSortDesc),this.isCustom&&this.optsTxt.sort(c.numSortDesc)}catch(T){throw new Error(d.replace("{0}",t).replace("{1}","descending"))}this.addChecks(t,n),i.loadFltOnDemand&&(s.innerHTML=""),s.appendChild(n),s.setAttribute("filled","1"),this.emitter.emit("after-populating-filter",i,t,s)},e.prototype.addChecks=function(t,e){for(var i=this,s=this.tf,n=this.addTChecks(t,e),r=0;rr;r++){var o=(0,l.tag)(s,"li")[r],c=(0,l.tag)(o,"label")[0],p=(0,l.tag)(o,"input")[0],f=(0,h.matchCase)((0,l.getText)(c),i.caseSensitive);""!==f&&(0,a.has)(e,f,i.caseSensitive)?(p.checked=!0,this.setCheckListValues(p)):(p.checked=!1,this.setCheckListValues(p))}}},e.prototype.getValues=function(t){var e=this.tf,i=e.getFilterElement(t),s=i.getAttribute("value"),n=(0,f.isEmpty)(s)?"":s;return n=n.substr(0,n.length-3),n=n.split(" "+e.orOperator+" ")},e.prototype.destroy=function(){var t=this;this.emitter.off(["build-checklist-filter"],function(e,i,s){return t.build(i,s)}),this.emitter.off(["select-checklist-options"],function(e,i,s){return t.selectOptions(i,s)})},e}(o.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.RowsCounter=void 0;var o=i(10),l=i(3),a=i(4);e.RowsCounter=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"rowsCounter")),o=r.config;return r.rowsCounterTgtId=o.rows_counter_target_id||null,r.rowsCounterDiv=null,r.rowsCounterSpan=null,r.rowsCounterText=o.rows_counter_text||"Rows: ",r.fromToTextSeparator=o.from_to_text_separator||"-",r.overText=o.over_text||" / ",r.totRowsCssClass=o.tot_rows_css_class||"tot",r.prfxCounter="counter_",r.prfxTotRows="totrows_span_",r.prfxTotRowsTxt="totRowsTextSpan_",r.onBeforeRefreshCounter=(0,a.isFn)(o.on_before_refresh_counter)?o.on_before_refresh_counter:null,r.onAfterRefreshCounter=(0,a.isFn)(o.on_after_refresh_counter)?o.on_after_refresh_counter:null,r}return r(e,t),e.prototype.init=function(){var t=this;if(!this.initialized){var e=this.tf,i=(0,l.createElm)("div",["id",this.prfxCounter+e.id]);i.className=this.totRowsCssClass;var s=(0,l.createElm)("span",["id",this.prfxTotRows+e.id]),n=(0,l.createElm)("span",["id",this.prfxTotRowsTxt+e.id]);n.appendChild((0,l.createText)(this.rowsCounterText)),this.rowsCounterTgtId||e.setToolbar();var r=this.rowsCounterTgtId?(0,l.elm)(this.rowsCounterTgtId):e.lDiv;this.rowsCounterTgtId?(r.appendChild(n),r.appendChild(s)):(i.appendChild(n),i.appendChild(s),r.appendChild(i)),this.rowsCounterDiv=i,this.rowsCounterSpan=s,this.emitter.on(["after-filtering","grouped-by-page"],function(){return t.refresh(e.getValidRowsNb())}),this.emitter.on(["rows-changed"],function(){return t.refresh()}),this.initialized=!0,this.refresh()}},e.prototype.refresh=function(t){if(this.initialized&&this.isEnabled()){var e=this.tf;this.onBeforeRefreshCounter&&this.onBeforeRefreshCounter.call(null,e,this.rowsCounterSpan);var i;if(e.paging){var s=e.feature("paging");if(s){var n=parseInt(s.startPagingRow,10)+(e.getValidRowsNb()>0?1:0),r=n+s.pagingLength-1<=e.getValidRowsNb()?n+s.pagingLength-1:e.getValidRowsNb();i=n+this.fromToTextSeparator+r+this.overText+e.getValidRowsNb()}}else i=t&&""!==t?t:e.getFilterableRowsNb()-e.nbHiddenRows;this.rowsCounterSpan.innerHTML=i,this.onAfterRefreshCounter&&this.onAfterRefreshCounter.call(null,e,this.rowsCounterSpan,i)}},e.prototype.destroy=function(){var t=this;this.initialized&&(!this.rowsCounterTgtId&&this.rowsCounterDiv?(0,l.removeElm)(this.rowsCounterDiv):(0,l.elm)(this.rowsCounterTgtId).innerHTML="",this.rowsCounterSpan=null,this.rowsCounterDiv=null,this.emitter.off(["after-filtering","grouped-by-page"],function(){return t.refresh(tf.getValidRowsNb())}),this.emitter.off(["rows-changed"],function(){return t.refresh()}),this.initialized=!1)},e}(o.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.StatusBar=void 0;var o=i(10),l=i(2),a=i(3),h=i(4);e.StatusBar=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"statusBar")),o=r.config;return r.statusBarTgtId=o.status_bar_target_id||null,r.statusBarDiv=null,r.statusBarSpan=null,r.statusBarSpanText=null,r.statusBarText=o.status_bar_text||"",r.statusBarCssClass=o.status_bar_css_class||"status",r.statusBarCloseDelay=250,r.onBeforeShowMsg=(0,h.isFn)(o.on_before_show_msg)?o.on_before_show_msg:null,r.onAfterShowMsg=(0,h.isFn)(o.on_after_show_msg)?o.on_after_show_msg:null,r.msgFilter=o.msg_filter||"Filtering data...",r.msgPopulate=o.msg_populate||"Populating filter...",r.msgPopulateCheckList=o.msg_populate_checklist||"Populating list...",r.msgChangePage=o.msg_change_page||"Collecting paging data...",r.msgClear=o.msg_clear||"Clearing filters...",r.msgChangeResults=o.msg_change_results||"Changing results per page...",r.msgResetPage=o.msg_reset_page||"Re-setting page...",r.msgResetPageLength=o.msg_reset_page_length||"Re-setting page length...",r.msgSort=o.msg_sort||"Sorting data...",r.msgLoadExtensions=o.msg_load_extensions||"Loading extensions...",r.msgLoadThemes=o.msg_load_themes||"Loading theme(s)...",r.prfxStatus="status_",r.prfxStatusSpan="statusSpan_",r.prfxStatusTxt="statusText_",r}return r(e,t),e.prototype.init=function(){var t=this;if(!this.initialized){var e=this.tf,i=this.emitter,s=(0,a.createElm)("div",["id",this.prfxStatus+e.id]);s.className=this.statusBarCssClass;var n=(0,a.createElm)("span",["id",this.prfxStatusSpan+e.id]),r=(0,a.createElm)("span",["id",this.prfxStatusTxt+e.id]);r.appendChild((0,a.createText)(this.statusBarText)),this.statusBarTgtId||e.setToolbar();var o=this.statusBarTgtId?(0,a.elm)(this.statusBarTgtId):e.lDiv;this.statusBarTgtId?(o.appendChild(r),o.appendChild(n)):(s.appendChild(r),s.appendChild(n),o.appendChild(s)),this.statusBarDiv=s,this.statusBarSpan=n,this.statusBarSpanText=r,i.on(["before-filtering"],function(){return t.message(t.msgFilter)}),i.on(["before-populating-filter"],function(){return t.message(t.msgPopulate)}),i.on(["before-page-change"],function(){return t.message(t.msgChangePage)}),i.on(["before-clearing-filters"],function(){return t.message(t.msgClear)}),i.on(["before-page-length-change"],function(){return t.message(t.msgChangeResults)}),i.on(["before-reset-page"],function(){return t.message(t.msgResetPage)}),i.on(["before-reset-page-length"],function(){return t.message(t.msgResetPageLength)}),i.on(["before-loading-extensions"],function(){return t.message(t.msgLoadExtensions)}),i.on(["before-loading-themes"],function(){return t.message(t.msgLoadThemes)}),i.on(["after-filtering","after-populating-filter","after-page-change","after-clearing-filters","after-page-length-change","after-reset-page","after-reset-page-length","after-loading-extensions","after-loading-themes"],function(){return t.message("")}),this.initialized=!0}},e.prototype.message=function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?"":arguments[0];if(this.isEnabled()){this.onBeforeShowMsg&&this.onBeforeShowMsg.call(null,this.tf,e);var i=""===e?this.statusBarCloseDelay:1;l.root.setTimeout(function(){t.initialized&&(t.statusBarSpan.innerHTML=e,t.onAfterShowMsg&&t.onAfterShowMsg.call(null,t.tf,e))},i)}},e.prototype.destroy=function(){var t=this;if(this.initialized){var e=this.emitter;this.statusBarDiv.innerHTML="",this.statusBarTgtId||(0,a.removeElm)(this.statusBarDiv),this.statusBarSpan=null,this.statusBarSpanText=null,this.statusBarDiv=null,e.off(["before-filtering"],function(){return t.message(t.msgFilter)}),e.off(["before-populating-filter"],function(){return t.message(t.msgPopulate)}),e.off(["before-page-change"],function(){return t.message(t.msgChangePage)}),e.off(["before-clearing-filters"],function(){return t.message(t.msgClear)}),e.off(["before-page-length-change"],function(){return t.message(t.msgChangeResults)}),e.off(["before-reset-page"],function(){return t.message(t.msgResetPage)}),e.off(["before-reset-page-length"],function(){return t.message(t.msgResetPageLength)}),e.off(["before-loading-extensions"],function(){return t.message(t.msgLoadExtensions)}),e.off(["before-loading-themes"],function(){return t.message(t.msgLoadThemes)}),e.off(["after-filtering","after-populating-filter","after-page-change","after-clearing-filters","after-page-length-change","after-reset-page","after-reset-page-length","after-loading-extensions","after-loading-themes"],function(){return t.message("")}),this.initialized=!1}},e}(o.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.Paging=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},l=i(10),a=i(3),h=i(4),c=i(1),p=i(11);e.Paging=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"paging")),o=r.config;r.btnPageCssClass=o.paging_btn_css_class||"pgInp",r.pagingSlc=null,r.resultsPerPageSlc=null,r.pagingTgtId=o.paging_target_id||null,r.pagingLength=isNaN(o.paging_length)?10:o.paging_length,r.resultsPerPageTgtId=o.results_per_page_target_id||null,r.pgSlcCssClass=o.paging_slc_css_class||"pgSlc",r.pgInpCssClass=o.paging_inp_css_class||"pgNbInp",r.resultsPerPage=o.results_per_page||null,r.hasResultsPerPage=(0,h.isArray)(r.resultsPerPage),r.resultsSlcCssClass=o.results_slc_css_class||"rspg",r.resultsSpanCssClass=o.results_span_css_class||"rspgSpan",r.startPagingRow=0,r.nbPages=0,r.currentPageNb=1,r.btnNextPageText=o.btn_next_page_text||">",r.btnPrevPageText=o.btn_prev_page_text||"<",r.btnLastPageText=o.btn_last_page_text||">|",r.btnFirstPageText=o.btn_first_page_text||"|<",r.btnNextPageHtml=o.btn_next_page_html||(i.enableIcons?'':null),r.btnPrevPageHtml=o.btn_prev_page_html||(i.enableIcons?'':null),r.btnFirstPageHtml=o.btn_first_page_html||(i.enableIcons?'':null),r.btnLastPageHtml=o.btn_last_page_html||(i.enableIcons?'':null),r.pageText=o.page_text||" Page ",r.ofText=o.of_text||" of ",r.nbPgSpanCssClass=o.nb_pages_css_class||"nbpg",r.hasPagingBtns=o.paging_btns!==!1,r.pageSelectorType=o.page_selector_type||p.SELECT,r.onBeforeChangePage=(0,h.isFn)(o.on_before_change_page)?o.on_before_change_page:null,r.onAfterChangePage=(0,h.isFn)(o.on_after_change_page)?o.on_after_change_page:null,r.prfxSlcPages="slcPages_",r.prfxSlcResults="slcResults_",r.prfxSlcResultsTxt="slcResultsTxt_",r.prfxBtnNextSpan="btnNextSpan_",r.prfxBtnPrevSpan="btnPrevSpan_",r.prfxBtnLastSpan="btnLastSpan_",r.prfxBtnFirstSpan="btnFirstSpan_",r.prfxBtnNext="btnNext_",r.prfxBtnPrev="btnPrev_",r.prfxBtnLast="btnLast_",r.prfxBtnFirst="btnFirst_",r.prfxPgSpan="pgspan_",r.prfxPgBeforeSpan="pgbeforespan_",r.prfxPgAfterSpan="pgafterspan_";var l=i.refRow,a=i.getRowsNb(!0);r.nbPages=Math.ceil((a-l)/r.pagingLength);var f=r;return r.evt={slcIndex:function(){return f.pageSelectorType===p.SELECT?f.pagingSlc.options.selectedIndex:parseInt(f.pagingSlc.value,10)-1},nbOpts:function(){return f.pageSelectorType===p.SELECT?parseInt(f.pagingSlc.options.length,10)-1:f.nbPages-1},next:function(){var t=f.evt.slcIndex()0?f.evt.slcIndex()-1:f.evt.nbOpts();f.changePage(t)},last:function(){f.changePage(f.evt.nbOpts())},first:function(){f.changePage(0)},_detectKey:function(t){var e=(0,c.keyCode)(t);e===p.ENTER_KEY&&(i.sorted?(i.filter(),f.changePage(f.evt.slcIndex())):f.changePage(),this.blur())},slcPagesChange:null,nextEvt:null,prevEvt:null,lastEvt:null,firstEvt:null},r}return r(e,t),e.prototype.init=function(){var t,e=this,i=this.tf,s=this.evt;if(!this.initialized){this.hasResultsPerPage&&(this.resultsPerPage.length<2?this.hasResultsPerPage=!1:(this.pagingLength=this.resultsPerPage[1][0],this.setResultsPerPage())),s.slcPagesChange=function(t){var i=t.target;e.changePage(i.selectedIndex)},this.pageSelectorType===p.SELECT&&(t=(0,a.createElm)(p.SELECT,["id",this.prfxSlcPages+i.id]),t.className=this.pgSlcCssClass,(0,c.addEvt)(t,"change",s.slcPagesChange)),this.pageSelectorType===p.INPUT&&(t=(0,a.createElm)(p.INPUT,["id",this.prfxSlcPages+i.id],["value",this.currentPageNb]),t.className=this.pgInpCssClass,(0,c.addEvt)(t,"keypress",s._detectKey));var n=(0,a.createElm)("span",["id",this.prfxBtnNextSpan+i.id]),r=(0,a.createElm)("span",["id",this.prfxBtnPrevSpan+i.id]),o=(0,a.createElm)("span",["id",this.prfxBtnLastSpan+i.id]),l=(0,a.createElm)("span",["id",this.prfxBtnFirstSpan+i.id]);if(this.hasPagingBtns){if(this.btnNextPageHtml)n.innerHTML=this.btnNextPageHtml,(0,c.addEvt)(n,"click",s.next);else{var h=(0,a.createElm)(p.INPUT,["id",this.prfxBtnNext+i.id],["type","button"],["value",this.btnNextPageText],["title","Next"]);h.className=this.btnPageCssClass,(0,c.addEvt)(h,"click",s.next),n.appendChild(h)}if(this.btnPrevPageHtml)r.innerHTML=this.btnPrevPageHtml,(0,c.addEvt)(r,"click",s.prev);else{var f=(0,a.createElm)(p.INPUT,["id",this.prfxBtnPrev+i.id],["type","button"],["value",this.btnPrevPageText],["title","Previous"]);f.className=this.btnPageCssClass,(0,c.addEvt)(f,"click",s.prev),r.appendChild(f)}if(this.btnLastPageHtml)o.innerHTML=this.btnLastPageHtml,(0,c.addEvt)(o,"click",s.last);else{var u=(0,a.createElm)(p.INPUT,["id",this.prfxBtnLast+i.id],["type","button"],["value",this.btnLastPageText],["title","Last"]);u.className=this.btnPageCssClass,(0,c.addEvt)(u,"click",s.last),o.appendChild(u)}if(this.btnFirstPageHtml)l.innerHTML=this.btnFirstPageHtml,(0,c.addEvt)(l,"click",s.first);else{var d=(0,a.createElm)(p.INPUT,["id",this.prfxBtnFirst+i.id],["type","button"],["value",this.btnFirstPageText],["title","First"]);d.className=this.btnPageCssClass,(0,c.addEvt)(d,"click",s.first),l.appendChild(d)}}this.pagingTgtId||i.setToolbar();var g=this.pagingTgtId?(0,a.elm)(this.pagingTgtId):i.mDiv;g.appendChild(l),g.appendChild(r);var v=(0,a.createElm)("span",["id",this.prfxPgBeforeSpan+i.id]);v.appendChild((0,a.createText)(this.pageText)),v.className=this.nbPgSpanCssClass,g.appendChild(v),g.appendChild(t);var m=(0,a.createElm)("span",["id",this.prfxPgAfterSpan+i.id]);m.appendChild((0,a.createText)(this.ofText)),m.className=this.nbPgSpanCssClass,g.appendChild(m);var b=(0,a.createElm)("span",["id",this.prfxPgSpan+i.id]);b.className=this.nbPgSpanCssClass,b.appendChild((0,a.createText)(" "+this.nbPages+" ")),g.appendChild(b),g.appendChild(n),g.appendChild(o),this.pagingSlc=(0,a.elm)(this.prfxSlcPages+i.id),this.setPagingInfo(),i.fltGrid||(i.validateAllRows(),this.setPagingInfo(i.validRowsIndex)),this.emitter.on(["after-filtering"],function(){return e.resetPagingInfo()}),this.emitter.on(["change-page"],function(t,i){return e.setPage(i)}),this.emitter.on(["change-page-results"],function(t,i){return e.changeResultsPerPage(i)}),this.initialized=!0}},e.prototype.reset=function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0],e=this.tf;this.isEnabled()||(this.enable(),this.init(),t&&e.filter())},e.prototype.resetPagingInfo=function(){this.startPagingRow=0,this.currentPageNb=1,this.setPagingInfo(this.tf.validRowsIndex)},e.prototype.setPagingInfo=function(t){var e=this.tf,i=this.pagingTgtId?(0,a.elm)(this.pagingTgtId):e.mDiv,s=(0,a.elm)(this.prfxPgSpan+e.id);if(e.validRowsIndex=t||e.getValidRows(!0),this.nbPages=Math.ceil(e.validRowsIndex.length/this.pagingLength),s.innerHTML=this.nbPages,this.pageSelectorType===p.SELECT&&(this.pagingSlc.innerHTML=""),this.nbPages>0)if(i.style.visibility="visible",this.pageSelectorType===p.SELECT)for(var n=0;nr;r++){var l=e.validRowsIndex[r],a=i[l],c=a.getAttribute("validRow"),f=!1;r>=s&&n>r?((0,h.isNull)(c)||Boolean("true"===c))&&(a.style.display="",f=!0):a.style.display=p.NONE,this.emitter.emit("row-paged",e,l,r,f)}this.emitter.emit("grouped-by-page",e,this)},e.prototype.getPage=function(){return this.currentPageNb},e.prototype.setPage=function(t){var e=this.tf;if(e.isInitialized()&&this.isEnabled()){var i=this.evt,s="undefined"==typeof t?"undefined":o(t);if("string"===s)switch(t.toLowerCase()){case"next":i.next();break;case"previous":i.prev();break;case"last":i.last();break;case"first":i.first();break;default:i.next()}else"number"===s&&this.changePage(t-1)}},e.prototype.setResultsPerPage=function(){var t=this,e=this.tf,i=this.evt;if(!this.resultsPerPageSlc&&this.resultsPerPage){i.slcResultsChange=function(e){t.onChangeResultsPerPage(),e.target.blur()};var s=(0,a.createElm)(p.SELECT,["id",this.prfxSlcResults+e.id]);s.className=this.resultsSlcCssClass;var n=this.resultsPerPage[0],r=this.resultsPerPage[1],o=(0,a.createElm)("span",["id",this.prfxSlcResultsTxt+e.id]);o.className=this.resultsSpanCssClass,this.resultsPerPageTgtId||e.setToolbar();var l=this.resultsPerPageTgtId?(0,a.elm)(this.resultsPerPageTgtId):e.rDiv;o.appendChild((0,a.createText)(n));var h=e.feature("help");h&&h.btn?(h.btn.parentNode.insertBefore(o,h.btn),h.btn.parentNode.insertBefore(s,h.btn)):(l.appendChild(o),l.appendChild(s));for(var f=0;f=0&&t<=this.nbPages-1&&(this.onBeforeChangePage&&this.onBeforeChangePage.call(null,this,t+1),this.currentPageNb=parseInt(t,10)+1,this.pageSelectorType===p.SELECT?this.pagingSlc.options[t].selected=!0:this.pagingSlc.value=this.currentPageNb,this.startPagingRow=this.pageSelectorType===p.SELECT?this.pagingSlc.value:t*this.pagingLength,this.groupByPage(),this.onAfterChangePage&&this.onAfterChangePage.call(null,this,t+1)),this.emitter.emit("after-page-change",e,t+1))},e.prototype.changeResultsPerPage=function(t){this.isEnabled()&&!isNaN(t)&&(this.resultsPerPageSlc.value=t,this.onChangeResultsPerPage())},e.prototype.onChangeResultsPerPage=function(){var t=this.tf;if(this.isEnabled()){this.emitter.emit("before-page-length-change",t);var e=this.resultsPerPageSlc,i=e.selectedIndex,s=this.pageSelectorType===p.SELECT?this.pagingSlc.selectedIndex:parseInt(this.pagingSlc.value-1,10);if(this.pagingLength=parseInt(e.options[i].value,10),this.startPagingRow=this.pagingLength*s,!isNaN(this.pagingLength)&&(this.startPagingRow>=t.nbFilterableRows&&(this.startPagingRow=t.nbFilterableRows-this.pagingLength),this.setPagingInfo(),this.pageSelectorType===p.SELECT)){var n=this.pagingSlc.options.length-1<=s?this.pagingSlc.options.length-1:s;this.pagingSlc.options[n].selected=!0}this.emitter.emit("after-page-length-change",t,this.pagingLength)}},e.prototype.resetPage=function(){var t=this.tf;if(this.isEnabled()){this.emitter.emit("before-reset-page",t);var e=t.feature("store").getPageNb();""!==e&&this.changePage(e-1),this.emitter.emit("after-reset-page",t,e)}},e.prototype.resetPageLength=function(){var t=this.tf;if(this.isEnabled()){this.emitter.emit("before-reset-page-length",t);var e=t.feature("store").getPageLength();""!==e&&(this.resultsPerPageSlc.options[e].selected=!0,this.changeResultsPerPage()),this.emitter.emit("after-reset-page-length",t,e)}},e.prototype.destroy=function(){var t=this,e=this.tf;if(this.initialized){var i=(0,a.elm)(this.prfxBtnNextSpan+e.id),s=(0,a.elm)(this.prfxBtnPrevSpan+e.id),n=(0,a.elm)(this.prfxBtnLastSpan+e.id),r=(0,a.elm)(this.prfxBtnFirstSpan+e.id),o=(0,a.elm)(this.prfxPgBeforeSpan+e.id),l=(0,a.elm)(this.prfxPgAfterSpan+e.id),h=(0,a.elm)(this.prfxPgSpan+e.id),f=this.evt;this.pagingSlc&&(this.pageSelectorType===p.SELECT?(0,c.removeEvt)(this.pagingSlc,"change",f.slcPagesChange):this.pageSelectorType===p.INPUT&&(0,c.removeEvt)(this.pagingSlc,"keypress",f._detectKey),(0,a.removeElm)(this.pagingSlc)),i&&((0,c.removeEvt)(i,"click",f.next),(0,a.removeElm)(i)),s&&((0,c.removeEvt)(s,"click",f.prev),(0,a.removeElm)(s)),n&&((0,c.removeEvt)(n,"click",f.last),(0,a.removeElm)(n)),r&&((0,c.removeEvt)(r,"click",f.first),(0,a.removeElm)(r)),o&&(0,a.removeElm)(o),l&&(0,a.removeElm)(l),h&&(0,a.removeElm)(h),this.hasResultsPerPage&&this.removeResultsPerPage(),this.emitter.off(["after-filtering"],function(){return t.resetPagingInfo()}),this.emitter.off(["change-page"],function(e,i){return t.setPage(i)}),this.emitter.off(["change-page-results"],function(e,i){return t.changeResultsPerPage(i)}),this.pagingSlc=null,this.nbPages=0,this.disable(),this.initialized=!1}},e}(l.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.ClearButton=void 0;var o=i(10),l=i(3),a=i(1);e.ClearButton=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"btnReset")),o=r.config;return r.btnResetTgtId=o.btn_reset_target_id||null,r.btnResetEl=null,r.btnResetText=o.btn_reset_text||"Reset", +r.btnResetTooltip=o.btn_reset_tooltip||"Clear filters",r.btnResetHtml=o.btn_reset_html||(i.enableIcons?'':null),r.prfxResetSpan="resetspan_",r}return r(e,t),e.prototype.onClick=function(){this.isEnabled()&&this.tf.clearFilters()},e.prototype.init=function(){var t=this,e=this.tf;if(!this.initialized){var i=(0,l.createElm)("span",["id",this.prfxResetSpan+e.id]);this.btnResetTgtId||e.setToolbar();var s=this.btnResetTgtId?(0,l.elm)(this.btnResetTgtId):e.rDiv;if(s.appendChild(i),this.btnResetHtml){i.innerHTML=this.btnResetHtml;var n=i.firstChild;(0,a.addEvt)(n,"click",function(){return t.onClick()})}else{var r=(0,l.createElm)("a",["href","javascript:voelm(0);"]);r.className=e.btnResetCssClass,r.appendChild((0,l.createText)(this.btnResetText)),i.appendChild(r),(0,a.addEvt)(r,"click",function(){return t.onClick()})}this.btnResetEl=i.firstChild,this.initialized=!0}},e.prototype.destroy=function(){var t=this.tf;if(this.initialized){var e=(0,l.elm)(this.prfxResetSpan+t.id);e&&(0,l.removeElm)(e),this.btnResetEl=null,this.initialized=!1}},e}(o.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.Help=void 0;var o=i(10),l=i(3),a=i(1),h=i(11),c="https://github.com/koalyptus/TableFilter/wiki/4.-Filter-operators",p="http://koalyptus.github.io/TableFilter/";e.Help=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"help")),o=r.config;return r.tgtId=o.help_instructions_target_id||null,r.contTgtId=o.help_instructions_container_target_id||null,r.instrText=o.help_instructions_text?o.help_instructions_text:'Use the filters above each column to filter and limit table data. Advanced searches can be performed by using the following operators:
<, <=, >, >=, =, *, !, {, }, ||,&&, [empty], [nonempty], rgx:
Learn more
',r.instrHtml=o.help_instructions_html||null,r.btnText=o.help_instructions_btn_text||"?",r.btnHtml=o.help_instructions_btn_html||null,r.btnCssClass=o.help_instructions_btn_css_class||"helpBtn",r.contCssClass=o.help_instructions_container_css_class||"helpCont",r.btn=null,r.cont=null,r.defaultHtml='

TableFilter v'+i.version+'

'+p+"
©2015-"+i.year+' Max Guglielmi
',r.prfxHelpSpan="helpSpan_",r.prfxHelpDiv="helpDiv_",r.emitter.on(["init-help"],function(){return r.init()}),r}return r(e,t),e.prototype.init=function(){var t=this;if(!this.initialized){var e=this.tf,i=(0,l.createElm)("span",["id",this.prfxHelpSpan+e.id]),s=(0,l.createElm)("div",["id",this.prfxHelpDiv+e.id]);this.tgtId||e.setToolbar();var n=this.tgtId?(0,l.elm)(this.tgtId):e.rDiv;n.appendChild(i);var r=this.contTgtId?(0,l.elm)(this.contTgtId):i;if(this.btnHtml){i.innerHTML=this.btnHtml;var o=i.firstChild;(0,a.addEvt)(o,"click",function(){return t.toggle()}),r.appendChild(s)}else{r.appendChild(s);var h=(0,l.createElm)("a",["href","javascript:void(0);"]);h.className=this.btnCssClass,h.appendChild((0,l.createText)(this.btnText)),i.appendChild(h),(0,a.addEvt)(h,"click",function(){return t.toggle()})}this.instrHtml?(this.contTgtId&&r.appendChild(s),s.innerHTML=this.instrHtml,this.contTgtId||(s.className=this.contCssClass,(0,a.addEvt)(s,"dblclick",function(){return t.toggle()}))):(s.innerHTML=this.instrText,s.className=this.contCssClass,(0,a.addEvt)(s,"dblclick",function(){return t.toggle()})),s.innerHTML+=this.defaultHtml,(0,a.addEvt)(s,"click",function(){return t.toggle()}),this.cont=s,this.btn=i,this.initialized=!0}},e.prototype.toggle=function(){if(this.enabled!==!1){var t=this.cont.style.display;""===t||t===h.NONE?this.cont.style.display="inline":this.cont.style.display=h.NONE}},e.prototype.destroy=function(){this.initialized&&((0,l.removeElm)(this.btn),this.btn=null,this.cont&&((0,l.removeElm)(this.cont),this.cont=null,this.initialized=!1))},e}(o.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.AlternateRows=void 0;var o=i(10),l=i(3);e.AlternateRows=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"alternateRows")),o=r.config;return r.evenCss=o.even_row_css_class||"even",r.oddCss=o.odd_row_css_class||"odd",r}return r(e,t),e.prototype.init=function(){var t=this;this.initialized||(this.processAll(),this.emitter.on(["row-processed","row-paged"],function(e,i,s,n){return t.processRow(i,s,n)}),this.emitter.on(["column-sorted"],function(){return t.processAll()}),this.initialized=!0)},e.prototype.processAll=function(){if(this.isEnabled())for(var t=this.tf,e=t.getValidRows(!0),i=e.length,s=0,n=0;i>n;n++){var r=e[n];this.setRowBg(r,s),s++}},e.prototype.processRow=function(t,e,i){i?this.setRowBg(t,e):this.removeRowBg(t)},e.prototype.setRowBg=function(t,e){if(this.isEnabled()&&!isNaN(t)){var i=this.tf.tbl.rows,s=isNaN(e)?t:e;this.removeRowBg(t),(0,l.addClass)(i[t],s%2?this.evenCss:this.oddCss)}},e.prototype.removeRowBg=function(t){if(!isNaN(t)){var e=this.tf.tbl.rows;(0,l.removeClass)(e[t],this.oddCss),(0,l.removeClass)(e[t],this.evenCss)}},e.prototype.destroy=function(){var t=this;if(this.initialized){for(var e=this.tf.getRowsNb(!0),i=0;e>i;i++)this.removeRowBg(i);this.emitter.off(["row-processed","row-paged"],function(e,i,s,n){return t.processRow(i,s,n)}),this.emitter.off(["column-sorted"],function(){return t.processAll()}),this.initialized=!1}},e}(o.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.NoResults=void 0;var o=i(10),l=i(3),a=i(4),h=i(11);e.NoResults=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"noResults")),o=r.config.no_results_message;return r.content=o.content||"No results",r.customContainer=o.custom_container||null,r.customContainerId=o.custom_container_id||null,r.isExternal=!(0,a.isEmpty)(r.customContainer)||!(0,a.isEmpty)(r.customContainerId),r.cssClass=o.css_class||"no-results",r.cont=null,r.onBeforeShowMsg=(0,a.isFn)(o.on_before_show_msg)?o.on_before_show_msg:null,r.onAfterShowMsg=(0,a.isFn)(o.on_after_show_msg)?o.on_after_show_msg:null,r.onBeforeHideMsg=(0,a.isFn)(o.on_before_hide_msg)?o.on_before_hide_msg:null,r.onAfterHideMsg=(0,a.isFn)(o.on_after_hide_msg)?o.on_after_hide_msg:null,r.prfxNoResults="nores_",r}return r(e,t),e.prototype.init=function(){var t=this;if(!this.initialized){var e=this.tf,i=this.customContainer||(0,l.elm)(this.customContainerId)||e.tbl,s=(0,l.createElm)("div",["id",this.prfxNoResults+e.id]);s.className=this.cssClass,s.innerHTML=this.content,this.isExternal?i.appendChild(s):i.parentNode.insertBefore(s,i.nextSibling),this.cont=s,this.emitter.on(["after-filtering"],function(){return t.toggle()}),this.initialized=!0,this.hide()}},e.prototype.toggle=function(){this.tf.getValidRowsNb()>0?this.hide():this.show()},e.prototype.show=function(){this.initialized&&this.isEnabled()&&(this.onBeforeShowMsg&&this.onBeforeShowMsg.call(null,this.tf,this),this.setWidth(),this.cont.style.display="block",this.onAfterShowMsg&&this.onAfterShowMsg.call(null,this.tf,this))},e.prototype.hide=function(){this.initialized&&this.isEnabled()&&(this.onBeforeHideMsg&&this.onBeforeHideMsg.call(null,this.tf,this),this.cont.style.display=h.NONE,this.onBeforeHideMsg&&this.onBeforeHideMsg.call(null,this.tf,this))},e.prototype.setWidth=function(){if(this.initialized&&!this.isExternal&&this.isEnabled())if(this.tf.gridLayout){var t=this.tf.feature("gridLayout");this.cont.style.width=t.tblCont.clientWidth+"px"}else this.cont.style.width=this.tf.tbl.clientWidth+"px"},e.prototype.destroy=function(){var t=this;this.initialized&&((0,l.removeElm)(this.cont),this.cont=null,this.emitter.off(["after-filtering"],function(){return t.toggle()}),this.initialized=!1)},e}(o.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.State=void 0;var o=i(10),l=i(27),a=i(28),h=i(5),c=i(4);e.State=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"state")),o=r.config.state;return r.enableHash=o===!0||(0,c.isArray)(o.types)&&-1!==o.types.indexOf("hash"),r.enableLocalStorage=(0,c.isArray)(o.types)&&-1!==o.types.indexOf("local_storage"),r.enableCookie=(0,c.isArray)(o.types)&&-1!==o.types.indexOf("cookie"),r.persistFilters=o.filters!==!1,r.persistPageNumber=Boolean(o.page_number),r.persistPageLength=Boolean(o.page_length),r.persistSort=Boolean(o.sort),r.persistColsVisibility=Boolean(o.columns_visibility),r.persistFiltersVisibility=Boolean(o.filters_visibility),r.cookieDuration=isNaN(o.cookie_duration)?87600:parseInt(o.cookie_duration,10),r.enableStorage=r.enableLocalStorage||r.enableCookie,r.hash=null,r.pageNb=null,r.pageLength=null,r.sort=null,r.hiddenCols=null,r.filtersVisibility=null,r.state={},r.prfxCol="col_",r.pageNbKey="page",r.pageLengthKey="page_length",r.filtersVisKey="filters_visibility",r}return r(e,t),e.prototype.init=function(){var t=this;this.initialized||(this.emitter.on(["after-filtering"],function(){return t.update()}),this.emitter.on(["after-page-change","after-clearing-filters"],function(e,i){return t.updatePage(i)}),this.emitter.on(["after-page-length-change"],function(e,i){return t.updatePageLength(i)}),this.emitter.on(["column-sorted"],function(e,i,s){return t.updateSort(i,s)}),this.emitter.on(["sort-initialized"],function(){return t._syncSort()}),this.emitter.on(["columns-visibility-initialized"],function(){return t._syncColsVisibility()}),this.emitter.on(["column-shown","column-hidden"],function(e,i,s,n){return t.updateColsVisibility(n)}),this.emitter.on(["filters-visibility-initialized"],function(){return t._syncFiltersVisibility()}),this.emitter.on(["filters-toggled"],function(e,i,s){return t.updateFiltersVisibility(s)}),this.enableHash&&(this.hash=new l.Hash(this),this.hash.init()),this.enableStorage&&(this.storage=new a.Storage(this),this.storage.init()),this.initialized=!0)},e.prototype.update=function(){var t=this;if(this.isEnabled()){var e=this.state,i=this.tf;if(this.persistFilters){var s=i.getFiltersValue();s.forEach(function(i,s){var n=""+t.prfxCol+s;(0,c.isString)(i)&&(0,h.isEmpty)(i)?e.hasOwnProperty(n)&&(e[n].flt=void 0):(e[n]=e[n]||{},e[n].flt=i)})}if(this.persistPageNumber&&((0,c.isNull)(this.pageNb)?e[this.pageNbKey]=void 0:e[this.pageNbKey]=this.pageNb),this.persistPageLength&&((0,c.isNull)(this.pageLength)?e[this.pageLengthKey]=void 0:e[this.pageLengthKey]=this.pageLength),this.persistSort&&!(0,c.isNull)(this.sort)){Object.keys(e).forEach(function(i){-1!==i.indexOf(t.prfxCol)&&e[i]&&(e[i].sort=void 0)});var n=""+this.prfxCol+this.sort.column;e[n]=e[n]||{},e[n].sort={descending:this.sort.descending}}this.persistColsVisibility&&((0,c.isNull)(this.hiddenCols)||(Object.keys(e).forEach(function(i){-1!==i.indexOf(t.prfxCol)&&e[i]&&(e[i].hidden=void 0)}),this.hiddenCols.forEach(function(i){var s=""+t.prfxCol+i;e[s]=e[s]||{},e[s].hidden=!0}))),this.persistFiltersVisibility&&((0,c.isNull)(this.filtersVisibility)?e[this.filtersVisKey]=void 0:e[this.filtersVisKey]=this.filtersVisibility),this.emitter.emit("state-changed",i,e)}},e.prototype.updatePage=function(t){this.pageNb=t,this.update()},e.prototype.updatePageLength=function(t){this.pageLength=t,this.update()},e.prototype.updateSort=function(t,e){this.sort={column:t,descending:e},this.update()},e.prototype.updateColsVisibility=function(t){this.hiddenCols=t,this.update()},e.prototype.updateFiltersVisibility=function(t){this.filtersVisibility=t,this.update()},e.prototype.override=function(t){this.state=t},e.prototype.sync=function(){var t=this.state,e=this.tf;if(this._syncFilters(),this.persistPageNumber){var i=t[this.pageNbKey];this.emitter.emit("change-page",e,i)}if(this.persistPageLength){var s=t[this.pageLengthKey];this.emitter.emit("change-page-results",e,s)}this._syncSort(),this._syncColsVisibility(),this._syncFiltersVisibility()},e.prototype.overrideAndSync=function(t){this.disable(),this.override(t),this.sync(),this.enable()},e.prototype._syncFilters=function(){var t=this;if(this.persistFilters){var e=this.state,i=this.tf;Object.keys(e).forEach(function(s){if(-1!==s.indexOf(t.prfxCol)){var n=parseInt(s.replace(t.prfxCol,""),10),r=e[s].flt;i.setFilterValue(n,r)}}),i.filter()}},e.prototype._syncSort=function(){var t=this;if(this.persistSort){var e=this.state,i=this.tf;Object.keys(e).forEach(function(s){if(-1!==s.indexOf(t.prfxCol)){var n=parseInt(s.replace(t.prfxCol,""),10);if(!(0,c.isUndef)(e[s].sort)){var r=e[s].sort;t.emitter.emit("sort",i,n,r.descending)}}})}},e.prototype._syncColsVisibility=function(){var t=this;if(this.persistColsVisibility){var e=this.state,i=this.tf,s=[];Object.keys(e).forEach(function(i){if(-1!==i.indexOf(t.prfxCol)){var n=parseInt(i.replace(t.prfxCol,""),10);(0,c.isUndef)(e[i].hidden)||s.push(n)}}),s.forEach(function(e){t.emitter.emit("hide-column",i,e)})}},e.prototype._syncFiltersVisibility=function(){if(this.persistFiltersVisibility){var t=this.state,e=this.tf,i=t[this.filtersVisKey];this.filtersVisibility=i,this.emitter.emit("show-filters",e,i)}},e.prototype.destroy=function(){var t=this;this.initialized&&(this.state={},this.emitter.off(["after-filtering"],function(){return t.update()}),this.emitter.off(["after-page-change","after-clearing-filters"],function(e,i){return t.updatePage(i)}),this.emitter.off(["after-page-length-change"],function(e,i){return t.updatePageLength(i)}),this.emitter.off(["column-sorted"],function(e,i,s){return t.updateSort(i,s)}),this.emitter.off(["sort-initialized"],function(){return t._syncSort()}),this.emitter.off(["columns-visibility-initialized"],function(){return t._syncColsVisibility()}),this.emitter.off(["column-shown","column-hidden"],function(e,i,s,n){return t.updateColsVisibility(n)}),this.emitter.off(["filters-visibility-initialized"],function(){return t._syncFiltersVisibility()}),this.emitter.off(["filters-toggled"],function(e,i,s){return t.updateFiltersVisibility(s)}),this.enableHash&&(this.hash.destroy(),this.hash=null),this.enableStorage&&(this.storage.destroy(),this.storage=null),this.initialized=!1)},e}(o.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.Hash=e.hasHashChange=void 0;var n=i(1),r=i(2),o=r.root.JSON,l=r.root.location,a=r.root.decodeURIComponent,h=e.hasHashChange=function(){var t=r.root.documentMode;return"onhashchange"in r.root&&(void 0===t||t>7)};e.Hash=function(){function t(e){s(this,t),this.state=e,this.lastHash=null,this.emitter=e.emitter}return t.prototype.init=function(){var t=this;h()&&(this.lastHash=l.hash,this.emitter.on(["state-changed"],function(e,i){return t.update(i)}),this.emitter.on(["initialized"],function(){return t.sync()}),(0,n.addEvt)(r.root,"hashchange",function(){return t.sync()}))},t.prototype.update=function(t){var e="#"+o.stringify(t);this.lastHash!==e&&(l.hash=e,this.lastHash=e)},t.prototype.parse=function(t){return-1===t.indexOf("#")?null:(t=t.substr(1),o.parse(a(t)))},t.prototype.sync=function(){var t=this.parse(l.hash);t&&this.state.overrideAndSync(t)},t.prototype.destroy=function(){var t=this;this.emitter.off(["state-changed"],function(e,i){return t.update(i)}),this.emitter.off(["initialized"],function(){return t.sync()}),(0,n.removeEvt)(r.root,"hashchange",function(){return t.sync()}),this.state=null,this.lastHash=null,this.emitter=null},t}()},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.Storage=e.hasStorage=void 0;var r=i(29),o=s(r),l=i(2),a=l.root.JSON,h=l.root.localStorage,c=l.root.location,p=e.hasStorage=function(){return"Storage"in l.root};e.Storage=function(){function t(e){n(this,t),this.state=e,this.tf=e.tf,this.enableLocalStorage=e.enableLocalStorage&&p(),this.enableCookie=e.enableCookie&&!this.enableLocalStorage,this.emitter=e.emitter,this.duration=e.cookieDuration}return t.prototype.init=function(){var t=this;this.emitter.on(["state-changed"],function(e,i){return t.save(i)}),this.emitter.on(["initialized"],function(){return t.sync()})},t.prototype.save=function(t){this.enableLocalStorage?h[this.getKey()]=a.stringify(t):o["default"].write(this.getKey(),a.stringify(t),this.duration)},t.prototype.retrieve=function(){var t=null;return t=this.enableLocalStorage?h[this.getKey()]:o["default"].read(this.getKey()),t?a.parse(t):null},t.prototype.remove=function(){this.enableLocalStorage?h.removeItem(this.getKey()):o["default"].remove(this.getKey())},t.prototype.sync=function(){var t=this.retrieve();t&&this.state.overrideAndSync(t)},t.prototype.getKey=function(){return a.stringify({key:this.tf.prfxTf+"_"+this.tf.id,path:c.pathname})},t.prototype.destroy=function(){var t=this;this.emitter.off(["state-changed"],function(e,i){return t.save(i)}),this.emitter.off(["initialized"],function(){return t.sync()}),this.remove(),this.state=null,this.emitter=null},t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i(2),n=s.root.document;e["default"]={write:function(t,e,i){var s="";i&&(s=new Date((new Date).getTime()+36e5*i),s="; expires="+s.toGMTString()),n.cookie=t+"="+escape(e)+s},read:function(t){var e="",i=t+"=";if(n.cookie.length>0){var s=n.cookie,r=s.indexOf(i);if(-1!==r){r+=i.length;var o=s.indexOf(";",r);-1===o&&(o=s.length),e=unescape(s.substring(r,o))}}return e},remove:function(t){this.write(t,"",-1)},valueToArray:function(t,e){e||(e=",");var i=this.read(t),s=i.split(e);return s},getValueByIndex:function(t,e,i){i||(i=",");var s=this.valueToArray(t,i);return s[e]}}}])}); \ No newline at end of file diff --git a/dist/tablefilter/tf-1.js b/dist/tablefilter/tf-1.js index cf424289..b2b279a7 100644 --- a/dist/tablefilter/tf-1.js +++ b/dist/tablefilter/tf-1.js @@ -1,8 +1,8 @@ /** * tablefilter v0.2.35 by Max Guglielmi - * build date: 2016-06-02T03:28:29.372Z + * build date: 2016-06-02T04:09:12.661Z * MIT License */ -webpackJsonp([1],{30:function(e,t,n){function r(e){return n(o(e))}function o(e){return i[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var i={"./array":16,"./array.js":16,"./const":11,"./const.js":11,"./cookie":29,"./cookie.js":29,"./date":6,"./date.js":6,"./dom":3,"./dom.js":3,"./emitter":8,"./emitter.js":8,"./event":1,"./event.js":1,"./extensions/advancedGrid/adapterEzEditTable":31,"./extensions/advancedGrid/adapterEzEditTable.js":31,"./extensions/advancedGrid/advancedGrid":32,"./extensions/advancedGrid/advancedGrid.js":32,"./extensions/colOps/colOps":33,"./extensions/colOps/colOps.js":33,"./extensions/colsVisibility/colsVisibility":34,"./extensions/colsVisibility/colsVisibility.js":34,"./extensions/filtersVisibility/filtersVisibility":35,"./extensions/filtersVisibility/filtersVisibility.js":35,"./extensions/sort/adapterSortabletable":36,"./extensions/sort/adapterSortabletable.js":36,"./extensions/sort/sort":37,"./extensions/sort/sort.js":37,"./feature":10,"./feature.js":10,"./helpers":7,"./helpers.js":7,"./modules/alternateRows":24,"./modules/alternateRows.js":24,"./modules/checkList":18,"./modules/checkList.js":18,"./modules/clearButton":22,"./modules/clearButton.js":22,"./modules/dropdown":15,"./modules/dropdown.js":15,"./modules/gridLayout":9,"./modules/gridLayout.js":9,"./modules/hash":27,"./modules/hash.js":27,"./modules/help":23,"./modules/help.js":23,"./modules/highlightKeywords":13,"./modules/highlightKeywords.js":13,"./modules/loader":12,"./modules/loader.js":12,"./modules/noResults":25,"./modules/noResults.js":25,"./modules/paging":21,"./modules/paging.js":21,"./modules/popupFilter":14,"./modules/popupFilter.js":14,"./modules/rowsCounter":19,"./modules/rowsCounter.js":19,"./modules/state":26,"./modules/state.js":26,"./modules/statusBar":20,"./modules/statusBar.js":20,"./modules/storage":28,"./modules/storage.js":28,"./root":2,"./root.js":2,"./sort":17,"./sort.js":17,"./string":5,"./string.js":5,"./types":4,"./types.js":4};r.keys=function(){return Object.keys(i)},r.resolve=o,e.exports=r,r.id=30},31:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(10),l=n(3),a=n(11),d=n(2),c='Failed to instantiate EditTable object.\n \n"ezEditTable" dependency not found.',u=function(e){function t(n,i){r(this,t);var s=o(this,e.call(this,n,i.name));return s.initialized=!1,s.desc=i.description||"ezEditTable adapter",s.filename=i.filename||"ezEditTable.js",s.vendorPath=i.vendor_path,s.loadStylesheet=Boolean(i.load_stylesheet),s.stylesheet=i.stylesheet||s.vendorPath+"ezEditTable.css",s.stylesheetName=i.stylesheet_name||"ezEditTableCss",i.scroll_into_view=i.scroll_into_view===!1?!1:n.gridLayout,s._ezEditTable=null,s.cfg=i,s.enable(),s}return i(t,e),t.prototype.init=function(){var e=this;if(!this.initialized){var t=this.tf;if(d.root.EditTable)this._setAdvancedGrid();else{var n=this.vendorPath+this.filename;t["import"](this.filename,n,function(){e._setAdvancedGrid()})}this.loadStylesheet&&!t.isImported(this.stylesheet,"link")&&t["import"](this.stylesheetName,this.stylesheet,null,"link"),this.emitter.on(["filter-focus","filter-blur"],function(){return e._toggleForInputFilter()}),this.initialized=!0}},t.prototype._setAdvancedGrid=function(){var e,t=this.tf,n=this.cfg,r=(0,l.tag)(t.tbl,"thead");e=r.length>0&&!n.startRow?void 0:n.startRow||t.refRow,n.base_path=n.base_path||t.basePath+"ezEditTable/";var o=n.editable,i=n.selection;i&&(n.default_selection=n.default_selection||"row"),n.active_cell_css=n.active_cell_css||"ezETSelectedCell";var s=0,a=0;if(i){var d=function(e,n,r){var o=e.Selection,i=function(r){if("row"===e.defaultSelection)o.SelectRowByIndex(r);else{e.ClearSelections();var i=n.cellIndex,s=t.tbl.rows[r];"both"===e.defaultSelection&&o.SelectRowByIndex(r),s&&o.SelectCell(s.cells[i])}if(t.validRowsIndex.length!==t.getRowsNb()){var l=t.tbl.rows[r];l&&l.scrollIntoView(!1),h&&(h.cellIndex===t.getCellsNb()-1&&t.gridLayout?t.tblCont.scrollLeft=1e8:0===h.cellIndex&&t.gridLayout?t.tblCont.scrollLeft=0:h.scrollIntoView(!1))}};if(t.validRowsIndex){var l,d=t.validRowsIndex,c=d.length,u="row"!==e.defaultSelection?n.parentNode:n,h="TD"===n.nodeName?n:null,f=void 0!==r?e.Event.GetKey(r):0,p=-1!==d.indexOf(u.rowIndex),b=t.feature("paging"),m=34===f||33===f?b&&b.pagingLength||e.nbRowsPerPage:1;if(p)34!==f&&33!==f?(s=d.indexOf(u.rowIndex),a=u.rowIndex):(l=34===f?c-1>=s+m?d[s+m]:[c-1]:s-m<=d[0]?d[0]:d[s-m],a=l,s=d.indexOf(l),i(l));else{if(u.rowIndex>a)if(u.rowIndex>=d[c-1])l=d[c-1];else{var y=s+m;l=y>c-1?d[c-1]:d[y]}else if(u.rowIndex<=d[0])l=d[0];else{var g=d[s-m];l=g?g:d[0]}a=u.rowIndex,i(l)}}},u=function(e,n){var r="row"!==e.defaultSelection?n.parentNode:n;if(t.paging&&t.feature("paging").nbPages>1){var o=t.feature("paging");e.nbRowsPerPage=o.pagingLength;var i=t.validRowsIndex,s=i.length,l=parseInt(o.startPagingRow,10)+parseInt(o.pagingLength,10),a=r.rowIndex;a===i[s-1]&&o.currentPageNb!==o.nbPages?o.setPage("last"):a===i[0]&&1!==o.currentPageNb?o.setPage("first"):a>i[l-1]&&ai[0]&&o.setPage("previous")}};if(t.paging&&(t.feature("paging").onAfterChangePage=function(e){var t=e.tf.extension("advancedGrid"),n=t._ezEditTable,r=n.Selection,o=r.GetActiveRow();o&&o.scrollIntoView(!1);var i=r.GetActiveCell();i&&i.scrollIntoView(!1)}),"row"===n.default_selection){var h=n.on_before_selected_row;n.on_before_selected_row=function(){u(arguments[0],arguments[1],arguments[2]),h&&h.call(null,arguments[0],arguments[1],arguments[2])};var f=n.on_after_selected_row;n.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=n.on_before_selected_cell;n.on_before_selected_cell=function(){u(arguments[0],arguments[1],arguments[2]),p&&p.call(null,arguments[0],arguments[1],arguments[2])};var b=n.on_after_selected_cell;n.on_after_selected_cell=function(){d(arguments[0],arguments[1],arguments[2]),b&&b.call(null,arguments[0],arguments[1],arguments[2])}}}if(o){var m=n.on_added_dom_row;if(n.on_added_dom_row=function(){t.nbFilterableRows++,t.paging?(t.nbFilterableRows++,t.paging=!1,t.feature("paging").destroy(),t.feature("paging").reset()):t.emitter.emit("rows-changed",t,this),t.alternateRows&&t.feature("alternateRows").init(),m&&m.call(null,arguments[0],arguments[1],arguments[2])},n.actions&&n.actions["delete"]){var y=n.actions["delete"].on_after_submit;n.actions["delete"].on_after_submit=function(){t.nbFilterableRows--,t.paging?(t.nbFilterableRows--,t.paging=!1,t.feature("paging").destroy(),t.feature("paging").reset(!1)):t.emitter.emit("rows-changed",t,this),t.alternateRows&&t.feature("alternateRows").init(),y&&y.call(null,arguments[0],arguments[1])}}}try{this._ezEditTable=new EditTable(t.id,n,e),this._ezEditTable.Init()}catch(g){throw new Error(c)}this.initialized=!0},t.prototype.reset=function(){var e=this._ezEditTable;e&&(this.cfg.selection&&e.Selection.Set(),this.cfg.editable&&e.Editable.Set())},t.prototype.toggle=function(){var e=this._ezEditTable;e.editable?e.Editable.Remove():e.Editable.Set(),e.selection?e.Selection.Remove():e.Selection.Set()},t.prototype._toggleForInputFilter=function(){var e=this.tf;if(e.getActiveFilterId()){var t=e.getColumnIndexFromFilterId(e.getActiveFilterId()),n=e.getFilterType(t);n===a.INPUT&&this.toggle()}},t.prototype.destroy=function(){var e=this;if(this.initialized){var t=this._ezEditTable;t&&(this.cfg.selection&&(t.Selection.ClearSelections(),t.Selection.Remove()),this.cfg.editable&&t.Editable.Remove()),this.emitter.off(["filter-focus","filter-blur"],function(){return e._toggleForInputFilter()}),this.initialized=!1}},t}(s.Feature);t["default"]=u},32:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(31),i=r(o);t["default"]=i["default"]},33:function(module,exports,__webpack_require__){"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(exports,"__esModule",{value:!0});var _feature=__webpack_require__(10),_dom=__webpack_require__(3),_types=__webpack_require__(4),ColOps=function(_Feature){function ColOps(e,t){_classCallCheck(this,ColOps);var n=_possibleConstructorReturn(this,_Feature.call(this,e,t.name));return n.onBeforeOperation=(0,_types.isFn)(t.on_before_operation)?t.on_before_operation:null,n.onAfterOperation=(0,_types.isFn)(t.on_after_operation)?t.on_after_operation:null,n.opts=t,n.enable(),n}return _inherits(ColOps,_Feature),ColOps.prototype.init=function(){var e=this;this.initialized||(this.tf.emitter.on(["after-filtering"],function(){return e.calc()}),this.calc(),this.initialized=!0)},ColOps.prototype.calc=function calc(){var tf=this.tf;if(tf.isInitialized()){this.onBeforeOperation&&this.onBeforeOperation.call(null,tf);var opts=this.opts,labelId=opts.id,colIndex=opts.col,operation=opts.operation,outputType=opts.write_method,totRowIndex=opts.tot_row_index,excludeRow=opts.exclude_row,decimalPrecision=(0,_types.isUndef)(opts.decimal_precision)?2:opts.decimal_precision,ucolIndex=[],ucolMax=0;ucolIndex[ucolMax]=colIndex[0];for(var ii=1;ii=jj;jj++)ucolIndex[jj]===colIndex[ii]&&(saved=1);0===saved&&(ucolMax++,ucolIndex[ucolMax]=colIndex[ii])}if((0,_types.isArray)(labelId)&&(0,_types.isArray)(colIndex)&&(0,_types.isArray)(operation))for(var rows=tf.tbl.rows,colvalues=[],ucol=0;ucolMax>=ucol;ucol++){colvalues.push(tf.getColValues(ucolIndex[ucol],!1,!0,excludeRow));for(var result,nbvalues=0,temp,meanValue=0,sumValue=0,minValue=null,maxValue=null,q1Value=null,medValue=null,q3Value=null,meanFlag=0,sumFlag=0,minFlag=0,maxFlag=0,q1Flag=0,medFlag=0,q3Flag=0,theList=[],opsThisCol=[],decThisCol=[],labThisCol=[],oTypeThisCol=[],mThisCol=-1,k=0;kmaxValue?parseFloat(cvalue):maxValue))}if(1===meanFlag&&(meanValue=sumValue/nbvalues),1===medFlag){var aux=0;nbvalues%2===1?(aux=Math.floor(nbvalues/2),medValue=theList[aux]):medValue=(theList[nbvalues/2]+theList[nbvalues/2-1])/2}var posa;if(1===q1Flag&&(posa=0,posa=Math.floor(nbvalues/4),q1Value=4*posa===nbvalues?(theList[posa-1]+theList[posa])/2:theList[posa]),1===q3Flag){posa=0;var posb=0;posa=Math.floor(nbvalues/4),4*posa===nbvalues?(posb=3*posa,q3Value=(theList[posb]+theList[posb-1])/2):q3Value=theList[nbvalues-posa-1]}for(var i=0;mThisCol>=i;i++){switch(opsThisCol[i]){case"mean":result=meanValue;break;case"sum":result=sumValue;break;case"min":result=minValue;break;case"max":result=maxValue;break;case"median":result=medValue;break;case"q1":result=q1Value;break;case"q3":result=q3Value}var precision=isNaN(decThisCol[i])?2:decThisCol[i];if(oTypeThisCol&&result){if(result=result.toFixed(precision),(0,_dom.elm)(labThisCol[i]))switch(oTypeThisCol.toLowerCase()){case"innerhtml":isNaN(result)||!isFinite(result)||0===nbvalues?(0,_dom.elm)(labThisCol[i]).innerHTML=".":(0,_dom.elm)(labThisCol[i]).innerHTML=result;break;case"setvalue":(0,_dom.elm)(labThisCol[i]).value=result;break;case"createtextnode":var oldnode=(0,_dom.elm)(labThisCol[i]).firstChild,txtnode=(0,_dom.createText)(result);(0,_dom.elm)(labThisCol[i]).replaceChild(txtnode,oldnode)}}else try{isNaN(result)||!isFinite(result)||0===nbvalues?(0,_dom.elm)(labThisCol[i]).innerHTML=".":(0,_dom.elm)(labThisCol[i]).innerHTML=result.toFixed(precision)}catch(e){}}var totRow=totRowIndex&&totRowIndex[ucol]?rows[totRowIndex[ucol]]:null;totRow&&(totRow.style.display="")}this.onAfterOperation&&this.onAfterOperation.call(null,tf)}},ColOps.prototype.destroy=function(){var e=this;this.initialized&&(this.tf.emitter.off(["after-filtering"],function(){return e.calc()}),this.initialized=!1)},ColOps}(_feature.Feature);exports["default"]=ColOps},34:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=n(10),a=n(3),d=n(4),c=n(1),u=r(c),h=function(e){function t(n,r){o(this,t);var s=i(this,e.call(this,n,r.name)),l=n.config();return s.initialized=!1,s.name=r.name,s.desc=r.description||"Columns visibility manager",s.spanEl=null,s.btnEl=null,s.contEl=null,s.tickToHide=r.tick_to_hide!==!1,s.manager=r.manager!==!1,s.headersTbl=r.headers_table||!1,s.headersIndex=r.headers_index||1,s.contElTgtId=r.container_target_id||null,s.headersText=r.headers_text||null,s.btnTgtId=r.btn_target_id||null,s.btnText=r.btn_text||"Columns▼",s.btnHtml=r.btn_html||null,s.btnCssClass=r.btn_css_class||"colVis",s.btnCloseText=r.btn_close_text||"Close",s.btnCloseHtml=r.btn_close_html||null,s.btnCloseCssClass=r.btn_close_css_class||s.btnCssClass,s.stylesheet=r.stylesheet||"colsVisibility.css",s.prfx="colVis_",s.spanCssClass=r.span_css_class||"colVisSpan",s.prfxCont=s.prfx+"Cont_",s.contCssClass=r.cont_css_class||"colVisCont",s.listCssClass=l.list_css_class||"cols_checklist",s.listItemCssClass=l.checklist_item_css_class||"cols_checklist_item",s.listSlcItemCssClass=l.checklist_selected_item_css_class||"cols_checklist_slc_item",s.text=r.text||(s.tickToHide?"Hide: ":"Show: "),s.atStart=r.at_start||null,s.enableHover=Boolean(r.enable_hover),s.enableTickAll=Boolean(r.enable_tick_all),s.tickAllText=r.tick_all_text||"Select all:",s.hiddenCols=[],s.tblHasColTag=(0,a.tag)(n.tbl,"col").length>0,s.onLoaded=(0,d.isFn)(r.on_loaded)?r.on_loaded:null,s.onBeforeOpen=(0,d.isFn)(r.on_before_open)?r.on_before_open:null,s.onAfterOpen=(0,d.isFn)(r.on_after_open)?r.on_after_open:null,s.onBeforeClose=(0,d.isFn)(r.on_before_close)?r.on_before_close:null,s.onAfterClose=(0,d.isFn)(r.on_after_close)?r.on_after_close:null,s.onBeforeColHidden=(0,d.isFn)(r.on_before_col_hidden)?r.on_before_col_hidden:null,s.onAfterColHidden=(0,d.isFn)(r.on_after_col_hidden)?r.on_after_col_hidden:null,s.onBeforeColDisplayed=(0,d.isFn)(r.on_before_col_displayed)?r.on_before_col_displayed:null,s.onAfterColDisplayed=(0,d.isFn)(r.on_after_col_displayed)?r.on_after_col_displayed:null,n.gridLayout&&(s.headersTbl=n.feature("gridLayout").headTbl,s.headersIndex=0,s.onAfterColDisplayed=function(){},s.onAfterColHidden=function(){}),n["import"](r.name+"Style",n.stylePath+s.stylesheet,null,"link"),s.enable(),s}return s(t,e),t.prototype.toggle=function(){var e=this.contEl.style.display,t=this.onBeforeOpen,n=this.onBeforeClose,r=this.onAfterOpen,o=this.onAfterClose;t&&"inline"!==e&&t.call(null,this),n&&"inline"===e&&n.call(null,this),this.contEl.style.display="inline"===e?"none":"inline",r&&"inline"!==e&&r.call(null,this),o&&"inline"===e&&o.call(null,this)},t.prototype.checkItem=function(e){var t=e.parentNode;if(t&&e){var n=e.firstChild.checked,r=e.firstChild.getAttribute("id").split("_")[1];r=parseInt(r,10),n?(0,a.addClass)(t,this.listSlcItemCssClass):(0,a.removeClass)(t,this.listSlcItemCssClass);var o=!1;(this.tickToHide&&n||!this.tickToHide&&!n)&&(o=!0),this.setHidden(r,o)}},t.prototype.init=function(){var e=this;!this.initialized&&this.manager&&(this.emitter.on(["hide-column"],function(t,n){return e.hideCol(n)}),this.buildBtn(),this.buildManager(),this.initialized=!0,this.emitter.emit("columns-visibility-initialized",this.tf,this),this._hideAtStart())},t.prototype.buildBtn=function(){var e=this;if(!this.btnEl){var t=this.tf,n=(0,a.createElm)("span",["id",this.prfx+t.id]);n.className=this.spanCssClass,this.btnTgtId||t.setToolbar();var r=this.btnTgtId?(0,a.elm)(this.btnTgtId):t.rDiv;if(this.btnTgtId)r.appendChild(n);else{var o=r.firstChild;o.parentNode.insertBefore(n,o)}if(this.btnHtml){n.innerHTML=this.btnHtml;var i=n.firstChild;this.enableHover?u["default"].add(i,"mouseover",function(t){return e.toggle(t)}):u["default"].add(i,"click",function(t){return e.toggle(t)})}else{var s=(0,a.createElm)("a",["href","javascript:;"]);s.className=this.btnCssClass,s.title=this.desc,s.innerHTML=this.btnText,n.appendChild(s),this.enableHover?u["default"].add(s,"mouseover",function(t){return e.toggle(t)}):u["default"].add(s,"click",function(t){return e.toggle(t)})}this.spanEl=n,this.btnEl=this.spanEl.firstChild,this.onLoaded&&this.onLoaded.call(null,this)}},t.prototype.buildManager=function(){var e=this,t=this.tf,n=this.contElTgtId?(0,a.elm)(this.contElTgtId):(0,a.createElm)("div",["id",this.prfxCont+t.id]);n.className=this.contCssClass;var r=(0,a.createElm)("p");r.innerHTML=this.text,n.appendChild(r);var o=(0,a.createElm)("ul",["id","ul"+this.name+"_"+t.id]);o.className=this.listCssClass;var i=this.headersTbl?this.headersTbl:t.tbl,s=this.headersTbl?this.headersIndex:t.getHeadersRowIndex(),l=i.rows[s];this.enableTickAll&&!function(){var n=(0,a.createCheckItem)("col__"+t.id,e.tickAllText,e.tickAllText);(0,a.addClass)(n,e.listItemCssClass),o.appendChild(n),n.check.checked=!e.tickToHide,u["default"].add(n.check,"click",function(){for(var e=0;e',s.icnCollapseHtml='Collapse filters',s.defaultText="Toggle filters",s.targetId=r.target_id||null,s.enableIcon=r.enable_icon!==!1,s.btnText=r.btn_text||"",s.collapseBtnHtml=s.enableIcon?s.icnCollapseHtml+s.btnText:s.btnText||s.defaultText,s.expandBtnHtml=s.enableIcon?s.icnExpandHtml+s.btnText:s.btnText||s.defaultText,s.btnHtml=r.btn_html||null,s.btnCssClass=r.btn_css_class||"btnExpClpFlt",s.contCssClass=r.cont_css_class||"expClpFlt",s.filtersRowIndex=(0,d.isUndef)(r.filters_row_index)?n.getFiltersRowIndex():r.filters_row_index,s.visibleAtStart=(0,d.isUndef)(r.visible_at_start)?!0:Boolean(r.visible_at_start),s.prfx="fltsVis_",s.onBeforeShow=(0,d.isFn)(r.on_before_show)?r.on_before_show:null,s.onAfterShow=(0,d.isFn)(r.on_after_show)?r.on_after_show:null,s.onBeforeHide=(0,d.isFn)(r.on_before_hide)?r.on_before_hide:null,s.onAfterHide=(0,d.isFn)(r.on_after_hide)?r.on_after_hide:null,n["import"](r.name+"Style",n.stylePath+s.stylesheet,null,"link"),s.enable(),s}return s(t,e),t.prototype.init=function(){var e=this;this.initialized||(this.buildUI(),this.initialized=!0,this.emitter.on(["show-filters"],function(t,n){return e.show(n)}),this.emitter.emit("filters-visibility-initialized",this.tf,this))},t.prototype.buildUI=function(){var e=this,t=this.tf,n=(0,a.createElm)("span",["id",this.prfx+t.id]);n.className=this.contCssClass,this.targetId||t.setToolbar();var r=this.targetId?(0,a.elm)(this.targetId):t.rDiv;if(this.targetId)r.appendChild(n);else{var o=r.firstChild;o.parentNode.insertBefore(n,o)}var i=void 0;this.btnHtml?(n.innerHTML=this.btnHtml,i=n.firstChild):(i=(0,a.createElm)("a",["href","javascript:void(0);"]),i.className=this.btnCssClass,i.title=this.btnText||this.defaultText,i.innerHTML=this.collapseBtnHtml,n.appendChild(i)),u["default"].add(i,"click",function(){return e.toggle()}),this.contEl=n,this.btnEl=i,this.visibleAtStart||this.toggle()},t.prototype.toggle=function(){var e=this.tf,t=e.gridLayout?e.feature("gridLayout").headTbl:e.tbl,n=t.rows[this.filtersRowIndex],r=""===n.style.display;this.show(!r)},t.prototype.show=function(){var e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0],t=this.tf,n=t.gridLayout?t.feature("gridLayout").headTbl:t.tbl,r=n.rows[this.filtersRowIndex];this.onBeforeShow&&e&&this.onBeforeShow.call(this,this),this.onBeforeHide&&!e&&this.onBeforeHide.call(null,this),r.style.display=e?"":"none",this.enableIcon&&!this.btnHtml&&(this.btnEl.innerHTML=e?this.collapseBtnHtml:this.expandBtnHtml),this.onAfterShow&&e&&this.onAfterShow.call(null,this),this.onAfterHide&&!e&&this.onAfterHide.call(null,this),this.emitter.emit("filters-toggled",t,this,e)},t.prototype.destroy=function(){var e=this;this.initialized&&(this.emitter.off(["show-filters"],function(t,n){return e.show(n)}),this.btnEl.innerHTML="",(0,a.removeElm)(this.btnEl),this.btnEl=null,this.contEl.innerHTML="",(0,a.removeElm)(this.contEl),this.contEl=null,this.initialized=!1)},t}(l.Feature);t["default"]=h},36:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){return(0,C.removeNbFormat)(e,"us")}function a(e){return(0,C.removeNbFormat)(e,"eu")}function d(e,t){return(0,v.formatDate)(e,t)}function c(e){return d(e,"DMY")}function u(e){return d(e,"MDY")}function h(e){return d(e,"YMD")}function f(e){return d(e,"DDMMMYYYY")}function p(e){var t=e.split(".");for(var n in t){for(var r=t[n];3>r.length;)r="0"+r;t[n]=r}return t.join(".")}function b(e,t){var n=p(e.value.toLowerCase()),r=p(t.value.toLowerCase());return n===r?0:r>n?-1:1}Object.defineProperty(t,"__esModule",{value:!0});var m=n(10),y=n(4),g=n(3),T=n(1),_=r(T),v=n(6),C=n(7),w=n(11),S=function(e){function t(n,r){o(this,t);var s=i(this,e.call(this,n,r.name));return s.name=r.name,s.desc=r.description||"Sortable table",s.sorted=!1,s.sortTypes=(0,y.isArray)(r.types)?r.types:[],s.sortColAtStart=(0,y.isArray)(r.sort_col_at_start)?r.sort_col_at_start:null,s.asyncSort=Boolean(r.async_sort),s.triggerIds=(0,y.isArray)(r.trigger_ids)?r.trigger_ids:[],s.imgPath=r.images_path||n.themesPath,s.imgBlank=r.image_blank||"blank.png",s.imgClassName=r.image_class_name||"sort-arrow",s.imgAscClassName=r.image_asc_class_name||"ascending",s.imgDescClassName=r.image_desc_class_name||"descending",s.customKey=r.custom_key||"data-tf-sortKey",s.onSortLoaded=(0,y.isFn)(r.on_sort_loaded)?r.on_sort_loaded:null,s.onBeforeSort=(0,y.isFn)(r.on_before_sort)?r.on_before_sort:null,s.onAfterSort=(0,y.isFn)(r.on_after_sort)?r.on_after_sort:null,s.enable(),s}return s(t,e),t.prototype.init=function(){var e=this;if(!this.initialized){var t=this.tf,n=this;if((0,y.isUndef)(SortableTable))throw new Error("SortableTable class not found.");this.overrideSortableTable(),this.setSortTypes();var r=n.sortColAtStart;r&&this.stt.sort(r[0],r[1]),this.onSortLoaded&&this.onSortLoaded.call(null,t,this),this.stt.onbeforesort=function(){n.onBeforeSort&&n.onBeforeSort.call(null,t,n.stt.sortColumn),t.paging&&t.feature("paging").disable()},this.stt.onsort=function(){if(n.sorted=!0,t.paging){var e=t.feature("paging");t.getValidRows(!0),e.enable(),e.setPage(e.getPage())}n.onAfterSort&&n.onAfterSort.call(null,t,n.stt.sortColumn,n.stt.descending),n.emitter.emit("column-sorted",t,n.stt.sortColumn,n.stt.descending)},this.emitter.on(["sort"],function(t,n,r){return e.sortByColumnIndex(n,r)}),this.initialized=!0,this.emitter.emit("sort-initialized",t,this)}},t.prototype.sortByColumnIndex=function(e,t){this.stt.sort(e,t)},t.prototype.overrideSortableTable=function(){var e=this,t=this.tf;SortableTable.prototype.headerOnclick=function(t){if(e.initialized){for(var n=t.target||t.srcElement;n.tagName!==w.CELL_TAG&&n.tagName!==w.HEADER_TAG;)n=n.parentNode;this.sort(SortableTable.msie?SortableTable.getCellIndex(n):n.cellIndex)}},SortableTable.getCellIndex=function(e){var t=e.parentNode.cells,n=t.length,r=void 0;for(r=0;t[r]!==e&&n>r;r++);return r},SortableTable.prototype.initHeader=function(n){var r=this;if(!r.tHead){if(!t.gridLayout)return;r.tHead=t.feature("gridLayout").headTbl.tHead}r.headersRow=t.headersRow;var o=r.tHead.rows[r.headersRow].cells;r.sortTypes=n||[];for(var i=o.length,s=void 0,l=void 0,a=0;i>a;a++)l=o[a],null!==r.sortTypes[a]&&"None"!==r.sortTypes[a]?(l.style.cursor="pointer",s=(0,g.createElm)("img",["src",e.imgPath+e.imgBlank]),l.appendChild(s),null!==r.sortTypes[a]&&l.setAttribute("_sortType",r.sortTypes[a]),_["default"].add(l,"click",r._headerOnclick)):(l.setAttribute("_sortType",n[a]),l._sortType="None");r.updateHeaderArrows()},SortableTable.prototype.updateHeaderArrows=function(){var t=this,n=void 0,r=void 0,o=void 0;if(e.asyncSort&&e.triggerIds.length>0){var i=e.triggerIds;n=[],r=i.length;for(var s=0;sl;l++){var a=n[l].getAttribute("_sortType");null!==a&&"None"!==a&&(o=n[l].lastChild||n[l],"img"!==o.nodeName.toLowerCase()&&(o=(0,g.createElm)("img",["src",e.imgPath+e.imgBlank]),n[l].appendChild(o)),l===t.sortColumn?o.className=e.imgClassName+" "+(this.descending?e.imgDescClassName:e.imgAscClassName):o.className=e.imgClassName)}},SortableTable.prototype.getRowValue=function(e,t,n){var r=this,o=r._sortTypeInfo[t];if(o&&o.getRowValue)return o.getRowValue(e,n); -var i=e.cells[n],s=SortableTable.getInnerText(i);return r.getValueFromString(s,t)},SortableTable.getInnerText=function(t){return t?t.getAttribute(e.customKey)?t.getAttribute(e.customKey):(0,g.getText)(t):void 0}},t.prototype.addSortType=function(){var e=arguments;SortableTable.prototype.addSortType(e[0],e[1],e[2],e[3])},t.prototype.setSortTypes=function(){for(var e=this,t=this.tf,n=this.sortTypes,r=[],o=0;o0&&!function(){for(var t=e.triggerIds,n=0;n descending, false -> ascending\r\nSortableTable.prototype.defaultDescending = false;\r\n\r\n// shared between all instances. This is intentional to allow external files\r\n// to modify the prototype\r\nSortableTable.prototype._sortTypeInfo = {};\r\n\r\nSortableTable.prototype.setTable = function (oTable) {\r\n if ( this.tHead )\r\n this.uninitHeader();\r\n this.element = oTable;\r\n this.setTHead( oTable.tHead );\r\n this.setTBody( oTable.tBodies[0] );\r\n};\r\n\r\nSortableTable.prototype.setTHead = function (oTHead) {\r\n if (this.tHead && this.tHead != oTHead )\r\n this.uninitHeader();\r\n this.tHead = oTHead;\r\n this.initHeader( this.sortTypes );\r\n};\r\n\r\nSortableTable.prototype.setTBody = function (oTBody) {\r\n this.tBody = oTBody;\r\n};\r\n\r\nSortableTable.prototype.setSortTypes = function ( oSortTypes ) {\r\n if ( this.tHead )\r\n this.uninitHeader();\r\n this.sortTypes = oSortTypes || [];\r\n if ( this.tHead )\r\n this.initHeader( this.sortTypes );\r\n};\r\n\r\n// adds arrow containers and events\r\n// also binds sort type to the header cells so that reordering columns does\r\n// not break the sort types\r\nSortableTable.prototype.initHeader = function (oSortTypes) {\r\n if (!this.tHead) return;\r\n var cells = this.tHead.rows[0].cells;\r\n var doc = this.tHead.ownerDocument || this.tHead.document;\r\n this.sortTypes = oSortTypes || [];\r\n var l = cells.length;\r\n var img, c;\r\n for (var i = 0; i < l; i++) {\r\n c = cells[i];\r\n if (this.sortTypes[i] != null && this.sortTypes[i] != "None") {\r\n img = doc.createElement("IMG");\r\n img.src = "images/blank.png";\r\n c.appendChild(img);\r\n if (this.sortTypes[i] != null)\r\n c._sortType = this.sortTypes[i];\r\n if (typeof c.addEventListener != "undefined")\r\n c.addEventListener("click", this._headerOnclick, false);\r\n else if (typeof c.attachEvent != "undefined")\r\n c.attachEvent("onclick", this._headerOnclick);\r\n else\r\n c.onclick = this._headerOnclick;\r\n }\r\n else\r\n {\r\n c.setAttribute( "_sortType", oSortTypes[i] );\r\n c._sortType = "None";\r\n }\r\n }\r\n this.updateHeaderArrows();\r\n};\r\n\r\n// remove arrows and events\r\nSortableTable.prototype.uninitHeader = function () {\r\n if (!this.tHead) return;\r\n var cells = this.tHead.rows[0].cells;\r\n var l = cells.length;\r\n var c;\r\n for (var i = 0; i < l; i++) {\r\n c = cells[i];\r\n if (c._sortType != null && c._sortType != "None") {\r\n c.removeChild(c.lastChild);\r\n if (typeof c.removeEventListener != "undefined")\r\n c.removeEventListener("click", this._headerOnclick, false);\r\n else if (typeof c.detachEvent != "undefined")\r\n c.detachEvent("onclick", this._headerOnclick);\r\n c._sortType = null;\r\n c.removeAttribute( "_sortType" );\r\n }\r\n }\r\n};\r\n\r\nSortableTable.prototype.updateHeaderArrows = function () {\r\n if (!this.tHead) return;\r\n var cells = this.tHead.rows[0].cells;\r\n var l = cells.length;\r\n var img;\r\n for (var i = 0; i < l; i++) {\r\n if (cells[i]._sortType != null && cells[i]._sortType != "None") {\r\n img = cells[i].lastChild;\r\n if (i == this.sortColumn)\r\n img.className = "sort-arrow " + (this.descending ? "descending" : "ascending");\r\n else\r\n img.className = "sort-arrow";\r\n }\r\n }\r\n};\r\n\r\nSortableTable.prototype.headerOnclick = function (e) {\r\n // find TD element\r\n var el = e.target || e.srcElement;\r\n while (el.tagName != "TD")\r\n el = el.parentNode;\r\n\r\n this.sort(SortableTable.msie ? SortableTable.getCellIndex(el) : el.cellIndex);\r\n};\r\n\r\n// IE returns wrong cellIndex when columns are hidden\r\nSortableTable.getCellIndex = function (oTd) {\r\n var cells = oTd.parentNode.childNodes\r\n var l = cells.length;\r\n var i;\r\n for (i = 0; cells[i] != oTd && i < l; i++)\r\n ;\r\n return i;\r\n};\r\n\r\nSortableTable.prototype.getSortType = function (nColumn) {\r\n return this.sortTypes[nColumn] || "String";\r\n};\r\n\r\n// only nColumn is required\r\n// if bDescending is left out the old value is taken into account\r\n// if sSortType is left out the sort type is found from the sortTypes array\r\n\r\nSortableTable.prototype.sort = function (nColumn, bDescending, sSortType) {\r\n if (!this.tBody) return;\r\n if (sSortType == null)\r\n sSortType = this.getSortType(nColumn);\r\n\r\n // exit if None\r\n if (sSortType == "None")\r\n return;\r\n\r\n if (bDescending == null) {\r\n if (this.sortColumn != nColumn)\r\n this.descending = this.defaultDescending;\r\n else\r\n this.descending = !this.descending;\r\n }\r\n else\r\n this.descending = bDescending;\r\n\r\n this.sortColumn = nColumn;\r\n\r\n if (typeof this.onbeforesort == "function")\r\n this.onbeforesort();\r\n\r\n var f = this.getSortFunction(sSortType, nColumn);\r\n var a = this.getCache(sSortType, nColumn);\r\n var tBody = this.tBody;\r\n\r\n a.sort(f);\r\n\r\n if (this.descending)\r\n a.reverse();\r\n\r\n if (SortableTable.removeBeforeSort) {\r\n // remove from doc\r\n var nextSibling = tBody.nextSibling;\r\n var p = tBody.parentNode;\r\n p.removeChild(tBody);\r\n }\r\n\r\n // insert in the new order\r\n var l = a.length;\r\n for (var i = 0; i < l; i++)\r\n tBody.appendChild(a[i].element);\r\n\r\n if (SortableTable.removeBeforeSort) {\r\n // insert into doc\r\n p.insertBefore(tBody, nextSibling);\r\n }\r\n\r\n this.updateHeaderArrows();\r\n\r\n this.destroyCache(a);\r\n\r\n if (typeof this.onsort == "function")\r\n this.onsort();\r\n};\r\n\r\nSortableTable.prototype.asyncSort = function (nColumn, bDescending, sSortType) {\r\n var oThis = this;\r\n this._asyncsort = function () {\r\n oThis.sort(nColumn, bDescending, sSortType);\r\n };\r\n window.setTimeout(this._asyncsort, 1);\r\n};\r\n\r\nSortableTable.prototype.getCache = function (sType, nColumn) {\r\n if (!this.tBody) return [];\r\n var rows = this.tBody.rows;\r\n var l = rows.length;\r\n var a = new Array(l);\r\n var r;\r\n for (var i = 0; i < l; i++) {\r\n r = rows[i];\r\n a[i] = {\r\n value: this.getRowValue(r, sType, nColumn),\r\n element: r\r\n };\r\n };\r\n return a;\r\n};\r\n\r\nSortableTable.prototype.destroyCache = function (oArray) {\r\n var l = oArray.length;\r\n for (var i = 0; i < l; i++) {\r\n oArray[i].value = null;\r\n oArray[i].element = null;\r\n oArray[i] = null;\r\n }\r\n};\r\n\r\nSortableTable.prototype.getRowValue = function (oRow, sType, nColumn) {\r\n // if we have defined a custom getRowValue use that\r\n if (this._sortTypeInfo[sType] && this._sortTypeInfo[sType].getRowValue)\r\n return this._sortTypeInfo[sType].getRowValue(oRow, nColumn);\r\n\r\n var s;\r\n var c = oRow.cells[nColumn];\r\n if (typeof c.innerText != "undefined")\r\n s = c.innerText;\r\n else\r\n s = SortableTable.getInnerText(c);\r\n return this.getValueFromString(s, sType);\r\n};\r\n\r\nSortableTable.getInnerText = function (oNode) {\r\n var s = "";\r\n var cs = oNode.childNodes;\r\n var l = cs.length;\r\n for (var i = 0; i < l; i++) {\r\n switch (cs[i].nodeType) {\r\n case 1: //ELEMENT_NODE\r\n s += SortableTable.getInnerText(cs[i]);\r\n break;\r\n case 3: //TEXT_NODE\r\n s += cs[i].nodeValue;\r\n break;\r\n }\r\n }\r\n return s;\r\n};\r\n\r\nSortableTable.prototype.getValueFromString = function (sText, sType) {\r\n if (this._sortTypeInfo[sType])\r\n return this._sortTypeInfo[sType].getValueFromString( sText );\r\n return sText;\r\n /*\r\n switch (sType) {\r\n case "Number":\r\n return Number(sText);\r\n case "CaseInsensitiveString":\r\n return sText.toUpperCase();\r\n case "Date":\r\n var parts = sText.split("-");\r\n var d = new Date(0);\r\n d.setFullYear(parts[0]);\r\n d.setDate(parts[2]);\r\n d.setMonth(parts[1] - 1);\r\n return d.valueOf();\r\n }\r\n return sText;\r\n */\r\n };\r\n\r\nSortableTable.prototype.getSortFunction = function (sType, nColumn) {\r\n if (this._sortTypeInfo[sType])\r\n return this._sortTypeInfo[sType].compare;\r\n return SortableTable.basicCompare;\r\n};\r\n\r\nSortableTable.prototype.destroy = function () {\r\n this.uninitHeader();\r\n var win = this.document.parentWindow;\r\n if (win && typeof win.detachEvent != "undefined") { // only IE needs this\r\n win.detachEvent("onunload", this._onunload);\r\n }\r\n this._onunload = null;\r\n this.element = null;\r\n this.tHead = null;\r\n this.tBody = null;\r\n this.document = null;\r\n this._headerOnclick = null;\r\n this.sortTypes = null;\r\n this._asyncsort = null;\r\n this.onsort = null;\r\n};\r\n\r\n// Adds a sort type to all instance of SortableTable\r\n// sType : String - the identifier of the sort type\r\n// fGetValueFromString : function ( s : string ) : T - A function that takes a\r\n// string and casts it to a desired format. If left out the string is just\r\n// returned\r\n// fCompareFunction : function ( n1 : T, n2 : T ) : Number - A normal JS sort\r\n// compare function. Takes two values and compares them. If left out less than,\r\n// <, compare is used\r\n// fGetRowValue : function( oRow : HTMLTRElement, nColumn : int ) : T - A function\r\n// that takes the row and the column index and returns the value used to compare.\r\n// If left out then the innerText is first taken for the cell and then the\r\n// fGetValueFromString is used to convert that string the desired value and type\r\n\r\nSortableTable.prototype.addSortType = function (sType, fGetValueFromString, fCompareFunction, fGetRowValue) {\r\n this._sortTypeInfo[sType] = {\r\n type: sType,\r\n getValueFromString: fGetValueFromString || SortableTable.idFunction,\r\n compare: fCompareFunction || SortableTable.basicCompare,\r\n getRowValue: fGetRowValue\r\n };\r\n};\r\n\r\n// this removes the sort type from all instances of SortableTable\r\nSortableTable.prototype.removeSortType = function (sType) {\r\n delete this._sortTypeInfo[sType];\r\n};\r\n\r\nSortableTable.basicCompare = function compare(n1, n2) {\r\n if (n1.value < n2.value)\r\n return -1;\r\n if (n2.value < n1.value)\r\n return 1;\r\n return 0;\r\n};\r\n\r\nSortableTable.idFunction = function (x) {\r\n return x;\r\n};\r\n\r\nSortableTable.toUpperCase = function (s) {\r\n return s.toUpperCase();\r\n};\r\n\r\nSortableTable.toDate = function (s) {\r\n var parts = s.split("-");\r\n var d = new Date(0);\r\n d.setFullYear(parts[0]);\r\n d.setDate(parts[2]);\r\n d.setMonth(parts[1] - 1);\r\n return d.valueOf();\r\n};\r\n\r\n\r\n// add sort types\r\nSortableTable.prototype.addSortType("Number", Number);\r\nSortableTable.prototype.addSortType("CaseInsensitiveString", SortableTable.toUpperCase);\r\nSortableTable.prototype.addSortType("Date", SortableTable.toDate);\r\nSortableTable.prototype.addSortType("String");\r\n// None is a special case\r\n'}}); \ No newline at end of file +webpackJsonp([1],{30:function(e,t,n){function r(e){return n(o(e))}function o(e){return i[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var i={"./array":16,"./array.js":16,"./const":11,"./const.js":11,"./cookie":29,"./cookie.js":29,"./date":6,"./date.js":6,"./dom":3,"./dom.js":3,"./emitter":8,"./emitter.js":8,"./event":1,"./event.js":1,"./extensions/advancedGrid/adapterEzEditTable":31,"./extensions/advancedGrid/adapterEzEditTable.js":31,"./extensions/advancedGrid/advancedGrid":32,"./extensions/advancedGrid/advancedGrid.js":32,"./extensions/colOps/colOps":33,"./extensions/colOps/colOps.js":33,"./extensions/colsVisibility/colsVisibility":34,"./extensions/colsVisibility/colsVisibility.js":34,"./extensions/filtersVisibility/filtersVisibility":35,"./extensions/filtersVisibility/filtersVisibility.js":35,"./extensions/sort/adapterSortabletable":36,"./extensions/sort/adapterSortabletable.js":36,"./extensions/sort/sort":37,"./extensions/sort/sort.js":37,"./feature":10,"./feature.js":10,"./helpers":7,"./helpers.js":7,"./modules/alternateRows":24,"./modules/alternateRows.js":24,"./modules/checkList":18,"./modules/checkList.js":18,"./modules/clearButton":22,"./modules/clearButton.js":22,"./modules/dropdown":15,"./modules/dropdown.js":15,"./modules/gridLayout":9,"./modules/gridLayout.js":9,"./modules/hash":27,"./modules/hash.js":27,"./modules/help":23,"./modules/help.js":23,"./modules/highlightKeywords":13,"./modules/highlightKeywords.js":13,"./modules/loader":12,"./modules/loader.js":12,"./modules/noResults":25,"./modules/noResults.js":25,"./modules/paging":21,"./modules/paging.js":21,"./modules/popupFilter":14,"./modules/popupFilter.js":14,"./modules/rowsCounter":19,"./modules/rowsCounter.js":19,"./modules/state":26,"./modules/state.js":26,"./modules/statusBar":20,"./modules/statusBar.js":20,"./modules/storage":28,"./modules/storage.js":28,"./root":2,"./root.js":2,"./sort":17,"./sort.js":17,"./string":5,"./string.js":5,"./types":4,"./types.js":4};r.keys=function(){return Object.keys(i)},r.resolve=o,e.exports=r,r.id=30},31:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(10),l=n(3),a=n(11),d=n(2),c='Failed to instantiate EditTable object.\n \n"ezEditTable" dependency not found.',u=function(e){function t(n,i){r(this,t);var s=o(this,e.call(this,n,i.name));return s.initialized=!1,s.desc=i.description||"ezEditTable adapter",s.filename=i.filename||"ezEditTable.js",s.vendorPath=i.vendor_path,s.loadStylesheet=Boolean(i.load_stylesheet),s.stylesheet=i.stylesheet||s.vendorPath+"ezEditTable.css",s.stylesheetName=i.stylesheet_name||"ezEditTableCss",i.scroll_into_view=i.scroll_into_view===!1?!1:n.gridLayout,s._ezEditTable=null,s.cfg=i,s.enable(),s}return i(t,e),t.prototype.init=function(){var e=this;if(!this.initialized){var t=this.tf;if(d.root.EditTable)this._setAdvancedGrid();else{var n=this.vendorPath+this.filename;t["import"](this.filename,n,function(){e._setAdvancedGrid()})}this.loadStylesheet&&!t.isImported(this.stylesheet,"link")&&t["import"](this.stylesheetName,this.stylesheet,null,"link"),this.emitter.on(["filter-focus","filter-blur"],function(){return e._toggleForInputFilter()}),this.initialized=!0}},t.prototype._setAdvancedGrid=function(){var e,t=this.tf,n=this.cfg,r=(0,l.tag)(t.tbl,"thead");e=r.length>0&&!n.startRow?void 0:n.startRow||t.refRow,n.base_path=n.base_path||t.basePath+"ezEditTable/";var o=n.editable,i=n.selection;i&&(n.default_selection=n.default_selection||"row"),n.active_cell_css=n.active_cell_css||"ezETSelectedCell";var s=0,a=0;if(i){var d=function(e,n,r){var o=e.Selection,i=function(r){if("row"===e.defaultSelection)o.SelectRowByIndex(r);else{e.ClearSelections();var i=n.cellIndex,s=t.tbl.rows[r];"both"===e.defaultSelection&&o.SelectRowByIndex(r),s&&o.SelectCell(s.cells[i])}if(t.validRowsIndex.length!==t.getRowsNb()){var l=t.tbl.rows[r];l&&l.scrollIntoView(!1),h&&(h.cellIndex===t.getCellsNb()-1&&t.gridLayout?t.tblCont.scrollLeft=1e8:0===h.cellIndex&&t.gridLayout?t.tblCont.scrollLeft=0:h.scrollIntoView(!1))}};if(t.validRowsIndex){var l,d=t.validRowsIndex,c=d.length,u="row"!==e.defaultSelection?n.parentNode:n,h="TD"===n.nodeName?n:null,p=void 0!==r?e.Event.GetKey(r):0,f=-1!==d.indexOf(u.rowIndex),b=t.feature("paging"),m=34===p||33===p?b&&b.pagingLength||e.nbRowsPerPage:1;if(f)34!==p&&33!==p?(s=d.indexOf(u.rowIndex),a=u.rowIndex):(l=34===p?c-1>=s+m?d[s+m]:[c-1]:s-m<=d[0]?d[0]:d[s-m],a=l,s=d.indexOf(l),i(l));else{if(u.rowIndex>a)if(u.rowIndex>=d[c-1])l=d[c-1];else{var y=s+m;l=y>c-1?d[c-1]:d[y]}else if(u.rowIndex<=d[0])l=d[0];else{var g=d[s-m];l=g?g:d[0]}a=u.rowIndex,i(l)}}},u=function(e,n){var r="row"!==e.defaultSelection?n.parentNode:n;if(t.paging&&t.feature("paging").nbPages>1){var o=t.feature("paging");e.nbRowsPerPage=o.pagingLength;var i=t.validRowsIndex,s=i.length,l=parseInt(o.startPagingRow,10)+parseInt(o.pagingLength,10),a=r.rowIndex;a===i[s-1]&&o.currentPageNb!==o.nbPages?o.setPage("last"):a===i[0]&&1!==o.currentPageNb?o.setPage("first"):a>i[l-1]&&ai[0]&&o.setPage("previous")}};if(t.paging&&(t.feature("paging").onAfterChangePage=function(e){var t=e.tf.extension("advancedGrid"),n=t._ezEditTable,r=n.Selection,o=r.GetActiveRow();o&&o.scrollIntoView(!1);var i=r.GetActiveCell();i&&i.scrollIntoView(!1)}),"row"===n.default_selection){var h=n.on_before_selected_row;n.on_before_selected_row=function(){u(arguments[0],arguments[1],arguments[2]),h&&h.call(null,arguments[0],arguments[1],arguments[2])};var p=n.on_after_selected_row;n.on_after_selected_row=function(){d(arguments[0],arguments[1],arguments[2]),p&&p.call(null,arguments[0],arguments[1],arguments[2])}}else{var f=n.on_before_selected_cell;n.on_before_selected_cell=function(){u(arguments[0],arguments[1],arguments[2]),f&&f.call(null,arguments[0],arguments[1],arguments[2])};var b=n.on_after_selected_cell;n.on_after_selected_cell=function(){d(arguments[0],arguments[1],arguments[2]),b&&b.call(null,arguments[0],arguments[1],arguments[2])}}}if(o){var m=n.on_added_dom_row;if(n.on_added_dom_row=function(){t.nbFilterableRows++,t.paging?(t.nbFilterableRows++,t.paging=!1,t.feature("paging").destroy(),t.feature("paging").reset()):t.emitter.emit("rows-changed",t,this),t.alternateRows&&t.feature("alternateRows").init(),m&&m.call(null,arguments[0],arguments[1],arguments[2])},n.actions&&n.actions["delete"]){var y=n.actions["delete"].on_after_submit;n.actions["delete"].on_after_submit=function(){t.nbFilterableRows--,t.paging?(t.nbFilterableRows--,t.paging=!1,t.feature("paging").destroy(),t.feature("paging").reset(!1)):t.emitter.emit("rows-changed",t,this),t.alternateRows&&t.feature("alternateRows").init(),y&&y.call(null,arguments[0],arguments[1])}}}try{this._ezEditTable=new EditTable(t.id,n,e),this._ezEditTable.Init()}catch(g){throw new Error(c)}this.initialized=!0},t.prototype.reset=function(){var e=this._ezEditTable;e&&(this.cfg.selection&&e.Selection.Set(),this.cfg.editable&&e.Editable.Set())},t.prototype.toggle=function(){var e=this._ezEditTable;e.editable?e.Editable.Remove():e.Editable.Set(),e.selection?e.Selection.Remove():e.Selection.Set()},t.prototype._toggleForInputFilter=function(){var e=this.tf;if(e.getActiveFilterId()){var t=e.getColumnIndexFromFilterId(e.getActiveFilterId()),n=e.getFilterType(t);n===a.INPUT&&this.toggle()}},t.prototype.destroy=function(){var e=this;if(this.initialized){var t=this._ezEditTable;t&&(this.cfg.selection&&(t.Selection.ClearSelections(),t.Selection.Remove()),this.cfg.editable&&t.Editable.Remove()),this.emitter.off(["filter-focus","filter-blur"],function(){return e._toggleForInputFilter()}),this.initialized=!1}},t}(s.Feature);t["default"]=u},32:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(31),i=r(o);t["default"]=i["default"]},33:function(module,exports,__webpack_require__){"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(exports,"__esModule",{value:!0});var _feature=__webpack_require__(10),_dom=__webpack_require__(3),_types=__webpack_require__(4),ColOps=function(_Feature){function ColOps(e,t){_classCallCheck(this,ColOps);var n=_possibleConstructorReturn(this,_Feature.call(this,e,t.name));return n.onBeforeOperation=(0,_types.isFn)(t.on_before_operation)?t.on_before_operation:null,n.onAfterOperation=(0,_types.isFn)(t.on_after_operation)?t.on_after_operation:null,n.opts=t,n.enable(),n}return _inherits(ColOps,_Feature),ColOps.prototype.init=function(){var e=this;this.initialized||(this.tf.emitter.on(["after-filtering"],function(){return e.calc()}),this.calc(),this.initialized=!0)},ColOps.prototype.calc=function calc(){var tf=this.tf;if(tf.isInitialized()){this.onBeforeOperation&&this.onBeforeOperation.call(null,tf);var opts=this.opts,labelId=opts.id,colIndex=opts.col,operation=opts.operation,outputType=opts.write_method,totRowIndex=opts.tot_row_index,excludeRow=opts.exclude_row,decimalPrecision=(0,_types.isUndef)(opts.decimal_precision)?2:opts.decimal_precision,ucolIndex=[],ucolMax=0;ucolIndex[ucolMax]=colIndex[0];for(var ii=1;ii=jj;jj++)ucolIndex[jj]===colIndex[ii]&&(saved=1);0===saved&&(ucolMax++,ucolIndex[ucolMax]=colIndex[ii])}if((0,_types.isArray)(labelId)&&(0,_types.isArray)(colIndex)&&(0,_types.isArray)(operation))for(var rows=tf.tbl.rows,colvalues=[],ucol=0;ucolMax>=ucol;ucol++){colvalues.push(tf.getColValues(ucolIndex[ucol],!1,!0,excludeRow));for(var result,nbvalues=0,temp,meanValue=0,sumValue=0,minValue=null,maxValue=null,q1Value=null,medValue=null,q3Value=null,meanFlag=0,sumFlag=0,minFlag=0,maxFlag=0,q1Flag=0,medFlag=0,q3Flag=0,theList=[],opsThisCol=[],decThisCol=[],labThisCol=[],oTypeThisCol=[],mThisCol=-1,k=0;kmaxValue?parseFloat(cvalue):maxValue))}if(1===meanFlag&&(meanValue=sumValue/nbvalues),1===medFlag){var aux=0;nbvalues%2===1?(aux=Math.floor(nbvalues/2),medValue=theList[aux]):medValue=(theList[nbvalues/2]+theList[nbvalues/2-1])/2}var posa;if(1===q1Flag&&(posa=0,posa=Math.floor(nbvalues/4),q1Value=4*posa===nbvalues?(theList[posa-1]+theList[posa])/2:theList[posa]),1===q3Flag){posa=0;var posb=0;posa=Math.floor(nbvalues/4),4*posa===nbvalues?(posb=3*posa,q3Value=(theList[posb]+theList[posb-1])/2):q3Value=theList[nbvalues-posa-1]}for(var i=0;mThisCol>=i;i++){switch(opsThisCol[i]){case"mean":result=meanValue;break;case"sum":result=sumValue;break;case"min":result=minValue;break;case"max":result=maxValue;break;case"median":result=medValue;break;case"q1":result=q1Value;break;case"q3":result=q3Value}var precision=isNaN(decThisCol[i])?2:decThisCol[i];if(oTypeThisCol&&result){if(result=result.toFixed(precision),(0,_dom.elm)(labThisCol[i]))switch(oTypeThisCol.toLowerCase()){case"innerhtml":isNaN(result)||!isFinite(result)||0===nbvalues?(0,_dom.elm)(labThisCol[i]).innerHTML=".":(0,_dom.elm)(labThisCol[i]).innerHTML=result;break;case"setvalue":(0,_dom.elm)(labThisCol[i]).value=result;break;case"createtextnode":var oldnode=(0,_dom.elm)(labThisCol[i]).firstChild,txtnode=(0,_dom.createText)(result);(0,_dom.elm)(labThisCol[i]).replaceChild(txtnode,oldnode)}}else try{isNaN(result)||!isFinite(result)||0===nbvalues?(0,_dom.elm)(labThisCol[i]).innerHTML=".":(0,_dom.elm)(labThisCol[i]).innerHTML=result.toFixed(precision)}catch(e){}}var totRow=totRowIndex&&totRowIndex[ucol]?rows[totRowIndex[ucol]]:null;totRow&&(totRow.style.display="")}this.onAfterOperation&&this.onAfterOperation.call(null,tf)}},ColOps.prototype.destroy=function(){var e=this;this.initialized&&(this.tf.emitter.off(["after-filtering"],function(){return e.calc()}),this.initialized=!1)},ColOps}(_feature.Feature);exports["default"]=ColOps},34:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(10),l=n(3),a=n(4),d=n(1),c=function(e){function t(n,i){r(this,t);var s=o(this,e.call(this,n,i.name)),d=n.config();return s.initialized=!1,s.name=i.name,s.desc=i.description||"Columns visibility manager",s.spanEl=null,s.btnEl=null,s.contEl=null,s.tickToHide=i.tick_to_hide!==!1,s.manager=i.manager!==!1,s.headersTbl=i.headers_table||!1,s.headersIndex=i.headers_index||1,s.contElTgtId=i.container_target_id||null,s.headersText=i.headers_text||null,s.btnTgtId=i.btn_target_id||null,s.btnText=i.btn_text||"Columns▼",s.btnHtml=i.btn_html||null,s.btnCssClass=i.btn_css_class||"colVis",s.btnCloseText=i.btn_close_text||"Close",s.btnCloseHtml=i.btn_close_html||null,s.btnCloseCssClass=i.btn_close_css_class||s.btnCssClass,s.stylesheet=i.stylesheet||"colsVisibility.css",s.prfx="colVis_",s.spanCssClass=i.span_css_class||"colVisSpan",s.prfxCont=s.prfx+"Cont_",s.contCssClass=i.cont_css_class||"colVisCont",s.listCssClass=d.list_css_class||"cols_checklist",s.listItemCssClass=d.checklist_item_css_class||"cols_checklist_item",s.listSlcItemCssClass=d.checklist_selected_item_css_class||"cols_checklist_slc_item",s.text=i.text||(s.tickToHide?"Hide: ":"Show: "),s.atStart=i.at_start||null,s.enableHover=Boolean(i.enable_hover),s.enableTickAll=Boolean(i.enable_tick_all),s.tickAllText=i.tick_all_text||"Select all:",s.hiddenCols=[],s.tblHasColTag=(0,l.tag)(n.tbl,"col").length>0,s.onLoaded=(0,a.isFn)(i.on_loaded)?i.on_loaded:null,s.onBeforeOpen=(0,a.isFn)(i.on_before_open)?i.on_before_open:null,s.onAfterOpen=(0,a.isFn)(i.on_after_open)?i.on_after_open:null,s.onBeforeClose=(0,a.isFn)(i.on_before_close)?i.on_before_close:null,s.onAfterClose=(0,a.isFn)(i.on_after_close)?i.on_after_close:null,s.onBeforeColHidden=(0,a.isFn)(i.on_before_col_hidden)?i.on_before_col_hidden:null,s.onAfterColHidden=(0,a.isFn)(i.on_after_col_hidden)?i.on_after_col_hidden:null,s.onBeforeColDisplayed=(0,a.isFn)(i.on_before_col_displayed)?i.on_before_col_displayed:null,s.onAfterColDisplayed=(0,a.isFn)(i.on_after_col_displayed)?i.on_after_col_displayed:null,n.gridLayout&&(s.headersTbl=n.feature("gridLayout").headTbl,s.headersIndex=0,s.onAfterColDisplayed=function(){},s.onAfterColHidden=function(){}),n["import"](i.name+"Style",n.stylePath+s.stylesheet,null,"link"),s.enable(),s}return i(t,e),t.prototype.toggle=function(){var e=this.contEl.style.display,t=this.onBeforeOpen,n=this.onBeforeClose,r=this.onAfterOpen,o=this.onAfterClose;t&&"inline"!==e&&t.call(null,this),n&&"inline"===e&&n.call(null,this),this.contEl.style.display="inline"===e?"none":"inline",r&&"inline"!==e&&r.call(null,this),o&&"inline"===e&&o.call(null,this)},t.prototype.checkItem=function(e){var t=e.parentNode;if(t&&e){var n=e.firstChild.checked,r=e.firstChild.getAttribute("id").split("_")[1];r=parseInt(r,10),n?(0,l.addClass)(t,this.listSlcItemCssClass):(0,l.removeClass)(t,this.listSlcItemCssClass);var o=!1;(this.tickToHide&&n||!this.tickToHide&&!n)&&(o=!0),this.setHidden(r,o)}},t.prototype.init=function(){var e=this;!this.initialized&&this.manager&&(this.emitter.on(["hide-column"],function(t,n){return e.hideCol(n)}),this.buildBtn(),this.buildManager(),this.initialized=!0,this.emitter.emit("columns-visibility-initialized",this.tf,this),this._hideAtStart())},t.prototype.buildBtn=function(){var e=this;if(!this.btnEl){var t=this.tf,n=(0,l.createElm)("span",["id",this.prfx+t.id]);n.className=this.spanCssClass,this.btnTgtId||t.setToolbar();var r=this.btnTgtId?(0,l.elm)(this.btnTgtId):t.rDiv;if(this.btnTgtId)r.appendChild(n);else{var o=r.firstChild;o.parentNode.insertBefore(n,o)}if(this.btnHtml){n.innerHTML=this.btnHtml;var i=n.firstChild;this.enableHover?(0,d.addEvt)(i,"mouseover",function(t){return e.toggle(t)}):(0,d.addEvt)(i,"click",function(t){return e.toggle(t)})}else{var s=(0,l.createElm)("a",["href","javascript:;"]);s.className=this.btnCssClass,s.title=this.desc,s.innerHTML=this.btnText,n.appendChild(s),this.enableHover?(0,d.addEvt)(s,"mouseover",function(t){return e.toggle(t)}):(0,d.addEvt)(s,"click",function(t){return e.toggle(t)})}this.spanEl=n,this.btnEl=this.spanEl.firstChild,this.onLoaded&&this.onLoaded.call(null,this)}},t.prototype.buildManager=function(){var e=this,t=this.tf,n=this.contElTgtId?(0,l.elm)(this.contElTgtId):(0,l.createElm)("div",["id",this.prfxCont+t.id]);n.className=this.contCssClass;var r=(0,l.createElm)("p");r.innerHTML=this.text,n.appendChild(r);var o=(0,l.createElm)("ul",["id","ul"+this.name+"_"+t.id]);o.className=this.listCssClass;var i=this.headersTbl?this.headersTbl:t.tbl,s=this.headersTbl?this.headersIndex:t.getHeadersRowIndex(),a=i.rows[s];this.enableTickAll&&!function(){var n=(0,l.createCheckItem)("col__"+t.id,e.tickAllText,e.tickAllText);(0,l.addClass)(n,e.listItemCssClass),o.appendChild(n),n.check.checked=!e.tickToHide,(0,d.addEvt)(n.check,"click",function(){for(var e=0;e',s.icnCollapseHtml='Collapse filters',s.defaultText="Toggle filters",s.targetId=i.target_id||null,s.enableIcon=i.enable_icon!==!1,s.btnText=i.btn_text||"",s.collapseBtnHtml=s.enableIcon?s.icnCollapseHtml+s.btnText:s.btnText||s.defaultText,s.expandBtnHtml=s.enableIcon?s.icnExpandHtml+s.btnText:s.btnText||s.defaultText,s.btnHtml=i.btn_html||null,s.btnCssClass=i.btn_css_class||"btnExpClpFlt",s.contCssClass=i.cont_css_class||"expClpFlt",s.filtersRowIndex=(0,a.isUndef)(i.filters_row_index)?n.getFiltersRowIndex():i.filters_row_index,s.visibleAtStart=(0,a.isUndef)(i.visible_at_start)?!0:Boolean(i.visible_at_start),s.prfx="fltsVis_",s.onBeforeShow=(0,a.isFn)(i.on_before_show)?i.on_before_show:null,s.onAfterShow=(0,a.isFn)(i.on_after_show)?i.on_after_show:null,s.onBeforeHide=(0,a.isFn)(i.on_before_hide)?i.on_before_hide:null,s.onAfterHide=(0,a.isFn)(i.on_after_hide)?i.on_after_hide:null,n["import"](i.name+"Style",n.stylePath+s.stylesheet,null,"link"),s.enable(),s}return i(t,e),t.prototype.init=function(){var e=this;this.initialized||(this.buildUI(),this.initialized=!0,this.emitter.on(["show-filters"],function(t,n){return e.show(n)}),this.emitter.emit("filters-visibility-initialized",this.tf,this))},t.prototype.buildUI=function(){var e=this,t=this.tf,n=(0,l.createElm)("span",["id",this.prfx+t.id]);n.className=this.contCssClass,this.targetId||t.setToolbar();var r=this.targetId?(0,l.elm)(this.targetId):t.rDiv;if(this.targetId)r.appendChild(n);else{var o=r.firstChild;o.parentNode.insertBefore(n,o)}var i=void 0;this.btnHtml?(n.innerHTML=this.btnHtml,i=n.firstChild):(i=(0,l.createElm)("a",["href","javascript:void(0);"]),i.className=this.btnCssClass,i.title=this.btnText||this.defaultText,i.innerHTML=this.collapseBtnHtml,n.appendChild(i)),(0,d.addEvt)(i,"click",function(){return e.toggle()}),this.contEl=n,this.btnEl=i,this.visibleAtStart||this.toggle()},t.prototype.toggle=function(){var e=this.tf,t=e.gridLayout?e.feature("gridLayout").headTbl:e.tbl,n=t.rows[this.filtersRowIndex],r=""===n.style.display;this.show(!r)},t.prototype.show=function(){var e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0],t=this.tf,n=t.gridLayout?t.feature("gridLayout").headTbl:t.tbl,r=n.rows[this.filtersRowIndex];this.onBeforeShow&&e&&this.onBeforeShow.call(this,this),this.onBeforeHide&&!e&&this.onBeforeHide.call(null,this),r.style.display=e?"":"none",this.enableIcon&&!this.btnHtml&&(this.btnEl.innerHTML=e?this.collapseBtnHtml:this.expandBtnHtml),this.onAfterShow&&e&&this.onAfterShow.call(null,this),this.onAfterHide&&!e&&this.onAfterHide.call(null,this),this.emitter.emit("filters-toggled",t,this,e)},t.prototype.destroy=function(){var e=this;this.initialized&&(this.emitter.off(["show-filters"],function(t,n){return e.show(n)}),this.btnEl.innerHTML="",(0,l.removeElm)(this.btnEl),this.btnEl=null,this.contEl.innerHTML="",(0,l.removeElm)(this.contEl),this.contEl=null,this.initialized=!1)},t}(s.Feature);t["default"]=c},36:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return(0,v.removeNbFormat)(e,"us")}function l(e){return(0,v.removeNbFormat)(e,"eu")}function a(e,t){return(0,T.formatDate)(e,t)}function d(e){return a(e,"DMY")}function c(e){return a(e,"MDY")}function u(e){return a(e,"YMD")}function h(e){return a(e,"DDMMMYYYY")}function p(e){var t=e.split(".");for(var n in t){for(var r=t[n];3>r.length;)r="0"+r;t[n]=r}return t.join(".")}function f(e,t){var n=p(e.value.toLowerCase()),r=p(t.value.toLowerCase());return n===r?0:r>n?-1:1}Object.defineProperty(t,"__esModule",{value:!0});var b=n(10),m=n(4),y=n(3),g=n(1),T=n(6),v=n(7),_=n(11),C=function(e){function t(n,i){r(this,t);var s=o(this,e.call(this,n,i.name));return s.name=i.name,s.desc=i.description||"Sortable table",s.sorted=!1,s.sortTypes=(0,m.isArray)(i.types)?i.types:[],s.sortColAtStart=(0,m.isArray)(i.sort_col_at_start)?i.sort_col_at_start:null,s.asyncSort=Boolean(i.async_sort),s.triggerIds=(0,m.isArray)(i.trigger_ids)?i.trigger_ids:[],s.imgPath=i.images_path||n.themesPath,s.imgBlank=i.image_blank||"blank.png",s.imgClassName=i.image_class_name||"sort-arrow",s.imgAscClassName=i.image_asc_class_name||"ascending",s.imgDescClassName=i.image_desc_class_name||"descending",s.customKey=i.custom_key||"data-tf-sortKey",s.onSortLoaded=(0,m.isFn)(i.on_sort_loaded)?i.on_sort_loaded:null,s.onBeforeSort=(0,m.isFn)(i.on_before_sort)?i.on_before_sort:null,s.onAfterSort=(0,m.isFn)(i.on_after_sort)?i.on_after_sort:null,s.enable(),s}return i(t,e),t.prototype.init=function(){var e=this;if(!this.initialized){var t=this.tf,n=this;if((0,m.isUndef)(SortableTable))throw new Error("SortableTable class not found.");this.overrideSortableTable(),this.setSortTypes();var r=n.sortColAtStart;r&&this.stt.sort(r[0],r[1]),this.onSortLoaded&&this.onSortLoaded.call(null,t,this),this.stt.onbeforesort=function(){n.onBeforeSort&&n.onBeforeSort.call(null,t,n.stt.sortColumn),t.paging&&t.feature("paging").disable()},this.stt.onsort=function(){if(n.sorted=!0,t.paging){var e=t.feature("paging");t.getValidRows(!0),e.enable(),e.setPage(e.getPage())}n.onAfterSort&&n.onAfterSort.call(null,t,n.stt.sortColumn,n.stt.descending),n.emitter.emit("column-sorted",t,n.stt.sortColumn,n.stt.descending)},this.emitter.on(["sort"],function(t,n,r){return e.sortByColumnIndex(n,r)}),this.initialized=!0,this.emitter.emit("sort-initialized",t,this)}},t.prototype.sortByColumnIndex=function(e,t){this.stt.sort(e,t)},t.prototype.overrideSortableTable=function(){var e=this,t=this.tf;SortableTable.prototype.headerOnclick=function(t){if(e.initialized){for(var n=t.target||t.srcElement;n.tagName!==_.CELL_TAG&&n.tagName!==_.HEADER_TAG;)n=n.parentNode;this.sort(SortableTable.msie?SortableTable.getCellIndex(n):n.cellIndex)}},SortableTable.getCellIndex=function(e){var t=e.parentNode.cells,n=t.length,r=void 0;for(r=0;t[r]!==e&&n>r;r++);return r},SortableTable.prototype.initHeader=function(n){var r=this;if(!r.tHead){if(!t.gridLayout)return;r.tHead=t.feature("gridLayout").headTbl.tHead}r.headersRow=t.headersRow;var o=r.tHead.rows[r.headersRow].cells;r.sortTypes=n||[];for(var i=o.length,s=void 0,l=void 0,a=0;i>a;a++)l=o[a],null!==r.sortTypes[a]&&"None"!==r.sortTypes[a]?(l.style.cursor="pointer",s=(0,y.createElm)("img",["src",e.imgPath+e.imgBlank]),l.appendChild(s),null!==r.sortTypes[a]&&l.setAttribute("_sortType",r.sortTypes[a]),(0,g.addEvt)(l,"click",r._headerOnclick)):(l.setAttribute("_sortType",n[a]),l._sortType="None");r.updateHeaderArrows()},SortableTable.prototype.updateHeaderArrows=function(){var t=this,n=void 0,r=void 0,o=void 0;if(e.asyncSort&&e.triggerIds.length>0){var i=e.triggerIds;n=[],r=i.length;for(var s=0;sl;l++){var a=n[l].getAttribute("_sortType");null!==a&&"None"!==a&&(o=n[l].lastChild||n[l],"img"!==o.nodeName.toLowerCase()&&(o=(0,y.createElm)("img",["src",e.imgPath+e.imgBlank]),n[l].appendChild(o)),l===t.sortColumn?o.className=e.imgClassName+" "+(this.descending?e.imgDescClassName:e.imgAscClassName):o.className=e.imgClassName)}},SortableTable.prototype.getRowValue=function(e,t,n){var r=this,o=r._sortTypeInfo[t];if(o&&o.getRowValue)return o.getRowValue(e,n);var i=e.cells[n],s=SortableTable.getInnerText(i);return r.getValueFromString(s,t)},SortableTable.getInnerText=function(t){return t?t.getAttribute(e.customKey)?t.getAttribute(e.customKey):(0, +y.getText)(t):void 0}},t.prototype.addSortType=function(){var e=arguments;SortableTable.prototype.addSortType(e[0],e[1],e[2],e[3])},t.prototype.setSortTypes=function(){for(var e=this,t=this.tf,n=this.sortTypes,r=[],o=0;o0&&!function(){for(var t=e.triggerIds,n=0;n 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/src/event.js b/src/event.js index bc5e9d24..34a16c63 100644 --- a/src/event.js +++ b/src/event.js @@ -4,96 +4,99 @@ import {root} from './root'; * DOM event utilities */ -export default { - /** - * Add event handler for specified event on passed element - * - * @param {DOMElement} obj Element - * @param {String} type Event type - * @param {Function} Handler - * @param {Boolean} capture Specifiy whether the event should be executed in - * the capturing or in the bubbling phase - */ - add(obj, type, func, capture) { - if (obj.addEventListener) { - obj.addEventListener(type, func, capture); - } - else if (obj.attachEvent) { - obj.attachEvent('on' + type, func); - } else { - obj['on' + type] = func; - } - }, - /** - * Remove event handler for specified event on passed element - * - * @param {DOMElement} obj Element - * @param {String} type Event type - * @param {Function} Handler - * @param {Boolean} capture Specifiy whether the event should be executed in - * the capturing or in the bubbling phase - */ - remove(obj, type, func, capture) { - if (obj.detachEvent) { - obj.detachEvent('on' + type, func); - } - else if (obj.removeEventListener) { - obj.removeEventListener(type, func, capture); - } else { - obj['on' + type] = null; - } - }, - /** - * Prevents further propagation of the current event in the bubbling phase - * - * @param {Event} evt Event on the DOM - */ - stop(evt) { - if (!evt) { - evt = root.event; - } - if (evt.stopPropagation) { - evt.stopPropagation(); - } else { - evt.cancelBubble = true; - } - }, - /** - * Cancels the event if it is cancelable, without stopping further - * propagation of the event. - * - * @param {Event} evt Event on the DOM - */ - cancel(evt) { - if (!evt) { - evt = root.event; - } - if (evt.preventDefault) { - evt.preventDefault(); - } else { - evt.returnValue = false; - } - }, - /** - * Reference to the object that dispatched the event - * - * @param {Event} evt Event on the DOM - * @returns {DOMElement} - */ - target(evt) { - if (!evt) { - evt = root.event; - } - return evt.target || evt.srcElement; - }, - /** - * Returns the Unicode value of pressed key - * - * @param {Event} evt Event on the DOM - * @returns {Number} - */ - keyCode(evt) { - return evt.charCode ? evt.charCode : - (evt.keyCode ? evt.keyCode : (evt.which ? evt.which : 0)); +/** + * Add event handler for specified event on passed element + * + * @param {DOMElement} obj Element + * @param {String} type Event type + * @param {Function} Handler + * @param {Boolean} capture Specifiy whether the event should be executed in + * the capturing or in the bubbling phase + */ +export const addEvt = (obj, type, func, capture) => { + if (obj.addEventListener) { + obj.addEventListener(type, func, capture); + } + else if (obj.attachEvent) { + obj.attachEvent('on' + type, func); + } else { + obj['on' + type] = func; } }; + +/** + * Remove event handler for specified event on passed element + * + * @param {DOMElement} obj Element + * @param {String} type Event type + * @param {Function} Handler + * @param {Boolean} capture Specifiy whether the event should be executed in + * the capturing or in the bubbling phase + */ +export const removeEvt = (obj, type, func, capture) =>{ + if (obj.detachEvent) { + obj.detachEvent('on' + type, func); + } + else if (obj.removeEventListener) { + obj.removeEventListener(type, func, capture); + } else { + obj['on' + type] = null; + } +}; + +/** + * Prevents further propagation of the current event in the bubbling phase + * + * @param {Event} evt Event on the DOM + */ +export const stopEvt = evt =>{ + if (!evt) { + evt = root.event; + } + if (evt.stopPropagation) { + evt.stopPropagation(); + } else { + evt.cancelBubble = true; + } +}; + +/** + * Cancels the event if it is cancelable, without stopping further + * propagation of the event. + * + * @param {Event} evt Event on the DOM + */ +export const cancelEvt = evt => { + if (!evt) { + evt = root.event; + } + if (evt.preventDefault) { + evt.preventDefault(); + } else { + evt.returnValue = false; + } +}; + +/** + * Reference to the object that dispatched the event + * + * @param {Event} evt Event on the DOM + * @returns {DOMElement} + */ +export const targetEvt = evt => { + if (!evt) { + evt = root.event; + } + return evt.target || evt.srcElement; +}; + +/** + * Returns the Unicode value of pressed key + * + * @param {Event} evt Event on the DOM + * @returns {Number} + */ +export const keyCode = evt => { + return evt.charCode ? evt.charCode : + (evt.keyCode ? evt.keyCode : (evt.which ? evt.which : 0)); +}; diff --git a/src/extensions/colsVisibility/colsVisibility.js b/src/extensions/colsVisibility/colsVisibility.js index 6b1d8177..40cc1e51 100644 --- a/src/extensions/colsVisibility/colsVisibility.js +++ b/src/extensions/colsVisibility/colsVisibility.js @@ -4,7 +4,7 @@ import { getText, tag } from '../../dom'; import {isFn} from '../../types'; -import Event from '../../event'; +import {addEvt, targetEvt} from '../../event'; export default class ColsVisibility extends Feature { @@ -221,17 +221,17 @@ export default class ColsVisibility extends Feature { btn.innerHTML = this.btnText; span.appendChild(btn); if (!this.enableHover) { - Event.add(btn, 'click', (evt) => this.toggle(evt)); + addEvt(btn, 'click', (evt) => this.toggle(evt)); } else { - Event.add(btn, 'mouseover', (evt) => this.toggle(evt)); + addEvt(btn, 'mouseover', (evt) => this.toggle(evt)); } } else { //Custom html span.innerHTML = this.btnHtml; let colVisEl = span.firstChild; if (!this.enableHover) { - Event.add(colVisEl, 'click', (evt) => this.toggle(evt)); + addEvt(colVisEl, 'click', (evt) => this.toggle(evt)); } else { - Event.add(colVisEl, 'mouseover', (evt) => this.toggle(evt)); + addEvt(colVisEl, 'mouseover', (evt) => this.toggle(evt)); } } @@ -276,7 +276,7 @@ export default class ColsVisibility extends Feature { ul.appendChild(li); li.check.checked = !this.tickToHide; - Event.add(li.check, 'click', () => { + addEvt(li.check, 'click', () => { for (let h = 0; h < headerRow.cells.length; h++) { let itm = elm('col_' + h + '_' + tf.id); if (itm && li.check.checked !== itm.checked) { @@ -302,8 +302,8 @@ export default class ColsVisibility extends Feature { liElm.check.checked = true; } - Event.add(liElm.check, 'click', (evt) => { - let elm = Event.target(evt); + addEvt(liElm.check, 'click', (evt) => { + let elm = targetEvt(evt); let lbl = elm.parentNode; this.checkItem(lbl); }); @@ -317,12 +317,12 @@ export default class ColsVisibility extends Feature { btn = createElm('a', ['href', 'javascript:;']); btn.className = this.btnCloseCssClass; btn.innerHTML = this.btnCloseText; - Event.add(btn, 'click', (evt) => this.toggle(evt)); + addEvt(btn, 'click', (evt) => this.toggle(evt)); p.appendChild(btn); } else { p.innerHTML = this.btnCloseHtml; btn = p.firstChild; - Event.add(btn, 'click', (evt) => this.toggle(evt)); + addEvt(btn, 'click', (evt) => this.toggle(evt)); } container.appendChild(ul); diff --git a/src/extensions/filtersVisibility/filtersVisibility.js b/src/extensions/filtersVisibility/filtersVisibility.js index 6c7afaa1..df38a04f 100644 --- a/src/extensions/filtersVisibility/filtersVisibility.js +++ b/src/extensions/filtersVisibility/filtersVisibility.js @@ -1,7 +1,7 @@ import {Feature} from '../../feature'; import {createElm, removeElm, elm} from '../../dom'; import {isFn, isUndef} from '../../types'; -import Event from '../../event'; +import {addEvt} from '../../event'; export default class FiltersVisibility extends Feature { @@ -124,7 +124,7 @@ export default class FiltersVisibility extends Feature { btn = span.firstChild; } - Event.add(btn, 'click', () => this.toggle()); + addEvt(btn, 'click', () => this.toggle()); this.contEl = span; this.btnEl = btn; diff --git a/src/extensions/sort/adapterSortabletable.js b/src/extensions/sort/adapterSortabletable.js index 36d55af8..d3c5cd1f 100644 --- a/src/extensions/sort/adapterSortabletable.js +++ b/src/extensions/sort/adapterSortabletable.js @@ -1,7 +1,7 @@ import {Feature} from '../../feature'; import {isArray, isFn, isUndef} from '../../types'; import {createElm, elm, getText, tag} from '../../dom'; -import Event from '../../event'; +import {addEvt} from '../../event'; import {formatDate} from '../../date'; import {removeNbFormat} from '../../helpers'; import {NONE, CELL_TAG, HEADER_TAG} from '../../const'; @@ -192,7 +192,7 @@ export default class AdapterSortableTable extends Feature { if (stt.sortTypes[i] !== null) { c.setAttribute('_sortType', stt.sortTypes[i]); } - Event.add(c, 'click', stt._headerOnclick); + addEvt(c, 'click', stt._headerOnclick); } else { c.setAttribute('_sortType', oSortTypes[i]); c._sortType = 'None'; @@ -339,7 +339,7 @@ export default class AdapterSortableTable extends Feature { if (trigger) { trigger.style.cursor = 'pointer'; - Event.add(trigger, 'click', (evt) => { + addEvt(trigger, 'click', (evt) => { let elm = evt.target; if (!this.tf.sort) { return; diff --git a/src/modules/checkList.js b/src/modules/checkList.js index b830cc80..0540f0fb 100644 --- a/src/modules/checkList.js +++ b/src/modules/checkList.js @@ -6,7 +6,7 @@ import { import {has} from '../array'; import {matchCase, trim, rgxEsc} from '../string'; import {ignoreCase, numSortAsc, numSortDesc} from '../sort'; -import Event from '../event'; +import {addEvt, removeEvt, targetEvt} from '../event'; import {isEmpty} from '../types'; import {CHECKLIST, NONE} from '../const'; @@ -56,7 +56,7 @@ export class CheckList extends Feature { } onChange(evt) { - let elm = Event.target(evt); + let elm = targetEvt(evt); let tf = this.tf; this.emitter.emit('filter-focus', tf, elm); tf.filter(); @@ -68,12 +68,12 @@ export class CheckList extends Feature { } onCheckListClick(evt) { - let elm = Event.target(evt); + let elm = targetEvt(evt); if (this.tf.loadFltOnDemand && elm.getAttribute('filled') === '0') { let ct = elm.getAttribute('ct'); let div = this.checkListDiv[ct]; this.build(ct); - Event.remove(div, 'click', (evt) => this.onCheckListClick(evt)); + removeEvt(div, 'click', (evt) => this.onCheckListClick(evt)); } } @@ -107,7 +107,7 @@ export class CheckList extends Feature { if (!tf.loadFltOnDemand) { this.build(colIndex); } else { - Event.add(divCont, 'click', (evt) => this.onCheckListClick(evt)); + addEvt(divCont, 'click', (evt) => this.onCheckListClick(evt)); divCont.appendChild(createText(this.activateCheckListTxt)); } @@ -141,7 +141,7 @@ export class CheckList extends Feature { let ul = createElm('ul', ['id', tf.fltIds[colIndex]], ['colIndex', colIndex]); ul.className = this.checkListCssClass; - Event.add(ul, 'change', (evt) => this.onChange(evt)); + addEvt(ul, 'change', (evt) => this.onChange(evt)); let rows = tf.tbl.rows; let nbRows = tf.getRowsNb(true); @@ -295,7 +295,7 @@ export class CheckList extends Feature { li.check.disabled = true; li.disabled = true; } else { - Event.add(li.check, 'click', (evt) => this.optionClick(evt)); + addEvt(li.check, 'click', (evt) => this.optionClick(evt)); } ul.appendChild(li); @@ -319,7 +319,7 @@ export class CheckList extends Feature { li0.className = this.checkListItemCssClass; ul.appendChild(li0); - Event.add(li0.check, 'click', (evt) => this.optionClick(evt)); + addEvt(li0.check, 'click', (evt) => this.optionClick(evt)); if (!this.enableCheckListResetFilter) { li0.style.display = NONE; @@ -330,7 +330,7 @@ export class CheckList extends Feature { tf.emOperator, tf.emptyText); li1.className = this.checkListItemCssClass; ul.appendChild(li1); - Event.add(li1.check, 'click', (evt) => this.optionClick(evt)); + addEvt(li1.check, 'click', (evt) => this.optionClick(evt)); chkCt++; } @@ -339,7 +339,7 @@ export class CheckList extends Feature { tf.nonEmptyText); li2.className = this.checkListItemCssClass; ul.appendChild(li2); - Event.add(li2.check, 'click', (evt) => this.optionClick(evt)); + addEvt(li2.check, 'click', (evt) => this.optionClick(evt)); chkCt++; } return chkCt; diff --git a/src/modules/clearButton.js b/src/modules/clearButton.js index 5e066410..a95e3318 100644 --- a/src/modules/clearButton.js +++ b/src/modules/clearButton.js @@ -1,6 +1,6 @@ import {Feature} from '../feature'; import {createElm, createText, elm, removeElm} from '../dom'; -import Event from '../event'; +import {addEvt} from '../event'; export class ClearButton extends Feature { @@ -62,11 +62,11 @@ export class ClearButton extends Feature { fltreset.className = tf.btnResetCssClass; fltreset.appendChild(createText(this.btnResetText)); resetspan.appendChild(fltreset); - Event.add(fltreset, 'click', () => { this.onClick(); }); + addEvt(fltreset, 'click', () => this.onClick()); } else { resetspan.innerHTML = this.btnResetHtml; let resetEl = resetspan.firstChild; - Event.add(resetEl, 'click', () => { this.onClick(); }); + addEvt(resetEl, 'click', () => this.onClick()); } this.btnResetEl = resetspan.firstChild; diff --git a/src/modules/dropdown.js b/src/modules/dropdown.js index 6f7ac22e..b97958dc 100644 --- a/src/modules/dropdown.js +++ b/src/modules/dropdown.js @@ -3,7 +3,7 @@ import {createElm, createOpt, elm} from '../dom'; import {has} from '../array'; import {matchCase} from '../string'; import {ignoreCase, numSortAsc, numSortDesc} from '../sort'; -import Event from '../event'; +import {addEvt, targetEvt} from '../event'; import {SELECT, MULTIPLE, NONE} from '../const'; const SORT_ERROR = 'Filter options for column {0} cannot be sorted in ' + @@ -39,7 +39,7 @@ export class Dropdown extends Feature { } onSlcFocus(e) { - let elm = Event.target(e); + let elm = targetEvt(e); let tf = this.tf; // select is populated when element has focus if (tf.loadFltOnDemand && elm.getAttribute('filled') === '0') { @@ -97,8 +97,8 @@ export class Dropdown extends Feature { slc.appendChild(opt0); } - Event.add(slc, 'change', () => this.onSlcChange()); - Event.add(slc, 'focus', (e) => this.onSlcFocus(e)); + addEvt(slc, 'change', () => this.onSlcChange()); + addEvt(slc, 'focus', (e) => this.onSlcFocus(e)); this.emitter.on( ['build-select-filter'], diff --git a/src/modules/gridLayout.js b/src/modules/gridLayout.js index f43875a3..b60a6aa3 100644 --- a/src/modules/gridLayout.js +++ b/src/modules/gridLayout.js @@ -1,7 +1,7 @@ import {Feature} from '../feature'; import {createElm, removeElm, elm, tag} from '../dom'; import {isFn, isNull, isUndef} from '../types'; -import Event from '../event'; +import {addEvt, targetEvt} from '../event'; import {contains} from '../string'; import {NONE} from '../const'; @@ -233,8 +233,8 @@ export class GridLayout extends Feature { // //scroll synchronisation - Event.add(this.tblCont, 'scroll', (evt) => { - let elm = Event.target(evt); + addEvt(this.tblCont, 'scroll', (evt) => { + let elm = targetEvt(evt); let scrollLeft = elm.scrollLeft; this.headTblCont.scrollLeft = scrollLeft; //New pointerX calc taking into account scrollLeft diff --git a/src/modules/hash.js b/src/modules/hash.js index ee7907e2..0bfb5ad7 100644 --- a/src/modules/hash.js +++ b/src/modules/hash.js @@ -1,4 +1,4 @@ -import Event from '../event'; +import {addEvt, removeEvt} from '../event'; import {root} from '../root'; const JSON = root.JSON; @@ -41,7 +41,7 @@ export class Hash { this.emitter.on(['state-changed'], (tf, state) => this.update(state)); this.emitter.on(['initialized'], () => this.sync()); - Event.add(root, 'hashchange', () => this.sync()); + addEvt(root, 'hashchange', () => this.sync()); } /** @@ -91,7 +91,7 @@ export class Hash { destroy() { this.emitter.off(['state-changed'], (tf, state) => this.update(state)); this.emitter.off(['initialized'], () => this.sync()); - Event.remove(root, 'hashchange', () => this.sync()); + removeEvt(root, 'hashchange', () => this.sync()); this.state = null; this.lastHash = null; diff --git a/src/modules/help.js b/src/modules/help.js index d041b5f7..fa20c3d1 100644 --- a/src/modules/help.js +++ b/src/modules/help.js @@ -1,6 +1,6 @@ import {Feature} from '../feature'; import {createElm, createText, elm, removeElm} from '../dom'; -import Event from '../event'; +import {addEvt} from '../event'; import {NONE} from '../const'; const WIKI_URL = 'https://github.com/koalyptus/TableFilter/wiki/' + @@ -93,18 +93,18 @@ export class Help extends Feature { helplink.className = this.btnCssClass; helplink.appendChild(createText(this.btnText)); helpspan.appendChild(helplink); - Event.add(helplink, 'click', () => this.toggle()); + addEvt(helplink, 'click', () => this.toggle()); } else { helpspan.innerHTML = this.btnHtml; var helpEl = helpspan.firstChild; - Event.add(helpEl, 'click', () => this.toggle()); + addEvt(helpEl, 'click', () => this.toggle()); divContainer.appendChild(helpdiv); } if (!this.instrHtml) { helpdiv.innerHTML = this.instrText; helpdiv.className = this.contCssClass; - Event.add(helpdiv, 'dblclick', () => this.toggle()); + addEvt(helpdiv, 'dblclick', () => this.toggle()); } else { if (this.contTgtId) { divContainer.appendChild(helpdiv); @@ -112,11 +112,11 @@ export class Help extends Feature { helpdiv.innerHTML = this.instrHtml; if (!this.contTgtId) { helpdiv.className = this.contCssClass; - Event.add(helpdiv, 'dblclick', () => this.toggle()); + addEvt(helpdiv, 'dblclick', () => this.toggle()); } } helpdiv.innerHTML += this.defaultHtml; - Event.add(helpdiv, 'click', () => this.toggle()); + addEvt(helpdiv, 'click', () => this.toggle()); this.cont = helpdiv; this.btn = helpspan; diff --git a/src/modules/paging.js b/src/modules/paging.js index d28e7c4c..ad4f3ec1 100644 --- a/src/modules/paging.js +++ b/src/modules/paging.js @@ -1,7 +1,7 @@ import {Feature} from '../feature'; import {createElm, createOpt, createText, elm, removeElm} from '../dom'; import {isArray, isFn, isNull} from '../types'; -import Event from '../event'; +import {addEvt, keyCode, removeEvt} from '../event'; import {INPUT, SELECT, NONE, ENTER_KEY} from '../const'; export class Paging extends Feature { @@ -156,7 +156,7 @@ export class Paging extends Feature { o.changePage(0); }, _detectKey(e) { - var key = Event.keyCode(e); + var key = keyCode(e); if (key === ENTER_KEY) { if (tf.sorted) { tf.filter(); @@ -207,7 +207,7 @@ export class Paging extends Feature { if (this.pageSelectorType === SELECT) { slcPages = createElm(SELECT, ['id', this.prfxSlcPages + tf.id]); slcPages.className = this.pgSlcCssClass; - Event.add(slcPages, 'change', evt.slcPagesChange); + addEvt(slcPages, 'change', evt.slcPagesChange); } // Paging input selector @@ -217,7 +217,7 @@ export class Paging extends Feature { ['value', this.currentPageNb] ); slcPages.className = this.pgInpCssClass; - Event.add(slcPages, 'keypress', evt._detectKey); + addEvt(slcPages, 'keypress', evt._detectKey); } // btns containers @@ -240,11 +240,11 @@ export class Paging extends Feature { ['title', 'Next'] ); btn_next.className = this.btnPageCssClass; - Event.add(btn_next, 'click', evt.next); + addEvt(btn_next, 'click', evt.next); btnNextSpan.appendChild(btn_next); } else { btnNextSpan.innerHTML = this.btnNextPageHtml; - Event.add(btnNextSpan, 'click', evt.next); + addEvt(btnNextSpan, 'click', evt.next); } // Previous button if (!this.btnPrevPageHtml) { @@ -255,11 +255,11 @@ export class Paging extends Feature { ['title', 'Previous'] ); btn_prev.className = this.btnPageCssClass; - Event.add(btn_prev, 'click', evt.prev); + addEvt(btn_prev, 'click', evt.prev); btnPrevSpan.appendChild(btn_prev); } else { btnPrevSpan.innerHTML = this.btnPrevPageHtml; - Event.add(btnPrevSpan, 'click', evt.prev); + addEvt(btnPrevSpan, 'click', evt.prev); } // Last button if (!this.btnLastPageHtml) { @@ -270,11 +270,11 @@ export class Paging extends Feature { ['title', 'Last'] ); btn_last.className = this.btnPageCssClass; - Event.add(btn_last, 'click', evt.last); + addEvt(btn_last, 'click', evt.last); btnLastSpan.appendChild(btn_last); } else { btnLastSpan.innerHTML = this.btnLastPageHtml; - Event.add(btnLastSpan, 'click', evt.last); + addEvt(btnLastSpan, 'click', evt.last); } // First button if (!this.btnFirstPageHtml) { @@ -285,11 +285,11 @@ export class Paging extends Feature { ['title', 'First'] ); btn_first.className = this.btnPageCssClass; - Event.add(btn_first, 'click', evt.first); + addEvt(btn_first, 'click', evt.first); btnFirstSpan.appendChild(btn_first); } else { btnFirstSpan.innerHTML = this.btnFirstPageHtml; - Event.add(btnFirstSpan, 'click', evt.first); + addEvt(btnFirstSpan, 'click', evt.first); } } @@ -529,7 +529,7 @@ export class Paging extends Feature { var currOpt = new Option(slcROpts[r], slcROpts[r], false, false); slcR.options[r] = currOpt; } - Event.add(slcR, 'change', evt.slcResultsChange); + addEvt(slcR, 'change', evt.slcResultsChange); this.resultsPerPageSlc = slcR; } @@ -699,31 +699,31 @@ export class Paging extends Feature { if (this.pagingSlc) { if (this.pageSelectorType === SELECT) { - Event.remove(this.pagingSlc, 'change', evt.slcPagesChange); + removeEvt(this.pagingSlc, 'change', evt.slcPagesChange); } else if (this.pageSelectorType === INPUT) { - Event.remove(this.pagingSlc, 'keypress', evt._detectKey); + removeEvt(this.pagingSlc, 'keypress', evt._detectKey); } removeElm(this.pagingSlc); } if (btnNextSpan) { - Event.remove(btnNextSpan, 'click', evt.next); + removeEvt(btnNextSpan, 'click', evt.next); removeElm(btnNextSpan); } if (btnPrevSpan) { - Event.remove(btnPrevSpan, 'click', evt.prev); + removeEvt(btnPrevSpan, 'click', evt.prev); removeElm(btnPrevSpan); } if (btnLastSpan) { - Event.remove(btnLastSpan, 'click', evt.last); + removeEvt(btnLastSpan, 'click', evt.last); removeElm(btnLastSpan); } if (btnFirstSpan) { - Event.remove(btnFirstSpan, 'click', evt.first); + removeEvt(btnFirstSpan, 'click', evt.first); removeElm(btnFirstSpan); } diff --git a/src/modules/popupFilter.js b/src/modules/popupFilter.js index 3e2fc65d..f7a3be64 100644 --- a/src/modules/popupFilter.js +++ b/src/modules/popupFilter.js @@ -1,7 +1,7 @@ import {Feature} from '../feature'; import {isFn} from '../types'; import {createElm, removeElm} from '../dom'; -import Event from '../event'; +import {addEvt, cancelEvt, stopEvt, targetEvt} from '../event'; import {INPUT, NONE} from '../const'; export class PopupFilter extends Feature { @@ -58,7 +58,7 @@ export class PopupFilter extends Feature { } onClick(evt) { - let elm = Event.target(evt).parentNode, + let elm = targetEvt(evt).parentNode, colIndex = parseInt(elm.getAttribute('ci'), 10); this.closeAll(colIndex); @@ -70,8 +70,8 @@ export class PopupFilter extends Feature { headerWidth = header.clientWidth * 0.95; popUpDiv.style.width = parseInt(headerWidth, 10) + 'px'; } - Event.cancel(evt); - Event.stop(evt); + cancelEvt(evt); + stopEvt(evt); } /** @@ -101,7 +101,7 @@ export class PopupFilter extends Feature { popUpSpan.innerHTML = this.popUpImgFltHtml; let header = tf.getHeaderElement(i); header.appendChild(popUpSpan); - Event.add(popUpSpan, 'click', (evt) => { this.onClick(evt); }); + addEvt(popUpSpan, 'click', (evt) => this.onClick(evt)); this.popUpFltSpans[i] = popUpSpan; this.popUpFltImgs[i] = popUpSpan.firstChild; } @@ -151,7 +151,7 @@ export class PopupFilter extends Feature { tf.externalFltTgtIds.push(popUpDiv.id); let header = tf.getHeaderElement(colIndex); header.insertBefore(popUpDiv, header.firstChild); - Event.add(popUpDiv, 'click', (evt) => Event.stop(evt)); + addEvt(popUpDiv, 'click', (evt) => stopEvt(evt)); this.popUpFltElms[colIndex] = popUpDiv; } diff --git a/src/tablefilter.js b/src/tablefilter.js index f2406506..99b8703e 100644 --- a/src/tablefilter.js +++ b/src/tablefilter.js @@ -1,4 +1,4 @@ -import Event from './event'; +import {addEvt, cancelEvt, stopEvt, targetEvt, keyCode} from './event'; import { addClass, createElm, createOpt, elm, getText, getFirstTextNode, hasClass, removeClass, removeElm, tag @@ -580,11 +580,11 @@ export class TableFilter { return; } if (evt) { - let key = Event.keyCode(evt); + let key = keyCode(evt); if (key === ENTER_KEY) { this.filter(); - Event.cancel(evt); - Event.stop(evt); + cancelEvt(evt); + stopEvt(evt); } else { this.isUserTyping = true; root.clearInterval(this.autoFilterTimer); @@ -602,7 +602,7 @@ export class TableFilter { if (!this.autoFilter) { return; } - let key = Event.keyCode(evt); + let key = keyCode(evt); this.isUserTyping = false; function filter() { @@ -640,7 +640,7 @@ export class TableFilter { * @param {Event} evt */ onInpFocus(evt) { - let elm = Event.target(evt); + let elm = targetEvt(evt); this.emitter.emit('filter-focus', this, elm); } @@ -714,7 +714,7 @@ export class TableFilter { ); } inp.className = cssClass || this.fltCssClass; - Event.add(inp, 'focus', (evt) => this.onInpFocus(evt)); + addEvt(inp, 'focus', (evt) => this.onInpFocus(evt)); //filter is appended in custom element if (externalFltTgtId) { @@ -726,10 +726,10 @@ export class TableFilter { this.fltIds.push(inp.id); - Event.add(inp, 'keypress', (evt) => this.detectKey(evt)); - Event.add(inp, 'keydown', () => this.onKeyDown()); - Event.add(inp, 'keyup', (evt) => this.onKeyUp(evt)); - Event.add(inp, 'blur', () => this.onInpBlur()); + addEvt(inp, 'keypress', (evt) => this.detectKey(evt)); + addEvt(inp, 'keydown', () => this.onKeyDown()); + addEvt(inp, 'keyup', (evt) => this.onKeyUp(evt)); + addEvt(inp, 'blur', () => this.onInpBlur()); } /** @@ -752,7 +752,7 @@ export class TableFilter { container.appendChild(btn); } - Event.add(btn, 'click', () => this.filter()); + addEvt(btn, 'click', () => this.filter()); } /**