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

14 lines
216 KiB
JavaScript
Raw Normal View History

/**
* tablefilter v0.5.11 by Max Guglielmi
* build date: 2017-05-02T12:24:55.498Z
* MIT License
*/
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i=e();for(var n in i)("object"==typeof exports?exports:t)[n]=i[n]}}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var s=n[i]={i:i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,e),s.l=!0,s.exports}var i=window.webpackJsonp;window.webpackJsonp=function(e,n,r){for(var o,a,u=0,l=[];u<e.length;u++)a=e[u],s[a]&&l.push(s[a][0]),s[a]=0;for(o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);for(i&&i(e,n,r);l.length;)l.shift()()};var n={},s={1:0};return e.e=function(t){function i(){r.onerror=r.onload=null,clearTimeout(o);var e=s[t];0!==e&&(e&&e[1](new Error("Loading chunk "+t+" failed.")),s[t]=void 0)}if(0===s[t])return Promise.resolve();if(s[t])return s[t][2];var n=document.getElementsByTagName("head")[0],r=document.createElement("script");r.type="text/javascript",r.charset="utf-8",r.async=!0,r.timeout=12e4,e.nc&&r.setAttribute("nonce",e.nc),r.src=e.p+"tf-"+({}[t]||t)+"-"+{0:"886b2baf76de863145b7"}[t]+".js";var o=setTimeout(i,12e4);r.onerror=r.onload=i;var a=new Promise(function(e,i){s[t]=[e,i]});return s[t][2]=a,n.appendChild(r),a},e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e.oe=function(t){throw console.error(t),t},e(e.s=124)}([function(t,e,i){(function(e){(function(){"use strict";function i(){if(N=D[O],!N){if(N=function(t){return U(N,function(e,i){T(A,i)&&e.extend(t)}),N},R)t.exports=N;else try{D[O]=N}catch(t){}U(F.split(" "),function(t){n(t)}),s()}}function n(t){function e(t,e,i){C(n,t,function(t,s,r){var u=a(t,s,r);return o(n,u.methods,e,i,u.last),n})}var i="Object"===t,n=d(t,!0),s=function(e){function s(t,e){return i&&e===p&&(!M||"get"===t||"set"===t)}function r(t,i){var n=e[t];if(n)for(var s,r=0;s=n[r];r++)if(s===i)return!0;return!1}function o(t,i){return e[t]&&!r(t,i)}function a(t,i,n){if(!i[t]||!n)return!1;for(var s=0;s<n.length;s++)if(e[n[s]]===!1)return!0}function u(){return r("except",d)||o("namespaces",d)}function l(t){return r("except",t)}function c(t,e,i){return!s(t,i)&&!a(t,i,e.flags)&&!l(t)}var h,d=D[t],p=d.prototype,m={},g={};if(e=e||{},h=e.methods,!u())return i&&"boolean"==typeof e.objectPrototype&&(M=e.objectPrototype),U(h||n,function(t,e){h&&(e=t,t=n[e]),T(t,"instance")&&c(e,t,p)&&(g[e]=t.instance),T(t,"static")&&c(e,t,d)&&(m[e]=t)}),f(d,m),f(p,g),h||C(n,"active",!0),n};return e("defineStatic",P),e("defineInstance",S),e("defineInstanceAndStatic",S|P),e("defineStaticWithArguments",P,!0),e("defineInstanceWithArguments",S,!0),C(n,"defineStaticPolyfill",function(e,i,s){var r=a(e,i,s);return f(D[t],r.methods,!0,r.last),n}),C(n,"defineInstancePolyfill",function(e,i,s){var r=a(e,i,s);return f(D[t].prototype,r.methods,!0,r.last),U(r.methods,function(t,e){p(n,e,t)}),n}),C(n,"alias",function(t,e){var i="string"==typeof e?n[e]:e;return h(n,t,i),n}),C(n,"extend",s),A[t]=n,L["[object "+t+"]"]=n,x(t),m(n),N[t]=n}function s(){C(N,"extend",N),C(N,"toString",r),C(N,"createNamespace",n),C(N,"util",{hasOwn:T,getOwn:k,setProperty:C,classToString:E,defineProperty:j,forEachProperty:U,mapNativeToChainable:x})}function r(){return O}function o(t,e,i,n,s){U(e,function(e,r){var o,a=e;n&&(a=l(e)),s&&(a.flags=s),i&S&&!e.instance&&(o=u(e,n),C(a,"instance",o)),i&P&&C(a,"static",!0),h(t,r,a),t.active&&t.extend(r)})}function a(t,e,i){var n,s;return"string"==typeof t?(n={},n[t]=e,s=i):(n=t,s=e),{last:s,methods:n}}function u(t,e){return e?l(t,!0):c(t)}function l(t,e){var i=t.length-1-(e?1:0);return function(){var n,s=[],r=[];e&&s.push(this),n=Math.max(arguments.length,i);for(var o=0;o<n;o++)o<i?s.push(arguments[o]):r.push(arguments[o]);return s.push(r),t.apply(this,s)}}function c(t){switch(t.length){case 0:case 1:return function(){return t(this)};case 2:return functio
var C=i.getCustomOptions(t);this.opts=C[0],this.optsTxt=C[1]}if(i.sortSlc&&!this.isCustom&&(f?(this.opts.sort(),this.excludedOpts&&this.excludedOpts.sort()):(this.opts.sort(c.ignoreCase),this.excludedOpts&&this.excludedOpts.sort(c.ignoreCase))),i.sortNumAsc.indexOf(t)!==-1)try{this.opts.sort(c.numSortAsc),this.excludedOpts&&this.excludedOpts.sort(c.numSortAsc),this.isCustom&&this.optsTxt.sort(c.numSortAsc)}catch(e){throw new Error(p.replace("{0}",t).replace("{1}","ascending"))}if(i.sortNumDesc.indexOf(t)!==-1)try{this.opts.sort(c.numSortDesc),this.excludedOpts&&this.excludedOpts.sort(c.numSortDesc),this.isCustom&&this.optsTxt.sort(c.numSortDesc)}catch(e){throw new Error(p.replace("{0}",t).replace("{1}","descending"))}this.addChecks(t,s),i.loadFltOnDemand&&(n.innerHTML=""),n.appendChild(s),n.setAttribute("filled","1"),this.emitter.emit("after-populating-filter",i,t,n)},e.prototype.addChecks=function(t,e){for(var i=this,n=this.tf,s=this.addTChecks(t,e),r=0;r<this.opts.length;r++){var o=this.opts[r],c=this.isCustom?this.optsTxt[r]:o,h=n.fltIds[t],p=(0,a.createCheckItem)(h+"_"+(r+s),o,c);p.className=this.itemCssClass,n.linkedFilters&&n.disableExcludedOptions&&(0,u.has)(this.excludedOpts,(0,l.matchCase)(o,n.caseSensitive),n.caseSensitive)?((0,a.addClass)(p,this.disabledItemCssClass),p.check.disabled=!0,p.disabled=!0):(0,f.addEvt)(p.check,"click",function(t){return i.optionClick(t)}),e.appendChild(p),""===o&&(p.style.display=d.NONE)}},e.prototype.addTChecks=function(t,e){var i=this,n=this.tf,s=1,r=n.fltIds[t],o=(0,a.createCheckItem)(r+"_0","",n.getClearFilterText(t));if(o.className=this.itemCssClass,e.appendChild(o),(0,f.addEvt)(o.check,"click",function(t){return i.optionClick(t)}),this.enableResetOption||(o.style.display=d.NONE),n.enableEmptyOption){var u=(0,a.createCheckItem)(r+"_1",n.emOperator,n.emptyText);u.className=this.itemCssClass,e.appendChild(u),(0,f.addEvt)(u.check,"click",function(t){return i.optionClick(t)}),s++}if(n.enableNonEmptyOption){var l=(0,a.createCheckItem)(r+"_2",n.nmOperator,n.nonEmptyText);l.className=this.itemCssClass,e.appendChild(l),(0,f.addEvt)(l.check,"click",function(t){return i.optionClick(t)}),s++}return s},e.prototype.setCheckListValues=function(t){if(t){var e=this.tf,i=t.value,n=parseInt(t.id.split("_")[2],10),s=e.getColumnIndexFromFilterId(t.id),r="LI",o=e.getFilterElement(parseInt(s,10)),u=o.childNodes[n],c=o.getAttribute("colIndex"),f=o.getAttribute("value"),h=o.getAttribute("indexes");if(t.checked){if(""===i){if(h&&""!==h)for(var d=h.split(e.separator),p=0;p<d.length;p++){var m=(0,a.elm)(e.fltIds[c]+"_"+d[p]);m&&(m.checked=!1,(0,a.removeClass)(o.childNodes[d[p]],this.selectedItemCssClass))}o.setAttribute("value",""),o.setAttribute("indexes","")}else f=f?f:"",i=(0,l.trim)(f+" "+i+" "+e.orOperator),n=h+n+e.separator,o.setAttribute("value",i),o.setAttribute("indexes",n),(0,a.elm)(e.fltIds[c]+"_0")&&((0,a.elm)(e.fltIds[c]+"_0").checked=!1);u.nodeName===r&&((0,a.removeClass)(o.childNodes[0],this.selectedItemCssClass),(0,a.addClass)(u,this.selectedItemCssClass))}else{if(""!==i){var g=new RegExp((0,l.rgxEsc)(i+" "+e.orOperator));f=f.replace(g,""),o.setAttribute("value",(0,l.trim)(f));var y=new RegExp((0,l.rgxEsc)(n+e.separator));h=h.replace(y,""),o.setAttribute("indexes",h)}u.nodeName===r&&(0,a.removeClass)(u,this.selectedItemCssClass)}}},e.prototype.selectOptions=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=this.tf,n=i.getFilterElement(t);if(i.getFilterType(t)===d.CHECKLIST&&n&&0!==e.length){var s=(0,a.tag)(n,"li").length;n.setAttribute("value",""),n.setAttribute("indexes","");for(var r=0;r<s;r++){var o=(0,a.tag)(n,"li")[r],c=(0,a.tag)(o,"label")[0],f=(0,a.tag)(o,"input")[0],h=(0,l.matchCase)((0,a.getText)(c),i.caseSensitive);""!==h&&(0,u.has)(e,h,i.caseSensitive)?f.checked=!0:e.indexOf(i.nmOperator)!==-1&&h===(0,l.matchCase)(i.nonEmptyText,i.caseSensitive)?f.checked=!0:e.indexOf(i.emOperator)!==-1&&h===(0,l.matchCase)(i.emptyText,i.caseSensitive)?f.checked=!0:f.checked=!1,this.setCheckListValues(f)}}},e.prototype.getValues=function(t){var e=this.tf,i=e.getFil
t.exports=n},function(t,e,i){"use strict";function n(t,e){var i=0,n=0;return r(function(t,s){if(n=o(e(t)),n>=1)return i=s,!1}),[n,i,t]}var s=i(6),r=i(60),o=s.abs;t.exports=n},function(t,e,i){"use strict";function n(t,e){return s(t,e)||s(t,e+"s")||"day"===e&&s(t,"date")}var s=i(136);t.exports=n},function(t,e,i){"use strict";function n(t){return 32-o(new Date(s(t),r(t),32),"Date")}var s=i(30),r=i(29),o=i(18);t.exports=n},function(t,e,i){"use strict";function n(t){return s(t,"Hours")}var s=i(18);t.exports=n},function(t,e,i){"use strict";function n(t,e){return t.length>1&&(t="(?:"+t+")"),e&&(t+="?"),t}t.exports=n},function(t,e,i){"use strict";function n(t,e){var i,n,u,c=s(t)?0:o(t);return u=e===!0?":":"",!c&&e?"Z":(i=a(r(-c/60),2,!0),n=a(l(c%60),2),i+u+n)}var s=i(21),r=i(23),o=i(49),a=i(53),u=i(6),l=u.abs;t.exports=n},function(t,e,i){"use strict";function n(t,e){var i=e-1;return s(t,7*a((r(t)-i)/7)+i),t}var s=i(24),r=i(20),o=i(6),a=o.ceil;t.exports=n},function(t,e,i){"use strict";function n(t,e,i){o(t,u),r(t,i),a(t,e)}var s=i(5),r=i(35),o=i(36),a=i(61),u=s.MONTH_INDEX;t.exports=n},function(t,e,i){"use strict";function n(t){return r(t,o)}var s=i(5),r=i(36),o=s.HOURS_INDEX;t.exports=n},function(t,e,i){"use strict";function n(t,e){if(g(e)){var i=f(t),n=h(t);m(i,y,v),o(i,r(i)+7*(e-1)),a(t,u(i)),c(t,l(i)),o(t,r(i)),d(t,n||7)}return t.getTime()}var s=i(62),r=i(34),o=i(35),a=i(226),u=i(30),l=i(29),c=i(225),f=i(33),h=i(20),d=i(24),p=i(3),m=i(94),g=p.isNumber,y=s.ISO_FIRST_DAY_OF_WEEK,v=s.ISO_FIRST_DAY_OF_WEEK_YEAR;t.exports=n},function(t,e,i){"use strict";function n(t,e){for(;t>=0&&e(s[t],t)!==!1;)t=r(t)}var s=i(31),r=i(39);t.exports=n},function(t,e,i){"use strict";var n=i(56),s=n({mdy:!0,firstDayOfWeek:0,firstDayOfWeekYear:1,short:"{MM}/{dd}/{yyyy}",medium:"{Month} {d}, {yyyy}",long:"{Month} {d}, {yyyy} {time}",full:"{Weekday}, {Month} {d}, {yyyy} {time}",stamp:"{Dow} {Mon} {d} {yyyy} {time}",time:"{h}:{mm} {TT}"});t.exports=s},function(t,e,i){"use strict";var n={ISO8601:"{yyyy}-{MM}-{dd}T{HH}:{mm}:{ss}.{SSS}{Z}",RFC1123:"{Dow}, {dd} {Mon} {yyyy} {HH}:{mm}:{ss} {ZZ}",RFC1036:"{Weekday}, {dd}-{Mon}-{yy} {HH}:{mm}:{ss} {ZZ}"};t.exports=n},function(t,e,i){"use strict";var n={year:{base:"yyyy",requiresSuffix:!0},month:{base:"MM",requiresSuffix:!0},date:{base:"dd",requiresSuffix:!0},hour:{base:"hh",requiresSuffixOr:":"},minute:{base:"mm"},second:{base:"ss"},num:{src:"\\d+",requiresNumerals:!0}};t.exports=n},function(t,e,i){"use strict";t.exports=6e4},function(t,e,i){"use strict";var n={yyyy:{param:"year",src:"\\d{4}"},MM:{param:"month",src:"[01]?\\d"},dd:{param:"date",src:"[0123]?\\d"},hh:{param:"hour",src:"[0-2]?\\d"},mm:{param:"minute",src:"[0-5]\\d"},ss:{param:"second",src:"[0-5]\\d(?:[,.]\\d+)?"},yy:{param:"year",src:"\\d{2}"},y:{param:"year",src:"\\d"},yearSign:{src:"[+-]",sign:!0},tzHour:{src:"[0-1]\\d"},tzMinute:{src:"[0-5]\\d"},tzSign:{src:"[+-]",sign:!0},ihh:{param:"hour",src:"[0-2]?\\d(?:[,.]\\d+)?"},imm:{param:"minute",src:"[0-5]\\d(?:[,.]\\d+)?"},GMT:{param:"utc",src:"GMT",val:1},Z:{param:"utc",src:"Z",val:1},timestamp:{src:"\\d+"}};t.exports=n},function(t,e,i){"use strict";function n(t){return o(t)?new Date(t.getTime()):r(t)}var s=i(3),r=i(106),o=s.isDate;t.exports=n},function(t,e,i){"use strict";function n(t){return o(t)?t:null==t?new Date:a.create?a.create(t):new Date(t)}var s=i(3),r=i(22),o=s.isDate,a=r.sugarDate;t.exports=n},function(t,e,i){"use strict";function n(t){var e,i,n;return a(t)?[t,"Milliseconds"]:(e=t.match(s),i=+e[1]||1,n=o(e[2].toLowerCase()),n.match(/hour|minute|second/i)?n+="s":"Year"===n?n="FullYear":"Week"===n?(n="Date",i*=7):"Day"===n&&(n="Date"),[i,n])}var s=i(431),r=i(3),o=i(54),a=r.isNumber;t.exports=n},function(t,e,i){"use strict";function n(t){return null==t?t:r(t)?t.getTime():t.valueOf()}var s=i(3),r=s.isDate;t.exports=n},function(t,e,i){"use strict";function n(t,e,i){var n,a=s[i];return a?n=new Date(t.getTime()+e*a):(n=new Date(t),r(n,i,o(t,i)+e)),n}var s=i(108),r=i(32),o=i(18);t.exports=n},function(t,e,i){"use strict";var n={Hours:36e5,Minutes:6e4,Seconds:1e3,Milliseconds:1};t.exports=n},fu
e.RowsCounter=function(t){function e(i){n(this,e);var r=s(this,t.call(this,i,"rowsCounter")),o=r.config.rows_counter||{};return r.targetId=o.target_id||null,r.container=null,r.label=null,r.text=o.text||"Rows: ",r.fromToTextSeparator=o.separator||"-",r.overText=o.over_text||" / ",r.cssClass=o.css_class||"tot",r.onBeforeRefreshCounter=(0,u.isFn)(o.on_before_refresh_counter)?o.on_before_refresh_counter:u.EMPTY_FN,r.onAfterRefreshCounter=(0,u.isFn)(o.on_after_refresh_counter)?o.on_after_refresh_counter:u.EMPTY_FN,r}return r(e,t),e.prototype.init=function(){var t=this;if(!this.initialized){var e=this.tf,i=(0,a.createElm)("div");i.className=this.cssClass;var n=(0,a.createElm)("span"),s=(0,a.createElm)("span");s.appendChild((0,a.createText)(this.text)),this.targetId||e.setToolbar();var r=this.targetId?(0,a.elm)(this.targetId):e.lDiv;this.targetId?(r.appendChild(s),r.appendChild(n)):(i.appendChild(s),i.appendChild(n),r.appendChild(i)),this.container=i,this.label=n,this.emitter.on(["after-filtering","grouped-by-page"],function(){return t.refresh(e.getValidRowsNb())}),this.emitter.on(["rows-changed"],function(){return t.refresh()}),this.initialized=!0,this.refresh()}},e.prototype.refresh=function(t){if(this.initialized&&this.isEnabled()){var e=this.tf;this.onBeforeRefreshCounter(e,this.label);var i=void 0;if(e.paging){var n=e.feature("paging");if(n){var s=e.getValidRowsNb(),r=parseInt(n.startPagingRow,10)+(s>0?1:0),o=r+n.pagingLength-1<=s?r+n.pagingLength-1:s;i=r+this.fromToTextSeparator+o+this.overText+s}}else i=t&&""!==t?t:e.getFilterableRowsNb()-e.nbHiddenRows;this.label.innerHTML=i,this.onAfterRefreshCounter(e,this.label,i)}},e.prototype.destroy=function(){var t=this;this.initialized&&(!this.targetId&&this.container?(0,a.removeElm)(this.container):(0,a.elm)(this.targetId).innerHTML="",this.label=null,this.container=null,this.emitter.off(["after-filtering","grouped-by-page"],function(){return t.refresh(tf.getValidRowsNb())}),this.emitter.off(["rows-changed"],function(){return t.refresh()}),this.initialized=!1)},e}(o.Feature)},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(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(9),a=i(114),u=i(123),l=i(19),c=i(10);e.State=function(t){function e(i){n(this,e);var r=s(this,t.call(this,i,"state")),o=r.config.state;return r.enableHash=o===!0||(0,c.isArray)(o.types)&&o.types.indexOf("hash")!==-1,r.enableLocalStorage=(0,c.isArray)(o.types)&&o.types.indexOf("local_storage")!==-1,r.enableCookie=(0,c.isArray)(o.types)&&o.types.indexOf("cookie")!==-1,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
this.singleSearchFlt&&l[h]&&(f=!0),this.emitter.emit("cell-processed",this,h,r[h])}}this.singleSearchFlt&&f&&(c=!0),this.validateRow(s,c),c||i++,this.emitter.emit("row-processed",this,s,this.validRowsIndex.length,c)}}this.nbHiddenRows=i,this.onAfterFilter(this),this.emitter.emit("after-filtering",this,n)}},t.prototype._testTerm=function(t,e,i){var n=void 0,s=this.decimalSeparator,r=new RegExp(this.leOperator),o=new RegExp(this.geOperator),u=new RegExp(this.lwOperator),c=new RegExp(this.grOperator),f=new RegExp(this.dfOperator),h=new RegExp((0,a.rgxEsc)(this.lkOperator)),d=new RegExp(this.eqOperator),p=new RegExp(this.stOperator),m=new RegExp(this.enOperator),g=this.emOperator,v=this.nmOperator,b=new RegExp((0,a.rgxEsc)(this.rgxOperator));t=(0,a.matchCase)(t,this.caseSensitive);var x=!1,_=u.test(t),w=r.test(t),C=c.test(t),E=o.test(t),T=f.test(t),k=d.test(t),N=h.test(t),O=p.test(t),F=m.test(t),P=g===t,S=v===t,I=b.test(t);if(this.hasType(i,[y.DATE])){var D=void 0,R=void 0,M=this.Mod.dateType,A=M.isValid.bind(M),L=M.parse.bind(M),j=M.getOptions(i).locale||this.locale,H=_&&A(t.replace(u,""),j),B=w&&A(t.replace(r,""),j),z=C&&A(t.replace(c,""),j),W=E&&A(t.replace(o,""),j),U=T&&A(t.replace(f,""),j),V=k&&A(t.replace(d,""),j);D=L(e,j),B?(R=L(t.replace(r,""),j),x=D<=R):H?(R=L(t.replace(u,""),j),x=D<R):W?(R=L(t.replace(o,""),j),x=D>=R):z?(R=L(t.replace(c,""),j),x=D>R):U?(R=L(t.replace(f,""),j),x=D.toString()!==R.toString()):V?(R=L(t.replace(d,""),j),x=D.toString()===R.toString()):h.test(t)?x=(0,a.contains)(t.replace(h,""),e,!1,this.caseSensitive):A(t)?(R=L(t,j),x=D.toString()===R.toString()):x=P?(0,a.isEmpty)(e):S?!(0,a.isEmpty)(e):(0,a.contains)(t,e,this.isExactMatch(i),this.caseSensitive)}else{if(this.hasType(i,[y.FORMATTED_NUMBER])){var Y=this.colTypes[i];Y.hasOwnProperty("decimal")&&(s=Y.decimal)}if(n=Number(e)||(0,l.parse)(e,s),w)x=n<=(0,l.parse)(t.replace(r,""),s);else if(E)x=n>=(0,l.parse)(t.replace(o,""),s);else if(_)x=n<(0,l.parse)(t.replace(u,""),s);else if(C)x=n>(0,l.parse)(t.replace(c,""),s);else if(T)x=!(0,a.contains)(t.replace(f,""),e,!1,this.caseSensitive);else if(N)x=(0,a.contains)(t.replace(h,""),e,!1,this.caseSensitive);else if(k)x=(0,a.contains)(t.replace(d,""),e,!0,this.caseSensitive);else if(O)x=0===e.indexOf(t.replace(p,""));else if(F){var K=t.replace(m,"");x=e.lastIndexOf(K,e.length-1)===e.length-1-(K.length-1)&&e.lastIndexOf(K,e.length-1)>-1}else if(P)x=(0,a.isEmpty)(e);else if(S)x=!(0,a.isEmpty)(e);else if(I)try{var G=t.replace(b,""),X=new RegExp(G);x=X.test(e)}catch(t){x=!1}else n&&this.hasType(i,[y.NUMBER,y.FORMATTED_NUMBER])&&!this.singleSearchFlt?(t=(0,l.parse)(t,s)||t,x=n===t||(0,a.contains)(t.toString(),n.toString(),this.isExactMatch(i),this.caseSensitive)):x=(0,a.contains)(t,e,this.isExactMatch(i),this.caseSensitive,this.ignoresDiacritics(i))}return x},t.prototype.getColumnData=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return this.getColValues(t,e,!0,i)},t.prototype.getColumnValues=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return this.getColValues(t,e,!1,i)},t.prototype.getColValues=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],s=this.dom().rows,r=this.getRowsNb(!0),o=[],a=i?this.getCellData.bind(this):this.getCellValue.bind(this);e&&o.push(this.getHeadersText()[t]);for(var u=this.refRow;u<r;u++){var l=!1;n.length>0&&(l=n.indexOf(u)!==-1);var c=s[u].cells,f=c.length;if(f===this.nbCells&&!l)for(var h=0;h<f;h++)if(h===t){var d=a(c[h]);o.push(d)}}return o},t.prototype.getFilterValue=function(t){if(this.fltGrid){var e="",i=this.getFilterElement(t);if(!i)return e;var n=this.getFilterType(t);return n!==y.MULTIPLE&&n!==y.CHECKLIST?e=i.value:n===y.MULTIPLE?e=this.feature("dropdown").getValues(t):n===y.CHECKLIST&&(e=this.feature("checkList").getValues(t)),((0,u.isArray)(e)&&0===e.lengt
i=t-e,o(i,function(i){return u(a(t,e,i))})}var s=i(40),r=i(6),o=i(87),a=i(58),u=r.abs;t.exports=n},function(t,e,i){"use strict";function n(t){return o(t,function(e){return s(r(t/e.multiplier,1))})}var s=i(23),r=i(77),o=i(87);t.exports=n},function(t,e,i){"use strict";function n(t,e,i,n){var s;return i>1&&(s=t[e+(i-1)*n]),s||t[e]}t.exports=n},function(t,e,i){"use strict";function n(t,e){return o(t,s(t,e))}var s=i(88),r=i(11),o=r.getOwn;t.exports=n},function(t,e,i){"use strict";function n(t){var e,i,n={};return e=t.match(/^(-?\d*[\d.]\d*)?\s?(\w+?)s?$/i),e&&(s(i)&&(i=+e[1],isNaN(i)&&(i=1)),n[e[2].toLowerCase()]=i),n}var s=i(37);t.exports=n},function(t,e,i){"use strict";function n(t,e){return o(t,e,s[a])}var s=i(31),r=i(5),o=i(58),a=r.DAY_INDEX;t.exports=n},function(t,e,i){"use strict";function n(t){return t===r?o:t+1}var s=i(5),r=s.DAY_INDEX,o=s.MONTH_INDEX;t.exports=n},function(t,e,i){"use strict";function n(t,e){var i=o(t);return a.get(e).ampm[r(i/12)]||""}var s=i(7),r=i(23),o=i(90),a=s.localeManager;t.exports=n},function(t,e,i){"use strict";function n(t){function e(t){this.init(t)}return e.prototype={getMonthName:function(t,e){return this.monthSuffix?t+1+this.monthSuffix:_(this.months,t,e,12)},getWeekdayName:function(t,e){return _(this.weekdays,t,e,7)},getTokenValue:function(t,e){var i,n=this[t+"Map"];return n&&(i=n[e]),m(i)&&(i=this.getNumber(e),"month"===t&&(i-=1)),i},getNumber:function(t){var e=this.numeralMap[t];return h(e)?e:(e=+t.replace(/,/,"."),isNaN(e)?(e=this.getNumeralValue(t),isNaN(e)?e:(this.numeralMap[t]=e,e)):e)},getNumeralValue:function(t){var e,i,n,s,r,o=1,a=0;r=t.split("");for(var u=r.length-1;n=r[u];u--)s=N(this.numeralMap,n),m(s)&&(s=N(F,n)||0),i=s>0&&s%10===0,i?(e&&(a+=o),u?o=s:a+=s):(a+=s*o,o*=10),e=i;return a},getOrdinal:function(t){var e=this.ordinalSuffix;return e||v(t)},getRelativeFormat:function(t,e){return this.convertAdjustedToFormat(t,e)},getDuration:function(t){return this.convertAdjustedToFormat(T(I(0,t)),"duration")},getFirstDayOfWeek:function(){var t=this.firstDayOfWeek;return h(t)?t:D},getFirstDayOfWeekYear:function(){return this.firstDayOfWeekYear||R},convertAdjustedToFormat:function(t,e){var i,n,s,r=t[0],o=t[1],a=t[2],u=this[e]||this.relative;return A(u)?u.call(this,r,o,a,e):(s=this.plural&&1!==r?1:0,n=this.units[8*s+o]||this.units[o],i=this[a>0?"fromNow":"ago"],u.replace(/\{(.*?)\}/g,function(t,e){switch(e){case"num":return r;case"unit":return n;case"sign":return i}}))},cacheFormat:function(t,e){this.compiledFormats.splice(e,1),this.compiledFormats.unshift(t)},addFormat:function(t,e){function i(t){var i,r,a,u=t.match(/\?$/),l=t.match(/^(\d+)\??$/),f=t.match(/(\d)(?:-(\d))?/),h=t.replace(/[^a-z]+$/i,"");return(a=N(s.parsingAliases,h))?(r=n(a),u&&(r=b(r,!0)),r):(l?r=s.tokens[l[1]]:(a=N(o,h))?r=a.src:(a=N(s.parsingTokens,h)||N(s,h),h=h.replace(/s$/,""),a||(a=N(s.parsingTokens,h)||N(s,h+"s")),M(a)?(r=a,i=s[h+"Suffix"]):(f&&(a=c(a,function(t,e){var i=e%(s.units?8:a.length);return i>=f[1]&&i<=(f[2]||f[1])})),r=C(a))),r?(l?r=b(r):(e.push(h),r="("+r+")"),i&&(r=k(h,r,i)),u&&(r+="?"),r):"")}function n(t){return t=t.replace(/ /g," ?"),t.replace(/\{([^,]+?)\}/g,function(t,e){var n,s=e.split("|");return n=s.length>1?b(l(s,i).join("|")):i(e)})}var s=this;e||(e=[],t=n(t)),s.addRawFormat(t,e)},addRawFormat:function(t,e){this.compiledFormats.unshift({reg:RegExp("^ *"+t+" *$","i"),to:e})},init:function(t){function e(){L.compiledFormats=[],L.parsingAliases={},L.parsingTokens={}}function i(){y(L,t)}function n(){f(s,function(t){var e=L[t];M(e)?L[t]=d(e):e||(L[t]=[])})}function r(t,e,i,n){var s,r=t,o=[];L[r]||(r+="s"),i||(i={},s=!0),c(r,function(t,s,r){var a,u=s*e+r;a=n?n(r):r,i[t]=a,i[t.toLowerCase()]=a,o[u]=t}),L[r]=o,s&&(L[t+"Map"]=i)}function c(t,e){f(L[t],function(t,i){h(t,function(t,n){e(t,n,i)})})}function h(t,e){var i=l(t.split("+"),function(t){return t.replace(/(.+):(.+)$/,function(t,e,i){return l(i.split("|"),function(t){return e+t}).join("|")})}).join("|");f(i.split("|"),e)}function p(){var t={};r("numeral",10,t),r("article",1,t,function(){return 1}),r("placeholder",4,t,function(t){return S(10
numerals:"zero,un:|a|o|',due,tre,quattro,cinque,sei,sette,otto,nove,dieci",tokens:"l'|la|il",short:"{dd}/{MM}/{yyyy}",medium:"{d} {month} {yyyy}",long:"{d} {month} {yyyy} {time}",full:"{weekday}, {d} {month} {yyyy} {time}",stamp:"{dow} {d} {mon} {yyyy} {time}",time:"{H}:{mm}",past:"{num} {unit} {sign}",future:"{num} {unit} {sign}",duration:"{num} {unit}",timeMarkers:"alle",ampm:"am,pm",modifiers:[{name:"day",src:"ieri",value:-1},{name:"day",src:"oggi",value:0},{name:"day",src:"domani",value:1},{name:"day",src:"dopodomani",value:2},{name:"sign",src:"fa",value:-1},{name:"sign",src:"da adesso",value:1},{name:"shift",src:"scors:o|a",value:-1},{name:"shift",src:"prossim:o|a",value:1}],parse:["{months} {year?}","{num} {unit} {sign}","{0?} {unit:5-7} {shift}","{0?} {shift} {unit:5-7}"],timeParse:["{shift?} {day|weekday}","{weekday?},? {date} {months?}\\.? {year?}"],timeFrontParse:["{shift?} {day|weekday}","{weekday?},? {date} {months?}\\.? {year?}"]})},function(t,e,i){"use strict";var n=i(4);n("ja",{ampmFront:!0,numeralUnits:!0,allowsFullWidth:!0,timeMarkerOptional:!0,firstDayOfWeek:0,firstDayOfWeekYear:1,units:"ミリ秒,秒,分,時間,日,週間|週,ヶ月|ヵ月|月,年|年度",weekdays:"日:曜日||曜,月:曜日||曜,火:曜日||曜,水:曜日||曜,木:曜日||曜,金:曜日||曜,土:曜日||曜",numerals:",一,二,三,四,五,六,七,八,九",placeholders:"十,百,千,万",timeSuffixes:",秒,分,時,日,,月,年度?",short:"{yyyy}/{MM}/{dd}",medium:"{yyyy}年{M}月{d}日",long:"{yyyy}年{M}月{d}日{time}",full:"{yyyy}年{M}月{d}日{time} {weekday}",stamp:"{yyyy}年{M}月{d}日 {H}:{mm} {dow}",time:"{tt}{h}時{mm}分",past:"{num}{unit}{sign}",future:"{num}{unit}{sign}",duration:"{num}{unit}",ampm:"午前,午後",modifiers:[{name:"day",src:"一昨々日|前々々日",value:-3},{name:"day",src:"一昨日|おととい|前々日",value:-2},{name:"day",src:"昨日|前日",value:-1},{name:"day",src:"今日|当日|本日",value:0},{name:"day",src:"明日|翌日|次日",value:1},{name:"day",src:"明後日|翌々日",value:2},{name:"day",src:"明々後日|翌々々日",value:3},{name:"sign",src:"前",value:-1},{name:"sign",src:"後",value:1},{name:"edge",src:"始|初日|頭",value:-2},{name:"edge",src:"末|尻",value:2},{name:"edge",src:"末日",value:1},{name:"shift",src:"一昨々|前々々",value:-3},{name:"shift",src:"一昨|前々|先々",value:-2},{name:"shift",src:"先|昨|去|前",value:-1},{name:"shift",src:"今|本|当",value:0},{name:"shift",src:"来|明|翌|次",value:1},{name:"shift",src:"明後|翌々|次々|再来|さ来",value:2},{name:"shift",src:"明々後|翌々々",value:3}],parse:["{month}{edge}","{num}{unit}{sign}","{year?}{month}","{year}"],timeParse:["{day|weekday}","{shift}{unit:5}{weekday?}","{shift}{unit:7}{month}{edge}","{shift}{unit:7}{month?}{date?}","{shift}{unit:6}{edge?}{date?}","{year?}{month?}{date}"]})},function(t,e,i){"use strict";var n=i(4);n("ko",{ampmFront:!0,numeralUnits:!0,units:"밀리초,초,분,시간,일,주,개월|달,년|해",weekdays:"일:요일|,월:요일|,화:요일|,수:요일|,목:요일|,금:요일|,토:요일|",numerals:"영|제로,일|한,이,삼,사,오,육,칠,팔,구,십",short:"{yyyy}.{MM}.{dd}",medium:"{yyyy}년 {M}월 {d}일",long:"{yyyy}년 {M}월 {d}일 {time}",full:"{yyyy}년 {M}월 {d}일 {weekday} {time}",stamp:"{yyyy}년 {M}월 {d}일 {H}:{mm} {dow}",time:"{tt} {h}시 {mm}분",past:"{num}{unit} {sign}",future:"{num}{unit} {sign}",duration:"{num}{unit}",timeSuffixes:",초,분,시,일,,월,년",ampm:"오전,오후",modifiers:[{name:"day",src:"그저께",value:-2},{name:"day",src:"어제",value:-1},{name:"day",src:"오늘",value:0},{name:"day",src:"내일",value:1},{name:"day",src:"모레",value:2},{name:"sign",src:"전",value:-1},{name:"sign",src:"후",value:1},{name:"shift",src:"지난|작",value:-1},{name:"shift",src:"이번|올",value:0},{name:"shift",src:"다음|내",value:1}],parse:["{num}{unit} {sign}","{shift?} {unit:5-7}","{year?} {month}","{year}"],timeParse:["{day|weekday}","{shift} {unit:5?} {weekday}","{year?} {month?} {date} {weekday?}"]})},functi
2016-12-24 13:35:26 +01:00
//# sourceMappingURL=tablefilter.js.map