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.4.14 to 1.4.15

97

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

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

var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
import { defineComponent, useCssVars, unref, computed, inject, openBlock, createElementBlock, withModifiers, createElementVNode, normalizeClass, pushScopeId, popScopeId, ref, watch, onMounted, onBeforeUnmount, toDisplayString, Fragment, renderList, useSlots, renderSlot, createCommentVNode, toRefs, provide, normalizeStyle, createBlock, normalizeProps, mergeProps, createTextVNode, guardReactiveProps, createVNode, isRef, createSlots, withCtx } from "vue";
import { defineComponent, useCssVars, unref, computed, inject, openBlock, createElementBlock, withModifiers, createElementVNode, normalizeClass, pushScopeId, popScopeId, ref, watch, onMounted, onBeforeUnmount, toDisplayString, Fragment, renderList, useSlots, renderSlot, createCommentVNode, toRefs, provide, normalizeStyle, createBlock, normalizeProps, mergeProps, guardReactiveProps, createTextVNode, createVNode, isRef, createSlots, withCtx } from "vue";
var MultipleSelectCheckBox_vue_vue_type_style_index_0_scoped_true_lang = "";

@@ -921,2 +921,10 @@ var _export_sfc = (sfc, props) => {

},
headerTextDirection: {
type: String,
default: "left"
},
bodyTextDirection: {
type: String,
default: "left"
},
hideFooter: {

@@ -1029,34 +1037,30 @@ type: Boolean,

var DataTable_vue_vue_type_style_index_1_scoped_true_lang = "";
const _withScopeId = (n) => (pushScopeId("data-v-14bd0f78"), n = n(), popScopeId(), n);
const _withScopeId = (n) => (pushScopeId("data-v-7e9d5a2e"), n = n(), popScopeId(), n);
const _hoisted_1 = ["onClick"];
const _hoisted_2 = {
key: 1,
class: "header"
};
const _hoisted_3 = {
key: 1,
class: "header-text"
};
const _hoisted_3 = ["onClick"];
const _hoisted_4 = ["onClick"];
const _hoisted_5 = ["onClick"];
const _hoisted_6 = ["colspan"];
const _hoisted_7 = {
const _hoisted_5 = ["colspan"];
const _hoisted_6 = {
key: 0,
class: "vue3-easy-data-table__loading"
};
const _hoisted_8 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "vue3-easy-data-table__loading-mask" }, null, -1));
const _hoisted_9 = { class: "loading-entity" };
const _hoisted_10 = {
const _hoisted_7 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "vue3-easy-data-table__loading-mask" }, null, -1));
const _hoisted_8 = { class: "loading-entity" };
const _hoisted_9 = {
key: 1,
class: "vue3-easy-data-table__message"
};
const _hoisted_11 = {
const _hoisted_10 = {
key: 0,
class: "vue3-easy-data-table__footer"
};
const _hoisted_12 = {
const _hoisted_11 = {
key: 0,
class: "pagination__rows-per-page"
};
const _hoisted_13 = { class: "pagination__items-index" };
const _hoisted_12 = { class: "pagination__items-index" };
const _sfc_main = /* @__PURE__ */ defineComponent({

@@ -1083,5 +1087,6 @@ props: __spreadProps(__spreadValues({}, propsWithDefault), {

useCssVars((_ctx) => ({
"1455c80b": unref(tableHeightPx)
"387170a2": unref(tableHeightPx)
}));
const {
bodyTextDirection,
checkboxColumnWidth,

@@ -1095,2 +1100,3 @@ expandColumnWidth,

headers,
headerTextDirection,
indexColumnWidth,

@@ -1285,4 +1291,7 @@ items,

onChange: unref(toggleSelectAll)
}, null, 8, ["status", "onChange"])) : (openBlock(), createElementBlock("span", _hoisted_2, [
unref(slots)[`header-${header.value}`] ? renderSlot(_ctx.$slots, `header-${header.value}`, normalizeProps(mergeProps({ key: 0 }, header)), void 0, true) : (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(header.text), 1)),
}, null, 8, ["status", "onChange"])) : (openBlock(), createElementBlock("span", {
key: 1,
class: normalizeClass(["header", `direction-${unref(headerTextDirection)}`])
}, [
unref(slots)[`header-${header.value}`] ? renderSlot(_ctx.$slots, `header-${header.value}`, normalizeProps(mergeProps({ key: 0 }, header)), void 0, true) : (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(header.text), 1)),
header.sortable ? (openBlock(), createElementBlock("i", {

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

}, null, 2)) : createCommentVNode("", true)
]))
], 2))
], 14, _hoisted_1);

