Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue3-easy-data-table

Package Overview
Dependencies
Maintainers
1
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue3-easy-data-table - npm Package Compare versions

Comparing version 1.5.7 to 1.5.8

21

dist/vue3-easy-data-table.es.js

@@ -1168,3 +1168,3 @@ var __defProp = Object.defineProperty;

var DataTable_vue_vue_type_style_index_1_scoped_true_lang = "";
const _withScopeId = (n) => (pushScopeId("data-v-8c691ab2"), n = n(), popScopeId(), n);
const _withScopeId = (n) => (pushScopeId("data-v-145f9328"), n = n(), popScopeId(), n);
const _hoisted_1 = ["onClick"];

@@ -1222,4 +1222,4 @@ const _hoisted_2 = {

useCssVars((_ctx) => ({
"0f3c39d7": unref(tableMinHeightPx),
"4ae9b979": unref(tableHeightPx)
"e4f4e746": unref(tableMinHeightPx),
"c9b2369a": unref(tableHeightPx)
}));

@@ -1367,2 +1367,7 @@ const {

});
watch(searchValue, () => {
if (!isServerSideMode.value) {
updatePage(1);
}
});
watch([currentPaginationNumber, clientSortOptions, searchField, searchValue, filterOptions], () => {

@@ -1485,10 +1490,10 @@ clearExpandingItemIndexList();

}, [
unref(slots)[`item-${column}`] ? renderSlot(_ctx.$slots, `item-${column}`, normalizeProps(mergeProps({ key: 0 }, item)), void 0, true) : column === "expand" ? (openBlock(), createElementBlock("i", {
key: 1,
unref(slots)[`item-${column}`] ? renderSlot(_ctx.$slots, `item-${column}`, normalizeProps(mergeProps({ key: 0 }, item)), void 0, true) : unref(slots)[`item-${column.toLowerCase()}`] ? renderSlot(_ctx.$slots, `item-${column.toLowerCase()}`, normalizeProps(mergeProps({ key: 1 }, item)), void 0, true) : column === "expand" ? (openBlock(), createElementBlock("i", {
key: 2,
class: normalizeClass(["expand-icon", { "expanding": unref(expandingItemIndexList).includes(unref(prevPageEndIndex) + index) }])
}, null, 2)) : column === "checkbox" ? (openBlock(), createBlock(SingleSelectCheckBox, {
key: 2,
key: 3,
checked: item[column],
onChange: ($event) => unref(toggleSelectItem)(item)
}, null, 8, ["checked", "onChange"])) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [
}, null, 8, ["checked", "onChange"])) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [
createTextVNode(toDisplayString(unref(generateColumnContent)(column, item)), 1)

@@ -1578,3 +1583,3 @@ ], 64))

});
var DataTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8c691ab2"]]);
var DataTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-145f9328"]]);
if (typeof window !== "undefined" && window.Vue) {

@@ -1581,0 +1586,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 Ut=Object.defineProperty,Gt=Object.defineProperties;var Kt=Object.getOwnPropertyDescriptors;var Ee=Object.getOwnPropertySymbols;var Qt=Object.prototype.hasOwnProperty,Xt=Object.prototype.propertyIsEnumerable;var $e=(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)&&$e(e,S,w[S]);if(Ee)for(var S of Ee(w))Xt.call(w,S)&&$e(e,S,w[S]);return e},ae=(e,w)=>Gt(e,Kt(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"]]),Zt="";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"]]),ta="";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 k=window.innerHeight,_=l.value.getBoundingClientRect().height,A=l.value.getBoundingClientRect().top;k-(_+A)<=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,k)=>{let _=u.parentNode;for(;_!=null;){if(_.classList&&_.classList.contains(k))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,k)=>(e.openBlock(),e.createElementBlock("div",Oe,[e.createElementVNode("div",{class:"rows-input__wrapper",onClick:k[0]||(k[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:A=>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(s)}));const s=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(s)}));const s=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: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"]]),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: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=z({},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 k=i;return u<g&&(k+=y),k})}})});return{fixedHeaders:s,lastFixedColumn:t,fixedColumnsInfos:a}}function lt(n,s,t,a,d,l,g,o,r,i,y,u,k,_,A,b,C,F){const $=e.computed(()=>l.value.findIndex(h=>h.fixed)!==-1),f=e.computed(()=>$.value?l.value.filter(h=>h.fixed):[]),x=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:A.value==="desc"}:null,p=e.ref(N(_.value,A.value)),I=e.computed(()=>{var re;const v=[...f.value,...x.value].map(U=>{const E=Object.assign(U);if(b.value&&(E.sortable=!0),E.sortable&&(E.sortType="none"),u.value)if(Array.isArray(u.value.sortBy)&&Array.isArray(u.value.sortType)&&u.value.sortBy.includes(E.value)){const M=u.value.sortBy.indexOf(E.value);E.sortType=u.value.sortType[M]}else E.value===u.value.sortBy&&u.value.sortType&&(E.sortType=u.value.sortType);if(p.value&&Array.isArray(p.value.sortBy)&&Array.isArray(p.value.sortDesc)&&p.value.sortBy.includes(E.value)){const M=p.value.sortBy.indexOf(E.value);E.sortType=p.value.sortDesc[M]?"desc":"asc"}else p.value&&E.value===p.value.sortBy&&(E.sortType=p.value.sortDesc?"desc":"asc");return E});let P=[];g.value?P=[a.value||$.value?{text:"",value:"expand",fixed:!0,width:s.value}:{text:"",value:"expand"},...v]:P=v;let D=[];k.value?D=[d.value||$.value?{text:"#",value:"index",fixed:!0,width:o.value}:{text:"#",value:"index"},...P]:D=P;let K=[];return r.value?K=[t.value||$.value?{text:"checkbox",value:"checkbox",fixed:!0,width:(re=n.value)!=null?re:36}:{text:"checkbox",value:"checkbox"},...D]:K=D,K}),B=e.computed(()=>I.value.map(h=>h.value));return{clientSortOptions:p,headerColumns:B,headersForRender:I,updateSortField:(h,v)=>{let P=null;if(v==="none"?P="asc":v==="asc"?P="desc":P=y.value?"asc":null,i.value&&C(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)),k=e.computed(()=>g.value?u.value.map((b,C)=>z({index:i.value+C},b)):u.value),_=e.computed(()=>l.value.length===0||l.value.every(C=>o.value.findIndex(F=>JSON.stringify(C)===JSON.stringify(F))===-1)?"noneSelected":l.value.length===o.value.length&&l.value.every(F=>o.value.findIndex($=>JSON.stringify(F)===JSON.stringify($))!==-1)?"allSelected":"partSelected"),A=e.computed(()=>s.value?_.value==="allSelected"?k.value.map(b=>z({checkbox:!0},b)):_.value==="noneSelected"?k.value.map(b=>z({checkbox:!1},b)):k.value.map(b=>{const C=l.value.findIndex(F=>{const $=z({},b);return delete $.index,JSON.stringify(F)===JSON.stringify($)})!==-1;return z({checkbox:C},b)}):k.value);return{currentPageFirstIndex:i,currentPageLastIndex:y,multipleSelectStatus:_,pageItems:A}}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(z({},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(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 V(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=V(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 f[l.value];if(Array.isArray(l.value)){let x="";return l.value.forEach(N=>{x+=V(N,f)}),x}return Object.values(f).join(" ")},u=e.computed(()=>{if(!t.value&&g.value!==""){const f=new RegExp(g.value,"i");return a.value.filter(x=>f.test(y(x)))}return a.value}),k=e.computed(()=>{let f=[...u.value];return s.value?(s.value.forEach(x=>{f=f.filter(N=>{const{field:p,comparison:I,criteria:B}=x;if(typeof I=="function")return I(V(p,N),B);const R=V(p,N);switch(I){case"=":return R===B;case"!=":return R!==B;case">":return R>B;case"<":return R<B;case"<=":return R<=B;case">=":return R>=B;case"between":return R>=Math.min(...B)&&R<=Math.max(...B);default:return R===B}})}),f):u.value});function _(f,x,N,p){const I=f[p],B=x[p];return(p===0?N:_(f,x,N,p-1)).sort((O,W)=>{let h=!0;for(let v=0;v<p;v+=1)if(V(f[v],O)!==V(f[v],W)){h=!1;break}return h?V(I,O)<V(I,W)?B?1:-1:V(I,O)>V(I,W)?B?-1:1:0:0})}const A=e.computed(()=>{if(t.value)return a.value;if(n.value===null)return k.value;const{sortBy:f,sortDesc:x}=n.value,N=[...k.value];return r&&Array.isArray(f)&&Array.isArray(x)?f.length===0?N:_(f,x,N,f.length-1):N.sort((p,I)=>V(f,p)<V(f,I)?x?1:-1:V(f,p)>V(f,I)?x?-1:1:0)}),b=e.computed(()=>t.value?o.value:A.value.length),C=e.computed({get:()=>{var f;return(f=d.value)!=null?f:[]},set:f=>{i("update:itemsSelected",f)}});return{totalItems:A,selectItemsComputed:C,totalItemsLength:b,toggleSelectAll:f=>{C.value=f?A.value:[]},toggleSelectItem:f=>{const x=f.checkbox;if(delete f.checkbox,delete f.index,x)C.value=C.value.filter(N=>JSON.stringify(N)!==JSON.stringify(f));else{const N=C.value;N.unshift(f),C.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-8c691ab2"),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","update:itemsSelected","update:serverOptions"],setup(n,{expose:s,emit:t}){const a=n;e.useCssVars(m=>({"0f3c39d7":e.unref(E),"4ae9b979":e.unref(U)}));const{bodyTextDirection:d,checkboxColumnWidth:l,currentPage:g,expandColumnWidth:o,filterOptions:r,fixedCheckbox:i,fixedExpand:y,fixedHeader:u,fixedIndex:k,headers:_,headerTextDirection:A,indexColumnWidth:b,items:C,itemsSelected:F,loading:$,mustSort:f,multiSort:x,rowsItems:N,rowsPerPage:p,searchField:I,searchValue:B,serverItemsLength:R,serverOptions:O,showIndex:W,sortBy:h,sortType:v,tableHeight:P,tableMinHeight:D,themeColor:K,rowsOfPageSeparatorMessage:re}=e.toRefs(a),U=e.computed(()=>P.value?`${P.value}px`:null),E=e.computed(()=>`${D.value}px`);e.provide("themeColor",K.value);const M=e.useSlots(),Et=e.computed(()=>!!M.pagination),$t=e.computed(()=>!!M.loading),me=e.computed(()=>!!M.expand),ge=e.ref(),se=e.ref();e.provide("dataTable",ge);const ye=e.ref(!1);e.onMounted(()=>{se.value.addEventListener("scroll",()=>{ye.value=se.value.scrollLeft>0})});const ie=e.computed(()=>F.value!==null),G=e.computed(()=>O.value!==null),{serverOptionsComputed:ce,updateServerOptionsPage:vt,updateServerOptionsSort:Vt,updateServerOptionsRowsPerPage:At}=dt(O,x,t),{clientSortOptions:he,headerColumns:_e,headersForRender:J,updateSortField:Lt,isMultiSorting:Rt,getMultiSortNumber:Tt}=lt(l,o,i,y,k,_,me,b,ie,G,f,ce,W,h,v,x,Vt,t),{rowsItemsComputed:be,rowsPerPageRef:q,updateRowsPerPage:Ft}=ct(G,N,O,p),{totalItems:Dt,selectItemsComputed:zt,totalItemsLength:oe,toggleSelectAll:Ht,toggleSelectItem:Ot}=pt(he,r,G,C,F,I,B,R,x,t),{currentPaginationNumber:j,maxPaginationNumber:Q,isLastPage:X,isFirstPage:Y,nextPage:Z,prevPage:ee,updatePage:de,updateCurrentPaginationNumber:Mt}=it(g,G,$,oe,q,O,vt),{currentPageFirstIndex:xe,currentPageLastIndex:ke,multipleSelectStatus:Pe,pageItems:te}=st(j,ie,G,C,q,zt,W,Dt,oe),le=e.computed(()=>j.value===0?0:(j.value-1)*q.value),{expandingItemIndexList:Ne,updateExpandingItemIndexList:jt,clearExpandingItemIndexList:Se}=rt(te,le,t),{fixedHeaders:ue,lastFixedColumn:Ce,fixedColumnsInfos:Wt}=ot(J),{clickRow:qt}=nt(ie,W,t),Jt=m=>{var c;const H=(c=m.width)!=null?c:ue.value.length?100:null;if(H)return`width: ${H}px; min-width: ${H}px;`},Be=(m,H="th")=>{if(!ue.value.length)return;const c=Wt.value.find(L=>L.value===m);if(c)return`left: ${c.distance}px;z-index: ${H==="th"?3:1};position: sticky;`};return e.watch($,(m,H)=>{ce.value&&m===!1&&H===!0&&(Mt(ce.value.page),Se())}),e.watch(q,m=>{G.value?At(m):de(1)}),e.watch([j,he,I,B,r],()=>{Se()},{deep:!0}),s({currentPageFirstIndex:xe,currentPageLastIndex:ke,clientItemsLength:oe,maxPaginationNumber:Q,currentPaginationNumber:j,isLastPage:X,isFirstPage:Y,nextPage:Z,prevPage:ee,updatePage:de,rowsPerPageOptions:be,rowsPerPageActiveOption:q,updateRowsPerPageActiveOption:Ft}),(m,H)=>(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:se,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(J),(c,L)=>(e.openBlock(),e.createElementBlock("col",{key:L,style:e.normalizeStyle(Jt(c))},null,4))),128))]),e.unref(J).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(J),(c,L)=>(e.openBlock(),e.createElementBlock("th",{key:L,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,L)]),style:e.normalizeStyle(Be(c.value)),onClick:e.withModifiers(T=>c.sortable&&c.sortType?e.unref(Lt)(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(Ht)},null,8,["status","onChange"])):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["header",`direction-${e.unref(A)}`])},[e.unref(M)[`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(x)&&e.unref(Rt)(c.value)?(e.openBlock(),e.createElementBlock("span",ht,e.toDisplayString(e.unref(Tt)(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(J)})),void 0,!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(te),(c,L)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:L},[e.createElementVNode("tr",{class:e.normalizeClass([{"even-row":(L+1)%2===0},typeof m.bodyRowClassName=="string"?m.bodyRowClassName:m.bodyRowClassName(c,L)]),onClick:T=>e.unref(qt)(c)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(_e),(T,we)=>(e.openBlock(),e.createElementBlock("td",{key:we,style:e.normalizeStyle(Be(T,"td")),class:e.normalizeClass([{shadow:T===e.unref(Ce),"can-expand":T==="expand"},typeof m.bodyItemClassName=="string"?m.bodyItemClassName:m.bodyItemClassName(T,we),`direction-${e.unref(d)}`]),onClick:Ie=>T==="expand"?e.unref(jt)(L+e.unref(le),c,Ie):null},[e.unref(M)[`item-${T}`]?e.renderSlot(m.$slots,`item-${T}`,e.normalizeProps(e.mergeProps({key:0},c)),void 0,!0):T==="expand"?(e.openBlock(),e.createElementBlock("i",{key:1,class:e.normalizeClass(["expand-icon",{expanding:e.unref(Ne).includes(e.unref(le)+L)}])},null,2)):T==="checkbox"?(e.openBlock(),e.createBlock(ze,{key:2,checked:c[T],onChange:Ie=>e.unref(Ot)(c)},null,8,["checked","onChange"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createTextVNode(e.toDisplayString(e.unref(ut)(T,c)),1)],64))],14,bt))),128))],10,_t),e.unref(me)&&e.unref(Ne).includes(L+e.unref(le))?(e.openBlock(),e.createElementBlock("tr",{key:0,class:e.normalizeClass({"even-row":(L+1)%2===0})},[e.createElementVNode("td",{colspan:e.unref(J).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(J)})),void 0,!0)],2)):e.createCommentVNode("",!0)]),e.unref($)?(e.openBlock(),e.createElementBlock("div",kt,[Pt,e.createElementVNode("div",Nt,[e.unref($t)?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.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":H[0]||(H[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(Et)?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(de)},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-8c691ab2"]]);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,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"]]),Zt="";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"]]),ta="";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 k=window.innerHeight,_=l.value.getBoundingClientRect().height,L=l.value.getBoundingClientRect().top;k-(_+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,k)=>{let _=u.parentNode;for(;_!=null;){if(_.classList&&_.classList.contains(k))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,k)=>(e.openBlock(),e.createElementBlock("div",Oe,[e.createElementVNode("div",{class:"rows-input__wrapper",onClick:k[0]||(k[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"]]),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(s)}));const s=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(s)}));const s=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: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"]]),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: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=z({},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 k=i;return u<g&&(k+=y),k})}})});return{fixedHeaders:s,lastFixedColumn:t,fixedColumnsInfos:a}}function lt(n,s,t,a,d,l,g,o,r,i,y,u,k,_,L,b,B,F){const E=e.computed(()=>l.value.findIndex(h=>h.fixed)!==-1),f=e.computed(()=>E.value?l.value.filter(h=>h.fixed):[]),x=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,...x.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 H=u.value.sortBy.indexOf($.value);$.sortType=u.value.sortType[H]}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 H=p.value.sortBy.indexOf($.value);$.sortType=p.value.sortDesc[H]?"desc":"asc"}else p.value&&$.value===p.value.sortBy&&($.sortType=p.value.sortDesc?"desc":"asc");return $});let P=[];g.value?P=[a.value||E.value?{text:"",value:"expand",fixed:!0,width:s.value}:{text:"",value:"expand"},...v]:P=v;let D=[];k.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: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)),k=e.computed(()=>g.value?u.value.map((b,B)=>z({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(E=>JSON.stringify(F)===JSON.stringify(E))!==-1)?"allSelected":"partSelected"),L=e.computed(()=>s.value?_.value==="allSelected"?k.value.map(b=>z({checkbox:!0},b)):_.value==="noneSelected"?k.value.map(b=>z({checkbox:!1},b)):k.value.map(b=>{const B=l.value.findIndex(F=>{const E=z({},b);return delete E.index,JSON.stringify(F)===JSON.stringify(E)})!==-1;return z({checkbox:B},b)}):k.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(z({},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(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,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=A(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 f[l.value];if(Array.isArray(l.value)){let x="";return l.value.forEach(N=>{x+=A(N,f)}),x}return Object.values(f).join(" ")},u=e.computed(()=>{if(!t.value&&g.value!==""){const f=new RegExp(g.value,"i");return a.value.filter(x=>f.test(y(x)))}return a.value}),k=e.computed(()=>{let f=[...u.value];return s.value?(s.value.forEach(x=>{f=f.filter(N=>{const{field:p,comparison:I,criteria:C}=x;if(typeof I=="function")return I(A(p,N),C);const T=A(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,x,N,p){const I=f[p],C=x[p];return(p===0?N:_(f,x,N,p-1)).sort((M,W)=>{let h=!0;for(let v=0;v<p;v+=1)if(A(f[v],M)!==A(f[v],W)){h=!1;break}return h?A(I,M)<A(I,W)?C?1:-1:A(I,M)>A(I,W)?C?-1:1:0:0})}const L=e.computed(()=>{if(t.value)return a.value;if(n.value===null)return k.value;const{sortBy:f,sortDesc:x}=n.value,N=[...k.value];return r&&Array.isArray(f)&&Array.isArray(x)?f.length===0?N:_(f,x,N,f.length-1):N.sort((p,I)=>A(f,p)<A(f,I)?x?1:-1:A(f,p)>A(f,I)?x?-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 x=f.checkbox;if(delete f.checkbox,delete f.index,x)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"}},ha="",_a="";const mt=n=>(e.pushScopeId("data-v-145f9328"),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","update:itemsSelected","update:serverOptions"],setup(n,{expose:s,emit:t}){const a=n;e.useCssVars(m=>({e4f4e746:e.unref($),c9b2369a:e.unref(G)}));const{bodyTextDirection:d,checkboxColumnWidth:l,currentPage:g,expandColumnWidth:o,filterOptions:r,fixedCheckbox:i,fixedExpand:y,fixedHeader:u,fixedIndex:k,headers:_,headerTextDirection:L,indexColumnWidth:b,items:B,itemsSelected:F,loading:E,mustSort:f,multiSort:x,rowsItems:N,rowsPerPage:p,searchField:I,searchValue:C,serverItemsLength:T,serverOptions:M,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(()=>F.value!==null),J=e.computed(()=>M.value!==null),{serverOptionsComputed:de,updateServerOptionsPage:vt,updateServerOptionsSort:Vt,updateServerOptionsRowsPerPage:At}=dt(M,x,t),{clientSortOptions:he,headerColumns:_e,headersForRender:U,updateSortField:Lt,isMultiSorting:Rt,getMultiSortNumber:Tt}=lt(l,o,i,y,k,_,me,b,ce,J,f,de,W,h,v,x,Vt,t),{rowsItemsComputed:be,rowsPerPageRef:q,updateRowsPerPage:Ft}=ct(J,N,M,p),{totalItems:Dt,selectItemsComputed:zt,totalItemsLength:oe,toggleSelectAll:Ht,toggleSelectItem:Ot}=pt(he,r,J,B,F,I,C,T,x,t),{currentPaginationNumber:j,maxPaginationNumber:Q,isLastPage:X,isFirstPage:Y,nextPage:Z,prevPage:ee,updatePage:le,updateCurrentPaginationNumber:Mt}=it(g,J,E,oe,q,M,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 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=Wt.value.find(R=>R.value===m);if(c)return`left: ${c.distance}px;z-index: ${O==="th"?3:1};position: sticky;`};return e.watch(E,(m,O)=>{de.value&&m===!1&&O===!0&&(Mt(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}),s({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:Ft}),(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(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,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(V=>c.sortable&&c.sortType?e.unref(Lt)(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(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(x)&&e.unref(Rt)(c.value)?(e.openBlock(),e.createElementBlock("span",ht,e.toDisplayString(e.unref(Tt)(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,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: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)(R+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)+R)}])},null,2)):V==="checkbox"?(e.openBlock(),e.createBlock(ze,{key:3,checked:c[V],onChange:Ie=>e.unref(Ot)(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(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,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":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(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-145f9328"]]);return typeof window!="undefined"&&window.Vue&&window.Vue.createApp({}).component("Vue3EasyDataTable",fe),fe});

@@ -6,3 +6,3 @@ {

"private": false,
"version": "1.5.7",
"version": "1.5.8",
"types": "./types/main.d.ts",

@@ -9,0 +9,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc