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.32 to 1.5.33

14

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

@@ -1204,11 +1204,11 @@ var __defProp = Object.defineProperty;

var DataTable_vue_vue_type_style_index_1_scoped_true_lang = "";
const _withScopeId = (n) => (pushScopeId("data-v-02d2572c"), n = n(), popScopeId(), n);
const _withScopeId = (n) => (pushScopeId("data-v-461abf96"), n = n(), popScopeId(), n);
const _hoisted_1 = ["id"];
const _hoisted_2 = ["onClick"];
const _hoisted_3 = {
key: 2,
key: 3,
class: "header-text"
};
const _hoisted_4 = {
key: 4,
key: 5,
class: "multi-sort__number"

@@ -1265,4 +1265,4 @@ };

useCssVars((_ctx) => ({
"4546a7ac": unref(tableMinHeightPx),
"705db878": unref(tableHeightPx)
"e5401208": unref(tableMinHeightPx),
"0f3a9674": unref(tableHeightPx)
}));

@@ -1496,3 +1496,3 @@ const {

}, [
unref(slots)[`header-${header.value}`] ? renderSlot(_ctx.$slots, `header-${header.value}`, normalizeProps(mergeProps({ key: 0 }, header)), void 0, true) : unref(slots)[`header-${header.value.toLowerCase()}`] ? renderSlot(_ctx.$slots, `header-${header.value.toLowerCase()}`, normalizeProps(mergeProps({ key: 1 }, header)), void 0, true) : (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(header.text), 1)),
unref(slots)[`header-${header.value}`] ? renderSlot(_ctx.$slots, `header-${header.value}`, normalizeProps(mergeProps({ key: 0 }, header)), void 0, true) : unref(slots)[`header-${header.value.toLowerCase()}`] ? renderSlot(_ctx.$slots, `header-${header.value.toLowerCase()}`, normalizeProps(mergeProps({ key: 1 }, header)), void 0, true) : unref(slots)["header"] ? renderSlot(_ctx.$slots, "header", normalizeProps(mergeProps({ key: 2 }, header)), void 0, true) : (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(header.text), 1)),
header.sortable ? (openBlock(), createElementBlock("i", {

@@ -1646,3 +1646,3 @@ key: header.sortType ? header.sortType : "none",

});
var DataTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-02d2572c"]]);
var DataTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-461abf96"]]);
if (typeof window !== "undefined" && window.Vue) {

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

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

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

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

"private": false,
"version": "1.5.32",
"version": "1.5.33",
"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