',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(11),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(11),l=i(3),a=i(4),h=i(8);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.onBeforeShow=(0,a.isFn)(o.on_before_show_msg)?o.on_before_show_msg:null,r.onAfterShow=(0,a.isFn)(o.on_after_show_msg)?o.on_after_show_msg:null,r.onBeforeHide=(0,a.isFn)(o.on_before_hide_msg)?o.on_before_hide_msg:null,r.onAfterHide=(0,a.isFn)(o.on_after_hide_msg)?o.on_after_hide_msg:null,r.prfx="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.prfx+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.onBeforeShow&&this.onBeforeShow.call(null,this.tf,this),this.setWidth(),this.cont.style.display="block",this.onAfterShow&&this.onAfterShow.call(null,this.tf,this))},e.prototype.hide=function(){this.initialized&&this.isEnabled()&&(this.onBeforeHide&&this.onBeforeHide.call(null,this.tf,this),this.cont.style.display=h.NONE,this.onAfterHide&&this.onAfterHide.call(null,this.tf,this))},e.prototype.setWidth=function(){if(this.initialized&&!this.isExternal&&this.isEnabled()){var t=this.tf;if(t.gridLayout){var e=t.feature("gridLayout");this.cont.style.width=e.tblCont.clientWidth+"px"}else this.cont.style.width=(t.tbl.tHead?t.tbl.tHead.clientWidth:t.tbl.tBodies[0].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(11),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.storage=null,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=r.root.encodeURIComponent,c=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,this.boundSync=null}return t.prototype.init=function(){var t=this;c()&&(this.lastHash=l.hash,this.boundSync=this.sync.bind(this),this.emitter.on(["state-changed"],function(e,i){return t.update(i)}),this.emitter.on(["initialized"],this.boundSync),(0,n.addEvt)(r.root,"hashchange",this.boundSync))},t.prototype.update=function(t){var e="#"+h(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"],this.boundSync),(0,n.removeEvt)(r.root,"hashchange",this.boundSync),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,f=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&&f(),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)}}}])});
\ No newline at end of file
diff --git a/dist/tablefilter/tf-1.js b/dist/tablefilter/tf-1.js
index bf18160a..5c2c00b8 100644
--- a/dist/tablefilter/tf-1.js
+++ b/dist/tablefilter/tf-1.js
@@ -1,8 +1,8 @@
/**
- * tablefilter v0.2.65 by Max Guglielmi
- * build date: 2016-09-07T11:33:04.337Z
+ * tablefilter v0.3.0 by Max Guglielmi
+ * build date: 2016-09-10T14:01:17.197Z
* MIT License
*/
-webpackJsonp([1],{30:function(e,t,n){function o(e){return n(i(e))}function i(e){return s[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var s={"./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};o.keys=function(){return Object.keys(s)},o.resolve=i,e.exports=o,o.id=30},31:function(e,t,n){"use strict";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),r=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,s){o(this,t);var l=i(this,e.call(this,n,s.name));return l.desc=s.description||"ezEditTable adapter",l.filename=s.filename||"ezEditTable.js",l.vendorPath=s.vendor_path,l.loadStylesheet=Boolean(s.load_stylesheet),l.stylesheet=s.stylesheet||l.vendorPath+"ezEditTable.css",l.stylesheetName=s.stylesheet_name||"ezEditTableCss",s.scroll_into_view=s.scroll_into_view===!1?!1:n.gridLayout,l._ezEditTable=null,l.cfg=s,l.enable(),l}return s(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(){return 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=this.tf,t=void 0,n=this.cfg,o=(0,r.tag)(e.tbl,"thead");t=o.length>0&&!n.startRow?void 0:n.startRow||e.refRow,n.base_path=n.base_path||e.basePath+"ezEditTable/";var i=n.editable,s=n.selection;s&&(n.default_selection=n.default_selection||"row"),n.active_cell_css=n.active_cell_css||"ezETSelectedCell";var l=0,a=0;s&&!function(){var t=function(t,n,o){var i=t.Selection,s=function(o){if("row"===t.defaultSelection)i.SelectRowByIndex(o);else{t.ClearSelections();var s=n.cellIndex,l=e.tbl.rows[o];"both"===t.defaultSelection&&i.SelectRowByIndex(o),l&&i.SelectCell(l.cells[s])}if(e.validRowsIndex.length!==e.getRowsNb()){var r=e.tbl.rows[o];r&&r.scrollIntoView(!1),u&&(u.cellIndex===e.getCellsNb()-1&&e.gridLayout?e.tblCont.scrollLeft=1e8:0===u.cellIndex&&e.gridLayout?e.tblCont.scrollLeft=0:u.scrollIntoView(!1))}};if(e.validRowsIndex){var r=e.validRowsIndex,d=r.length,c="row"!==t.defaultSelection?n.parentNode:n,u="TD"===n.nodeName?n:null,h=void 0!==o?t.Event.GetKey(o):0,p=-1!==r.indexOf(c.rowIndex),f=void 0,b=e.feature("paging"),m=34===h||33===h?b&&b.pagingLength||t.nbRowsPerPage:1;if(p)34!==h&&33!==h?(l=r.indexOf(c.rowIndex),a=c.rowIndex):(f=34===h?d-1>=l+m?r[l+m]:[d-1]:l-m<=r[0]?r[0]:r[l-m],a=f,l=r.indexOf(f),s(f));else{if(c.rowIndex>a)if(c.rowIndex>=r[d-1])f=r[d-1];else{var y=l+m;f=y>d-1?r[d-1]:r[y]}else if(c.rowIndex<=r[0])f=r[0];else{var g=r[l-m];f=g?g:r[0]}a=c.rowIndex,s(f)}}},o=function(t,n){var o="row"!==t.defaultSelection?n.parentNode:n;if(e.paging&&e.feature("paging").nbPages>1){var i=e.feature("paging");t.nbRowsPerPage=i.pagingLength;var s=e.validRowsIndex,l=s.length,r=parseInt(i.startPagingRow,10)+parseInt(i.pagingLength,10),a=o.rowIndex;a===s[l-1]&&i.currentPageNb!==i.nbPages?i.setPage("last"):a===s[0]&&1!==i.currentPageNb?i.setPage("first"):a>s[r-1]&&as[0]&&i.setPage("previous")}};e.paging&&(e.feature("paging").onAfterChangePage=function(e){var t=e.tf.extension("advancedGrid"),n=t._ezEditTable,o=n.Selection,i=o.GetActiveRow();i&&i.scrollIntoView(!1);var s=o.GetActiveCell();s&&s.scrollIntoView(!1)}),"row"===n.default_selection?!function(){var e=n.on_before_selected_row;n.on_before_selected_row=function(){o(arguments[0],arguments[1],arguments[2]),e&&e.call(null,arguments[0],arguments[1],arguments[2])};var i=n.on_after_selected_row;n.on_after_selected_row=function(){t(arguments[0],arguments[1],arguments[2]),i&&i.call(null,arguments[0],arguments[1],arguments[2])}}():!function(){var e=n.on_before_selected_cell;n.on_before_selected_cell=function(){o(arguments[0],arguments[1],arguments[2]),e&&e.call(null,arguments[0],arguments[1],arguments[2])};var i=n.on_after_selected_cell;n.on_after_selected_cell=function(){t(arguments[0],arguments[1],arguments[2]),i&&i.call(null,arguments[0],arguments[1],arguments[2])}}()}(),i&&!function(){var t=n.on_added_dom_row;n.on_added_dom_row=function(){e.nbFilterableRows++,e.paging?(e.nbFilterableRows++,e.paging=!1,e.feature("paging").destroy(),e.feature("paging").reset()):e.emitter.emit("rows-changed",e,this),e.alternateRows&&e.feature("alternateRows").init(),t&&t.call(null,arguments[0],arguments[1],arguments[2])},n.actions&&n.actions["delete"]&&!function(){var t=n.actions["delete"].on_after_submit;n.actions["delete"].on_after_submit=function(){e.nbFilterableRows--,e.paging?(e.nbFilterableRows--,e.paging=!1,e.feature("paging").destroy(),e.feature("paging").reset(!1)):e.emitter.emit("rows-changed",e,this),e.alternateRows&&e.feature("alternateRows").init(),t&&t.call(null,arguments[0],arguments[1])}}()}();try{this._ezEditTable=new EditTable(e.id,n,t),this._ezEditTable.Init()}catch(d){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}(l.Feature);t["default"]=u},32:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(31),s=o(i);t["default"]=s["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.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,this),this.emitter.emit("before-column-operation",tf,this);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=void 0,nbvalues=0,temp=void 0,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=void 0;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,this),this.emitter.emit("after-column-operation",tf,this)}},ColOps.prototype.destroy=function(){var e=this;this.initialized&&(this.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 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),r=n(3),a=n(4),d=n(1),c=function(e){function t(n,s){o(this,t);var l=i(this,e.call(this,n,s.name)),r=l.config;return l.name=s.name,l.desc=s.description||"Columns visibility manager",l.spanEl=null,l.btnEl=null,l.contEl=null,l.tickToHide=s.tick_to_hide!==!1,l.manager=s.manager!==!1,l.headersTbl=s.headers_table||null,l.headersIndex=s.headers_index||1,l.contElTgtId=s.container_target_id||null,l.headersText=s.headers_text||null,l.btnTgtId=s.btn_target_id||null,l.btnText=s.btn_text||"Columns▼",l.btnHtml=s.btn_html||null,l.btnCssClass=s.btn_css_class||"colVis",l.btnCloseText=s.btn_close_text||"Close",l.btnCloseHtml=s.btn_close_html||null,l.btnCloseCssClass=s.btn_close_css_class||l.btnCssClass,l.stylesheet=s.stylesheet||"colsVisibility.css",l.prfx="colVis_",l.spanCssClass=s.span_css_class||"colVisSpan",l.prfxCont=l.prfx+"Cont_",l.contCssClass=s.cont_css_class||"colVisCont",l.listCssClass=r.list_css_class||"cols_checklist",l.listItemCssClass=r.checklist_item_css_class||"cols_checklist_item",l.listSlcItemCssClass=r.checklist_selected_item_css_class||"cols_checklist_slc_item",l.text=s.text||(l.tickToHide?"Hide: ":"Show: "),l.atStart=s.at_start||[],l.enableHover=Boolean(s.enable_hover),l.enableTickAll=Boolean(s.enable_tick_all),l.tickAllText=s.tick_all_text||"Select all:",l.hiddenCols=[],l.onLoaded=(0,a.isFn)(s.on_loaded)?s.on_loaded:null,l.onBeforeOpen=(0,a.isFn)(s.on_before_open)?s.on_before_open:null,l.onAfterOpen=(0,a.isFn)(s.on_after_open)?s.on_after_open:null,l.onBeforeClose=(0,a.isFn)(s.on_before_close)?s.on_before_close:null,l.onAfterClose=(0,a.isFn)(s.on_after_close)?s.on_after_close:null,l.onBeforeColHidden=(0,a.isFn)(s.on_before_col_hidden)?s.on_before_col_hidden:null,l.onAfterColHidden=(0,a.isFn)(s.on_after_col_hidden)?s.on_after_col_hidden:null,l.onBeforeColDisplayed=(0,a.isFn)(s.on_before_col_displayed)?s.on_before_col_displayed:null,l.onAfterColDisplayed=(0,a.isFn)(s.on_after_col_displayed)?s.on_after_col_displayed:null,n.gridLayout&&(l.headersTbl=n.feature("gridLayout").headTbl,l.headersIndex=0,l.onAfterColDisplayed=function(){},l.onAfterColHidden=function(){}),n["import"](s.name+"Style",n.stylePath+l.stylesheet,null,"link"),l.enable(),l}return s(t,e),t.prototype.toggle=function(){var e=this.contEl.style.display,t=this.onBeforeOpen,n=this.onBeforeClose,o=this.onAfterOpen,i=this.onAfterClose;t&&"inline"!==e&&t.call(null,this),n&&"inline"===e&&n.call(null,this),this.contEl.style.display="inline"===e?"none":"inline",o&&"inline"!==e&&o.call(null,this),i&&"inline"===e&&i.call(null,this)},t.prototype.checkItem=function(e){var t=e.parentNode;if(t&&e){var n=e.firstChild.checked,o=e.firstChild.getAttribute("id").split("_")[1];o=parseInt(o,10),n?(0,r.addClass)(t,this.listSlcItemCssClass):(0,r.removeClass)(t,this.listSlcItemCssClass);var i=!1;(this.tickToHide&&n||!this.tickToHide&&!n)&&(i=!0),this.setHidden(o,i)}},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,r.createElm)("span",["id",this.prfx+t.id]);n.className=this.spanCssClass,this.btnTgtId||t.setToolbar();var o=this.btnTgtId?(0,r.elm)(this.btnTgtId):t.rDiv;if(this.btnTgtId)o.appendChild(n);else{var i=o.firstChild;i.parentNode.insertBefore(n,i)}if(this.btnHtml){n.innerHTML=this.btnHtml;var s=n.firstChild;this.enableHover?(0,d.addEvt)(s,"mouseover",function(t){return e.toggle(t)}):(0,d.addEvt)(s,"click",function(t){return e.toggle(t)})}else{var l=(0,r.createElm)("a",["href","javascript:;"]);l.className=this.btnCssClass,l.title=this.desc,l.innerHTML=this.btnText,n.appendChild(l),this.enableHover?(0,d.addEvt)(l,"mouseover",function(t){return e.toggle(t)}):(0,d.addEvt)(l,"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,r.elm)(this.contElTgtId):(0,r.createElm)("div",["id",this.prfxCont+t.id]);n.className=this.contCssClass;var o=(0,r.createElm)("p");o.innerHTML=this.text,n.appendChild(o);var i=(0,r.createElm)("ul",["id","ul"+this.name+"_"+t.id]);i.className=this.listCssClass;var s=this.headersTbl?this.headersTbl:t.tbl,l=this.headersTbl?this.headersIndex:t.getHeadersRowIndex(),a=s.rows[l];this.enableTickAll&&!function(){var n=(0,r.createCheckItem)("col__"+t.id,e.tickAllText,e.tickAllText);(0,r.addClass)(n,e.listItemCssClass),i.appendChild(n),n.check.checked=!e.tickToHide,(0,d.addEvt)(n.check,"click",function(){for(var e=0;e',l.icnCollapseHtml='',l.defaultText="Toggle filters",l.targetId=s.target_id||null,l.enableIcon=s.enable_icon!==!1,l.btnText=s.btn_text||"",l.collapseBtnHtml=l.enableIcon?l.icnCollapseHtml+l.btnText:l.btnText||l.defaultText,l.expandBtnHtml=l.enableIcon?l.icnExpandHtml+l.btnText:l.btnText||l.defaultText,l.btnHtml=s.btn_html||null,l.btnCssClass=s.btn_css_class||"btnExpClpFlt",l.contCssClass=s.cont_css_class||"expClpFlt",l.filtersRowIndex=(0,a.isUndef)(s.filters_row_index)?n.getFiltersRowIndex():s.filters_row_index,l.visibleAtStart=(0,a.isUndef)(s.visible_at_start)?!0:Boolean(s.visible_at_start),l.prfx="fltsVis_",l.onBeforeShow=(0,a.isFn)(s.on_before_show)?s.on_before_show:null,l.onAfterShow=(0,a.isFn)(s.on_after_show)?s.on_after_show:null,l.onBeforeHide=(0,a.isFn)(s.on_before_hide)?s.on_before_hide:null,l.onAfterHide=(0,a.isFn)(s.on_after_hide)?s.on_after_hide:null,n["import"](s.name+"Style",n.stylePath+l.stylesheet,null,"link"),l.enable(),l}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,r.createElm)("span",["id",this.prfx+t.id]);n.className=this.contCssClass,this.targetId||t.setToolbar();var o=this.targetId?(0,r.elm)(this.targetId):t.rDiv;if(this.targetId)o.appendChild(n);else{var i=o.firstChild;i.parentNode.insertBefore(n,i)}var s=void 0;this.btnHtml?(n.innerHTML=this.btnHtml,s=n.firstChild):(s=(0,r.createElm)("a",["href","javascript:void(0);"]),s.className=this.btnCssClass,s.title=this.btnText||this.defaultText,s.innerHTML=this.collapseBtnHtml,n.appendChild(s)),(0,d.addEvt)(s,"click",function(){return e.toggle()}),this.contEl=n,this.btnEl=s,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],o=""===n.style.display;this.show(!o)},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,o=n.rows[this.filtersRowIndex];this.onBeforeShow&&e&&this.onBeforeShow.call(this,this),this.onBeforeHide&&!e&&this.onBeforeHide.call(null,this),o.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,r.removeElm)(this.btnEl),this.btnEl=null,this.contEl.innerHTML="",(0,r.removeElm)(this.contEl),this.contEl=null,this.initialized=!1)},t}(l.Feature);t["default"]=c},36:function(e,t,n){"use strict";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,_.removeNbFormat)(e,"us")}function r(e){return(0,_.removeNbFormat)(e,"eu")}function a(e,t){return(0,v.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 o=t[n];3>o.length;)o="0"+o;t[n]=o}return t.join(".")}function f(e,t){var n=p(e.value.toLowerCase()),o=p(t.value.toLowerCase());return n===o?0:o>n?-1:1}Object.defineProperty(t,"__esModule",{value:!0});var b=n(10),m=n(4),y=n(3),g=n(1),v=n(6),_=n(7),T=n(11),C=function(e){function t(n,s){o(this,t);var l=i(this,e.call(this,n,s.name));return l.name=s.name,l.desc=s.description||"Sortable table",l.sorted=!1,l.sortTypes=(0,m.isArray)(s.types)?s.types:[],l.sortColAtStart=(0,m.isArray)(s.sort_col_at_start)?s.sort_col_at_start:null,l.asyncSort=Boolean(s.async_sort),l.triggerIds=(0,m.isArray)(s.trigger_ids)?s.trigger_ids:[],l.imgPath=s.images_path||n.themesPath,l.imgBlank=s.image_blank||"blank.png",l.imgClassName=s.image_class_name||"sort-arrow",l.imgAscClassName=s.image_asc_class_name||"ascending",l.imgDescClassName=s.image_desc_class_name||"descending",l.customKey=s.custom_key||"data-tf-sortKey",l.onSortLoaded=(0,m.isFn)(s.on_sort_loaded)?s.on_sort_loaded:null,l.onBeforeSort=(0,m.isFn)(s.on_before_sort)?s.on_before_sort:null,l.onAfterSort=(0,m.isFn)(s.on_after_sort)?s.on_after_sort:null,l.stt=null,l.enable(),l}return s(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 o=n.sortColAtStart;o&&this.stt.sort(o[0],o[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,o){return e.sortByColumnIndex(n,o)}),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!==T.CELL_TAG&&n.tagName!==T.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,o=void 0;for(o=0;t[o]!==e&&n>o;o++);return o},SortableTable.prototype.initHeader=function(n){var o=this;if(!o.tHead){if(!t.gridLayout)return;o.tHead=t.feature("gridLayout").headTbl.tHead}o.headersRow=t.headersRow;var i=o.tHead.rows[o.headersRow].cells;o.sortTypes=n||[];for(var s=i.length,l=void 0,r=void 0,a=0;s>a;a++)r=i[a],null!==o.sortTypes[a]&&"None"!==o.sortTypes[a]?(r.style.cursor="pointer",l=(0,y.createElm)("img",["src",e.imgPath+e.imgBlank]),r.appendChild(l),null!==o.sortTypes[a]&&r.setAttribute("_sortType",o.sortTypes[a]),(0,g.addEvt)(r,"click",o._headerOnclick)):(r.setAttribute("_sortType",n[a]),r._sortType="None");o.updateHeaderArrows()},SortableTable.prototype.updateHeaderArrows=function(){var t=this,n=void 0,o=void 0,i=void 0;if(e.asyncSort&&e.triggerIds.length>0){var s=e.triggerIds;n=[],o=s.length;for(var l=0;o>l;l++)n.push((0,y.elm)(s[l]))}else{if(!this.tHead)return;n=t.tHead.rows[t.headersRow].cells,o=n.length}for(var r=0;o>r;r++){var a=n[r];if(a){var d=a.getAttribute("_sortType");null!==d&&"None"!==d&&(i=a.lastChild||a,"img"!==i.nodeName.toLowerCase()&&(i=(0,y.createElm)("img",["src",e.imgPath+e.imgBlank]),a.appendChild(i)),r===t.sortColumn?i.className=e.imgClassName+" "+(this.descending?e.imgDescClassName:e.imgAscClassName):i.className=e.imgClassName)}}},SortableTable.prototype.getRowValue=function(e,t,n){var o=this,i=o._sortTypeInfo[t];if(i&&i.getRowValue)return i.getRowValue(e,n);var s=e.cells[n],l=SortableTable.getInnerText(s);return o.getValueFromString(l,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,o=[],i=0;i0&&!function(){for(var t=e.triggerIds,n=0;n descending, false -> ascending\nSortableTable.prototype.defaultDescending = false;\n\n// shared between all instances. This is intentional to allow external files\n// to modify the prototype\nSortableTable.prototype._sortTypeInfo = {};\n\nSortableTable.prototype.setTable = function (oTable) {\n if ( this.tHead )\n this.uninitHeader();\n this.element = oTable;\n this.setTHead( oTable.tHead );\n this.setTBody( oTable.tBodies[0] );\n};\n\nSortableTable.prototype.setTHead = function (oTHead) {\n if (this.tHead && this.tHead != oTHead )\n this.uninitHeader();\n this.tHead = oTHead;\n this.initHeader( this.sortTypes );\n};\n\nSortableTable.prototype.setTBody = function (oTBody) {\n this.tBody = oTBody;\n};\n\nSortableTable.prototype.setSortTypes = function ( oSortTypes ) {\n if ( this.tHead )\n this.uninitHeader();\n this.sortTypes = oSortTypes || [];\n if ( this.tHead )\n this.initHeader( this.sortTypes );\n};\n\n// adds arrow containers and events\n// also binds sort type to the header cells so that reordering columns does\n// not break the sort types\nSortableTable.prototype.initHeader = function (oSortTypes) {\n if (!this.tHead) return;\n var cells = this.tHead.rows[0].cells;\n var doc = this.tHead.ownerDocument || this.tHead.document;\n this.sortTypes = oSortTypes || [];\n var l = cells.length;\n var img, c;\n for (var i = 0; i < l; i++) {\n c = cells[i];\n if (this.sortTypes[i] != null && this.sortTypes[i] != "None") {\n img = doc.createElement("IMG");\n img.src = "images/blank.png";\n c.appendChild(img);\n if (this.sortTypes[i] != null)\n c._sortType = this.sortTypes[i];\n if (typeof c.addEventListener != "undefined")\n c.addEventListener("click", this._headerOnclick, false);\n else if (typeof c.attachEvent != "undefined")\n c.attachEvent("onclick", this._headerOnclick);\n else\n c.onclick = this._headerOnclick;\n }\n else\n {\n c.setAttribute( "_sortType", oSortTypes[i] );\n c._sortType = "None";\n }\n }\n this.updateHeaderArrows();\n};\n\n// remove arrows and events\nSortableTable.prototype.uninitHeader = function () {\n if (!this.tHead) return;\n var cells = this.tHead.rows[0].cells;\n var l = cells.length;\n var c;\n for (var i = 0; i < l; i++) {\n c = cells[i];\n if (c._sortType != null && c._sortType != "None") {\n c.removeChild(c.lastChild);\n if (typeof c.removeEventListener != "undefined")\n c.removeEventListener("click", this._headerOnclick, false);\n else if (typeof c.detachEvent != "undefined")\n c.detachEvent("onclick", this._headerOnclick);\n c._sortType = null;\n c.removeAttribute( "_sortType" );\n }\n }\n};\n\nSortableTable.prototype.updateHeaderArrows = function () {\n if (!this.tHead) return;\n var cells = this.tHead.rows[0].cells;\n var l = cells.length;\n var img;\n for (var i = 0; i < l; i++) {\n if (cells[i]._sortType != null && cells[i]._sortType != "None") {\n img = cells[i].lastChild;\n if (i == this.sortColumn)\n img.className = "sort-arrow " + (this.descending ? "descending" : "ascending");\n else\n img.className = "sort-arrow";\n }\n }\n};\n\nSortableTable.prototype.headerOnclick = function (e) {\n // find TD element\n var el = e.target || e.srcElement;\n while (el.tagName != "TD")\n el = el.parentNode;\n\n this.sort(SortableTable.msie ? SortableTable.getCellIndex(el) : el.cellIndex);\n};\n\n// IE returns wrong cellIndex when columns are hidden\nSortableTable.getCellIndex = function (oTd) {\n var cells = oTd.parentNode.childNodes\n var l = cells.length;\n var i;\n for (i = 0; cells[i] != oTd && i < l; i++)\n ;\n return i;\n};\n\nSortableTable.prototype.getSortType = function (nColumn) {\n return this.sortTypes[nColumn] || "String";\n};\n\n// only nColumn is required\n// if bDescending is left out the old value is taken into account\n// if sSortType is left out the sort type is found from the sortTypes array\n\nSortableTable.prototype.sort = function (nColumn, bDescending, sSortType) {\n if (!this.tBody) return;\n if (sSortType == null)\n sSortType = this.getSortType(nColumn);\n\n // exit if None\n if (sSortType == "None")\n return;\n\n if (bDescending == null) {\n if (this.sortColumn != nColumn)\n this.descending = this.defaultDescending;\n else\n this.descending = !this.descending;\n }\n else\n this.descending = bDescending;\n\n this.sortColumn = nColumn;\n\n if (typeof this.onbeforesort == "function")\n this.onbeforesort();\n\n var f = this.getSortFunction(sSortType, nColumn);\n var a = this.getCache(sSortType, nColumn);\n var tBody = this.tBody;\n\n a.sort(f);\n\n if (this.descending)\n a.reverse();\n\n if (SortableTable.removeBeforeSort) {\n // remove from doc\n var nextSibling = tBody.nextSibling;\n var p = tBody.parentNode;\n p.removeChild(tBody);\n }\n\n // insert in the new order\n var l = a.length;\n for (var i = 0; i < l; i++)\n tBody.appendChild(a[i].element);\n\n if (SortableTable.removeBeforeSort) {\n // insert into doc\n p.insertBefore(tBody, nextSibling);\n }\n\n this.updateHeaderArrows();\n\n this.destroyCache(a);\n\n if (typeof this.onsort == "function")\n this.onsort();\n};\n\nSortableTable.prototype.asyncSort = function (nColumn, bDescending, sSortType) {\n var oThis = this;\n this._asyncsort = function () {\n oThis.sort(nColumn, bDescending, sSortType);\n };\n window.setTimeout(this._asyncsort, 1);\n};\n\nSortableTable.prototype.getCache = function (sType, nColumn) {\n if (!this.tBody) return [];\n var rows = this.tBody.rows;\n var l = rows.length;\n var a = new Array(l);\n var r;\n for (var i = 0; i < l; i++) {\n r = rows[i];\n a[i] = {\n value: this.getRowValue(r, sType, nColumn),\n element: r\n };\n };\n return a;\n};\n\nSortableTable.prototype.destroyCache = function (oArray) {\n var l = oArray.length;\n for (var i = 0; i < l; i++) {\n oArray[i].value = null;\n oArray[i].element = null;\n oArray[i] = null;\n }\n};\n\nSortableTable.prototype.getRowValue = function (oRow, sType, nColumn) {\n // if we have defined a custom getRowValue use that\n if (this._sortTypeInfo[sType] && this._sortTypeInfo[sType].getRowValue)\n return this._sortTypeInfo[sType].getRowValue(oRow, nColumn);\n\n var s;\n var c = oRow.cells[nColumn];\n if (typeof c.innerText != "undefined")\n s = c.innerText;\n else\n s = SortableTable.getInnerText(c);\n return this.getValueFromString(s, sType);\n};\n\nSortableTable.getInnerText = function (oNode) {\n var s = "";\n var cs = oNode.childNodes;\n var l = cs.length;\n for (var i = 0; i < l; i++) {\n switch (cs[i].nodeType) {\n case 1: //ELEMENT_NODE\n s += SortableTable.getInnerText(cs[i]);\n break;\n case 3: //TEXT_NODE\n s += cs[i].nodeValue;\n break;\n }\n }\n return s;\n};\n\nSortableTable.prototype.getValueFromString = function (sText, sType) {\n if (this._sortTypeInfo[sType])\n return this._sortTypeInfo[sType].getValueFromString( sText );\n return sText;\n /*\n switch (sType) {\n case "Number":\n return Number(sText);\n case "CaseInsensitiveString":\n return sText.toUpperCase();\n case "Date":\n var parts = sText.split("-");\n var d = new Date(0);\n d.setFullYear(parts[0]);\n d.setDate(parts[2]);\n d.setMonth(parts[1] - 1);\n return d.valueOf();\n }\n return sText;\n */\n };\n\nSortableTable.prototype.getSortFunction = function (sType, nColumn) {\n if (this._sortTypeInfo[sType])\n return this._sortTypeInfo[sType].compare;\n return SortableTable.basicCompare;\n};\n\nSortableTable.prototype.destroy = function () {\n this.uninitHeader();\n var win = this.document.parentWindow;\n if (win && typeof win.detachEvent != "undefined") { // only IE needs this\n win.detachEvent("onunload", this._onunload);\n }\n this._onunload = null;\n this.element = null;\n this.tHead = null;\n this.tBody = null;\n this.document = null;\n this._headerOnclick = null;\n this.sortTypes = null;\n this._asyncsort = null;\n this.onsort = null;\n};\n\n// Adds a sort type to all instance of SortableTable\n// sType : String - the identifier of the sort type\n// fGetValueFromString : function ( s : string ) : T - A function that takes a\n// string and casts it to a desired format. If left out the string is just\n// returned\n// fCompareFunction : function ( n1 : T, n2 : T ) : Number - A normal JS sort\n// compare function. Takes two values and compares them. If left out less than,\n// <, compare is used\n// fGetRowValue : function( oRow : HTMLTRElement, nColumn : int ) : T - A function\n// that takes the row and the column index and returns the value used to compare.\n// If left out then the innerText is first taken for the cell and then the\n// fGetValueFromString is used to convert that string the desired value and type\n\nSortableTable.prototype.addSortType = function (sType, fGetValueFromString, fCompareFunction, fGetRowValue) {\n this._sortTypeInfo[sType] = {\n type: sType,\n getValueFromString: fGetValueFromString || SortableTable.idFunction,\n compare: fCompareFunction || SortableTable.basicCompare,\n getRowValue: fGetRowValue\n };\n};\n\n// this removes the sort type from all instances of SortableTable\nSortableTable.prototype.removeSortType = function (sType) {\n delete this._sortTypeInfo[sType];\n};\n\nSortableTable.basicCompare = function compare(n1, n2) {\n if (n1.value < n2.value)\n return -1;\n if (n2.value < n1.value)\n return 1;\n return 0;\n};\n\nSortableTable.idFunction = function (x) {\n return x;\n};\n\nSortableTable.toUpperCase = function (s) {\n return s.toUpperCase();\n};\n\nSortableTable.toDate = function (s) {\n var parts = s.split("-");\n var d = new Date(0);\n d.setFullYear(parts[0]);\n d.setDate(parts[2]);\n d.setMonth(parts[1] - 1);\n return d.valueOf();\n};\n\n\n// add sort types\nSortableTable.prototype.addSortType("Number", Number);\nSortableTable.prototype.addSortType("CaseInsensitiveString", SortableTable.toUpperCase);\nSortableTable.prototype.addSortType("Date", SortableTable.toDate);\nSortableTable.prototype.addSortType("String");\n// None is a special case\n'}});
\ No newline at end of file
+webpackJsonp([1],{30:function(e,t,n){function o(e){return n(i(e))}function i(e){return s[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var s={"./array":16,"./array.js":16,"./const":8,"./const.js":8,"./cookie":29,"./cookie.js":29,"./date":6,"./date.js":6,"./dom":3,"./dom.js":3,"./emitter":9,"./emitter.js":9,"./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":11,"./feature.js":11,"./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":10,"./modules/gridLayout.js":10,"./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,"./number":7,"./number.js":7,"./root":2,"./root.js":2,"./sort":17,"./sort.js":17,"./string":5,"./string.js":5,"./types":4,"./types.js":4};o.keys=function(){return Object.keys(s)},o.resolve=i,e.exports=o,o.id=30},31:function(e,t,n){"use strict";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(11),r=n(3),a=n(8),d=n(2),c='Failed to instantiate EditTable object.\n \n"ezEditTable" dependency not found.',u=function(e){function t(n,s){o(this,t);var l=i(this,e.call(this,n,s.name));return l.desc=s.description||"ezEditTable adapter",l.filename=s.filename||"ezEditTable.js",l.vendorPath=s.vendor_path,l.loadStylesheet=Boolean(s.load_stylesheet),l.stylesheet=s.stylesheet||l.vendorPath+"ezEditTable.css",l.stylesheetName=s.stylesheet_name||"ezEditTableCss",s.scroll_into_view=s.scroll_into_view===!1?!1:n.gridLayout,l._ezEditTable=null,l.cfg=s,l.enable(),l}return s(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(){return 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=this.tf,t=void 0,n=this.cfg,o=(0,r.tag)(e.tbl,"thead");t=o.length>0&&!n.startRow?void 0:n.startRow||e.refRow,n.base_path=n.base_path||e.basePath+"ezEditTable/";var i=n.editable,s=n.selection;s&&(n.default_selection=n.default_selection||"row"),n.active_cell_css=n.active_cell_css||"ezETSelectedCell";var l=0,a=0;s&&!function(){var t=function(t,n,o){var i=t.Selection,s=function(o){if("row"===t.defaultSelection)i.SelectRowByIndex(o);else{t.ClearSelections();var s=n.cellIndex,l=e.tbl.rows[o];"both"===t.defaultSelection&&i.SelectRowByIndex(o),l&&i.SelectCell(l.cells[s])}if(e.validRowsIndex.length!==e.getRowsNb()){var r=e.tbl.rows[o];r&&r.scrollIntoView(!1),u&&(u.cellIndex===e.getCellsNb()-1&&e.gridLayout?e.tblCont.scrollLeft=1e8:0===u.cellIndex&&e.gridLayout?e.tblCont.scrollLeft=0:u.scrollIntoView(!1))}};if(e.validRowsIndex){var r=e.validRowsIndex,d=r.length,c="row"!==t.defaultSelection?n.parentNode:n,u="TD"===n.nodeName?n:null,h=void 0!==o?t.Event.GetKey(o):0,f=-1!==r.indexOf(c.rowIndex),p=void 0,b=e.feature("paging"),m=34===h||33===h?b&&b.pagingLength||t.nbRowsPerPage:1;if(f)34!==h&&33!==h?(l=r.indexOf(c.rowIndex),a=c.rowIndex):(p=34===h?d-1>=l+m?r[l+m]:[d-1]:l-m<=r[0]?r[0]:r[l-m],a=p,l=r.indexOf(p),s(p));else{if(c.rowIndex>a)if(c.rowIndex>=r[d-1])p=r[d-1];else{var y=l+m;p=y>d-1?r[d-1]:r[y]}else if(c.rowIndex<=r[0])p=r[0];else{var g=r[l-m];p=g?g:r[0]}a=c.rowIndex,s(p)}}},o=function(t,n){var o="row"!==t.defaultSelection?n.parentNode:n;if(e.paging&&e.feature("paging").nbPages>1){var i=e.feature("paging");t.nbRowsPerPage=i.pagingLength;var s=e.validRowsIndex,l=s.length,r=parseInt(i.startPagingRow,10)+parseInt(i.pagingLength,10),a=o.rowIndex;a===s[l-1]&&i.currentPageNb!==i.nbPages?i.setPage("last"):a===s[0]&&1!==i.currentPageNb?i.setPage("first"):a>s[r-1]&&as[0]&&i.setPage("previous")}};e.paging&&(e.feature("paging").onAfterChangePage=function(e){var t=e.tf.extension("advancedGrid"),n=t._ezEditTable,o=n.Selection,i=o.GetActiveRow();i&&i.scrollIntoView(!1);var s=o.GetActiveCell();s&&s.scrollIntoView(!1)}),"row"===n.default_selection?!function(){var e=n.on_before_selected_row;n.on_before_selected_row=function(){o(arguments[0],arguments[1],arguments[2]),e&&e.call(null,arguments[0],arguments[1],arguments[2])};var i=n.on_after_selected_row;n.on_after_selected_row=function(){t(arguments[0],arguments[1],arguments[2]),i&&i.call(null,arguments[0],arguments[1],arguments[2])}}():!function(){var e=n.on_before_selected_cell;n.on_before_selected_cell=function(){o(arguments[0],arguments[1],arguments[2]),e&&e.call(null,arguments[0],arguments[1],arguments[2])};var i=n.on_after_selected_cell;n.on_after_selected_cell=function(){t(arguments[0],arguments[1],arguments[2]),i&&i.call(null,arguments[0],arguments[1],arguments[2])}}()}(),i&&!function(){var t=n.on_added_dom_row;n.on_added_dom_row=function(){e.nbFilterableRows++,e.paging?(e.nbFilterableRows++,e.paging=!1,e.feature("paging").destroy(),e.feature("paging").reset()):e.emitter.emit("rows-changed",e,this),e.alternateRows&&e.feature("alternateRows").init(),t&&t.call(null,arguments[0],arguments[1],arguments[2])},n.actions&&n.actions["delete"]&&!function(){var t=n.actions["delete"].on_after_submit;n.actions["delete"].on_after_submit=function(){e.nbFilterableRows--,e.paging?(e.nbFilterableRows--,e.paging=!1,e.feature("paging").destroy(),e.feature("paging").reset(!1)):e.emitter.emit("rows-changed",e,this),e.alternateRows&&e.feature("alternateRows").init(),t&&t.call(null,arguments[0],arguments[1])}}()}();try{this._ezEditTable=new EditTable(e.id,n,t),this._ezEditTable.Init()}catch(d){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}(l.Feature);t["default"]=u},32:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(31),s=o(i);t["default"]=s["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__(11),_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.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,this),this.emitter.emit("before-column-operation",tf,this);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=void 0,nbvalues=0,temp=void 0,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=void 0;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,this),this.emitter.emit("after-column-operation",tf,this)}},ColOps.prototype.destroy=function(){var e=this;this.initialized&&(this.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 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(11),r=n(3),a=n(4),d=n(1),c=function(e){function t(n,s){o(this,t);var l=i(this,e.call(this,n,s.name)),r=l.config;return l.name=s.name,l.desc=s.description||"Columns visibility manager",l.spanEl=null,l.btnEl=null,l.contEl=null,l.tickToHide=s.tick_to_hide!==!1,l.manager=s.manager!==!1,l.headersTbl=s.headers_table||null,l.headersIndex=s.headers_index||1,l.contElTgtId=s.container_target_id||null,l.headersText=s.headers_text||null,l.btnTgtId=s.btn_target_id||null,l.btnText=s.btn_text||"Columns▼",l.btnHtml=s.btn_html||null,l.btnCssClass=s.btn_css_class||"colVis",l.btnCloseText=s.btn_close_text||"Close",l.btnCloseHtml=s.btn_close_html||null,l.btnCloseCssClass=s.btn_close_css_class||l.btnCssClass,l.stylesheet=s.stylesheet||"colsVisibility.css",l.prfx="colVis_",l.spanCssClass=s.span_css_class||"colVisSpan",l.prfxCont=l.prfx+"Cont_",l.contCssClass=s.cont_css_class||"colVisCont",l.listCssClass=r.list_css_class||"cols_checklist",l.listItemCssClass=r.checklist_item_css_class||"cols_checklist_item",l.listSlcItemCssClass=r.checklist_selected_item_css_class||"cols_checklist_slc_item",l.text=s.text||(l.tickToHide?"Hide: ":"Show: "),l.atStart=s.at_start||[],l.enableHover=Boolean(s.enable_hover),l.enableTickAll=Boolean(s.enable_tick_all),l.tickAllText=s.tick_all_text||"Select all:",l.hiddenCols=[],l.onLoaded=(0,a.isFn)(s.on_loaded)?s.on_loaded:null,l.onBeforeOpen=(0,a.isFn)(s.on_before_open)?s.on_before_open:null,l.onAfterOpen=(0,a.isFn)(s.on_after_open)?s.on_after_open:null,l.onBeforeClose=(0,a.isFn)(s.on_before_close)?s.on_before_close:null,l.onAfterClose=(0,a.isFn)(s.on_after_close)?s.on_after_close:null,l.onBeforeColHidden=(0,a.isFn)(s.on_before_col_hidden)?s.on_before_col_hidden:null,l.onAfterColHidden=(0,a.isFn)(s.on_after_col_hidden)?s.on_after_col_hidden:null,l.onBeforeColDisplayed=(0,a.isFn)(s.on_before_col_displayed)?s.on_before_col_displayed:null,l.onAfterColDisplayed=(0,a.isFn)(s.on_after_col_displayed)?s.on_after_col_displayed:null,n.gridLayout&&(l.headersTbl=n.feature("gridLayout").headTbl,l.headersIndex=0,l.onAfterColDisplayed=function(){},l.onAfterColHidden=function(){}),n["import"](s.name+"Style",n.stylePath+l.stylesheet,null,"link"),l.enable(),l}return s(t,e),t.prototype.toggle=function(){var e=this.contEl.style.display,t=this.onBeforeOpen,n=this.onBeforeClose,o=this.onAfterOpen,i=this.onAfterClose;t&&"inline"!==e&&t.call(null,this),n&&"inline"===e&&n.call(null,this),this.contEl.style.display="inline"===e?"none":"inline",o&&"inline"!==e&&o.call(null,this),i&&"inline"===e&&i.call(null,this)},t.prototype.checkItem=function(e){var t=e.parentNode;if(t&&e){var n=e.firstChild.checked,o=e.firstChild.getAttribute("id").split("_")[1];o=parseInt(o,10),n?(0,r.addClass)(t,this.listSlcItemCssClass):(0,r.removeClass)(t,this.listSlcItemCssClass);var i=!1;(this.tickToHide&&n||!this.tickToHide&&!n)&&(i=!0),this.setHidden(o,i)}},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,r.createElm)("span",["id",this.prfx+t.id]);n.className=this.spanCssClass,this.btnTgtId||t.setToolbar();var o=this.btnTgtId?(0,r.elm)(this.btnTgtId):t.rDiv;if(this.btnTgtId)o.appendChild(n);else{var i=o.firstChild;i.parentNode.insertBefore(n,i)}if(this.btnHtml){n.innerHTML=this.btnHtml;var s=n.firstChild;this.enableHover?(0,d.addEvt)(s,"mouseover",function(t){return e.toggle(t)}):(0,d.addEvt)(s,"click",function(t){return e.toggle(t)})}else{var l=(0,r.createElm)("a",["href","javascript:;"]);l.className=this.btnCssClass,l.title=this.desc,l.innerHTML=this.btnText,n.appendChild(l),this.enableHover?(0,d.addEvt)(l,"mouseover",function(t){return e.toggle(t)}):(0,d.addEvt)(l,"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,r.elm)(this.contElTgtId):(0,r.createElm)("div",["id",this.prfxCont+t.id]);n.className=this.contCssClass;var o=(0,r.createElm)("p");o.innerHTML=this.text,n.appendChild(o);var i=(0,r.createElm)("ul",["id","ul"+this.name+"_"+t.id]);i.className=this.listCssClass;var s=this.headersTbl?this.headersTbl:t.tbl,l=this.headersTbl?this.headersIndex:t.getHeadersRowIndex(),a=s.rows[l];this.enableTickAll&&!function(){var n=(0,r.createCheckItem)("col__"+t.id,e.tickAllText,e.tickAllText);(0,r.addClass)(n,e.listItemCssClass),i.appendChild(n),n.check.checked=!e.tickToHide,(0,d.addEvt)(n.check,"click",function(){for(var e=0;e',l.icnCollapseHtml='',l.defaultText="Toggle filters",l.targetId=s.target_id||null,l.enableIcon=s.enable_icon!==!1,l.btnText=s.btn_text||"",l.collapseBtnHtml=l.enableIcon?l.icnCollapseHtml+l.btnText:l.btnText||l.defaultText,l.expandBtnHtml=l.enableIcon?l.icnExpandHtml+l.btnText:l.btnText||l.defaultText,l.btnHtml=s.btn_html||null,l.btnCssClass=s.btn_css_class||"btnExpClpFlt",l.contCssClass=s.cont_css_class||"expClpFlt",l.filtersRowIndex=(0,a.isUndef)(s.filters_row_index)?n.getFiltersRowIndex():s.filters_row_index,l.visibleAtStart=(0,a.isUndef)(s.visible_at_start)?!0:Boolean(s.visible_at_start),l.prfx="fltsVis_",l.onBeforeShow=(0,a.isFn)(s.on_before_show)?s.on_before_show:null,l.onAfterShow=(0,a.isFn)(s.on_after_show)?s.on_after_show:null,l.onBeforeHide=(0,a.isFn)(s.on_before_hide)?s.on_before_hide:null,l.onAfterHide=(0,a.isFn)(s.on_after_hide)?s.on_after_hide:null,n["import"](s.name+"Style",n.stylePath+l.stylesheet,null,"link"),l.enable(),l}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,r.createElm)("span",["id",this.prfx+t.id]);n.className=this.contCssClass,this.targetId||t.setToolbar();var o=this.targetId?(0,r.elm)(this.targetId):t.rDiv;if(this.targetId)o.appendChild(n);else{var i=o.firstChild;i.parentNode.insertBefore(n,i)}var s=void 0;this.btnHtml?(n.innerHTML=this.btnHtml,s=n.firstChild):(s=(0,r.createElm)("a",["href","javascript:void(0);"]),s.className=this.btnCssClass,s.title=this.btnText||this.defaultText,s.innerHTML=this.collapseBtnHtml,n.appendChild(s)),(0,d.addEvt)(s,"click",function(){return e.toggle()}),this.contEl=n,this.btnEl=s,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],o=""===n.style.display;this.show(!o)},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,o=n.rows[this.filtersRowIndex];this.onBeforeShow&&e&&this.onBeforeShow.call(this,this),this.onBeforeHide&&!e&&this.onBeforeHide.call(null,this),o.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,r.removeElm)(this.btnEl),this.btnEl=null,this.contEl.innerHTML="",(0,r.removeElm)(this.contEl),this.contEl=null,this.initialized=!1)},t}(l.Feature);t["default"]=c},36:function(e,t,n){"use strict";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,_.unformat)(e,v.FORMATTED_NUMBER)}function r(e){return(0,_.unformat)(e,v.FORMATTED_NUMBER_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 f(e){var t=e.split(".");for(var n in t){for(var o=t[n];3>o.length;)o="0"+o;t[n]=o}return t.join(".")}function p(e,t){var n=f(e.value.toLowerCase()),o=f(t.value.toLowerCase());return n===o?0:o>n?-1:1}Object.defineProperty(t,"__esModule",{value:!0});var b=n(11),m=n(4),y=n(3),g=n(1),T=n(6),_=n(7),v=n(8),C=function(e){function t(n,s){o(this,t);var l=i(this,e.call(this,n,s.name));return l.name=s.name,l.desc=s.description||"Sortable table",l.sorted=!1,l.sortTypes=(0,m.isArray)(s.types)?s.types:[],l.sortColAtStart=(0,m.isArray)(s.sort_col_at_start)?s.sort_col_at_start:null,l.asyncSort=Boolean(s.async_sort),l.triggerIds=(0,m.isArray)(s.trigger_ids)?s.trigger_ids:[],l.imgPath=s.images_path||n.themesPath,l.imgBlank=s.image_blank||"blank.png",l.imgClassName=s.image_class_name||"sort-arrow",l.imgAscClassName=s.image_asc_class_name||"ascending",l.imgDescClassName=s.image_desc_class_name||"descending",l.customKey=s.custom_key||"data-tf-sortKey",l.onSortLoaded=(0,m.isFn)(s.on_sort_loaded)?s.on_sort_loaded:null,l.onBeforeSort=(0,m.isFn)(s.on_before_sort)?s.on_before_sort:null,l.onAfterSort=(0,m.isFn)(s.on_after_sort)?s.on_after_sort:null,l.stt=null,l.enable(),l}return s(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 o=n.sortColAtStart;o&&this.stt.sort(o[0],o[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,o){return e.sortByColumnIndex(n,o)}),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!==v.CELL_TAG&&n.tagName!==v.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,o=void 0;for(o=0;t[o]!==e&&n>o;o++);return o},SortableTable.prototype.initHeader=function(n){var o=this;if(!o.tHead){if(!t.gridLayout)return;o.tHead=t.feature("gridLayout").headTbl.tHead}o.headersRow=t.headersRow;var i=o.tHead.rows[o.headersRow].cells;o.sortTypes=n||[];for(var s=i.length,l=void 0,r=void 0,a=0;s>a;a++)r=i[a],null!==o.sortTypes[a]&&"None"!==o.sortTypes[a]?(r.style.cursor="pointer",l=(0,y.createElm)("img",["src",e.imgPath+e.imgBlank]),r.appendChild(l),null!==o.sortTypes[a]&&r.setAttribute("_sortType",o.sortTypes[a]),(0,g.addEvt)(r,"click",o._headerOnclick)):(r.setAttribute("_sortType",n[a]),r._sortType="None");o.updateHeaderArrows()},SortableTable.prototype.updateHeaderArrows=function(){var t=this,n=void 0,o=void 0,i=void 0;if(e.asyncSort&&e.triggerIds.length>0){var s=e.triggerIds;n=[],o=s.length;for(var l=0;o>l;l++)n.push((0,y.elm)(s[l]))}else{if(!this.tHead)return;n=t.tHead.rows[t.headersRow].cells,o=n.length}for(var r=0;o>r;r++){var a=n[r];if(a){var d=a.getAttribute("_sortType");null!==d&&"None"!==d&&(i=a.lastChild||a,"img"!==i.nodeName.toLowerCase()&&(i=(0,y.createElm)("img",["src",e.imgPath+e.imgBlank]),a.appendChild(i)),r===t.sortColumn?i.className=e.imgClassName+" "+(this.descending?e.imgDescClassName:e.imgAscClassName):i.className=e.imgClassName)}}},SortableTable.prototype.getRowValue=function(e,t,n){var o=this,i=o._sortTypeInfo[t];if(i&&i.getRowValue)return i.getRowValue(e,n);var s=e.cells[n],l=SortableTable.getInnerText(s);return o.getValueFromString(l,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,o=[],i=0;i0&&!function(){for(var t=e.triggerIds,n=0;n descending, false -> ascending\nSortableTable.prototype.defaultDescending = false;\n\n// shared between all instances. This is intentional to allow external files\n// to modify the prototype\nSortableTable.prototype._sortTypeInfo = {};\n\nSortableTable.prototype.setTable = function (oTable) {\n if ( this.tHead )\n this.uninitHeader();\n this.element = oTable;\n this.setTHead( oTable.tHead );\n this.setTBody( oTable.tBodies[0] );\n};\n\nSortableTable.prototype.setTHead = function (oTHead) {\n if (this.tHead && this.tHead != oTHead )\n this.uninitHeader();\n this.tHead = oTHead;\n this.initHeader( this.sortTypes );\n};\n\nSortableTable.prototype.setTBody = function (oTBody) {\n this.tBody = oTBody;\n};\n\nSortableTable.prototype.setSortTypes = function ( oSortTypes ) {\n if ( this.tHead )\n this.uninitHeader();\n this.sortTypes = oSortTypes || [];\n if ( this.tHead )\n this.initHeader( this.sortTypes );\n};\n\n// adds arrow containers and events\n// also binds sort type to the header cells so that reordering columns does\n// not break the sort types\nSortableTable.prototype.initHeader = function (oSortTypes) {\n if (!this.tHead) return;\n var cells = this.tHead.rows[0].cells;\n var doc = this.tHead.ownerDocument || this.tHead.document;\n this.sortTypes = oSortTypes || [];\n var l = cells.length;\n var img, c;\n for (var i = 0; i < l; i++) {\n c = cells[i];\n if (this.sortTypes[i] != null && this.sortTypes[i] != "None") {\n img = doc.createElement("IMG");\n img.src = "images/blank.png";\n c.appendChild(img);\n if (this.sortTypes[i] != null)\n c._sortType = this.sortTypes[i];\n if (typeof c.addEventListener != "undefined")\n c.addEventListener("click", this._headerOnclick, false);\n else if (typeof c.attachEvent != "undefined")\n c.attachEvent("onclick", this._headerOnclick);\n else\n c.onclick = this._headerOnclick;\n }\n else\n {\n c.setAttribute( "_sortType", oSortTypes[i] );\n c._sortType = "None";\n }\n }\n this.updateHeaderArrows();\n};\n\n// remove arrows and events\nSortableTable.prototype.uninitHeader = function () {\n if (!this.tHead) return;\n var cells = this.tHead.rows[0].cells;\n var l = cells.length;\n var c;\n for (var i = 0; i < l; i++) {\n c = cells[i];\n if (c._sortType != null && c._sortType != "None") {\n c.removeChild(c.lastChild);\n if (typeof c.removeEventListener != "undefined")\n c.removeEventListener("click", this._headerOnclick, false);\n else if (typeof c.detachEvent != "undefined")\n c.detachEvent("onclick", this._headerOnclick);\n c._sortType = null;\n c.removeAttribute( "_sortType" );\n }\n }\n};\n\nSortableTable.prototype.updateHeaderArrows = function () {\n if (!this.tHead) return;\n var cells = this.tHead.rows[0].cells;\n var l = cells.length;\n var img;\n for (var i = 0; i < l; i++) {\n if (cells[i]._sortType != null && cells[i]._sortType != "None") {\n img = cells[i].lastChild;\n if (i == this.sortColumn)\n img.className = "sort-arrow " + (this.descending ? "descending" : "ascending");\n else\n img.className = "sort-arrow";\n }\n }\n};\n\nSortableTable.prototype.headerOnclick = function (e) {\n // find TD element\n var el = e.target || e.srcElement;\n while (el.tagName != "TD")\n el = el.parentNode;\n\n this.sort(SortableTable.msie ? SortableTable.getCellIndex(el) : el.cellIndex);\n};\n\n// IE returns wrong cellIndex when columns are hidden\nSortableTable.getCellIndex = function (oTd) {\n var cells = oTd.parentNode.childNodes\n var l = cells.length;\n var i;\n for (i = 0; cells[i] != oTd && i < l; i++)\n ;\n return i;\n};\n\nSortableTable.prototype.getSortType = function (nColumn) {\n return this.sortTypes[nColumn] || "String";\n};\n\n// only nColumn is required\n// if bDescending is left out the old value is taken into account\n// if sSortType is left out the sort type is found from the sortTypes array\n\nSortableTable.prototype.sort = function (nColumn, bDescending, sSortType) {\n if (!this.tBody) return;\n if (sSortType == null)\n sSortType = this.getSortType(nColumn);\n\n // exit if None\n if (sSortType == "None")\n return;\n\n if (bDescending == null) {\n if (this.sortColumn != nColumn)\n this.descending = this.defaultDescending;\n else\n this.descending = !this.descending;\n }\n else\n this.descending = bDescending;\n\n this.sortColumn = nColumn;\n\n if (typeof this.onbeforesort == "function")\n this.onbeforesort();\n\n var f = this.getSortFunction(sSortType, nColumn);\n var a = this.getCache(sSortType, nColumn);\n var tBody = this.tBody;\n\n a.sort(f);\n\n if (this.descending)\n a.reverse();\n\n if (SortableTable.removeBeforeSort) {\n // remove from doc\n var nextSibling = tBody.nextSibling;\n var p = tBody.parentNode;\n p.removeChild(tBody);\n }\n\n // insert in the new order\n var l = a.length;\n for (var i = 0; i < l; i++)\n tBody.appendChild(a[i].element);\n\n if (SortableTable.removeBeforeSort) {\n // insert into doc\n p.insertBefore(tBody, nextSibling);\n }\n\n this.updateHeaderArrows();\n\n this.destroyCache(a);\n\n if (typeof this.onsort == "function")\n this.onsort();\n};\n\nSortableTable.prototype.asyncSort = function (nColumn, bDescending, sSortType) {\n var oThis = this;\n this._asyncsort = function () {\n oThis.sort(nColumn, bDescending, sSortType);\n };\n window.setTimeout(this._asyncsort, 1);\n};\n\nSortableTable.prototype.getCache = function (sType, nColumn) {\n if (!this.tBody) return [];\n var rows = this.tBody.rows;\n var l = rows.length;\n var a = new Array(l);\n var r;\n for (var i = 0; i < l; i++) {\n r = rows[i];\n a[i] = {\n value: this.getRowValue(r, sType, nColumn),\n element: r\n };\n };\n return a;\n};\n\nSortableTable.prototype.destroyCache = function (oArray) {\n var l = oArray.length;\n for (var i = 0; i < l; i++) {\n oArray[i].value = null;\n oArray[i].element = null;\n oArray[i] = null;\n }\n};\n\nSortableTable.prototype.getRowValue = function (oRow, sType, nColumn) {\n // if we have defined a custom getRowValue use that\n if (this._sortTypeInfo[sType] && this._sortTypeInfo[sType].getRowValue)\n return this._sortTypeInfo[sType].getRowValue(oRow, nColumn);\n\n var s;\n var c = oRow.cells[nColumn];\n if (typeof c.innerText != "undefined")\n s = c.innerText;\n else\n s = SortableTable.getInnerText(c);\n return this.getValueFromString(s, sType);\n};\n\nSortableTable.getInnerText = function (oNode) {\n var s = "";\n var cs = oNode.childNodes;\n var l = cs.length;\n for (var i = 0; i < l; i++) {\n switch (cs[i].nodeType) {\n case 1: //ELEMENT_NODE\n s += SortableTable.getInnerText(cs[i]);\n break;\n case 3: //TEXT_NODE\n s += cs[i].nodeValue;\n break;\n }\n }\n return s;\n};\n\nSortableTable.prototype.getValueFromString = function (sText, sType) {\n if (this._sortTypeInfo[sType])\n return this._sortTypeInfo[sType].getValueFromString( sText );\n return sText;\n /*\n switch (sType) {\n case "Number":\n return Number(sText);\n case "CaseInsensitiveString":\n return sText.toUpperCase();\n case "Date":\n var parts = sText.split("-");\n var d = new Date(0);\n d.setFullYear(parts[0]);\n d.setDate(parts[2]);\n d.setMonth(parts[1] - 1);\n return d.valueOf();\n }\n return sText;\n */\n };\n\nSortableTable.prototype.getSortFunction = function (sType, nColumn) {\n if (this._sortTypeInfo[sType])\n return this._sortTypeInfo[sType].compare;\n return SortableTable.basicCompare;\n};\n\nSortableTable.prototype.destroy = function () {\n this.uninitHeader();\n var win = this.document.parentWindow;\n if (win && typeof win.detachEvent != "undefined") { // only IE needs this\n win.detachEvent("onunload", this._onunload);\n }\n this._onunload = null;\n this.element = null;\n this.tHead = null;\n this.tBody = null;\n this.document = null;\n this._headerOnclick = null;\n this.sortTypes = null;\n this._asyncsort = null;\n this.onsort = null;\n};\n\n// Adds a sort type to all instance of SortableTable\n// sType : String - the identifier of the sort type\n// fGetValueFromString : function ( s : string ) : T - A function that takes a\n// string and casts it to a desired format. If left out the string is just\n// returned\n// fCompareFunction : function ( n1 : T, n2 : T ) : Number - A normal JS sort\n// compare function. Takes two values and compares them. If left out less than,\n// <, compare is used\n// fGetRowValue : function( oRow : HTMLTRElement, nColumn : int ) : T - A function\n// that takes the row and the column index and returns the value used to compare.\n// If left out then the innerText is first taken for the cell and then the\n// fGetValueFromString is used to convert that string the desired value and type\n\nSortableTable.prototype.addSortType = function (sType, fGetValueFromString, fCompareFunction, fGetRowValue) {\n this._sortTypeInfo[sType] = {\n type: sType,\n getValueFromString: fGetValueFromString || SortableTable.idFunction,\n compare: fCompareFunction || SortableTable.basicCompare,\n getRowValue: fGetRowValue\n };\n};\n\n// this removes the sort type from all instances of SortableTable\nSortableTable.prototype.removeSortType = function (sType) {\n delete this._sortTypeInfo[sType];\n};\n\nSortableTable.basicCompare = function compare(n1, n2) {\n if (n1.value < n2.value)\n return -1;\n if (n2.value < n1.value)\n return 1;\n return 0;\n};\n\nSortableTable.idFunction = function (x) {\n return x;\n};\n\nSortableTable.toUpperCase = function (s) {\n return s.toUpperCase();\n};\n\nSortableTable.toDate = function (s) {\n var parts = s.split("-");\n var d = new Date(0);\n d.setFullYear(parts[0]);\n d.setDate(parts[2]);\n d.setMonth(parts[1] - 1);\n return d.valueOf();\n};\n\n\n// add sort types\nSortableTable.prototype.addSortType("Number", Number);\nSortableTable.prototype.addSortType("CaseInsensitiveString", SortableTable.toUpperCase);\nSortableTable.prototype.addSortType("Date", SortableTable.toDate);\nSortableTable.prototype.addSortType("String");\n// None is a special case\n'}});
\ No newline at end of file
diff --git a/package.json b/package.json
index 4c93fa05..19f177ff 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "tablefilter",
- "version": "0.2.65",
+ "version": "0.3.0",
"description": "A Javascript library making HTML tables filterable and a bit more",
"license": "MIT",
"author": {
diff --git a/src/const.js b/src/const.js
index eb3e24e7..79b6a964 100644
--- a/src/const.js
+++ b/src/const.js
@@ -73,6 +73,40 @@ export const HEADER_TAG = 'TH';
*/
export const CELL_TAG = 'TD';
+/**
+ * Data types
+ */
+
+/**
+ * String
+ * @type {String}
+ */
+export const STRING = 'string';
+
+/**
+ * Number
+ * @type {String}
+ */
+export const NUMBER = 'number';
+
+/**
+ * Formatted number
+ * @type {String}
+ */
+export const FORMATTED_NUMBER = 'formatted-number';
+
+/**
+ * Formatted number
+ * @type {String}
+ */
+export const FORMATTED_NUMBER_EU = 'formatted-number-eu';
+
+/**
+ *IP address
+ * @type {String}
+ */
+export const IP_ADDRESS = 'ipaddress';
+
/**
* Default values
*/
diff --git a/src/extensions/sort/adapterSortabletable.js b/src/extensions/sort/adapterSortabletable.js
index c46b37cb..476847bc 100644
--- a/src/extensions/sort/adapterSortabletable.js
+++ b/src/extensions/sort/adapterSortabletable.js
@@ -3,8 +3,11 @@ import {isArray, isFn, isUndef} from '../../types';
import {createElm, elm, getText, tag} from '../../dom';
import {addEvt} from '../../event';
import {formatDate} from '../../date';
-import {removeNbFormat} from '../../helpers';
-import {NONE, CELL_TAG, HEADER_TAG} from '../../const';
+import {unformat as unformatNb} from '../../number';
+import {
+ NONE, CELL_TAG, HEADER_TAG, STRING, NUMBER, FORMATTED_NUMBER,
+ FORMATTED_NUMBER_EU, IP_ADDRESS
+} from '../../const';
/**
* SortableTable Adapter module
@@ -401,8 +404,9 @@ export default class AdapterSortableTable extends Feature {
colType = 'None';
}
} else { // resolve column types
- if (tf.hasColNbFormat && tf.colNbFormat[i] !== null) {
- colType = tf.colNbFormat[i].toLowerCase();
+ if (tf.hasType(i, [NUMBER, FORMATTED_NUMBER,
+ FORMATTED_NUMBER_EU, IP_ADDRESS])) {
+ colType = tf.colTypes[i].toLowerCase();
} else if (tf.hasColDateType && tf.colDateType[i] !== null) {
colType = tf.colDateType[i].toLowerCase() + 'date';
} else {
@@ -415,17 +419,17 @@ export default class AdapterSortableTable extends Feature {
//Public TF method to add sort type
//Custom sort types
- this.addSortType('number', Number);
+ this.addSortType(NUMBER, Number);
this.addSortType('caseinsensitivestring', SortableTable.toUpperCase);
this.addSortType('date', SortableTable.toDate);
- this.addSortType('string');
- this.addSortType('us', usNumberConverter);
- this.addSortType('eu', euNumberConverter);
+ this.addSortType(STRING);
+ this.addSortType(FORMATTED_NUMBER, usNumberConverter);
+ this.addSortType(FORMATTED_NUMBER_EU, euNumberConverter);
this.addSortType('dmydate', dmyDateConverter);
this.addSortType('ymddate', ymdDateConverter);
this.addSortType('mdydate', mdyDateConverter);
this.addSortType('ddmmmyyyydate', ddmmmyyyyDateConverter);
- this.addSortType('ipaddress', ipAddress, sortIP);
+ this.addSortType(IP_ADDRESS, ipAddress, sortIP);
this.stt = new SortableTable(tf.tbl, _sortTypes);
@@ -483,10 +487,10 @@ export default class AdapterSortableTable extends Feature {
//Converters
function usNumberConverter(s) {
- return removeNbFormat(s, 'us');
+ return unformatNb(s, FORMATTED_NUMBER);
}
function euNumberConverter(s) {
- return removeNbFormat(s, 'eu');
+ return unformatNb(s, FORMATTED_NUMBER_EU);
}
function dateConverter(s, format) {
return formatDate(s, format);
diff --git a/src/helpers.js b/src/helpers.js
deleted file mode 100644
index f859bc3b..00000000
--- a/src/helpers.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Misc helpers
- */
-
-/**
- * Returns a unformatted number
- * @param {String} Formatted number
- * @param {String} Format type, currently 'us' or 'eu'
- * @return {String} Unformatted number
- */
-export const removeNbFormat = (data, format = 'us') => {
- let n = data;
- if (format.toLowerCase() === 'us') {
- n = + n.replace(/[^\d\.-]/g, '');
- } else {
- n = + n.replace(/[^\d\,-]/g, '').replace(',', '.');
- }
- return n;
-}
diff --git a/src/number.js b/src/number.js
new file mode 100644
index 00000000..da49a356
--- /dev/null
+++ b/src/number.js
@@ -0,0 +1,30 @@
+import {isNumber} from './types';
+import {FORMATTED_NUMBER} from './const';
+
+/**
+ * Returns a number for a formatted number
+ * @param {String} Formatted number
+ * @param {String} Format type, currently 'formatted-number' or
+ * 'formatted-number-eu'
+ * @return {Number} Unformatted number
+ */
+export const unformat = (value, format = FORMATTED_NUMBER) => {
+ // Return the value as-is if it's already a number
+ if (isNumber(value)) {
+ return value;
+ }
+
+ // Build regex to strip out everything except digits, decimal point and
+ // minus sign
+ let decimal = format !== FORMATTED_NUMBER ? ',' : '.';
+ let regex = new RegExp('[^0-9-' + decimal + ']', ['g']);
+ let unformatted = parseFloat(
+ ('' + value)
+ .replace(/\((.*)\)/, '-$1') // replace bracketed values with negatives
+ .replace(regex, '') // strip out any cruft
+ .replace(decimal, '.') // make sure decimal point is standard
+ );
+
+ // This will fail silently
+ return !isNaN(unformatted) ? unformatted : 0;
+}
diff --git a/src/tablefilter.js b/src/tablefilter.js
index dad3fb3e..33f6cd3c 100644
--- a/src/tablefilter.js
+++ b/src/tablefilter.js
@@ -8,7 +8,7 @@ import {isEmpty as isEmptyString} from './string';
import {isArray, isEmpty, isFn, isNumber, isObj, isString, isUndef}
from './types';
import {formatDate, isValidDate} from './date';
-import {removeNbFormat} from './helpers';
+import {unformat as unformatNb} from './number'
import {root} from './root';
import {Emitter} from './emitter';
@@ -30,7 +30,7 @@ import {State} from './modules/state';
import {
INPUT, SELECT, MULTIPLE, CHECKLIST, NONE,
ENTER_KEY, TAB_KEY, ESC_KEY, UP_ARROW_KEY, DOWN_ARROW_KEY,
- CELL_TAG, AUTO_FILTER_DELAY
+ CELL_TAG, AUTO_FILTER_DELAY, NUMBER, FORMATTED_NUMBER, FORMATTED_NUMBER_EU
} from './const';
let doc = root.document;
@@ -856,21 +856,6 @@ export class TableFilter {
*/
this.decimalSeparator = f.decimal_separator || '.';
- /**
- * Determine whether table has columns with numeric formats
- * @type {Boolean}
- * @private
- */
- this.hasColNbFormat = isArray(f.col_number_format);
-
- /**
- * Define numeric format on a column basis, two possible values 'EU' and
- * 'US', ie:
- * col_number_format : [null, 'US', 'EU', null]
- * @type {Array}
- */
- this.colNbFormat = this.hasColNbFormat ? f.col_number_format : null;
-
/**
* Determine whether table has columns with date types
* @type {Boolean}
@@ -886,6 +871,23 @@ export class TableFilter {
*/
this.colDateType = this.hasColDateType ? f.col_date_type : null;
+ /**
+ * Determine whether table has columns data types
+ * @type {Boolean}
+ * @private
+ */
+ this.hasColTypes = isArray(f.col_types);
+
+ /**
+ * Define data types on a column basis, possible values 'string',
+ * 'number', 'formatted-number', 'formatted-number-eu', 'DMY', 'MDY',
+ * 'YMD', 'DDMMMYYYY', 'ipaddress' ie:
+ * col_types : ['formatted-number', 'DMY', 'MDY', 'YMD', null,
+ * 'DDMMMYYYY']
+ * @type {Array}
+ */
+ this.colTypes = this.hasColTypes ? f.col_types : [];
+
/*** ids prefixes ***/
/**
* Main prefix
@@ -1862,42 +1864,53 @@ export class TableFilter {
}
else {
- //first numbers need to be formated
- if (this.hasColNbFormat && this.colNbFormat[j]) {
- numCellData = removeNbFormat(cellData, this.colNbFormat[j]);
- nbFormat = this.colNbFormat[j];
+ //first numbers need to be unformatted
+ if (this.hasType(j, [NUMBER])) {
+ numCellData = Number(cellData);
+ }
+ else if (this.hasType(j,
+ [FORMATTED_NUMBER, FORMATTED_NUMBER_EU])) {
+ numCellData = unformatNb(cellData, this.colTypes[j]);
+ nbFormat = this.colTypes[j];
} else {
if (this.thousandsSeparator === ',' &&
this.decimalSeparator === '.') {
- numCellData = removeNbFormat(cellData, 'us');
- nbFormat = 'us';
+ nbFormat = FORMATTED_NUMBER;
} else {
- numCellData = removeNbFormat(cellData, 'eu');
- nbFormat = 'eu';
+ nbFormat = FORMATTED_NUMBER_EU;
}
+ numCellData = unformatNb(cellData, nbFormat);
}
// first checks if there is any operator (<,>,<=,>=,!,*,=,{,},
// rgx:)
// lower equal
if (hasLE) {
- occurence = numCellData <= removeNbFormat(
- sA.replace(re_le, ''), nbFormat);
+ occurence = numCellData <= unformatNb(
+ sA.replace(re_le, ''),
+ nbFormat
+ );
}
//greater equal
else if (hasGE) {
- occurence = numCellData >= removeNbFormat(
- sA.replace(re_ge, ''), nbFormat);
+ occurence = numCellData >= unformatNb(
+ sA.replace(re_ge, ''),
+ nbFormat
+ );
}
//lower
else if (hasLO) {
- occurence = numCellData < removeNbFormat(
- sA.replace(re_l, ''), nbFormat);
+ occurence = numCellData < unformatNb(
+ sA.replace(re_l, ''),
+ nbFormat
+ );
}
//greater
else if (hasGR) {
- occurence = numCellData > removeNbFormat(
- sA.replace(re_g, ''), nbFormat);
+ occurence = numCellData > unformatNb(
+ sA.replace(re_g, ''),
+ nbFormat
+ );
}
//different
else if (hasDF) {
@@ -1950,12 +1963,14 @@ export class TableFilter {
} else {
// If numeric type data, perform a strict equality test and
// fallback to unformatted number string comparison
- if (numCellData && this.hasColNbFormat &&
- this.colNbFormat[j] && !this.singleSearchFlt) {
- // removeNbFormat can return 0 for strings which are not
+ if (numCellData &&
+ this.hasType(j,
+ [NUMBER, FORMATTED_NUMBER, FORMATTED_NUMBER_EU]) &&
+ !this.singleSearchFlt) {
+ // unformatNb can return 0 for strings which are not
// formatted numbers, in that case return the original
- // string. TODO: handle this in removeNbFormat
- sA = removeNbFormat(sA, nbFormat) || sA;
+ // string. TODO: handle this in unformatNb
+ sA = unformatNb(sA, nbFormat) || sA;
occurence = numCellData === sA ||
contains(sA.toString(), numCellData.toString(),
this.isExactMatch(j), this.caseSensitive);
@@ -2111,11 +2126,11 @@ export class TableFilter {
if (j !== colIndex || row[i].style.display !== '') {
continue;
}
- let cellData = this.getCellData(cell[j]),
- nbFormat = this.colNbFormat ?
- this.colNbFormat[colIndex] : undefined,
- data = num ? removeNbFormat(cellData, nbFormat) :
- cellData;
+ let cellData = this.getCellData(cell[j]);
+ let nbFormat = this.hasType(colIndex,
+ [FORMATTED_NUMBER, FORMATTED_NUMBER_EU]) ?
+ this.colTypes[colIndex] : undefined;
+ let data = num ? unformatNb(cellData, nbFormat) : cellData;
colValues.push(data);
}
}
@@ -2823,6 +2838,17 @@ export class TableFilter {
return (nbRows - 1);
}
+ /**
+ * Determine whether the specified column has one of the passed types
+ * @param {Number} colIndex Column index
+ * @param {Array} [types=[]] List of column types
+ * @returns {Boolean}
+ */
+ hasType(colIndex, types = []) {
+ return this.hasColTypes &&
+ types.indexOf(this.colTypes[colIndex]) !== -1;
+ }
+
/**
* Get the header DOM element for a given column index
* @param {Number} colIndex Column index
diff --git a/static/templates/data-types.html b/static/templates/data-types.html
index 70e793d0..71b10068 100644
--- a/static/templates/data-types.html
+++ b/static/templates/data-types.html
@@ -15,8 +15,8 @@
"," thousands separator and "." decimal separator for US$
- Use the col_number_format property to set numeric formats
- ('EU', 'US' or 'IPADDRESS') and col_date_type to set date
+ Use the col_types property to set numeric formats
+ ('formatted-number', 'formatted-number-eu' or 'ipaddress') and col_date_type to set date
types.
@@ -75,11 +75,11 @@ var tfConfig = {
btn_reset: true,
loader: true,
status_bar: true,
- col_number_format: [
+ col_types: [
null, null, null,
- 'EU', 'US', null,
+ 'formatted-number-eu', 'formatted-number', null,
null, null, null,
- 'IpAddress'
+ 'ipaddress'
],
col_date_type: [
null, null, null,
diff --git a/static/templates/demo.html b/static/templates/demo.html
index 8684e947..d9981c1b 100644
--- a/static/templates/demo.html
+++ b/static/templates/demo.html
@@ -26,10 +26,10 @@
mark_active_columns: true,
no_results_message: true,
responsive: true,
- col_number_format: [
- null, null, 'US',
- 'US', 'US', 'US',
- 'US', 'US', 'US'
+ col_types: [
+ 'string', 'string', 'number',
+ 'number', 'number', 'number',
+ 'number', 'number', 'number'
],
custom_options: {
cols:[3],
diff --git a/static/templates/external-filters.html b/static/templates/external-filters.html
index 6ce01896..36c77f00 100644
--- a/static/templates/external-filters.html
+++ b/static/templates/external-filters.html
@@ -88,10 +88,10 @@ var tfConfig = {
status: true,
status_bar: true,
status_bar_target_id: 'statusDiv',
- col_number_format: [
- null, null, 'US',
- 'US', 'US', 'US',
- 'US', 'US', 'US'
+ col_types: [
+ 'string', 'string', 'number',
+ 'number', 'number', 'number',
+ 'number', 'number', 'number'
],
display_all_text: " [ Show all ] ",
col_0: "multiple",
diff --git a/static/templates/filter-images.html b/static/templates/filter-images.html
index c27d494f..e2380b29 100644
--- a/static/templates/filter-images.html
+++ b/static/templates/filter-images.html
@@ -22,9 +22,9 @@ var tfConfig = {
base_path: '../dist/tablefilter/',
filters_row_index: 2,
headers_row_index: 1,
- col_number_format: [
+ col_types: [
null, null, null,
- 'US', null, null, null
+ 'number', null, null, null
],
col_date_type: [
null, null, null,
diff --git a/static/templates/grouped-headers.html b/static/templates/grouped-headers.html
index 0a50dba1..7da57921 100644
--- a/static/templates/grouped-headers.html
+++ b/static/templates/grouped-headers.html
@@ -40,10 +40,10 @@ var tfConfig = {
col_0: 'multiple',
col_1: 'select',
col_2: 'checklist',
- col_number_format: [
- null, null, 'US',
- 'US', 'US', 'US',
- 'US', 'US', 'US'
+ col_types: [
+ 'string', 'string', 'number',
+ 'number', 'number', 'number',
+ 'number', 'number', 'number'
],
filters_row_index: 3,
headers_row_index: 2,
diff --git a/static/templates/starter.html b/static/templates/starter.html
index 3dde11fa..ae837e5d 100644
--- a/static/templates/starter.html
+++ b/static/templates/starter.html
@@ -24,10 +24,10 @@
status_bar: true,
mark_active_columns: true,
highlight_keywords: true,
- col_number_format: [
- null, null, 'US',
- 'US', 'US', 'US',
- 'US', 'US', 'US'
+ col_types: [
+ 'string', 'string', 'number',
+ 'number', 'number', 'number',
+ 'number', 'number', 'number'
],
custom_options: {
cols:[3],
diff --git a/static/templates/theme-roller.html b/static/templates/theme-roller.html
index dbdef3cc..2c24af71 100644
--- a/static/templates/theme-roller.html
+++ b/static/templates/theme-roller.html
@@ -30,9 +30,9 @@ var tfConfig = {
filters_row_index: 2,
headers_row_index: 1,
sort: true,
- col_number_format: [
- null, null, 'US',
- null, null, null
+ col_types: [
+ 'string', 'string', 'number',
+ 'string', 'string', 'string'
],
col_date_type: [
null, null, null,
diff --git a/test/test-data-types.js b/test/test-data-types.js
index 882be7fb..0e1297fb 100644
--- a/test/test-data-types.js
+++ b/test/test-data-types.js
@@ -2,9 +2,9 @@
// TODO: add sort to test it with different column types
var tf = new TableFilter('demo', {
base_path: '../dist/tablefilter/',
- col_number_format: [
+ col_types: [
null, null, null,
- 'EU', 'US', null,
+ 'formatted-number-eu', 'formatted-number', null,
null, null, null,
'IpAddress'
],
@@ -21,7 +21,11 @@
module('Sanity checks');
test('Data types', function() {
deepEqual(tf instanceof TableFilter, true, 'TableFilter instanciated');
- deepEqual(tf.hasColNbFormat, true, 'Has number column types');
+ deepEqual(
+ tf.hasType(3, ['formatted-number-eu', 'formatted-number']) &&
+ tf.hasType(4, ['formatted-number-eu', 'formatted-number']),
+ true, 'Has number column types'
+ );
deepEqual(tf.hasColDateType, true, 'Has date column tyoes');
});
@@ -86,7 +90,7 @@
deepEqual(tf.getValidRows(), [7], 'Expected rows');
});
- test('Can filter a US formatted number', function() {
+ test('Can filter a formatted number', function() {
// setup
tf.clearFilters();
@@ -98,7 +102,7 @@
deepEqual(tf.getValidRows(), [6], 'Expected rows');
});
- test('Can filter a US formatted number column with a number', function() {
+ test('Can filter a formatted number column with a number', function() {
// setup
tf.clearFilters();
@@ -110,7 +114,7 @@
deepEqual(tf.getValidRows(), [14], 'Expected rows');
});
- test('Can filter a US formatted number column with a number without ' +
+ test('Can filter a formatted number column with a number without ' +
'thousands separator', function() {
// setup
tf.clearFilters();
@@ -123,7 +127,7 @@
deepEqual(tf.getValidRows(), [13], 'Expected rows');
});
- test('Can filter a US formatted number column with a number without ' +
+ test('Can filter a formatted number column with a number without ' +
'decimals', function() {
// setup
tf.clearFilters();
@@ -161,7 +165,7 @@
deepEqual(tf.getValidRows(), [17], 'Expected rows');
});
- test('Can filter a US formatted date column', function() {
+ test('Can filter a formatted date column', function() {
// setup
tf.clearFilters();
@@ -173,7 +177,7 @@
deepEqual(tf.getValidRows(), [16], 'Expected rows');
});
- test('Can filter a US formatted date column with different date separator',
+ test('Can filter a formatted date column with different date separator',
function() {
// setup
tf.clearFilters();
diff --git a/test/test-filtering.js b/test/test-filtering.js
index 386102ea..117c2d70 100644
--- a/test/test-filtering.js
+++ b/test/test-filtering.js
@@ -4,9 +4,9 @@ var tf = new TableFilter('demo', {
null, null, 'ddmmmyyyy',
null, null, null
],
- col_number_format: [
+ col_types: [
null, null, null,
- null, null, 'US'
+ null, null, 'formatted-number'
]
});
tf.init();