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