@@ -1302,2 +1311,14 @@ }), 128))

}, [
renderSlot(_ctx.$slots, "body-prepend", normalizeProps(guardReactiveProps({
items: unref(pageItems),
pagination: {
isFirstPage: unref(isFirstPage),
isLastPage: unref(isLastPage),
currentPaginationNumber: unref(currentPaginationNumber),
maxPaginationNumber: unref(maxPaginationNumber),
nextPage: unref(nextPage),
prevPage: unref(prevPage)
},
headers: unref(headersForRender)
})), void 0, true),
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(pageItems), (item, index) => {

@@ -1319,3 +1340,3 @@ return openBlock(), createElementBlock(Fragment, { key: index }, [

"can-expand": column === "expand"
}, typeof _ctx.bodyItemClassName === "string" ? _ctx.bodyItemClassName : _ctx.bodyItemClassName(column, i)]),
}, typeof _ctx.bodyItemClassName === "string" ? _ctx.bodyItemClassName : _ctx.bodyItemClassName(column, i), `direction-${unref(bodyTextDirection)}`]),
onClick: ($event) => column === "expand" ? unref(updateExpandingItemIndexList)(index, item, $event) : null

@@ -1333,5 +1354,5 @@ }, [

], 64))
], 14, _hoisted_5);
], 14, _hoisted_4);
}), 128))
], 10, _hoisted_4),
], 10, _hoisted_3),
unref(ifHasExpandSlot) && unref(expandingItemIndexList).includes(index) ? (openBlock(), createElementBlock("tr", {

@@ -1350,18 +1371,30 @@ key: 0,

renderSlot(_ctx.$slots, "expand", normalizeProps(guardReactiveProps(item)), void 0, true)
], 8, _hoisted_6)
], 8, _hoisted_5)
], 2)) : createCommentVNode("", true)
], 64);
}), 128))
}), 128)),
renderSlot(_ctx.$slots, "body-append", normalizeProps(guardReactiveProps({
items: unref(pageItems),
pagination: {
isFirstPage: unref(isFirstPage),
isLastPage: unref(isLastPage),
currentPaginationNumber: unref(currentPaginationNumber),
maxPaginationNumber: unref(maxPaginationNumber),
nextPage: unref(nextPage),
prevPage: unref(prevPage)
},
headers: unref(headersForRender)
})), void 0, true)
], 2)) : createCommentVNode("", true)
]),
unref(loading) ? (openBlock(), createElementBlock("div", _hoisted_7, [
_hoisted_8,
createElementVNode("div", _hoisted_9, [
unref(loading) ? (openBlock(), createElementBlock("div", _hoisted_6, [
_hoisted_7,
createElementVNode("div", _hoisted_8, [
unref(ifHasLoadingSlot) ? renderSlot(_ctx.$slots, "loading", { key: 0 }, void 0, true) : (openBlock(), createBlock(Loading, { key: 1 }))
])
])) : createCommentVNode("", true),
!unref(pageItems).length && !unref(loading) ? (openBlock(), createElementBlock("div", _hoisted_10, toDisplayString(_ctx.emptyMessage), 1)) : createCommentVNode("", true)
!unref(pageItems).length && !unref(loading) ? (openBlock(), createElementBlock("div", _hoisted_9, toDisplayString(_ctx.emptyMessage), 1)) : createCommentVNode("", true)
], 2),
!_ctx.hideFooter ? (openBlock(), createElementBlock("div", _hoisted_11, [
!_ctx.hideRowsPerPage ? (openBlock(), createElementBlock("div", _hoisted_12, [
!_ctx.hideFooter ? (openBlock(), createElementBlock("div", _hoisted_10, [
!_ctx.hideRowsPerPage ? (openBlock(), createElementBlock("div", _hoisted_11, [
createTextVNode(toDisplayString(_ctx.rowsPerPageMessage) + " ", 1),

@@ -1374,3 +1407,3 @@ createVNode(RowsSelector, {

])) : createCommentVNode("", true),
createElementVNode("div", _hoisted_13, toDisplayString(`${unref(currentPageFirstIndex)}\u2013${unref(currentPageLastIndex)}`) + " of " + toDisplayString(unref(totalItemsLength)), 1),
createElementVNode("div", _hoisted_12, toDisplayString(`${unref(currentPageFirstIndex)}\u2013${unref(currentPageLastIndex)}`) + " of " + toDisplayString(unref(totalItemsLength)), 1),
unref(ifHasPaginationSlot) ? renderSlot(_ctx.$slots, "pagination", normalizeProps(mergeProps({ key: 1 }, {

@@ -1406,3 +1439,3 @@ isFirstPage: unref(isFirstPage),

});
var DataTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-14bd0f78"]]);
var DataTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7e9d5a2e"]]);
if (typeof window !== "undefined" && window.Vue) {

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

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

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

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

"private": false,
"version": "1.4.14",
"version": "1.4.15",
"types": "./types/main.d.ts",

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

@@ -53,1 +53,3 @@ export type SortType = 'asc' | 'desc'

export type BodyItemClassNameFunction = (column: string, index: number) => string
export type TextDirection = 'center' | 'left' | 'right'

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