vue3-easy-data-table
Advanced tools
Comparing version 1.5.46 to 1.5.47
@@ -1,1 +0,1 @@ | ||
(function(e,E){typeof exports=="object"&&typeof module!="undefined"?module.exports=E(require("vue")):typeof define=="function"&&define.amd?define(["vue"],E):(e=typeof globalThis!="undefined"?globalThis:e||self,e["vue3-easy-data-table"]=E(e.Vue))})(this,function(e){"use strict";var oa=Object.defineProperty,la=Object.defineProperties;var sa=Object.getOwnPropertyDescriptors;var Te=Object.getOwnPropertySymbols;var ia=Object.prototype.hasOwnProperty,ca=Object.prototype.propertyIsEnumerable;var De=(e,E,C)=>E in e?oa(e,E,{enumerable:!0,configurable:!0,writable:!0,value:C}):e[E]=C,H=(e,E)=>{for(var C in E||(E={}))ia.call(E,C)&&De(e,C,E[C]);if(Te)for(var C of Te(E))ca.call(E,C)&&De(e,C,E[C]);return e},le=(e,E)=>la(e,sa(E));var E="",C=(a,l)=>{const t=a.__vccOpts||a;for(const[n,f]of l)t[n]=f;return t};const ze=a=>(e.pushScopeId("data-v-e0a0b7f0"),a=a(),e.popScopeId(),a),Me=["onClick"],He=["checked"],Oe=ze(()=>e.createElementVNode("label",{for:"checbox"},null,-1));var je=C(e.defineComponent({__name:"MultipleSelectCheckBox",props:{status:{type:String,required:!0}},emits:["change"],setup(a,{emit:l}){const t=a;e.useCssVars(g=>({"51ab8a49":e.unref(s)}));const n=e.computed(()=>t.status==="allSelected"),f=()=>{l("change",!n.value)},s=e.inject("themeColor");return(g,o)=>(e.openBlock(),e.createElementBlock("div",{class:"easy-checkbox",onClick:e.withModifiers(f,["stop","prevent"])},[e.createElementVNode("input",{type:"checkbox",checked:e.unref(n),class:e.normalizeClass(a.status)},null,10,He),Oe],8,Me))}}),[["__scopeId","data-v-e0a0b7f0"]]),ua="";const qe=a=>(e.pushScopeId("data-v-7e69a276"),a=a(),e.popScopeId(),a),We=["checked"],Ue=qe(()=>e.createElementVNode("label",{for:"checbox"},null,-1));var Je=C(e.defineComponent({__name:"SingleSelectCheckBox",props:{checked:{type:Boolean,required:!0}},emits:["change"],setup(a,{emit:l}){e.useCssVars(n=>({fdaf7e9e:e.unref(t)}));const t=e.inject("themeColor");return(n,f)=>(e.openBlock(),e.createElementBlock("div",{class:"easy-checkbox",onClick:f[0]||(f[0]=e.withModifiers(s=>l("change"),["stop","prevent"]))},[e.createElementVNode("input",{type:"checkbox",checked:a.checked},null,8,We),Ue]))}}),[["__scopeId","data-v-7e69a276"]]),fa="";const Ge=a=>(e.pushScopeId("data-v-4ca5de3a"),a=a(),e.popScopeId(),a),Qe={class:"easy-data-table__rows-selector"},Xe={class:"rows-input"},Ye=Ge(()=>e.createElementVNode("div",{class:"triangle"},null,-1)),Ze=["onClick"];var Ke=C(e.defineComponent({__name:"RowsSelector",props:{modelValue:{type:Number,required:!0},rowsItems:{type:Array,required:!0}},emits:["update:modelValue"],setup(a,{emit:l}){const t=a;e.useCssVars(_=>({"1b889342":e.unref(p)}));const n=e.ref(!1),f=e.ref(!1),s=e.inject("dataTable");e.watch(n,_=>{if(_&&s){const y=window.innerHeight,h=s.value.getBoundingClientRect().height,w=s.value.getBoundingClientRect().top;y-(h+w)<=100?f.value=!0:f.value=!1}});const g=e.computed({get:()=>t.modelValue,set:_=>{l("update:modelValue",_)}}),o=_=>{g.value=_,n.value=!1},r=(_,y)=>{let h=_.parentNode;for(;h!=null;){if(h.classList&&h.classList.contains(y))return!0;h=h.parentNode}return!1},i=_=>{r(_.target,"easy-data-table__rows-selector")||(n.value=!1)};e.onMounted(()=>{document.addEventListener("click",i)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",i)});const p=e.inject("themeColor");return(_,y)=>(e.openBlock(),e.createElementBlock("div",Qe,[e.createElementVNode("div",{class:"rows-input__wrapper",onClick:y[0]||(y[0]=h=>n.value=!n.value)},[e.createElementVNode("div",Xe,e.toDisplayString(e.unref(g)),1),Ye]),e.createElementVNode("ul",{class:e.normalizeClass(["select-items",{show:n.value,inside:f.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.rowsItems,h=>(e.openBlock(),e.createElementBlock("li",{key:h,class:e.normalizeClass({selected:h===e.unref(g)}),onClick:w=>o(h)},e.toDisplayString(h),11,Ze))),128))],2)]))}}),[["__scopeId","data-v-4ca5de3a"]]),ga="";const se=a=>(e.pushScopeId("data-v-1fa3a520"),a=a(),e.popScopeId(),a),et={class:"lds-ring"},tt=[se(()=>e.createElementVNode("div",null,null,-1)),se(()=>e.createElementVNode("div",null,null,-1)),se(()=>e.createElementVNode("div",null,null,-1)),se(()=>e.createElementVNode("div",null,null,-1))];var at=C(e.defineComponent({__name:"Loading",setup(a){e.useCssVars(t=>({"26774109":e.unref(l)}));const l=e.inject("themeColor");return(t,n)=>(e.openBlock(),e.createElementBlock("div",et,tt))}}),[["__scopeId","data-v-1fa3a520"]]),xa="";const nt={class:"loader-line"};var rt=C(e.defineComponent({__name:"LoadingLine",setup(a){e.useCssVars(t=>({"0d327f57":e.unref(l)}));const l=e.inject("themeColor");return(t,n)=>(e.openBlock(),e.createElementBlock("div",nt))}}),[["__scopeId","data-v-7d281cac"]]),Sa="";const ot={class:"buttons-pagination"},lt=["onClick"];var st=C(e.defineComponent({__name:"ButtonsPagination",props:{maxPaginationNumber:{type:Number,required:!0},currentPaginationNumber:{type:Number,required:!0}},emits:["updatePage"],setup(a,{emit:l}){const t=a;e.useCssVars(o=>({"40dd4f07":e.unref(g)}));const n=7,f=o=>{o.type==="button"&&!o.active&&l("updatePage",o.page)},s=e.computed(()=>{const o=[];if(t.maxPaginationNumber<=n)for(let r=1;r<=t.maxPaginationNumber;r+=1)o.push({type:"button",page:r,active:r===t.currentPaginationNumber,activePrev:r+1===t.currentPaginationNumber});else if([1,2,t.maxPaginationNumber,t.maxPaginationNumber-1].includes(t.currentPaginationNumber))for(let r=1;r<=n;r+=1)if(r<=3)o.push({type:"button",page:r,active:r===t.currentPaginationNumber,activePrev:r+1===t.currentPaginationNumber});else if(r===4)o.push({type:"omission"});else{const i=t.maxPaginationNumber-(n-r);o.push({type:"button",page:i,active:i===t.currentPaginationNumber,activePrev:i+1===t.currentPaginationNumber})}else if([3,4].includes(t.currentPaginationNumber))for(let r=1;r<=n;r+=1)r<=5?o.push({type:"button",page:r,active:r===t.currentPaginationNumber,activePrev:r+1===t.currentPaginationNumber}):r===6?o.push({type:"omission"}):o.push({type:"button",page:t.maxPaginationNumber,active:t.maxPaginationNumber===t.currentPaginationNumber,activePrev:r+1===t.currentPaginationNumber});else if([t.maxPaginationNumber-2,t.maxPaginationNumber-3].includes(t.currentPaginationNumber))for(let r=1;r<=n;r+=1)if(r===1)o.push({type:"button",page:1,active:t.currentPaginationNumber===1,activePrev:r+1===t.currentPaginationNumber});else if(r===2)o.push({type:"omission"});else{const i=t.maxPaginationNumber-(n-r);o.push({type:"button",page:i,active:i===t.currentPaginationNumber,activePrev:i+1===t.currentPaginationNumber})}else for(let r=1;r<=n;r+=1)if(r===1)o.push({type:"button",page:1,active:t.currentPaginationNumber===1,activePrev:r+1===t.currentPaginationNumber});else if(r===2||r===6)o.push({type:"omission"});else if(r===7)o.push({type:"button",page:t.maxPaginationNumber,active:t.maxPaginationNumber===t.currentPaginationNumber,activePrev:r+1===t.currentPaginationNumber});else{const i=4-r,p=t.currentPaginationNumber-i;o.push({type:"button",page:p,active:p===t.currentPaginationNumber,activePrev:p+1===t.currentPaginationNumber})}return o}),g=e.inject("themeColor");return(o,r)=>(e.openBlock(),e.createElementBlock("div",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),(i,p)=>(e.openBlock(),e.createElementBlock("div",{key:p,class:e.normalizeClass(["item",{button:i.type==="button",active:i.type==="button"&&i.active,"active-prev":i.type==="button"&&i.activePrev,omission:i.type==="omission"}]),onClick:_=>f(i)},e.toDisplayString(i.type==="button"?i.page:"..."),11,lt))),128))]))}}),[["__scopeId","data-v-4c681fa2"]]),Na="";const ye=a=>(e.pushScopeId("data-v-c9da5286"),a=a(),e.popScopeId(),a),it=[ye(()=>e.createElementVNode("span",{class:"arrow arrow-right"},null,-1))],ct=[ye(()=>e.createElementVNode("span",{class:"arrow arrow-left"},null,-1))];var dt=C(e.defineComponent({__name:"PaginationArrows",props:{isFirstPage:{type:Boolean,required:!1},isLastPage:{type:Boolean,required:!1}},emits:["clickPrevPage","clickNextPage"],setup(a,{emit:l}){const t=e.useSlots();return(n,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["previous-page__click-button",{"first-page":a.isFirstPage}]),onClick:f[0]||(f[0]=s=>l("clickPrevPage"))},it,2),e.unref(t).buttonsPagination?e.renderSlot(n.$slots,"buttonsPagination",{key:0},void 0,!0):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["next-page__click-button",{"last-page":a.isLastPage}]),onClick:f[1]||(f[1]=s=>l("clickNextPage"))},ct,2)],64))}}),[["__scopeId","data-v-c9da5286"]]);function ut(a,l,t,n){return{clickRow:(s,g,o)=>{if(a.value!==g)return;const r=H({},s);if(l.value){const{checkbox:i}=s;delete r.checkbox,r.isSelected=i}if(t.value){const{index:i}=s;delete r.index,r.indexInCurrentPage=i}n("clickRow",r,o)}}}function I(a,l){var t;if(a.includes(".")){const n=a.split("."),{length:f}=n;let s,g=0;for(;g<f;){if(g===0)s=l[n[0]];else if(s&&typeof s=="object")s=s[n[g]];else{s="";break}g+=1}return s!=null?s:""}return(t=l[a])!=null?t:""}function pt(a,l){const t=I(a,l);return Array.isArray(t)?t.join(","):t}function he(a,l){let t=n=>JSON.stringify(n)===JSON.stringify(a);return l&&typeof l=="function"&&(t=n=>l(n)===l(a)),l&&typeof l=="string"&&(t=n=>I(l,n)===I(l,a)),t}function ie(a,l,t){return a.findIndex(he(l,t))}function _e(a,l,t){return he(a,t)(l)}function ft(a,l,t,n,f){const s=e.ref([]);e.watch(n.value,p=>{const _=p.map(y=>a.value.findIndex(h=>JSON.stringify(h)===JSON.stringify(y)));s.value=_});const g=e.computed({get:()=>{var p;return(p=n.value)!=null?p:[]},set:p=>{t("update:itemsExpanded",p)}}),o=(p,_,y)=>{y.stopPropagation();const h=s.value.indexOf(p);if(h!==-1)s.value.splice(h,1),g.value.splice(h,1);else{const w=ie(a.value,_,f.value);t("expandRow",l.value+w,_),s.value.push(l.value+w),g.value.push(_)}i()},r=()=>{s.value=[]};e.watchEffect(()=>{const p=n.value.reduce((_,y)=>{const h=ie(a.value,y,f.value);return h!==-1&&_.push(h),_},[]);s.value=p});function i(){t("update:itemsExpanded",s.value.map(p=>a.value[p]))}return{expandingItemIndexList:s,updateExpandingItemIndexList:o,clearExpandingItemIndexList:r}}function mt(a){const l=e.computed(()=>a.value.filter(f=>f.fixed)),t=e.computed(()=>l.value.length?l.value[l.value.length-1].value:""),n=e.computed(()=>{if(!l.value.length)return[];const f=l.value.map(s=>{var g;return(g=s.width)!=null?g:100});return l.value.map((s,g)=>{var o,r;return{value:s.value,fixed:(o=s.fixed)!=null?o:!0,width:(r=s.width)!=null?r:100,distance:g===0?0:f.reduce((i,p,_)=>{let y=i;return _<g&&(y+=p),y})}})});return{fixedHeaders:l,lastFixedColumn:t,fixedColumnsInfos:n}}function gt(a,l,t,n,f,s,g,o,r,i,p,_,y,h,w,N,F,$,O){const z=e.computed(()=>g.value.findIndex(b=>b.fixed)!==-1),u=e.computed(()=>z.value?g.value.filter(b=>b.fixed):[]),P=e.computed(()=>g.value.filter(b=>!b.fixed)),k=(b,R)=>Array.isArray(b)&&Array.isArray(R)?{sortBy:b,sortDesc:R.map(S=>S==="desc")}:b!==""?{sortBy:w.value,sortDesc:N.value==="desc"}:null,m=e.ref(k(w.value,N.value)),A=e.computed(()=>{var ce;const R=[...u.value,...P.value].map(X=>{const L=Object.assign(X);if(L.sortable&&(L.sortType="none"),y.value)if(Array.isArray(y.value.sortBy)&&Array.isArray(y.value.sortType)&&y.value.sortBy.includes(L.value)){const Z=y.value.sortBy.indexOf(L.value);L.sortType=y.value.sortType[Z]}else L.value===y.value.sortBy&&y.value.sortType&&(L.sortType=y.value.sortType);if(m.value&&Array.isArray(m.value.sortBy)&&Array.isArray(m.value.sortDesc)&&m.value.sortBy.includes(L.value)){const Z=m.value.sortBy.indexOf(L.value);L.sortType=m.value.sortDesc[Z]?"desc":"asc"}else m.value&&L.value===m.value.sortBy&&(L.sortType=m.value.sortDesc?"desc":"asc");return L});let S=[];o.value?S=[f.value||z.value?{text:"",value:"expand",fixed:!0,width:t.value}:{text:"",value:"expand"},...R]:S=R;let T=[];h.value?T=[s.value||z.value?{text:a.value,value:"index",fixed:!0,width:r.value}:{text:a.value,value:"index"},...S]:T=S;let Y=[];return i.value?Y=[n.value||z.value?{text:"checkbox",value:"checkbox",fixed:!0,width:(ce=l.value)!=null?ce:36}:{text:"checkbox",value:"checkbox"},...T]:Y=T,Y}),B=e.computed(()=>A.value.map(b=>b.value));return{clientSortOptions:m,headerColumns:B,headersForRender:A,updateSortField:(b,R)=>{let S=null;if(R==="none"?S="asc":R==="asc"?S="desc":S=_.value?"asc":null,p.value&&$(b,S),m.value&&Array.isArray(m.value.sortBy)&&Array.isArray(m.value.sortDesc)){const T=m.value.sortBy.indexOf(b);T===-1?S!==null&&(m.value.sortBy.push(b),m.value.sortDesc.push(S==="desc")):S===null?(m.value.sortDesc.splice(T,1),m.value.sortBy.splice(T,1)):m.value.sortDesc[T]=S==="desc"}else S===null?m.value=null:m.value={sortBy:b,sortDesc:S==="desc"};O("updateSort",{sortType:S,sortBy:b})},isMultiSorting:b=>y.value&&Array.isArray(y.value.sortBy)?y.value.sortBy.includes(b):m.value&&Array.isArray(m.value.sortBy)?m.value.sortBy.includes(b):!1,getMultiSortNumber:b=>y.value&&Array.isArray(y.value.sortBy)?y.value.sortBy.indexOf(b)+1:m.value&&Array.isArray(m.value.sortBy)?m.value.sortBy.indexOf(b)+1:!1}}function yt(a,l,t,n,f,s,g,o,r,i){const p=e.computed(()=>(a.value-1)*f.value+1),_=e.computed(()=>t.value?Math.min(r.value,a.value*f.value):Math.min(o.value.length,a.value*f.value)),y=e.computed(()=>t.value?n.value:o.value.slice(p.value-1,_.value)),h=e.computed(()=>g.value?y.value.map((F,$)=>H({index:p.value+$},F)):y.value),w=e.computed(()=>s.value.length===0||s.value.every($=>ie(o.value,$,i.value)===-1)?"noneSelected":s.value.length===o.value.length&&s.value.every(O=>ie(o.value,O,i.value)!==-1)?"allSelected":"partSelected"),N=e.computed(()=>l.value?w.value==="allSelected"?h.value.map(F=>H({checkbox:!0},F)):w.value==="noneSelected"?h.value.map(F=>H({checkbox:!1},F)):h.value.map(F=>{const $=s.value.findIndex(O=>{const z=H({},F);return delete z.index,_e(O,z,i.value)})!==-1;return H({checkbox:$},F)}):h.value);return{currentPageFirstIndex:p,currentPageLastIndex:_,multipleSelectStatus:w,pageItems:N}}function ht(a,l,t,n,f,s,g){const o=e.ref(s.value?s.value.page:a.value),r=e.computed(()=>Math.ceil(n.value/f.value)),i=e.computed(()=>r.value===0||o.value===r.value),p=e.computed(()=>o.value===1);return{currentPaginationNumber:o,maxPaginationNumber:r,isLastPage:i,isFirstPage:p,nextPage:()=>{if(n.value!==0&&!i.value&&!t.value)if(l.value){const N=o.value+1;g(N)}else o.value+=1},prevPage:()=>{if(n.value!==0&&!p.value&&!t.value)if(l.value){const N=o.value-1;g(N)}else o.value-=1},updatePage:N=>{t.value||(l.value?g(N):o.value=N)},updateCurrentPaginationNumber:N=>{o.value=N}}}function _t(a,l,t,n){const f=e.computed(()=>!a.value&&l.value.findIndex(o=>o===n.value)===-1?[n.value,...l.value]:l.value),s=e.ref(t.value?t.value.rowsPerPage:n.value);return{rowsItemsComputed:f,rowsPerPageRef:s,updateRowsPerPage:o=>{s.value=o}}}function bt(a,l,t){const n=e.computed({get:()=>{if(a.value){const{page:o,rowsPerPage:r,sortBy:i,sortType:p}=a.value;return{page:o,rowsPerPage:r,sortBy:i!=null?i:null,sortType:p!=null?p:null}}return null},set:o=>{t("update:serverOptions",o)}});return{serverOptionsComputed:n,updateServerOptionsPage:o=>{n.value&&(n.value=le(H({},n.value),{page:o}))},updateServerOptionsSort:(o,r)=>{if(n.value)if(l.value&&Array.isArray(n.value.sortBy)&&Array.isArray(n.value.sortType)){const i=n.value.sortBy.findIndex(p=>p===o);i===-1&&r!==null&&(n.value.sortBy.push(o),n.value.sortType.push(r)),r===null?(n.value.sortBy.splice(i,1),n.value.sortType.splice(i,1)):n.value.sortType[i]=r}else n.value=le(H({},n.value),{sortBy:r!==null?o:null,sortType:r})},updateServerOptionsRowsPerPage:o=>{n.value&&(n.value=le(H({},n.value),{page:1,rowsPerPage:o}))}}}function kt(a,l,t,n,f,s,g,o,r,i,p){const _=u=>{if(typeof s.value=="string"&&s.value!=="")return I(s.value,u);if(Array.isArray(s.value)){let P="";return s.value.forEach(k=>{P+=I(k,u)}),P}return Object.values(u).join(" ")},y=e.computed(()=>{if(!t.value&&g.value!==""){const u=new RegExp(g.value,"i");return n.value.filter(P=>u.test(_(P)))}return n.value}),h=e.computed(()=>{let u=[...y.value];return l.value?(l.value.forEach(P=>{u=u.filter(k=>{const{field:m,comparison:A,criteria:B}=P;if(typeof A=="function")return A(I(m,k),B);const V=I(m,k);switch(A){case"=":return V===B;case"!=":return V!==B;case">":return V>B;case"<":return V<B;case"<=":return V<=B;case">=":return V>=B;case"between":return V>=Math.min(...B)&&V<=Math.max(...B);case"in":return B.includes(V);default:return V===B}})}),u):y.value});e.watch(h,u=>{l.value&&i("updateFilter",u)},{immediate:!0,deep:!0});function w(u,P,k,m){const A=u[m],B=P[m];return(m===0?k:w(u,P,k,m-1)).sort((Q,j)=>{let b=!0;for(let R=0;R<m;R+=1)if(I(u[R],Q)!==I(u[R],j)){b=!1;break}return b?I(A,Q)<I(A,j)?B?1:-1:I(A,Q)>I(A,j)?B?-1:1:0:0})}const N=e.computed(()=>{if(t.value)return n.value;if(a.value===null)return h.value;const{sortBy:u,sortDesc:P}=a.value,k=[...h.value];return r&&Array.isArray(u)&&Array.isArray(P)?u.length===0?k:w(u,P,k,u.length-1):k.sort((m,A)=>I(u,m)<I(u,A)?P?1:-1:I(u,m)>I(u,A)?P?-1:1:0)}),F=e.computed(()=>t.value?o.value:N.value.length),$=e.computed({get:()=>{var u;return(u=f.value)!=null?u:[]},set:u=>{i("update:itemsSelected",u)}});return{totalItems:N,selectItemsComputed:$,totalItemsLength:F,toggleSelectAll:u=>{$.value=u?N.value:[],u&&i("selectAll")},toggleSelectItem:u=>{const P=u.checkbox;if(delete u.checkbox,delete u.index,P)$.value=$.value.filter(k=>!_e(k,u,p.value)),i("deselectRow",u);else{const k=$.value;k.unshift(u),$.value=k,i("selectRow",u)}}}}var xt={alternating:{type:Boolean,default:!1},buttonsPagination:{type:Boolean,default:!1},checkboxColumnWidth:{type:Number,default:null},currentPage:{type:Number,default:1},emptyMessage:{type:String,default:"No Available Data"},expandColumnWidth:{type:Number,default:36},filterOptions:{type:Array,default:null},fixedExpand:{type:Boolean,default:!1},fixedHeader:{type:Boolean,default:!0},fixedCheckbox:{type:Boolean,default:!1},fixedIndex:{type:Boolean,default:!1},headerTextDirection:{type:String,default:"left"},bodyTextDirection:{type:String,default:"left"},hideFooter:{type:Boolean,default:!1},hideRowsPerPage:{type:Boolean,default:!1},hideHeader:{type:Boolean,default:!1},indexColumnWidth:{type:Number,default:60},itemsSelected:{type:Array,default:null},loading:{type:Boolean,default:!1},rowsPerPage:{type:Number,default:25},rowsItems:{type:Array,default:()=>[25,50,100]},rowsPerPageMessage:{type:String,default:"rows per page:"},searchField:{type:[String,Array],default:""},searchValue:{type:String,default:""},serverOptions:{type:Object,default:null},serverItemsLength:{type:Number,default:0},showIndex:{type:Boolean,default:!1},sortBy:{type:[String,Array],default:""},sortType:{type:[String,Array],default:"asc"},multiSort:{type:Boolean,default:!1},tableMinHeight:{type:Number,default:180},tableHeight:{type:Number,default:null},themeColor:{type:String,default:"#42b883"},tableClassName:{type:String,default:""},headerClassName:{type:String,default:""},headerItemClassName:{type:[Function,String],default:""},bodyRowClassName:{type:[Function,String],default:""},bodyExpandRowClassName:{type:[Function,String],default:""},bodyItemClassName:{type:[Function,String],default:""},noHover:{type:Boolean,default:!1},borderCell:{type:Boolean,default:!1},mustSort:{type:Boolean,default:!1},rowsOfPageSeparatorMessage:{type:String,default:"of"},clickEventType:{type:String,default:"single"},clickRowToExpand:{type:Boolean,default:!1},tableNodeId:{type:String,default:""},showIndexSymbol:{type:String,default:"#"},itemsExpanded:{type:Array,default:[]},itemsKey:{type:[Function,String],default:void 0},preventContextMenuRow:{type:Boolean,default:!0}},Ia="",$a="";const Pt=a=>(e.pushScopeId("data-v-66dbee49"),a=a(),e.popScopeId(),a),St=["id"],Ct=["onClick"],Nt={key:3,class:"header-text"},Bt={key:5,class:"multi-sort__number"},wt=["onClick","onDblclick","onContextmenu"],Et=["onClick"],It=["colspan"],$t={key:0,class:"vue3-easy-data-table__loading"},vt=Pt(()=>e.createElementVNode("div",{class:"vue3-easy-data-table__loading-mask"},null,-1)),At={class:"loading-entity"},Vt={key:1,class:"vue3-easy-data-table__message"},Rt={key:0,class:"vue3-easy-data-table__footer"},Lt={key:0,class:"pagination__rows-per-page"},Ft={class:"pagination__items-index"},Tt=e.defineComponent({__name:"DataTable",props:le(H({},xt),{items:{type:Array,required:!0},headers:{type:Array,required:!0}}),emits:["clickRow","contextmenuRow","selectRow","deselectRow","expandRow","updateSort","updateFilter","update:itemsSelected","update:serverOptions","updatePageItems","updateTotalItems","selectAll","update:itemsExpanded"],setup(a,{expose:l,emit:t}){const n=a;e.useCssVars(d=>({"62ff88ac":e.unref(Mt),"4aa83a78":e.unref(zt)}));const{tableNodeId:f,clickEventType:s,bodyTextDirection:g,checkboxColumnWidth:o,currentPage:r,expandColumnWidth:i,filterOptions:p,fixedCheckbox:_,fixedExpand:y,fixedHeader:h,fixedIndex:w,headers:N,headerTextDirection:F,indexColumnWidth:$,items:O,itemsSelected:z,loading:u,mustSort:P,multiSort:k,rowsItems:m,rowsPerPage:A,searchField:B,searchValue:V,serverItemsLength:Q,serverOptions:j,showIndex:b,sortBy:R,sortType:S,tableHeight:T,tableMinHeight:Y,themeColor:ce,rowsOfPageSeparatorMessage:X,showIndexSymbol:L,itemsExpanded:Z,itemsKey:ue,preventContextMenuRow:Dt}=e.toRefs(n),zt=e.computed(()=>T.value?`${T.value}px`:null),Mt=e.computed(()=>`${Y.value}px`);e.provide("themeColor",ce.value);const M=e.useSlots(),Ht=e.computed(()=>!!M.pagination),Ot=e.computed(()=>!!M.loading),ke=e.computed(()=>!!M.expand),jt=e.computed(()=>!!M.body),xe=e.ref(),pe=e.ref();e.provide("dataTable",xe);const Pe=e.ref(!1);e.onMounted(()=>{pe.value.addEventListener("scroll",()=>{Pe.value=pe.value.scrollLeft>0})});const fe=e.computed(()=>z.value!==null),U=e.computed(()=>j.value!==null),{serverOptionsComputed:me,updateServerOptionsPage:qt,updateServerOptionsSort:Wt,updateServerOptionsRowsPerPage:Ut}=bt(j,k,t),{clientSortOptions:Se,headerColumns:Ce,headersForRender:J,updateSortField:Jt,isMultiSorting:Gt,getMultiSortNumber:Qt}=gt(L,o,i,_,y,w,N,ke,$,fe,U,P,me,b,R,S,k,Wt,t),{rowsItemsComputed:Ne,rowsPerPageRef:W,updateRowsPerPage:Xt}=_t(U,m,j,A),{totalItems:Be,selectItemsComputed:Yt,totalItemsLength:de,toggleSelectAll:Zt,toggleSelectItem:Kt}=kt(Se,p,U,O,z,B,V,Q,k,t,ue),{currentPaginationNumber:q,maxPaginationNumber:K,isLastPage:ee,isFirstPage:te,nextPage:ae,prevPage:ne,updatePage:re,updateCurrentPaginationNumber:ea}=ht(r,U,u,de,W,j,qt),{currentPageFirstIndex:we,currentPageLastIndex:Ee,multipleSelectStatus:Ie,pageItems:G}=yt(q,fe,U,O,W,Yt,b,Be,de,ue),oe=e.computed(()=>q.value===0?0:(q.value-1)*W.value),{expandingItemIndexList:$e,updateExpandingItemIndexList:ve,clearExpandingItemIndexList:Ae}=ft(G,oe,t,Z,ue),{fixedHeaders:ge,lastFixedColumn:Ve,fixedColumnsInfos:ta}=mt(J),{clickRow:Re}=ut(s,fe,b,t),aa=(d,D)=>{Dt.value&&D.preventDefault(),t("contextmenuRow",d,D)},na=d=>{var c;const D=(c=d.width)!=null?c:ge.value.length?100:null;if(D)return`width: ${D}px; min-width: ${D}px;`},Le=(d,D="th")=>{if(!ge.value.length)return;const c=ta.value.find(v=>v.value===d);if(c)return`left: ${c.distance}px;z-index: ${D==="th"?3:1};position: sticky;`};return e.watch(u,(d,D)=>{me.value&&d===!1&&D===!0&&(ea(me.value.page),Ae())}),e.watch(W,d=>{U.value?Ut(d):re(1)}),e.watch([V,p],()=>{U.value||re(1)}),e.watch([q,Se,B,V,p],()=>{Ae()},{deep:!0}),e.watch(G,d=>{t("updatePageItems",d)},{deep:!0}),e.watch(Be,d=>{t("updateTotalItems",d)},{deep:!0}),l({currentPageFirstIndex:we,currentPageLastIndex:Ee,clientItemsLength:de,maxPaginationNumber:K,currentPaginationNumber:q,isLastPage:ee,isFirstPage:te,nextPage:ae,prevPage:ne,updatePage:re,rowsPerPageOptions:Ne,rowsPerPageActiveOption:W,updateRowsPerPageActiveOption:Xt}),(d,D)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dataTable",ref:xe,class:e.normalizeClass(["vue3-easy-data-table",[d.tableClassName]])},[e.createElementVNode("div",{ref_key:"tableBody",ref:pe,class:e.normalizeClass(["vue3-easy-data-table__main",{"fixed-header":e.unref(h),"fixed-height":e.unref(T),"show-shadow":Pe.value,"table-fixed":e.unref(ge).length,hoverable:!d.noHover,"border-cell":d.borderCell}])},[e.createElementVNode("table",{id:e.unref(f)},[e.createElementVNode("colgroup",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(J),(c,v)=>(e.openBlock(),e.createElementBlock("col",{key:v,style:e.normalizeStyle(na(c))},null,4))),128))]),e.unref(M)["customize-headers"]?e.renderSlot(d.$slots,"customize-headers",{key:0},void 0,!0):e.unref(J).length&&!d.hideHeader?(e.openBlock(),e.createElementBlock("thead",{key:1,class:e.normalizeClass(["vue3-easy-data-table__header",[d.headerClassName]])},[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(J),(c,v)=>(e.openBlock(),e.createElementBlock("th",{key:v,class:e.normalizeClass([{sortable:c.sortable,none:c.sortable&&c.sortType==="none",desc:c.sortable&&c.sortType==="desc",asc:c.sortable&&c.sortType==="asc",shadow:c.value===e.unref(Ve)},typeof d.headerItemClassName=="string"?d.headerItemClassName:d.headerItemClassName(c,v+1)]),style:e.normalizeStyle(Le(c.value)),onClick:e.withModifiers(x=>c.sortable&&c.sortType?e.unref(Jt)(c.value,c.sortType):null,["stop"])},[c.text==="checkbox"?(e.openBlock(),e.createBlock(je,{key:e.unref(Ie),status:e.unref(Ie),onChange:e.unref(Zt)},null,8,["status","onChange"])):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["header",`direction-${e.unref(F)}`])},[e.unref(M)[`header-${c.value}`]?e.renderSlot(d.$slots,`header-${c.value}`,e.normalizeProps(e.mergeProps({key:0},c)),void 0,!0):e.unref(M)[`header-${c.value.toLowerCase()}`]?e.renderSlot(d.$slots,`header-${c.value.toLowerCase()}`,e.normalizeProps(e.mergeProps({key:1},c)),void 0,!0):e.unref(M).header?e.renderSlot(d.$slots,"header",e.normalizeProps(e.mergeProps({key:2},c)),void 0,!0):(e.openBlock(),e.createElementBlock("span",Nt,e.toDisplayString(c.text),1)),c.sortable?(e.openBlock(),e.createElementBlock("i",{key:c.sortType?c.sortType:"none",class:e.normalizeClass(["sortType-icon",{desc:c.sortType==="desc"}])},null,2)):e.createCommentVNode("",!0),e.unref(k)&&e.unref(Gt)(c.value)?(e.openBlock(),e.createElementBlock("span",Bt,e.toDisplayString(e.unref(Qt)(c.value)),1)):e.createCommentVNode("",!0)],2))],14,Ct))),128))])],2)):e.createCommentVNode("",!0),e.unref(jt)?e.renderSlot(d.$slots,"body",e.normalizeProps(e.mergeProps({key:2},e.unref(G))),void 0,!0):e.unref(Ce).length?(e.openBlock(),e.createElementBlock("tbody",{key:3,class:e.normalizeClass(["vue3-easy-data-table__body",{"row-alternation":d.alternating}])},[e.renderSlot(d.$slots,"body-prepend",e.normalizeProps(e.guardReactiveProps({items:e.unref(G),pagination:{isFirstPage:e.unref(te),isLastPage:e.unref(ee),currentPaginationNumber:e.unref(q),maxPaginationNumber:e.unref(K),nextPage:e.unref(ae),prevPage:e.unref(ne)},headers:e.unref(J)})),void 0,!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(G),(c,v)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:v},[e.createElementVNode("tr",{class:e.normalizeClass([{"even-row":(v+1)%2===0},typeof d.bodyRowClassName=="string"?d.bodyRowClassName:d.bodyRowClassName(c,v+1)]),onClick:x=>{e.unref(Re)(c,"single",x),d.clickRowToExpand&&e.unref(ve)(v+e.unref(oe),c,x)},onDblclick:x=>{e.unref(Re)(c,"double",x)},onContextmenu:x=>{aa(c,x)}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Ce),(x,ra)=>(e.openBlock(),e.createElementBlock("td",{key:ra,style:e.normalizeStyle(Le(x,"td")),class:e.normalizeClass([{shadow:x===e.unref(Ve),"can-expand":x==="expand"},typeof d.bodyItemClassName=="string"?d.bodyItemClassName:d.bodyItemClassName(x,v+1),`direction-${e.unref(g)}`]),onClick:Fe=>x==="expand"?e.unref(ve)(v+e.unref(oe),c,Fe):null},[e.unref(M)[`item-${x}`]?e.renderSlot(d.$slots,`item-${x}`,e.normalizeProps(e.mergeProps({key:0},c)),void 0,!0):e.unref(M)[`item-${x.toLowerCase()}`]?e.renderSlot(d.$slots,`item-${x.toLowerCase()}`,e.normalizeProps(e.mergeProps({key:1},c)),void 0,!0):x==="expand"?(e.openBlock(),e.createElementBlock("i",{key:2,class:e.normalizeClass(["expand-icon",{expanding:e.unref($e).includes(e.unref(oe)+v)}])},null,2)):x==="checkbox"?(e.openBlock(),e.createBlock(Je,{key:3,checked:c[x],onChange:Fe=>e.unref(Kt)(c)},null,8,["checked","onChange"])):e.unref(M).item?e.renderSlot(d.$slots,"item",e.normalizeProps(e.mergeProps({key:4},{column:x,item:c})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createTextVNode(e.toDisplayString(e.unref(pt)(x,c)),1)],64))],14,Et))),128))],42,wt),e.unref(ke)&&e.unref($e).includes(v+e.unref(oe))?(e.openBlock(),e.createElementBlock("tr",{key:0,class:e.normalizeClass([{"even-row":(v+1)%2===0},typeof d.bodyExpandRowClassName=="string"?d.bodyExpandRowClassName:d.bodyExpandRowClassName(c,v+1)])},[e.createElementVNode("td",{colspan:e.unref(J).length,class:"expand"},[c.expandLoading?(e.openBlock(),e.createBlock(rt,{key:0,class:"expand-loading"})):e.createCommentVNode("",!0),e.renderSlot(d.$slots,"expand",e.normalizeProps(e.guardReactiveProps(c)),void 0,!0)],8,It)],2)):e.createCommentVNode("",!0)],64))),128)),e.renderSlot(d.$slots,"body-append",e.normalizeProps(e.guardReactiveProps({items:e.unref(G),pagination:{isFirstPage:e.unref(te),isLastPage:e.unref(ee),currentPaginationNumber:e.unref(q),maxPaginationNumber:e.unref(K),nextPage:e.unref(ae),prevPage:e.unref(ne),updatePage:e.unref(re)},headers:e.unref(J)})),void 0,!0)],2)):e.createCommentVNode("",!0)],8,St),e.unref(u)?(e.openBlock(),e.createElementBlock("div",$t,[vt,e.createElementVNode("div",At,[e.unref(Ot)?e.renderSlot(d.$slots,"loading",{key:0},void 0,!0):(e.openBlock(),e.createBlock(at,{key:1}))])])):e.createCommentVNode("",!0),!e.unref(G).length&&!e.unref(u)?(e.openBlock(),e.createElementBlock("div",Vt,[e.renderSlot(d.$slots,"empty-message",{},()=>[e.createTextVNode(e.toDisplayString(d.emptyMessage),1)],!0)])):e.createCommentVNode("",!0)],2),d.hideFooter?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Rt,[d.hideRowsPerPage?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Lt,[e.createTextVNode(e.toDisplayString(d.rowsPerPageMessage)+" ",1),e.createVNode(Ke,{modelValue:e.unref(W),"onUpdate:modelValue":D[0]||(D[0]=c=>e.isRef(W)?W.value=c:null),"rows-items":e.unref(Ne)},null,8,["modelValue","rows-items"])])),e.createElementVNode("div",Ft,e.toDisplayString(`${e.unref(we)}\u2013${e.unref(Ee)}`)+" "+e.toDisplayString(e.unref(X))+" "+e.toDisplayString(e.unref(de)),1),e.unref(Ht)?e.renderSlot(d.$slots,"pagination",e.normalizeProps(e.mergeProps({key:1},{isFirstPage:e.unref(te),isLastPage:e.unref(ee),currentPaginationNumber:e.unref(q),maxPaginationNumber:e.unref(K),nextPage:e.unref(ae),prevPage:e.unref(ne)})),void 0,!0):(e.openBlock(),e.createBlock(dt,{key:2,"is-first-page":e.unref(te),"is-last-page":e.unref(ee),onClickNextPage:e.unref(ae),onClickPrevPage:e.unref(ne)},e.createSlots({_:2},[d.buttonsPagination?{name:"buttonsPagination",fn:e.withCtx(()=>[e.createVNode(st,{"current-pagination-number":e.unref(q),"max-pagination-number":e.unref(K),onUpdatePage:e.unref(re)},null,8,["current-pagination-number","max-pagination-number","onUpdatePage"])]),key:"0"}:void 0]),1032,["is-first-page","is-last-page","onClickNextPage","onClickPrevPage"]))]))],2))}});var be=C(Tt,[["__scopeId","data-v-66dbee49"]]);return typeof window!="undefined"&&window.Vue&&window.Vue.createApp({}).component("Vue3EasyDataTable",be),be}); | ||
(function(e,I){typeof exports=="object"&&typeof module!="undefined"?module.exports=I(require("vue")):typeof define=="function"&&define.amd?define(["vue"],I):(e=typeof globalThis!="undefined"?globalThis:e||self,e["vue3-easy-data-table"]=I(e.Vue))})(this,function(e){"use strict";var ea=Object.defineProperty,ta=Object.defineProperties;var aa=Object.getOwnPropertyDescriptors;var Re=Object.getOwnPropertySymbols;var na=Object.prototype.hasOwnProperty,ra=Object.prototype.propertyIsEnumerable;var ve=(e,I,C)=>I in e?ea(e,I,{enumerable:!0,configurable:!0,writable:!0,value:C}):e[I]=C,D=(e,I)=>{for(var C in I||(I={}))na.call(I,C)&&ve(e,C,I[C]);if(Re)for(var C of Re(I))ra.call(I,C)&&ve(e,C,I[C]);return e},le=(e,I)=>ta(e,aa(I));var I="",C=(r,i)=>{const t=r.__vccOpts||r;for(const[a,f]of i)t[a]=f;return t};const Le=r=>(e.pushScopeId("data-v-e0a0b7f0"),r=r(),e.popScopeId(),r),Te=["onClick"],Fe=["checked"],De=Le(()=>e.createElementVNode("label",{for:"checbox"},null,-1));var ze=C(e.defineComponent({__name:"MultipleSelectCheckBox",props:{status:{type:String,required:!0}},emits:["change"],setup(r,{emit:i}){const t=r;e.useCssVars(m=>({"51ab8a49":e.unref(c)}));const a=e.computed(()=>t.status==="allSelected"),f=()=>{i("change",!a.value)},c=e.inject("themeColor");return(m,o)=>(e.openBlock(),e.createElementBlock("div",{class:"easy-checkbox",onClick:e.withModifiers(f,["stop","prevent"])},[e.createElementVNode("input",{type:"checkbox",checked:e.unref(a),class:e.normalizeClass(r.status)},null,10,Fe),De],8,Te))}}),[["__scopeId","data-v-e0a0b7f0"]]),la="";const Me=r=>(e.pushScopeId("data-v-7e69a276"),r=r(),e.popScopeId(),r),He=["checked"],Oe=Me(()=>e.createElementVNode("label",{for:"checbox"},null,-1));var je=C(e.defineComponent({__name:"SingleSelectCheckBox",props:{checked:{type:Boolean,required:!0}},emits:["change"],setup(r,{emit:i}){e.useCssVars(a=>({fdaf7e9e:e.unref(t)}));const t=e.inject("themeColor");return(a,f)=>(e.openBlock(),e.createElementBlock("div",{class:"easy-checkbox",onClick:f[0]||(f[0]=e.withModifiers(c=>i("change"),["stop","prevent"]))},[e.createElementVNode("input",{type:"checkbox",checked:r.checked},null,8,He),Oe]))}}),[["__scopeId","data-v-7e69a276"]]),ia="";const We=r=>(e.pushScopeId("data-v-4ca5de3a"),r=r(),e.popScopeId(),r),qe={class:"easy-data-table__rows-selector"},Je={class:"rows-input"},Ue=We(()=>e.createElementVNode("div",{class:"triangle"},null,-1)),Ge=["onClick"];var Ke=C(e.defineComponent({__name:"RowsSelector",props:{modelValue:{type:Number,required:!0},rowsItems:{type:Array,required:!0}},emits:["update:modelValue"],setup(r,{emit:i}){const t=r;e.useCssVars(_=>({"1b889342":e.unref(h)}));const a=e.ref(!1),f=e.ref(!1),c=e.inject("dataTable");e.watch(a,_=>{if(_&&c){const g=window.innerHeight,b=c.value.getBoundingClientRect().height,v=c.value.getBoundingClientRect().top;g-(b+v)<=100?f.value=!0:f.value=!1}});const m=e.computed({get:()=>t.modelValue,set:_=>{i("update:modelValue",_)}}),o=_=>{m.value=_,a.value=!1},n=(_,g)=>{let b=_.parentNode;for(;b!=null;){if(b.classList&&b.classList.contains(g))return!0;b=b.parentNode}return!1},l=_=>{n(_.target,"easy-data-table__rows-selector")||(a.value=!1)};e.onMounted(()=>{document.addEventListener("click",l)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",l)});const h=e.inject("themeColor");return(_,g)=>(e.openBlock(),e.createElementBlock("div",qe,[e.createElementVNode("div",{class:"rows-input__wrapper",onClick:g[0]||(g[0]=b=>a.value=!a.value)},[e.createElementVNode("div",Je,e.toDisplayString(e.unref(m)),1),Ue]),e.createElementVNode("ul",{class:e.normalizeClass(["select-items",{show:a.value,inside:f.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.rowsItems,b=>(e.openBlock(),e.createElementBlock("li",{key:b,class:e.normalizeClass({selected:b===e.unref(m)}),onClick:v=>o(b)},e.toDisplayString(b),11,Ge))),128))],2)]))}}),[["__scopeId","data-v-4ca5de3a"]]),da="";const se=r=>(e.pushScopeId("data-v-1fa3a520"),r=r(),e.popScopeId(),r),Qe={class:"lds-ring"},Xe=[se(()=>e.createElementVNode("div",null,null,-1)),se(()=>e.createElementVNode("div",null,null,-1)),se(()=>e.createElementVNode("div",null,null,-1)),se(()=>e.createElementVNode("div",null,null,-1))];var Ye=C(e.defineComponent({__name:"Loading",setup(r){e.useCssVars(t=>({"26774109":e.unref(i)}));const i=e.inject("themeColor");return(t,a)=>(e.openBlock(),e.createElementBlock("div",Qe,Xe))}}),[["__scopeId","data-v-1fa3a520"]]),ya="";const Ze={class:"loader-line"};var et=C(e.defineComponent({__name:"LoadingLine",setup(r){e.useCssVars(t=>({"0d327f57":e.unref(i)}));const i=e.inject("themeColor");return(t,a)=>(e.openBlock(),e.createElementBlock("div",Ze))}}),[["__scopeId","data-v-7d281cac"]]),_a="";const tt={class:"buttons-pagination"},at=["onClick"];var nt=C(e.defineComponent({__name:"ButtonsPagination",props:{maxPaginationNumber:{type:Number,required:!0},currentPaginationNumber:{type:Number,required:!0}},emits:["updatePage"],setup(r,{emit:i}){const t=r;e.useCssVars(o=>({"40dd4f07":e.unref(m)}));const a=7,f=o=>{o.type==="button"&&!o.active&&i("updatePage",o.page)},c=e.computed(()=>{const o=[];if(t.maxPaginationNumber<=a)for(let n=1;n<=t.maxPaginationNumber;n+=1)o.push({type:"button",page:n,active:n===t.currentPaginationNumber,activePrev:n+1===t.currentPaginationNumber});else if([1,2,t.maxPaginationNumber,t.maxPaginationNumber-1].includes(t.currentPaginationNumber))for(let n=1;n<=a;n+=1)if(n<=3)o.push({type:"button",page:n,active:n===t.currentPaginationNumber,activePrev:n+1===t.currentPaginationNumber});else if(n===4)o.push({type:"omission"});else{const l=t.maxPaginationNumber-(a-n);o.push({type:"button",page:l,active:l===t.currentPaginationNumber,activePrev:l+1===t.currentPaginationNumber})}else if([3,4].includes(t.currentPaginationNumber))for(let n=1;n<=a;n+=1)n<=5?o.push({type:"button",page:n,active:n===t.currentPaginationNumber,activePrev:n+1===t.currentPaginationNumber}):n===6?o.push({type:"omission"}):o.push({type:"button",page:t.maxPaginationNumber,active:t.maxPaginationNumber===t.currentPaginationNumber,activePrev:n+1===t.currentPaginationNumber});else if([t.maxPaginationNumber-2,t.maxPaginationNumber-3].includes(t.currentPaginationNumber))for(let n=1;n<=a;n+=1)if(n===1)o.push({type:"button",page:1,active:t.currentPaginationNumber===1,activePrev:n+1===t.currentPaginationNumber});else if(n===2)o.push({type:"omission"});else{const l=t.maxPaginationNumber-(a-n);o.push({type:"button",page:l,active:l===t.currentPaginationNumber,activePrev:l+1===t.currentPaginationNumber})}else for(let n=1;n<=a;n+=1)if(n===1)o.push({type:"button",page:1,active:t.currentPaginationNumber===1,activePrev:n+1===t.currentPaginationNumber});else if(n===2||n===6)o.push({type:"omission"});else if(n===7)o.push({type:"button",page:t.maxPaginationNumber,active:t.maxPaginationNumber===t.currentPaginationNumber,activePrev:n+1===t.currentPaginationNumber});else{const l=4-n,h=t.currentPaginationNumber-l;o.push({type:"button",page:h,active:h===t.currentPaginationNumber,activePrev:h+1===t.currentPaginationNumber})}return o}),m=e.inject("themeColor");return(o,n)=>(e.openBlock(),e.createElementBlock("div",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),(l,h)=>(e.openBlock(),e.createElementBlock("div",{key:h,class:e.normalizeClass(["item",{button:l.type==="button",active:l.type==="button"&&l.active,"active-prev":l.type==="button"&&l.activePrev,omission:l.type==="omission"}]),onClick:_=>f(l)},e.toDisplayString(l.type==="button"?l.page:"..."),11,at))),128))]))}}),[["__scopeId","data-v-4c681fa2"]]),ka="";const me=r=>(e.pushScopeId("data-v-c9da5286"),r=r(),e.popScopeId(),r),rt=[me(()=>e.createElementVNode("span",{class:"arrow arrow-right"},null,-1))],ot=[me(()=>e.createElementVNode("span",{class:"arrow arrow-left"},null,-1))];var lt=C(e.defineComponent({__name:"PaginationArrows",props:{isFirstPage:{type:Boolean,required:!1},isLastPage:{type:Boolean,required:!1}},emits:["clickPrevPage","clickNextPage"],setup(r,{emit:i}){const t=e.useSlots();return(a,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["previous-page__click-button",{"first-page":r.isFirstPage}]),onClick:f[0]||(f[0]=c=>i("clickPrevPage"))},rt,2),e.unref(t).buttonsPagination?e.renderSlot(a.$slots,"buttonsPagination",{key:0},void 0,!0):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["next-page__click-button",{"last-page":r.isLastPage}]),onClick:f[1]||(f[1]=c=>i("clickNextPage"))},ot,2)],64))}}),[["__scopeId","data-v-c9da5286"]]);function st(r,i,t,a){return{clickRow:(c,m,o)=>{if(r.value!==m)return;const n=D({},c);if(i.value){const{checkbox:l}=c;delete n.checkbox,n.isSelected=l}if(t.value){const{index:l}=c;delete n.index,n.indexInCurrentPage=l}a("clickRow",n,o)}}}function it(r,i,t){const a=e.ref([]);return{expandingItemIndexList:a,updateExpandingItemIndexList:(m,o,n)=>{n.stopPropagation();const l=a.value.indexOf(m);if(l!==-1)a.value.splice(l,1);else{const h=r.value.findIndex(_=>JSON.stringify(_)===JSON.stringify(o));t("expandRow",i.value+h,o),a.value.push(i.value+h)}},clearExpandingItemIndexList:()=>{a.value=[]}}}function ct(r){const i=e.computed(()=>r.value.filter(f=>f.fixed)),t=e.computed(()=>i.value.length?i.value[i.value.length-1].value:""),a=e.computed(()=>{if(!i.value.length)return[];const f=i.value.map(c=>{var m;return(m=c.width)!=null?m:100});return i.value.map((c,m)=>{var o,n;return{value:c.value,fixed:(o=c.fixed)!=null?o:!0,width:(n=c.width)!=null?n:100,distance:m===0?0:f.reduce((l,h,_)=>{let g=l;return _<m&&(g+=h),g})}})});return{fixedHeaders:i,lastFixedColumn:t,fixedColumnsInfos:a}}function dt(r,i,t,a,f,c,m,o,n,l,h,_,g,b,v,k,$,z,M){const u=e.computed(()=>m.value.findIndex(y=>y.fixed)!==-1),x=e.computed(()=>u.value?m.value.filter(y=>y.fixed):[]),S=e.computed(()=>m.value.filter(y=>!y.fixed)),w=(y,H)=>Array.isArray(y)&&Array.isArray(H)?{sortBy:y,sortDesc:H.map(N=>N==="desc")}:y!==""?{sortBy:v.value,sortDesc:k.value==="desc"}:null,p=e.ref(w(v.value,k.value)),B=e.computed(()=>{var ie;const H=[...x.value,...S.value].map(Q=>{const R=Object.assign(Q);if(R.sortable&&(R.sortType="none"),g.value)if(Array.isArray(g.value.sortBy)&&Array.isArray(g.value.sortType)&&g.value.sortBy.includes(R.value)){const Y=g.value.sortBy.indexOf(R.value);R.sortType=g.value.sortType[Y]}else R.value===g.value.sortBy&&g.value.sortType&&(R.sortType=g.value.sortType);if(p.value&&Array.isArray(p.value.sortBy)&&Array.isArray(p.value.sortDesc)&&p.value.sortBy.includes(R.value)){const Y=p.value.sortBy.indexOf(R.value);R.sortType=p.value.sortDesc[Y]?"desc":"asc"}else p.value&&R.value===p.value.sortBy&&(R.sortType=p.value.sortDesc?"desc":"asc");return R});let N=[];o.value?N=[f.value||u.value?{text:"",value:"expand",fixed:!0,width:t.value}:{text:"",value:"expand"},...H]:N=H;let L=[];b.value?L=[c.value||u.value?{text:r.value,value:"index",fixed:!0,width:n.value}:{text:r.value,value:"index"},...N]:L=N;let X=[];return l.value?X=[a.value||u.value?{text:"checkbox",value:"checkbox",fixed:!0,width:(ie=i.value)!=null?ie:36}:{text:"checkbox",value:"checkbox"},...L]:X=L,X}),A=e.computed(()=>B.value.map(y=>y.value));return{clientSortOptions:p,headerColumns:A,headersForRender:B,updateSortField:(y,H)=>{let N=null;if(H==="none"?N="asc":H==="asc"?N="desc":N=_.value?"asc":null,h.value&&z(y,N),p.value&&Array.isArray(p.value.sortBy)&&Array.isArray(p.value.sortDesc)){const L=p.value.sortBy.indexOf(y);L===-1?N!==null&&(p.value.sortBy.push(y),p.value.sortDesc.push(N==="desc")):N===null?(p.value.sortDesc.splice(L,1),p.value.sortBy.splice(L,1)):p.value.sortDesc[L]=N==="desc"}else N===null?p.value=null:p.value={sortBy:y,sortDesc:N==="desc"};M("updateSort",{sortType:N,sortBy:y})},isMultiSorting:y=>g.value&&Array.isArray(g.value.sortBy)?g.value.sortBy.includes(y):p.value&&Array.isArray(p.value.sortBy)?p.value.sortBy.includes(y):!1,getMultiSortNumber:y=>g.value&&Array.isArray(g.value.sortBy)?g.value.sortBy.indexOf(y)+1:p.value&&Array.isArray(p.value.sortBy)?p.value.sortBy.indexOf(y)+1:!1}}function ut(r,i,t,a,f,c,m,o,n){const l=e.computed(()=>(r.value-1)*f.value+1),h=e.computed(()=>t.value?Math.min(n.value,r.value*f.value):Math.min(o.value.length,r.value*f.value)),_=e.computed(()=>t.value?a.value:o.value.slice(l.value-1,h.value)),g=e.computed(()=>m.value?_.value.map((k,$)=>D({index:l.value+$},k)):_.value),b=e.computed(()=>c.value.length===0||c.value.every($=>o.value.findIndex(z=>JSON.stringify($)===JSON.stringify(z))===-1)?"noneSelected":c.value.length===o.value.length&&c.value.every(z=>o.value.findIndex(M=>JSON.stringify(z)===JSON.stringify(M))!==-1)?"allSelected":"partSelected"),v=e.computed(()=>i.value?b.value==="allSelected"?g.value.map(k=>D({checkbox:!0},k)):b.value==="noneSelected"?g.value.map(k=>D({checkbox:!1},k)):g.value.map(k=>{const $=c.value.findIndex(z=>{const M=D({},k);return delete M.index,JSON.stringify(z)===JSON.stringify(M)})!==-1;return D({checkbox:$},k)}):g.value);return{currentPageFirstIndex:l,currentPageLastIndex:h,multipleSelectStatus:b,pageItems:v}}function pt(r,i,t,a,f,c,m){const o=e.ref(c.value?c.value.page:r.value),n=e.computed(()=>Math.ceil(a.value/f.value)),l=e.computed(()=>n.value===0||o.value===n.value),h=e.computed(()=>o.value===1);return{currentPaginationNumber:o,maxPaginationNumber:n,isLastPage:l,isFirstPage:h,nextPage:()=>{if(a.value!==0&&!l.value&&!t.value)if(i.value){const k=o.value+1;m(k)}else o.value+=1},prevPage:()=>{if(a.value!==0&&!h.value&&!t.value)if(i.value){const k=o.value-1;m(k)}else o.value-=1},updatePage:k=>{t.value||(i.value?m(k):o.value=k)},updateCurrentPaginationNumber:k=>{o.value=k}}}function ft(r,i,t,a){const f=e.computed(()=>!r.value&&i.value.findIndex(o=>o===a.value)===-1?[a.value,...i.value]:i.value),c=e.ref(t.value?t.value.rowsPerPage:a.value);return{rowsItemsComputed:f,rowsPerPageRef:c,updateRowsPerPage:o=>{c.value=o}}}function mt(r,i,t){const a=e.computed({get:()=>{if(r.value){const{page:o,rowsPerPage:n,sortBy:l,sortType:h}=r.value;return{page:o,rowsPerPage:n,sortBy:l!=null?l:null,sortType:h!=null?h:null}}return null},set:o=>{t("update:serverOptions",o)}});return{serverOptionsComputed:a,updateServerOptionsPage:o=>{a.value&&(a.value=le(D({},a.value),{page:o}))},updateServerOptionsSort:(o,n)=>{if(a.value)if(i.value&&Array.isArray(a.value.sortBy)&&Array.isArray(a.value.sortType)){const l=a.value.sortBy.findIndex(h=>h===o);l===-1&&n!==null&&(a.value.sortBy.push(o),a.value.sortType.push(n)),n===null?(a.value.sortBy.splice(l,1),a.value.sortType.splice(l,1)):a.value.sortType[l]=n}else a.value=le(D({},a.value),{sortBy:n!==null?o:null,sortType:n})},updateServerOptionsRowsPerPage:o=>{a.value&&(a.value=le(D({},a.value),{page:1,rowsPerPage:o}))}}}function V(r,i){var t;if(r.includes(".")){const a=r.split("."),{length:f}=a;let c,m=0;for(;m<f;){if(m===0)c=i[a[0]];else if(c&&typeof c=="object")c=c[a[m]];else{c="";break}m+=1}return c!=null?c:""}return(t=i[r])!=null?t:""}function gt(r,i){const t=V(r,i);return Array.isArray(t)?t.join(","):t}function yt(r,i,t,a,f,c,m,o,n,l){const h=u=>{if(typeof c.value=="string"&&c.value!=="")return V(c.value,u);if(Array.isArray(c.value)){let x="";return c.value.forEach(S=>{x+=V(S,u)}),x}return Object.values(u).join(" ")},_=e.computed(()=>{if(!t.value&&m.value!==""){const u=new RegExp(m.value,"i");return a.value.filter(x=>u.test(h(x)))}return a.value}),g=e.computed(()=>{let u=[..._.value];return i.value?(i.value.forEach(x=>{u=u.filter(S=>{const{field:w,comparison:p,criteria:B}=x;if(typeof p=="function")return p(V(w,S),B);const A=V(w,S);switch(p){case"=":return A===B;case"!=":return A!==B;case">":return A>B;case"<":return A<B;case"<=":return A<=B;case">=":return A>=B;case"between":return A>=Math.min(...B)&&A<=Math.max(...B);case"in":return B.includes(A);default:return A===B}})}),u):_.value});e.watch(g,u=>{i.value&&l("updateFilter",u)},{immediate:!0,deep:!0});function b(u,x,S,w){const p=u[w],B=x[w];return(w===0?S:b(u,x,S,w-1)).sort((j,K)=>{let W=!0;for(let y=0;y<w;y+=1)if(V(u[y],j)!==V(u[y],K)){W=!1;break}return W?V(p,j)<V(p,K)?B?1:-1:V(p,j)>V(p,K)?B?-1:1:0:0})}const v=e.computed(()=>{if(t.value)return a.value;if(r.value===null)return g.value;const{sortBy:u,sortDesc:x}=r.value,S=[...g.value];return n&&Array.isArray(u)&&Array.isArray(x)?u.length===0?S:b(u,x,S,u.length-1):S.sort((w,p)=>V(u,w)<V(u,p)?x?1:-1:V(u,w)>V(u,p)?x?-1:1:0)}),k=e.computed(()=>t.value?o.value:v.value.length),$=e.computed({get:()=>{var u;return(u=f.value)!=null?u:[]},set:u=>{l("update:itemsSelected",u)}});return{totalItems:v,selectItemsComputed:$,totalItemsLength:k,toggleSelectAll:u=>{$.value=u?v.value:[],u&&l("selectAll")},toggleSelectItem:u=>{const x=u.checkbox;if(delete u.checkbox,delete u.index,x)$.value=$.value.filter(S=>JSON.stringify(S)!==JSON.stringify(u)),l("deselectRow",u);else{const S=$.value;S.unshift(u),$.value=S,l("selectRow",u)}}}}var ht={alternating:{type:Boolean,default:!1},buttonsPagination:{type:Boolean,default:!1},checkboxColumnWidth:{type:Number,default:null},currentPage:{type:Number,default:1},emptyMessage:{type:String,default:"No Available Data"},expandColumnWidth:{type:Number,default:36},filterOptions:{type:Array,default:null},fixedExpand:{type:Boolean,default:!1},fixedHeader:{type:Boolean,default:!0},fixedCheckbox:{type:Boolean,default:!1},fixedIndex:{type:Boolean,default:!1},headerTextDirection:{type:String,default:"left"},bodyTextDirection:{type:String,default:"left"},hideFooter:{type:Boolean,default:!1},hideRowsPerPage:{type:Boolean,default:!1},hideHeader:{type:Boolean,default:!1},indexColumnWidth:{type:Number,default:60},itemsSelected:{type:Array,default:null},loading:{type:Boolean,default:!1},rowsPerPage:{type:Number,default:25},rowsItems:{type:Array,default:()=>[25,50,100]},rowsPerPageMessage:{type:String,default:"rows per page:"},searchField:{type:[String,Array],default:""},searchValue:{type:String,default:""},serverOptions:{type:Object,default:null},serverItemsLength:{type:Number,default:0},showIndex:{type:Boolean,default:!1},sortBy:{type:[String,Array],default:""},sortType:{type:[String,Array],default:"asc"},multiSort:{type:Boolean,default:!1},tableMinHeight:{type:Number,default:180},tableHeight:{type:Number,default:null},themeColor:{type:String,default:"#42b883"},tableClassName:{type:String,default:""},headerClassName:{type:String,default:""},headerItemClassName:{type:[Function,String],default:""},bodyRowClassName:{type:[Function,String],default:""},bodyExpandRowClassName:{type:[Function,String],default:""},bodyItemClassName:{type:[Function,String],default:""},noHover:{type:Boolean,default:!1},borderCell:{type:Boolean,default:!1},mustSort:{type:Boolean,default:!1},rowsOfPageSeparatorMessage:{type:String,default:"of"},clickEventType:{type:String,default:"single"},clickRowToExpand:{type:Boolean,default:!1},tableNodeId:{type:String,default:""},showIndexSymbol:{type:String,default:"#"},preventContextMenuRow:{type:Boolean,default:!0}},Na="",Ca="";const _t=r=>(e.pushScopeId("data-v-32683533"),r=r(),e.popScopeId(),r),bt=["id"],kt=["onClick"],xt={key:3,class:"header-text"},Pt={key:5,class:"multi-sort__number"},St=["onClick","onDblclick","onContextmenu"],Nt=["onClick"],Ct=["colspan"],Bt={key:0,class:"vue3-easy-data-table__loading"},wt=_t(()=>e.createElementVNode("div",{class:"vue3-easy-data-table__loading-mask"},null,-1)),It={class:"loading-entity"},Et={key:1,class:"vue3-easy-data-table__message"},$t={key:0,class:"vue3-easy-data-table__footer"},At={key:0,class:"pagination__rows-per-page"},Vt={class:"pagination__items-index"},Rt=e.defineComponent({__name:"DataTable",props:le(D({},ht),{items:{type:Array,required:!0},headers:{type:Array,required:!0}}),emits:["clickRow","contextmenuRow","selectRow","deselectRow","expandRow","updateSort","updateFilter","update:itemsSelected","update:serverOptions","updatePageItems","updateTotalItems","selectAll"],setup(r,{expose:i,emit:t}){const a=r;e.useCssVars(d=>({da0d4328:e.unref(Lt),"3037e504":e.unref(vt)}));const{tableNodeId:f,clickEventType:c,bodyTextDirection:m,checkboxColumnWidth:o,currentPage:n,expandColumnWidth:l,filterOptions:h,fixedCheckbox:_,fixedExpand:g,fixedHeader:b,fixedIndex:v,headers:k,headerTextDirection:$,indexColumnWidth:z,items:M,itemsSelected:u,loading:x,mustSort:S,multiSort:w,rowsItems:p,rowsPerPage:B,searchField:A,searchValue:j,serverItemsLength:K,serverOptions:W,showIndex:y,sortBy:H,sortType:N,tableHeight:L,tableMinHeight:X,themeColor:ie,rowsOfPageSeparatorMessage:Q,showIndexSymbol:R,preventContextMenuRow:Y}=e.toRefs(a),vt=e.computed(()=>L.value?`${L.value}px`:null),Lt=e.computed(()=>`${X.value}px`);e.provide("themeColor",ie.value);const F=e.useSlots(),Tt=e.computed(()=>!!F.pagination),Ft=e.computed(()=>!!F.loading),ye=e.computed(()=>!!F.expand),Dt=e.computed(()=>!!F.body),he=e.ref(),de=e.ref();e.provide("dataTable",he);const _e=e.ref(!1);e.onMounted(()=>{de.value.addEventListener("scroll",()=>{_e.value=de.value.scrollLeft>0})});const ue=e.computed(()=>u.value!==null),J=e.computed(()=>W.value!==null),{serverOptionsComputed:pe,updateServerOptionsPage:zt,updateServerOptionsSort:Mt,updateServerOptionsRowsPerPage:Ht}=mt(W,w,t),{clientSortOptions:be,headerColumns:ke,headersForRender:U,updateSortField:Ot,isMultiSorting:jt,getMultiSortNumber:Wt}=dt(R,o,l,_,g,v,k,ye,z,ue,J,S,pe,y,H,N,w,Mt,t),{rowsItemsComputed:xe,rowsPerPageRef:q,updateRowsPerPage:qt}=ft(J,p,W,B),{totalItems:Pe,selectItemsComputed:Jt,totalItemsLength:ce,toggleSelectAll:Ut,toggleSelectItem:Gt}=yt(be,h,J,M,u,A,j,K,w,t),{currentPaginationNumber:O,maxPaginationNumber:Z,isLastPage:ee,isFirstPage:te,nextPage:ae,prevPage:ne,updatePage:re,updateCurrentPaginationNumber:Kt}=pt(n,J,x,ce,q,W,zt),{currentPageFirstIndex:Se,currentPageLastIndex:Ne,multipleSelectStatus:Ce,pageItems:G}=ut(O,ue,J,M,q,Jt,y,Pe,ce),oe=e.computed(()=>O.value===0?0:(O.value-1)*q.value),{expandingItemIndexList:Be,updateExpandingItemIndexList:we,clearExpandingItemIndexList:Ie}=it(G,oe,t),{fixedHeaders:fe,lastFixedColumn:Ee,fixedColumnsInfos:Qt}=ct(U),{clickRow:$e}=st(c,ue,y,t),Xt=(d,T)=>{Y.value&&T.preventDefault(),t("contextmenuRow",d,T)},Yt=d=>{var s;const T=(s=d.width)!=null?s:fe.value.length?100:null;if(T)return`width: ${T}px; min-width: ${T}px;`},Ae=(d,T="th")=>{if(!fe.value.length)return;const s=Qt.value.find(E=>E.value===d);if(s)return`left: ${s.distance}px;z-index: ${T==="th"?3:1};position: sticky;`};return e.watch(x,(d,T)=>{pe.value&&d===!1&&T===!0&&(Kt(pe.value.page),Ie())}),e.watch(q,d=>{J.value?Ht(d):re(1)}),e.watch([j,h],()=>{J.value||re(1)}),e.watch([O,be,A,j,h],()=>{Ie()},{deep:!0}),e.watch(G,d=>{t("updatePageItems",d)},{deep:!0}),e.watch(Pe,d=>{t("updateTotalItems",d)},{deep:!0}),i({currentPageFirstIndex:Se,currentPageLastIndex:Ne,clientItemsLength:ce,maxPaginationNumber:Z,currentPaginationNumber:O,isLastPage:ee,isFirstPage:te,nextPage:ae,prevPage:ne,updatePage:re,rowsPerPageOptions:xe,rowsPerPageActiveOption:q,updateRowsPerPageActiveOption:qt}),(d,T)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dataTable",ref:he,class:e.normalizeClass(["vue3-easy-data-table",[d.tableClassName]])},[e.createElementVNode("div",{ref_key:"tableBody",ref:de,class:e.normalizeClass(["vue3-easy-data-table__main",{"fixed-header":e.unref(b),"fixed-height":e.unref(L),"show-shadow":_e.value,"table-fixed":e.unref(fe).length,hoverable:!d.noHover,"border-cell":d.borderCell}])},[e.createElementVNode("table",{id:e.unref(f)},[e.createElementVNode("colgroup",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(U),(s,E)=>(e.openBlock(),e.createElementBlock("col",{key:E,style:e.normalizeStyle(Yt(s))},null,4))),128))]),e.unref(F)["customize-headers"]?e.renderSlot(d.$slots,"customize-headers",{key:0},void 0,!0):e.unref(U).length&&!d.hideHeader?(e.openBlock(),e.createElementBlock("thead",{key:1,class:e.normalizeClass(["vue3-easy-data-table__header",[d.headerClassName]])},[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(U),(s,E)=>(e.openBlock(),e.createElementBlock("th",{key:E,class:e.normalizeClass([{sortable:s.sortable,none:s.sortable&&s.sortType==="none",desc:s.sortable&&s.sortType==="desc",asc:s.sortable&&s.sortType==="asc",shadow:s.value===e.unref(Ee)},typeof d.headerItemClassName=="string"?d.headerItemClassName:d.headerItemClassName(s,E+1)]),style:e.normalizeStyle(Ae(s.value)),onClick:e.withModifiers(P=>s.sortable&&s.sortType?e.unref(Ot)(s.value,s.sortType):null,["stop"])},[s.text==="checkbox"?(e.openBlock(),e.createBlock(ze,{key:e.unref(Ce),status:e.unref(Ce),onChange:e.unref(Ut)},null,8,["status","onChange"])):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["header",`direction-${e.unref($)}`])},[e.unref(F)[`header-${s.value}`]?e.renderSlot(d.$slots,`header-${s.value}`,e.normalizeProps(e.mergeProps({key:0},s)),void 0,!0):e.unref(F)[`header-${s.value.toLowerCase()}`]?e.renderSlot(d.$slots,`header-${s.value.toLowerCase()}`,e.normalizeProps(e.mergeProps({key:1},s)),void 0,!0):e.unref(F).header?e.renderSlot(d.$slots,"header",e.normalizeProps(e.mergeProps({key:2},s)),void 0,!0):(e.openBlock(),e.createElementBlock("span",xt,e.toDisplayString(s.text),1)),s.sortable?(e.openBlock(),e.createElementBlock("i",{key:s.sortType?s.sortType:"none",class:e.normalizeClass(["sortType-icon",{desc:s.sortType==="desc"}])},null,2)):e.createCommentVNode("",!0),e.unref(w)&&e.unref(jt)(s.value)?(e.openBlock(),e.createElementBlock("span",Pt,e.toDisplayString(e.unref(Wt)(s.value)),1)):e.createCommentVNode("",!0)],2))],14,kt))),128))])],2)):e.createCommentVNode("",!0),e.unref(Dt)?e.renderSlot(d.$slots,"body",e.normalizeProps(e.mergeProps({key:2},e.unref(G))),void 0,!0):e.unref(ke).length?(e.openBlock(),e.createElementBlock("tbody",{key:3,class:e.normalizeClass(["vue3-easy-data-table__body",{"row-alternation":d.alternating}])},[e.renderSlot(d.$slots,"body-prepend",e.normalizeProps(e.guardReactiveProps({items:e.unref(G),pagination:{isFirstPage:e.unref(te),isLastPage:e.unref(ee),currentPaginationNumber:e.unref(O),maxPaginationNumber:e.unref(Z),nextPage:e.unref(ae),prevPage:e.unref(ne)},headers:e.unref(U)})),void 0,!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(G),(s,E)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:E},[e.createElementVNode("tr",{class:e.normalizeClass([{"even-row":(E+1)%2===0},typeof d.bodyRowClassName=="string"?d.bodyRowClassName:d.bodyRowClassName(s,E+1)]),onClick:P=>{e.unref($e)(s,"single",P),d.clickRowToExpand&&e.unref(we)(E+e.unref(oe),s,P)},onDblclick:P=>{e.unref($e)(s,"double",P)},onContextmenu:P=>{Xt(s,P)}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ke),(P,Zt)=>(e.openBlock(),e.createElementBlock("td",{key:Zt,style:e.normalizeStyle(Ae(P,"td")),class:e.normalizeClass([{shadow:P===e.unref(Ee),"can-expand":P==="expand"},typeof d.bodyItemClassName=="string"?d.bodyItemClassName:d.bodyItemClassName(P,E+1),`direction-${e.unref(m)}`]),onClick:Ve=>P==="expand"?e.unref(we)(E+e.unref(oe),s,Ve):null},[e.unref(F)[`item-${P}`]?e.renderSlot(d.$slots,`item-${P}`,e.normalizeProps(e.mergeProps({key:0},s)),void 0,!0):e.unref(F)[`item-${P.toLowerCase()}`]?e.renderSlot(d.$slots,`item-${P.toLowerCase()}`,e.normalizeProps(e.mergeProps({key:1},s)),void 0,!0):P==="expand"?(e.openBlock(),e.createElementBlock("i",{key:2,class:e.normalizeClass(["expand-icon",{expanding:e.unref(Be).includes(e.unref(oe)+E)}])},null,2)):P==="checkbox"?(e.openBlock(),e.createBlock(je,{key:3,checked:s[P],onChange:Ve=>e.unref(Gt)(s)},null,8,["checked","onChange"])):e.unref(F).item?e.renderSlot(d.$slots,"item",e.normalizeProps(e.mergeProps({key:4},{column:P,item:s})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createTextVNode(e.toDisplayString(e.unref(gt)(P,s)),1)],64))],14,Nt))),128))],42,St),e.unref(ye)&&e.unref(Be).includes(E+e.unref(oe))?(e.openBlock(),e.createElementBlock("tr",{key:0,class:e.normalizeClass([{"even-row":(E+1)%2===0},typeof d.bodyExpandRowClassName=="string"?d.bodyExpandRowClassName:d.bodyExpandRowClassName(s,E+1)])},[e.createElementVNode("td",{colspan:e.unref(U).length,class:"expand"},[s.expandLoading?(e.openBlock(),e.createBlock(et,{key:0,class:"expand-loading"})):e.createCommentVNode("",!0),e.renderSlot(d.$slots,"expand",e.normalizeProps(e.guardReactiveProps(s)),void 0,!0)],8,Ct)],2)):e.createCommentVNode("",!0)],64))),128)),e.renderSlot(d.$slots,"body-append",e.normalizeProps(e.guardReactiveProps({items:e.unref(G),pagination:{isFirstPage:e.unref(te),isLastPage:e.unref(ee),currentPaginationNumber:e.unref(O),maxPaginationNumber:e.unref(Z),nextPage:e.unref(ae),prevPage:e.unref(ne),updatePage:e.unref(re)},headers:e.unref(U)})),void 0,!0)],2)):e.createCommentVNode("",!0)],8,bt),e.unref(x)?(e.openBlock(),e.createElementBlock("div",Bt,[wt,e.createElementVNode("div",It,[e.unref(Ft)?e.renderSlot(d.$slots,"loading",{key:0},void 0,!0):(e.openBlock(),e.createBlock(Ye,{key:1}))])])):e.createCommentVNode("",!0),!e.unref(G).length&&!e.unref(x)?(e.openBlock(),e.createElementBlock("div",Et,[e.renderSlot(d.$slots,"empty-message",{},()=>[e.createTextVNode(e.toDisplayString(d.emptyMessage),1)],!0)])):e.createCommentVNode("",!0)],2),d.hideFooter?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",$t,[d.hideRowsPerPage?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",At,[e.createTextVNode(e.toDisplayString(d.rowsPerPageMessage)+" ",1),e.createVNode(Ke,{modelValue:e.unref(q),"onUpdate:modelValue":T[0]||(T[0]=s=>e.isRef(q)?q.value=s:null),"rows-items":e.unref(xe)},null,8,["modelValue","rows-items"])])),e.createElementVNode("div",Vt,e.toDisplayString(`${e.unref(Se)}\u2013${e.unref(Ne)}`)+" "+e.toDisplayString(e.unref(Q))+" "+e.toDisplayString(e.unref(ce)),1),e.unref(Tt)?e.renderSlot(d.$slots,"pagination",e.normalizeProps(e.mergeProps({key:1},{isFirstPage:e.unref(te),isLastPage:e.unref(ee),currentPaginationNumber:e.unref(O),maxPaginationNumber:e.unref(Z),nextPage:e.unref(ae),prevPage:e.unref(ne)})),void 0,!0):(e.openBlock(),e.createBlock(lt,{key:2,"is-first-page":e.unref(te),"is-last-page":e.unref(ee),onClickNextPage:e.unref(ae),onClickPrevPage:e.unref(ne)},e.createSlots({_:2},[d.buttonsPagination?{name:"buttonsPagination",fn:e.withCtx(()=>[e.createVNode(nt,{"current-pagination-number":e.unref(O),"max-pagination-number":e.unref(Z),onUpdatePage:e.unref(re)},null,8,["current-pagination-number","max-pagination-number","onUpdatePage"])]),key:"0"}:void 0]),1032,["is-first-page","is-last-page","onClickNextPage","onClickPrevPage"]))]))],2))}});var ge=C(Rt,[["__scopeId","data-v-32683533"]]);return typeof window!="undefined"&&window.Vue&&window.Vue.createApp({}).component("Vue3EasyDataTable",ge),ge}); |
@@ -6,3 +6,3 @@ { | ||
"private": false, | ||
"version": "1.5.46", | ||
"version": "1.5.47", | ||
"types": "./types/main.d.ts", | ||
@@ -9,0 +9,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
120288
1913