slick-table 1.1.59 → 1.1.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -363,4 +363,4 @@ Expecting `+ce.join(", ")+", got '"+(this.terminals_[W]||W)+"'":le="Parse error
363
363
  * Pikaday
364
364
  *
365
365
  * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday
366
- */var bW=yl.exports,Jm;function wW(){return Jm||(Jm=1,function(e,t){(function(n,o){var r;{try{r=vW}catch{}e.exports=o(r)}})(bW,function(n){var o=typeof n=="function",r=!!window.addEventListener,i=window.document,a=window.setTimeout,l=function(N,M,L,W){r?N.addEventListener(M,L,!!W):N.attachEvent("on"+M,L)},d=function(N,M,L,W){r?N.removeEventListener(M,L,!!W):N.detachEvent("on"+M,L)},u=function(N){return N.trim?N.trim():N.replace(/^\s+|\s+$/g,"")},f=function(N,M){return(" "+N.className+" ").indexOf(" "+M+" ")!==-1},p=function(N,M){f(N,M)||(N.className=N.className===""?M:N.className+" "+M)},y=function(N,M){N.className=u((" "+N.className+" ").replace(" "+M+" "," "))},w=function(N){return/Array/.test(Object.prototype.toString.call(N))},b=function(N){return/Date/.test(Object.prototype.toString.call(N))&&!isNaN(N.getTime())},m=function(N){var M=N.getDay();return M===0||M===6},v=function(N){return N%4===0&&N%100!==0||N%400===0},P=function(N,M){return[31,v(N)?29:28,31,30,31,30,31,31,30,31,30,31][M]},D=function(N){b(N)&&N.setHours(0,0,0,0)},x=function(N,M){return N.getTime()===M.getTime()},S=function(N,M,L){var W,ne;for(W in M)ne=N[W]!==void 0,ne&&typeof M[W]=="object"&&M[W]!==null&&M[W].nodeName===void 0?b(M[W])?L&&(N[W]=new Date(M[W].getTime())):w(M[W])?L&&(N[W]=M[W].slice(0)):N[W]=S({},M[W],L):(L||!ne)&&(N[W]=M[W]);return N},C=function(N,M,L){var W;i.createEvent?(W=i.createEvent("HTMLEvents"),W.initEvent(M,!0,!1),W=S(W,L),N.dispatchEvent(W)):i.createEventObject&&(W=i.createEventObject(),W=S(W,L),N.fireEvent("on"+M,W))},O=function(N){return N.month<0&&(N.year-=Math.ceil(Math.abs(N.month)/12),N.month+=12),N.month>11&&(N.year+=Math.floor(Math.abs(N.month)/12),N.month-=12),N},A={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,firstWeekOfYearMinDays:4,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},F=function(N,M,L){for(M+=N.firstDay;M>=7;)M-=7;return L?N.i18n.weekdaysShort[M]:N.i18n.weekdays[M]},B=function(N){var M=[],L="false";if(N.isEmpty)if(N.showDaysInNextAndPreviousMonths)M.push("is-outside-current-month"),N.enableSelectionDaysInNextAndPreviousMonths||M.push("is-selection-disabled");else return'<td class="is-empty"></td>';return N.isDisabled&&M.push("is-disabled"),N.isToday&&M.push("is-today"),N.isSelected&&(M.push("is-selected"),L="true"),N.hasEvent&&M.push("has-event"),N.isInRange&&M.push("is-inrange"),N.isStartRange&&M.push("is-startrange"),N.isEndRange&&M.push("is-endrange"),'<td data-day="'+N.day+'" class="'+M.join(" ")+'" aria-selected="'+L+'"><button class="pika-button pika-day" type="button" data-pika-year="'+N.year+'" data-pika-month="'+N.month+'" data-pika-day="'+N.day+'">'+N.day+"</button></td>"},R=function(N,M){N.setHours(0,0,0,0);var L=N.getDate(),W=N.getDay(),ne=M,oe=ne-1,se=7,j=function(le){return(le+se-1)%se};N.setDate(L+oe-j(W));var ee=new Date(N.getFullYear(),0,ne),J=24*60*60*1e3,te=(N.getTime()-ee.getTime())/J,ce=1+Math.round((te-oe+j(ee.getDay()))/se);return ce},$=function(N,M,L,W){var ne=new Date(L,M,N),oe=o?n(ne).isoWeek():R(ne,W);return'<td class="pika-week">'+oe+"</td>"},K=function(N,M,L,W){return'<tr class="pika-row'+(L?" pick-whole-week":"")+(W?" is-selected":"")+'">'+(M?N.reverse():N).join("")+"</tr>"},G=function(N){return"<tbody>"+N.join("")+"</tbody>"},q=function(N){var M,L=[];for(N.showWeekNumber&&L.push("<th></th>"),M=0;M<7;M++)L.push('<th scope="col"><abbr title="'+F(N,M)+'">'+F(N,M,!0)+"</abbr></th>");return"<thead><tr>"+(N.isRTL?L.reverse():L).join("")+"</tr></thead>"},Y=function(N,M,L,W,ne,oe){var se,j,ee,J=N._o,te=L===J.minYear,ce=L===J.maxYear,le='<div id="'+oe+'" class="pika-title" role="heading" aria-live="assertive">',he,H,re=!0,Z=!0;for(ee=[],se=0;se<12;se++)ee.push('<option value="'+(L===ne?se-M:12+se-M)+'"'+(se===W?' selected="selected"':"")+(te&&se<J.minMonth||ce&&se>J.maxMonth?' disabled="disabled"':"")+">"+J.i18n.months[se]+"</option>");for(he='<div class="pika-label">'+J.i18n.months[W]+'<select class="pika-select pika-select-month" tabindex="-1">'+ee.join("")+"</select></div>",w(J.yearRange)?(se=J.yearRange[0],j=J.yearRange[1]+1):(se=L-J.yearRange,j=1+L+J.yearRange),ee=[];se<j&&se<=J.maxYear;se++)se>=J.minYear&&ee.push('<option value="'+se+'"'+(se===L?' selected="selected"':"")+">"+se+"</option>");return H='<div class="pika-label">'+L+J.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+ee.join("")+"</select></div>",J.showMonthAfterYear?le+=H+he:le+=he+H,te&&(W===0||J.minMonth>=W)&&(re=!1),ce&&(W===11||J.maxMonth<=W)&&(Z=!1),M===0&&(le+='<button class="pika-prev'+(re?"":" is-disabled")+'" type="button">'+J.i18n.previousMonth+"</button>"),M===N._o.numberOfMonths-1&&(le+='<button class="pika-next'+(Z?"":" is-disabled")+'" type="button">'+J.i18n.nextMonth+"</button>"),le+="</div>"},z=function(N,M,L){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+L+'">'+q(N)+G(M)+"</table>"},ae=function(N){var M=this,L=M.config(N);M._onMouseDown=function(ne){if(M._v){ne=ne||window.event;var oe=ne.target||ne.srcElement;if(oe)if(f(oe,"is-disabled")||(f(oe,"pika-button")&&!f(oe,"is-empty")&&!f(oe.parentNode,"is-disabled")?(M.setDate(new Date(oe.getAttribute("data-pika-year"),oe.getAttribute("data-pika-month"),oe.getAttribute("data-pika-day"))),L.bound&&a(function(){M.hide(),L.blurFieldOnSelect&&L.field&&L.field.blur()},100)):f(oe,"pika-prev")?M.prevMonth():f(oe,"pika-next")&&M.nextMonth()),f(oe,"pika-select"))M._c=!0;else if(ne.preventDefault)ne.preventDefault();else return ne.returnValue=!1,!1}},M._onChange=function(ne){ne=ne||window.event;var oe=ne.target||ne.srcElement;oe&&(f(oe,"pika-select-month")?M.gotoMonth(oe.value):f(oe,"pika-select-year")&&M.gotoYear(oe.value))},M._onKeyChange=function(ne){if(ne=ne||window.event,M.isVisible())switch(ne.keyCode){case 13:case 27:L.field&&L.field.blur();break;case 37:M.adjustDate("subtract",1);break;case 38:M.adjustDate("subtract",7);break;case 39:M.adjustDate("add",1);break;case 40:M.adjustDate("add",7);break;case 8:case 46:M.setDate(null);break}},M._parseFieldValue=function(){if(L.parse)return L.parse(L.field.value,L.format);if(o){var ne=n(L.field.value,L.format,L.formatStrict);return ne&&ne.isValid()?ne.toDate():null}else return new Date(Date.parse(L.field.value))},M._onInputChange=function(ne){var oe;ne.firedBy!==M&&(oe=M._parseFieldValue(),b(oe)&&M.setDate(oe),M._v||M.show())},M._onInputFocus=function(){M.show()},M._onInputClick=function(){M.show()},M._onInputBlur=function(){var ne=i.activeElement;do if(f(ne,"pika-single"))return;while(ne=ne.parentNode);M._c||(M._b=a(function(){M.hide()},50)),M._c=!1},M._onClick=function(ne){ne=ne||window.event;var oe=ne.target||ne.srcElement,se=oe;if(oe){!r&&f(oe,"pika-select")&&(oe.onchange||(oe.setAttribute("onchange","return;"),l(oe,"change",M._onChange)));do if(f(se,"pika-single")||se===L.trigger)return;while(se=se.parentNode);M._v&&oe!==L.trigger&&se!==L.trigger&&M.hide()}},M.el=i.createElement("div"),M.el.className="pika-single"+(L.isRTL?" is-rtl":"")+(L.theme?" "+L.theme:""),l(M.el,"mousedown",M._onMouseDown,!0),l(M.el,"touchend",M._onMouseDown,!0),l(M.el,"change",M._onChange),L.keyboardInput&&l(i,"keydown",M._onKeyChange),L.field&&(L.container?L.container.appendChild(M.el):L.bound?i.body.appendChild(M.el):L.field.parentNode.insertBefore(M.el,L.field.nextSibling),l(L.field,"change",M._onInputChange),L.defaultDate||(L.defaultDate=M._parseFieldValue(),L.setDefaultDate=!0));var W=L.defaultDate;b(W)?L.setDefaultDate?M.setDate(W,!0):M.gotoDate(W):M.gotoDate(new Date),L.bound?(this.hide(),M.el.className+=" is-bound",l(L.trigger,"click",M._onInputClick),l(L.trigger,"focus",M._onInputFocus),l(L.trigger,"blur",M._onInputBlur)):this.show()};return ae.prototype={config:function(N){this._o||(this._o=S({},A,!0));var M=S(this._o,N,!0);M.isRTL=!!M.isRTL,M.field=M.field&&M.field.nodeName?M.field:null,M.theme=typeof M.theme=="string"&&M.theme?M.theme:null,M.bound=!!(M.bound!==void 0?M.field&&M.bound:M.field),M.trigger=M.trigger&&M.trigger.nodeName?M.trigger:M.field,M.disableWeekends=!!M.disableWeekends,M.disableDayFn=typeof M.disableDayFn=="function"?M.disableDayFn:null;var L=parseInt(M.numberOfMonths,10)||1;if(M.numberOfMonths=L>4?4:L,b(M.minDate)||(M.minDate=!1),b(M.maxDate)||(M.maxDate=!1),M.minDate&&M.maxDate&&M.maxDate<M.minDate&&(M.maxDate=M.minDate=!1),M.minDate&&this.setMinDate(M.minDate),M.maxDate&&this.setMaxDate(M.maxDate),w(M.yearRange)){var W=new Date().getFullYear()-10;M.yearRange[0]=parseInt(M.yearRange[0],10)||W,M.yearRange[1]=parseInt(M.yearRange[1],10)||W}else M.yearRange=Math.abs(parseInt(M.yearRange,10))||A.yearRange,M.yearRange>100&&(M.yearRange=100);return M},toString:function(N){return N=N||this._o.format,b(this._d)?this._o.toString?this._o.toString(this._d,N):o?n(this._d).format(N):this._d.toDateString():""},getMoment:function(){return o?n(this._d):null},setMoment:function(N,M){o&&n.isMoment(N)&&this.setDate(N.toDate(),M)},getDate:function(){return b(this._d)?new Date(this._d.getTime()):null},setDate:function(N,M){if(!N)return this._d=null,this._o.field&&(this._o.field.value="",C(this._o.field,"change",{firedBy:this})),this.draw();if(typeof N=="string"&&(N=new Date(Date.parse(N))),!!b(N)){var L=this._o.minDate,W=this._o.maxDate;b(L)&&N<L?N=L:b(W)&&N>W&&(N=W),this._d=new Date(N.getTime()),D(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),C(this._o.field,"change",{firedBy:this})),!M&&typeof this._o.onSelect=="function"&&this._o.onSelect.call(this,this.getDate())}},clear:function(){this.setDate(null)},gotoDate:function(N){var M=!0;if(b(N)){if(this.calendars){var L=new Date(this.calendars[0].year,this.calendars[0].month,1),W=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),ne=N.getTime();W.setMonth(W.getMonth()+1),W.setDate(W.getDate()-1),M=ne<L.getTime()||W.getTime()<ne}M&&(this.calendars=[{month:N.getMonth(),year:N.getFullYear()}],this._o.mainCalendar==="right"&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(N,M){var L=this.getDate()||new Date,W=parseInt(M)*24*60*60*1e3,ne;N==="add"?ne=new Date(L.valueOf()+W):N==="subtract"&&(ne=new Date(L.valueOf()-W)),this.setDate(ne)},adjustCalendars:function(){this.calendars[0]=O(this.calendars[0]);for(var N=1;N<this._o.numberOfMonths;N++)this.calendars[N]=O({month:this.calendars[0].month+N,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(N){isNaN(N)||(this.calendars[0].month=parseInt(N,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(N){isNaN(N)||(this.calendars[0].year=parseInt(N,10),this.adjustCalendars())},setMinDate:function(N){N instanceof Date?(D(N),this._o.minDate=N,this._o.minYear=N.getFullYear(),this._o.minMonth=N.getMonth()):(this._o.minDate=A.minDate,this._o.minYear=A.minYear,this._o.minMonth=A.minMonth,this._o.startRange=A.startRange),this.draw()},setMaxDate:function(N){N instanceof Date?(D(N),this._o.maxDate=N,this._o.maxYear=N.getFullYear(),this._o.maxMonth=N.getMonth()):(this._o.maxDate=A.maxDate,this._o.maxYear=A.maxYear,this._o.maxMonth=A.maxMonth,this._o.endRange=A.endRange),this.draw()},setStartRange:function(N){this._o.startRange=N},setEndRange:function(N){this._o.endRange=N},draw:function(N){if(!(!this._v&&!N)){var M=this._o,L=M.minYear,W=M.maxYear,ne=M.minMonth,oe=M.maxMonth,se="",j;this._y<=L&&(this._y=L,!isNaN(ne)&&this._m<ne&&(this._m=ne)),this._y>=W&&(this._y=W,!isNaN(oe)&&this._m>oe&&(this._m=oe));for(var ee=0;ee<M.numberOfMonths;ee++)j="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2),se+='<div class="pika-lendar">'+Y(this,ee,this.calendars[ee].year,this.calendars[ee].month,this.calendars[0].year,j)+this.render(this.calendars[ee].year,this.calendars[ee].month,j)+"</div>";this.el.innerHTML=se,M.bound&&M.field.type!=="hidden"&&a(function(){M.trigger.focus()},1),typeof this._o.onDraw=="function"&&this._o.onDraw(this),M.bound&&M.field.setAttribute("aria-label",M.ariaLabel)}},adjustPosition:function(){var N,M,L,W,ne,oe,se,j,ee,J,te,ce;if(!this._o.container){if(this.el.style.position="absolute",N=this._o.trigger,M=N,L=this.el.offsetWidth,W=this.el.offsetHeight,ne=window.innerWidth||i.documentElement.clientWidth,oe=window.innerHeight||i.documentElement.clientHeight,se=window.pageYOffset||i.body.scrollTop||i.documentElement.scrollTop,te=!0,ce=!0,typeof N.getBoundingClientRect=="function")J=N.getBoundingClientRect(),j=J.left+window.pageXOffset,ee=J.bottom+window.pageYOffset;else for(j=M.offsetLeft,ee=M.offsetTop+M.offsetHeight;M=M.offsetParent;)j+=M.offsetLeft,ee+=M.offsetTop;(this._o.reposition&&j+L>ne||this._o.position.indexOf("right")>-1&&j-L+N.offsetWidth>0)&&(j=j-L+N.offsetWidth,te=!1),(this._o.reposition&&ee+W>oe+se||this._o.position.indexOf("top")>-1&&ee-W-N.offsetHeight>0)&&(ee=ee-W-N.offsetHeight,ce=!1),this.el.style.left=j+"px",this.el.style.top=ee+"px",p(this.el,te?"left-aligned":"right-aligned"),p(this.el,ce?"bottom-aligned":"top-aligned"),y(this.el,te?"right-aligned":"left-aligned"),y(this.el,ce?"top-aligned":"bottom-aligned")}},render:function(N,M,L){var W=this._o,ne=new Date,oe=P(N,M),se=new Date(N,M,1).getDay(),j=[],ee=[];D(ne),W.firstDay>0&&(se-=W.firstDay,se<0&&(se+=7));for(var J=M===0?11:M-1,te=M===11?0:M+1,ce=M===0?N-1:N,le=M===11?N+1:N,he=P(ce,J),H=oe+se,re=H;re>7;)re-=7;H+=7-re;for(var Z=!1,fe=0,pe=0;fe<H;fe++){var be=new Date(N,M,1+(fe-se)),ge=b(this._d)?x(be,this._d):!1,Re=x(be,ne),Ve=W.events.indexOf(be.toDateString())!==-1,Ne=fe<se||fe>=oe+se,Je=1+(fe-se),ke=M,ut=N,Yt=W.startRange&&x(W.startRange,be),rt=W.endRange&&x(W.endRange,be),Ot=W.startRange&&W.endRange&&W.startRange<be&&be<W.endRange,Ut=W.minDate&&be<W.minDate||W.maxDate&&be>W.maxDate||W.disableWeekends&&m(be)||W.disableDayFn&&W.disableDayFn(be);Ne&&(fe<se?(Je=he+Je,ke=J,ut=ce):(Je=Je-oe,ke=te,ut=le));var Lt={day:Je,month:ke,year:ut,hasEvent:Ve,isSelected:ge,isToday:Re,isDisabled:Ut,isEmpty:Ne,isStartRange:Yt,isEndRange:rt,isInRange:Ot,showDaysInNextAndPreviousMonths:W.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:W.enableSelectionDaysInNextAndPreviousMonths};W.pickWholeWeek&&ge&&(Z=!0),ee.push(B(Lt)),++pe===7&&(W.showWeekNumber&&ee.unshift($(fe-se,M,N,W.firstWeekOfYearMinDays)),j.push(K(ee,W.isRTL,W.pickWholeWeek,Z)),ee=[],pe=0,Z=!1)}return z(W,j,L)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),y(this.el,"is-hidden"),this._o.bound&&(l(i,"click",this._onClick),this.adjustPosition()),typeof this._o.onOpen=="function"&&this._o.onOpen.call(this))},hide:function(){var N=this._v;N!==!1&&(this._o.bound&&d(i,"click",this._onClick),this._o.container||(this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto"),p(this.el,"is-hidden"),this._v=!1,N!==void 0&&typeof this._o.onClose=="function"&&this._o.onClose.call(this))},destroy:function(){var N=this._o;this.hide(),d(this.el,"mousedown",this._onMouseDown,!0),d(this.el,"touchend",this._onMouseDown,!0),d(this.el,"change",this._onChange),N.keyboardInput&&d(i,"keydown",this._onKeyChange),N.field&&(d(N.field,"change",this._onInputChange),N.bound&&(d(N.trigger,"click",this._onInputClick),d(N.trigger,"focus",this._onInputFocus),d(N.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},ae})}(yl)),yl.exports}wW();const CW=(e,t,n)=>n==="0"?"":n?"<span class='sgi sgi-check'></span>":"";function $b(e){return function(n,o,r){return kc(r,e)}}const SW=$b().name,_W=(e,t)=>{const n=e.sum&&e.sum[t.field];return n!==null?`${e.group.level?"total":"TOTAL"}: ${kc(n)}`:""},xW=(e,t,n)=>{const r=e.getData().getRowById(t);if(r===void 0)return;const i=e.getColumnIndex(n);e.gotoCell(r,i),e.setCellCssStyles(`${r}`,{[r]:{[n]:"wink"}}),setTimeout(()=>{e.removeCellCssStyles(`${r}`)},1500)};function RW(e){return e.reduce((t,n)=>(t[n]="wink",t),{})}function TW(e,t){const o=e.getData().getLength(),r=kW(o,t);e.setCellCssStyles("wink",r),setTimeout(()=>{e.removeCellCssStyles("wink")},1500)}function kW(e,t){const n=RW(t),o={};let r=0;for(;r<e;)o[r]=n,r++;return o}function EW(e,t,n){return n==="0"?"":n?"Yes":""}function PW(e){if(!e.getSelectionModel())return eg(e);let t=e.getSelectedRows();return t.sort((n,o)=>n-o),t.length===0&&(t=eg(e)),t}function eg(e){const t=e.getData();return Array.from({length:t.getLength()},(n,o)=>o)}var Lc=(e=>(e.slickTable="slick-table",e.sorting="sorting",e))(Lc||{});function Bd(){return JSON.parse(localStorage.getItem(Lc.slickTable)||"{}")}function Wd(e){return e[Lc.sorting]||{}}function tg(e,t){localStorage.setItem(Lc.slickTable,JSON.stringify({...e,sorting:t}))}class DW{getTableSorting(t){const n=Bd();return Wd(n)[t]}resetTableSorting(t){const n=Bd(),o=Wd(n);delete o[t],tg(n,o)}setTableSorting(t,n,o){const r=Bd(),i=Wd(r);i[t]={columnId:n,isAscending:o},tg(r,i)}}const Hd=new DW;class OW{constructor(){this.emptyValue="1/1/1970"}dates(t,n){const o=Ss(t||this.emptyValue),r=Ss(n||this.emptyValue);return o-r}numbers(t,n){return Number(t||0)-Number(n||0)}stringsNumeric(t,n){return!t&&!n?0:t?n?t.localeCompare(n,void 0,{numeric:!0}):1:-1}strings(t,n){return(t||"").toLowerCase()>(n||"").toLowerCase()?1:(t||"").toLowerCase()<(n||"").toLowerCase()?-1:0}numbersWithSymbols(t,n){const o=Number((t||"0").match(/^\d+/g)?.[0]||0);return Number((n||"0").match(/^\d+/g)?.[0]||0)-o}}const MW=new OW;class Vb{constructor(){this.sort=MW,this.withFormatter=[So.TEXT,So.NUMBER_FORMATTED]}getSortFunction(t){let n="",o=!1,r;return(i,a)=>{const{grid:l,sortAsc:d,columnId:u}=a,f=a.sortCol;if(!l||!f)return;const p=f.field;if(!p)return;const y=f.sortAs;if(!y)return;const{formatter:w}=f,b=l.getData();d&&n===f?.id?(o=!0,Hd.resetTableSorting(t),l.setSortColumns([]),n=""):(o=!1,n=u,Hd.setTableSorting(t,u,d));const m=d?-1:1,v=b.getGrouping(),P=v.find(({getter:D})=>D===f.id);if(P){if(r||(r=v.map(({comparer:D})=>D)),o){const D=b.getGrouping(),x=D.findIndex(({getter:S})=>S===f.id);D[x].comparer=r[x],b.refresh();return}P.comparer=(D,x)=>{let S=D.value,C=x.value;return w&&this.withFormatter.includes(y)&&(S=w(0,0,S,f,null,l),C=w(0,0,C,f,null,l)),this.priority(D,x)||this.compare(S,C,m,y)}}else{const D=b.getItems(),x=b.getIdPropertyName();D.sort((S,C)=>{if(o)return S[x]-C[x];let O=S[p],A=C[p];return w&&this.withFormatter.includes(y)&&(O=w(0,0,O,f,S,l),A=w(0,0,A,f,C,l)),this.priority(S,C)||this.compare(O,A,m,y)})}b.refresh()}}priority(t,n){return 0}restoreSorting(t){const n=t.grid;if(!n)return;const o=Hd.getTableSorting(t.id);if(o){const{columnId:r,isAscending:i}=o,a=this.getSortFunction(t.id),l=n.getColumns().find(({id:d})=>d===r);if(l){a(null,{grid:n,columnId:r,sortAsc:i,sortCol:l,sortCols:[]});const d=document.querySelector(`#${t.id} [data-id="${r}"]`);if(!d)return;d.classList.add("slick-header-column-sorted");const u=d.querySelector(".slick-sort-indicator");if(!u)return;u.classList.add(`slick-sort-indicator-${i?"asc":"desc"}`),n.invalidate()}}}compare(t,n,o,r){switch(r){case So.DATE:return this.sort.dates(t,n)*o;case So.NUMBER:case So.NUMBER_FORMATTED:return this.sort.numbers(t,n)*o;case So.TEXT_NUMERIC:return this.sort.stringsNumeric(t,n)*o;case So.TEXT:return this.sort.strings(t,n)*o;default:return 0}}}const IW=new Vb;class NW{constructor(t,n){this.columnsWithTitle=t,this.columnsWithValue=n}calculate(t){let n=t.getColumns().length;for(;n--;)this.calculateColumn(n,t)}calculateColumn(t,n){const r=n.getColumns()[t].field;this.columnsWithTitle.includes(r)?this.addTitle(n,t):this.columnsWithValue.includes(r)&&this.addTotal(n,t)}addTitle(t,n){const r=t.getColumns()[n].id,i=t.getFooterRowColumn(r);i.textContent="TOTAL:"}addTotal(t,n){const o=t.getColumns()[n],r=o.field,i=t.getData(),a=this.displayedRows(i),l=this.totalAmountOf(a,r),d=t.getFooterRowColumn(r),u=o.formatter;d.textContent=`${u?u(0,0,l,o,null,t):l}`}displayedRows(t){const n=[],o=t.getLength();if(!o)return n;for(let r=0;r<o;r++)n.push(t.getItem(r));return n}totalAmountOf(t,n){return t.reduce((o,r)=>(r.isDeleted||(o+=Number(r[n])||0),o),0)}}exports.Autocomplete=Lb;exports.BOLD=ND;exports.ColumnPicker=kD;exports.ColumnSorter=Vb;exports.DecoratorColumnFilter=YB;exports.DecoratorFilter=Nv;exports.DefaultHotKeys=DD;exports.DefaultPrinter=Ib;exports.DeletedRowsFilter=$N;exports.EColumnFilter=je;exports.EColumnFiltersGroup=fn;exports.ESortType=So;exports.EditorAutocomplete=yW;exports.FORMATTER_NUMBER=SW;exports.Filter=Iv;exports.HotKeysDecorator=fc;exports.PreventCopying=OD;exports.RedoUndoOnly=MD;exports.Skeleton=_D;exports.SlickTable=ZB;exports.SlickgridTable=$B;exports.TotalCalculator=NW;exports.WINK=ID;exports.WithSummary=LN;exports.WithoutHotKeys=By;exports.columnCheckboxSelector=VB;exports.columnIsEdited=BB;exports.commitCurrentEdit=Wh;exports.copySelectedRows=Ab;exports.eventContextMenu=ln;exports.formatNumber=kc;exports.formatterCheckMark=CW;exports.formatterGroupTotals=_W;exports.getDisplayedRows=Fc;exports.getFormatterNumber=$b;exports.getNextId=Bh;exports.handleHeaderButtons=Av;exports.headerButtons=No;exports.highlightCell=xW;exports.highlightColumns=TW;exports.hotKeysCopy=zh;exports.hotKeysDelete=Nb;exports.hotKeysRedo=Yh;exports.hotKeysUndo=Uh;exports.openColumnFilter=jN;exports.printerCheckMark=EW;exports.useListenIfTablesWereEdited=dW;
366
+ */var bW=yl.exports,Jm;function wW(){return Jm||(Jm=1,function(e,t){(function(n,o){var r;{try{r=vW}catch{}e.exports=o(r)}})(bW,function(n){var o=typeof n=="function",r=!!window.addEventListener,i=window.document,a=window.setTimeout,l=function(N,M,L,W){r?N.addEventListener(M,L,!!W):N.attachEvent("on"+M,L)},d=function(N,M,L,W){r?N.removeEventListener(M,L,!!W):N.detachEvent("on"+M,L)},u=function(N){return N.trim?N.trim():N.replace(/^\s+|\s+$/g,"")},f=function(N,M){return(" "+N.className+" ").indexOf(" "+M+" ")!==-1},p=function(N,M){f(N,M)||(N.className=N.className===""?M:N.className+" "+M)},y=function(N,M){N.className=u((" "+N.className+" ").replace(" "+M+" "," "))},w=function(N){return/Array/.test(Object.prototype.toString.call(N))},b=function(N){return/Date/.test(Object.prototype.toString.call(N))&&!isNaN(N.getTime())},m=function(N){var M=N.getDay();return M===0||M===6},v=function(N){return N%4===0&&N%100!==0||N%400===0},P=function(N,M){return[31,v(N)?29:28,31,30,31,30,31,31,30,31,30,31][M]},D=function(N){b(N)&&N.setHours(0,0,0,0)},x=function(N,M){return N.getTime()===M.getTime()},S=function(N,M,L){var W,ne;for(W in M)ne=N[W]!==void 0,ne&&typeof M[W]=="object"&&M[W]!==null&&M[W].nodeName===void 0?b(M[W])?L&&(N[W]=new Date(M[W].getTime())):w(M[W])?L&&(N[W]=M[W].slice(0)):N[W]=S({},M[W],L):(L||!ne)&&(N[W]=M[W]);return N},C=function(N,M,L){var W;i.createEvent?(W=i.createEvent("HTMLEvents"),W.initEvent(M,!0,!1),W=S(W,L),N.dispatchEvent(W)):i.createEventObject&&(W=i.createEventObject(),W=S(W,L),N.fireEvent("on"+M,W))},O=function(N){return N.month<0&&(N.year-=Math.ceil(Math.abs(N.month)/12),N.month+=12),N.month>11&&(N.year+=Math.floor(Math.abs(N.month)/12),N.month-=12),N},A={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,firstWeekOfYearMinDays:4,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},F=function(N,M,L){for(M+=N.firstDay;M>=7;)M-=7;return L?N.i18n.weekdaysShort[M]:N.i18n.weekdays[M]},B=function(N){var M=[],L="false";if(N.isEmpty)if(N.showDaysInNextAndPreviousMonths)M.push("is-outside-current-month"),N.enableSelectionDaysInNextAndPreviousMonths||M.push("is-selection-disabled");else return'<td class="is-empty"></td>';return N.isDisabled&&M.push("is-disabled"),N.isToday&&M.push("is-today"),N.isSelected&&(M.push("is-selected"),L="true"),N.hasEvent&&M.push("has-event"),N.isInRange&&M.push("is-inrange"),N.isStartRange&&M.push("is-startrange"),N.isEndRange&&M.push("is-endrange"),'<td data-day="'+N.day+'" class="'+M.join(" ")+'" aria-selected="'+L+'"><button class="pika-button pika-day" type="button" data-pika-year="'+N.year+'" data-pika-month="'+N.month+'" data-pika-day="'+N.day+'">'+N.day+"</button></td>"},R=function(N,M){N.setHours(0,0,0,0);var L=N.getDate(),W=N.getDay(),ne=M,oe=ne-1,se=7,j=function(le){return(le+se-1)%se};N.setDate(L+oe-j(W));var ee=new Date(N.getFullYear(),0,ne),J=24*60*60*1e3,te=(N.getTime()-ee.getTime())/J,ce=1+Math.round((te-oe+j(ee.getDay()))/se);return ce},$=function(N,M,L,W){var ne=new Date(L,M,N),oe=o?n(ne).isoWeek():R(ne,W);return'<td class="pika-week">'+oe+"</td>"},K=function(N,M,L,W){return'<tr class="pika-row'+(L?" pick-whole-week":"")+(W?" is-selected":"")+'">'+(M?N.reverse():N).join("")+"</tr>"},G=function(N){return"<tbody>"+N.join("")+"</tbody>"},q=function(N){var M,L=[];for(N.showWeekNumber&&L.push("<th></th>"),M=0;M<7;M++)L.push('<th scope="col"><abbr title="'+F(N,M)+'">'+F(N,M,!0)+"</abbr></th>");return"<thead><tr>"+(N.isRTL?L.reverse():L).join("")+"</tr></thead>"},Y=function(N,M,L,W,ne,oe){var se,j,ee,J=N._o,te=L===J.minYear,ce=L===J.maxYear,le='<div id="'+oe+'" class="pika-title" role="heading" aria-live="assertive">',he,H,re=!0,Z=!0;for(ee=[],se=0;se<12;se++)ee.push('<option value="'+(L===ne?se-M:12+se-M)+'"'+(se===W?' selected="selected"':"")+(te&&se<J.minMonth||ce&&se>J.maxMonth?' disabled="disabled"':"")+">"+J.i18n.months[se]+"</option>");for(he='<div class="pika-label">'+J.i18n.months[W]+'<select class="pika-select pika-select-month" tabindex="-1">'+ee.join("")+"</select></div>",w(J.yearRange)?(se=J.yearRange[0],j=J.yearRange[1]+1):(se=L-J.yearRange,j=1+L+J.yearRange),ee=[];se<j&&se<=J.maxYear;se++)se>=J.minYear&&ee.push('<option value="'+se+'"'+(se===L?' selected="selected"':"")+">"+se+"</option>");return H='<div class="pika-label">'+L+J.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+ee.join("")+"</select></div>",J.showMonthAfterYear?le+=H+he:le+=he+H,te&&(W===0||J.minMonth>=W)&&(re=!1),ce&&(W===11||J.maxMonth<=W)&&(Z=!1),M===0&&(le+='<button class="pika-prev'+(re?"":" is-disabled")+'" type="button">'+J.i18n.previousMonth+"</button>"),M===N._o.numberOfMonths-1&&(le+='<button class="pika-next'+(Z?"":" is-disabled")+'" type="button">'+J.i18n.nextMonth+"</button>"),le+="</div>"},z=function(N,M,L){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+L+'">'+q(N)+G(M)+"</table>"},ae=function(N){var M=this,L=M.config(N);M._onMouseDown=function(ne){if(M._v){ne=ne||window.event;var oe=ne.target||ne.srcElement;if(oe)if(f(oe,"is-disabled")||(f(oe,"pika-button")&&!f(oe,"is-empty")&&!f(oe.parentNode,"is-disabled")?(M.setDate(new Date(oe.getAttribute("data-pika-year"),oe.getAttribute("data-pika-month"),oe.getAttribute("data-pika-day"))),L.bound&&a(function(){M.hide(),L.blurFieldOnSelect&&L.field&&L.field.blur()},100)):f(oe,"pika-prev")?M.prevMonth():f(oe,"pika-next")&&M.nextMonth()),f(oe,"pika-select"))M._c=!0;else if(ne.preventDefault)ne.preventDefault();else return ne.returnValue=!1,!1}},M._onChange=function(ne){ne=ne||window.event;var oe=ne.target||ne.srcElement;oe&&(f(oe,"pika-select-month")?M.gotoMonth(oe.value):f(oe,"pika-select-year")&&M.gotoYear(oe.value))},M._onKeyChange=function(ne){if(ne=ne||window.event,M.isVisible())switch(ne.keyCode){case 13:case 27:L.field&&L.field.blur();break;case 37:M.adjustDate("subtract",1);break;case 38:M.adjustDate("subtract",7);break;case 39:M.adjustDate("add",1);break;case 40:M.adjustDate("add",7);break;case 8:case 46:M.setDate(null);break}},M._parseFieldValue=function(){if(L.parse)return L.parse(L.field.value,L.format);if(o){var ne=n(L.field.value,L.format,L.formatStrict);return ne&&ne.isValid()?ne.toDate():null}else return new Date(Date.parse(L.field.value))},M._onInputChange=function(ne){var oe;ne.firedBy!==M&&(oe=M._parseFieldValue(),b(oe)&&M.setDate(oe),M._v||M.show())},M._onInputFocus=function(){M.show()},M._onInputClick=function(){M.show()},M._onInputBlur=function(){var ne=i.activeElement;do if(f(ne,"pika-single"))return;while(ne=ne.parentNode);M._c||(M._b=a(function(){M.hide()},50)),M._c=!1},M._onClick=function(ne){ne=ne||window.event;var oe=ne.target||ne.srcElement,se=oe;if(oe){!r&&f(oe,"pika-select")&&(oe.onchange||(oe.setAttribute("onchange","return;"),l(oe,"change",M._onChange)));do if(f(se,"pika-single")||se===L.trigger)return;while(se=se.parentNode);M._v&&oe!==L.trigger&&se!==L.trigger&&M.hide()}},M.el=i.createElement("div"),M.el.className="pika-single"+(L.isRTL?" is-rtl":"")+(L.theme?" "+L.theme:""),l(M.el,"mousedown",M._onMouseDown,!0),l(M.el,"touchend",M._onMouseDown,!0),l(M.el,"change",M._onChange),L.keyboardInput&&l(i,"keydown",M._onKeyChange),L.field&&(L.container?L.container.appendChild(M.el):L.bound?i.body.appendChild(M.el):L.field.parentNode.insertBefore(M.el,L.field.nextSibling),l(L.field,"change",M._onInputChange),L.defaultDate||(L.defaultDate=M._parseFieldValue(),L.setDefaultDate=!0));var W=L.defaultDate;b(W)?L.setDefaultDate?M.setDate(W,!0):M.gotoDate(W):M.gotoDate(new Date),L.bound?(this.hide(),M.el.className+=" is-bound",l(L.trigger,"click",M._onInputClick),l(L.trigger,"focus",M._onInputFocus),l(L.trigger,"blur",M._onInputBlur)):this.show()};return ae.prototype={config:function(N){this._o||(this._o=S({},A,!0));var M=S(this._o,N,!0);M.isRTL=!!M.isRTL,M.field=M.field&&M.field.nodeName?M.field:null,M.theme=typeof M.theme=="string"&&M.theme?M.theme:null,M.bound=!!(M.bound!==void 0?M.field&&M.bound:M.field),M.trigger=M.trigger&&M.trigger.nodeName?M.trigger:M.field,M.disableWeekends=!!M.disableWeekends,M.disableDayFn=typeof M.disableDayFn=="function"?M.disableDayFn:null;var L=parseInt(M.numberOfMonths,10)||1;if(M.numberOfMonths=L>4?4:L,b(M.minDate)||(M.minDate=!1),b(M.maxDate)||(M.maxDate=!1),M.minDate&&M.maxDate&&M.maxDate<M.minDate&&(M.maxDate=M.minDate=!1),M.minDate&&this.setMinDate(M.minDate),M.maxDate&&this.setMaxDate(M.maxDate),w(M.yearRange)){var W=new Date().getFullYear()-10;M.yearRange[0]=parseInt(M.yearRange[0],10)||W,M.yearRange[1]=parseInt(M.yearRange[1],10)||W}else M.yearRange=Math.abs(parseInt(M.yearRange,10))||A.yearRange,M.yearRange>100&&(M.yearRange=100);return M},toString:function(N){return N=N||this._o.format,b(this._d)?this._o.toString?this._o.toString(this._d,N):o?n(this._d).format(N):this._d.toDateString():""},getMoment:function(){return o?n(this._d):null},setMoment:function(N,M){o&&n.isMoment(N)&&this.setDate(N.toDate(),M)},getDate:function(){return b(this._d)?new Date(this._d.getTime()):null},setDate:function(N,M){if(!N)return this._d=null,this._o.field&&(this._o.field.value="",C(this._o.field,"change",{firedBy:this})),this.draw();if(typeof N=="string"&&(N=new Date(Date.parse(N))),!!b(N)){var L=this._o.minDate,W=this._o.maxDate;b(L)&&N<L?N=L:b(W)&&N>W&&(N=W),this._d=new Date(N.getTime()),D(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),C(this._o.field,"change",{firedBy:this})),!M&&typeof this._o.onSelect=="function"&&this._o.onSelect.call(this,this.getDate())}},clear:function(){this.setDate(null)},gotoDate:function(N){var M=!0;if(b(N)){if(this.calendars){var L=new Date(this.calendars[0].year,this.calendars[0].month,1),W=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),ne=N.getTime();W.setMonth(W.getMonth()+1),W.setDate(W.getDate()-1),M=ne<L.getTime()||W.getTime()<ne}M&&(this.calendars=[{month:N.getMonth(),year:N.getFullYear()}],this._o.mainCalendar==="right"&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(N,M){var L=this.getDate()||new Date,W=parseInt(M)*24*60*60*1e3,ne;N==="add"?ne=new Date(L.valueOf()+W):N==="subtract"&&(ne=new Date(L.valueOf()-W)),this.setDate(ne)},adjustCalendars:function(){this.calendars[0]=O(this.calendars[0]);for(var N=1;N<this._o.numberOfMonths;N++)this.calendars[N]=O({month:this.calendars[0].month+N,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(N){isNaN(N)||(this.calendars[0].month=parseInt(N,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(N){isNaN(N)||(this.calendars[0].year=parseInt(N,10),this.adjustCalendars())},setMinDate:function(N){N instanceof Date?(D(N),this._o.minDate=N,this._o.minYear=N.getFullYear(),this._o.minMonth=N.getMonth()):(this._o.minDate=A.minDate,this._o.minYear=A.minYear,this._o.minMonth=A.minMonth,this._o.startRange=A.startRange),this.draw()},setMaxDate:function(N){N instanceof Date?(D(N),this._o.maxDate=N,this._o.maxYear=N.getFullYear(),this._o.maxMonth=N.getMonth()):(this._o.maxDate=A.maxDate,this._o.maxYear=A.maxYear,this._o.maxMonth=A.maxMonth,this._o.endRange=A.endRange),this.draw()},setStartRange:function(N){this._o.startRange=N},setEndRange:function(N){this._o.endRange=N},draw:function(N){if(!(!this._v&&!N)){var M=this._o,L=M.minYear,W=M.maxYear,ne=M.minMonth,oe=M.maxMonth,se="",j;this._y<=L&&(this._y=L,!isNaN(ne)&&this._m<ne&&(this._m=ne)),this._y>=W&&(this._y=W,!isNaN(oe)&&this._m>oe&&(this._m=oe));for(var ee=0;ee<M.numberOfMonths;ee++)j="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2),se+='<div class="pika-lendar">'+Y(this,ee,this.calendars[ee].year,this.calendars[ee].month,this.calendars[0].year,j)+this.render(this.calendars[ee].year,this.calendars[ee].month,j)+"</div>";this.el.innerHTML=se,M.bound&&M.field.type!=="hidden"&&a(function(){M.trigger.focus()},1),typeof this._o.onDraw=="function"&&this._o.onDraw(this),M.bound&&M.field.setAttribute("aria-label",M.ariaLabel)}},adjustPosition:function(){var N,M,L,W,ne,oe,se,j,ee,J,te,ce;if(!this._o.container){if(this.el.style.position="absolute",N=this._o.trigger,M=N,L=this.el.offsetWidth,W=this.el.offsetHeight,ne=window.innerWidth||i.documentElement.clientWidth,oe=window.innerHeight||i.documentElement.clientHeight,se=window.pageYOffset||i.body.scrollTop||i.documentElement.scrollTop,te=!0,ce=!0,typeof N.getBoundingClientRect=="function")J=N.getBoundingClientRect(),j=J.left+window.pageXOffset,ee=J.bottom+window.pageYOffset;else for(j=M.offsetLeft,ee=M.offsetTop+M.offsetHeight;M=M.offsetParent;)j+=M.offsetLeft,ee+=M.offsetTop;(this._o.reposition&&j+L>ne||this._o.position.indexOf("right")>-1&&j-L+N.offsetWidth>0)&&(j=j-L+N.offsetWidth,te=!1),(this._o.reposition&&ee+W>oe+se||this._o.position.indexOf("top")>-1&&ee-W-N.offsetHeight>0)&&(ee=ee-W-N.offsetHeight,ce=!1),this.el.style.left=j+"px",this.el.style.top=ee+"px",p(this.el,te?"left-aligned":"right-aligned"),p(this.el,ce?"bottom-aligned":"top-aligned"),y(this.el,te?"right-aligned":"left-aligned"),y(this.el,ce?"top-aligned":"bottom-aligned")}},render:function(N,M,L){var W=this._o,ne=new Date,oe=P(N,M),se=new Date(N,M,1).getDay(),j=[],ee=[];D(ne),W.firstDay>0&&(se-=W.firstDay,se<0&&(se+=7));for(var J=M===0?11:M-1,te=M===11?0:M+1,ce=M===0?N-1:N,le=M===11?N+1:N,he=P(ce,J),H=oe+se,re=H;re>7;)re-=7;H+=7-re;for(var Z=!1,fe=0,pe=0;fe<H;fe++){var be=new Date(N,M,1+(fe-se)),ge=b(this._d)?x(be,this._d):!1,Re=x(be,ne),Ve=W.events.indexOf(be.toDateString())!==-1,Ne=fe<se||fe>=oe+se,Je=1+(fe-se),ke=M,ut=N,Yt=W.startRange&&x(W.startRange,be),rt=W.endRange&&x(W.endRange,be),Ot=W.startRange&&W.endRange&&W.startRange<be&&be<W.endRange,Ut=W.minDate&&be<W.minDate||W.maxDate&&be>W.maxDate||W.disableWeekends&&m(be)||W.disableDayFn&&W.disableDayFn(be);Ne&&(fe<se?(Je=he+Je,ke=J,ut=ce):(Je=Je-oe,ke=te,ut=le));var Lt={day:Je,month:ke,year:ut,hasEvent:Ve,isSelected:ge,isToday:Re,isDisabled:Ut,isEmpty:Ne,isStartRange:Yt,isEndRange:rt,isInRange:Ot,showDaysInNextAndPreviousMonths:W.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:W.enableSelectionDaysInNextAndPreviousMonths};W.pickWholeWeek&&ge&&(Z=!0),ee.push(B(Lt)),++pe===7&&(W.showWeekNumber&&ee.unshift($(fe-se,M,N,W.firstWeekOfYearMinDays)),j.push(K(ee,W.isRTL,W.pickWholeWeek,Z)),ee=[],pe=0,Z=!1)}return z(W,j,L)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),y(this.el,"is-hidden"),this._o.bound&&(l(i,"click",this._onClick),this.adjustPosition()),typeof this._o.onOpen=="function"&&this._o.onOpen.call(this))},hide:function(){var N=this._v;N!==!1&&(this._o.bound&&d(i,"click",this._onClick),this._o.container||(this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto"),p(this.el,"is-hidden"),this._v=!1,N!==void 0&&typeof this._o.onClose=="function"&&this._o.onClose.call(this))},destroy:function(){var N=this._o;this.hide(),d(this.el,"mousedown",this._onMouseDown,!0),d(this.el,"touchend",this._onMouseDown,!0),d(this.el,"change",this._onChange),N.keyboardInput&&d(i,"keydown",this._onKeyChange),N.field&&(d(N.field,"change",this._onInputChange),N.bound&&(d(N.trigger,"click",this._onInputClick),d(N.trigger,"focus",this._onInputFocus),d(N.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},ae})}(yl)),yl.exports}wW();const CW=(e,t,n)=>n==="0"?"":n?"<span class='sgi sgi-check green'></span>":"";function $b(e){return function(n,o,r){return kc(r,e)}}const SW=$b().name,_W=(e,t)=>{const n=e.sum&&e.sum[t.field];return n!==null?`${e.group.level?"total":"TOTAL"}: ${kc(n)}`:""},xW=(e,t,n)=>{const r=e.getData().getRowById(t);if(r===void 0)return;const i=e.getColumnIndex(n);e.gotoCell(r,i),e.setCellCssStyles(`${r}`,{[r]:{[n]:"wink"}}),setTimeout(()=>{e.removeCellCssStyles(`${r}`)},1500)};function RW(e){return e.reduce((t,n)=>(t[n]="wink",t),{})}function TW(e,t){const o=e.getData().getLength(),r=kW(o,t);e.setCellCssStyles("wink",r),setTimeout(()=>{e.removeCellCssStyles("wink")},1500)}function kW(e,t){const n=RW(t),o={};let r=0;for(;r<e;)o[r]=n,r++;return o}function EW(e,t,n){return n==="0"?"":n?"Yes":""}function PW(e){if(!e.getSelectionModel())return eg(e);let t=e.getSelectedRows();return t.sort((n,o)=>n-o),t.length===0&&(t=eg(e)),t}function eg(e){const t=e.getData();return Array.from({length:t.getLength()},(n,o)=>o)}var Lc=(e=>(e.slickTable="slick-table",e.sorting="sorting",e))(Lc||{});function Bd(){return JSON.parse(localStorage.getItem(Lc.slickTable)||"{}")}function Wd(e){return e[Lc.sorting]||{}}function tg(e,t){localStorage.setItem(Lc.slickTable,JSON.stringify({...e,sorting:t}))}class DW{getTableSorting(t){const n=Bd();return Wd(n)[t]}resetTableSorting(t){const n=Bd(),o=Wd(n);delete o[t],tg(n,o)}setTableSorting(t,n,o){const r=Bd(),i=Wd(r);i[t]={columnId:n,isAscending:o},tg(r,i)}}const Hd=new DW;class OW{constructor(){this.emptyValue="1/1/1970"}dates(t,n){const o=Ss(t||this.emptyValue),r=Ss(n||this.emptyValue);return o-r}numbers(t,n){return Number(t||0)-Number(n||0)}stringsNumeric(t,n){return!t&&!n?0:t?n?t.localeCompare(n,void 0,{numeric:!0}):1:-1}strings(t,n){return(t||"").toLowerCase()>(n||"").toLowerCase()?1:(t||"").toLowerCase()<(n||"").toLowerCase()?-1:0}numbersWithSymbols(t,n){const o=Number((t||"0").match(/^\d+/g)?.[0]||0);return Number((n||"0").match(/^\d+/g)?.[0]||0)-o}}const MW=new OW;class Vb{constructor(){this.sort=MW,this.withFormatter=[So.TEXT,So.NUMBER_FORMATTED]}getSortFunction(t){let n="",o=!1,r;return(i,a)=>{const{grid:l,sortAsc:d,columnId:u}=a,f=a.sortCol;if(!l||!f)return;const p=f.field;if(!p)return;const y=f.sortAs;if(!y)return;const{formatter:w}=f,b=l.getData();d&&n===f?.id?(o=!0,Hd.resetTableSorting(t),l.setSortColumns([]),n=""):(o=!1,n=u,Hd.setTableSorting(t,u,d));const m=d?-1:1,v=b.getGrouping(),P=v.find(({getter:D})=>D===f.id);if(P){if(r||(r=v.map(({comparer:D})=>D)),o){const D=b.getGrouping(),x=D.findIndex(({getter:S})=>S===f.id);D[x].comparer=r[x],b.refresh();return}P.comparer=(D,x)=>{let S=D.value,C=x.value;return w&&this.withFormatter.includes(y)&&(S=w(0,0,S,f,null,l),C=w(0,0,C,f,null,l)),this.priority(D,x)||this.compare(S,C,m,y)}}else{const D=b.getItems(),x=b.getIdPropertyName();D.sort((S,C)=>{if(o)return S[x]-C[x];let O=S[p],A=C[p];return w&&this.withFormatter.includes(y)&&(O=w(0,0,O,f,S,l),A=w(0,0,A,f,C,l)),this.priority(S,C)||this.compare(O,A,m,y)})}b.refresh()}}priority(t,n){return 0}restoreSorting(t){const n=t.grid;if(!n)return;const o=Hd.getTableSorting(t.id);if(o){const{columnId:r,isAscending:i}=o,a=this.getSortFunction(t.id),l=n.getColumns().find(({id:d})=>d===r);if(l){a(null,{grid:n,columnId:r,sortAsc:i,sortCol:l,sortCols:[]});const d=document.querySelector(`#${t.id} [data-id="${r}"]`);if(!d)return;d.classList.add("slick-header-column-sorted");const u=d.querySelector(".slick-sort-indicator");if(!u)return;u.classList.add(`slick-sort-indicator-${i?"asc":"desc"}`),n.invalidate()}}}compare(t,n,o,r){switch(r){case So.DATE:return this.sort.dates(t,n)*o;case So.NUMBER:case So.NUMBER_FORMATTED:return this.sort.numbers(t,n)*o;case So.TEXT_NUMERIC:return this.sort.stringsNumeric(t,n)*o;case So.TEXT:return this.sort.strings(t,n)*o;default:return 0}}}const IW=new Vb;class NW{constructor(t,n){this.columnsWithTitle=t,this.columnsWithValue=n}calculate(t){let n=t.getColumns().length;for(;n--;)this.calculateColumn(n,t)}calculateColumn(t,n){const r=n.getColumns()[t].field;this.columnsWithTitle.includes(r)?this.addTitle(n,t):this.columnsWithValue.includes(r)&&this.addTotal(n,t)}addTitle(t,n){const r=t.getColumns()[n].id,i=t.getFooterRowColumn(r);i.textContent="TOTAL:"}addTotal(t,n){const o=t.getColumns()[n],r=o.field,i=t.getData(),a=this.displayedRows(i),l=this.totalAmountOf(a,r),d=t.getFooterRowColumn(r),u=o.formatter;d.textContent=`${u?u(0,0,l,o,null,t):l}`}displayedRows(t){const n=[],o=t.getLength();if(!o)return n;for(let r=0;r<o;r++)n.push(t.getItem(r));return n}totalAmountOf(t,n){return t.reduce((o,r)=>(r.isDeleted||(o+=Number(r[n])||0),o),0)}}exports.Autocomplete=Lb;exports.BOLD=ND;exports.ColumnPicker=kD;exports.ColumnSorter=Vb;exports.DecoratorColumnFilter=YB;exports.DecoratorFilter=Nv;exports.DefaultHotKeys=DD;exports.DefaultPrinter=Ib;exports.DeletedRowsFilter=$N;exports.EColumnFilter=je;exports.EColumnFiltersGroup=fn;exports.ESortType=So;exports.EditorAutocomplete=yW;exports.FORMATTER_NUMBER=SW;exports.Filter=Iv;exports.HotKeysDecorator=fc;exports.PreventCopying=OD;exports.RedoUndoOnly=MD;exports.Skeleton=_D;exports.SlickTable=ZB;exports.SlickgridTable=$B;exports.TotalCalculator=NW;exports.WINK=ID;exports.WithSummary=LN;exports.WithoutHotKeys=By;exports.columnCheckboxSelector=VB;exports.columnIsEdited=BB;exports.commitCurrentEdit=Wh;exports.copySelectedRows=Ab;exports.eventContextMenu=ln;exports.formatNumber=kc;exports.formatterCheckMark=CW;exports.formatterGroupTotals=_W;exports.getDisplayedRows=Fc;exports.getFormatterNumber=$b;exports.getNextId=Bh;exports.handleHeaderButtons=Av;exports.headerButtons=No;exports.highlightCell=xW;exports.highlightColumns=TW;exports.hotKeysCopy=zh;exports.hotKeysDelete=Nb;exports.hotKeysRedo=Yh;exports.hotKeysUndo=Uh;exports.openColumnFilter=jN;exports.printerCheckMark=EW;exports.useListenIfTablesWereEdited=dW;
package/dist/index.es.js CHANGED
@@ -45313,7 +45313,7 @@ function lW() {
45313
45313
  }(Sl)), Sl.exports;
45314
45314
  }
45315
45315
  lW();
45316
- const $W = (e, t, n) => n === "0" ? "" : n ? "<span class='sgi sgi-check'></span>" : "";
45316
+ const $W = (e, t, n) => n === "0" ? "" : n ? "<span class='sgi sgi-check green'></span>" : "";
45317
45317
  function cW(e) {
45318
45318
  return function(n, o, r) {
45319
45319
  return kh(r, e);
@@ -1,2 +1,2 @@
1
- export declare const formatterCheckMark: (_row: number, _cell: number, value: boolean | "0" | "1" | 0 | 1) => "" | "<span class='sgi sgi-check'></span>";
1
+ export declare const formatterCheckMark: (_row: number, _cell: number, value: boolean | "0" | "1" | 0 | 1) => "" | "<span class='sgi sgi-check green'></span>";
2
2
  //# sourceMappingURL=formatterCheckMark.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"formatterCheckMark.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/lib/slickgrid/lib/formatters/formatterCheckMark.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,GAC9B,MAAM,MAAM,EACZ,OAAO,MAAM,EACb,OAAO,OAAO,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,+CAIlC,CAAC"}
1
+ {"version":3,"file":"formatterCheckMark.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/lib/slickgrid/lib/formatters/formatterCheckMark.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,GAC9B,MAAM,MAAM,EACZ,OAAO,MAAM,EACb,OAAO,OAAO,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,qDAIlC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slick-table",
3
- "version": "1.1.59",
3
+ "version": "1.1.60",
4
4
  "description": "Enhanced version of SlickGrid library",
5
5
  "private": false,
6
6
  "type": "module",
@@ -4,5 +4,5 @@ export const formatterCheckMark = (
4
4
  value: boolean | "0" | "1" | 0 | 1,
5
5
  ) => {
6
6
  if (value === "0") return "";
7
- return value ? "<span class='sgi sgi-check'></span>" : "";
7
+ return value ? "<span class='sgi sgi-check green'></span>" : "";
8
8
  };