1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-05-17 22:06:41 +02:00
TableFilter/dist/tablefilter/tf-1.js

8 lines
48 KiB
JavaScript
Raw Normal View History

2016-10-22 10:38:03 +02:00
/**
* tablefilter v0.4.0 by Max Guglielmi
* build date: 2016-10-22T08:31:21.770Z
* MIT License
*/
webpackJsonp([1],{435:function(t,e,n){function o(t){return n(i(t))}function i(t){return s[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}var s={"./array":16,"./array.js":16,"./const":11,"./const.js":11,"./cookie":29,"./cookie.js":29,"./dom":3,"./dom.js":3,"./emitter":8,"./emitter.js":8,"./event":1,"./event.js":1,"./extensions/advancedGrid/adapterEzEditTable":436,"./extensions/advancedGrid/adapterEzEditTable.js":436,"./extensions/advancedGrid/advancedGrid":437,"./extensions/advancedGrid/advancedGrid.js":437,"./extensions/colOps/colOps":438,"./extensions/colOps/colOps.js":438,"./extensions/colsVisibility/colsVisibility":439,"./extensions/colsVisibility/colsVisibility.js":439,"./extensions/filtersVisibility/filtersVisibility":440,"./extensions/filtersVisibility/filtersVisibility.js":440,"./extensions/sort/adapterSortabletable":441,"./extensions/sort/adapterSortabletable.js":441,"./extensions/sort/sort":442,"./extensions/sort/sort.js":442,"./feature":10,"./feature.js":10,"./modules/alternateRows":24,"./modules/alternateRows.js":24,"./modules/checkList":18,"./modules/checkList.js":18,"./modules/clearButton":22,"./modules/clearButton.js":22,"./modules/dateType":30,"./modules/dateType.js":30,"./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,"./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,t.exports=o,o.id=435},436:function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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 s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var 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(t){function e(n,s){o(this,e);var l=i(this,t.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&&n.gridLayout,l._ezEditTable=null,l.cfg=s,l.enable(),l}return s(e,t),e.prototype.init=function(){var t=this;if(!this.initialized){var e=this.tf;if(d.root.EditTable)this._setAdvancedGrid();else{var n=this.vendorPath+this.filename;e["import"](this.filename,n,function(){return t._setAdvancedGrid()})}this.loadStylesheet&&!e.isImported(this.stylesheet,"link")&&e["import"](this.stylesheetName,this.stylesheet,null,"link"),this.emitter.on(["filter-focus","filter-blur"],function(){return t._toggleForInputFilter()}),this.initialized=!0}},e.prototype._setAdvancedGrid=function(){var t=this.tf,e=void 0,n=this.cfg,o=(0,r.tag)(t.tbl,"thead");e=o.length>0&&!n.startRow?void 0:n.startRow||t.refRow,n.base_path=n.base_path||t.basePath+"ezEditTable/";var i=n.editable,s=n.selection;s&&(n.default_selection=n.default_selection||"row"),n.a
for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var o=e[0],i=e[1],s=e[2];SortableTable.prototype.addSortType(o,i,s)},e.prototype.setSortTypes=function(){for(var t=this,e=this.tf,n=this.sortTypes,o=[],i=0;i<e.nbCells;i++){var s=void 0;if(n[i])if(s=n[i],(0,d.isObj)(s)){if(s.type===p.DATE)s=this._addDateType(i,n);else if(s.type===p.FORMATTED_NUMBER){var a=s.decimal||e.decimalSeparator;s=this._addNumberType(i,a)}}else s=s.toLowerCase(),s===p.DATE?s=this._addDateType(i,n):s===p.FORMATTED_NUMBER||s===p.NUMBER?s=this._addNumberType(i,e.decimalSeparator):s===p.NONE&&(s="None");else s=p.STRING;o.push(s)}this.addSortType("caseinsensitivestring",SortableTable.toUpperCase),this.addSortType(p.STRING),this.addSortType(p.IP_ADDRESS,l,r),this.stt=new SortableTable(e.tbl,o),this.asyncSort&&this.triggerIds.length>0&&!function(){for(var e=t.triggerIds,n=0;n<e.length;n++)if(null!==e[n]){var i=(0,c.elm)(e[n]);i&&(i.style.cursor="pointer",(0,u.addEvt)(i,"click",function(n){var o=n.target;t.tf.sort&&t.stt.asyncSort(e.indexOf(o.id))}),i.setAttribute("_sortType",o[n]))}}()},e.prototype._addDateType=function(t,e){var n=this.tf,o=n.feature("dateType"),i=o.getOptions(t,e).locale||n.locale,s=p.DATE+"-"+i;return this.addSortType(s,function(t){return o.parse(t,i)}),s},e.prototype._addNumberType=function(t,e){var n=""+p.FORMATTED_NUMBER+("."===e?"":"-custom");return this.addSortType(n,function(t){return(0,h.parse)(t,e)}),n},e.prototype.destroy=function(){var t=this;if(this.initialized){var e=this.tf;this.emitter.off(["sort"],function(e,n,o){return t.sortByColumnIndex(n,o)}),this.sorted=!1,this.stt.destroy();for(var n=e.getFiltersId(),o=0;o<n.length;o++){var i=e.getHeaderElement(o),s=(0,c.tag)(i,"img");1===s.length&&i.removeChild(s[0])}this.initialized=!1}},e}(a.Feature);e["default"]=f},442:function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(441),s=o(i),l=n(2);l.root.SortableTable||n(443),e["default"]=s["default"]},443:function(t,e,n){n(444)(n(445))},444:function(t,e){t.exports=function(t){"undefined"!=typeof execScript?execScript(t):eval.call(null,t)}},445:function(t,e){t.exports='/*----------------------------------------------------------------------------\\\n| Sortable Table 1.12 |\n|-----------------------------------------------------------------------------|\n| Created by Erik Arvidsson |\n| (http://webfx.eae.net/contact.html#erik) |\n| For WebFX (http://webfx.eae.net/) |\n|-----------------------------------------------------------------------------|\n| A DOM 1 based script that allows an ordinary HTML table to be sortable. |\n|-----------------------------------------------------------------------------|\n| Copyright (c) 1998 - 2006 Erik Arvidsson |\n|-----------------------------------------------------------------------------|\n| Licensed under the Apache License, Version 2.0 (the "License"); you may not |\n| use this file except in compliance with the License. You may obtain a copy |\n| of the License at http://www.apache.org/licenses/LICENSE-2.0 |\n| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |\n| Unless required by applicable law or agreed to in writing, software |\n| distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |\n| WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |\n| License for the specific language governing permissions and limitations |\n| under the License. |\n|-----------------------------------------------------------------------------|\n| 2003-01-10 | First version |\n| 2003-01-19 | Minor changes to the date parsing |\n| 2003-01-28 | JScript 5.0 fixes (no s