voiptime-components 0.0.17 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +38 -17
- package/dist/index.es.js +423 -410
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),O=(t,o)=>{const l=t.__vccOpts||t;for(const[n,r]of o)l[n]=r;return l},We={},De={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function He(t,o){return e.openBlock(),e.createElementBlock("svg",De,o[0]||(o[0]=[e.createElementVNode("path",{d:"M14 8L10 12L6 8",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Pe=O(We,[["render",He]]),Ae={},Oe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function je(t,o){return e.openBlock(),e.createElementBlock("svg",Oe,o[0]||(o[0]=[e.createElementVNode("path",{d:"M6 12L10 8L14 12",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Fe=O(Ae,[["render",je]]),Ze={},Ue={width:"14",height:"15",viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function qe(t,o){return e.openBlock(),e.createElementBlock("svg",Ue,o[0]||(o[0]=[e.createElementVNode("path",{d:"M11.8789 4.90517L11.2561 4.20124C10.4045 3.33504 9.28504 2.7626 8.06789 2.5709C6.85074 2.3792 5.60245 2.57874 4.5127 3.13917C3.42296 3.69961 2.55134 4.59032 2.03031 5.67593C1.50928 6.76155 1.36732 7.98272 1.626 9.15387C1.88469 10.325 2.52987 11.3821 3.46351 12.1645C4.39716 12.9469 5.56821 13.4119 6.79871 13.4887C8.02921 13.5655 9.25189 13.25 10.2809 12.5901C11.31 11.9302 12.0891 10.962 12.5 9.83266",stroke:"currentColor","stroke-width":"1.5","stroke-miterlimit":"10","stroke-linecap":"round"},null,-1),e.createElementVNode("path",{d:"M8.5157 6.5C8.07025 6.5 7.84716 5.96143 8.16215 5.64645L10.3086 3.5L12.455 1.35355C12.77 1.03857 13.3086 1.26165 13.3086 1.70711V6C13.3086 6.27614 13.0847 6.5 12.8086 6.5L8.5157 6.5Z",fill:"currentColor"},null,-1)]))}const Xe=O(Ze,[["render",qe]]),Ge={},Ke={width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ye(t,o){return e.openBlock(),e.createElementBlock("svg",Ke,o[0]||(o[0]=[e.createElementVNode("path",{d:"M8.60352 6L12.6035 10L8.60352 14",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Je=O(Ge,[["render",Ye]]),Qe={},et={width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tt(t,o){return e.openBlock(),e.createElementBlock("svg",et,o[0]||(o[0]=[e.createElementVNode("path",{d:"M12.3984 14L8.39844 10L12.3984 6",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const ot=O(Qe,[["render",tt]]),nt={},lt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function st(t,o){return e.openBlock(),e.createElementBlock("svg",lt,o[0]||(o[0]=[e.createElementVNode("path",{d:"M12.5 1.66406L11.1783 2.94156C10.6233 3.47906 10.345 3.7474 10 3.7474C9.655 3.7474 9.37667 3.47906 8.82167 2.94156L7.5 1.66406M14.5833 5.83073C15.7533 5.83073 16.3392 5.83073 16.7592 6.11156C16.9412 6.23319 17.0975 6.3895 17.2192 6.57156C17.5 6.99156 17.5 7.5774 17.5 8.7474V15.4141C17.5 16.5841 17.5 17.1699 17.2192 17.5899C17.0975 17.772 16.9412 17.9283 16.7592 18.0499C16.3392 18.3307 15.7533 18.3307 14.5833 18.3307C13.4133 18.3307 12.8275 18.3307 12.4075 18.0499C12.2254 17.9283 12.0691 17.772 11.9475 17.5899C11.6667 17.1699 11.6667 16.5841 11.6667 15.4141V8.7474C11.6667 7.5774 11.6667 6.99156 11.9475 6.57156C12.0691 6.3895 12.2254 6.23319 12.4075 6.11156C12.8275 5.83073 13.4133 5.83073 14.5833 5.83073ZM5.41667 5.83073C6.58667 5.83073 7.1725 5.83073 7.5925 6.11156C7.77456 6.23319 7.93087 6.3895 8.0525 6.57156C8.33333 6.99156 8.33333 7.5774 8.33333 8.7474V15.4141C8.33333 16.5841 8.33333 17.1699 8.0525 17.5899C7.93087 17.772 7.77456 17.9283 7.5925 18.0499C7.1725 18.3307 6.58667 18.3307 5.41667 18.3307C4.24667 18.3307 3.66083 18.3307 3.24083 18.0499C3.05877 17.9283 2.90246 17.772 2.78083 17.5899C2.5 17.1699 2.5 16.5841 2.5 15.4141V8.7474C2.5 7.5774 2.5 6.99156 2.78083 6.57156C2.90246 6.3895 3.05877 6.23319 3.24083 6.11156C3.66083 5.83073 4.24667 5.83073 5.41667 5.83073Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const rt=O(nt,[["render",st]]),at={},it={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ct(t,o){return e.openBlock(),e.createElementBlock("svg",it,o[0]||(o[0]=[e.createElementVNode("path",{d:"M8 3V5.2225M8 5.2225V10.7775M8 5.2225L9.875 4.25M8 5.2225L6.125 4.25M8 10.7775V13M8 10.7775L6.125 11.75M8 10.7775L9.875 11.75M13 8H10.7775M10.7775 8H5.2225M10.7775 8L11.75 9.875M10.7775 8L11.75 6.125M5.2225 8H3M5.2225 8L4.25 6.125M5.2225 8L4.25 9.875",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M12 14.7143L13.1151 15.6701C13.3268 15.8515 13.646 15.8247 13.8246 15.6105L16 13",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1)]))}const dt=O(at,[["render",ct]]),ut={},mt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function pt(t,o){return e.openBlock(),e.createElementBlock("svg",mt,o[0]||(o[0]=[e.createElementVNode("path",{d:"M8 3V5.2225M8 5.2225V10.7775M8 5.2225L9.875 4.25M8 5.2225L6.125 4.25M8 10.7775V13M8 10.7775L6.125 11.75M8 10.7775L9.875 11.75M13 8H10.7775M10.7775 8H5.2225M10.7775 8L11.75 9.875M10.7775 8L11.75 6.125M5.2225 8H3M5.2225 8L4.25 6.125M5.2225 8L4.25 9.875",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M13 16L14.5 14.5M16 13L14.5 14.5M14.5 14.5L13 13M14.5 14.5L16 16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1)]))}const ht=O(ut,[["render",pt]]),vt={},ft={xmlns:"http://www.w3.org/2000/svg",width:"60",height:"60",viewBox:"0 0 60 60",fill:"none"};function _t(t,o){return e.openBlock(),e.createElementBlock("svg",ft,o[0]||(o[0]=[e.createElementVNode("path",{d:"M24.195 7H18.625C17.1332 7 15.7024 7.59263 14.6475 8.64752C13.5926 9.70242 13 11.1332 13 12.625V46.375C13 47.8668 13.5926 49.2976 14.6475 50.3525C15.7024 51.4074 17.1332 52 18.625 52H41.125C42.6168 52 44.0476 51.4074 45.1025 50.3525C46.1574 49.2976 46.75 47.8668 46.75 46.375V29.5M24.195 7C27.3025 7 29.875 9.5175 29.875 12.625V18.25C29.875 19.7418 30.4676 21.1726 31.5225 22.2275C32.5774 23.2824 34.0082 23.875 35.5 23.875H41.125C42.6168 23.875 44.0476 24.4676 45.1025 25.5225C46.1574 26.5774 46.75 28.0082 46.75 29.5M24.195 7C33.42 7 46.75 20.4 46.75 29.5",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const gt=O(vt,[["render",_t]]),Ct={},kt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function bt(t,o){return e.openBlock(),e.createElementBlock("svg",kt,o[0]||(o[0]=[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.99479 8.75521C6.55276 8.75521 6.12884 8.57961 5.81628 8.26705C5.50372 7.95449 5.32812 7.53057 5.32812 7.08854C5.32812 6.64651 5.50372 6.22259 5.81628 5.91003C6.12884 5.59747 6.55276 5.42187 6.99479 5.42188C7.43682 5.42187 7.86074 5.59747 8.1733 5.91003C8.48586 6.22259 8.66146 6.64651 8.66146 7.08854C8.66146 7.53057 8.48586 7.95449 8.1733 8.26705C7.86074 8.57961 7.43682 8.75521 6.99479 8.75521ZM6.99479 14.5885C6.55276 14.5885 6.12884 14.4129 5.81628 14.1004C5.50372 13.7878 5.32812 13.3639 5.32812 12.9219C5.32812 12.4798 5.50372 12.0559 5.81628 11.7434C6.12884 11.4308 6.55276 11.2552 6.99479 11.2552C7.43682 11.2552 7.86074 11.4308 8.1733 11.7434C8.48586 12.0559 8.66146 12.4798 8.66146 12.9219C8.66146 13.3639 8.48586 13.7878 8.1733 14.1004C7.86074 14.4129 7.43682 14.5885 6.99479 14.5885Z",fill:"currentColor"},null,-1),e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.9948 8.75521C12.5528 8.75521 12.1288 8.57961 11.8163 8.26705C11.5037 7.95449 11.3281 7.53057 11.3281 7.08854C11.3281 6.64651 11.5037 6.22259 11.8163 5.91003C12.1288 5.59747 12.5528 5.42187 12.9948 5.42188C13.4368 5.42187 13.8607 5.59747 14.1733 5.91003C14.4859 6.22259 14.6615 6.64651 14.6615 7.08854C14.6615 7.53057 14.4859 7.95449 14.1733 8.26705C13.8607 8.57961 13.4368 8.75521 12.9948 8.75521ZM12.9948 14.5885C12.5528 14.5885 12.1288 14.4129 11.8163 14.1004C11.5037 13.7878 11.3281 13.3639 11.3281 12.9219C11.3281 12.4798 11.5037 12.0559 11.8163 11.7434C12.1288 11.4308 12.5528 11.2552 12.9948 11.2552C13.4368 11.2552 13.8607 11.4308 14.1733 11.7434C14.4859 12.0559 14.6615 12.4798 14.6615 12.9219C14.6615 13.3639 14.4859 13.7878 14.1733 14.1004C13.8607 14.4129 13.4368 14.5885 12.9948 14.5885Z",fill:"currentColor"},null,-1)]))}const wt=O(Ct,[["render",bt]]),yt={},Bt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xt(t,o){return e.openBlock(),e.createElementBlock("svg",Bt,o[0]||(o[0]=[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.1667 5.83333C9.72464 5.83333 9.30072 5.65774 8.98816 5.34518C8.67559 5.03262 8.5 4.60869 8.5 4.16667C8.5 3.72464 8.67559 3.30072 8.98816 2.98816C9.30072 2.67559 9.72464 2.5 10.1667 2.5C10.6087 2.5 11.0326 2.67559 11.3452 2.98816C11.6577 3.30072 11.8333 3.72464 11.8333 4.16667C11.8333 4.60869 11.6577 5.03262 11.3452 5.34518C11.0326 5.65774 10.6087 5.83333 10.1667 5.83333ZM10.1667 11.6667C9.72464 11.6667 9.30072 11.4911 8.98816 11.1785C8.67559 10.8659 8.5 10.442 8.5 10C8.5 9.55797 8.67559 9.13405 8.98816 8.82149C9.30072 8.50893 9.72464 8.33333 10.1667 8.33333C10.6087 8.33333 11.0326 8.50893 11.3452 8.82149C11.6577 9.13405 11.8333 9.55797 11.8333 10C11.8333 10.442 11.6577 10.8659 11.3452 11.1785C11.0326 11.4911 10.6087 11.6667 10.1667 11.6667ZM10.1667 17.5C9.72464 17.5 9.30072 17.3244 8.98816 17.0118C8.67559 16.6993 8.5 16.2754 8.5 15.8333C8.5 15.3913 8.67559 14.9674 8.98816 14.6548C9.30072 14.3423 9.72464 14.1667 10.1667 14.1667C10.6087 14.1667 11.0326 14.3423 11.3452 14.6548C11.6577 14.9674 11.8333 15.3913 11.8333 15.8333C11.8333 16.2754 11.6577 16.6993 11.3452 17.0118C11.0326 17.3244 10.6087 17.5 10.1667 17.5Z",fill:"currentColor"},null,-1)]))}const Et=O(yt,[["render",xt]]),Vt={},St={width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Mt(t,o){return e.openBlock(),e.createElementBlock("svg",St,o[0]||(o[0]=[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.33333 9.83333C6.33333 10.2754 6.15774 10.6993 5.84518 11.0118C5.53262 11.3244 5.10869 11.5 4.66667 11.5C4.22464 11.5 3.80072 11.3244 3.48816 11.0118C3.17559 10.6993 3 10.2754 3 9.83333C3 9.39131 3.17559 8.96738 3.48816 8.65482C3.80072 8.34226 4.22464 8.16667 4.66667 8.16667C5.10869 8.16667 5.53262 8.34226 5.84518 8.65482C6.15774 8.96738 6.33333 9.39131 6.33333 9.83333ZM12.1667 9.83333C12.1667 10.2754 11.9911 10.6993 11.6785 11.0118C11.3659 11.3244 10.942 11.5 10.5 11.5C10.058 11.5 9.63405 11.3244 9.32149 11.0118C9.00893 10.6993 8.83333 10.2754 8.83333 9.83333C8.83333 9.39131 9.00893 8.96738 9.32149 8.65482C9.63405 8.34226 10.058 8.16667 10.5 8.16667C10.942 8.16667 11.3659 8.34226 11.6785 8.65482C11.9911 8.96738 12.1667 9.39131 12.1667 9.83333ZM18 9.83333C18 10.2754 17.8244 10.6993 17.5118 11.0118C17.1993 11.3244 16.7754 11.5 16.3333 11.5C15.8913 11.5 15.4674 11.3244 15.1548 11.0118C14.8423 10.6993 14.6667 10.2754 14.6667 9.83333C14.6667 9.39131 14.8423 8.96738 15.1548 8.65482C15.4674 8.34226 15.8913 8.16667 16.3333 8.16667C16.7754 8.16667 17.1993 8.34226 17.5118 8.65482C17.8244 8.96738 18 9.39131 18 9.83333Z",fill:"currentColor"},null,-1)]))}const $t=O(Vt,[["render",Mt]]),Lt={},Nt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function zt(t,o){return e.openBlock(),e.createElementBlock("svg",Nt,o[0]||(o[0]=[e.createElementVNode("path",{d:"M6 14L10 10M10 10L14 6M10 10L6 6M10 10L14 14",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const It=O(Lt,[["render",zt]]),Tt={arrowDown:Pe,arrowTop:Fe,arrowRight:Je,arrowLeft:ot,arrowReload:Xe,columnInsert:rt,freeze:dt,unfreeze:ht,columnsMove:wt,empty:gt,listBullet:Et,listBulletHorizontal:$t,close:It},A=e.defineComponent({__name:"VIcon",props:{name:{}},setup(t){const o=t,l=e.computed(()=>Tt[o.name]);return(n,r)=>l.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value),{key:0})):e.createCommentVNode("",!0)}}),Rt={},Wt={class:"vt-loader"};function Dt(t,o){return e.openBlock(),e.createElementBlock("span",Wt)}const se=O(Rt,[["render",Dt]]),Ht=["disabled","type","data-placement"],Pt={key:2,class:"vt-button__content"},J=e.defineComponent({__name:"VButton",props:{type:{default:"default"},shape:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},icon:{},tooltip:{type:Boolean,default:!1},tooltipPlacement:{default:"top"},htmlType:{default:"button"}},emits:["click"],setup(t,{emit:o}){const l=t,n=o,r=e.useSlots(),s=e.computed(()=>!!(l.icon&&l.shape)),c=e.computed(()=>{var C,w;const d=r.default?r.default({}):null;return((w=(C=d==null?void 0:d[0])==null?void 0:C.children)==null?void 0:w.toString())??""}),a=e.computed(()=>["vt-button",`vt-button--${l.type}`,{[`vt-button--${l.shape}`]:l.shape,"vt-button--icon-only":s.value,"vt-button--disabled":l.disabled||l.loading,"vt-button--loading":l.loading}]),i=e.computed(()=>s.value&&l.tooltip?c.value:null),u=d=>{!l.disabled&&!l.loading&&n("click",d)};return(d,C)=>{const w=e.resolveDirective("tooltip");return e.withDirectives((e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(a.value),disabled:l.disabled||l.loading,type:l.htmlType,"data-placement":l.tooltipPlacement,onClick:u},[l.loading?(e.openBlock(),e.createBlock(se,{key:0,class:"vt-button__icon"})):l.icon?(e.openBlock(),e.createBlock(A,{key:1,name:l.icon,class:"vt-button__icon"},null,8,["name"])):e.createCommentVNode("",!0),s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",Pt,[e.renderSlot(d.$slots,"default")]))],10,Ht)),[[w,i.value]])}}}),At={key:0,class:"vt-modal__header"},Ot={key:0,class:"vt-modal__title"},jt={class:"vt-modal__content"},re=e.defineComponent({__name:"VModal",props:{modelValue:{type:Boolean},title:{},size:{default:"medium"},showCloseButton:{type:Boolean,default:!0},closeOnBackdropClick:{type:Boolean,default:!0},zIndex:{default:1e3}},emits:["update:modelValue","close"],setup(t,{emit:o}){const l=t,n=o,r=e.computed(()=>["vt-modal__container",`vt-modal__container--${l.size}`]),s=e.computed(()=>({zIndex:l.zIndex})),c=()=>{n("update:modelValue",!1),n("close")},a=()=>{l.closeOnBackdropClick&&c()};return(i,u)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[i.modelValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vt-modal__backdrop",style:e.normalizeStyle(s.value),onClick:a},[e.createElementVNode("div",{class:e.normalizeClass(r.value),onClick:u[0]||(u[0]=e.withModifiers(()=>{},["stop"]))},[i.title||i.showCloseButton?(e.openBlock(),e.createElementBlock("div",At,[i.title?(e.openBlock(),e.createElementBlock("h2",Ot,e.toDisplayString(i.title),1)):e.createCommentVNode("",!0),i.showCloseButton?(e.openBlock(),e.createBlock(A,{key:1,name:"close",class:"vt-modal__close",onClick:c})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",jt,[e.renderSlot(i.$slots,"default")])],2)],4)):e.createCommentVNode("",!0)]))}}),Ft={class:"vt-pagination"},Zt={class:"vt-pagination__info"},Ut={class:"vt-pagination__rows-per-page"},qt=["value"],Xt={class:"vt-pagination__navigation"},Gt=["disabled"],Kt=["onClick"],Yt=["disabled"],ge=e.defineComponent({__name:"VPagination",props:{totalItems:{},pageSize:{default:10},currentPage:{default:1},pageSizeOptions:{default:()=>[5,10,20,50]},maxVisiblePages:{default:6}},emits:["update:currentPage","update:pageSize","pageChange","reloadData"],setup(t,{emit:o}){const l=t,n=o,r=e.computed({get:()=>l.currentPage,set:y=>n("update:currentPage",y)}),s=e.computed({get:()=>l.pageSize,set:y=>n("update:pageSize",y)}),c=e.computed(()=>Math.ceil(l.totalItems/s.value)),a=e.computed(()=>l.totalItems===0?0:(r.value-1)*s.value+1),i=e.computed(()=>Math.min(r.value*s.value,l.totalItems)),u=e.computed(()=>r.value<=1),d=e.computed(()=>r.value>=c.value),C=e.computed(()=>{const y=[],N=c.value,S=r.value,H=l.maxVisiblePages;if(N<=H)for(let b=1;b<=N;b++)y.push(b);else{y.push(1);const b=Math.max(2,S-Math.floor(H/2)),L=Math.min(N-1,S+Math.floor(H/2));b>2&&y.push("...");for(let B=b;B<=L;B++)y.push(B);L<N-1&&y.push("..."),N>1&&y.push(N)}return y}),w=()=>{n("pageChange",{page:r.value,pageSize:s.value})},D=y=>{typeof y=="number"&&y!==r.value&&(r.value=y,w())},T=()=>{u.value||(r.value--,w())},Z=()=>{d.value||(r.value++,w())},W=()=>{r.value=1,w()},R=()=>{n("reloadData",r.value)};return e.watch(()=>l.totalItems,()=>{r.value>c.value&&c.value>0&&(r.value=c.value,w())}),(y,N)=>(e.openBlock(),e.createElementBlock("div",Ft,[e.createElementVNode("div",Zt,[e.createElementVNode("div",Ut,[N[1]||(N[1]=e.createElementVNode("label",{for:"rowsSelect",class:"vt-pagination__label"},"Рядків на сторінку:",-1)),e.withDirectives(e.createElementVNode("select",{id:"rowsSelect","onUpdate:modelValue":N[0]||(N[0]=S=>s.value=S),onChange:W,class:"vt-pagination__select"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.pageSizeOptions,S=>(e.openBlock(),e.createElementBlock("option",{key:S,value:S},e.toDisplayString(S),9,qt))),128))],544),[[e.vModelSelect,s.value]])]),e.createElementVNode("span",null,e.toDisplayString(a.value)+" - "+e.toDisplayString(i.value)+" з "+e.toDisplayString(y.totalItems),1)]),e.createElementVNode("div",Xt,[e.createElementVNode("button",{onClick:T,disabled:u.value,class:e.normalizeClass({"vt-pagination__nav-button":!0,"has-items":!u.value})},[e.createVNode(A,{name:"arrowLeft"})],10,Gt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,S=>(e.openBlock(),e.createElementBlock("button",{key:S,onClick:H=>D(S),class:e.normalizeClass(["vt-pagination__nav-button",{"vt-pagination__nav-button--active":S===r.value}])},e.toDisplayString(S),11,Kt))),128)),e.createElementVNode("button",{onClick:Z,disabled:d.value,class:e.normalizeClass({"vt-pagination__nav-button":!0,"has-items":!d.value})},[e.createVNode(A,{name:"arrowRight"})],10,Yt)]),e.createElementVNode("div",null,[e.createVNode(J,{icon:"arrowReload",shape:"circle",tooltip:"",tooltipPlacement:"left",onClick:R},{default:e.withCtx(()=>N[2]||(N[2]=[e.createTextVNode("Оновити дані ",-1)])),_:1,__:[2]})])]))}}),Jt=["for"],Qt=["id","name","value","checked","disabled","required",".indeterminate"],G=e.defineComponent({__name:"VCheckbox",props:{modelValue:{type:Boolean,default:void 0},checked:{type:Boolean,default:!1},label:{},disabled:{type:Boolean,default:!1},id:{},name:{},value:{},indeterminate:{type:Boolean,default:!1},size:{default:"medium"},variant:{default:"primary"},required:{type:Boolean,default:!1},isDouble:{type:Boolean,default:!1}},emits:["update:modelValue","change","focus","blur"],setup(t,{emit:o}){const l=t,n=o,r=()=>`vt-checkbox-${Math.random().toString(36).substr(2,9)}`,s=e.computed(()=>l.id||r()),c=e.computed(()=>l.modelValue??l.checked),a=d=>{if(l.disabled)return;const w=d.target.checked;n("update:modelValue",w),n("change",w,d)},i=d=>{n("focus",d)},u=d=>{n("blur",d)};return(d,C)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["vt-checkbox",`vt-checkbox--${d.size}`,`vt-checkbox--${d.variant}`,{"vt-checkbox--disabled":d.disabled,"vt-checkbox--double":d.isDouble}]),for:s.value},[e.createElementVNode("input",{id:s.value,name:d.name,value:d.value,checked:c.value,disabled:d.disabled,required:d.required,".indeterminate":d.indeterminate,type:"checkbox",class:"vt-checkbox__input",onChange:a,onFocus:i,onBlur:u},null,40,Qt),e.createElementVNode("div",{class:e.normalizeClass(["vt-checkbox__box",{"vt-checkbox__box--checked":c.value&&!d.indeterminate&&!d.isDouble,"vt-checkbox__box--indeterminate":d.indeterminate,"vt-checkbox__box--double":d.isDouble&&c.value,"vt-checkbox__box--disabled":d.disabled}])},[!d.indeterminate&&!d.isDouble?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(["vt-checkbox__checkmark",{"vt-checkbox__checkmark--checked":c.value}]),width:"10",height:"9",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C[0]||(C[0]=[e.createElementVNode("path",{d:"M1 5L3.58264 7.58264C3.80112 7.80112 4.16348 7.77113 4.34306 7.51971L9 1",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},null,-1)]),2)):e.createCommentVNode("",!0),d.isDouble&&c.value?(e.openBlock(),e.createElementBlock("svg",{key:1,class:e.normalizeClass(["vt-checkbox__checkmark",{"vt-checkbox__checkmark--checked":c.value}]),width:"13",height:"6",viewBox:"0 0 13 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},C[1]||(C[1]=[e.createElementVNode("path",{d:"M6 3L8.25 5L12 1",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M1 3L3.25 5L7 1",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),2)):e.createCommentVNode("",!0),d.indeterminate?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["vt-checkbox__indeterminate-mark",{"vt-checkbox__indeterminate-mark--visible":d.indeterminate}])},null,2)):e.createCommentVNode("",!0)],2),d.label||d.$slots.label||d.$slots.default?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["vt-checkbox__label",{"vt-checkbox__label--disabled":d.disabled}])},[e.renderSlot(d.$slots,"label",{},()=>[e.renderSlot(d.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(d.label),1)])])],2)):e.createCommentVNode("",!0)],10,Jt))}});function eo(t){const o=e.computed(()=>[...t].sort((r,s)=>r.pinnedLeft&&!s.pinnedLeft?-1:!r.pinnedLeft&&s.pinnedLeft||r.pinnedRight&&!s.pinnedRight?1:!r.pinnedRight&&s.pinnedRight?-1:0)),l=()=>{const r=o.value.length,s=o.value.filter(d=>d.width||d.minWidth),c=s.reduce((d,C)=>d+(C.width||C.minWidth||0),0),a=r-s.length;if(a===0)return 150;const u=Math.max(800-c,a*80);return Math.max(Math.floor(u/a),120)};return{sortedColumns:o,getDefaultColumnWidth:l,getStickyOffset:(r,s,c=!1)=>{const a=o.value;let i=0;if(r==="left"){c&&(i+=50);for(let u=0;u<s;u++){const d=a[u];d.pinnedLeft&&(i+=d.width||d.minWidth||l())}}else for(let u=a.length-1;u>s;u--){const d=a[u];d.pinnedRight&&(i+=d.width||d.minWidth||l())}return i}}}function to(t){const o=()=>{const s={};return t.maxHeight&&(s.maxHeight=`${t.maxHeight}px`),s},l=(s,c,a,i)=>{const u={};if(s.width)u.width=`${s.width}px`,u.minWidth=`${s.width}px`,u.maxWidth=`${s.width}px`;else if(s.minWidth)u.minWidth=`${s.minWidth}px`,u.width=`${s.minWidth}px`,u.maxWidth="none";else{const d=i();u.width=`${d}px`,u.minWidth="80px",u.maxWidth="none"}return s.pinnedLeft?(u.position="sticky",u.left=`${a("left",c,t.selectable)}px`,u.zIndex="10"):s.pinnedRight&&(u.position="sticky",u.right=`${a("right",c,!1)}px`,u.zIndex="10"),u};return{getTableWrapperStyle:o,getColumnStyle:l,getHeaderStyle:(s,c,a,i)=>{const u=l(s,c,a,i);return t.maxHeight&&(u.position="sticky",u.top="0",s.pinnedLeft||s.pinnedRight?u.zIndex="12":u.zIndex="11"),u},getFooterStyle:(s,c,a,i)=>{const u=l(s,c,a,i);return t.maxHeight&&(u.position="sticky",u.bottom="0",s.pinnedLeft||s.pinnedRight?u.zIndex="12":u.zIndex="11"),u}}}function oo(){const t=e.ref({resizingCol:null,startX:0,startWidth:0}),o=`url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><path d='M5 13L2 10L5 7' stroke='%23828282' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/><path d='M15 7L18 10L15 13' stroke='%23828282' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/><path d='M10 3L10 17' stroke='%23828282' stroke-width='3' stroke-linecap='round'/></svg>") 10 10, col-resize`;return{onMouseDown:(n,r,s,c)=>{n.preventDefault(),n.stopPropagation(),t.value.resizingCol=r,t.value.startX=n.clientX,t.value.startWidth=r.width||r.minWidth||s(r.prop);const a=u=>{const{resizingCol:d,startX:C,startWidth:w}=t.value;if(!d)return;document.querySelectorAll(`[data-resizer="${d.prop}"]`).forEach(R=>{R.classList.add("vt-table__resizer--active")});const D=u.clientX-C,T=d.minWidth||50,Z=d.maxWidth||1e3,W=Math.max(Math.min(w+D,Z),T);d.width=W},i=()=>{const{resizingCol:u}=t.value;document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",i),document.body.style.cursor="",document.body.style.userSelect="",document.body.classList.remove("vt-table-resizing"),u&&(document.querySelectorAll(`[data-resizer="${u.prop}"]`).forEach(d=>{d.classList.remove("vt-table__resizer--active")}),c&&u.width&&c(u.width)),t.value.resizingCol=null};document.addEventListener("mousemove",a),document.addEventListener("mouseup",i),document.body.style.cursor=o,document.body.style.userSelect="none",document.body.classList.add("vt-table-resizing")},resizeState:t}}function no(t,o,l,n){var F;const r=t.selectionKey||"id",s=e.ref([]),c=e.ref(null),a=e.ref(!1);(F=t.defaultSelection)!=null&&F.length&&(s.value=[...t.defaultSelection]);const i=p=>p[r],u=p=>a.value?!0:s.value.some(I=>i(I)===i(p)),d=e.computed(()=>o.value.filter(p=>u(p)).length),C=e.computed(()=>o.value.length>0&&d.value===o.value.length),w=e.computed(()=>{if(a.value)return!1;const p=d.value;return p>0&&p<o.value.length}),D=e.computed(()=>a.value?!0:C.value&&!w.value),T=e.computed(()=>a.value),Z=(p,I)=>{const M=i(p),P=s.value.some(v=>i(v)===i(p)),m=I!==void 0?I:!P;if(a.value&&!m){a.value=!1,n!=null&&n.value&&(s.value=n.value.filter(v=>i(v)!==M)),B(p,!1);return}a.value&&m||(m&&!P?s.value.push(p):!m&&P&&(s.value=s.value.filter(v=>i(v)!==M)),t.selectOnClickRow&&I===void 0&&H(m?p:null),B(p,m))},W=()=>{switch(R()){case"none":case"partial":y();break;case"allVisible":N();break;case"absoluteAll":S();break}},R=()=>a.value?"absoluteAll":C.value?"allVisible":d.value>0?"partial":"none",y=()=>{const p=[],I=new Set(s.value.map(M=>i(M)));s.value.forEach(M=>{p.push(M)}),o.value.forEach(M=>{I.has(i(M))||p.push(M)}),s.value=p,a.value=!1,B()},N=()=>{a.value=!0,n!=null&&n.value?s.value=[...n.value]:s.value=[...o.value],B(void 0,void 0,!0)},S=()=>{s.value=[],a.value=!1,c.value=null,B()},H=p=>{const I=c.value;c.value=p,l("current-change",{currentRow:c.value,oldCurrentRow:I})},b=()=>[...s.value],L=p=>{s.value=[...p],a.value=!1,B()},B=(p,I,M=!1)=>{const P={selection:[...s.value],row:p,selected:I,isAllSelected:M||a.value};l("selection-change",P)};return e.watch(()=>t.defaultSelection,p=>{p!=null&&p.length&&(s.value=[...p])}),{selectedRows:s,currentRow:c,isRowSelected:u,isAllSelected:D,isIndeterminate:w,isDoubleCheck:T,isFullSelection:a,toggleRowSelection:Z,toggleAllSelection:W,clearSelection:S,setCurrentRow:H,getSelectionRows:b,setSelectionRows:L,selectAbsolutelyAll:N}}const lo=(t,o,l="asc")=>{if(t==null&&o==null)return 0;if(t==null)return l==="asc"?1:-1;if(o==null)return l==="asc"?-1:1;if(t===o)return 0;let n=0;const r=Number(t),s=Number(o);return!isNaN(r)&&!isNaN(s)?n=r-s:ue(t)&&ue(o)?n=new Date(t).getTime()-new Date(o).getTime():typeof t=="boolean"&&typeof o=="boolean"?n=t===o?0:t?-1:1:n=String(t).localeCompare(String(o),void 0,{numeric:!0,sensitivity:"base"}),l==="desc"?-n:n},ue=t=>t instanceof Date?!isNaN(t.getTime()):typeof t=="string"&&/\d{4}-\d{2}-\d{2}|\//.test(t)?!isNaN(new Date(t).getTime()):!1,so=(t,o,l)=>{t.sortable&&l({prop:t.prop,direction:o})},me=(t,o)=>{const l=(o==null?void 0:o.prop)===t.prop,n=o==null?void 0:o.direction;return{asc:["vt-th__sort-icon",l&&n==="asc"&&"vt-th__sortable-active"].filter(Boolean).join(" "),desc:["vt-th__sort-icon",l&&n==="desc"&&"vt-th__sortable-active"].filter(Boolean).join(" ")}},ro=(t,o,l)=>{if(!o)return[...t];const n=l.find(s=>s.prop===o.prop);if(!(n!=null&&n.sortable))return[...t];const r=n.sortMethod||lo;return[...t].sort((s,c)=>{const a=s[n.prop],i=c[n.prop];return r(a,i,o.direction)})};class ao{constructor(){this.modalStack=[],this.baseZIndex=1e3}open(o={}){const l=`modal-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,n=document.createElement("div");n.setAttribute("data-vt-modal",l),document.body.appendChild(n);const r=e.ref(!0),s=this.baseZIndex+this.modalStack.length*10,c=e.createApp({setup(){const i=()=>{r.value=!1,setTimeout(()=>{q.closeById(l)},100)};return()=>e.h(re,{modelValue:r.value,"onUpdate:modelValue":i,title:o.title,size:o.size||"medium",showCloseButton:o.showCloseButton!==!1,closeOnBackdropClick:o.closeOnBackdropClick!==!1,onClose:i,zIndex:s},{default:()=>o.component?e.h(o.component,o.props||{}):o.content?e.h("div",{innerHTML:o.content}):null})}});c.mount(n);const a={id:l,app:c,container:n,isOpen:r};return this.modalStack.push(a),l}close(){if(this.modalStack.length>0){const o=this.modalStack[this.modalStack.length-1];this.closeById(o.id)}}closeById(o){const l=this.modalStack.findIndex(n=>n.id===o);if(l!==-1){const n=this.modalStack[l];this.cleanupModal(n),this.modalStack.splice(l,1),this.recalculateZIndices()}}closeAll(){for(;this.modalStack.length>0;){const o=this.modalStack.pop();o&&this.cleanupModal(o)}}getOpenModalsCount(){return this.modalStack.length}cleanupModal(o){o.app&&o.app.unmount(),o.container&&o.container.parentNode&&document.body.removeChild(o.container)}recalculateZIndices(){}}const q=new ao,Ce={install(t){t.config.globalProperties.$modal=q,t.config.globalProperties.$modalStack={closeAll:()=>q.closeAll(),getCount:()=>q.getOpenModalsCount(),closeById:o=>q.closeById(o)}}},io={class:"vt-columns-selector-body"},co={class:"vt-columns-selector"},uo={class:"vt-columns-selector__panel"},mo=["draggable","onDragstart","onDragover","onDrop"],po={key:0,class:"vt-columns-selector__panel-item-pinned"},ho={class:"vt-columns-selector__available"},vo=["onClick"],fo={key:0,class:"vt-columns-selector__group-columns"},_o={key:0,class:"vt-columns-selector__pinned-note"},go={class:"vt-modal__content-button"},Co=e.defineComponent({__name:"VTableColumnSelector",props:{columns:{},columnsSelector:{default:()=>[]}},emits:["update-columns"],setup(t,{emit:o}){const l=t,n=o,r=e.ref([]),s=e.ref(new Set),c=e.ref(-1),a=e.ref(-1),i=e.ref("before"),u=e.computed(()=>{const m={};return l.columnsSelector.forEach(v=>{if(v.name==="removed")return;const f=v.columns.map(V=>V.prop),g=r.value.filter(V=>f.includes(V.prop));g.length===0?m[v.name]={checked:!1,indeterminate:!1}:g.length===v.columns.length?m[v.name]={checked:!0,indeterminate:!1}:m[v.name]={checked:!1,indeterminate:!0}}),m}),d=e.computed(()=>l.columnsSelector.filter(m=>m.name!=="removed")),C=m=>m.pinnedLeft||m.pinnedRight,w=m=>!C(m),D=()=>{const m=r.value;let v=-1;for(let g=0;g<m.length;g++)m[g].pinnedLeft&&(v=g);let f=m.length;for(let g=0;g<m.length;g++)if(m[g].pinnedRight){f=g;break}return{minIndex:v+1,maxIndex:f-1}},T=m=>{const v=D();return!(m<v.minIndex||m>v.maxIndex+1)},Z=(m,v)=>{const f=r.value[v];if(!w(f)){m.preventDefault();return}c.value=v,m.dataTransfer&&(m.dataTransfer.effectAllowed="move",m.dataTransfer.setData("text/plain",f.prop)),document.body.style.cursor="grabbing"},W=(m,v)=>{if(c.value===-1)return;m.preventDefault();const f=m.currentTarget.getBoundingClientRect(),g=m.clientY,V=f.top+f.height/2;let x=v,U="before";g<V?(x=v,U="before"):(x=v+1,U="after"),c.value<x&&x--,T(x)?(a.value=v,i.value=U,m.dataTransfer.dropEffect="move"):(a.value=-1,m.dataTransfer.dropEffect="none")},R=()=>{setTimeout(()=>{c.value===-1&&(a.value=-1)},50)},y=(m,v)=>{if(m.preventDefault(),c.value===-1||a.value===-1){S();return}const f=m.currentTarget.getBoundingClientRect(),g=m.clientY,V=f.top+f.height/2;let x=v;if(g>=V&&(x=v+1),c.value<x&&x--,!T(x)||x===c.value){S();return}const U=[...r.value],[ee]=U.splice(c.value,1);U.splice(x,0,ee),r.value=U,S()},N=()=>{S()},S=()=>{c.value=-1,a.value=-1,i.value="before",document.body.style.cursor=""},H=m=>{const v=["vt-columns-selector__panel-item"];return c.value===m&&v.push("vt-columns-selector__panel-item--dragging"),a.value===m&&i.value==="before"&&v.push("vt-columns-selector__panel-item--drop-before"),a.value===m&&i.value==="after"&&v.push("vt-columns-selector__panel-item--drop-after"),v},b=()=>{r.value=[...l.columns.map(m=>({...m}))],l.columnsSelector.forEach(m=>{m.name!=="removed"&&s.value.add(m.name)})},L=(m,v)=>{if(v)r.value.some(f=>f.prop===m.prop)||r.value.push({...m});else{if(C(m))return;r.value=r.value.filter(f=>f.prop!==m.prop)}},B=(m,v)=>{if(v)m.columns.forEach(f=>{r.value.some(g=>g.prop===f.prop)||r.value.push({...f})});else{const f=[];m.columns.forEach(g=>{const V=r.value.find(x=>x.prop===g.prop);V&&!C(V)&&f.push(V)}),r.value=r.value.filter(g=>!f.some(V=>V.prop===g.prop))}},F=m=>r.value.some(v=>v.prop===m.prop),p=m=>{const v=r.value.find(f=>f.prop===m.prop);return!v||!C(v)},I=m=>{s.value.has(m)?s.value.delete(m):s.value.add(m)},M=()=>{n("update-columns",[...r.value]),q.close()},P=()=>{q.close()};return e.onMounted(()=>{b()}),(m,v)=>(e.openBlock(),e.createElementBlock("div",io,[e.createElementVNode("div",co,[e.createElementVNode("div",uo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,g)=>(e.openBlock(),e.createElementBlock("div",{key:f.prop,class:e.normalizeClass(H(g)),draggable:w(f),onDragstart:V=>Z(V,g),onDragover:V=>W(V,g),onDragleave:R,onDrop:V=>y(V,g),onDragend:N},[e.createVNode(A,{name:w(f)?"columnsMove":"freeze",class:e.normalizeClass(["vt-columns-selector__panel-item-icon",{"vt-columns-selector__panel-item-icon--draggable":w(f)}])},null,8,["name","class"]),e.createVNode(G,{label:f.label,checked:!0,disabled:C(f),onChange:V=>L(f,V),onClick:v[0]||(v[0]=e.withModifiers(()=>{},["stop"]))},null,8,["label","disabled","onChange"]),C(f)?(e.openBlock(),e.createElementBlock("span",po,"pinned")):e.createCommentVNode("",!0)],42,mo))),128))]),e.createElementVNode("div",ho,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,f=>{var g,V;return e.openBlock(),e.createElementBlock("div",{key:f.name,class:"vt-columns-selector__group"},[e.createElementVNode("div",{class:"vt-columns-selector__group-header",onClick:x=>I(f.name)},[e.createVNode(G,{label:f.label,checked:((g=u.value[f.name])==null?void 0:g.checked)||!1,indeterminate:((V=u.value[f.name])==null?void 0:V.indeterminate)||!1,onChange:x=>B(f,x),onClick:v[1]||(v[1]=e.withModifiers(()=>{},["stop"]))},null,8,["label","checked","indeterminate","onChange"]),f.icon?(e.openBlock(),e.createBlock(A,{key:0,name:f.icon,class:"vt-columns-selector__group-icon"},null,8,["name"])):e.createCommentVNode("",!0)],8,vo),s.value.has(f.name)?(e.openBlock(),e.createElementBlock("div",fo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.columns,x=>(e.openBlock(),e.createElementBlock("div",{key:x.prop,class:"vt-columns-selector__group-column"},[e.createVNode(G,{label:x.label,checked:F(x),disabled:!p(x),onChange:U=>L(x,U)},null,8,["label","checked","disabled","onChange"]),p(x)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",_o," (закріплена) "))]))),128))])):e.createCommentVNode("",!0)])}),128))])]),e.createElementVNode("div",go,[e.createVNode(J,{onClick:P},{default:e.withCtx(()=>v[2]||(v[2]=[e.createTextVNode("Скасувати",-1)])),_:1,__:[2]}),e.createVNode(J,{type:"primary",onClick:M},{default:e.withCtx(()=>v[3]||(v[3]=[e.createTextVNode("Зберегти",-1)])),_:1,__:[3]})])]))}}),ko=e.defineComponent({__name:"ColumnActions",props:{column:{},allColumns:{},columnsSelector:{}},emits:["pin","update-columns"],setup(t,{emit:o}){const l=t,n=o,r=e.ref(),s=e.ref(),c=e.ref(),a=e.ref(!1),i=e.ref(!1),u=e.ref([]),d=async()=>{if(await e.nextTick(),!r.value||!s.value)return;const b=s.value.getBoundingClientRect(),L=r.value,B=L.offsetWidth,F=b.left+b.width/2;L.style.top=`${b.bottom-20}px`,L.style.left=`${F-B/2}px`;const p=L.getBoundingClientRect();p.right>window.innerWidth&&(L.style.left=`${window.innerWidth-B-8}px`),p.left<0&&(L.style.left="8px")},C=b=>{b.stopPropagation(),!i.value&&(a.value?D():w())},w=()=>{i.value||(a.value=!0,d(),c.value&&(c.value.style.zIndex="22"))},D=()=>{i.value=!0,a.value=!1,c.value&&c.value.style.removeProperty("z-index"),setTimeout(()=>{i.value=!1},100)},T=b=>{var L,B;!((L=s.value)!=null&&L.contains(b.target))&&!((B=r.value)!=null&&B.contains(b.target))&&D()},Z=()=>{H()?(n("pin",l.column,"none"),console.log(`Колонка "${l.column.label}" відкріплена`)):(n("pin",l.column,"left"),console.log(`Колонка "${l.column.label}" прикріплена зліва`)),D()},W=b=>({name:"removed",label:"Видалені колонки",order:999,columns:b}),R=b=>{var I;const L=new Set(b.map(M=>M.prop)),B=new Set;(I=l.columnsSelector)==null||I.forEach(M=>{M.columns.forEach(P=>B.add(P.prop))}),l.allColumns.forEach(M=>B.add(M.prop));const F=[];B.forEach(M=>{var P;if(!L.has(M)){let m;(P=l.columnsSelector)==null||P.forEach(v=>{const f=v.columns.find(g=>g.prop===M);f&&(m=f)}),m||(m=l.allColumns.find(v=>v.prop===M)),m&&F.push(m)}});const p=[...l.columnsSelector||[]];F.length>0&&p.push(W(F)),u.value=p},y=()=>{R(l.allColumns),q.open({component:Co,title:"Управління колонками таблиці",props:{columns:l.allColumns,columnsSelector:u.value,"onUpdate-columns":b=>{console.log("ColumnActions отримав оновлені колонки:",b),n("update-columns",b),R(b)}},size:"large",closeOnBackdropClick:!1}),D()},N=()=>l.column.pinnedLeft,S=()=>l.column.pinnedRight,H=()=>N()||S();return e.onMounted(()=>{document.addEventListener("click",T),s.value&&(c.value=s.value.closest("th")),R(l.allColumns)}),e.onUnmounted(()=>{document.removeEventListener("click",T)}),(b,L)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"triggerRef",ref:s,class:"vt-table-header-actions",onClick:C},[e.createVNode(A,{name:"listBullet"}),a.value?(e.openBlock(),e.createElementBlock("ul",{key:0,ref_key:"menuRef",ref:r,class:e.normalizeClass(["dropdown-menu","vt-table-dropdown",{visible:a.value}])},[e.createElementVNode("li",{onClick:Z},[e.createVNode(A,{name:H()?"unfreeze":"freeze"},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(H()?"Розморозити":"Заморозити"),1)]),e.createElementVNode("li",{onClick:y},[e.createVNode(A,{name:"columnInsert"}),L[0]||(L[0]=e.createElementVNode("span",null,"Колонки",-1))])],2)):e.createCommentVNode("",!0)],512))}}),bo={class:"vt-table"},wo={class:"vt-th__content"},yo={class:"vt-th__content"},Bo={class:"vt-th__label"},xo={key:0,class:"vt-th__sortable"},Eo=["data-resizer","onMousedown"],Vo={key:0,class:"vt-table__empty-row"},So=["colspan"],Mo={class:"vt-table__empty-content"},$o=["onClick"],Lo={class:"vt-table__cell-content"},No={class:"vt-table__cell-content vt-table__cell-content--ellipsis"},zo=["data-resizer","onMousedown"],Io={key:0,class:"vt-table__summary"},To={class:"vt-table__cell-content vt-table__cell-content--summary"},ne=50,ke=e.defineComponent({__name:"VTable",props:e.mergeModels({data:{},maxHeight:{},defaultSort:{},showSummary:{type:Boolean},summaryMethod:{type:Function},columnsSelector:{},selectable:{type:Boolean},selectionKey:{},defaultSelection:{},selectOnClickRow:{type:Boolean},highlightCurrentRow:{type:Boolean},allData:{},columns:{}},{columns:{required:!1},columnsModifiers:{}}),emits:e.mergeModels(["sort-change","selection-change","current-change","row-click","update:columns","column-pin","column-resize","column-visibility","column-sort","columns-change","infinity-scroll"],["update:columns"]),setup(t,{expose:o,emit:l}){const n=t,r=e.useModel(t,"columns"),s=l,c=e.ref({}),a=e.ref(),i=e.reactive([]),u=e.ref(n.defaultSort||null),d=e.computed(()=>r.value!==void 0),C=e.computed(()=>n.data&&n.data.length>0),w=e.ref(!1),D=e.ref(0);let T=null;const Z=()=>{d.value&&r.value?i.splice(0,i.length,...r.value):n.columns&&i.splice(0,i.length,...n.columns)};e.watch(()=>r.value,h=>{h&&d.value&&i.splice(0,i.length,...h)},{deep:!0}),e.watch(()=>n.columns,h=>{h&&!d.value&&i.splice(0,i.length,...h)},{deep:!0}),e.provide("vt-table-columns",i);const{sortedColumns:W,getDefaultColumnWidth:R,getStickyOffset:y}=eo(i),{getTableWrapperStyle:N,getColumnStyle:S,getHeaderStyle:H,getFooterStyle:b}=to(n),{onMouseDown:L}=oo(),B=e.computed(()=>ro(n.data,u.value,i)),F=e.computed(()=>n.allData||n.data),p=n.selectable?no(n,B,s,F):null,I=()=>({width:`${ne}px`,minWidth:`${ne}px`,maxWidth:`${ne}px`,left:"0px",position:"sticky",zIndex:10}),M=()=>{const h=I();return n.maxHeight?{...h,top:"0px",zIndex:11}:h},P=()=>{const h=I();return n.maxHeight?{...h,bottom:"0px",zIndex:11}:h},m=()=>{if(!a.value||w.value)return;const h=a.value,_=h.scrollTop,E=h.scrollHeight,$=h.clientHeight,z=30;T&&clearTimeout(T),T=setTimeout(()=>{const Q=_-D.value>1,k=E-_-$<=z,K=E-_-$<=5;D.value=_,Q&&(k||K)&&(w.value=!0,s("infinity-scroll"),setTimeout(()=>{w.value=!1},1e3))},50)},v=()=>{w.value=!1};e.onMounted(()=>{a.value&&a.value.addEventListener("scroll",m)}),e.onUnmounted(()=>{T&&clearTimeout(T),a.value&&a.value.removeEventListener("scroll",m)});const f=(h,_)=>{so(h,_,E=>{var $,z;(($=u.value)==null?void 0:$.prop)===h.prop&&u.value.direction===_?u.value=null:u.value=E,s("sort-change",{column:h,direction:((z=u.value)==null?void 0:z.direction)||null,prop:h.prop,sortedData:B.value})})},g=(h,_)=>{const E={pinnedLeft:_==="left",pinnedRight:_==="right"};x(h.prop,E),s("column-pin",{column:{...h,...E},position:_})},V=h=>{i.splice(0,i.length,...h),d.value&&(r.value=[...h]),s("columns-change",[...h])},x=(h,_)=>{const E=i.findIndex($=>$.prop===h);if(E!==-1){if(Object.assign(i[E],_),d.value&&r.value){const $=r.value.findIndex(z=>z.prop===h);if($!==-1){const z=[...r.value];z[$]={...z[$],..._},r.value=z}}s("columns-change",[...i])}else console.error("Колонку не знайдено:",h,"Доступні колонки:",i.map($=>$.prop))},U=(h,_,E)=>{s("row-click",{row:h,column:_,event:E}),n.highlightCurrentRow&&p&&p.setCurrentRow(h)},ee=(h,_,E)=>{E.stopPropagation(),p&&p.toggleRowSelection(_,h)},Be=(h,_)=>{_.stopPropagation(),p&&p.toggleAllSelection()},ae=(h,_)=>{h&&(c.value[_]=h)},ie=(h,_)=>{const E=_.width||R();L(h,_,R,$=>{x(_.prop,{width:$}),s("column-resize",{column:{..._,width:$},width:$,oldWidth:E})})},xe=(h,_)=>S(h,_,y,R),Ee=(h,_)=>H(h,_,y,R),Ve=(h,_)=>b(h,_,y,R),Se=(h,_)=>{if(!_||!_.prop)return"";const E=h[_.prop];return E==null?"":String(E)},Me=e.computed(()=>{if(!n.showSummary||!C.value)return{};const h=i;if(typeof n.summaryMethod=="function"){const _=n.summaryMethod({columns:h,data:B.value});return h.reduce((E,$,z)=>(E[$.prop]=_[z],E),{})}return h.reduce((_,E)=>{const $=B.value.map(z=>z[E.prop]);return _[E.prop]=$.every(z=>typeof z=="number")?$.reduce((z,Y)=>z+Y,0):"",_},{})}),$e=e.computed(()=>n.showSummary&&C.value),Le=(h,_)=>{p&&p.toggleRowSelection(h,_)},Ne=()=>{p&&p.toggleAllSelection()},ze=()=>{p&&p.selectAbsolutelyAll()},Ie=()=>{p&&p.clearSelection()},Te=()=>p?p.getSelectionRows():[],Re=h=>{p&&p.setSelectionRows(h)};return e.onMounted(()=>{Z()}),o({toggleRowSelection:Le,toggleAllSelection:Ne,selectAbsolutelyAll:ze,clearSelection:Ie,getSelectionRows:Te,setSelectionRows:Re,resetInfinityScroll:v}),(h,_)=>{var $,z,Y,Q;const E=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",{ref_key:"tableWrapperRef",ref:a,class:"vt-table-wrapper",style:e.normalizeStyle(e.unref(N)()),onScroll:m},[e.createElementVNode("table",bo,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[n.selectable?(e.openBlock(),e.createElementBlock("th",{key:0,class:e.normalizeClass(["vt-table__th vt-table__th--selection",{"vt-table__th--sticky":n.maxHeight,"vt-table__th--pinned-left":!0}]),style:e.normalizeStyle(M())},[e.createElementVNode("div",wo,[e.createVNode(G,{checked:($=e.unref(p))==null?void 0:$.isAllSelected.value,indeterminate:(z=e.unref(p))==null?void 0:z.isIndeterminate.value,"is-double":(Q=(Y=e.unref(p))==null?void 0:Y.isDoubleCheck)==null?void 0:Q.value,onChange:Be},null,8,["checked","indeterminate","is-double"])])],6)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(W),(k,K)=>(e.openBlock(),e.createElementBlock("th",{key:k.prop,ref_for:!0,ref:X=>ae(X,k.prop),style:e.normalizeStyle(Ee(k,K)),class:e.normalizeClass(["vt-table__th",{"vt-table__th--sticky":n.maxHeight,"vt-table__th--pinned-left":k.pinnedLeft,"vt-table__th--pinned-right":k.pinnedRight,"vt-table__th--sortable":k.sortable}])},[e.createElementVNode("div",yo,[e.createElementVNode("div",Bo,e.toDisplayString(k.label),1),k.sortable?(e.openBlock(),e.createElementBlock("div",xo,[e.createVNode(A,{name:"arrowTop",class:e.normalizeClass(e.unref(me)(k,u.value).asc),onClick:e.withModifiers(X=>f(k,"asc"),["stop"])},null,8,["class","onClick"]),e.createVNode(A,{name:"arrowDown",class:e.normalizeClass(e.unref(me)(k,u.value).desc),onClick:e.withModifiers(X=>f(k,"desc"),["stop"])},null,8,["class","onClick"])])):e.createCommentVNode("",!0),k.actionColumn?(e.openBlock(),e.createBlock(ko,{key:1,column:k,"all-columns":e.unref(W),columnsSelector:n.columnsSelector,onPin:g,onUpdateColumns:V},null,8,["column","all-columns","columnsSelector"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:"vt-table__resizer","data-resizer":k.prop,onMousedown:X=>ie(X,k)},null,40,Eo)],6))),128))])]),e.createElementVNode("tbody",null,[C.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(B.value,(k,K)=>{var X,ce,de;return e.openBlock(),e.createElementBlock("tr",{key:k.id,class:e.normalizeClass(["vt-table__row",{"vt-table__row--selected":(X=e.unref(p))==null?void 0:X.isRowSelected(k),"vt-table__row--current":((ce=e.unref(p))==null?void 0:ce.currentRow.value)===k,"vt-table__row--clickable":n.selectOnClickRow||n.highlightCurrentRow}]),onClick:j=>U(k,e.unref(W)[0],j)},[n.selectable?(e.openBlock(),e.createElementBlock("td",{key:0,class:e.normalizeClass(["vt-table__td vt-table__td--selection",{"vt-table__td--pinned-left":!0}]),style:e.normalizeStyle(I())},[e.createElementVNode("div",Lo,[e.createVNode(G,{checked:(de=e.unref(p))==null?void 0:de.isRowSelected(k),onChange:(j,te)=>ee(j,k,te)},null,8,["checked","onChange"])])],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(W),(j,te)=>(e.openBlock(),e.createElementBlock("td",{key:j.prop,ref_for:!0,ref:oe=>ae(oe,j.prop),style:e.normalizeStyle(xe(j,te)),class:e.normalizeClass(["vt-table__td",{"vt-table__td--pinned-left":j.pinnedLeft,"vt-table__td--pinned-right":j.pinnedRight}])},[e.withDirectives((e.openBlock(),e.createElementBlock("div",No,_[1]||(_[1]=[e.createTextVNode(" sss ",-1)]))),[[E,j.showOverflowTooltip?Se(k,j):null]]),e.createElementVNode("div",{class:"vt-table__resizer","data-resizer":j.prop,onMousedown:oe=>ie(oe,j)},null,40,zo)],6))),128))],10,$o)}),128)):(e.openBlock(),e.createElementBlock("tr",Vo,[e.createElementVNode("td",{colspan:e.unref(W).length+(n.selectable?1:0),class:"vt-table__empty-cell"},[e.createElementVNode("div",Mo,[e.createVNode(A,{name:"empty",class:"vt-table__empty-icon"}),_[0]||(_[0]=e.createElementVNode("span",{class:"vt-table__empty-text"},"Немає даних!",-1))])],8,So)]))]),$e.value?(e.openBlock(),e.createElementBlock("tfoot",Io,[e.createElementVNode("tr",null,[n.selectable?(e.openBlock(),e.createElementBlock("td",{key:0,class:e.normalizeClass(["vt-table__td",{"vt-table__td--pinned-left":!0}]),style:e.normalizeStyle(P())},_[2]||(_[2]=[e.createElementVNode("div",{class:"vt-table__cell-content vt-table__cell-content--summary"},null,-1)]),4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(W),(k,K)=>(e.openBlock(),e.createElementBlock("td",{key:k.prop,style:e.normalizeStyle(Ve(k,K)),class:e.normalizeClass(["vt-table__td",{"vt-table__td--pinned-left":k.pinnedLeft,"vt-table__td--pinned-right":k.pinnedRight}])},[e.createElementVNode("div",To,e.toDisplayString(Me.value[k.prop]),1)],6))),128))])])):e.createCommentVNode("",!0)])],36)}}}),be=e.defineComponent({__name:"VTableColumn",props:{prop:{},label:{},width:{},minWidth:{},maxWidth:{},sortable:{type:Boolean,default:!0},pinnedLeft:{type:Boolean,default:!1},pinnedRight:{type:Boolean,default:!1},actionColumn:{type:Boolean,default:!0},showOverflowTooltip:{type:Boolean,default:!0},selectable:{type:Boolean,default:!0},renderSlot:{},sortMethod:{}},setup(t){const o=t,l=e.useSlots(),n=e.inject("vt-table-columns");n||console.error("VTableColumn: не знайдено контекст таблиці. Переконайтеся, що компонент використовується всередині VTable.");const r=()=>({prop:o.prop,label:o.label,width:o.width,minWidth:o.minWidth,maxWidth:o.maxWidth,sortable:o.sortable,pinnedLeft:o.pinnedLeft,pinnedRight:o.pinnedRight,actionColumn:o.actionColumn,showOverflowTooltip:o.showOverflowTooltip,selectable:o.selectable,renderSlot:l[o.prop]??l.default??l.slot});let s=-1;return e.onMounted(()=>{if(n){const c=r();n.push(c),s=n.length-1}}),e.watch(()=>[o.width,o.minWidth,o.maxWidth,o.sortable,o.pinnedLeft,o.pinnedRight,o.actionColumn,o.showOverflowTooltip,o.selectable,o.label],()=>{if(n&&s!==-1){const c=n.findIndex(a=>a.prop===o.prop);if(c!==-1){const a=n[c],i={...r(),renderSlot:a.renderSlot};n[c]=i}}},{deep:!0}),e.onUnmounted(()=>{if(n){const c=n.findIndex(a=>a.prop===o.prop);c>-1&&n.splice(c,1)}}),(c,a)=>null}}),pe=(t,o)=>{const l=document.createElement("div");l.className=`vt-tooltip vt-tooltip--${o}`,l.innerText=t,Object.assign(l.style,{position:"absolute",background:"rgba(0, 0, 0, 0.8)",color:"white",padding:"8px 12px",borderRadius:"4px",fontSize:"12px",lineHeight:"1.4",zIndex:"9999",pointerEvents:"none",visibility:"hidden",opacity:"0",transition:"opacity 0.2s ease, visibility 0.2s ease",maxWidth:"300px",minWidth:"max-content",wordWrap:"break-word",whiteSpace:"normal",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.2)"}),t.length<50&&(l.style.whiteSpace="nowrap");const n=document.createElement("div");switch(n.className="vt-tooltip__arrow",Object.assign(n.style,{position:"absolute",width:"0",height:"0",borderStyle:"solid"}),o){case"top":Object.assign(n.style,{top:"100%",left:"50%",marginLeft:"-5px",borderWidth:"5px 5px 0 5px",borderColor:"rgba(0, 0, 0, 0.8) transparent transparent transparent"});break;case"bottom":Object.assign(n.style,{bottom:"100%",left:"50%",marginLeft:"-5px",borderWidth:"0 5px 5px 5px",borderColor:"transparent transparent rgba(0, 0, 0, 0.8) transparent"});break;case"left":Object.assign(n.style,{top:"50%",left:"100%",marginTop:"-5px",borderWidth:"5px 0 5px 5px",borderColor:"transparent transparent transparent rgba(0, 0, 0, 0.8)"});break;case"right":Object.assign(n.style,{top:"50%",right:"100%",marginTop:"-5px",borderWidth:"5px 5px 5px 0",borderColor:"transparent rgba(0, 0, 0, 0.8) transparent transparent"});break}return l.appendChild(n),l},le=(t,o,l)=>{const n=o.getBoundingClientRect(),r=t.getBoundingClientRect(),s=window.pageXOffset||document.documentElement.scrollLeft,c=window.pageYOffset||document.documentElement.scrollTop;let a=0,i=0;switch(l){case"top":a=n.top+c-r.height-8,i=n.left+s+(n.width-r.width)/2;break;case"bottom":a=n.bottom+c+8,i=n.left+s+(n.width-r.width)/2;break;case"left":a=n.top+c+(n.height-r.height)/2,i=n.left+s-r.width-8;break;case"right":a=n.top+c+(n.height-r.height)/2,i=n.right+s+8;break}const u=window.innerWidth,d=window.innerHeight;i<8?i=8:i+r.width>u-8&&(i=u-r.width-8),a<c+8?l==="top"?a=n.bottom+c+8:a=c+8:a+r.height>c+d-8&&(l==="bottom"?a=n.top+c-r.height-8:a=c+d-r.height-8),t.style.top=`${a}px`,t.style.left=`${i}px`},he=(t,o,l)=>{t.parentElement||document.body.appendChild(t),t.style.visibility="visible",le(t,o,l),requestAnimationFrame(()=>{t.style.opacity="1"})},ve=t=>{t.style.opacity="0",t.style.visibility="hidden"},fe=t=>t.scrollWidth>t.clientWidth||t.scrollHeight>t.clientHeight,_e=t=>!!t.closest(".vt-table, table"),we={mounted(t,o){var i;const l=(i=o.value)==null?void 0:i.trim();if(!l)return;const n=t.dataset.placement||"top",r=pe(l,n);t.__tooltipEl=r;const s=()=>{(_e(t)?fe(t):!0)&&he(r,t,n)},c=()=>{ve(r)},a=()=>{r.style.opacity==="1"&&le(r,t,n)};t.__mouseenterHandler=s,t.__mouseleaveHandler=c,t.__scrollHandler=a,t.addEventListener("mouseenter",s),t.addEventListener("mouseleave",c),window.addEventListener("scroll",a,!0),window.addEventListener("resize",a)},updated(t,o){var n;const l=(n=o.value)==null?void 0:n.trim();if(t.__tooltipEl)l?t.__tooltipEl.firstChild.textContent=l:(t.__tooltipEl.parentElement&&t.__tooltipEl.parentElement.removeChild(t.__tooltipEl),delete t.__tooltipEl);else if(l){const r=t.dataset.placement||"top",s=pe(l,r);t.__tooltipEl=s;const c=()=>{(_e(t)?fe(t):!0)&&he(s,t,r)},a=()=>{ve(s)},i=()=>{s.style.opacity==="1"&&le(s,t,r)};t.__mouseenterHandler=c,t.__mouseleaveHandler=a,t.__scrollHandler=i,t.addEventListener("mouseenter",c),t.addEventListener("mouseleave",a),window.addEventListener("scroll",i,!0),window.addEventListener("resize",i)}},beforeUnmount(t){t.__tooltipEl&&t.__tooltipEl.parentElement&&(t.__tooltipEl.parentElement.removeChild(t.__tooltipEl),delete t.__tooltipEl),t.__mouseenterHandler&&(t.removeEventListener("mouseenter",t.__mouseenterHandler),delete t.__mouseenterHandler),t.__mouseleaveHandler&&(t.removeEventListener("mouseleave",t.__mouseleaveHandler),delete t.__mouseleaveHandler),t.__scrollHandler&&(window.removeEventListener("scroll",t.__scrollHandler,!0),window.removeEventListener("resize",t.__scrollHandler),delete t.__scrollHandler)}},ye={install(t,o={}){const{prefix:l="V",modal:n=!0}=o;t.component(`${l}Button`,J),t.component(`${l}Icon`,A),t.component(`${l}Loader`,se),t.component(`${l}Modal`,re),t.component(`${l}Pagination`,ge),t.component(`${l}Checkbox`,G),t.component(`${l}Table`,ke),t.component(`${l}TableColumn`,be),t.directive("tooltip",we),n&&t.use(Ce)}},Ro=ye.install;exports.VButton=J;exports.VCheckbox=G;exports.VIcon=A;exports.VLoader=se;exports.VModal=re;exports.VModalPlugin=Ce;exports.VPagination=ge;exports.VTable=ke;exports.VTableColumn=be;exports.default=ye;exports.install=Ro;exports.modalManager=q;exports.tooltipDirective=we;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),j=(t,o)=>{const l=t.__vccOpts||t;for(const[n,r]of o)l[n]=r;return l},We={},De={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function He(t,o){return e.openBlock(),e.createElementBlock("svg",De,o[0]||(o[0]=[e.createElementVNode("path",{d:"M14 8L10 12L6 8",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Pe=j(We,[["render",He]]),Ae={},Oe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function je(t,o){return e.openBlock(),e.createElementBlock("svg",Oe,o[0]||(o[0]=[e.createElementVNode("path",{d:"M6 12L10 8L14 12",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Fe=j(Ae,[["render",je]]),Ze={},Ue={width:"14",height:"15",viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function qe(t,o){return e.openBlock(),e.createElementBlock("svg",Ue,o[0]||(o[0]=[e.createElementVNode("path",{d:"M11.8789 4.90517L11.2561 4.20124C10.4045 3.33504 9.28504 2.7626 8.06789 2.5709C6.85074 2.3792 5.60245 2.57874 4.5127 3.13917C3.42296 3.69961 2.55134 4.59032 2.03031 5.67593C1.50928 6.76155 1.36732 7.98272 1.626 9.15387C1.88469 10.325 2.52987 11.3821 3.46351 12.1645C4.39716 12.9469 5.56821 13.4119 6.79871 13.4887C8.02921 13.5655 9.25189 13.25 10.2809 12.5901C11.31 11.9302 12.0891 10.962 12.5 9.83266",stroke:"currentColor","stroke-width":"1.5","stroke-miterlimit":"10","stroke-linecap":"round"},null,-1),e.createElementVNode("path",{d:"M8.5157 6.5C8.07025 6.5 7.84716 5.96143 8.16215 5.64645L10.3086 3.5L12.455 1.35355C12.77 1.03857 13.3086 1.26165 13.3086 1.70711V6C13.3086 6.27614 13.0847 6.5 12.8086 6.5L8.5157 6.5Z",fill:"currentColor"},null,-1)]))}const Xe=j(Ze,[["render",qe]]),Ge={},Ke={width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ye(t,o){return e.openBlock(),e.createElementBlock("svg",Ke,o[0]||(o[0]=[e.createElementVNode("path",{d:"M8.60352 6L12.6035 10L8.60352 14",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Je=j(Ge,[["render",Ye]]),Qe={},et={width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tt(t,o){return e.openBlock(),e.createElementBlock("svg",et,o[0]||(o[0]=[e.createElementVNode("path",{d:"M12.3984 14L8.39844 10L12.3984 6",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const ot=j(Qe,[["render",tt]]),nt={},lt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function st(t,o){return e.openBlock(),e.createElementBlock("svg",lt,o[0]||(o[0]=[e.createElementVNode("path",{d:"M12.5 1.66406L11.1783 2.94156C10.6233 3.47906 10.345 3.7474 10 3.7474C9.655 3.7474 9.37667 3.47906 8.82167 2.94156L7.5 1.66406M14.5833 5.83073C15.7533 5.83073 16.3392 5.83073 16.7592 6.11156C16.9412 6.23319 17.0975 6.3895 17.2192 6.57156C17.5 6.99156 17.5 7.5774 17.5 8.7474V15.4141C17.5 16.5841 17.5 17.1699 17.2192 17.5899C17.0975 17.772 16.9412 17.9283 16.7592 18.0499C16.3392 18.3307 15.7533 18.3307 14.5833 18.3307C13.4133 18.3307 12.8275 18.3307 12.4075 18.0499C12.2254 17.9283 12.0691 17.772 11.9475 17.5899C11.6667 17.1699 11.6667 16.5841 11.6667 15.4141V8.7474C11.6667 7.5774 11.6667 6.99156 11.9475 6.57156C12.0691 6.3895 12.2254 6.23319 12.4075 6.11156C12.8275 5.83073 13.4133 5.83073 14.5833 5.83073ZM5.41667 5.83073C6.58667 5.83073 7.1725 5.83073 7.5925 6.11156C7.77456 6.23319 7.93087 6.3895 8.0525 6.57156C8.33333 6.99156 8.33333 7.5774 8.33333 8.7474V15.4141C8.33333 16.5841 8.33333 17.1699 8.0525 17.5899C7.93087 17.772 7.77456 17.9283 7.5925 18.0499C7.1725 18.3307 6.58667 18.3307 5.41667 18.3307C4.24667 18.3307 3.66083 18.3307 3.24083 18.0499C3.05877 17.9283 2.90246 17.772 2.78083 17.5899C2.5 17.1699 2.5 16.5841 2.5 15.4141V8.7474C2.5 7.5774 2.5 6.99156 2.78083 6.57156C2.90246 6.3895 3.05877 6.23319 3.24083 6.11156C3.66083 5.83073 4.24667 5.83073 5.41667 5.83073Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const rt=j(nt,[["render",st]]),at={},it={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ct(t,o){return e.openBlock(),e.createElementBlock("svg",it,o[0]||(o[0]=[e.createElementVNode("path",{d:"M8 3V5.2225M8 5.2225V10.7775M8 5.2225L9.875 4.25M8 5.2225L6.125 4.25M8 10.7775V13M8 10.7775L6.125 11.75M8 10.7775L9.875 11.75M13 8H10.7775M10.7775 8H5.2225M10.7775 8L11.75 9.875M10.7775 8L11.75 6.125M5.2225 8H3M5.2225 8L4.25 6.125M5.2225 8L4.25 9.875",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M12 14.7143L13.1151 15.6701C13.3268 15.8515 13.646 15.8247 13.8246 15.6105L16 13",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1)]))}const dt=j(at,[["render",ct]]),ut={},mt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function pt(t,o){return e.openBlock(),e.createElementBlock("svg",mt,o[0]||(o[0]=[e.createElementVNode("path",{d:"M8 3V5.2225M8 5.2225V10.7775M8 5.2225L9.875 4.25M8 5.2225L6.125 4.25M8 10.7775V13M8 10.7775L6.125 11.75M8 10.7775L9.875 11.75M13 8H10.7775M10.7775 8H5.2225M10.7775 8L11.75 9.875M10.7775 8L11.75 6.125M5.2225 8H3M5.2225 8L4.25 6.125M5.2225 8L4.25 9.875",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M13 16L14.5 14.5M16 13L14.5 14.5M14.5 14.5L13 13M14.5 14.5L16 16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1)]))}const ht=j(ut,[["render",pt]]),vt={},ft={xmlns:"http://www.w3.org/2000/svg",width:"60",height:"60",viewBox:"0 0 60 60",fill:"none"};function _t(t,o){return e.openBlock(),e.createElementBlock("svg",ft,o[0]||(o[0]=[e.createElementVNode("path",{d:"M24.195 7H18.625C17.1332 7 15.7024 7.59263 14.6475 8.64752C13.5926 9.70242 13 11.1332 13 12.625V46.375C13 47.8668 13.5926 49.2976 14.6475 50.3525C15.7024 51.4074 17.1332 52 18.625 52H41.125C42.6168 52 44.0476 51.4074 45.1025 50.3525C46.1574 49.2976 46.75 47.8668 46.75 46.375V29.5M24.195 7C27.3025 7 29.875 9.5175 29.875 12.625V18.25C29.875 19.7418 30.4676 21.1726 31.5225 22.2275C32.5774 23.2824 34.0082 23.875 35.5 23.875H41.125C42.6168 23.875 44.0476 24.4676 45.1025 25.5225C46.1574 26.5774 46.75 28.0082 46.75 29.5M24.195 7C33.42 7 46.75 20.4 46.75 29.5",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const gt=j(vt,[["render",_t]]),Ct={},kt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function bt(t,o){return e.openBlock(),e.createElementBlock("svg",kt,o[0]||(o[0]=[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.99479 8.75521C6.55276 8.75521 6.12884 8.57961 5.81628 8.26705C5.50372 7.95449 5.32812 7.53057 5.32812 7.08854C5.32812 6.64651 5.50372 6.22259 5.81628 5.91003C6.12884 5.59747 6.55276 5.42187 6.99479 5.42188C7.43682 5.42187 7.86074 5.59747 8.1733 5.91003C8.48586 6.22259 8.66146 6.64651 8.66146 7.08854C8.66146 7.53057 8.48586 7.95449 8.1733 8.26705C7.86074 8.57961 7.43682 8.75521 6.99479 8.75521ZM6.99479 14.5885C6.55276 14.5885 6.12884 14.4129 5.81628 14.1004C5.50372 13.7878 5.32812 13.3639 5.32812 12.9219C5.32812 12.4798 5.50372 12.0559 5.81628 11.7434C6.12884 11.4308 6.55276 11.2552 6.99479 11.2552C7.43682 11.2552 7.86074 11.4308 8.1733 11.7434C8.48586 12.0559 8.66146 12.4798 8.66146 12.9219C8.66146 13.3639 8.48586 13.7878 8.1733 14.1004C7.86074 14.4129 7.43682 14.5885 6.99479 14.5885Z",fill:"currentColor"},null,-1),e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.9948 8.75521C12.5528 8.75521 12.1288 8.57961 11.8163 8.26705C11.5037 7.95449 11.3281 7.53057 11.3281 7.08854C11.3281 6.64651 11.5037 6.22259 11.8163 5.91003C12.1288 5.59747 12.5528 5.42187 12.9948 5.42188C13.4368 5.42187 13.8607 5.59747 14.1733 5.91003C14.4859 6.22259 14.6615 6.64651 14.6615 7.08854C14.6615 7.53057 14.4859 7.95449 14.1733 8.26705C13.8607 8.57961 13.4368 8.75521 12.9948 8.75521ZM12.9948 14.5885C12.5528 14.5885 12.1288 14.4129 11.8163 14.1004C11.5037 13.7878 11.3281 13.3639 11.3281 12.9219C11.3281 12.4798 11.5037 12.0559 11.8163 11.7434C12.1288 11.4308 12.5528 11.2552 12.9948 11.2552C13.4368 11.2552 13.8607 11.4308 14.1733 11.7434C14.4859 12.0559 14.6615 12.4798 14.6615 12.9219C14.6615 13.3639 14.4859 13.7878 14.1733 14.1004C13.8607 14.4129 13.4368 14.5885 12.9948 14.5885Z",fill:"currentColor"},null,-1)]))}const wt=j(Ct,[["render",bt]]),yt={},Bt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xt(t,o){return e.openBlock(),e.createElementBlock("svg",Bt,o[0]||(o[0]=[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.1667 5.83333C9.72464 5.83333 9.30072 5.65774 8.98816 5.34518C8.67559 5.03262 8.5 4.60869 8.5 4.16667C8.5 3.72464 8.67559 3.30072 8.98816 2.98816C9.30072 2.67559 9.72464 2.5 10.1667 2.5C10.6087 2.5 11.0326 2.67559 11.3452 2.98816C11.6577 3.30072 11.8333 3.72464 11.8333 4.16667C11.8333 4.60869 11.6577 5.03262 11.3452 5.34518C11.0326 5.65774 10.6087 5.83333 10.1667 5.83333ZM10.1667 11.6667C9.72464 11.6667 9.30072 11.4911 8.98816 11.1785C8.67559 10.8659 8.5 10.442 8.5 10C8.5 9.55797 8.67559 9.13405 8.98816 8.82149C9.30072 8.50893 9.72464 8.33333 10.1667 8.33333C10.6087 8.33333 11.0326 8.50893 11.3452 8.82149C11.6577 9.13405 11.8333 9.55797 11.8333 10C11.8333 10.442 11.6577 10.8659 11.3452 11.1785C11.0326 11.4911 10.6087 11.6667 10.1667 11.6667ZM10.1667 17.5C9.72464 17.5 9.30072 17.3244 8.98816 17.0118C8.67559 16.6993 8.5 16.2754 8.5 15.8333C8.5 15.3913 8.67559 14.9674 8.98816 14.6548C9.30072 14.3423 9.72464 14.1667 10.1667 14.1667C10.6087 14.1667 11.0326 14.3423 11.3452 14.6548C11.6577 14.9674 11.8333 15.3913 11.8333 15.8333C11.8333 16.2754 11.6577 16.6993 11.3452 17.0118C11.0326 17.3244 10.6087 17.5 10.1667 17.5Z",fill:"currentColor"},null,-1)]))}const Et=j(yt,[["render",xt]]),St={},Vt={width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Mt(t,o){return e.openBlock(),e.createElementBlock("svg",Vt,o[0]||(o[0]=[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.33333 9.83333C6.33333 10.2754 6.15774 10.6993 5.84518 11.0118C5.53262 11.3244 5.10869 11.5 4.66667 11.5C4.22464 11.5 3.80072 11.3244 3.48816 11.0118C3.17559 10.6993 3 10.2754 3 9.83333C3 9.39131 3.17559 8.96738 3.48816 8.65482C3.80072 8.34226 4.22464 8.16667 4.66667 8.16667C5.10869 8.16667 5.53262 8.34226 5.84518 8.65482C6.15774 8.96738 6.33333 9.39131 6.33333 9.83333ZM12.1667 9.83333C12.1667 10.2754 11.9911 10.6993 11.6785 11.0118C11.3659 11.3244 10.942 11.5 10.5 11.5C10.058 11.5 9.63405 11.3244 9.32149 11.0118C9.00893 10.6993 8.83333 10.2754 8.83333 9.83333C8.83333 9.39131 9.00893 8.96738 9.32149 8.65482C9.63405 8.34226 10.058 8.16667 10.5 8.16667C10.942 8.16667 11.3659 8.34226 11.6785 8.65482C11.9911 8.96738 12.1667 9.39131 12.1667 9.83333ZM18 9.83333C18 10.2754 17.8244 10.6993 17.5118 11.0118C17.1993 11.3244 16.7754 11.5 16.3333 11.5C15.8913 11.5 15.4674 11.3244 15.1548 11.0118C14.8423 10.6993 14.6667 10.2754 14.6667 9.83333C14.6667 9.39131 14.8423 8.96738 15.1548 8.65482C15.4674 8.34226 15.8913 8.16667 16.3333 8.16667C16.7754 8.16667 17.1993 8.34226 17.5118 8.65482C17.8244 8.96738 18 9.39131 18 9.83333Z",fill:"currentColor"},null,-1)]))}const $t=j(St,[["render",Mt]]),Lt={},Nt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function zt(t,o){return e.openBlock(),e.createElementBlock("svg",Nt,o[0]||(o[0]=[e.createElementVNode("path",{d:"M6 14L10 10M10 10L14 6M10 10L6 6M10 10L14 14",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const It=j(Lt,[["render",zt]]),Tt={arrowDown:Pe,arrowTop:Fe,arrowRight:Je,arrowLeft:ot,arrowReload:Xe,columnInsert:rt,freeze:dt,unfreeze:ht,columnsMove:wt,empty:gt,listBullet:Et,listBulletHorizontal:$t,close:It},O=e.defineComponent({__name:"VIcon",props:{name:{}},setup(t){const o=t,l=e.computed(()=>Tt[o.name]);return(n,r)=>l.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value),{key:0})):e.createCommentVNode("",!0)}}),Rt={},Wt={class:"vt-loader"};function Dt(t,o){return e.openBlock(),e.createElementBlock("span",Wt)}const se=j(Rt,[["render",Dt]]),Ht=["disabled","type","data-placement"],Pt={key:2,class:"vt-button__content"},J=e.defineComponent({__name:"VButton",props:{type:{default:"default"},shape:{},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},icon:{},tooltip:{type:Boolean,default:!1},tooltipPlacement:{default:"top"},htmlType:{default:"button"}},emits:["click"],setup(t,{emit:o}){const l=t,n=o,r=e.useSlots(),s=e.computed(()=>!!(l.icon&&l.shape)),c=e.computed(()=>{var k,w;const d=r.default?r.default({}):null;return((w=(k=d==null?void 0:d[0])==null?void 0:k.children)==null?void 0:w.toString())??""}),a=e.computed(()=>["vt-button",`vt-button--${l.type}`,{[`vt-button--${l.shape}`]:l.shape,"vt-button--icon-only":s.value,"vt-button--disabled":l.disabled||l.loading,"vt-button--loading":l.loading}]),i=e.computed(()=>s.value&&l.tooltip?c.value:null),u=d=>{!l.disabled&&!l.loading&&n("click",d)};return(d,k)=>{const w=e.resolveDirective("tooltip");return e.withDirectives((e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(a.value),disabled:l.disabled||l.loading,type:l.htmlType,"data-placement":l.tooltipPlacement,onClick:u},[l.loading?(e.openBlock(),e.createBlock(se,{key:0,class:"vt-button__icon"})):l.icon?(e.openBlock(),e.createBlock(O,{key:1,name:l.icon,class:"vt-button__icon"},null,8,["name"])):e.createCommentVNode("",!0),s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",Pt,[e.renderSlot(d.$slots,"default")]))],10,Ht)),[[w,i.value]])}}}),At={key:0,class:"vt-modal__header"},Ot={key:0,class:"vt-modal__title"},jt={class:"vt-modal__content"},re=e.defineComponent({__name:"VModal",props:{modelValue:{type:Boolean},title:{},size:{default:"medium"},showCloseButton:{type:Boolean,default:!0},closeOnBackdropClick:{type:Boolean,default:!0},zIndex:{default:1e3}},emits:["update:modelValue","close"],setup(t,{emit:o}){const l=t,n=o,r=e.computed(()=>["vt-modal__container",`vt-modal__container--${l.size}`]),s=e.computed(()=>({zIndex:l.zIndex})),c=()=>{n("update:modelValue",!1),n("close")},a=()=>{l.closeOnBackdropClick&&c()};return(i,u)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[i.modelValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vt-modal__backdrop",style:e.normalizeStyle(s.value),onClick:a},[e.createElementVNode("div",{class:e.normalizeClass(r.value),onClick:u[0]||(u[0]=e.withModifiers(()=>{},["stop"]))},[i.title||i.showCloseButton?(e.openBlock(),e.createElementBlock("div",At,[i.title?(e.openBlock(),e.createElementBlock("h2",Ot,e.toDisplayString(i.title),1)):e.createCommentVNode("",!0),i.showCloseButton?(e.openBlock(),e.createBlock(O,{key:1,name:"close",class:"vt-modal__close",onClick:c})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",jt,[e.renderSlot(i.$slots,"default")])],2)],4)):e.createCommentVNode("",!0)]))}}),Ft={class:"vt-pagination"},Zt={class:"vt-pagination__info"},Ut={class:"vt-pagination__rows-per-page"},qt=["value"],Xt={class:"vt-pagination__navigation"},Gt=["disabled"],Kt=["onClick"],Yt=["disabled"],ge=e.defineComponent({__name:"VPagination",props:{totalItems:{},pageSize:{default:10},currentPage:{default:1},pageSizeOptions:{default:()=>[5,10,20,50]},maxVisiblePages:{default:6}},emits:["update:currentPage","update:pageSize","pageChange","reloadData"],setup(t,{emit:o}){const l=t,n=o,r=e.computed({get:()=>l.currentPage,set:y=>n("update:currentPage",y)}),s=e.computed({get:()=>l.pageSize,set:y=>n("update:pageSize",y)}),c=e.computed(()=>Math.ceil(l.totalItems/s.value)),a=e.computed(()=>l.totalItems===0?0:(r.value-1)*s.value+1),i=e.computed(()=>Math.min(r.value*s.value,l.totalItems)),u=e.computed(()=>r.value<=1),d=e.computed(()=>r.value>=c.value),k=e.computed(()=>{const y=[],N=c.value,V=r.value,P=l.maxVisiblePages;if(N<=P)for(let b=1;b<=N;b++)y.push(b);else{y.push(1);const b=Math.max(2,V-Math.floor(P/2)),L=Math.min(N-1,V+Math.floor(P/2));b>2&&y.push("...");for(let B=b;B<=L;B++)y.push(B);L<N-1&&y.push("..."),N>1&&y.push(N)}return y}),w=()=>{n("pageChange",{page:r.value,pageSize:s.value})},H=y=>{typeof y=="number"&&y!==r.value&&(r.value=y,w())},R=()=>{u.value||(r.value--,w())},Z=()=>{d.value||(r.value++,w())},D=()=>{r.value=1,w()},W=()=>{n("reloadData",r.value)};return e.watch(()=>l.totalItems,()=>{r.value>c.value&&c.value>0&&(r.value=c.value,w())}),(y,N)=>(e.openBlock(),e.createElementBlock("div",Ft,[e.createElementVNode("div",Zt,[e.createElementVNode("div",Ut,[N[1]||(N[1]=e.createElementVNode("label",{for:"rowsSelect",class:"vt-pagination__label"},"Рядків на сторінку:",-1)),e.withDirectives(e.createElementVNode("select",{id:"rowsSelect","onUpdate:modelValue":N[0]||(N[0]=V=>s.value=V),onChange:D,class:"vt-pagination__select"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.pageSizeOptions,V=>(e.openBlock(),e.createElementBlock("option",{key:V,value:V},e.toDisplayString(V),9,qt))),128))],544),[[e.vModelSelect,s.value]])]),e.createElementVNode("span",null,e.toDisplayString(a.value)+" - "+e.toDisplayString(i.value)+" з "+e.toDisplayString(y.totalItems),1)]),e.createElementVNode("div",Xt,[e.createElementVNode("button",{onClick:R,disabled:u.value,class:e.normalizeClass({"vt-pagination__nav-button":!0,"has-items":!u.value})},[e.createVNode(O,{name:"arrowLeft"})],10,Gt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,V=>(e.openBlock(),e.createElementBlock("button",{key:V,onClick:P=>H(V),class:e.normalizeClass(["vt-pagination__nav-button",{"vt-pagination__nav-button--active":V===r.value}])},e.toDisplayString(V),11,Kt))),128)),e.createElementVNode("button",{onClick:Z,disabled:d.value,class:e.normalizeClass({"vt-pagination__nav-button":!0,"has-items":!d.value})},[e.createVNode(O,{name:"arrowRight"})],10,Yt)]),e.createElementVNode("div",null,[e.createVNode(J,{icon:"arrowReload",shape:"circle",tooltip:"",tooltipPlacement:"left",onClick:W},{default:e.withCtx(()=>N[2]||(N[2]=[e.createTextVNode("Оновити дані ",-1)])),_:1,__:[2]})])]))}}),Jt=["for"],Qt=["id","name","value","checked","disabled","required",".indeterminate"],K=e.defineComponent({__name:"VCheckbox",props:{modelValue:{type:Boolean,default:void 0},checked:{type:Boolean,default:!1},label:{},disabled:{type:Boolean,default:!1},id:{},name:{},value:{},indeterminate:{type:Boolean,default:!1},size:{default:"medium"},variant:{default:"primary"},required:{type:Boolean,default:!1},isDouble:{type:Boolean,default:!1}},emits:["update:modelValue","change","focus","blur"],setup(t,{emit:o}){const l=t,n=o,r=()=>`vt-checkbox-${Math.random().toString(36).substr(2,9)}`,s=e.computed(()=>l.id||r()),c=e.computed(()=>l.modelValue??l.checked),a=d=>{if(l.disabled)return;const w=d.target.checked;n("update:modelValue",w),n("change",w,d)},i=d=>{n("focus",d)},u=d=>{n("blur",d)};return(d,k)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["vt-checkbox",`vt-checkbox--${d.size}`,`vt-checkbox--${d.variant}`,{"vt-checkbox--disabled":d.disabled,"vt-checkbox--double":d.isDouble}]),for:s.value},[e.createElementVNode("input",{id:s.value,name:d.name,value:d.value,checked:c.value,disabled:d.disabled,required:d.required,".indeterminate":d.indeterminate,type:"checkbox",class:"vt-checkbox__input",onChange:a,onFocus:i,onBlur:u},null,40,Qt),e.createElementVNode("div",{class:e.normalizeClass(["vt-checkbox__box",{"vt-checkbox__box--checked":c.value&&!d.indeterminate&&!d.isDouble,"vt-checkbox__box--indeterminate":d.indeterminate,"vt-checkbox__box--double":d.isDouble&&c.value,"vt-checkbox__box--disabled":d.disabled}])},[!d.indeterminate&&!d.isDouble?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass(["vt-checkbox__checkmark",{"vt-checkbox__checkmark--checked":c.value}]),width:"10",height:"9",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k[0]||(k[0]=[e.createElementVNode("path",{d:"M1 5L3.58264 7.58264C3.80112 7.80112 4.16348 7.77113 4.34306 7.51971L9 1",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},null,-1)]),2)):e.createCommentVNode("",!0),d.isDouble&&c.value?(e.openBlock(),e.createElementBlock("svg",{key:1,class:e.normalizeClass(["vt-checkbox__checkmark",{"vt-checkbox__checkmark--checked":c.value}]),width:"13",height:"6",viewBox:"0 0 13 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k[1]||(k[1]=[e.createElementVNode("path",{d:"M6 3L8.25 5L12 1",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M1 3L3.25 5L7 1",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),2)):e.createCommentVNode("",!0),d.indeterminate?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["vt-checkbox__indeterminate-mark",{"vt-checkbox__indeterminate-mark--visible":d.indeterminate}])},null,2)):e.createCommentVNode("",!0)],2),d.label||d.$slots.label||d.$slots.default?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["vt-checkbox__label",{"vt-checkbox__label--disabled":d.disabled}])},[e.renderSlot(d.$slots,"label",{},()=>[e.renderSlot(d.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(d.label),1)])])],2)):e.createCommentVNode("",!0)],10,Jt))}});function eo(t){const o=e.computed(()=>[...t].sort((r,s)=>r.pinnedLeft&&!s.pinnedLeft?-1:!r.pinnedLeft&&s.pinnedLeft||r.pinnedRight&&!s.pinnedRight?1:!r.pinnedRight&&s.pinnedRight?-1:0)),l=()=>{const r=o.value.length,s=o.value.filter(d=>d.width||d.minWidth),c=s.reduce((d,k)=>d+(k.width||k.minWidth||0),0),a=r-s.length;if(a===0)return 150;const u=Math.max(800-c,a*80);return Math.max(Math.floor(u/a),120)};return{sortedColumns:o,getDefaultColumnWidth:l,getStickyOffset:(r,s,c=!1)=>{const a=o.value;let i=0;if(r==="left"){c&&(i+=50);for(let u=0;u<s;u++){const d=a[u];d.pinnedLeft&&(i+=d.width||d.minWidth||l())}}else for(let u=a.length-1;u>s;u--){const d=a[u];d.pinnedRight&&(i+=d.width||d.minWidth||l())}return i}}}function to(t){const o=()=>{const s={};return t.maxHeight&&(s.maxHeight=`${t.maxHeight}px`),s},l=(s,c,a,i)=>{const u={};if(s.width)u.width=`${s.width}px`,u.minWidth=`${s.width}px`,u.maxWidth=`${s.width}px`;else if(s.minWidth)u.minWidth=`${s.minWidth}px`,u.width=`${s.minWidth}px`,u.maxWidth="none";else{const d=i();u.width=`${d}px`,u.minWidth="80px",u.maxWidth="none"}return s.pinnedLeft?(u.position="sticky",u.left=`${a("left",c,t.selectable)}px`,u.zIndex="10"):s.pinnedRight&&(u.position="sticky",u.right=`${a("right",c,!1)}px`,u.zIndex="10"),u};return{getTableWrapperStyle:o,getColumnStyle:l,getHeaderStyle:(s,c,a,i)=>{const u=l(s,c,a,i);return t.maxHeight&&(u.position="sticky",u.top="0",s.pinnedLeft||s.pinnedRight?u.zIndex="12":u.zIndex="11"),u},getFooterStyle:(s,c,a,i)=>{const u=l(s,c,a,i);return t.maxHeight&&(u.position="sticky",u.bottom="0",s.pinnedLeft||s.pinnedRight?u.zIndex="12":u.zIndex="11"),u}}}function oo(){const t=e.ref({resizingCol:null,startX:0,startWidth:0}),o=`url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><path d='M5 13L2 10L5 7' stroke='%23828282' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/><path d='M15 7L18 10L15 13' stroke='%23828282' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/><path d='M10 3L10 17' stroke='%23828282' stroke-width='3' stroke-linecap='round'/></svg>") 10 10, col-resize`;return{onMouseDown:(n,r,s,c)=>{n.preventDefault(),n.stopPropagation(),t.value.resizingCol=r,t.value.startX=n.clientX,t.value.startWidth=r.width||r.minWidth||s(r.prop);const a=u=>{const{resizingCol:d,startX:k,startWidth:w}=t.value;if(!d)return;document.querySelectorAll(`[data-resizer="${d.prop}"]`).forEach(W=>{W.classList.add("vt-table__resizer--active")});const H=u.clientX-k,R=d.minWidth||50,Z=d.maxWidth||1e3,D=Math.max(Math.min(w+H,Z),R);d.width=D},i=()=>{const{resizingCol:u}=t.value;document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",i),document.body.style.cursor="",document.body.style.userSelect="",document.body.classList.remove("vt-table-resizing"),u&&(document.querySelectorAll(`[data-resizer="${u.prop}"]`).forEach(d=>{d.classList.remove("vt-table__resizer--active")}),c&&u.width&&c(u.width)),t.value.resizingCol=null};document.addEventListener("mousemove",a),document.addEventListener("mouseup",i),document.body.style.cursor=o,document.body.style.userSelect="none",document.body.classList.add("vt-table-resizing")},resizeState:t}}function no(t,o,l,n){var F;const r=t.selectionKey||"id",s=e.ref([]),c=e.ref(null),a=e.ref(!1);(F=t.defaultSelection)!=null&&F.length&&(s.value=[...t.defaultSelection]);const i=p=>p[r],u=p=>a.value?!0:s.value.some(I=>i(I)===i(p)),d=e.computed(()=>o.value.filter(p=>u(p)).length),k=e.computed(()=>o.value.length>0&&d.value===o.value.length),w=e.computed(()=>{if(a.value)return!1;const p=d.value;return p>0&&p<o.value.length}),H=e.computed(()=>a.value?!0:k.value&&!w.value),R=e.computed(()=>a.value),Z=(p,I)=>{const M=i(p),A=s.value.some(v=>i(v)===i(p)),m=I!==void 0?I:!A;if(a.value&&!m){a.value=!1,n!=null&&n.value&&(s.value=n.value.filter(v=>i(v)!==M)),B(p,!1);return}a.value&&m||(m&&!A?s.value.push(p):!m&&A&&(s.value=s.value.filter(v=>i(v)!==M)),t.selectOnClickRow&&I===void 0&&P(m?p:null),B(p,m))},D=()=>{switch(W()){case"none":case"partial":y();break;case"allVisible":N();break;case"absoluteAll":V();break}},W=()=>a.value?"absoluteAll":k.value?"allVisible":d.value>0?"partial":"none",y=()=>{const p=[],I=new Set(s.value.map(M=>i(M)));s.value.forEach(M=>{p.push(M)}),o.value.forEach(M=>{I.has(i(M))||p.push(M)}),s.value=p,a.value=!1,B()},N=()=>{a.value=!0,n!=null&&n.value?s.value=[...n.value]:s.value=[...o.value],B(void 0,void 0,!0)},V=()=>{s.value=[],a.value=!1,c.value=null,B()},P=p=>{const I=c.value;c.value=p,l("current-change",{currentRow:c.value,oldCurrentRow:I})},b=()=>[...s.value],L=p=>{s.value=[...p],a.value=!1,B()},B=(p,I,M=!1)=>{const A={selection:[...s.value],row:p,selected:I,isAllSelected:M||a.value};l("selection-change",A)};return e.watch(()=>t.defaultSelection,p=>{p!=null&&p.length&&(s.value=[...p])}),{selectedRows:s,currentRow:c,isRowSelected:u,isAllSelected:H,isIndeterminate:w,isDoubleCheck:R,isFullSelection:a,toggleRowSelection:Z,toggleAllSelection:D,clearSelection:V,setCurrentRow:P,getSelectionRows:b,setSelectionRows:L,selectAbsolutelyAll:N}}function lo(t,o){if(!t)return String(o.value??"");try{const l=t(o);return l}catch(l){return console.error("Error rendering table slot:",l),String(o.value??"")}}const so=(t,o,l="asc")=>{if(t==null&&o==null)return 0;if(t==null)return l==="asc"?1:-1;if(o==null)return l==="asc"?-1:1;if(t===o)return 0;let n=0;const r=Number(t),s=Number(o);return!isNaN(r)&&!isNaN(s)?n=r-s:ue(t)&&ue(o)?n=new Date(t).getTime()-new Date(o).getTime():typeof t=="boolean"&&typeof o=="boolean"?n=t===o?0:t?-1:1:n=String(t).localeCompare(String(o),void 0,{numeric:!0,sensitivity:"base"}),l==="desc"?-n:n},ue=t=>t instanceof Date?!isNaN(t.getTime()):typeof t=="string"&&/\d{4}-\d{2}-\d{2}|\//.test(t)?!isNaN(new Date(t).getTime()):!1,ro=(t,o,l)=>{t.sortable&&l({prop:t.prop,direction:o})},me=(t,o)=>{const l=(o==null?void 0:o.prop)===t.prop,n=o==null?void 0:o.direction;return{asc:["vt-th__sort-icon",l&&n==="asc"&&"vt-th__sortable-active"].filter(Boolean).join(" "),desc:["vt-th__sort-icon",l&&n==="desc"&&"vt-th__sortable-active"].filter(Boolean).join(" ")}},ao=(t,o,l)=>{if(!o)return[...t];const n=l.find(s=>s.prop===o.prop);if(!(n!=null&&n.sortable))return[...t];const r=n.sortMethod||so;return[...t].sort((s,c)=>{const a=s[n.prop],i=c[n.prop];return r(a,i,o.direction)})};class io{constructor(){this.modalStack=[],this.baseZIndex=1e3}open(o={}){const l=`modal-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,n=document.createElement("div");n.setAttribute("data-vt-modal",l),document.body.appendChild(n);const r=e.ref(!0),s=this.baseZIndex+this.modalStack.length*10,c=e.createApp({setup(){const i=()=>{r.value=!1,setTimeout(()=>{q.closeById(l)},100)};return()=>e.h(re,{modelValue:r.value,"onUpdate:modelValue":i,title:o.title,size:o.size||"medium",showCloseButton:o.showCloseButton!==!1,closeOnBackdropClick:o.closeOnBackdropClick!==!1,onClose:i,zIndex:s},{default:()=>o.component?e.h(o.component,o.props||{}):o.content?e.h("div",{innerHTML:o.content}):null})}});c.mount(n);const a={id:l,app:c,container:n,isOpen:r};return this.modalStack.push(a),l}close(){if(this.modalStack.length>0){const o=this.modalStack[this.modalStack.length-1];this.closeById(o.id)}}closeById(o){const l=this.modalStack.findIndex(n=>n.id===o);if(l!==-1){const n=this.modalStack[l];this.cleanupModal(n),this.modalStack.splice(l,1),this.recalculateZIndices()}}closeAll(){for(;this.modalStack.length>0;){const o=this.modalStack.pop();o&&this.cleanupModal(o)}}getOpenModalsCount(){return this.modalStack.length}cleanupModal(o){o.app&&o.app.unmount(),o.container&&o.container.parentNode&&document.body.removeChild(o.container)}recalculateZIndices(){}}const q=new io,Ce={install(t){t.config.globalProperties.$modal=q,t.config.globalProperties.$modalStack={closeAll:()=>q.closeAll(),getCount:()=>q.getOpenModalsCount(),closeById:o=>q.closeById(o)}}},co={class:"vt-columns-selector-body"},uo={class:"vt-columns-selector"},mo={class:"vt-columns-selector__panel"},po=["draggable","onDragstart","onDragover","onDrop"],ho={key:0,class:"vt-columns-selector__panel-item-pinned"},vo={class:"vt-columns-selector__available"},fo=["onClick"],_o={key:0,class:"vt-columns-selector__group-columns"},go={key:0,class:"vt-columns-selector__pinned-note"},Co={class:"vt-modal__content-button"},ko=e.defineComponent({__name:"VTableColumnSelector",props:{columns:{},columnsSelector:{default:()=>[]}},emits:["update-columns"],setup(t,{emit:o}){const l=t,n=o,r=e.ref([]),s=e.ref(new Set),c=e.ref(-1),a=e.ref(-1),i=e.ref("before"),u=e.computed(()=>{const m={};return l.columnsSelector.forEach(v=>{if(v.name==="removed")return;const f=v.columns.map(S=>S.prop),C=r.value.filter(S=>f.includes(S.prop));C.length===0?m[v.name]={checked:!1,indeterminate:!1}:C.length===v.columns.length?m[v.name]={checked:!0,indeterminate:!1}:m[v.name]={checked:!1,indeterminate:!0}}),m}),d=e.computed(()=>l.columnsSelector.filter(m=>m.name!=="removed")),k=m=>m.pinnedLeft||m.pinnedRight,w=m=>!k(m),H=()=>{const m=r.value;let v=-1;for(let C=0;C<m.length;C++)m[C].pinnedLeft&&(v=C);let f=m.length;for(let C=0;C<m.length;C++)if(m[C].pinnedRight){f=C;break}return{minIndex:v+1,maxIndex:f-1}},R=m=>{const v=H();return!(m<v.minIndex||m>v.maxIndex+1)},Z=(m,v)=>{const f=r.value[v];if(!w(f)){m.preventDefault();return}c.value=v,m.dataTransfer&&(m.dataTransfer.effectAllowed="move",m.dataTransfer.setData("text/plain",f.prop)),document.body.style.cursor="grabbing"},D=(m,v)=>{if(c.value===-1)return;m.preventDefault();const f=m.currentTarget.getBoundingClientRect(),C=m.clientY,S=f.top+f.height/2;let x=v,U="before";C<S?(x=v,U="before"):(x=v+1,U="after"),c.value<x&&x--,R(x)?(a.value=v,i.value=U,m.dataTransfer.dropEffect="move"):(a.value=-1,m.dataTransfer.dropEffect="none")},W=()=>{setTimeout(()=>{c.value===-1&&(a.value=-1)},50)},y=(m,v)=>{if(m.preventDefault(),c.value===-1||a.value===-1){V();return}const f=m.currentTarget.getBoundingClientRect(),C=m.clientY,S=f.top+f.height/2;let x=v;if(C>=S&&(x=v+1),c.value<x&&x--,!R(x)||x===c.value){V();return}const U=[...r.value],[ee]=U.splice(c.value,1);U.splice(x,0,ee),r.value=U,V()},N=()=>{V()},V=()=>{c.value=-1,a.value=-1,i.value="before",document.body.style.cursor=""},P=m=>{const v=["vt-columns-selector__panel-item"];return c.value===m&&v.push("vt-columns-selector__panel-item--dragging"),a.value===m&&i.value==="before"&&v.push("vt-columns-selector__panel-item--drop-before"),a.value===m&&i.value==="after"&&v.push("vt-columns-selector__panel-item--drop-after"),v},b=()=>{r.value=[...l.columns.map(m=>({...m}))],l.columnsSelector.forEach(m=>{m.name!=="removed"&&s.value.add(m.name)})},L=(m,v)=>{if(v)r.value.some(f=>f.prop===m.prop)||r.value.push({...m});else{if(k(m))return;r.value=r.value.filter(f=>f.prop!==m.prop)}},B=(m,v)=>{if(v)m.columns.forEach(f=>{r.value.some(C=>C.prop===f.prop)||r.value.push({...f})});else{const f=[];m.columns.forEach(C=>{const S=r.value.find(x=>x.prop===C.prop);S&&!k(S)&&f.push(S)}),r.value=r.value.filter(C=>!f.some(S=>S.prop===C.prop))}},F=m=>r.value.some(v=>v.prop===m.prop),p=m=>{const v=r.value.find(f=>f.prop===m.prop);return!v||!k(v)},I=m=>{s.value.has(m)?s.value.delete(m):s.value.add(m)},M=()=>{n("update-columns",[...r.value]),q.close()},A=()=>{q.close()};return e.onMounted(()=>{b()}),(m,v)=>(e.openBlock(),e.createElementBlock("div",co,[e.createElementVNode("div",uo,[e.createElementVNode("div",mo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,C)=>(e.openBlock(),e.createElementBlock("div",{key:f.prop,class:e.normalizeClass(P(C)),draggable:w(f),onDragstart:S=>Z(S,C),onDragover:S=>D(S,C),onDragleave:W,onDrop:S=>y(S,C),onDragend:N},[e.createVNode(O,{name:w(f)?"columnsMove":"freeze",class:e.normalizeClass(["vt-columns-selector__panel-item-icon",{"vt-columns-selector__panel-item-icon--draggable":w(f)}])},null,8,["name","class"]),e.createVNode(K,{label:f.label,checked:!0,disabled:k(f),onChange:S=>L(f,S),onClick:v[0]||(v[0]=e.withModifiers(()=>{},["stop"]))},null,8,["label","disabled","onChange"]),k(f)?(e.openBlock(),e.createElementBlock("span",ho,"pinned")):e.createCommentVNode("",!0)],42,po))),128))]),e.createElementVNode("div",vo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,f=>{var C,S;return e.openBlock(),e.createElementBlock("div",{key:f.name,class:"vt-columns-selector__group"},[e.createElementVNode("div",{class:"vt-columns-selector__group-header",onClick:x=>I(f.name)},[e.createVNode(K,{label:f.label,checked:((C=u.value[f.name])==null?void 0:C.checked)||!1,indeterminate:((S=u.value[f.name])==null?void 0:S.indeterminate)||!1,onChange:x=>B(f,x),onClick:v[1]||(v[1]=e.withModifiers(()=>{},["stop"]))},null,8,["label","checked","indeterminate","onChange"]),f.icon?(e.openBlock(),e.createBlock(O,{key:0,name:f.icon,class:"vt-columns-selector__group-icon"},null,8,["name"])):e.createCommentVNode("",!0)],8,fo),s.value.has(f.name)?(e.openBlock(),e.createElementBlock("div",_o,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.columns,x=>(e.openBlock(),e.createElementBlock("div",{key:x.prop,class:"vt-columns-selector__group-column"},[e.createVNode(K,{label:x.label,checked:F(x),disabled:!p(x),onChange:U=>L(x,U)},null,8,["label","checked","disabled","onChange"]),p(x)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",go," (закріплена) "))]))),128))])):e.createCommentVNode("",!0)])}),128))])]),e.createElementVNode("div",Co,[e.createVNode(J,{onClick:A},{default:e.withCtx(()=>v[2]||(v[2]=[e.createTextVNode("Скасувати",-1)])),_:1,__:[2]}),e.createVNode(J,{type:"primary",onClick:M},{default:e.withCtx(()=>v[3]||(v[3]=[e.createTextVNode("Зберегти",-1)])),_:1,__:[3]})])]))}}),bo=e.defineComponent({__name:"ColumnActions",props:{column:{},allColumns:{},columnsSelector:{}},emits:["pin","update-columns"],setup(t,{emit:o}){const l=t,n=o,r=e.ref(),s=e.ref(),c=e.ref(),a=e.ref(!1),i=e.ref(!1),u=e.ref([]),d=async()=>{if(await e.nextTick(),!r.value||!s.value)return;const b=s.value.getBoundingClientRect(),L=r.value,B=L.offsetWidth,F=b.left+b.width/2;L.style.top=`${b.bottom-20}px`,L.style.left=`${F-B/2}px`;const p=L.getBoundingClientRect();p.right>window.innerWidth&&(L.style.left=`${window.innerWidth-B-8}px`),p.left<0&&(L.style.left="8px")},k=b=>{b.stopPropagation(),!i.value&&(a.value?H():w())},w=()=>{i.value||(a.value=!0,d(),c.value&&(c.value.style.zIndex="22"))},H=()=>{i.value=!0,a.value=!1,c.value&&c.value.style.removeProperty("z-index"),setTimeout(()=>{i.value=!1},100)},R=b=>{var L,B;!((L=s.value)!=null&&L.contains(b.target))&&!((B=r.value)!=null&&B.contains(b.target))&&H()},Z=()=>{P()?(n("pin",l.column,"none"),console.log(`Колонка "${l.column.label}" відкріплена`)):(n("pin",l.column,"left"),console.log(`Колонка "${l.column.label}" прикріплена зліва`)),H()},D=b=>({name:"removed",label:"Видалені колонки",order:999,columns:b}),W=b=>{var I;const L=new Set(b.map(M=>M.prop)),B=new Set;(I=l.columnsSelector)==null||I.forEach(M=>{M.columns.forEach(A=>B.add(A.prop))}),l.allColumns.forEach(M=>B.add(M.prop));const F=[];B.forEach(M=>{var A;if(!L.has(M)){let m;(A=l.columnsSelector)==null||A.forEach(v=>{const f=v.columns.find(C=>C.prop===M);f&&(m=f)}),m||(m=l.allColumns.find(v=>v.prop===M)),m&&F.push(m)}});const p=[...l.columnsSelector||[]];F.length>0&&p.push(D(F)),u.value=p},y=()=>{W(l.allColumns),q.open({component:ko,title:"Управління колонками таблиці",props:{columns:l.allColumns,columnsSelector:u.value,"onUpdate-columns":b=>{console.log("ColumnActions отримав оновлені колонки:",b),n("update-columns",b),W(b)}},size:"large",closeOnBackdropClick:!1}),H()},N=()=>l.column.pinnedLeft,V=()=>l.column.pinnedRight,P=()=>N()||V();return e.onMounted(()=>{document.addEventListener("click",R),s.value&&(c.value=s.value.closest("th")),W(l.allColumns)}),e.onUnmounted(()=>{document.removeEventListener("click",R)}),(b,L)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"triggerRef",ref:s,class:"vt-table-header-actions",onClick:k},[e.createVNode(O,{name:"listBullet"}),a.value?(e.openBlock(),e.createElementBlock("ul",{key:0,ref_key:"menuRef",ref:r,class:e.normalizeClass(["dropdown-menu","vt-table-dropdown",{visible:a.value}])},[e.createElementVNode("li",{onClick:Z},[e.createVNode(O,{name:P()?"unfreeze":"freeze"},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(P()?"Розморозити":"Заморозити"),1)]),e.createElementVNode("li",{onClick:y},[e.createVNode(O,{name:"columnInsert"}),L[0]||(L[0]=e.createElementVNode("span",null,"Колонки",-1))])],2)):e.createCommentVNode("",!0)],512))}}),wo={class:"vt-table"},yo={class:"vt-th__content"},Bo={class:"vt-th__content"},xo={class:"vt-th__label"},Eo={key:0,class:"vt-th__sortable"},So=["data-resizer","onMousedown"],Vo={key:0,class:"vt-table__empty-row"},Mo=["colspan"],$o={class:"vt-table__empty-content"},Lo=["onClick"],No={class:"vt-table__cell-content"},zo={class:"vt-table__cell-content vt-table__cell-content--ellipsis"},Io={key:1},To=["data-resizer","onMousedown"],Ro={key:0,class:"vt-table__summary"},Wo={class:"vt-table__cell-content vt-table__cell-content--summary"},ne=50,ke=e.defineComponent({__name:"VTable",props:e.mergeModels({data:{},maxHeight:{},defaultSort:{},showSummary:{type:Boolean},summaryMethod:{type:Function},columnsSelector:{},selectable:{type:Boolean},selectionKey:{},defaultSelection:{},selectOnClickRow:{type:Boolean},highlightCurrentRow:{type:Boolean},allData:{},columns:{}},{columns:{required:!1},columnsModifiers:{}}),emits:e.mergeModels(["sort-change","selection-change","current-change","row-click","update:columns","column-pin","column-resize","column-visibility","column-sort","columns-change","infinity-scroll"],["update:columns"]),setup(t,{expose:o,emit:l}){const n=t,r=e.useModel(t,"columns"),s=l;e.useSlots();const c=e.ref({}),a=e.ref(),i=e.reactive([]),u=e.ref(n.defaultSort||null),d=e.computed(()=>r.value!==void 0),k=e.computed(()=>n.data&&n.data.length>0),w=e.ref(!1),H=e.ref(0);let R=null;const Z=()=>{d.value&&r.value?i.splice(0,i.length,...r.value):n.columns&&i.splice(0,i.length,...n.columns)};e.watch(()=>r.value,h=>{h&&d.value&&i.splice(0,i.length,...h)},{deep:!0}),e.watch(()=>n.columns,h=>{h&&!d.value&&i.splice(0,i.length,...h)},{deep:!0}),e.provide("vt-table-columns",i);const{sortedColumns:D,getDefaultColumnWidth:W,getStickyOffset:y}=eo(i),{getTableWrapperStyle:N,getColumnStyle:V,getHeaderStyle:P,getFooterStyle:b}=to(n),{onMouseDown:L}=oo(),B=e.computed(()=>ao(n.data,u.value,i)),F=e.computed(()=>n.allData||n.data),p=n.selectable?no(n,B,s,F):null,I=()=>({width:`${ne}px`,minWidth:`${ne}px`,maxWidth:`${ne}px`,left:"0px",position:"sticky",zIndex:10}),M=()=>{const h=I();return n.maxHeight?{...h,top:"0px",zIndex:11}:h},A=()=>{const h=I();return n.maxHeight?{...h,bottom:"0px",zIndex:11}:h},m=()=>{if(!a.value||w.value)return;const h=a.value,_=h.scrollTop,E=h.scrollHeight,$=h.clientHeight,z=30;R&&clearTimeout(R),R=setTimeout(()=>{const Q=_-H.value>1,g=E-_-$<=z,G=E-_-$<=5;H.value=_,Q&&(g||G)&&(w.value=!0,s("infinity-scroll"),setTimeout(()=>{w.value=!1},1e3))},50)},v=()=>{w.value=!1};e.onMounted(()=>{a.value&&a.value.addEventListener("scroll",m)}),e.onUnmounted(()=>{R&&clearTimeout(R),a.value&&a.value.removeEventListener("scroll",m)});const f=(h,_)=>{ro(h,_,E=>{var $,z;(($=u.value)==null?void 0:$.prop)===h.prop&&u.value.direction===_?u.value=null:u.value=E,s("sort-change",{column:h,direction:((z=u.value)==null?void 0:z.direction)||null,prop:h.prop,sortedData:B.value})})},C=(h,_)=>{const E={pinnedLeft:_==="left",pinnedRight:_==="right"};x(h.prop,E),s("column-pin",{column:{...h,...E},position:_})},S=h=>{i.splice(0,i.length,...h),d.value&&(r.value=[...h]),s("columns-change",[...h])},x=(h,_)=>{const E=i.findIndex($=>$.prop===h);if(E!==-1){if(Object.assign(i[E],_),d.value&&r.value){const $=r.value.findIndex(z=>z.prop===h);if($!==-1){const z=[...r.value];z[$]={...z[$],..._},r.value=z}}s("columns-change",[...i])}else console.error("Колонку не знайдено:",h,"Доступні колонки:",i.map($=>$.prop))},U=(h,_,E)=>{s("row-click",{row:h,column:_,event:E}),n.highlightCurrentRow&&p&&p.setCurrentRow(h)},ee=(h,_,E)=>{E.stopPropagation(),p&&p.toggleRowSelection(_,h)},Be=(h,_)=>{_.stopPropagation(),p&&p.toggleAllSelection()},ae=(h,_)=>{h&&(c.value[_]=h)},ie=(h,_)=>{const E=_.width||W();L(h,_,W,$=>{x(_.prop,{width:$}),s("column-resize",{column:{..._,width:$},width:$,oldWidth:E})})},xe=(h,_)=>V(h,_,y,W),Ee=(h,_)=>P(h,_,y,W),Se=(h,_)=>b(h,_,y,W),Ve=(h,_)=>{if(!_||!_.prop)return"";const E=h[_.prop];return E==null?"":String(E)},Me=e.computed(()=>{if(!n.showSummary||!k.value)return{};const h=i;if(typeof n.summaryMethod=="function"){const _=n.summaryMethod({columns:h,data:B.value});return h.reduce((E,$,z)=>(E[$.prop]=_[z],E),{})}return h.reduce((_,E)=>{const $=B.value.map(z=>z[E.prop]);return _[E.prop]=$.every(z=>typeof z=="number")?$.reduce((z,Y)=>z+Y,0):"",_},{})}),$e=e.computed(()=>n.showSummary&&k.value),Le=(h,_)=>{p&&p.toggleRowSelection(h,_)},Ne=()=>{p&&p.toggleAllSelection()},ze=()=>{p&&p.selectAbsolutelyAll()},Ie=()=>{p&&p.clearSelection()},Te=()=>p?p.getSelectionRows():[],Re=h=>{p&&p.setSelectionRows(h)};return e.onMounted(()=>{Z()}),o({toggleRowSelection:Le,toggleAllSelection:Ne,selectAbsolutelyAll:ze,clearSelection:Ie,getSelectionRows:Te,setSelectionRows:Re,resetInfinityScroll:v}),(h,_)=>{var $,z,Y,Q;const E=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",{ref_key:"tableWrapperRef",ref:a,class:"vt-table-wrapper",style:e.normalizeStyle(e.unref(N)()),onScroll:m},[e.renderSlot(h.$slots,"default"),e.createElementVNode("table",wo,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[n.selectable?(e.openBlock(),e.createElementBlock("th",{key:0,class:e.normalizeClass(["vt-table__th vt-table__th--selection",{"vt-table__th--sticky":n.maxHeight,"vt-table__th--pinned-left":!0}]),style:e.normalizeStyle(M())},[e.createElementVNode("div",yo,[e.createVNode(K,{checked:($=e.unref(p))==null?void 0:$.isAllSelected.value,indeterminate:(z=e.unref(p))==null?void 0:z.isIndeterminate.value,"is-double":(Q=(Y=e.unref(p))==null?void 0:Y.isDoubleCheck)==null?void 0:Q.value,onChange:Be},null,8,["checked","indeterminate","is-double"])])],6)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(D),(g,G)=>(e.openBlock(),e.createElementBlock("th",{key:g.prop,ref_for:!0,ref:X=>ae(X,g.prop),style:e.normalizeStyle(Ee(g,G)),class:e.normalizeClass(["vt-table__th",{"vt-table__th--sticky":n.maxHeight,"vt-table__th--pinned-left":g.pinnedLeft,"vt-table__th--pinned-right":g.pinnedRight,"vt-table__th--sortable":g.sortable}])},[e.createElementVNode("div",Bo,[e.createElementVNode("div",xo,e.toDisplayString(g.label),1),g.sortable?(e.openBlock(),e.createElementBlock("div",Eo,[e.createVNode(O,{name:"arrowTop",class:e.normalizeClass(e.unref(me)(g,u.value).asc),onClick:e.withModifiers(X=>f(g,"asc"),["stop"])},null,8,["class","onClick"]),e.createVNode(O,{name:"arrowDown",class:e.normalizeClass(e.unref(me)(g,u.value).desc),onClick:e.withModifiers(X=>f(g,"desc"),["stop"])},null,8,["class","onClick"])])):e.createCommentVNode("",!0),g.actionColumn?(e.openBlock(),e.createBlock(bo,{key:1,column:g,"all-columns":e.unref(D),columnsSelector:n.columnsSelector,onPin:C,onUpdateColumns:S},null,8,["column","all-columns","columnsSelector"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:"vt-table__resizer","data-resizer":g.prop,onMousedown:X=>ie(X,g)},null,40,So)],6))),128))])]),e.createElementVNode("tbody",null,[k.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(B.value,(g,G)=>{var X,ce,de;return e.openBlock(),e.createElementBlock("tr",{key:g.id,class:e.normalizeClass(["vt-table__row",{"vt-table__row--selected":(X=e.unref(p))==null?void 0:X.isRowSelected(g),"vt-table__row--current":((ce=e.unref(p))==null?void 0:ce.currentRow.value)===g,"vt-table__row--clickable":n.selectOnClickRow||n.highlightCurrentRow}]),onClick:T=>U(g,e.unref(D)[0],T)},[n.selectable?(e.openBlock(),e.createElementBlock("td",{key:0,class:e.normalizeClass(["vt-table__td vt-table__td--selection",{"vt-table__td--pinned-left":!0}]),style:e.normalizeStyle(I())},[e.createElementVNode("div",No,[e.createVNode(K,{checked:(de=e.unref(p))==null?void 0:de.isRowSelected(g),onChange:(T,te)=>ee(T,g,te)},null,8,["checked","onChange"])])],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(D),(T,te)=>(e.openBlock(),e.createElementBlock("td",{key:T.prop,ref_for:!0,ref:oe=>ae(oe,T.prop),style:e.normalizeStyle(xe(T,te)),class:e.normalizeClass(["vt-table__td",{"vt-table__td--pinned-left":T.pinnedLeft,"vt-table__td--pinned-right":T.pinnedRight}])},[e.withDirectives((e.openBlock(),e.createElementBlock("div",zo,[T.renderSlot?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(()=>e.unref(lo)(T.renderSlot,{row:g,column:T,value:g[T.prop],index:G})),{key:0})):(e.openBlock(),e.createElementBlock("span",Io,e.toDisplayString(g[T.prop]),1))])),[[E,T.showOverflowTooltip?Ve(g,T):null]]),e.createElementVNode("div",{class:"vt-table__resizer","data-resizer":T.prop,onMousedown:oe=>ie(oe,T)},null,40,To)],6))),128))],10,Lo)}),128)):(e.openBlock(),e.createElementBlock("tr",Vo,[e.createElementVNode("td",{colspan:e.unref(D).length+(n.selectable?1:0),class:"vt-table__empty-cell"},[e.createElementVNode("div",$o,[e.createVNode(O,{name:"empty",class:"vt-table__empty-icon"}),_[0]||(_[0]=e.createElementVNode("span",{class:"vt-table__empty-text"},"Немає даних!",-1))])],8,Mo)]))]),$e.value?(e.openBlock(),e.createElementBlock("tfoot",Ro,[e.createElementVNode("tr",null,[n.selectable?(e.openBlock(),e.createElementBlock("td",{key:0,class:e.normalizeClass(["vt-table__td",{"vt-table__td--pinned-left":!0}]),style:e.normalizeStyle(A())},_[1]||(_[1]=[e.createElementVNode("div",{class:"vt-table__cell-content vt-table__cell-content--summary"},null,-1)]),4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(D),(g,G)=>(e.openBlock(),e.createElementBlock("td",{key:g.prop,style:e.normalizeStyle(Se(g,G)),class:e.normalizeClass(["vt-table__td",{"vt-table__td--pinned-left":g.pinnedLeft,"vt-table__td--pinned-right":g.pinnedRight}])},[e.createElementVNode("div",Wo,e.toDisplayString(Me.value[g.prop]),1)],6))),128))])])):e.createCommentVNode("",!0)])],36)}}}),be=e.defineComponent({__name:"VTableColumn",props:{prop:{},label:{},width:{},minWidth:{},maxWidth:{},sortable:{type:Boolean,default:!0},pinnedLeft:{type:Boolean,default:!1},pinnedRight:{type:Boolean,default:!1},actionColumn:{type:Boolean,default:!0},showOverflowTooltip:{type:Boolean,default:!0},selectable:{type:Boolean,default:!0},renderSlot:{},sortMethod:{}},setup(t){const o=t,l=e.useSlots(),n=e.inject("vt-table-columns");n||console.error("VTableColumn: не знайдено контекст таблиці. Переконайтеся, що компонент використовується всередині VTable.");const r=()=>({prop:o.prop,label:o.label,width:o.width,minWidth:o.minWidth,maxWidth:o.maxWidth,sortable:o.sortable,pinnedLeft:o.pinnedLeft,pinnedRight:o.pinnedRight,actionColumn:o.actionColumn,showOverflowTooltip:o.showOverflowTooltip,selectable:o.selectable,renderSlot:l[o.prop]??l.default??l.slot});let s=-1;return e.onMounted(()=>{if(n){const c=r();n.push(c),s=n.length-1}}),e.watch(()=>[o.width,o.minWidth,o.maxWidth,o.sortable,o.pinnedLeft,o.pinnedRight,o.actionColumn,o.showOverflowTooltip,o.selectable,o.label],()=>{if(n&&s!==-1){const c=n.findIndex(a=>a.prop===o.prop);if(c!==-1){const a=n[c],i={...r(),renderSlot:a.renderSlot};n[c]=i}}},{deep:!0}),e.onUnmounted(()=>{if(n){const c=n.findIndex(a=>a.prop===o.prop);c>-1&&n.splice(c,1)}}),(c,a)=>null}}),pe=(t,o)=>{const l=document.createElement("div");l.className=`vt-tooltip vt-tooltip--${o}`,l.innerText=t,Object.assign(l.style,{position:"absolute",background:"rgba(0, 0, 0, 0.8)",color:"white",padding:"8px 12px",borderRadius:"4px",fontSize:"12px",lineHeight:"1.4",zIndex:"9999",pointerEvents:"none",visibility:"hidden",opacity:"0",transition:"opacity 0.2s ease, visibility 0.2s ease",maxWidth:"300px",minWidth:"max-content",wordWrap:"break-word",whiteSpace:"normal",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.2)"}),t.length<50&&(l.style.whiteSpace="nowrap");const n=document.createElement("div");switch(n.className="vt-tooltip__arrow",Object.assign(n.style,{position:"absolute",width:"0",height:"0",borderStyle:"solid"}),o){case"top":Object.assign(n.style,{top:"100%",left:"50%",marginLeft:"-5px",borderWidth:"5px 5px 0 5px",borderColor:"rgba(0, 0, 0, 0.8) transparent transparent transparent"});break;case"bottom":Object.assign(n.style,{bottom:"100%",left:"50%",marginLeft:"-5px",borderWidth:"0 5px 5px 5px",borderColor:"transparent transparent rgba(0, 0, 0, 0.8) transparent"});break;case"left":Object.assign(n.style,{top:"50%",left:"100%",marginTop:"-5px",borderWidth:"5px 0 5px 5px",borderColor:"transparent transparent transparent rgba(0, 0, 0, 0.8)"});break;case"right":Object.assign(n.style,{top:"50%",right:"100%",marginTop:"-5px",borderWidth:"5px 5px 5px 0",borderColor:"transparent rgba(0, 0, 0, 0.8) transparent transparent"});break}return l.appendChild(n),l},le=(t,o,l)=>{const n=o.getBoundingClientRect(),r=t.getBoundingClientRect(),s=window.pageXOffset||document.documentElement.scrollLeft,c=window.pageYOffset||document.documentElement.scrollTop;let a=0,i=0;switch(l){case"top":a=n.top+c-r.height-8,i=n.left+s+(n.width-r.width)/2;break;case"bottom":a=n.bottom+c+8,i=n.left+s+(n.width-r.width)/2;break;case"left":a=n.top+c+(n.height-r.height)/2,i=n.left+s-r.width-8;break;case"right":a=n.top+c+(n.height-r.height)/2,i=n.right+s+8;break}const u=window.innerWidth,d=window.innerHeight;i<8?i=8:i+r.width>u-8&&(i=u-r.width-8),a<c+8?l==="top"?a=n.bottom+c+8:a=c+8:a+r.height>c+d-8&&(l==="bottom"?a=n.top+c-r.height-8:a=c+d-r.height-8),t.style.top=`${a}px`,t.style.left=`${i}px`},he=(t,o,l)=>{t.parentElement||document.body.appendChild(t),t.style.visibility="visible",le(t,o,l),requestAnimationFrame(()=>{t.style.opacity="1"})},ve=t=>{t.style.opacity="0",t.style.visibility="hidden"},fe=t=>t.scrollWidth>t.clientWidth||t.scrollHeight>t.clientHeight,_e=t=>!!t.closest(".vt-table, table"),we={mounted(t,o){var i;const l=(i=o.value)==null?void 0:i.trim();if(!l)return;const n=t.dataset.placement||"top",r=pe(l,n);t.__tooltipEl=r;const s=()=>{(_e(t)?fe(t):!0)&&he(r,t,n)},c=()=>{ve(r)},a=()=>{r.style.opacity==="1"&&le(r,t,n)};t.__mouseenterHandler=s,t.__mouseleaveHandler=c,t.__scrollHandler=a,t.addEventListener("mouseenter",s),t.addEventListener("mouseleave",c),window.addEventListener("scroll",a,!0),window.addEventListener("resize",a)},updated(t,o){var n;const l=(n=o.value)==null?void 0:n.trim();if(t.__tooltipEl)l?t.__tooltipEl.firstChild.textContent=l:(t.__tooltipEl.parentElement&&t.__tooltipEl.parentElement.removeChild(t.__tooltipEl),delete t.__tooltipEl);else if(l){const r=t.dataset.placement||"top",s=pe(l,r);t.__tooltipEl=s;const c=()=>{(_e(t)?fe(t):!0)&&he(s,t,r)},a=()=>{ve(s)},i=()=>{s.style.opacity==="1"&&le(s,t,r)};t.__mouseenterHandler=c,t.__mouseleaveHandler=a,t.__scrollHandler=i,t.addEventListener("mouseenter",c),t.addEventListener("mouseleave",a),window.addEventListener("scroll",i,!0),window.addEventListener("resize",i)}},beforeUnmount(t){t.__tooltipEl&&t.__tooltipEl.parentElement&&(t.__tooltipEl.parentElement.removeChild(t.__tooltipEl),delete t.__tooltipEl),t.__mouseenterHandler&&(t.removeEventListener("mouseenter",t.__mouseenterHandler),delete t.__mouseenterHandler),t.__mouseleaveHandler&&(t.removeEventListener("mouseleave",t.__mouseleaveHandler),delete t.__mouseleaveHandler),t.__scrollHandler&&(window.removeEventListener("scroll",t.__scrollHandler,!0),window.removeEventListener("resize",t.__scrollHandler),delete t.__scrollHandler)}},ye={install(t,o={}){const{prefix:l="V",modal:n=!0}=o;t.component(`${l}Button`,J),t.component(`${l}Icon`,O),t.component(`${l}Loader`,se),t.component(`${l}Modal`,re),t.component(`${l}Pagination`,ge),t.component(`${l}Checkbox`,K),t.component(`${l}Table`,ke),t.component(`${l}TableColumn`,be),t.directive("tooltip",we),n&&t.use(Ce)}},Do=ye.install;exports.VButton=J;exports.VCheckbox=K;exports.VIcon=O;exports.VLoader=se;exports.VModal=re;exports.VModalPlugin=Ce;exports.VPagination=ge;exports.VTable=ke;exports.VTableColumn=be;exports.default=ye;exports.install=Do;exports.modalManager=q;exports.tooltipDirective=we;
|
package/dist/index.d.ts
CHANGED
|
@@ -54,6 +54,24 @@ declare const __VLS_component_3: DefineComponent<VCheckboxProps, {}, {}, {}, {},
|
|
|
54
54
|
isDouble: boolean;
|
|
55
55
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLLabelElement>;
|
|
56
56
|
|
|
57
|
+
declare const __VLS_component_4: DefineComponent<__VLS_PublicProps, {
|
|
58
|
+
toggleRowSelection: (row: Record<string, any>, selected?: boolean) => void;
|
|
59
|
+
toggleAllSelection: () => void;
|
|
60
|
+
selectAbsolutelyAll: () => void;
|
|
61
|
+
clearSelection: () => void;
|
|
62
|
+
getSelectionRows: () => Record<string, any>[];
|
|
63
|
+
setSelectionRows: (rows: Record<string, any>[]) => void;
|
|
64
|
+
resetInfinityScroll: () => void;
|
|
65
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
66
|
+
[x: string]: any;
|
|
67
|
+
} & {
|
|
68
|
+
[x: string]: any;
|
|
69
|
+
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
70
|
+
[x: `on${Capitalize<any>}`]: ((...args: any) => any) | undefined;
|
|
71
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
72
|
+
tableWrapperRef: HTMLDivElement;
|
|
73
|
+
}, HTMLDivElement>;
|
|
74
|
+
|
|
57
75
|
declare type __VLS_Props = {
|
|
58
76
|
name: IconName;
|
|
59
77
|
};
|
|
@@ -92,12 +110,25 @@ declare function __VLS_template_3(): {
|
|
|
92
110
|
rootEl: HTMLLabelElement;
|
|
93
111
|
};
|
|
94
112
|
|
|
113
|
+
declare function __VLS_template_4(): {
|
|
114
|
+
attrs: Partial<{}>;
|
|
115
|
+
slots: {
|
|
116
|
+
default?(_: {}): any;
|
|
117
|
+
};
|
|
118
|
+
refs: {
|
|
119
|
+
tableWrapperRef: HTMLDivElement;
|
|
120
|
+
};
|
|
121
|
+
rootEl: HTMLDivElement;
|
|
122
|
+
};
|
|
123
|
+
|
|
95
124
|
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
96
125
|
|
|
97
126
|
declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
|
|
98
127
|
|
|
99
128
|
declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
|
|
100
129
|
|
|
130
|
+
declare type __VLS_TemplateResult_4 = ReturnType<typeof __VLS_template_4>;
|
|
131
|
+
|
|
101
132
|
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
102
133
|
new (): {
|
|
103
134
|
$slots: S;
|
|
@@ -116,6 +147,12 @@ declare type __VLS_WithTemplateSlots_3<T, S> = T & {
|
|
|
116
147
|
};
|
|
117
148
|
};
|
|
118
149
|
|
|
150
|
+
declare type __VLS_WithTemplateSlots_4<T, S> = T & {
|
|
151
|
+
new (): {
|
|
152
|
+
$slots: S;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
|
|
119
156
|
export declare const DEFAULT_COLUMN_CONFIG: {
|
|
120
157
|
sortable: boolean;
|
|
121
158
|
actionColumn: boolean;
|
|
@@ -369,23 +406,7 @@ export declare const VPagination: DefineComponent<PaginationProps, {}, {}, {}, {
|
|
|
369
406
|
maxVisiblePages: number;
|
|
370
407
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
371
408
|
|
|
372
|
-
export declare const VTable:
|
|
373
|
-
toggleRowSelection: (row: Record<string, any>, selected?: boolean) => void;
|
|
374
|
-
toggleAllSelection: () => void;
|
|
375
|
-
selectAbsolutelyAll: () => void;
|
|
376
|
-
clearSelection: () => void;
|
|
377
|
-
getSelectionRows: () => Record<string, any>[];
|
|
378
|
-
setSelectionRows: (rows: Record<string, any>[]) => void;
|
|
379
|
-
resetInfinityScroll: () => void;
|
|
380
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
381
|
-
[x: string]: any;
|
|
382
|
-
} & {
|
|
383
|
-
[x: string]: any;
|
|
384
|
-
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
385
|
-
[x: `on${Capitalize<any>}`]: ((...args: any) => any) | undefined;
|
|
386
|
-
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
387
|
-
tableWrapperRef: HTMLDivElement;
|
|
388
|
-
}, HTMLDivElement>;
|
|
409
|
+
export declare const VTable: __VLS_WithTemplateSlots_4<typeof __VLS_component_4, __VLS_TemplateResult_4["slots"]>;
|
|
389
410
|
|
|
390
411
|
export declare const VTableColumn: DefineComponent<VTableColumnProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<VTableColumnProps> & Readonly<{}>, {
|
|
391
412
|
sortable: boolean;
|