vue3-easy-data-table
Advanced tools
Comparing version 1.1.19 to 1.1.20
@@ -490,6 +490,2 @@ var __defProp = Object.defineProperty; | ||
}, | ||
wrapLines: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
itemsSelected: { | ||
@@ -567,21 +563,21 @@ type: Array, | ||
useCssVars((_ctx) => ({ | ||
"0111faad": unref(tableBorderColor), | ||
"7916d245": unref(rowHeightPx), | ||
"f0ce3248": unref(fontSizePx), | ||
"a6ad8344": unref(rowFontColor), | ||
"f3310d42": unref(rowBackgroundColor), | ||
"6e40d862": unref(maxHeightPx), | ||
"d6613178": unref(loadingWrapperSizePx), | ||
"9fa043be": unref(rowBorderColor), | ||
"3b5249fa": unref(headerFontColor), | ||
"6ad44644": __props.headerBackgroundColor, | ||
"52f8e8c4": unref(sortTypeIconSizePx), | ||
"05878c21": unref(sortTypeAscIconMarginTopPx), | ||
"546a8fc9": unref(sortTypeDescIconMarginTopPx), | ||
"765049af": unref(rowHoverBackgroundColor), | ||
"a36eeaa4": unref(rowHoverFontColor), | ||
"7c3f2ad0": unref(evenRowFontColor), | ||
"24b71219": unref(evenRowBackgroundColor), | ||
"33379514": unref(footerBackgroundColor), | ||
"f0e2d096": unref(footerFontColor) | ||
"af6da038": unref(tableBorderColor), | ||
"16cbb838": unref(maxHeightPx), | ||
"9329ae0a": unref(loadingWrapperSizePx), | ||
"71fa12a4": unref(rowHeightPx), | ||
"60d21153": unref(fontSizePx), | ||
"1c41a715": unref(rowFontColor), | ||
"3ca63cd6": unref(rowBackgroundColor), | ||
"c95e15d0": unref(rowBorderColor), | ||
"5b58a2ec": unref(headerFontColor), | ||
"7cb0bb6d": __props.headerBackgroundColor, | ||
"e67b61d6": unref(sortTypeIconSizePx), | ||
"abba2ed0": unref(sortTypeAscIconMarginTopPx), | ||
"433ac232": unref(sortTypeDescIconMarginTopPx), | ||
"fa37ced0": unref(rowHoverBackgroundColor), | ||
"24100752": unref(rowHoverFontColor), | ||
"69179fcf": unref(evenRowFontColor), | ||
"4e694210": unref(evenRowBackgroundColor), | ||
"0f7eaac2": unref(footerBackgroundColor), | ||
"00905f9e": unref(footerFontColor) | ||
})); | ||
@@ -820,14 +816,2 @@ const { | ||
const currentPageLastIndex = computed(() => rowsPerPageReactive.value * currentPaginationNumber.value); | ||
expose({ | ||
clientItemsLength: totalItemsLength, | ||
currentPageFirstIndex, | ||
currentPageLastIndex, | ||
maxPaginationNumber, | ||
currentPaginationNumber, | ||
isLastPage, | ||
isFirstPage, | ||
nextPage, | ||
prevPage, | ||
updatePage | ||
}); | ||
const itemsWithIndex = computed(() => { | ||
@@ -872,2 +856,14 @@ if (props.showIndex) { | ||
}; | ||
expose({ | ||
clientItemsLength: totalItemsLength, | ||
currentPageFirstIndex, | ||
currentPageLastIndex, | ||
maxPaginationNumber, | ||
currentPaginationNumber, | ||
isLastPage, | ||
isFirstPage, | ||
nextPage, | ||
prevPage, | ||
updatePage | ||
}); | ||
return (_ctx, _cache) => { | ||
@@ -882,3 +878,2 @@ return openBlock(), createElementBlock("div", { | ||
"fixed-header": __props.fixedHeader, | ||
"wrap-lines": __props.wrapLines, | ||
"max-height": __props.maxHeight | ||
@@ -994,3 +989,3 @@ }]) | ||
}); | ||
var DataTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-feee3c10"]]); | ||
var DataTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1f73e757"]]); | ||
export { DataTable as default }; |
@@ -1,1 +0,1 @@ | ||
(function(e,f){typeof exports=="object"&&typeof module!="undefined"?module.exports=f(require("vue")):typeof define=="function"&&define.amd?define(["vue"],f):(e=typeof globalThis!="undefined"?globalThis:e||self,e["vue3-easy-data-table"]=f(e.Vue))})(this,function(e){"use strict";var nt=Object.defineProperty,at=Object.defineProperties;var rt=Object.getOwnPropertyDescriptors;var re=Object.getOwnPropertySymbols;var lt=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable;var le=(e,f,u)=>f in e?nt(e,f,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[f]=u,x=(e,f)=>{for(var u in f||(f={}))lt.call(f,u)&&le(e,u,f[u]);if(re)for(var u of re(f))st.call(f,u)&&le(e,u,f[u]);return e},F=(e,f)=>at(e,rt(f));var f="",u=(n,_)=>{const r=n.__vccOpts||n;for(const[t,d]of _)r[t]=d;return r};const se=n=>(e.pushScopeId("data-v-566775ba"),n=n(),e.popScopeId(),n),ce=["onClick"],ie=["checked"],de=se(()=>e.createElementVNode("label",{for:"checbox"},null,-1));var pe=u(e.defineComponent({props:{status:{type:String,required:!0}},emits:["change"],setup(n,{emit:_}){const r=n;e.useCssVars(B=>({"7f84b28f":e.unref(b)}));const t=e.computed(()=>r.status==="allSelected"),d=()=>{_("change",!t.value)},b=e.inject("themeColor");return(B,E)=>(e.openBlock(),e.createElementBlock("div",{class:"multi-select__checkbox",onClick:e.withModifiers(d,["stop","prevent"])},[e.createElementVNode("input",{type:"checkbox",checked:e.unref(t),class:e.normalizeClass(n.status)},null,10,ie),de],8,ce))}}),[["__scopeId","data-v-566775ba"]]),it="";const ue=n=>(e.pushScopeId("data-v-39f156fd"),n=n(),e.popScopeId(),n),me=["checked"],fe=ue(()=>e.createElementVNode("label",{for:"checbox"},null,-1));var ge=u(e.defineComponent({props:{checked:{type:Boolean,required:!0}},emits:["change"],setup(n,{emit:_}){e.useCssVars(t=>({"20cfc5a0":e.unref(r)}));const r=e.inject("themeColor");return(t,d)=>(e.openBlock(),e.createElementBlock("div",{class:"single-select__checkbox",onClick:d[0]||(d[0]=e.withModifiers(b=>_("change"),["stop","prevent"]))},[e.createElementVNode("input",{type:"checkbox",checked:n.checked},null,8,me),fe]))}}),[["__scopeId","data-v-39f156fd"]]),pt="";const _e=n=>(e.pushScopeId("data-v-0ed08e20"),n=n(),e.popScopeId(),n),he={class:"easy-data-table__rows-selector"},ye={class:"rows-input"},ke=_e(()=>e.createElementVNode("div",{class:"triangle"},null,-1)),be=["onClick"];var xe=u(e.defineComponent({props:{modelValue:{type:Number,required:!0},rowsItems:{type:Array,required:!0}},emits:["update:modelValue"],setup(n,{emit:_}){const r=n;e.useCssVars(m=>({"83c11052":e.unref(p),"6b60f418":e.unref(l),"346ac97c":e.unref(s)}));const t=e.ref(!1),d=e.ref(!1),b=e.inject("dataTable");e.watch(t,m=>{if(m&&b){const C=window.innerHeight,h=b.value.getBoundingClientRect().height,V=b.value.getBoundingClientRect().top;C-(h+V)<=100?d.value=!0:d.value=!1}});const B=e.computed({get:()=>r.modelValue,set:m=>{_("update:modelValue",m)}}),E=m=>{B.value=m,t.value=!1},T=(m,C)=>{let h=m.parentNode;for(;h!=null;){if(h.classList&&h.classList.contains(C))return!0;h=h.parentNode}return!1},I=m=>{T(m.target,"easy-data-table__rows-selector")||(t.value=!1)};e.onMounted(()=>{document.addEventListener("click",I)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",I)});const s=e.inject("themeColor"),l=e.inject("footerBackgroundColor"),p=e.inject("footerFontColor");return(m,C)=>(e.openBlock(),e.createElementBlock("div",he,[e.createElementVNode("div",{class:"rows-input__wrapper",onClick:C[0]||(C[0]=h=>t.value=!t.value)},[e.createElementVNode("div",ye,e.toDisplayString(e.unref(B)),1),ke]),e.createElementVNode("ul",{class:e.normalizeClass(["select-items",{show:t.value,inside:d.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.rowsItems,h=>(e.openBlock(),e.createElementBlock("li",{key:h,class:e.normalizeClass({selected:h===e.unref(B)}),onClick:V=>E(h)},e.toDisplayString(h),11,be))),128))],2)]))}}),[["__scopeId","data-v-0ed08e20"]]),mt="";const z=n=>(e.pushScopeId("data-v-969989cc"),n=n(),e.popScopeId(),n),Ce={class:"lds-ring"},Se=[z(()=>e.createElementVNode("div",null,null,-1)),z(()=>e.createElementVNode("div",null,null,-1)),z(()=>e.createElementVNode("div",null,null,-1)),z(()=>e.createElementVNode("div",null,null,-1))];var Be=u(e.defineComponent({setup(n){e.useCssVars(t=>({"284c10f4":e.unref(r),"90c4d0a4":e.unref(_)}));const _=e.inject("themeColor"),r=e.inject("loadingEntitySizePx");return(t,d)=>(e.openBlock(),e.createElementBlock("div",Ce,Se))}}),[["__scopeId","data-v-969989cc"]]),kt="";const Pe={class:"buttons-pagination"},Ne=["onClick"];var we=u(e.defineComponent({props:{maxPaginationNumber:{type:Number,required:!0},currentPaginationNumber:{type:Number,required:!0}},emits:["updatePage"],setup(n,{emit:_}){const r=n;e.useCssVars(s=>({aa5730a0:e.unref(E),"24829312":e.unref(T),"98a0e762":e.unref(I)}));const t=7,d=s=>{s.type==="button"&&!s.active&&_("updatePage",s.page)},b=e.computed(()=>{const s=[];if(r.maxPaginationNumber<=t)for(let l=1;l<=r.maxPaginationNumber;l+=1)s.push({type:"button",page:l,active:l===r.currentPaginationNumber});else if([1,2,r.maxPaginationNumber,r.maxPaginationNumber-1].includes(r.currentPaginationNumber))for(let l=1;l<=t;l+=1)if(l<=3)s.push({type:"button",page:l,active:l===r.currentPaginationNumber});else if(l===4)s.push({type:"omission"});else{const p=r.maxPaginationNumber-(t-l);s.push({type:"button",page:p,active:p===r.currentPaginationNumber})}else if([3,4].includes(r.currentPaginationNumber))for(let l=1;l<=t;l+=1)l<=5?s.push({type:"button",page:l,active:l===r.currentPaginationNumber}):l===6?s.push({type:"omission"}):s.push({type:"button",page:r.maxPaginationNumber,active:r.maxPaginationNumber===r.currentPaginationNumber});else if([r.maxPaginationNumber-2,r.maxPaginationNumber-3].includes(r.currentPaginationNumber))for(let l=1;l<=t;l+=1)if(l===1)s.push({type:"button",page:1,active:r.currentPaginationNumber===1});else if(l===2)s.push({type:"omission"});else{const p=r.maxPaginationNumber-(t-l);s.push({type:"button",page:p,active:p===r.currentPaginationNumber})}else for(let l=1;l<=t;l+=1)if(l===1)s.push({type:"button",page:1,active:r.currentPaginationNumber===1});else if(l===2||l===6)s.push({type:"omission"});else if(l===7)s.push({type:"button",page:r.maxPaginationNumber,active:r.maxPaginationNumber===r.currentPaginationNumber});else{const p=4-l,m=r.currentPaginationNumber-p;s.push({type:"button",page:m,active:m===r.currentPaginationNumber})}return s}),B=e.inject("rowHeight"),E=e.computed(()=>`${B*.6}px`),T=e.inject("rowBorderColor"),I=e.inject("themeColor");return(s,l)=>(e.openBlock(),e.createElementBlock("div",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(b),(p,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:e.normalizeClass(["item",{button:p.type==="button",active:p.type==="button"&&p.active,omission:p.type==="omission"}]),onClick:C=>d(p)},e.toDisplayString(p.type==="button"?p.page:"..."),11,Ne))),128))]))}}),[["__scopeId","data-v-4f534e20"]]),xt="";const U=n=>(e.pushScopeId("data-v-c9da5286"),n=n(),e.popScopeId(),n),$e=[U(()=>e.createElementVNode("span",{class:"arrow arrow-right"},null,-1))],Ee=[U(()=>e.createElementVNode("span",{class:"arrow arrow-left"},null,-1))];var Ie=u(e.defineComponent({props:{isFirstPage:{type:Boolean,required:!1},isLastPage:{type:Boolean,required:!1}},emits:["clickPrevPage","clickNextPage"],setup(n,{emit:_}){const r=e.useSlots();return(t,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]=b=>_("clickPrevPage"))},$e,2),e.unref(r).buttonsPagination?e.renderSlot(t.$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]=b=>_("clickNextPage"))},Ee,2)],64))}}),[["__scopeId","data-v-c9da5286"]]),Pt="";const Ve={key:0},Fe=["onClick"],Te={key:1,class:"header-text__wrapper"},ze={class:"header-text"},He={class:"loading-entity"},Le={key:1,class:"data-table__message"},Oe={key:0,class:"data-table__footer"},De={class:"footer__rows-per-page"},Re=e.createTextVNode(" rows per page: "),je={class:"footer__items-index"};var Me=u(e.defineComponent({props:{alternating:{type:Boolean,default:!1},buttonsPagination:{type:Boolean,default:!1},rowBorderColor:{type:String,default:"#e0e0e0"},tableBorderColor:{type:String,default:"#e0e0e0"},rowBackgroundColor:{type:String,default:"#fff"},footerBackgroundColor:{type:String,default:"#fff"},rowFontColor:{type:String,default:"#212121"},footerFontColor:{type:String,default:"#212121"},emptyMessage:{type:String,default:"No Available Data"},fixedHeader:{type:Boolean,default:!0},headerFontColor:{type:String,default:"#373737"},headerBackgroundColor:{type:String,default:"#fff"},tableFontSize:{type:Number,default:12},evenRowBackgroundColor:{type:String,default:"#fafafa"},evenRowFontColor:{type:String,default:"#212121"},headers:{type:Array,required:!0},hoverToChangeColor:{type:Boolean,default:!0},items:{type:Array,required:!0},maxHeight:{type:Number,default:()=>null},wrapLines:{type:Boolean,default:!1},itemsSelected:{type:Array,default:null},searchField:{type:String,default:""},searchValue:{type:String,default:""},rowsPerPage:{type:Number,default:25},rowsItems:{type:Array,default:()=>[25,50,100]},rowHoverBackgroundColor:{type:String,default:"#eee"},rowHoverFontColor:{type:String,default:"#212121"},loading:{type:Boolean,deault:!1},serverOptions:{type:Object,default:null},serverItemsLength:{type:Number,default:0},sortBy:{type:String,default:""},sortType:{type:String,default:"asc"},themeColor:{type:String,default:"#42b883"},dense:{type:Boolean,default:!1},showIndex:{type:Boolean,default:!1},showFooter:{type:Boolean,default:!0}},emits:["update:itemsSelected","update:serverOptions"],setup(n,{expose:_,emit:r}){const t=n;e.useCssVars(o=>({"0111faad":e.unref(b),"7916d245":e.unref(Ae),f0ce3248:e.unref(h),a6ad8344:e.unref(E),f3310d42:e.unref(l),"6e40d862":e.unref(qe),d6613178:e.unref(Ke),"9fa043be":e.unref(d),"3b5249fa":e.unref(B),"6ad44644":n.headerBackgroundColor,"52f8e8c4":e.unref(Je),"05878c21":e.unref(We),"546a8fc9":e.unref(Ue),"765049af":e.unref(T),a36eeaa4:e.unref(I),"7c3f2ad0":e.unref(m),"24b71219":e.unref(p),"33379514":e.unref(s),f0e2d096:e.unref(C)}));const{rowBorderColor:d,tableBorderColor:b,headerFontColor:B,rowFontColor:E,rowHoverBackgroundColor:T,rowHoverFontColor:I,footerBackgroundColor:s,rowBackgroundColor:l,evenRowBackgroundColor:p,evenRowFontColor:m,footerFontColor:C}=e.toRefs(t),h=e.computed(()=>`${t.tableFontSize}px`),V=e.computed(()=>t.tableFontSize*(t.dense?2:3)),Ae=e.computed(()=>`${V.value}px`),qe=e.computed(()=>t.maxHeight?`${t.maxHeight}px`:null),G=e.computed(()=>Math.round(t.tableFontSize/2.5)),Je=e.computed(()=>`${G.value}px`),K=e.computed(()=>Math.round(G.value)),We=e.computed(()=>`-${K.value}px`),Ue=e.computed(()=>`${K.value}px`),Ge=e.computed(()=>`${t.tableFontSize*5}px`),Ke=e.computed(()=>t.maxHeight?`${t.maxHeight-V.value}px`:`${t.tableFontSize*5*2}px`);e.provide("themeColor",t.themeColor),e.provide("loadingEntitySizePx",Ge.value),e.provide("rowHeight",V.value),e.provide("rowBorderColor",d.value),e.provide("footerBackgroundColor",s.value),e.provide("footerFontColor",C.value);const H=e.useSlots(),Qe=e.computed(()=>H.body),Xe=e.computed(()=>H.pagination),Ye=e.computed(()=>H.loading),Q=e.ref();e.provide("dataTable",Q);const k=e.computed({get:()=>{if(t.serverOptions){const{page:o,rowsPerPage:c,sortBy:a,sortType:i}=t.serverOptions;return{page:o,rowsPerPage:c,sortBy:a!=null?a:null,sortType:i!=null?i:null}}return{page:1,rowsPerPage:25,sortBy:null,sortType:null}},set:o=>{r("update:serverOptions",o)}}),X=e.computed(()=>t.itemsSelected!==null),y=e.computed(()=>t.serverOptions!==null),Ze=()=>t.sortBy!==""?{sortBy:t.sortBy,sortDesc:t.sortType==="desc"}:null,w=e.ref(Ze()),A=e.computed(()=>{const o=t.headers.map(i=>{const S=i;return i.sortable&&(S.sortType="none"),y.value&&i.value===k.value.sortBy&&k.value.sortType&&(S.sortType=k.value.sortType),!y.value&&w.value&&i.value===w.value.sortBy&&(S.sortType=w.value.sortDesc?"desc":"asc"),S}),c=t.showIndex?[{text:"#",value:"index"},...o]:o;return X.value?[{text:"checkbox",value:"checkbox"},...c]:c}),Y=e.computed(()=>A.value.map(o=>o.value)),N=e.computed({get:()=>{var o;return(o=t.itemsSelected)!=null?o:[]},set:o=>{r("update:itemsSelected",o)}}),L=e.computed(()=>N.value.length===0?"noneSelected":N.value.length===t.items.length?"allSelected":"partSelected"),O=e.computed(()=>{if(!y.value&&t.searchValue!==""){const o=new RegExp(t.searchValue,"i");return t.items.filter(c=>o.test(t.searchField!==""?c[t.searchField]:Object.values(c).join(" ")))}return t.items}),g=e.ref(y.value?t.serverOptions.page:1),P=e.ref(y.value?t.serverOptions.rowsPerPage:t.rowsPerPage);e.watch(P,o=>{y.value&&(k.value=F(x({},k.value),{page:1,rowsPerPage:o})),g.value=1});const ve=(o,c)=>{let a=null;c==="none"?a="asc":c==="asc"?a="desc":a=null,y.value?k.value=F(x({},k.value),{sortBy:a!==null?o:null,sortType:a}):a===null?w.value=null:w.value={sortBy:o,sortDesc:a==="desc"}},Z=e.computed(()=>{if(y.value)return t.items;if(w.value===null)return O.value;const{sortBy:o,sortDesc:c}=w.value;return[...O.value].sort((i,S)=>i[o]<S[o]?c?1:-1:i[o]>S[o]?c?-1:1:0)}),q=e.computed(()=>y.value?t.serverItemsLength:O.value.length),v=e.computed(()=>y.value?g.value*P.value:Math.min(O.value.length,g.value*P.value)),ee=e.computed(()=>(g.value-1)*P.value+1),D=e.computed(()=>Math.ceil(q.value/P.value)),R=e.computed(()=>g.value===D.value),j=e.computed(()=>g.value===1),{loading:$}=e.toRefs(t),J=()=>{if(!R.value&&!$.value)if(y.value){const o=g.value+1;k.value=F(x({},k.value),{page:o})}else g.value+=1},W=()=>{if(!j.value&&!$.value)if(y.value){const o=g.value-1;k.value=F(x({},k.value),{page:o})}else g.value-=1},te=o=>{$.value||(y.value?k.value=F(x({},k.value),{page:o}):g.value=o)};e.watch($,(o,c)=>{y.value&&o===!1&&c===!0&&(g.value=k.value.page)});const oe=e.computed(()=>y.value?t.items:Z.value.slice(ee.value-1,v.value)),ne=e.computed(()=>P.value*(g.value-1)+1),et=e.computed(()=>P.value*g.value);_({clientItemsLength:q,currentPageFirstIndex:ne,currentPageLastIndex:et,maxPaginationNumber:D,currentPaginationNumber:g,isLastPage:R,isFirstPage:j,nextPage:J,prevPage:W,updatePage:te});const M=e.computed(()=>t.showIndex?oe.value.map((o,c)=>x({index:ne.value+c},o)):oe.value),ae=e.computed(()=>X.value?L.value==="allSelected"?M.value.map(o=>x({checkbox:!0},o)):L.value==="noneSelected"?M.value.map(o=>x({checkbox:!1},o)):M.value.map(o=>{const c=N.value.findIndex(a=>{const i=x({},o);return delete i.index,JSON.stringify(a)===JSON.stringify(i)})!==-1;return x({checkbox:c},o)}):M.value),tt=o=>{N.value=o?Z.value:[]},ot=o=>{const c=o.checkbox;if(delete o.checkbox,delete o.index,c)N.value=N.value.filter(a=>JSON.stringify(a)!==JSON.stringify(o));else{const a=N.value;a.unshift(o),N.value=a}};return(o,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dataTable",ref:Q,class:"vue3-easy-data-table"},[e.createElementVNode("div",{class:e.normalizeClass(["data-table__body",{"fixed-header":n.fixedHeader,"wrap-lines":n.wrapLines,"max-height":n.maxHeight}])},[e.createElementVNode("table",null,[e.unref(A).length?(e.openBlock(),e.createElementBlock("thead",Ve,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(A),(a,i)=>(e.openBlock(),e.createElementBlock("th",{key:i,class:e.normalizeClass({sortable:a.sortable,none:a.sortable&&a.sortType==="none",desc:a.sortable&&a.sortType==="desc",asc:a.sortable&&a.sortType==="asc"}),onClick:S=>a.sortable&&a.sortType?ve(a.value,a.sortType):null},[a.text==="checkbox"?(e.openBlock(),e.createBlock(pe,{key:e.unref(L),status:e.unref(L),onChange:tt},null,8,["status"])):(e.openBlock(),e.createElementBlock("span",Te,[e.createElementVNode("span",ze,e.toDisplayString(a.text),1),a.sortable?(e.openBlock(),e.createElementBlock("i",{key:a.sortType?a.sortType:"none",class:e.normalizeClass(["sortType-icon",{desc:a.sortType==="desc"}])},null,2)):e.createCommentVNode("",!0)]))],10,Fe))),128))])])):e.createCommentVNode("",!0),e.unref(Qe)?e.renderSlot(o.$slots,"body",{key:1},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[n.items.length&&e.unref(Y).length?(e.openBlock(),e.createElementBlock("tbody",{key:0,class:e.normalizeClass({"row-alternation":n.alternating,"hover-to-change-color":n.hoverToChangeColor})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ae),a=>(e.openBlock(),e.createElementBlock("tr",{key:JSON.stringify(a)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Y),(i,S)=>(e.openBlock(),e.createElementBlock("td",{key:S},[e.unref(H)[i]?e.renderSlot(o.$slots,i,e.normalizeProps(e.mergeProps({key:0},a)),void 0,!0):i==="checkbox"?(e.openBlock(),e.createBlock(ge,{key:1,checked:a[i],onChange:wt=>ot(a)},null,8,["checked","onChange"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(Array.isArray(a[i])?a[i].join(","):a[i]),1)],64))]))),128))]))),128))],2)):e.createCommentVNode("",!0)],64))]),e.unref($)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["loading-wrapper",{"initial-loading":!n.items.length&&e.unref($)}])},[e.createElementVNode("div",{class:e.normalizeClass(["loading-mask",{"no-footer":!n.showFooter}])},null,2),e.createElementVNode("div",He,[e.unref(Ye)?e.renderSlot(o.$slots,"loading",{key:0},void 0,!0):(e.openBlock(),e.createBlock(Be,{key:1}))])],2)):e.createCommentVNode("",!0),!e.unref(ae).length&&!e.unref($)?(e.openBlock(),e.createElementBlock("div",Le,e.toDisplayString(n.emptyMessage),1)):e.createCommentVNode("",!0)],2),n.showFooter?(e.openBlock(),e.createElementBlock("div",Oe,[e.createElementVNode("div",De,[Re,e.createVNode(xe,{modelValue:P.value,"onUpdate:modelValue":c[0]||(c[0]=a=>P.value=a),"rows-items":n.rowsItems},null,8,["modelValue","rows-items"])]),e.createElementVNode("div",je,e.toDisplayString(`${e.unref(ee)}-${e.unref(v)}`)+" of "+e.toDisplayString(e.unref(q)),1),e.unref(Xe)?e.renderSlot(o.$slots,"pagination",e.normalizeProps(e.mergeProps({key:0},{isFirstPage:e.unref(j),isLastPage:e.unref(R),currentPaginationNumber:g.value,maxPaginationNumber:e.unref(D),nextPage:J,prevPage:W})),void 0,!0):(e.openBlock(),e.createBlock(Ie,{key:1,"is-first-page":e.unref(j),"is-last-page":e.unref(R),onClickNextPage:J,onClickPrevPage:W},e.createSlots({_:2},[n.buttonsPagination?{name:"buttonsPagination",fn:e.withCtx(()=>[e.createVNode(we,{"current-pagination-number":g.value,"max-pagination-number":e.unref(D),onUpdatePage:te},null,8,["current-pagination-number","max-pagination-number"])])}:void 0]),1032,["is-first-page","is-last-page"]))])):e.createCommentVNode("",!0)],512))}}),[["__scopeId","data-v-feee3c10"]]);return Me}); | ||
(function(e,f){typeof exports=="object"&&typeof module!="undefined"?module.exports=f(require("vue")):typeof define=="function"&&define.amd?define(["vue"],f):(e=typeof globalThis!="undefined"?globalThis:e||self,e["vue3-easy-data-table"]=f(e.Vue))})(this,function(e){"use strict";var nt=Object.defineProperty,at=Object.defineProperties;var rt=Object.getOwnPropertyDescriptors;var re=Object.getOwnPropertySymbols;var lt=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable;var le=(e,f,u)=>f in e?nt(e,f,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[f]=u,x=(e,f)=>{for(var u in f||(f={}))lt.call(f,u)&&le(e,u,f[u]);if(re)for(var u of re(f))st.call(f,u)&&le(e,u,f[u]);return e},F=(e,f)=>at(e,rt(f));var f="",u=(n,_)=>{const r=n.__vccOpts||n;for(const[t,d]of _)r[t]=d;return r};const se=n=>(e.pushScopeId("data-v-566775ba"),n=n(),e.popScopeId(),n),ce=["onClick"],ie=["checked"],de=se(()=>e.createElementVNode("label",{for:"checbox"},null,-1));var pe=u(e.defineComponent({props:{status:{type:String,required:!0}},emits:["change"],setup(n,{emit:_}){const r=n;e.useCssVars(B=>({"7f84b28f":e.unref(b)}));const t=e.computed(()=>r.status==="allSelected"),d=()=>{_("change",!t.value)},b=e.inject("themeColor");return(B,E)=>(e.openBlock(),e.createElementBlock("div",{class:"multi-select__checkbox",onClick:e.withModifiers(d,["stop","prevent"])},[e.createElementVNode("input",{type:"checkbox",checked:e.unref(t),class:e.normalizeClass(n.status)},null,10,ie),de],8,ce))}}),[["__scopeId","data-v-566775ba"]]),it="";const ue=n=>(e.pushScopeId("data-v-39f156fd"),n=n(),e.popScopeId(),n),me=["checked"],fe=ue(()=>e.createElementVNode("label",{for:"checbox"},null,-1));var ge=u(e.defineComponent({props:{checked:{type:Boolean,required:!0}},emits:["change"],setup(n,{emit:_}){e.useCssVars(t=>({"20cfc5a0":e.unref(r)}));const r=e.inject("themeColor");return(t,d)=>(e.openBlock(),e.createElementBlock("div",{class:"single-select__checkbox",onClick:d[0]||(d[0]=e.withModifiers(b=>_("change"),["stop","prevent"]))},[e.createElementVNode("input",{type:"checkbox",checked:n.checked},null,8,me),fe]))}}),[["__scopeId","data-v-39f156fd"]]),pt="";const _e=n=>(e.pushScopeId("data-v-0ed08e20"),n=n(),e.popScopeId(),n),he={class:"easy-data-table__rows-selector"},ye={class:"rows-input"},ke=_e(()=>e.createElementVNode("div",{class:"triangle"},null,-1)),be=["onClick"];var xe=u(e.defineComponent({props:{modelValue:{type:Number,required:!0},rowsItems:{type:Array,required:!0}},emits:["update:modelValue"],setup(n,{emit:_}){const r=n;e.useCssVars(m=>({"83c11052":e.unref(p),"6b60f418":e.unref(l),"346ac97c":e.unref(s)}));const t=e.ref(!1),d=e.ref(!1),b=e.inject("dataTable");e.watch(t,m=>{if(m&&b){const C=window.innerHeight,h=b.value.getBoundingClientRect().height,V=b.value.getBoundingClientRect().top;C-(h+V)<=100?d.value=!0:d.value=!1}});const B=e.computed({get:()=>r.modelValue,set:m=>{_("update:modelValue",m)}}),E=m=>{B.value=m,t.value=!1},T=(m,C)=>{let h=m.parentNode;for(;h!=null;){if(h.classList&&h.classList.contains(C))return!0;h=h.parentNode}return!1},I=m=>{T(m.target,"easy-data-table__rows-selector")||(t.value=!1)};e.onMounted(()=>{document.addEventListener("click",I)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",I)});const s=e.inject("themeColor"),l=e.inject("footerBackgroundColor"),p=e.inject("footerFontColor");return(m,C)=>(e.openBlock(),e.createElementBlock("div",he,[e.createElementVNode("div",{class:"rows-input__wrapper",onClick:C[0]||(C[0]=h=>t.value=!t.value)},[e.createElementVNode("div",ye,e.toDisplayString(e.unref(B)),1),ke]),e.createElementVNode("ul",{class:e.normalizeClass(["select-items",{show:t.value,inside:d.value}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.rowsItems,h=>(e.openBlock(),e.createElementBlock("li",{key:h,class:e.normalizeClass({selected:h===e.unref(B)}),onClick:V=>E(h)},e.toDisplayString(h),11,be))),128))],2)]))}}),[["__scopeId","data-v-0ed08e20"]]),mt="";const z=n=>(e.pushScopeId("data-v-969989cc"),n=n(),e.popScopeId(),n),Ce={class:"lds-ring"},Se=[z(()=>e.createElementVNode("div",null,null,-1)),z(()=>e.createElementVNode("div",null,null,-1)),z(()=>e.createElementVNode("div",null,null,-1)),z(()=>e.createElementVNode("div",null,null,-1))];var Be=u(e.defineComponent({setup(n){e.useCssVars(t=>({"284c10f4":e.unref(r),"90c4d0a4":e.unref(_)}));const _=e.inject("themeColor"),r=e.inject("loadingEntitySizePx");return(t,d)=>(e.openBlock(),e.createElementBlock("div",Ce,Se))}}),[["__scopeId","data-v-969989cc"]]),kt="";const Pe={class:"buttons-pagination"},Ne=["onClick"];var we=u(e.defineComponent({props:{maxPaginationNumber:{type:Number,required:!0},currentPaginationNumber:{type:Number,required:!0}},emits:["updatePage"],setup(n,{emit:_}){const r=n;e.useCssVars(s=>({aa5730a0:e.unref(E),"24829312":e.unref(T),"98a0e762":e.unref(I)}));const t=7,d=s=>{s.type==="button"&&!s.active&&_("updatePage",s.page)},b=e.computed(()=>{const s=[];if(r.maxPaginationNumber<=t)for(let l=1;l<=r.maxPaginationNumber;l+=1)s.push({type:"button",page:l,active:l===r.currentPaginationNumber});else if([1,2,r.maxPaginationNumber,r.maxPaginationNumber-1].includes(r.currentPaginationNumber))for(let l=1;l<=t;l+=1)if(l<=3)s.push({type:"button",page:l,active:l===r.currentPaginationNumber});else if(l===4)s.push({type:"omission"});else{const p=r.maxPaginationNumber-(t-l);s.push({type:"button",page:p,active:p===r.currentPaginationNumber})}else if([3,4].includes(r.currentPaginationNumber))for(let l=1;l<=t;l+=1)l<=5?s.push({type:"button",page:l,active:l===r.currentPaginationNumber}):l===6?s.push({type:"omission"}):s.push({type:"button",page:r.maxPaginationNumber,active:r.maxPaginationNumber===r.currentPaginationNumber});else if([r.maxPaginationNumber-2,r.maxPaginationNumber-3].includes(r.currentPaginationNumber))for(let l=1;l<=t;l+=1)if(l===1)s.push({type:"button",page:1,active:r.currentPaginationNumber===1});else if(l===2)s.push({type:"omission"});else{const p=r.maxPaginationNumber-(t-l);s.push({type:"button",page:p,active:p===r.currentPaginationNumber})}else for(let l=1;l<=t;l+=1)if(l===1)s.push({type:"button",page:1,active:r.currentPaginationNumber===1});else if(l===2||l===6)s.push({type:"omission"});else if(l===7)s.push({type:"button",page:r.maxPaginationNumber,active:r.maxPaginationNumber===r.currentPaginationNumber});else{const p=4-l,m=r.currentPaginationNumber-p;s.push({type:"button",page:m,active:m===r.currentPaginationNumber})}return s}),B=e.inject("rowHeight"),E=e.computed(()=>`${B*.6}px`),T=e.inject("rowBorderColor"),I=e.inject("themeColor");return(s,l)=>(e.openBlock(),e.createElementBlock("div",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(b),(p,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:e.normalizeClass(["item",{button:p.type==="button",active:p.type==="button"&&p.active,omission:p.type==="omission"}]),onClick:C=>d(p)},e.toDisplayString(p.type==="button"?p.page:"..."),11,Ne))),128))]))}}),[["__scopeId","data-v-4f534e20"]]),xt="";const U=n=>(e.pushScopeId("data-v-c9da5286"),n=n(),e.popScopeId(),n),$e=[U(()=>e.createElementVNode("span",{class:"arrow arrow-right"},null,-1))],Ee=[U(()=>e.createElementVNode("span",{class:"arrow arrow-left"},null,-1))];var Ie=u(e.defineComponent({props:{isFirstPage:{type:Boolean,required:!1},isLastPage:{type:Boolean,required:!1}},emits:["clickPrevPage","clickNextPage"],setup(n,{emit:_}){const r=e.useSlots();return(t,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]=b=>_("clickPrevPage"))},$e,2),e.unref(r).buttonsPagination?e.renderSlot(t.$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]=b=>_("clickNextPage"))},Ee,2)],64))}}),[["__scopeId","data-v-c9da5286"]]),Pt="";const Ve={key:0},Fe=["onClick"],Te={key:1,class:"header-text__wrapper"},ze={class:"header-text"},He={class:"loading-entity"},Le={key:1,class:"data-table__message"},Oe={key:0,class:"data-table__footer"},De={class:"footer__rows-per-page"},Re=e.createTextVNode(" rows per page: "),je={class:"footer__items-index"};var Me=u(e.defineComponent({props:{alternating:{type:Boolean,default:!1},buttonsPagination:{type:Boolean,default:!1},rowBorderColor:{type:String,default:"#e0e0e0"},tableBorderColor:{type:String,default:"#e0e0e0"},rowBackgroundColor:{type:String,default:"#fff"},footerBackgroundColor:{type:String,default:"#fff"},rowFontColor:{type:String,default:"#212121"},footerFontColor:{type:String,default:"#212121"},emptyMessage:{type:String,default:"No Available Data"},fixedHeader:{type:Boolean,default:!0},headerFontColor:{type:String,default:"#373737"},headerBackgroundColor:{type:String,default:"#fff"},tableFontSize:{type:Number,default:12},evenRowBackgroundColor:{type:String,default:"#fafafa"},evenRowFontColor:{type:String,default:"#212121"},headers:{type:Array,required:!0},hoverToChangeColor:{type:Boolean,default:!0},items:{type:Array,required:!0},maxHeight:{type:Number,default:()=>null},itemsSelected:{type:Array,default:null},searchField:{type:String,default:""},searchValue:{type:String,default:""},rowsPerPage:{type:Number,default:25},rowsItems:{type:Array,default:()=>[25,50,100]},rowHoverBackgroundColor:{type:String,default:"#eee"},rowHoverFontColor:{type:String,default:"#212121"},loading:{type:Boolean,deault:!1},serverOptions:{type:Object,default:null},serverItemsLength:{type:Number,default:0},sortBy:{type:String,default:""},sortType:{type:String,default:"asc"},themeColor:{type:String,default:"#42b883"},dense:{type:Boolean,default:!1},showIndex:{type:Boolean,default:!1},showFooter:{type:Boolean,default:!0}},emits:["update:itemsSelected","update:serverOptions"],setup(n,{expose:_,emit:r}){const t=n;e.useCssVars(o=>({af6da038:e.unref(b),"16cbb838":e.unref(qe),"9329ae0a":e.unref(Ke),"71fa12a4":e.unref(Ae),"60d21153":e.unref(h),"1c41a715":e.unref(E),"3ca63cd6":e.unref(l),c95e15d0:e.unref(d),"5b58a2ec":e.unref(B),"7cb0bb6d":n.headerBackgroundColor,e67b61d6:e.unref(Je),abba2ed0:e.unref(We),"433ac232":e.unref(Ue),fa37ced0:e.unref(T),"24100752":e.unref(I),"69179fcf":e.unref(m),"4e694210":e.unref(p),"0f7eaac2":e.unref(s),"00905f9e":e.unref(C)}));const{rowBorderColor:d,tableBorderColor:b,headerFontColor:B,rowFontColor:E,rowHoverBackgroundColor:T,rowHoverFontColor:I,footerBackgroundColor:s,rowBackgroundColor:l,evenRowBackgroundColor:p,evenRowFontColor:m,footerFontColor:C}=e.toRefs(t),h=e.computed(()=>`${t.tableFontSize}px`),V=e.computed(()=>t.tableFontSize*(t.dense?2:3)),Ae=e.computed(()=>`${V.value}px`),qe=e.computed(()=>t.maxHeight?`${t.maxHeight}px`:null),G=e.computed(()=>Math.round(t.tableFontSize/2.5)),Je=e.computed(()=>`${G.value}px`),K=e.computed(()=>Math.round(G.value)),We=e.computed(()=>`-${K.value}px`),Ue=e.computed(()=>`${K.value}px`),Ge=e.computed(()=>`${t.tableFontSize*5}px`),Ke=e.computed(()=>t.maxHeight?`${t.maxHeight-V.value}px`:`${t.tableFontSize*5*2}px`);e.provide("themeColor",t.themeColor),e.provide("loadingEntitySizePx",Ge.value),e.provide("rowHeight",V.value),e.provide("rowBorderColor",d.value),e.provide("footerBackgroundColor",s.value),e.provide("footerFontColor",C.value);const H=e.useSlots(),Qe=e.computed(()=>H.body),Xe=e.computed(()=>H.pagination),Ye=e.computed(()=>H.loading),Q=e.ref();e.provide("dataTable",Q);const k=e.computed({get:()=>{if(t.serverOptions){const{page:o,rowsPerPage:c,sortBy:a,sortType:i}=t.serverOptions;return{page:o,rowsPerPage:c,sortBy:a!=null?a:null,sortType:i!=null?i:null}}return{page:1,rowsPerPage:25,sortBy:null,sortType:null}},set:o=>{r("update:serverOptions",o)}}),X=e.computed(()=>t.itemsSelected!==null),y=e.computed(()=>t.serverOptions!==null),Ze=()=>t.sortBy!==""?{sortBy:t.sortBy,sortDesc:t.sortType==="desc"}:null,w=e.ref(Ze()),A=e.computed(()=>{const o=t.headers.map(i=>{const S=i;return i.sortable&&(S.sortType="none"),y.value&&i.value===k.value.sortBy&&k.value.sortType&&(S.sortType=k.value.sortType),!y.value&&w.value&&i.value===w.value.sortBy&&(S.sortType=w.value.sortDesc?"desc":"asc"),S}),c=t.showIndex?[{text:"#",value:"index"},...o]:o;return X.value?[{text:"checkbox",value:"checkbox"},...c]:c}),Y=e.computed(()=>A.value.map(o=>o.value)),N=e.computed({get:()=>{var o;return(o=t.itemsSelected)!=null?o:[]},set:o=>{r("update:itemsSelected",o)}}),L=e.computed(()=>N.value.length===0?"noneSelected":N.value.length===t.items.length?"allSelected":"partSelected"),O=e.computed(()=>{if(!y.value&&t.searchValue!==""){const o=new RegExp(t.searchValue,"i");return t.items.filter(c=>o.test(t.searchField!==""?c[t.searchField]:Object.values(c).join(" ")))}return t.items}),g=e.ref(y.value?t.serverOptions.page:1),P=e.ref(y.value?t.serverOptions.rowsPerPage:t.rowsPerPage);e.watch(P,o=>{y.value&&(k.value=F(x({},k.value),{page:1,rowsPerPage:o})),g.value=1});const ve=(o,c)=>{let a=null;c==="none"?a="asc":c==="asc"?a="desc":a=null,y.value?k.value=F(x({},k.value),{sortBy:a!==null?o:null,sortType:a}):a===null?w.value=null:w.value={sortBy:o,sortDesc:a==="desc"}},Z=e.computed(()=>{if(y.value)return t.items;if(w.value===null)return O.value;const{sortBy:o,sortDesc:c}=w.value;return[...O.value].sort((i,S)=>i[o]<S[o]?c?1:-1:i[o]>S[o]?c?-1:1:0)}),q=e.computed(()=>y.value?t.serverItemsLength:O.value.length),v=e.computed(()=>y.value?g.value*P.value:Math.min(O.value.length,g.value*P.value)),ee=e.computed(()=>(g.value-1)*P.value+1),D=e.computed(()=>Math.ceil(q.value/P.value)),R=e.computed(()=>g.value===D.value),j=e.computed(()=>g.value===1),{loading:$}=e.toRefs(t),J=()=>{if(!R.value&&!$.value)if(y.value){const o=g.value+1;k.value=F(x({},k.value),{page:o})}else g.value+=1},W=()=>{if(!j.value&&!$.value)if(y.value){const o=g.value-1;k.value=F(x({},k.value),{page:o})}else g.value-=1},te=o=>{$.value||(y.value?k.value=F(x({},k.value),{page:o}):g.value=o)};e.watch($,(o,c)=>{y.value&&o===!1&&c===!0&&(g.value=k.value.page)});const oe=e.computed(()=>y.value?t.items:Z.value.slice(ee.value-1,v.value)),ne=e.computed(()=>P.value*(g.value-1)+1),et=e.computed(()=>P.value*g.value),M=e.computed(()=>t.showIndex?oe.value.map((o,c)=>x({index:ne.value+c},o)):oe.value),ae=e.computed(()=>X.value?L.value==="allSelected"?M.value.map(o=>x({checkbox:!0},o)):L.value==="noneSelected"?M.value.map(o=>x({checkbox:!1},o)):M.value.map(o=>{const c=N.value.findIndex(a=>{const i=x({},o);return delete i.index,JSON.stringify(a)===JSON.stringify(i)})!==-1;return x({checkbox:c},o)}):M.value),tt=o=>{N.value=o?Z.value:[]},ot=o=>{const c=o.checkbox;if(delete o.checkbox,delete o.index,c)N.value=N.value.filter(a=>JSON.stringify(a)!==JSON.stringify(o));else{const a=N.value;a.unshift(o),N.value=a}};return _({clientItemsLength:q,currentPageFirstIndex:ne,currentPageLastIndex:et,maxPaginationNumber:D,currentPaginationNumber:g,isLastPage:R,isFirstPage:j,nextPage:J,prevPage:W,updatePage:te}),(o,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dataTable",ref:Q,class:"vue3-easy-data-table"},[e.createElementVNode("div",{class:e.normalizeClass(["data-table__body",{"fixed-header":n.fixedHeader,"max-height":n.maxHeight}])},[e.createElementVNode("table",null,[e.unref(A).length?(e.openBlock(),e.createElementBlock("thead",Ve,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(A),(a,i)=>(e.openBlock(),e.createElementBlock("th",{key:i,class:e.normalizeClass({sortable:a.sortable,none:a.sortable&&a.sortType==="none",desc:a.sortable&&a.sortType==="desc",asc:a.sortable&&a.sortType==="asc"}),onClick:S=>a.sortable&&a.sortType?ve(a.value,a.sortType):null},[a.text==="checkbox"?(e.openBlock(),e.createBlock(pe,{key:e.unref(L),status:e.unref(L),onChange:tt},null,8,["status"])):(e.openBlock(),e.createElementBlock("span",Te,[e.createElementVNode("span",ze,e.toDisplayString(a.text),1),a.sortable?(e.openBlock(),e.createElementBlock("i",{key:a.sortType?a.sortType:"none",class:e.normalizeClass(["sortType-icon",{desc:a.sortType==="desc"}])},null,2)):e.createCommentVNode("",!0)]))],10,Fe))),128))])])):e.createCommentVNode("",!0),e.unref(Qe)?e.renderSlot(o.$slots,"body",{key:1},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[n.items.length&&e.unref(Y).length?(e.openBlock(),e.createElementBlock("tbody",{key:0,class:e.normalizeClass({"row-alternation":n.alternating,"hover-to-change-color":n.hoverToChangeColor})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ae),a=>(e.openBlock(),e.createElementBlock("tr",{key:JSON.stringify(a)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Y),(i,S)=>(e.openBlock(),e.createElementBlock("td",{key:S},[e.unref(H)[i]?e.renderSlot(o.$slots,i,e.normalizeProps(e.mergeProps({key:0},a)),void 0,!0):i==="checkbox"?(e.openBlock(),e.createBlock(ge,{key:1,checked:a[i],onChange:wt=>ot(a)},null,8,["checked","onChange"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(Array.isArray(a[i])?a[i].join(","):a[i]),1)],64))]))),128))]))),128))],2)):e.createCommentVNode("",!0)],64))]),e.unref($)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["loading-wrapper",{"initial-loading":!n.items.length&&e.unref($)}])},[e.createElementVNode("div",{class:e.normalizeClass(["loading-mask",{"no-footer":!n.showFooter}])},null,2),e.createElementVNode("div",He,[e.unref(Ye)?e.renderSlot(o.$slots,"loading",{key:0},void 0,!0):(e.openBlock(),e.createBlock(Be,{key:1}))])],2)):e.createCommentVNode("",!0),!e.unref(ae).length&&!e.unref($)?(e.openBlock(),e.createElementBlock("div",Le,e.toDisplayString(n.emptyMessage),1)):e.createCommentVNode("",!0)],2),n.showFooter?(e.openBlock(),e.createElementBlock("div",Oe,[e.createElementVNode("div",De,[Re,e.createVNode(xe,{modelValue:P.value,"onUpdate:modelValue":c[0]||(c[0]=a=>P.value=a),"rows-items":n.rowsItems},null,8,["modelValue","rows-items"])]),e.createElementVNode("div",je,e.toDisplayString(`${e.unref(ee)}-${e.unref(v)}`)+" of "+e.toDisplayString(e.unref(q)),1),e.unref(Xe)?e.renderSlot(o.$slots,"pagination",e.normalizeProps(e.mergeProps({key:0},{isFirstPage:e.unref(j),isLastPage:e.unref(R),currentPaginationNumber:g.value,maxPaginationNumber:e.unref(D),nextPage:J,prevPage:W})),void 0,!0):(e.openBlock(),e.createBlock(Ie,{key:1,"is-first-page":e.unref(j),"is-last-page":e.unref(R),onClickNextPage:J,onClickPrevPage:W},e.createSlots({_:2},[n.buttonsPagination?{name:"buttonsPagination",fn:e.withCtx(()=>[e.createVNode(we,{"current-pagination-number":g.value,"max-pagination-number":e.unref(D),onUpdatePage:te},null,8,["current-pagination-number","max-pagination-number"])])}:void 0]),1032,["is-first-page","is-last-page"]))])):e.createCommentVNode("",!0)],512))}}),[["__scopeId","data-v-1f73e757"]]);return Me}); |
@@ -6,3 +6,3 @@ { | ||
"private": false, | ||
"version": "1.1.19", | ||
"version": "1.1.20", | ||
"types": "./types/main.d.ts", | ||
@@ -40,6 +40,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"happy-dom": "^5.0.0", | ||
"vue": "^3.2.25", | ||
"vue-manual-data-masking": "^0.1.8", | ||
"vue3-easy-data-table": "^1.1.1" | ||
"vue": "^3.2.25" | ||
}, | ||
@@ -56,2 +53,3 @@ "devDependencies": { | ||
"eslint-plugin-vue": "^8.7.1", | ||
"happy-dom": "^5.0.0", | ||
"sass": "^1.51.0", | ||
@@ -58,0 +56,0 @@ "typescript": "^4.5.4", |
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
74940
1
16
1120
- Removedhappy-dom@^5.0.0
- Removedvue-manual-data-masking@^0.1.8
- Removedvue3-easy-data-table@^1.1.1
- Removed@types/concat-stream@1.6.1(transitive)
- Removed@types/form-data@0.0.33(transitive)
- Removed@types/node@10.17.608.10.66(transitive)
- Removed@types/qs@6.9.17(transitive)
- Removed@vue/compiler-sfc@2.7.16(transitive)
- Removedasap@2.0.6(transitive)
- Removedasynckit@0.4.0(transitive)
- Removedbuffer-from@1.1.2(transitive)
- Removedcall-bind@1.0.7(transitive)
- Removedcaseless@0.12.0(transitive)
- Removedcombined-stream@1.0.8(transitive)
- Removedconcat-stream@1.6.2(transitive)
- Removedcore-js@3.39.0(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removedcss.escape@1.5.1(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddelayed-stream@1.0.0(transitive)
- Removedes-define-property@1.0.0(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedform-data@2.5.2(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-intrinsic@1.2.4(transitive)
- Removedget-port@3.2.0(transitive)
- Removedgopd@1.0.1(transitive)
- Removedhappy-dom@5.4.0(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-proto@1.0.3(transitive)
- Removedhas-symbols@1.0.3(transitive)
- Removedhasown@2.0.2(transitive)
- Removedhe@1.2.0(transitive)
- Removedhttp-basic@8.1.3(transitive)
- Removedhttp-response-object@3.0.2(transitive)
- Removediconv-lite@0.6.3(transitive)
- Removedinherits@2.0.4(transitive)
- Removedisarray@1.0.0(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removednode-fetch@2.7.0(transitive)
- Removedobject-inspect@1.13.3(transitive)
- Removedparse-cache-control@1.0.1(transitive)
- Removedprettier@2.8.8(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedpromise@8.3.0(transitive)
- Removedqs@6.13.1(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedsafe-buffer@5.1.25.2.1(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedside-channel@1.0.6(transitive)
- Removedsource-map@0.6.1(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedsync-request@6.1.0(transitive)
- Removedsync-rpc@1.3.6(transitive)
- Removedthen-request@6.0.2(transitive)
- Removedtr46@0.0.3(transitive)
- Removedtypedarray@0.0.6(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedvue@2.7.16(transitive)
- Removedvue-class-component@7.2.6(transitive)
- Removedvue-manual-data-masking@0.1.14(transitive)
- Removedvue-property-decorator@9.1.2(transitive)
- Removedwebidl-conversions@3.0.17.0.0(transitive)
- Removedwhatwg-encoding@2.0.0(transitive)
- Removedwhatwg-mimetype@3.0.0(transitive)
- Removedwhatwg-url@5.0.0(transitive)