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.17 to 1.5.18

10

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

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

selectItemsComputed.value = selectItemsArr;
emits("selectRow", item);
} else {

@@ -1193,3 +1194,3 @@ selectItemsComputed.value = selectItemsComputed.value.filter((selectedItem) => JSON.stringify(selectedItem) !== JSON.stringify(item));

var DataTable_vue_vue_type_style_index_1_scoped_true_lang = "";
const _withScopeId = (n) => (pushScopeId("data-v-658d5304"), n = n(), popScopeId(), n);
const _withScopeId = (n) => (pushScopeId("data-v-4d64f874"), n = n(), popScopeId(), n);
const _hoisted_1 = ["onClick"];

@@ -1240,2 +1241,3 @@ const _hoisted_2 = {

"clickRow",
"selectRow",
"expandRow",

@@ -1250,4 +1252,4 @@ "updateSort",

useCssVars((_ctx) => ({
"5868c1d4": unref(tableMinHeightPx),
"23cb749a": unref(tableHeightPx)
"691572b4": unref(tableMinHeightPx),
"67fd770a": unref(tableHeightPx)
}));

@@ -1620,3 +1622,3 @@ const {

});
var DataTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-658d5304"]]);
var DataTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4d64f874"]]);
if (typeof window !== "undefined" && window.Vue) {

@@ -1623,0 +1625,0 @@ window.Vue.createApp({}).component("Vue3EasyDataTable", DataTable);

2

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

@@ -1,1 +0,1 @@

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

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

"private": false,
"version": "1.5.17",
"version": "1.5.18",
"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