vue3-easy-data-table
Advanced tools
Comparing version 1.5.9 to 1.5.10
@@ -870,3 +870,3 @@ var __defProp = Object.defineProperty; | ||
if (typeof searchField.value === "string" && searchField.value !== "") | ||
return getItemValue(searchField.value, item); | ||
return item[searchField.value]; | ||
if (Array.isArray(searchField.value)) { | ||
@@ -922,2 +922,7 @@ let searchString = ""; | ||
}); | ||
watch(itemsFiltering, (newVal) => { | ||
if (filterOptions.value) { | ||
emits("updateFilter", newVal); | ||
} | ||
}, { immediate: true, deep: true }); | ||
function recursionMuiltSort(sortByArr, sortDescArr, itemsToSort, index) { | ||
@@ -1170,3 +1175,3 @@ const sortBy = sortByArr[index]; | ||
var DataTable_vue_vue_type_style_index_1_scoped_true_lang = ""; | ||
const _withScopeId = (n) => (pushScopeId("data-v-3acd2d04"), n = n(), popScopeId(), n); | ||
const _withScopeId = (n) => (pushScopeId("data-v-45dd6be9"), n = n(), popScopeId(), n); | ||
const _hoisted_1 = ["onClick"]; | ||
@@ -1218,2 +1223,3 @@ const _hoisted_2 = { | ||
"updateSort", | ||
"updateFilter", | ||
"update:itemsSelected", | ||
@@ -1225,4 +1231,4 @@ "update:serverOptions" | ||
useCssVars((_ctx) => ({ | ||
"410a55a4": unref(tableMinHeightPx), | ||
"d74494fc": unref(tableHeightPx) | ||
"2b98f82c": unref(tableMinHeightPx), | ||
"2215e046": unref(tableHeightPx) | ||
})); | ||
@@ -1268,3 +1274,2 @@ const { | ||
const ifHasExpandSlot = computed(() => !!slots.expand); | ||
const ifHasBodySlot = computed(() => !!slots.body); | ||
const dataTable = ref(); | ||
@@ -1459,4 +1464,4 @@ const tableBody = ref(); | ||
], 2)) : createCommentVNode("", true), | ||
unref(ifHasBodySlot) ? renderSlot(_ctx.$slots, "body", normalizeProps(mergeProps({ key: 1 }, unref(pageItems))), void 0, true) : unref(headerColumns).length ? (openBlock(), createElementBlock("tbody", { | ||
key: 2, | ||
unref(headerColumns).length ? (openBlock(), createElementBlock("tbody", { | ||
key: 1, | ||
class: normalizeClass(["vue3-easy-data-table__body", { "row-alternation": _ctx.alternating }]) | ||
@@ -1587,3 +1592,3 @@ }, [ | ||
}); | ||
var DataTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3acd2d04"]]); | ||
var DataTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-45dd6be9"]]); | ||
if (typeof window !== "undefined" && window.Vue) { | ||
@@ -1590,0 +1595,0 @@ window.Vue.createApp({}).component("Vue3EasyDataTable", DataTable); |
@@ -1,1 +0,1 @@ | ||
(function(e,w){typeof exports=="object"&&typeof module!="undefined"?module.exports=w(require("vue")):typeof define=="function"&&define.amd?define(["vue"],w):(e=typeof globalThis!="undefined"?globalThis:e||self,e["vue3-easy-data-table"]=w(e.Vue))})(this,function(e){"use strict";var Gt=Object.defineProperty,Kt=Object.defineProperties;var Qt=Object.getOwnPropertyDescriptors;var $e=Object.getOwnPropertySymbols;var Xt=Object.prototype.hasOwnProperty,Yt=Object.prototype.propertyIsEnumerable;var Ee=(e,w,S)=>w in e?Gt(e,w,{enumerable:!0,configurable:!0,writable:!0,value:S}):e[w]=S,H=(e,w)=>{for(var S in w||(w={}))Xt.call(w,S)&&Ee(e,S,w[S]);if($e)for(var S of $e(w))Yt.call(w,S)&&Ee(e,S,w[S]);return e},ae=(e,w)=>Kt(e,Qt(w));var w="",S=(n,s)=>{const t=n.__vccOpts||n;for(const[a,d]of s)t[a]=d;return t};const ve=n=>(e.pushScopeId("data-v-e0a0b7f0"),n=n(),e.popScopeId(),n),Ve=["onClick"],Ae=["checked"],Le=ve(()=>e.createElementVNode("label",{for:"checbox"},null,-1));var Re=S(e.defineComponent({props:{status:{type:String,required:!0}},emits:["change"],setup(n,{emit:s}){const t=n;e.useCssVars(g=>({"51ab8a49":e.unref(l)}));const a=e.computed(()=>t.status==="allSelected"),d=()=>{s("change",!a.value)},l=e.inject("themeColor");return(g,o)=>(e.openBlock(),e.createElementBlock("div",{class:"easy-checkbox",onClick:e.withModifiers(d,["stop","prevent"])},[e.createElementVNode("input",{type:"checkbox",checked:e.unref(a),class:e.normalizeClass(n.status)},null,10,Ae),Le],8,Ve))}}),[["__scopeId","data-v-e0a0b7f0"]]),ea="";const Te=n=>(e.pushScopeId("data-v-7e69a276"),n=n(),e.popScopeId(),n),Fe=["checked"],De=Te(()=>e.createElementVNode("label",{for:"checbox"},null,-1));var ze=S(e.defineComponent({props:{checked:{type:Boolean,required:!0}},emits:["change"],setup(n,{emit:s}){e.useCssVars(a=>({fdaf7e9e:e.unref(t)}));const t=e.inject("themeColor");return(a,d)=>(e.openBlock(),e.createElementBlock("div",{class:"easy-checkbox",onClick:d[0]||(d[0]=e.withModifiers(l=>s("change"),["stop","prevent"]))},[e.createElementVNode("input",{type:"checkbox",checked:n.checked},null,8,Fe),De]))}}),[["__scopeId","data-v-7e69a276"]]),aa="";const He=n=>(e.pushScopeId("data-v-09dad912"),n=n(),e.popScopeId(),n),Oe={class:"easy-data-table__rows-selector"},Me={class:"rows-input"},je=He(()=>e.createElementVNode("div",{class:"triangle"},null,-1)),We=["onClick"];var qe=S(e.defineComponent({props:{modelValue:{type:Number,required:!0},rowsItems:{type:Array,required:!0}},emits:["update:modelValue"],setup(n,{emit:s}){const t=n;e.useCssVars(u=>({"7fe9410c":e.unref(y)}));const a=e.ref(!1),d=e.ref(!1),l=e.inject("dataTable");e.watch(a,u=>{if(u&&l){const x=window.innerHeight,_=l.value.getBoundingClientRect().height,L=l.value.getBoundingClientRect().top;x-(_+L)<=100?d.value=!0:d.value=!1}});const g=e.computed({get:()=>t.modelValue,set:u=>{s("update:modelValue",u)}}),o=u=>{g.value=u,a.value=!1},r=(u,x)=>{let _=u.parentNode;for(;_!=null;){if(_.classList&&_.classList.contains(x))return!0;_=_.parentNode}return!1},i=u=>{r(u.target,"easy-data-table__rows-selector")||(a.value=!1)};e.onMounted(()=>{document.addEventListener("click",i)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",i)});const y=e.inject("themeColor");return(u,x)=>(e.openBlock(),e.createElementBlock("div",Oe,[e.createElementVNode("div",{class:"rows-input__wrapper",onClick:x[0]||(x[0]=_=>a.value=!a.value)},[e.createElementVNode("div",Me,e.toDisplayString(e.unref(g)),1),je]),e.createElementVNode("ul",{class:e.normalizeClass(["select-items",{show:a.value,inside:d.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.rowsItems,_=>(e.openBlock(),e.createElementBlock("li",{key:_,class:e.normalizeClass({selected:_===e.unref(g)}),onClick:L=>o(_)},e.toDisplayString(_),11,We))),128))],2)]))}}),[["__scopeId","data-v-09dad912"]]),ra="";const ne=n=>(e.pushScopeId("data-v-1fa3a520"),n=n(),e.popScopeId(),n),Je={class:"lds-ring"},Ue=[ne(()=>e.createElementVNode("div",null,null,-1)),ne(()=>e.createElementVNode("div",null,null,-1)),ne(()=>e.createElementVNode("div",null,null,-1)),ne(()=>e.createElementVNode("div",null,null,-1))];var Ge=S(e.defineComponent({setup(n){e.useCssVars(t=>({"26774109":e.unref(s)}));const s=e.inject("themeColor");return(t,a)=>(e.openBlock(),e.createElementBlock("div",Je,Ue))}}),[["__scopeId","data-v-1fa3a520"]]),da="";const Ke={class:"loader-line"};var Qe=S(e.defineComponent({setup(n){e.useCssVars(t=>({"0d327f57":e.unref(s)}));const s=e.inject("themeColor");return(t,a)=>(e.openBlock(),e.createElementBlock("div",Ke))}}),[["__scopeId","data-v-7d281cac"]]),pa="";const Xe={class:"buttons-pagination"},Ye=["onClick"];var Ze=S(e.defineComponent({props:{maxPaginationNumber:{type:Number,required:!0},currentPaginationNumber:{type:Number,required:!0}},emits:["updatePage"],setup(n,{emit:s}){const t=n;e.useCssVars(o=>({"40dd4f07":e.unref(g)}));const a=7,d=o=>{o.type==="button"&&!o.active&&s("updatePage",o.page)},l=e.computed(()=>{const o=[];if(t.maxPaginationNumber<=a)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<=a;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-(a-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<=a;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<=a;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-(a-r);o.push({type:"button",page:i,active:i===t.currentPaginationNumber,activePrev:i+1===t.currentPaginationNumber})}else for(let r=1;r<=a;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,y=t.currentPaginationNumber-i;o.push({type:"button",page:y,active:y===t.currentPaginationNumber,activePrev:y+1===t.currentPaginationNumber})}return o}),g=e.inject("themeColor");return(o,r)=>(e.openBlock(),e.createElementBlock("div",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(i,y)=>(e.openBlock(),e.createElementBlock("div",{key:y,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:u=>d(i)},e.toDisplayString(i.type==="button"?i.page:"..."),11,Ye))),128))]))}}),[["__scopeId","data-v-4c681fa2"]]),ma="";const pe=n=>(e.pushScopeId("data-v-c9da5286"),n=n(),e.popScopeId(),n),et=[pe(()=>e.createElementVNode("span",{class:"arrow arrow-right"},null,-1))],tt=[pe(()=>e.createElementVNode("span",{class:"arrow arrow-left"},null,-1))];var at=S(e.defineComponent({props:{isFirstPage:{type:Boolean,required:!1},isLastPage:{type:Boolean,required:!1}},emits:["clickPrevPage","clickNextPage"],setup(n,{emit:s}){const t=e.useSlots();return(a,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["previous-page__click-button",{"first-page":n.isFirstPage}]),onClick:d[0]||(d[0]=l=>s("clickPrevPage"))},et,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":n.isLastPage}]),onClick:d[1]||(d[1]=l=>s("clickNextPage"))},tt,2)],64))}}),[["__scopeId","data-v-c9da5286"]]);function nt(n,s,t){return{clickRow:d=>{const l=H({},d);if(n.value){const{checkbox:g}=d;delete l.checkbox,l.isSelected=g}if(s.value){const{index:g}=d;delete l.index,l.indexInCurrentPage=g}t("clickRow",l)}}}function rt(n,s,t){const a=e.ref([]);return{expandingItemIndexList:a,updateExpandingItemIndexList:(g,o,r)=>{r.stopPropagation();const i=a.value.indexOf(g);if(i!==-1)a.value.splice(i,1);else{const y=n.value.findIndex(u=>JSON.stringify(u)===JSON.stringify(o));t("expandRow",s.value+y),a.value.push(s.value+y)}},clearExpandingItemIndexList:()=>{a.value=[]}}}function ot(n){const s=e.computed(()=>n.value.filter(d=>d.fixed)),t=e.computed(()=>s.value.length?s.value[s.value.length-1].value:""),a=e.computed(()=>{if(!s.value.length)return[];const d=s.value.map(l=>{var g;return(g=l.width)!=null?g:100});return s.value.map((l,g)=>{var o,r;return{value:l.value,fixed:(o=l.fixed)!=null?o:!0,width:(r=l.width)!=null?r:100,distance:g===0?0:d.reduce((i,y,u)=>{let x=i;return u<g&&(x+=y),x})}})});return{fixedHeaders:s,lastFixedColumn:t,fixedColumnsInfos:a}}function lt(n,s,t,a,d,l,g,o,r,i,y,u,x,_,L,b,B,F){const v=e.computed(()=>l.value.findIndex(h=>h.fixed)!==-1),f=e.computed(()=>v.value?l.value.filter(h=>h.fixed):[]),k=e.computed(()=>l.value.filter(h=>!h.fixed)),N=(h,V)=>Array.isArray(h)&&Array.isArray(V)?{sortBy:h,sortDesc:V.map(P=>P==="desc")}:h!==""?{sortBy:_.value,sortDesc:L.value==="desc"}:null,p=e.ref(N(_.value,L.value)),I=e.computed(()=>{var re;const V=[...f.value,...k.value].map(G=>{const $=Object.assign(G);if(b.value&&($.sortable=!0),$.sortable&&($.sortType="none"),u.value)if(Array.isArray(u.value.sortBy)&&Array.isArray(u.value.sortType)&&u.value.sortBy.includes($.value)){const z=u.value.sortBy.indexOf($.value);$.sortType=u.value.sortType[z]}else $.value===u.value.sortBy&&u.value.sortType&&($.sortType=u.value.sortType);if(p.value&&Array.isArray(p.value.sortBy)&&Array.isArray(p.value.sortDesc)&&p.value.sortBy.includes($.value)){const z=p.value.sortBy.indexOf($.value);$.sortType=p.value.sortDesc[z]?"desc":"asc"}else p.value&&$.value===p.value.sortBy&&($.sortType=p.value.sortDesc?"desc":"asc");return $});let P=[];g.value?P=[a.value||v.value?{text:"",value:"expand",fixed:!0,width:s.value}:{text:"",value:"expand"},...V]:P=V;let D=[];x.value?D=[d.value||v.value?{text:"#",value:"index",fixed:!0,width:o.value}:{text:"#",value:"index"},...P]:D=P;let Q=[];return r.value?Q=[t.value||v.value?{text:"checkbox",value:"checkbox",fixed:!0,width:(re=n.value)!=null?re:36}:{text:"checkbox",value:"checkbox"},...D]:Q=D,Q}),C=e.computed(()=>I.value.map(h=>h.value));return{clientSortOptions:p,headerColumns:C,headersForRender:I,updateSortField:(h,V)=>{let P=null;if(V==="none"?P="asc":V==="asc"?P="desc":P=y.value?"asc":null,i.value&&B(h,P),p.value&&Array.isArray(p.value.sortBy)&&Array.isArray(p.value.sortDesc)){const D=p.value.sortBy.indexOf(h);D===-1?P!==null&&(p.value.sortBy.push(h),p.value.sortDesc.push(P==="desc")):P===null?(p.value.sortDesc.splice(D,1),p.value.sortBy.splice(D,1)):p.value.sortDesc[D]=P==="desc"}else P===null?p.value=null:p.value={sortBy:h,sortDesc:P==="desc"};F("updateSort",{sortType:P,sortBy:h})},isMultiSorting:h=>u.value&&Array.isArray(u.value.sortBy)?u.value.sortBy.includes(h):p.value&&Array.isArray(p.value.sortBy)?p.value.sortBy.includes(h):!1,getMultiSortNumber:h=>u.value&&Array.isArray(u.value.sortBy)?u.value.sortBy.indexOf(h)+1:p.value&&Array.isArray(p.value.sortBy)?p.value.sortBy.indexOf(h)+1:!1}}function st(n,s,t,a,d,l,g,o,r){const i=e.computed(()=>(n.value-1)*d.value+1),y=e.computed(()=>t.value?Math.min(r.value,n.value*d.value):Math.min(o.value.length,n.value*d.value)),u=e.computed(()=>t.value?a.value:o.value.slice(i.value-1,y.value)),x=e.computed(()=>g.value?u.value.map((b,B)=>H({index:i.value+B},b)):u.value),_=e.computed(()=>l.value.length===0||l.value.every(B=>o.value.findIndex(F=>JSON.stringify(B)===JSON.stringify(F))===-1)?"noneSelected":l.value.length===o.value.length&&l.value.every(F=>o.value.findIndex(v=>JSON.stringify(F)===JSON.stringify(v))!==-1)?"allSelected":"partSelected"),L=e.computed(()=>s.value?_.value==="allSelected"?x.value.map(b=>H({checkbox:!0},b)):_.value==="noneSelected"?x.value.map(b=>H({checkbox:!1},b)):x.value.map(b=>{const B=l.value.findIndex(F=>{const v=H({},b);return delete v.index,JSON.stringify(F)===JSON.stringify(v)})!==-1;return H({checkbox:B},b)}):x.value);return{currentPageFirstIndex:i,currentPageLastIndex:y,multipleSelectStatus:_,pageItems:L}}function it(n,s,t,a,d,l,g){const o=e.ref(l.value?l.value.page:n.value),r=e.computed(()=>Math.ceil(a.value/d.value)),i=e.computed(()=>r.value===0||o.value===r.value),y=e.computed(()=>o.value===1);return{currentPaginationNumber:o,maxPaginationNumber:r,isLastPage:i,isFirstPage:y,nextPage:()=>{if(a.value!==0&&!i.value&&!t.value)if(s.value){const b=o.value+1;g(b)}else o.value+=1},prevPage:()=>{if(a.value!==0&&!y.value&&!t.value)if(s.value){const b=o.value-1;g(b)}else o.value-=1},updatePage:b=>{t.value||(s.value?g(b):o.value=b)},updateCurrentPaginationNumber:b=>{o.value=b}}}function ct(n,s,t,a){const d=e.computed(()=>!n.value&&s.value.findIndex(o=>o===a.value)===-1?[a.value,...s.value]:s.value),l=e.ref(t.value?t.value.rowsPerPage:a.value);return{rowsItemsComputed:d,rowsPerPageRef:l,updateRowsPerPage:o=>{l.value=o}}}function dt(n,s,t){const a=e.computed({get:()=>{if(n.value){const{page:o,rowsPerPage:r,sortBy:i,sortType:y}=n.value;return{page:o,rowsPerPage:r,sortBy:i!=null?i:null,sortType:y!=null?y:null}}return null},set:o=>{t("update:serverOptions",o)}});return{serverOptionsComputed:a,updateServerOptionsPage:o=>{a.value&&(a.value=ae(H({},a.value),{page:o}))},updateServerOptionsSort:(o,r)=>{if(a.value)if(s.value&&Array.isArray(a.value.sortBy)&&Array.isArray(a.value.sortType)){const i=a.value.sortBy.findIndex(y=>y===o);i===-1&&r!==null&&(a.value.sortBy.push(o),a.value.sortType.push(r)),r===null?(a.value.sortBy.splice(i,1),a.value.sortType.splice(i,1)):a.value.sortType[i]=r}else a.value=ae(H({},a.value),{sortBy:r!==null?o:null,sortType:r})},updateServerOptionsRowsPerPage:o=>{a.value&&(a.value=ae(H({},a.value),{page:1,rowsPerPage:o}))}}}function E(n,s){if(n.includes(".")){let t="";const a=n.split("."),{length:d}=a;let l=0;for(;l<d&&(t=l===0?s[a[l]]:t[a[l]],l+=1,t!==void 0););return t}return s[n]}function ut(n,s){const t=E(n,s);return Array.isArray(t)?t.join(","):t}function pt(n,s,t,a,d,l,g,o,r,i){const y=f=>{if(typeof l.value=="string"&&l.value!=="")return E(l.value,f);if(Array.isArray(l.value)){let k="";return l.value.forEach(N=>{k+=E(N,f)}),k}return Object.values(f).join(" ")},u=e.computed(()=>{if(!t.value&&g.value!==""){const f=new RegExp(g.value,"i");return a.value.filter(k=>f.test(y(k)))}return a.value}),x=e.computed(()=>{let f=[...u.value];return s.value?(s.value.forEach(k=>{f=f.filter(N=>{const{field:p,comparison:I,criteria:C}=k;if(typeof I=="function")return I(E(p,N),C);const T=E(p,N);switch(I){case"=":return T===C;case"!=":return T!==C;case">":return T>C;case"<":return T<C;case"<=":return T<=C;case">=":return T>=C;case"between":return T>=Math.min(...C)&&T<=Math.max(...C);default:return T===C}})}),f):u.value});function _(f,k,N,p){const I=f[p],C=k[p];return(p===0?N:_(f,k,N,p-1)).sort((M,W)=>{let h=!0;for(let V=0;V<p;V+=1)if(E(f[V],M)!==E(f[V],W)){h=!1;break}return h?E(I,M)<E(I,W)?C?1:-1:E(I,M)>E(I,W)?C?-1:1:0:0})}const L=e.computed(()=>{if(t.value)return a.value;if(n.value===null)return x.value;const{sortBy:f,sortDesc:k}=n.value,N=[...x.value];return r&&Array.isArray(f)&&Array.isArray(k)?f.length===0?N:_(f,k,N,f.length-1):N.sort((p,I)=>E(f,p)<E(f,I)?k?1:-1:E(f,p)>E(f,I)?k?-1:1:0)}),b=e.computed(()=>t.value?o.value:L.value.length),B=e.computed({get:()=>{var f;return(f=d.value)!=null?f:[]},set:f=>{i("update:itemsSelected",f)}});return{totalItems:L,selectItemsComputed:B,totalItemsLength:b,toggleSelectAll:f=>{B.value=f?L.value:[]},toggleSelectItem:f=>{const k=f.checkbox;if(delete f.checkbox,delete f.index,k)B.value=B.value.filter(N=>JSON.stringify(N)!==JSON.stringify(f));else{const N=B.value;N.unshift(f),B.value=N}}}}var ft={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,deault:!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:""},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"}},_a="",ba="";const mt=n=>(e.pushScopeId("data-v-3acd2d04"),n=n(),e.popScopeId(),n),gt=["onClick"],yt={key:1,class:"header-text"},ht={key:3,class:"multi-sort__number"},_t=["onClick"],bt=["onClick"],kt=["colspan"],xt={key:0,class:"vue3-easy-data-table__loading"},Pt=mt(()=>e.createElementVNode("div",{class:"vue3-easy-data-table__loading-mask"},null,-1)),Nt={class:"loading-entity"},St={key:1,class:"vue3-easy-data-table__message"},Ct={key:0,class:"vue3-easy-data-table__footer"},Bt={key:0,class:"pagination__rows-per-page"},wt={class:"pagination__items-index"},It=e.defineComponent({props:ae(H({},ft),{items:{type:Array,required:!0},headers:{type:Array,required:!0}}),emits:["clickRow","expandRow","updateSort","update:itemsSelected","update:serverOptions"],setup(n,{expose:s,emit:t}){const a=n;e.useCssVars(m=>({"410a55a4":e.unref($),d74494fc:e.unref(G)}));const{bodyTextDirection:d,checkboxColumnWidth:l,currentPage:g,expandColumnWidth:o,filterOptions:r,fixedCheckbox:i,fixedExpand:y,fixedHeader:u,fixedIndex:x,headers:_,headerTextDirection:L,indexColumnWidth:b,items:B,itemsSelected:F,loading:v,mustSort:f,multiSort:k,rowsItems:N,rowsPerPage:p,searchField:I,searchValue:C,serverItemsLength:T,serverOptions:M,showIndex:W,sortBy:h,sortType:V,tableHeight:P,tableMinHeight:D,themeColor:Q,rowsOfPageSeparatorMessage:re}=e.toRefs(a),G=e.computed(()=>P.value?`${P.value}px`:null),$=e.computed(()=>`${D.value}px`);e.provide("themeColor",Q.value);const z=e.useSlots(),$t=e.computed(()=>!!z.pagination),Et=e.computed(()=>!!z.loading),me=e.computed(()=>!!z.expand),vt=e.computed(()=>!!z.body),ge=e.ref(),ie=e.ref();e.provide("dataTable",ge);const ye=e.ref(!1);e.onMounted(()=>{ie.value.addEventListener("scroll",()=>{ye.value=ie.value.scrollLeft>0})});const ce=e.computed(()=>F.value!==null),J=e.computed(()=>M.value!==null),{serverOptionsComputed:de,updateServerOptionsPage:Vt,updateServerOptionsSort:At,updateServerOptionsRowsPerPage:Lt}=dt(M,k,t),{clientSortOptions:he,headerColumns:_e,headersForRender:U,updateSortField:Rt,isMultiSorting:Tt,getMultiSortNumber:Ft}=lt(l,o,i,y,x,_,me,b,ce,J,f,de,W,h,V,k,At,t),{rowsItemsComputed:be,rowsPerPageRef:q,updateRowsPerPage:Dt}=ct(J,N,M,p),{totalItems:zt,selectItemsComputed:Ht,totalItemsLength:oe,toggleSelectAll:Ot,toggleSelectItem:Mt}=pt(he,r,J,B,F,I,C,T,k,t),{currentPaginationNumber:j,maxPaginationNumber:X,isLastPage:Y,isFirstPage:Z,nextPage:ee,prevPage:te,updatePage:le,updateCurrentPaginationNumber:jt}=it(g,J,v,oe,q,M,Vt),{currentPageFirstIndex:ke,currentPageLastIndex:xe,multipleSelectStatus:Pe,pageItems:K}=st(j,ce,J,B,q,Ht,W,zt,oe),se=e.computed(()=>j.value===0?0:(j.value-1)*q.value),{expandingItemIndexList:Ne,updateExpandingItemIndexList:Wt,clearExpandingItemIndexList:Se}=rt(K,se,t),{fixedHeaders:ue,lastFixedColumn:Ce,fixedColumnsInfos:qt}=ot(U),{clickRow:Jt}=nt(ce,W,t),Ut=m=>{var c;const O=(c=m.width)!=null?c:ue.value.length?100:null;if(O)return`width: ${O}px; min-width: ${O}px;`},Be=(m,O="th")=>{if(!ue.value.length)return;const c=qt.value.find(R=>R.value===m);if(c)return`left: ${c.distance}px;z-index: ${O==="th"?3:1};position: sticky;`};return e.watch(v,(m,O)=>{de.value&&m===!1&&O===!0&&(jt(de.value.page),Se())}),e.watch(q,m=>{J.value?Lt(m):le(1)}),e.watch(C,()=>{J.value||le(1)}),e.watch([j,he,I,C,r],()=>{Se()},{deep:!0}),s({currentPageFirstIndex:ke,currentPageLastIndex:xe,clientItemsLength:oe,maxPaginationNumber:X,currentPaginationNumber:j,isLastPage:Y,isFirstPage:Z,nextPage:ee,prevPage:te,updatePage:le,rowsPerPageOptions:be,rowsPerPageActiveOption:q,updateRowsPerPageActiveOption:Dt}),(m,O)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dataTable",ref:ge,class:e.normalizeClass(["vue3-easy-data-table",[m.tableClassName]])},[e.createElementVNode("div",{ref_key:"tableBody",ref:ie,class:e.normalizeClass(["vue3-easy-data-table__main",{"fixed-header":e.unref(u),"fixed-height":e.unref(P),"show-shadow":ye.value,"table-fixed":e.unref(ue).length,hoverable:!m.noHover,"border-cell":m.borderCell}])},[e.createElementVNode("table",null,[e.createElementVNode("colgroup",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(U),(c,R)=>(e.openBlock(),e.createElementBlock("col",{key:R,style:e.normalizeStyle(Ut(c))},null,4))),128))]),e.unref(U).length&&!m.hideHeader?(e.openBlock(),e.createElementBlock("thead",{key:0,class:e.normalizeClass(["vue3-easy-data-table__header",[m.headerClassName]])},[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(U),(c,R)=>(e.openBlock(),e.createElementBlock("th",{key:R,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(Ce)},typeof m.headerItemClassName=="string"?m.headerItemClassName:m.headerItemClassName(c,R)]),style:e.normalizeStyle(Be(c.value)),onClick:e.withModifiers(A=>c.sortable&&c.sortType?e.unref(Rt)(c.value,c.sortType):null,["stop"])},[c.text==="checkbox"?(e.openBlock(),e.createBlock(Re,{key:e.unref(Pe),status:e.unref(Pe),onChange:e.unref(Ot)},null,8,["status","onChange"])):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["header",`direction-${e.unref(L)}`])},[e.unref(z)[`header-${c.value}`]?e.renderSlot(m.$slots,`header-${c.value}`,e.normalizeProps(e.mergeProps({key:0},c)),void 0,!0):(e.openBlock(),e.createElementBlock("span",yt,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(Tt)(c.value)?(e.openBlock(),e.createElementBlock("span",ht,e.toDisplayString(e.unref(Ft)(c.value)),1)):e.createCommentVNode("",!0)],2))],14,gt))),128))])],2)):e.createCommentVNode("",!0),e.unref(vt)?e.renderSlot(m.$slots,"body",e.normalizeProps(e.mergeProps({key:1},e.unref(K))),void 0,!0):e.unref(_e).length?(e.openBlock(),e.createElementBlock("tbody",{key:2,class:e.normalizeClass(["vue3-easy-data-table__body",{"row-alternation":m.alternating}])},[e.renderSlot(m.$slots,"body-prepend",e.normalizeProps(e.guardReactiveProps({items:e.unref(K),pagination:{isFirstPage:e.unref(Z),isLastPage:e.unref(Y),currentPaginationNumber:e.unref(j),maxPaginationNumber:e.unref(X),nextPage:e.unref(ee),prevPage:e.unref(te)},headers:e.unref(U)})),void 0,!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(K),(c,R)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:R},[e.createElementVNode("tr",{class:e.normalizeClass([{"even-row":(R+1)%2===0},typeof m.bodyRowClassName=="string"?m.bodyRowClassName:m.bodyRowClassName(c,R)]),onClick:A=>e.unref(Jt)(c)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(_e),(A,we)=>(e.openBlock(),e.createElementBlock("td",{key:we,style:e.normalizeStyle(Be(A,"td")),class:e.normalizeClass([{shadow:A===e.unref(Ce),"can-expand":A==="expand"},typeof m.bodyItemClassName=="string"?m.bodyItemClassName:m.bodyItemClassName(A,we),`direction-${e.unref(d)}`]),onClick:Ie=>A==="expand"?e.unref(Wt)(R+e.unref(se),c,Ie):null},[e.unref(z)[`item-${A}`]?e.renderSlot(m.$slots,`item-${A}`,e.normalizeProps(e.mergeProps({key:0},c)),void 0,!0):e.unref(z)[`item-${A.toLowerCase()}`]?e.renderSlot(m.$slots,`item-${A.toLowerCase()}`,e.normalizeProps(e.mergeProps({key:1},c)),void 0,!0):A==="expand"?(e.openBlock(),e.createElementBlock("i",{key:2,class:e.normalizeClass(["expand-icon",{expanding:e.unref(Ne).includes(e.unref(se)+R)}])},null,2)):A==="checkbox"?(e.openBlock(),e.createBlock(ze,{key:3,checked:c[A],onChange:Ie=>e.unref(Mt)(c)},null,8,["checked","onChange"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createTextVNode(e.toDisplayString(e.unref(ut)(A,c)),1)],64))],14,bt))),128))],10,_t),e.unref(me)&&e.unref(Ne).includes(R+e.unref(se))?(e.openBlock(),e.createElementBlock("tr",{key:0,class:e.normalizeClass({"even-row":(R+1)%2===0})},[e.createElementVNode("td",{colspan:e.unref(U).length,class:"expand"},[c.expandLoading?(e.openBlock(),e.createBlock(Qe,{key:0,class:"expand-loading"})):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"expand",e.normalizeProps(e.guardReactiveProps(c)),void 0,!0)],8,kt)],2)):e.createCommentVNode("",!0)],64))),128)),e.renderSlot(m.$slots,"body-append",e.normalizeProps(e.guardReactiveProps({items:e.unref(K),pagination:{isFirstPage:e.unref(Z),isLastPage:e.unref(Y),currentPaginationNumber:e.unref(j),maxPaginationNumber:e.unref(X),nextPage:e.unref(ee),prevPage:e.unref(te)},headers:e.unref(U)})),void 0,!0)],2)):e.createCommentVNode("",!0)]),e.unref(v)?(e.openBlock(),e.createElementBlock("div",xt,[Pt,e.createElementVNode("div",Nt,[e.unref(Et)?e.renderSlot(m.$slots,"loading",{key:0},void 0,!0):(e.openBlock(),e.createBlock(Ge,{key:1}))])])):e.createCommentVNode("",!0),!e.unref(K).length&&!e.unref(v)?(e.openBlock(),e.createElementBlock("div",St,e.toDisplayString(m.emptyMessage),1)):e.createCommentVNode("",!0)],2),m.hideFooter?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ct,[m.hideRowsPerPage?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Bt,[e.createTextVNode(e.toDisplayString(m.rowsPerPageMessage)+" ",1),e.createVNode(qe,{modelValue:e.unref(q),"onUpdate:modelValue":O[0]||(O[0]=c=>e.isRef(q)?q.value=c:null),"rows-items":e.unref(be)},null,8,["modelValue","rows-items"])])),e.createElementVNode("div",wt,e.toDisplayString(`${e.unref(ke)}\u2013${e.unref(xe)}`)+" "+e.toDisplayString(e.unref(re))+" "+e.toDisplayString(e.unref(oe)),1),e.unref($t)?e.renderSlot(m.$slots,"pagination",e.normalizeProps(e.mergeProps({key:1},{isFirstPage:e.unref(Z),isLastPage:e.unref(Y),currentPaginationNumber:e.unref(j),maxPaginationNumber:e.unref(X),nextPage:e.unref(ee),prevPage:e.unref(te)})),void 0,!0):(e.openBlock(),e.createBlock(at,{key:2,"is-first-page":e.unref(Z),"is-last-page":e.unref(Y),onClickNextPage:e.unref(ee),onClickPrevPage:e.unref(te)},e.createSlots({_:2},[m.buttonsPagination?{name:"buttonsPagination",fn:e.withCtx(()=>[e.createVNode(Ze,{"current-pagination-number":e.unref(j),"max-pagination-number":e.unref(X),onUpdatePage:e.unref(le)},null,8,["current-pagination-number","max-pagination-number","onUpdatePage"])])}:void 0]),1032,["is-first-page","is-last-page","onClickNextPage","onClickPrevPage"]))]))],2))}});var fe=S(It,[["__scopeId","data-v-3acd2d04"]]);return typeof window!="undefined"&&window.Vue&&window.Vue.createApp({}).component("Vue3EasyDataTable",fe),fe}); | ||
(function(e,w){typeof exports=="object"&&typeof module!="undefined"?module.exports=w(require("vue")):typeof define=="function"&&define.amd?define(["vue"],w):(e=typeof globalThis!="undefined"?globalThis:e||self,e["vue3-easy-data-table"]=w(e.Vue))})(this,function(e){"use strict";var Ut=Object.defineProperty,Gt=Object.defineProperties;var Kt=Object.getOwnPropertyDescriptors;var $e=Object.getOwnPropertySymbols;var Qt=Object.prototype.hasOwnProperty,Xt=Object.prototype.propertyIsEnumerable;var Ee=(e,w,S)=>w in e?Ut(e,w,{enumerable:!0,configurable:!0,writable:!0,value:S}):e[w]=S,z=(e,w)=>{for(var S in w||(w={}))Qt.call(w,S)&&Ee(e,S,w[S]);if($e)for(var S of $e(w))Xt.call(w,S)&&Ee(e,S,w[S]);return e},ae=(e,w)=>Gt(e,Kt(w));var w="",S=(n,l)=>{const t=n.__vccOpts||n;for(const[a,d]of l)t[a]=d;return t};const ve=n=>(e.pushScopeId("data-v-e0a0b7f0"),n=n(),e.popScopeId(),n),Ve=["onClick"],Ae=["checked"],Le=ve(()=>e.createElementVNode("label",{for:"checbox"},null,-1));var Fe=S(e.defineComponent({props:{status:{type:String,required:!0}},emits:["change"],setup(n,{emit:l}){const t=n;e.useCssVars(g=>({"51ab8a49":e.unref(s)}));const a=e.computed(()=>t.status==="allSelected"),d=()=>{l("change",!a.value)},s=e.inject("themeColor");return(g,o)=>(e.openBlock(),e.createElementBlock("div",{class:"easy-checkbox",onClick:e.withModifiers(d,["stop","prevent"])},[e.createElementVNode("input",{type:"checkbox",checked:e.unref(a),class:e.normalizeClass(n.status)},null,10,Ae),Le],8,Ve))}}),[["__scopeId","data-v-e0a0b7f0"]]),Zt="";const Re=n=>(e.pushScopeId("data-v-7e69a276"),n=n(),e.popScopeId(),n),Te=["checked"],De=Re(()=>e.createElementVNode("label",{for:"checbox"},null,-1));var ze=S(e.defineComponent({props:{checked:{type:Boolean,required:!0}},emits:["change"],setup(n,{emit:l}){e.useCssVars(a=>({fdaf7e9e:e.unref(t)}));const t=e.inject("themeColor");return(a,d)=>(e.openBlock(),e.createElementBlock("div",{class:"easy-checkbox",onClick:d[0]||(d[0]=e.withModifiers(s=>l("change"),["stop","prevent"]))},[e.createElementVNode("input",{type:"checkbox",checked:n.checked},null,8,Te),De]))}}),[["__scopeId","data-v-7e69a276"]]),ta="";const He=n=>(e.pushScopeId("data-v-09dad912"),n=n(),e.popScopeId(),n),Me={class:"easy-data-table__rows-selector"},Oe={class:"rows-input"},je=He(()=>e.createElementVNode("div",{class:"triangle"},null,-1)),We=["onClick"];var qe=S(e.defineComponent({props:{modelValue:{type:Number,required:!0},rowsItems:{type:Array,required:!0}},emits:["update:modelValue"],setup(n,{emit:l}){const t=n;e.useCssVars(p=>({"7fe9410c":e.unref(y)}));const a=e.ref(!1),d=e.ref(!1),s=e.inject("dataTable");e.watch(a,p=>{if(p&&s){const x=window.innerHeight,_=s.value.getBoundingClientRect().height,L=s.value.getBoundingClientRect().top;x-(_+L)<=100?d.value=!0:d.value=!1}});const g=e.computed({get:()=>t.modelValue,set:p=>{l("update:modelValue",p)}}),o=p=>{g.value=p,a.value=!1},r=(p,x)=>{let _=p.parentNode;for(;_!=null;){if(_.classList&&_.classList.contains(x))return!0;_=_.parentNode}return!1},i=p=>{r(p.target,"easy-data-table__rows-selector")||(a.value=!1)};e.onMounted(()=>{document.addEventListener("click",i)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",i)});const y=e.inject("themeColor");return(p,x)=>(e.openBlock(),e.createElementBlock("div",Me,[e.createElementVNode("div",{class:"rows-input__wrapper",onClick:x[0]||(x[0]=_=>a.value=!a.value)},[e.createElementVNode("div",Oe,e.toDisplayString(e.unref(g)),1),je]),e.createElementVNode("ul",{class:e.normalizeClass(["select-items",{show:a.value,inside:d.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.rowsItems,_=>(e.openBlock(),e.createElementBlock("li",{key:_,class:e.normalizeClass({selected:_===e.unref(g)}),onClick:L=>o(_)},e.toDisplayString(_),11,We))),128))],2)]))}}),[["__scopeId","data-v-09dad912"]]),na="";const ne=n=>(e.pushScopeId("data-v-1fa3a520"),n=n(),e.popScopeId(),n),Je={class:"lds-ring"},Ue=[ne(()=>e.createElementVNode("div",null,null,-1)),ne(()=>e.createElementVNode("div",null,null,-1)),ne(()=>e.createElementVNode("div",null,null,-1)),ne(()=>e.createElementVNode("div",null,null,-1))];var Ge=S(e.defineComponent({setup(n){e.useCssVars(t=>({"26774109":e.unref(l)}));const l=e.inject("themeColor");return(t,a)=>(e.openBlock(),e.createElementBlock("div",Je,Ue))}}),[["__scopeId","data-v-1fa3a520"]]),ca="";const Ke={class:"loader-line"};var Qe=S(e.defineComponent({setup(n){e.useCssVars(t=>({"0d327f57":e.unref(l)}));const l=e.inject("themeColor");return(t,a)=>(e.openBlock(),e.createElementBlock("div",Ke))}}),[["__scopeId","data-v-7d281cac"]]),ua="";const Xe={class:"buttons-pagination"},Ye=["onClick"];var Ze=S(e.defineComponent({props:{maxPaginationNumber:{type:Number,required:!0},currentPaginationNumber:{type:Number,required:!0}},emits:["updatePage"],setup(n,{emit:l}){const t=n;e.useCssVars(o=>({"40dd4f07":e.unref(g)}));const a=7,d=o=>{o.type==="button"&&!o.active&&l("updatePage",o.page)},s=e.computed(()=>{const o=[];if(t.maxPaginationNumber<=a)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<=a;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-(a-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<=a;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<=a;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-(a-r);o.push({type:"button",page:i,active:i===t.currentPaginationNumber,activePrev:i+1===t.currentPaginationNumber})}else for(let r=1;r<=a;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,y=t.currentPaginationNumber-i;o.push({type:"button",page:y,active:y===t.currentPaginationNumber,activePrev:y+1===t.currentPaginationNumber})}return o}),g=e.inject("themeColor");return(o,r)=>(e.openBlock(),e.createElementBlock("div",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),(i,y)=>(e.openBlock(),e.createElementBlock("div",{key:y,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:p=>d(i)},e.toDisplayString(i.type==="button"?i.page:"..."),11,Ye))),128))]))}}),[["__scopeId","data-v-4c681fa2"]]),fa="";const pe=n=>(e.pushScopeId("data-v-c9da5286"),n=n(),e.popScopeId(),n),et=[pe(()=>e.createElementVNode("span",{class:"arrow arrow-right"},null,-1))],tt=[pe(()=>e.createElementVNode("span",{class:"arrow arrow-left"},null,-1))];var at=S(e.defineComponent({props:{isFirstPage:{type:Boolean,required:!1},isLastPage:{type:Boolean,required:!1}},emits:["clickPrevPage","clickNextPage"],setup(n,{emit:l}){const t=e.useSlots();return(a,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["previous-page__click-button",{"first-page":n.isFirstPage}]),onClick:d[0]||(d[0]=s=>l("clickPrevPage"))},et,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":n.isLastPage}]),onClick:d[1]||(d[1]=s=>l("clickNextPage"))},tt,2)],64))}}),[["__scopeId","data-v-c9da5286"]]);function nt(n,l,t){return{clickRow:d=>{const s=z({},d);if(n.value){const{checkbox:g}=d;delete s.checkbox,s.isSelected=g}if(l.value){const{index:g}=d;delete s.index,s.indexInCurrentPage=g}t("clickRow",s)}}}function rt(n,l,t){const a=e.ref([]);return{expandingItemIndexList:a,updateExpandingItemIndexList:(g,o,r)=>{r.stopPropagation();const i=a.value.indexOf(g);if(i!==-1)a.value.splice(i,1);else{const y=n.value.findIndex(p=>JSON.stringify(p)===JSON.stringify(o));t("expandRow",l.value+y),a.value.push(l.value+y)}},clearExpandingItemIndexList:()=>{a.value=[]}}}function ot(n){const l=e.computed(()=>n.value.filter(d=>d.fixed)),t=e.computed(()=>l.value.length?l.value[l.value.length-1].value:""),a=e.computed(()=>{if(!l.value.length)return[];const d=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:d.reduce((i,y,p)=>{let x=i;return p<g&&(x+=y),x})}})});return{fixedHeaders:l,lastFixedColumn:t,fixedColumnsInfos:a}}function lt(n,l,t,a,d,s,g,o,r,i,y,p,x,_,L,b,B,T){const E=e.computed(()=>s.value.findIndex(h=>h.fixed)!==-1),u=e.computed(()=>E.value?s.value.filter(h=>h.fixed):[]),k=e.computed(()=>s.value.filter(h=>!h.fixed)),N=(h,v)=>Array.isArray(h)&&Array.isArray(v)?{sortBy:h,sortDesc:v.map(P=>P==="desc")}:h!==""?{sortBy:_.value,sortDesc:L.value==="desc"}:null,f=e.ref(N(_.value,L.value)),I=e.computed(()=>{var re;const v=[...u.value,...k.value].map(G=>{const $=Object.assign(G);if(b.value&&($.sortable=!0),$.sortable&&($.sortType="none"),p.value)if(Array.isArray(p.value.sortBy)&&Array.isArray(p.value.sortType)&&p.value.sortBy.includes($.value)){const H=p.value.sortBy.indexOf($.value);$.sortType=p.value.sortType[H]}else $.value===p.value.sortBy&&p.value.sortType&&($.sortType=p.value.sortType);if(f.value&&Array.isArray(f.value.sortBy)&&Array.isArray(f.value.sortDesc)&&f.value.sortBy.includes($.value)){const H=f.value.sortBy.indexOf($.value);$.sortType=f.value.sortDesc[H]?"desc":"asc"}else f.value&&$.value===f.value.sortBy&&($.sortType=f.value.sortDesc?"desc":"asc");return $});let P=[];g.value?P=[a.value||E.value?{text:"",value:"expand",fixed:!0,width:l.value}:{text:"",value:"expand"},...v]:P=v;let D=[];x.value?D=[d.value||E.value?{text:"#",value:"index",fixed:!0,width:o.value}:{text:"#",value:"index"},...P]:D=P;let K=[];return r.value?K=[t.value||E.value?{text:"checkbox",value:"checkbox",fixed:!0,width:(re=n.value)!=null?re:36}:{text:"checkbox",value:"checkbox"},...D]:K=D,K}),C=e.computed(()=>I.value.map(h=>h.value));return{clientSortOptions:f,headerColumns:C,headersForRender:I,updateSortField:(h,v)=>{let P=null;if(v==="none"?P="asc":v==="asc"?P="desc":P=y.value?"asc":null,i.value&&B(h,P),f.value&&Array.isArray(f.value.sortBy)&&Array.isArray(f.value.sortDesc)){const D=f.value.sortBy.indexOf(h);D===-1?P!==null&&(f.value.sortBy.push(h),f.value.sortDesc.push(P==="desc")):P===null?(f.value.sortDesc.splice(D,1),f.value.sortBy.splice(D,1)):f.value.sortDesc[D]=P==="desc"}else P===null?f.value=null:f.value={sortBy:h,sortDesc:P==="desc"};T("updateSort",{sortType:P,sortBy:h})},isMultiSorting:h=>p.value&&Array.isArray(p.value.sortBy)?p.value.sortBy.includes(h):f.value&&Array.isArray(f.value.sortBy)?f.value.sortBy.includes(h):!1,getMultiSortNumber:h=>p.value&&Array.isArray(p.value.sortBy)?p.value.sortBy.indexOf(h)+1:f.value&&Array.isArray(f.value.sortBy)?f.value.sortBy.indexOf(h)+1:!1}}function st(n,l,t,a,d,s,g,o,r){const i=e.computed(()=>(n.value-1)*d.value+1),y=e.computed(()=>t.value?Math.min(r.value,n.value*d.value):Math.min(o.value.length,n.value*d.value)),p=e.computed(()=>t.value?a.value:o.value.slice(i.value-1,y.value)),x=e.computed(()=>g.value?p.value.map((b,B)=>z({index:i.value+B},b)):p.value),_=e.computed(()=>s.value.length===0||s.value.every(B=>o.value.findIndex(T=>JSON.stringify(B)===JSON.stringify(T))===-1)?"noneSelected":s.value.length===o.value.length&&s.value.every(T=>o.value.findIndex(E=>JSON.stringify(T)===JSON.stringify(E))!==-1)?"allSelected":"partSelected"),L=e.computed(()=>l.value?_.value==="allSelected"?x.value.map(b=>z({checkbox:!0},b)):_.value==="noneSelected"?x.value.map(b=>z({checkbox:!1},b)):x.value.map(b=>{const B=s.value.findIndex(T=>{const E=z({},b);return delete E.index,JSON.stringify(T)===JSON.stringify(E)})!==-1;return z({checkbox:B},b)}):x.value);return{currentPageFirstIndex:i,currentPageLastIndex:y,multipleSelectStatus:_,pageItems:L}}function it(n,l,t,a,d,s,g){const o=e.ref(s.value?s.value.page:n.value),r=e.computed(()=>Math.ceil(a.value/d.value)),i=e.computed(()=>r.value===0||o.value===r.value),y=e.computed(()=>o.value===1);return{currentPaginationNumber:o,maxPaginationNumber:r,isLastPage:i,isFirstPage:y,nextPage:()=>{if(a.value!==0&&!i.value&&!t.value)if(l.value){const b=o.value+1;g(b)}else o.value+=1},prevPage:()=>{if(a.value!==0&&!y.value&&!t.value)if(l.value){const b=o.value-1;g(b)}else o.value-=1},updatePage:b=>{t.value||(l.value?g(b):o.value=b)},updateCurrentPaginationNumber:b=>{o.value=b}}}function ct(n,l,t,a){const d=e.computed(()=>!n.value&&l.value.findIndex(o=>o===a.value)===-1?[a.value,...l.value]:l.value),s=e.ref(t.value?t.value.rowsPerPage:a.value);return{rowsItemsComputed:d,rowsPerPageRef:s,updateRowsPerPage:o=>{s.value=o}}}function dt(n,l,t){const a=e.computed({get:()=>{if(n.value){const{page:o,rowsPerPage:r,sortBy:i,sortType:y}=n.value;return{page:o,rowsPerPage:r,sortBy:i!=null?i:null,sortType:y!=null?y:null}}return null},set:o=>{t("update:serverOptions",o)}});return{serverOptionsComputed:a,updateServerOptionsPage:o=>{a.value&&(a.value=ae(z({},a.value),{page:o}))},updateServerOptionsSort:(o,r)=>{if(a.value)if(l.value&&Array.isArray(a.value.sortBy)&&Array.isArray(a.value.sortType)){const i=a.value.sortBy.findIndex(y=>y===o);i===-1&&r!==null&&(a.value.sortBy.push(o),a.value.sortType.push(r)),r===null?(a.value.sortBy.splice(i,1),a.value.sortType.splice(i,1)):a.value.sortType[i]=r}else a.value=ae(z({},a.value),{sortBy:r!==null?o:null,sortType:r})},updateServerOptionsRowsPerPage:o=>{a.value&&(a.value=ae(z({},a.value),{page:1,rowsPerPage:o}))}}}function A(n,l){if(n.includes(".")){let t="";const a=n.split("."),{length:d}=a;let s=0;for(;s<d&&(t=s===0?l[a[s]]:t[a[s]],s+=1,t!==void 0););return t}return l[n]}function ut(n,l){const t=A(n,l);return Array.isArray(t)?t.join(","):t}function pt(n,l,t,a,d,s,g,o,r,i){const y=u=>{if(typeof s.value=="string"&&s.value!=="")return u[s.value];if(Array.isArray(s.value)){let k="";return s.value.forEach(N=>{k+=A(N,u)}),k}return Object.values(u).join(" ")},p=e.computed(()=>{if(!t.value&&g.value!==""){const u=new RegExp(g.value,"i");return a.value.filter(k=>u.test(y(k)))}return a.value}),x=e.computed(()=>{let u=[...p.value];return l.value?(l.value.forEach(k=>{u=u.filter(N=>{const{field:f,comparison:I,criteria:C}=k;if(typeof I=="function")return I(A(f,N),C);const R=A(f,N);switch(I){case"=":return R===C;case"!=":return R!==C;case">":return R>C;case"<":return R<C;case"<=":return R<=C;case">=":return R>=C;case"between":return R>=Math.min(...C)&&R<=Math.max(...C);default:return R===C}})}),u):p.value});e.watch(x,u=>{l.value&&i("updateFilter",u)},{immediate:!0,deep:!0});function _(u,k,N,f){const I=u[f],C=k[f];return(f===0?N:_(u,k,N,f-1)).sort((O,W)=>{let h=!0;for(let v=0;v<f;v+=1)if(A(u[v],O)!==A(u[v],W)){h=!1;break}return h?A(I,O)<A(I,W)?C?1:-1:A(I,O)>A(I,W)?C?-1:1:0:0})}const L=e.computed(()=>{if(t.value)return a.value;if(n.value===null)return x.value;const{sortBy:u,sortDesc:k}=n.value,N=[...x.value];return r&&Array.isArray(u)&&Array.isArray(k)?u.length===0?N:_(u,k,N,u.length-1):N.sort((f,I)=>A(u,f)<A(u,I)?k?1:-1:A(u,f)>A(u,I)?k?-1:1:0)}),b=e.computed(()=>t.value?o.value:L.value.length),B=e.computed({get:()=>{var u;return(u=d.value)!=null?u:[]},set:u=>{i("update:itemsSelected",u)}});return{totalItems:L,selectItemsComputed:B,totalItemsLength:b,toggleSelectAll:u=>{B.value=u?L.value:[]},toggleSelectItem:u=>{const k=u.checkbox;if(delete u.checkbox,delete u.index,k)B.value=B.value.filter(N=>JSON.stringify(N)!==JSON.stringify(u));else{const N=B.value;N.unshift(u),B.value=N}}}}var ft={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,deault:!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:""},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"}},ha="",_a="";const mt=n=>(e.pushScopeId("data-v-45dd6be9"),n=n(),e.popScopeId(),n),gt=["onClick"],yt={key:1,class:"header-text"},ht={key:3,class:"multi-sort__number"},_t=["onClick"],bt=["onClick"],xt=["colspan"],kt={key:0,class:"vue3-easy-data-table__loading"},Pt=mt(()=>e.createElementVNode("div",{class:"vue3-easy-data-table__loading-mask"},null,-1)),Nt={class:"loading-entity"},St={key:1,class:"vue3-easy-data-table__message"},Ct={key:0,class:"vue3-easy-data-table__footer"},Bt={key:0,class:"pagination__rows-per-page"},wt={class:"pagination__items-index"},It=e.defineComponent({props:ae(z({},ft),{items:{type:Array,required:!0},headers:{type:Array,required:!0}}),emits:["clickRow","expandRow","updateSort","updateFilter","update:itemsSelected","update:serverOptions"],setup(n,{expose:l,emit:t}){const a=n;e.useCssVars(m=>({"2b98f82c":e.unref($),"2215e046":e.unref(G)}));const{bodyTextDirection:d,checkboxColumnWidth:s,currentPage:g,expandColumnWidth:o,filterOptions:r,fixedCheckbox:i,fixedExpand:y,fixedHeader:p,fixedIndex:x,headers:_,headerTextDirection:L,indexColumnWidth:b,items:B,itemsSelected:T,loading:E,mustSort:u,multiSort:k,rowsItems:N,rowsPerPage:f,searchField:I,searchValue:C,serverItemsLength:R,serverOptions:O,showIndex:W,sortBy:h,sortType:v,tableHeight:P,tableMinHeight:D,themeColor:K,rowsOfPageSeparatorMessage:re}=e.toRefs(a),G=e.computed(()=>P.value?`${P.value}px`:null),$=e.computed(()=>`${D.value}px`);e.provide("themeColor",K.value);const H=e.useSlots(),$t=e.computed(()=>!!H.pagination),Et=e.computed(()=>!!H.loading),me=e.computed(()=>!!H.expand),ge=e.ref(),ie=e.ref();e.provide("dataTable",ge);const ye=e.ref(!1);e.onMounted(()=>{ie.value.addEventListener("scroll",()=>{ye.value=ie.value.scrollLeft>0})});const ce=e.computed(()=>T.value!==null),J=e.computed(()=>O.value!==null),{serverOptionsComputed:de,updateServerOptionsPage:vt,updateServerOptionsSort:Vt,updateServerOptionsRowsPerPage:At}=dt(O,k,t),{clientSortOptions:he,headerColumns:_e,headersForRender:U,updateSortField:Lt,isMultiSorting:Ft,getMultiSortNumber:Rt}=lt(s,o,i,y,x,_,me,b,ce,J,u,de,W,h,v,k,Vt,t),{rowsItemsComputed:be,rowsPerPageRef:q,updateRowsPerPage:Tt}=ct(J,N,O,f),{totalItems:Dt,selectItemsComputed:zt,totalItemsLength:oe,toggleSelectAll:Ht,toggleSelectItem:Mt}=pt(he,r,J,B,T,I,C,R,k,t),{currentPaginationNumber:j,maxPaginationNumber:Q,isLastPage:X,isFirstPage:Y,nextPage:Z,prevPage:ee,updatePage:le,updateCurrentPaginationNumber:Ot}=it(g,J,E,oe,q,O,vt),{currentPageFirstIndex:xe,currentPageLastIndex:ke,multipleSelectStatus:Pe,pageItems:te}=st(j,ce,J,B,q,zt,W,Dt,oe),se=e.computed(()=>j.value===0?0:(j.value-1)*q.value),{expandingItemIndexList:Ne,updateExpandingItemIndexList:jt,clearExpandingItemIndexList:Se}=rt(te,se,t),{fixedHeaders:ue,lastFixedColumn:Ce,fixedColumnsInfos:Wt}=ot(U),{clickRow:qt}=nt(ce,W,t),Jt=m=>{var c;const M=(c=m.width)!=null?c:ue.value.length?100:null;if(M)return`width: ${M}px; min-width: ${M}px;`},Be=(m,M="th")=>{if(!ue.value.length)return;const c=Wt.value.find(F=>F.value===m);if(c)return`left: ${c.distance}px;z-index: ${M==="th"?3:1};position: sticky;`};return e.watch(E,(m,M)=>{de.value&&m===!1&&M===!0&&(Ot(de.value.page),Se())}),e.watch(q,m=>{J.value?At(m):le(1)}),e.watch(C,()=>{J.value||le(1)}),e.watch([j,he,I,C,r],()=>{Se()},{deep:!0}),l({currentPageFirstIndex:xe,currentPageLastIndex:ke,clientItemsLength:oe,maxPaginationNumber:Q,currentPaginationNumber:j,isLastPage:X,isFirstPage:Y,nextPage:Z,prevPage:ee,updatePage:le,rowsPerPageOptions:be,rowsPerPageActiveOption:q,updateRowsPerPageActiveOption:Tt}),(m,M)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dataTable",ref:ge,class:e.normalizeClass(["vue3-easy-data-table",[m.tableClassName]])},[e.createElementVNode("div",{ref_key:"tableBody",ref:ie,class:e.normalizeClass(["vue3-easy-data-table__main",{"fixed-header":e.unref(p),"fixed-height":e.unref(P),"show-shadow":ye.value,"table-fixed":e.unref(ue).length,hoverable:!m.noHover,"border-cell":m.borderCell}])},[e.createElementVNode("table",null,[e.createElementVNode("colgroup",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(U),(c,F)=>(e.openBlock(),e.createElementBlock("col",{key:F,style:e.normalizeStyle(Jt(c))},null,4))),128))]),e.unref(U).length&&!m.hideHeader?(e.openBlock(),e.createElementBlock("thead",{key:0,class:e.normalizeClass(["vue3-easy-data-table__header",[m.headerClassName]])},[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(U),(c,F)=>(e.openBlock(),e.createElementBlock("th",{key:F,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(Ce)},typeof m.headerItemClassName=="string"?m.headerItemClassName:m.headerItemClassName(c,F)]),style:e.normalizeStyle(Be(c.value)),onClick:e.withModifiers(V=>c.sortable&&c.sortType?e.unref(Lt)(c.value,c.sortType):null,["stop"])},[c.text==="checkbox"?(e.openBlock(),e.createBlock(Fe,{key:e.unref(Pe),status:e.unref(Pe),onChange:e.unref(Ht)},null,8,["status","onChange"])):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["header",`direction-${e.unref(L)}`])},[e.unref(H)[`header-${c.value}`]?e.renderSlot(m.$slots,`header-${c.value}`,e.normalizeProps(e.mergeProps({key:0},c)),void 0,!0):(e.openBlock(),e.createElementBlock("span",yt,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(Ft)(c.value)?(e.openBlock(),e.createElementBlock("span",ht,e.toDisplayString(e.unref(Rt)(c.value)),1)):e.createCommentVNode("",!0)],2))],14,gt))),128))])],2)):e.createCommentVNode("",!0),e.unref(_e).length?(e.openBlock(),e.createElementBlock("tbody",{key:1,class:e.normalizeClass(["vue3-easy-data-table__body",{"row-alternation":m.alternating}])},[e.renderSlot(m.$slots,"body-prepend",e.normalizeProps(e.guardReactiveProps({items:e.unref(te),pagination:{isFirstPage:e.unref(Y),isLastPage:e.unref(X),currentPaginationNumber:e.unref(j),maxPaginationNumber:e.unref(Q),nextPage:e.unref(Z),prevPage:e.unref(ee)},headers:e.unref(U)})),void 0,!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(te),(c,F)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:F},[e.createElementVNode("tr",{class:e.normalizeClass([{"even-row":(F+1)%2===0},typeof m.bodyRowClassName=="string"?m.bodyRowClassName:m.bodyRowClassName(c,F)]),onClick:V=>e.unref(qt)(c)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(_e),(V,we)=>(e.openBlock(),e.createElementBlock("td",{key:we,style:e.normalizeStyle(Be(V,"td")),class:e.normalizeClass([{shadow:V===e.unref(Ce),"can-expand":V==="expand"},typeof m.bodyItemClassName=="string"?m.bodyItemClassName:m.bodyItemClassName(V,we),`direction-${e.unref(d)}`]),onClick:Ie=>V==="expand"?e.unref(jt)(F+e.unref(se),c,Ie):null},[e.unref(H)[`item-${V}`]?e.renderSlot(m.$slots,`item-${V}`,e.normalizeProps(e.mergeProps({key:0},c)),void 0,!0):e.unref(H)[`item-${V.toLowerCase()}`]?e.renderSlot(m.$slots,`item-${V.toLowerCase()}`,e.normalizeProps(e.mergeProps({key:1},c)),void 0,!0):V==="expand"?(e.openBlock(),e.createElementBlock("i",{key:2,class:e.normalizeClass(["expand-icon",{expanding:e.unref(Ne).includes(e.unref(se)+F)}])},null,2)):V==="checkbox"?(e.openBlock(),e.createBlock(ze,{key:3,checked:c[V],onChange:Ie=>e.unref(Mt)(c)},null,8,["checked","onChange"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createTextVNode(e.toDisplayString(e.unref(ut)(V,c)),1)],64))],14,bt))),128))],10,_t),e.unref(me)&&e.unref(Ne).includes(F+e.unref(se))?(e.openBlock(),e.createElementBlock("tr",{key:0,class:e.normalizeClass({"even-row":(F+1)%2===0})},[e.createElementVNode("td",{colspan:e.unref(U).length,class:"expand"},[c.expandLoading?(e.openBlock(),e.createBlock(Qe,{key:0,class:"expand-loading"})):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"expand",e.normalizeProps(e.guardReactiveProps(c)),void 0,!0)],8,xt)],2)):e.createCommentVNode("",!0)],64))),128)),e.renderSlot(m.$slots,"body-append",e.normalizeProps(e.guardReactiveProps({items:e.unref(te),pagination:{isFirstPage:e.unref(Y),isLastPage:e.unref(X),currentPaginationNumber:e.unref(j),maxPaginationNumber:e.unref(Q),nextPage:e.unref(Z),prevPage:e.unref(ee)},headers:e.unref(U)})),void 0,!0)],2)):e.createCommentVNode("",!0)]),e.unref(E)?(e.openBlock(),e.createElementBlock("div",kt,[Pt,e.createElementVNode("div",Nt,[e.unref(Et)?e.renderSlot(m.$slots,"loading",{key:0},void 0,!0):(e.openBlock(),e.createBlock(Ge,{key:1}))])])):e.createCommentVNode("",!0),!e.unref(te).length&&!e.unref(E)?(e.openBlock(),e.createElementBlock("div",St,e.toDisplayString(m.emptyMessage),1)):e.createCommentVNode("",!0)],2),m.hideFooter?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ct,[m.hideRowsPerPage?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Bt,[e.createTextVNode(e.toDisplayString(m.rowsPerPageMessage)+" ",1),e.createVNode(qe,{modelValue:e.unref(q),"onUpdate:modelValue":M[0]||(M[0]=c=>e.isRef(q)?q.value=c:null),"rows-items":e.unref(be)},null,8,["modelValue","rows-items"])])),e.createElementVNode("div",wt,e.toDisplayString(`${e.unref(xe)}\u2013${e.unref(ke)}`)+" "+e.toDisplayString(e.unref(re))+" "+e.toDisplayString(e.unref(oe)),1),e.unref($t)?e.renderSlot(m.$slots,"pagination",e.normalizeProps(e.mergeProps({key:1},{isFirstPage:e.unref(Y),isLastPage:e.unref(X),currentPaginationNumber:e.unref(j),maxPaginationNumber:e.unref(Q),nextPage:e.unref(Z),prevPage:e.unref(ee)})),void 0,!0):(e.openBlock(),e.createBlock(at,{key:2,"is-first-page":e.unref(Y),"is-last-page":e.unref(X),onClickNextPage:e.unref(Z),onClickPrevPage:e.unref(ee)},e.createSlots({_:2},[m.buttonsPagination?{name:"buttonsPagination",fn:e.withCtx(()=>[e.createVNode(Ze,{"current-pagination-number":e.unref(j),"max-pagination-number":e.unref(Q),onUpdatePage:e.unref(le)},null,8,["current-pagination-number","max-pagination-number","onUpdatePage"])])}:void 0]),1032,["is-first-page","is-last-page","onClickNextPage","onClickPrevPage"]))]))],2))}});var fe=S(It,[["__scopeId","data-v-45dd6be9"]]);return typeof window!="undefined"&&window.Vue&&window.Vue.createApp({}).component("Vue3EasyDataTable",fe),fe}); |
@@ -6,3 +6,3 @@ { | ||
"private": false, | ||
"version": "1.5.9", | ||
"version": "1.5.10", | ||
"types": "./types/main.d.ts", | ||
@@ -9,0 +9,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
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
1815
114769