voiptime-components 0.0.25 → 0.0.26
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 +37 -15
- package/dist/index.es.js +85 -74
- 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"),N=(o,t)=>{const l=o.__vccOpts||o;for(const[n,s]of t)l[n]=s;return l},He={},De={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function We(o,t){return e.openBlock(),e.createElementBlock("svg",De,t[0]||(t[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=N(He,[["render",We]]),Ae={},Oe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function je(o,t){return e.openBlock(),e.createElementBlock("svg",Oe,t[0]||(t[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=N(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(o,t){return e.openBlock(),e.createElementBlock("svg",Ue,t[0]||(t[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=N(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(o,t){return e.openBlock(),e.createElementBlock("svg",Ke,t[0]||(t[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=N(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(o,t){return e.openBlock(),e.createElementBlock("svg",et,t[0]||(t[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=N(Qe,[["render",tt]]),nt={},lt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rt(o,t){return e.openBlock(),e.createElementBlock("svg",lt,t[0]||(t[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 st=N(nt,[["render",rt]]),at={},it={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ct(o,t){return e.openBlock(),e.createElementBlock("svg",it,t[0]||(t[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=N(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(o,t){return e.openBlock(),e.createElementBlock("svg",mt,t[0]||(t[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=N(ut,[["render",pt]]),ft={},vt={xmlns:"http://www.w3.org/2000/svg",width:"60",height:"60",viewBox:"0 0 60 60",fill:"none"};function _t(o,t){return e.openBlock(),e.createElementBlock("svg",vt,t[0]||(t[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 kt=N(ft,[["render",_t]]),gt={},Ct={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function wt(o,t){return e.openBlock(),e.createElementBlock("svg",Ct,t[0]||(t[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 bt=N(gt,[["render",wt]]),yt={},Bt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xt(o,t){return e.openBlock(),e.createElementBlock("svg",Bt,t[0]||(t[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=N(yt,[["render",xt]]),Vt={},Mt={width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function St(o,t){return e.openBlock(),e.createElementBlock("svg",Mt,t[0]||(t[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 Lt=N(Vt,[["render",St]]),$t={},Nt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function zt(o,t){return e.openBlock(),e.createElementBlock("svg",Nt,t[0]||(t[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=N($t,[["render",zt]]),Tt={},Rt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ht(o,t){return e.openBlock(),e.createElementBlock("svg",Rt,t[0]||(t[0]=[e.createElementVNode("path",{d:"M9.31732 16.8976L7.50065 17.5026V10.4193L3.76732 6.3126C3.48852 6.00588 3.33403 5.60627 3.33398 5.19177V3.33594H16.6673V5.14594C16.6672 5.58793 16.4916 6.01178 16.179 6.32427L12.5007 10.0026V12.5026M12.5007 15.8359L14.1673 17.5026L17.5007 14.1693",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Dt=N(Tt,[["render",Ht]]),Wt={},Pt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function At(o,t){return e.openBlock(),e.createElementBlock("svg",Pt,t[0]||(t[0]=[e.createElementVNode("path",{d:"M11.4657 16.1809L7.50065 17.5026V10.4193L3.76732 6.3126C3.48852 6.00588 3.33403 5.60627 3.33398 5.19177V3.33594H16.6673V5.14594C16.6672 5.58793 16.4916 6.01178 16.179 6.32427L12.5007 10.0026V11.2526M18.334 18.3359L14.1673 14.1693M14.1673 18.3359L18.334 14.1693",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Ot=N(Wt,[["render",At]]),jt={},Ft={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Zt(o,t){return e.openBlock(),e.createElementBlock("svg",Ft,t[0]||(t[0]=[e.createElementVNode("path",{d:"M9.4676 15.1809L5.5026 16.5026V9.41927L1.76927 5.3126C1.49048 5.00588 1.33598 4.60627 1.33594 4.19177V2.33594H14.6693V4.14594C14.6692 4.58793 14.4935 5.01178 14.1809 5.32427L10.5026 9.0026V10.2526",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M15.5 16.6591L13.857 17.9057C13.7756 17.9719 13.6868 18.0032 13.5906 17.9997C13.4944 17.9962 13.4093 17.9685 13.3353 17.9167C13.2613 17.865 13.204 17.7951 13.1635 17.7071C13.1229 17.6192 13.121 17.5236 13.1577 17.4203L13.7904 15.3795L12.1808 14.2433C12.092 14.1844 12.0365 14.1072 12.0143 14.0116C11.9921 13.916 11.9958 13.8277 12.0254 13.7468C12.055 13.6659 12.1068 13.5942 12.1808 13.5315C12.2548 13.4688 12.3436 13.4377 12.4472 13.438H14.4343L15.0782 11.3199C15.1152 11.217 15.1726 11.1378 15.2504 11.0825C15.3283 11.0272 15.4115 10.9997 15.5 11C15.5885 11.0003 15.6718 11.0279 15.75 11.083C15.8281 11.138 15.8854 11.217 15.9218 11.3199L16.5657 13.438H18.5528C18.6564 13.438 18.7452 13.4693 18.8192 13.5319C18.8932 13.5946 18.945 13.6662 18.9746 13.7468C19.0042 13.8274 19.0079 13.9157 18.9857 14.0116C18.9635 14.1075 18.908 14.1847 18.8192 14.2433L17.2096 15.3795L17.8423 17.4203C17.8793 17.5233 17.8775 17.6189 17.837 17.7071C17.7964 17.7954 17.739 17.8653 17.6647 17.9167C17.5904 17.9682 17.5053 17.9959 17.4094 17.9997C17.3135 18.0035 17.2247 17.9722 17.143 17.9057L15.5 16.6591Z",stroke:"currentColor","stroke-width":"1.5"},null,-1)]))}const Ut=N(jt,[["render",Zt]]),qt={},Xt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Gt(o,t){return e.openBlock(),e.createElementBlock("svg",Xt,t[0]||(t[0]=[e.createStaticVNode('<path d="M10.5 5.5H17.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><path d="M10.5 10H17.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><path d="M10.5 15H17.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><path d="M3 15.083L4.042 16.125L7.167 13" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3 6.083L4.042 7.125L7.167 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>',5)]))}const Kt=N(qt,[["render",Gt]]),Yt={},Jt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Qt(o,t){return e.openBlock(),e.createElementBlock("svg",Jt,t[0]||(t[0]=[e.createElementVNode("path",{d:"M16.6673 5.83594L6.66732 5.83594M16.6673 5.83594L13.7507 8.7526M16.6673 5.83594L13.7507 2.91927M14.1673 14.1693L3.33398 14.1693M3.33398 14.1693L6.25065 17.0859M3.33398 14.1693L6.25065 11.2526",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const eo=N(Yt,[["render",Qt]]),to={},oo={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function no(o,t){return e.openBlock(),e.createElementBlock("svg",oo,t[0]||(t[0]=[e.createElementVNode("path",{d:"M11.1667 10.9167V9.66667L14.845 5.98833C15.1576 5.67585 15.3332 5.25199 15.3333 4.81V3H2V4.85583C2.00004 5.27033 2.15454 5.66994 2.43333 5.97667L6.16667 10.0833V17.1667C6.16667 17.1667 7.37495 16.7639 8.14917 16.5058",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M15.4116 11.3639L11.4924 15.283C11.4138 15.3616 11.3636 15.4642 11.3498 15.5746L11.0994 17.5789C11.059 17.9025 11.3341 18.1776 11.6577 18.1371L13.6622 17.8861C13.7725 17.8722 13.8751 17.8221 13.9537 17.7435L17.8724 13.8248C18.0676 13.6296 18.0676 13.313 17.8724 13.1177L16.1187 11.364C15.9234 11.1687 15.6068 11.1687 15.4116 11.3639Z",stroke:"currentColor","stroke-width":"1.5"},null,-1),e.createElementVNode("path",{d:"M14 12L16.4608 14.4608",stroke:"currentColor","stroke-width":"1.5"},null,-1)]))}const lo=N(to,[["render",no]]),ro={},so={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ao(o,t){return e.openBlock(),e.createElementBlock("svg",so,t[0]||(t[0]=[e.createElementVNode("path",{d:"M6.2832 15.8359H3.3332C3.11222 15.8359 2.90029 15.7482 2.74404 15.5919C2.58778 15.4356 2.5 15.2237 2.5 15.0027V4.16954C2.49995 4.06009 2.52146 3.9517 2.56331 3.85056C2.60516 3.74943 2.66652 3.65753 2.7439 3.58012C2.82127 3.50271 2.91314 3.4413 3.01426 3.3994C3.11537 3.3575 3.22375 3.33594 3.3332 3.33594H16.6668C16.7763 3.33594 16.8846 3.3575 16.9857 3.3994C17.0869 3.4413 17.1787 3.50271 17.2561 3.58012C17.3335 3.65753 17.3948 3.74943 17.4367 3.85056C17.4785 3.9517 17.5001 4.06009 17.5 4.16954V15.0027C17.5 15.2237 17.4122 15.4356 17.256 15.5919C17.0997 15.7482 16.8878 15.8359 16.6668 15.8359H5.38347",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M6.66406 2.5V5M13.3305 2.5V5M8.33046 10.8332L9.16406 11.6668L11.6641 9.1668",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const io=N(ro,[["render",ao]]),co={},uo={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function mo(o,t){return e.openBlock(),e.createElementBlock("svg",uo,t[0]||(t[0]=[e.createStaticVNode('<circle cx="4.5" cy="12.5" r="1.5" stroke="currentColor" stroke-width="1.5"></circle><circle cx="9.5" cy="8.5" r="1.5" transform="rotate(-180 9.5 8.5)" stroke="currentColor" stroke-width="1.5"></circle><circle cx="14.5" cy="12.5" r="1.5" stroke="currentColor" stroke-width="1.5"></circle><path d="M4.55469 10.5V2" stroke="currentColor" stroke-width="1.5"></path><path d="M9.44531 9.5L9.44531 18" stroke="currentColor" stroke-width="1.5"></path><path d="M14.5547 10.5V2" stroke="currentColor" stroke-width="1.5"></path><path d="M4.55469 18V15.5" stroke="currentColor" stroke-width="1.5"></path><path d="M9.44531 2L9.44531 5.5" stroke="currentColor" stroke-width="1.5"></path><path d="M14.5547 18V15.5" stroke="currentColor" stroke-width="1.5"></path>',9)]))}const po=N(co,[["render",mo]]),ho={},fo={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function vo(o,t){return e.openBlock(),e.createElementBlock("svg",fo,t[0]||(t[0]=[e.createElementVNode("path",{d:"M9.4676 15.1809L5.5026 16.5026V9.41927L1.76927 5.3126C1.49048 5.00588 1.33598 4.60627 1.33594 4.19177V2.33594H14.6693V4.14594C14.6692 4.58793 14.4935 5.01178 14.1809 5.32427L10.5026 9.0026V10.2526",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M16 16.8926V11M13.0537 13.9463H18.9463",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const _o=N(ho,[["render",vo]]),ko={arrowDown:Pe,arrowTop:Fe,arrowRight:Je,arrowLeft:ot,arrowReload:Xe,columnInsert:st,freeze:dt,unfreeze:ht,columnsMove:bt,empty:kt,listBullet:Et,listBulletHorizontal:Lt,close:It,filterSave:Dt,filterReset:Ot,filterNew:Ut,filterMultiselect:Kt,filterExchange:eo,filterEdit:lo,filterDateCheck:io,filterAdvanced:po,filterAdd:_o},j=e.defineComponent({__name:"VIcon",props:{name:{}},setup(o){const t=o,l=e.computed(()=>ko[t.name]);return(n,s)=>l.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value),{key:0})):e.createCommentVNode("",!0)}}),go={},Co={class:"vt-loader"};function wo(o,t){return e.openBlock(),e.createElementBlock("span",Co)}const re=N(go,[["render",wo]]),bo=["disabled","type","data-placement"],yo={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(o,{emit:t}){const l=o,n=t,s=e.useSlots(),r=e.computed(()=>!!(l.icon&&l.shape)),c=e.computed(()=>{var C,b;const d=s.default?s.default({}):null;return((b=(C=d==null?void 0:d[0])==null?void 0:C.children)==null?void 0:b.toString())??""}),a=e.computed(()=>["vt-button",`vt-button--${l.type}`,{[`vt-button--${l.shape}`]:l.shape,"vt-button--icon-only":r.value,"vt-button--disabled":l.disabled||l.loading,"vt-button--loading":l.loading}]),i=e.computed(()=>r.value&&l.tooltip?c.value:null),u=d=>{!l.disabled&&!l.loading&&n("click",d)};return(d,C)=>{const b=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(re,{key:0,class:"vt-button__icon"})):l.icon?(e.openBlock(),e.createBlock(j,{key:1,name:l.icon,class:"vt-button__icon"},null,8,["name"])):e.createCommentVNode("",!0),r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",yo,[e.renderSlot(d.$slots,"default")]))],10,bo)),[[b,i.value]])}}}),Bo={key:0,class:"vt-modal__header"},xo={key:0,class:"vt-modal__title"},Eo={class:"vt-modal__content"},se=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(o,{emit:t}){const l=o,n=t,s=e.computed(()=>["vt-modal__container",`vt-modal__container--${l.size}`]),r=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(r.value),onClick:a},[e.createElementVNode("div",{class:e.normalizeClass(s.value),onClick:u[0]||(u[0]=e.withModifiers(()=>{},["stop"]))},[i.title||i.showCloseButton?(e.openBlock(),e.createElementBlock("div",Bo,[i.title?(e.openBlock(),e.createElementBlock("h2",xo,e.toDisplayString(i.title),1)):e.createCommentVNode("",!0),i.showCloseButton?(e.openBlock(),e.createBlock(j,{key:1,name:"close",class:"vt-modal__close",onClick:c})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Eo,[e.renderSlot(i.$slots,"default")])],2)],4)):e.createCommentVNode("",!0)]))}}),Vo={class:"vt-pagination"},Mo={class:"vt-pagination__info"},So={class:"vt-pagination__rows-per-page"},Lo=["value"],$o={class:"vt-pagination__navigation"},No=["disabled"],zo=["onClick"],Io=["disabled"],ke=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(o,{emit:t}){const l=o,n=t,s=e.computed({get:()=>l.currentPage,set:y=>n("update:currentPage",y)}),r=e.computed({get:()=>l.pageSize,set:y=>n("update:pageSize",y)}),c=e.computed(()=>Math.ceil(l.totalItems/r.value)),a=e.computed(()=>l.totalItems===0?0:(s.value-1)*r.value+1),i=e.computed(()=>Math.min(s.value*r.value,l.totalItems)),u=e.computed(()=>s.value<=1),d=e.computed(()=>s.value>=c.value),C=e.computed(()=>{const y=[],z=c.value,M=s.value,A=l.maxVisiblePages;if(z<=A)for(let w=1;w<=z;w++)y.push(w);else{y.push(1);const w=Math.max(2,M-Math.floor(A/2)),$=Math.min(z-1,M+Math.floor(A/2));w>2&&y.push("...");for(let B=w;B<=$;B++)y.push(B);$<z-1&&y.push("..."),z>1&&y.push(z)}return y}),b=()=>{n("pageChange",{page:s.value,pageSize:r.value})},P=y=>{typeof y=="number"&&y!==s.value&&(s.value=y,b())},H=()=>{u.value||(s.value--,b())},Z=()=>{d.value||(s.value++,b())},W=()=>{s.value=1,b()},D=()=>{n("reloadData",s.value)};return e.watch(()=>l.totalItems,()=>{s.value>c.value&&c.value>0&&(s.value=c.value,b())}),(y,z)=>(e.openBlock(),e.createElementBlock("div",Vo,[e.createElementVNode("div",Mo,[e.createElementVNode("div",So,[z[1]||(z[1]=e.createElementVNode("label",{for:"rowsSelect",class:"vt-pagination__label"},"Рядків на сторінку:",-1)),e.withDirectives(e.createElementVNode("select",{id:"rowsSelect","onUpdate:modelValue":z[0]||(z[0]=M=>r.value=M),onChange:W,class:"vt-pagination__select"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.pageSizeOptions,M=>(e.openBlock(),e.createElementBlock("option",{key:M,value:M},e.toDisplayString(M),9,Lo))),128))],544),[[e.vModelSelect,r.value]])]),e.createElementVNode("span",null,e.toDisplayString(a.value)+" - "+e.toDisplayString(i.value)+" з "+e.toDisplayString(y.totalItems),1)]),e.createElementVNode("div",$o,[e.createElementVNode("button",{onClick:H,disabled:u.value,class:e.normalizeClass({"vt-pagination__nav-button":!0,"has-items":!u.value})},[e.createVNode(j,{name:"arrowLeft"})],10,No),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,M=>(e.openBlock(),e.createElementBlock("button",{key:M,onClick:A=>P(M),class:e.normalizeClass(["vt-pagination__nav-button",{"vt-pagination__nav-button--active":M===s.value}])},e.toDisplayString(M),11,zo))),128)),e.createElementVNode("button",{onClick:Z,disabled:d.value,class:e.normalizeClass({"vt-pagination__nav-button":!0,"has-items":!d.value})},[e.createVNode(j,{name:"arrowRight"})],10,Io)]),e.createElementVNode("div",null,[e.createVNode(J,{icon:"arrowReload",shape:"circle",tooltip:"",tooltipPlacement:"left",onClick:D},{default:e.withCtx(()=>z[2]||(z[2]=[e.createTextVNode("Оновити дані ",-1)])),_:1,__:[2]})])]))}}),To=["for"],Ro=["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(o,{emit:t}){const l=o,n=t,s=()=>`vt-checkbox-${Math.random().toString(36).substr(2,9)}`,r=e.computed(()=>l.id||s()),c=e.computed(()=>l.modelValue??l.checked),a=d=>{if(l.disabled)return;const b=d.target.checked;n("update:modelValue",b),n("change",b,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:r.value},[e.createElementVNode("input",{id:r.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,Ro),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,To))}});function Ho(o){const t=e.computed(()=>[...o].sort((s,r)=>s.pinnedLeft&&!r.pinnedLeft?-1:!s.pinnedLeft&&r.pinnedLeft||s.pinnedRight&&!r.pinnedRight?1:!s.pinnedRight&&r.pinnedRight?-1:0)),l=()=>{const s=t.value.length,r=t.value.filter(d=>d.width||d.minWidth),c=r.reduce((d,C)=>d+(C.width||C.minWidth||0),0),a=s-r.length;if(a===0)return 150;const u=Math.max(800-c,a*80);return Math.max(Math.floor(u/a),120)};return{sortedColumns:t,getDefaultColumnWidth:l,getStickyOffset:(s,r,c=!1)=>{const a=t.value;let i=0;if(s==="left"){c&&(i+=50);for(let u=0;u<r;u++){const d=a[u];d.pinnedLeft&&(i+=d.width||d.minWidth||l())}}else for(let u=a.length-1;u>r;u--){const d=a[u];d.pinnedRight&&(i+=d.width||d.minWidth||l())}return i}}}function Do(o){const t=()=>{const r={};return o.maxHeight&&(r.maxHeight=`${o.maxHeight}px`),r},l=(r,c,a,i)=>{const u={};if(r.width)u.width=`${r.width}px`,u.minWidth=`${r.width}px`,u.maxWidth=`${r.width}px`;else if(r.minWidth)u.minWidth=`${r.minWidth}px`,u.width=`${r.minWidth}px`,u.maxWidth="none";else{const d=i();u.width=`${d}px`,u.minWidth="80px",u.maxWidth="none"}return r.pinnedLeft?(u.position="sticky",u.left=`${a("left",c,o.selectable)}px`,u.zIndex="10"):r.pinnedRight&&(u.position="sticky",u.right=`${a("right",c,!1)}px`,u.zIndex="10"),u};return{getTableWrapperStyle:t,getColumnStyle:l,getHeaderStyle:(r,c,a,i)=>{const u=l(r,c,a,i);return o.maxHeight&&(u.position="sticky",u.top="0",r.pinnedLeft||r.pinnedRight?u.zIndex="12":u.zIndex="11"),u},getFooterStyle:(r,c,a,i)=>{const u=l(r,c,a,i);return o.maxHeight&&(u.position="sticky",u.bottom="0",r.pinnedLeft||r.pinnedRight?u.zIndex="12":u.zIndex="11"),u}}}function Wo(){const o=e.ref({resizingCol:null,startX:0,startWidth:0}),t=`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,s,r,c)=>{n.preventDefault(),n.stopPropagation(),o.value.resizingCol=s,o.value.startX=n.clientX,o.value.startWidth=s.width||s.minWidth||r(s.prop);const a=u=>{const{resizingCol:d,startX:C,startWidth:b}=o.value;if(!d)return;document.querySelectorAll(`[data-resizer="${d.prop}"]`).forEach(D=>{D.classList.add("vt-table__resizer--active")});const P=u.clientX-C,H=d.minWidth||50,Z=d.maxWidth||1e3,W=Math.max(Math.min(b+P,Z),H);d.width=W},i=()=>{const{resizingCol:u}=o.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)),o.value.resizingCol=null};document.addEventListener("mousemove",a),document.addEventListener("mouseup",i),document.body.style.cursor=t,document.body.style.userSelect="none",document.body.classList.add("vt-table-resizing")},resizeState:o}}function Po(o,t,l,n){var F;const s=o.selectionKey||"id",r=e.ref([]),c=e.ref(null),a=e.ref(!1);(F=o.defaultSelection)!=null&&F.length&&(r.value=[...o.defaultSelection]);const i=p=>p[s],u=p=>a.value?!0:r.value.some(T=>i(T)===i(p)),d=e.computed(()=>t.value.filter(p=>u(p)).length),C=e.computed(()=>t.value.length>0&&d.value===t.value.length),b=e.computed(()=>{if(a.value)return!1;const p=d.value;return p>0&&p<t.value.length}),P=e.computed(()=>a.value?!0:C.value&&!b.value),H=e.computed(()=>a.value),Z=(p,T)=>{const S=i(p),O=r.value.some(f=>i(f)===i(p)),m=T!==void 0?T:!O;if(a.value&&!m){a.value=!1,n!=null&&n.value&&(r.value=n.value.filter(f=>i(f)!==S)),B(p,!1);return}a.value&&m||(m&&!O?r.value.push(p):!m&&O&&(r.value=r.value.filter(f=>i(f)!==S)),o.selectOnClickRow&&T===void 0&&A(m?p:null),B(p,m))},W=()=>{switch(D()){case"none":case"partial":y();break;case"allVisible":z();break;case"absoluteAll":M();break}},D=()=>a.value?"absoluteAll":C.value?"allVisible":d.value>0?"partial":"none",y=()=>{const p=[],T=new Set(r.value.map(S=>i(S)));r.value.forEach(S=>{p.push(S)}),t.value.forEach(S=>{T.has(i(S))||p.push(S)}),r.value=p,a.value=!1,B()},z=()=>{a.value=!0,n!=null&&n.value?r.value=[...n.value]:r.value=[...t.value],B(void 0,void 0,!0)},M=()=>{r.value=[],a.value=!1,c.value=null,B()},A=p=>{const T=c.value;c.value=p,l("current-change",{currentRow:c.value,oldCurrentRow:T})},w=()=>[...r.value],$=p=>{r.value=[...p],a.value=!1,B()},B=(p,T,S=!1)=>{const O={selection:[...r.value],row:p,selected:T,isAllSelected:S||a.value};l("selection-change",O)};return e.watch(()=>o.defaultSelection,p=>{p!=null&&p.length&&(r.value=[...p])}),{selectedRows:r,currentRow:c,isRowSelected:u,isAllSelected:P,isIndeterminate:b,isDoubleCheck:H,isFullSelection:a,toggleRowSelection:Z,toggleAllSelection:W,clearSelection:M,setCurrentRow:A,getSelectionRows:w,setSelectionRows:$,selectAbsolutelyAll:z}}function Ao(o,t){if(!o)return String(t.value??"");try{const l=o(t);return l}catch(l){return console.error("Error rendering table slot:",l),String(t.value??"")}}const Oo=(o,t,l="asc")=>{if(o==null&&t==null)return 0;if(o==null)return l==="asc"?1:-1;if(t==null)return l==="asc"?-1:1;if(o===t)return 0;let n=0;const s=Number(o),r=Number(t);return!isNaN(s)&&!isNaN(r)?n=s-r:ue(o)&&ue(t)?n=new Date(o).getTime()-new Date(t).getTime():typeof o=="boolean"&&typeof t=="boolean"?n=o===t?0:o?-1:1:n=String(o).localeCompare(String(t),void 0,{numeric:!0,sensitivity:"base"}),l==="desc"?-n:n},ue=o=>o instanceof Date?!isNaN(o.getTime()):typeof o=="string"&&/\d{4}-\d{2}-\d{2}|\//.test(o)?!isNaN(new Date(o).getTime()):!1,jo=(o,t,l)=>{o.sortable&&l({prop:o.prop,direction:t})},me=(o,t)=>{const l=(t==null?void 0:t.prop)===o.prop,n=t==null?void 0:t.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(" ")}},Fo=(o,t,l)=>{if(!t)return[...o];const n=l.find(r=>r.prop===t.prop);if(!(n!=null&&n.sortable))return[...o];const s=n.sortMethod||Oo;return[...o].sort((r,c)=>{const a=r[n.prop],i=c[n.prop];return s(a,i,t.direction)})};class Zo{constructor(){this.modalStack=[],this.baseZIndex=1e3}open(t={}){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 s=e.ref(!0),r=this.baseZIndex+this.modalStack.length*10,c=e.createApp({setup(){const i=()=>{s.value=!1,setTimeout(()=>{q.closeById(l)},100)};return()=>e.h(se,{modelValue:s.value,"onUpdate:modelValue":i,title:t.title,size:t.size||"medium",showCloseButton:t.showCloseButton!==!1,closeOnBackdropClick:t.closeOnBackdropClick!==!1,onClose:i,zIndex:r},{default:()=>t.component?e.h(t.component,t.props||{}):t.content?e.h("div",{innerHTML:t.content}):null})}});c.mount(n);const a={id:l,app:c,container:n,isOpen:s};return this.modalStack.push(a),l}close(){if(this.modalStack.length>0){const t=this.modalStack[this.modalStack.length-1];this.closeById(t.id)}}closeById(t){const l=this.modalStack.findIndex(n=>n.id===t);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 t=this.modalStack.pop();t&&this.cleanupModal(t)}}getOpenModalsCount(){return this.modalStack.length}cleanupModal(t){t.app&&t.app.unmount(),t.container&&t.container.parentNode&&document.body.removeChild(t.container)}recalculateZIndices(){}}const q=new Zo,ge={install(o){o.config.globalProperties.$modal=q,o.config.globalProperties.$modalStack={closeAll:()=>q.closeAll(),getCount:()=>q.getOpenModalsCount(),closeById:t=>q.closeById(t)}}},Uo={class:"vt-columns-selector-body"},qo={class:"vt-columns-selector"},Xo={class:"vt-columns-selector__panel"},Go=["draggable","onDragstart","onDragover","onDrop"],Ko={key:0,class:"vt-columns-selector__panel-item-pinned"},Yo={class:"vt-columns-selector__available"},Jo=["onClick"],Qo={key:0,class:"vt-columns-selector__group-columns"},en={key:0,class:"vt-columns-selector__pinned-note"},tn={class:"vt-modal__content-button"},on=e.defineComponent({__name:"VTableColumnSelector",props:{columns:{},columnsSelector:{default:()=>[]}},emits:["update-columns"],setup(o,{emit:t}){const l=o,n=t,s=e.ref([]),r=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(f=>{if(f.name==="removed")return;const v=f.columns.map(V=>V.prop),g=s.value.filter(V=>v.includes(V.prop));g.length===0?m[f.name]={checked:!1,indeterminate:!1}:g.length===f.columns.length?m[f.name]={checked:!0,indeterminate:!1}:m[f.name]={checked:!1,indeterminate:!0}}),m}),d=e.computed(()=>l.columnsSelector.filter(m=>m.name!=="removed")),C=m=>m.pinnedLeft||m.pinnedRight,b=m=>!C(m),P=()=>{const m=s.value;let f=-1;for(let g=0;g<m.length;g++)m[g].pinnedLeft&&(f=g);let v=m.length;for(let g=0;g<m.length;g++)if(m[g].pinnedRight){v=g;break}return{minIndex:f+1,maxIndex:v-1}},H=m=>{const f=P();return!(m<f.minIndex||m>f.maxIndex+1)},Z=(m,f)=>{const v=s.value[f];if(!b(v)){m.preventDefault();return}c.value=f,m.dataTransfer&&(m.dataTransfer.effectAllowed="move",m.dataTransfer.setData("text/plain",v.prop)),document.body.style.cursor="grabbing"},W=(m,f)=>{if(c.value===-1)return;m.preventDefault();const v=m.currentTarget.getBoundingClientRect(),g=m.clientY,V=v.top+v.height/2;let x=f,U="before";g<V?(x=f,U="before"):(x=f+1,U="after"),c.value<x&&x--,H(x)?(a.value=f,i.value=U,m.dataTransfer.dropEffect="move"):(a.value=-1,m.dataTransfer.dropEffect="none")},D=()=>{setTimeout(()=>{c.value===-1&&(a.value=-1)},50)},y=(m,f)=>{if(m.preventDefault(),c.value===-1||a.value===-1){M();return}const v=m.currentTarget.getBoundingClientRect(),g=m.clientY,V=v.top+v.height/2;let x=f;if(g>=V&&(x=f+1),c.value<x&&x--,!H(x)||x===c.value){M();return}const U=[...s.value],[ee]=U.splice(c.value,1);U.splice(x,0,ee),s.value=U,M()},z=()=>{M()},M=()=>{c.value=-1,a.value=-1,i.value="before",document.body.style.cursor=""},A=m=>{const f=["vt-columns-selector__panel-item"];return c.value===m&&f.push("vt-columns-selector__panel-item--dragging"),a.value===m&&i.value==="before"&&f.push("vt-columns-selector__panel-item--drop-before"),a.value===m&&i.value==="after"&&f.push("vt-columns-selector__panel-item--drop-after"),f},w=()=>{s.value=[...l.columns.map(m=>({...m}))],l.columnsSelector.forEach(m=>{m.name!=="removed"&&r.value.add(m.name)})},$=(m,f)=>{if(f)s.value.some(v=>v.prop===m.prop)||s.value.push({...m});else{if(C(m))return;s.value=s.value.filter(v=>v.prop!==m.prop)}},B=(m,f)=>{if(f)m.columns.forEach(v=>{s.value.some(g=>g.prop===v.prop)||s.value.push({...v})});else{const v=[];m.columns.forEach(g=>{const V=s.value.find(x=>x.prop===g.prop);V&&!C(V)&&v.push(V)}),s.value=s.value.filter(g=>!v.some(V=>V.prop===g.prop))}},F=m=>s.value.some(f=>f.prop===m.prop),p=m=>{const f=s.value.find(v=>v.prop===m.prop);return!f||!C(f)},T=m=>{r.value.has(m)?r.value.delete(m):r.value.add(m)},S=()=>{n("update-columns",[...s.value]),q.close()},O=()=>{q.close()};return e.onMounted(()=>{w()}),(m,f)=>(e.openBlock(),e.createElementBlock("div",Uo,[e.createElementVNode("div",qo,[e.createElementVNode("div",Xo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(v,g)=>(e.openBlock(),e.createElementBlock("div",{key:v.prop,class:e.normalizeClass(A(g)),draggable:b(v),onDragstart:V=>Z(V,g),onDragover:V=>W(V,g),onDragleave:D,onDrop:V=>y(V,g),onDragend:z},[e.createVNode(j,{name:b(v)?"columnsMove":"freeze",class:e.normalizeClass(["vt-columns-selector__panel-item-icon",{"vt-columns-selector__panel-item-icon--draggable":b(v)}])},null,8,["name","class"]),e.createVNode(K,{label:v.label,checked:!0,disabled:C(v),onChange:V=>$(v,V),onClick:f[0]||(f[0]=e.withModifiers(()=>{},["stop"]))},null,8,["label","disabled","onChange"]),C(v)?(e.openBlock(),e.createElementBlock("span",Ko,"pinned")):e.createCommentVNode("",!0)],42,Go))),128))]),e.createElementVNode("div",Yo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,v=>{var g,V;return e.openBlock(),e.createElementBlock("div",{key:v.name,class:"vt-columns-selector__group"},[e.createElementVNode("div",{class:"vt-columns-selector__group-header",onClick:x=>T(v.name)},[e.createVNode(K,{label:v.label,checked:((g=u.value[v.name])==null?void 0:g.checked)||!1,indeterminate:((V=u.value[v.name])==null?void 0:V.indeterminate)||!1,onChange:x=>B(v,x),onClick:f[1]||(f[1]=e.withModifiers(()=>{},["stop"]))},null,8,["label","checked","indeterminate","onChange"]),v.icon?(e.openBlock(),e.createBlock(j,{key:0,name:v.icon,class:"vt-columns-selector__group-icon"},null,8,["name"])):e.createCommentVNode("",!0)],8,Jo),r.value.has(v.name)?(e.openBlock(),e.createElementBlock("div",Qo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.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=>$(x,U)},null,8,["label","checked","disabled","onChange"]),p(x)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",en," (закріплена) "))]))),128))])):e.createCommentVNode("",!0)])}),128))])]),e.createElementVNode("div",tn,[e.createVNode(J,{onClick:O},{default:e.withCtx(()=>f[2]||(f[2]=[e.createTextVNode("Скасувати",-1)])),_:1,__:[2]}),e.createVNode(J,{type:"primary",onClick:S},{default:e.withCtx(()=>f[3]||(f[3]=[e.createTextVNode("Зберегти",-1)])),_:1,__:[3]})])]))}}),nn=e.defineComponent({__name:"ColumnActions",props:{column:{},allColumns:{},columnsSelector:{}},emits:["pin","update-columns"],setup(o,{emit:t}){const l=o,n=t,s=e.ref(),r=e.ref(),c=e.ref(),a=e.ref(!1),i=e.ref(!1),u=e.ref([]),d=async()=>{if(await e.nextTick(),!s.value||!r.value)return;const w=r.value.getBoundingClientRect(),$=s.value,B=$.offsetWidth,F=w.left+w.width/2;$.style.top=`${w.bottom-20}px`,$.style.left=`${F-B/2}px`;const p=$.getBoundingClientRect();p.right>window.innerWidth&&($.style.left=`${window.innerWidth-B-8}px`),p.left<0&&($.style.left="8px")},C=w=>{w.stopPropagation(),!i.value&&(a.value?P():b())},b=()=>{i.value||(a.value=!0,d(),c.value&&(c.value.style.zIndex="22"))},P=()=>{i.value=!0,a.value=!1,c.value&&c.value.style.removeProperty("z-index"),setTimeout(()=>{i.value=!1},100)},H=w=>{var $,B;!(($=r.value)!=null&&$.contains(w.target))&&!((B=s.value)!=null&&B.contains(w.target))&&P()},Z=()=>{A()?(n("pin",l.column,"none"),console.log(`Колонка "${l.column.label}" відкріплена`)):(n("pin",l.column,"left"),console.log(`Колонка "${l.column.label}" прикріплена зліва`)),P()},W=w=>({name:"removed",label:"Видалені колонки",order:999,columns:w}),D=w=>{var T;const $=new Set(w.map(S=>S.prop)),B=new Set;(T=l.columnsSelector)==null||T.forEach(S=>{S.columns.forEach(O=>B.add(O.prop))}),l.allColumns.forEach(S=>B.add(S.prop));const F=[];B.forEach(S=>{var O;if(!$.has(S)){let m;(O=l.columnsSelector)==null||O.forEach(f=>{const v=f.columns.find(g=>g.prop===S);v&&(m=v)}),m||(m=l.allColumns.find(f=>f.prop===S)),m&&F.push(m)}});const p=[...l.columnsSelector||[]];F.length>0&&p.push(W(F)),u.value=p},y=()=>{D(l.allColumns),q.open({component:on,title:"Управління колонками таблиці",props:{columns:l.allColumns,columnsSelector:u.value,"onUpdate-columns":w=>{console.log("ColumnActions отримав оновлені колонки:",w),n("update-columns",w),D(w)}},size:"large",closeOnBackdropClick:!1}),P()},z=()=>l.column.pinnedLeft,M=()=>l.column.pinnedRight,A=()=>z()||M();return e.onMounted(()=>{document.addEventListener("click",H),r.value&&(c.value=r.value.closest("th")),D(l.allColumns)}),e.onUnmounted(()=>{document.removeEventListener("click",H)}),(w,$)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"triggerRef",ref:r,class:"vt-table-header-actions",onClick:C},[e.createVNode(j,{name:"listBullet"}),a.value?(e.openBlock(),e.createElementBlock("ul",{key:0,ref_key:"menuRef",ref:s,class:e.normalizeClass(["dropdown-menu","vt-table-dropdown",{visible:a.value}])},[e.createElementVNode("li",{onClick:Z},[e.createVNode(j,{name:A()?"unfreeze":"freeze"},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(A()?"Розморозити":"Заморозити"),1)]),e.createElementVNode("li",{onClick:y},[e.createVNode(j,{name:"columnInsert"}),$[0]||($[0]=e.createElementVNode("span",null,"Колонки",-1))])],2)):e.createCommentVNode("",!0)],512))}}),ln={class:"vt-table"},rn={class:"vt-th__content"},sn={class:"vt-th__content"},an={class:"vt-th__label"},cn={key:0,class:"vt-th__sortable"},dn=["data-resizer","onMousedown"],un={key:0,class:"vt-table__empty-row"},mn=["colspan"],pn={class:"vt-table__empty-content"},hn=["onClick"],fn={class:"vt-table__cell-content"},vn={class:"vt-table__cell-content vt-table__cell-content--ellipsis"},_n={key:1},kn=["data-resizer","onMousedown"],gn={key:0,class:"vt-table__summary"},Cn={class:"vt-table__cell-content vt-table__cell-content--summary"},ne=50,Ce=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(o,{expose:t,emit:l}){const n=o,s=e.useModel(o,"columns"),r=l,c=e.ref({}),a=e.ref(),i=e.reactive([]),u=e.ref(n.defaultSort||null),d=e.computed(()=>s.value!==void 0),C=e.computed(()=>n.data&&n.data.length>0),b=e.ref(!1),P=e.ref(0);let H=null;const Z=()=>{d.value&&s.value?i.splice(0,i.length,...s.value):n.columns&&i.splice(0,i.length,...n.columns)};e.watch(()=>s.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:D,getStickyOffset:y}=Ho(i),{getTableWrapperStyle:z,getColumnStyle:M,getHeaderStyle:A,getFooterStyle:w}=Do(n),{onMouseDown:$}=Wo(),B=e.computed(()=>Fo(n.data,u.value,i)),F=e.computed(()=>n.allData||n.data),p=n.selectable?Po(n,B,r,F):null,T=()=>({width:`${ne}px`,minWidth:`${ne}px`,maxWidth:`${ne}px`,left:"0px",position:"sticky",zIndex:10}),S=()=>{const h=T();return n.maxHeight?{...h,top:"0px",zIndex:11}:h},O=()=>{const h=T();return n.maxHeight?{...h,bottom:"0px",zIndex:11}:h},m=()=>{if(!a.value||b.value)return;const h=a.value,_=h.scrollTop,E=h.scrollHeight,L=h.clientHeight,I=30;H&&clearTimeout(H),H=setTimeout(()=>{const Q=_-P.value>1,k=E-_-L<=I,G=E-_-L<=5;P.value=_,Q&&(k||G)&&(b.value=!0,r("infinity-scroll"),setTimeout(()=>{b.value=!1},1e3))},50)},f=()=>{b.value=!1};e.onMounted(()=>{a.value&&a.value.addEventListener("scroll",m)}),e.onUnmounted(()=>{H&&clearTimeout(H),a.value&&a.value.removeEventListener("scroll",m)});const v=(h,_)=>{jo(h,_,E=>{var L,I;((L=u.value)==null?void 0:L.prop)===h.prop&&u.value.direction===_?u.value=null:u.value=E,r("sort-change",{column:h,direction:((I=u.value)==null?void 0:I.direction)||null,prop:h.prop,sortedData:B.value})})},g=(h,_)=>{const E={pinnedLeft:_==="left",pinnedRight:_==="right"};x(h.prop,E),r("column-pin",{column:{...h,...E},position:_})},V=h=>{i.splice(0,i.length,...h),d.value&&(s.value=[...h]),r("columns-change",[...h])},x=(h,_)=>{const E=i.findIndex(L=>L.prop===h);if(E!==-1){if(Object.assign(i[E],_),d.value&&s.value){const L=s.value.findIndex(I=>I.prop===h);if(L!==-1){const I=[...s.value];I[L]={...I[L],..._},s.value=I}}r("columns-change",[...i])}else console.error("Колонку не знайдено:",h,"Доступні колонки:",i.map(L=>L.prop))},U=(h,_,E)=>{r("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||D();$(h,_,D,L=>{x(_.prop,{width:L}),r("column-resize",{column:{..._,width:L},width:L,oldWidth:E})})},xe=(h,_)=>M(h,_,y,D),Ee=(h,_)=>A(h,_,y,D),Ve=(h,_)=>w(h,_,y,D),Me=(h,_)=>{if(!_||!_.prop)return"";const E=h[_.prop];return E==null?"":String(E)},Se=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,L,I)=>(E[L.prop]=_[I],E),{})}return h.reduce((_,E)=>{const L=B.value.map(I=>I[E.prop]);return _[E.prop]=L.every(I=>typeof I=="number")?L.reduce((I,Y)=>I+Y,0):"",_},{})}),Le=e.computed(()=>n.showSummary&&C.value),$e=(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()}),t({toggleRowSelection:$e,toggleAllSelection:Ne,selectAbsolutelyAll:ze,clearSelection:Ie,getSelectionRows:Te,setSelectionRows:Re,resetInfinityScroll:f}),(h,_)=>{var L,I,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(z)()),onScroll:m},[e.renderSlot(h.$slots,"default"),e.createElementVNode("table",ln,[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(S())},[e.createElementVNode("div",rn,[e.createVNode(K,{checked:(L=e.unref(p))==null?void 0:L.isAllSelected.value,indeterminate:(I=e.unref(p))==null?void 0:I.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,G)=>(e.openBlock(),e.createElementBlock("th",{key:k.prop,ref_for:!0,ref:X=>ae(X,k.prop),style:e.normalizeStyle(Ee(k,G)),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",sn,[e.createElementVNode("div",an,e.toDisplayString(k.label),1),k.sortable?(e.openBlock(),e.createElementBlock("div",cn,[e.createVNode(j,{name:"arrowTop",class:e.normalizeClass(e.unref(me)(k,u.value).asc),onClick:e.withModifiers(X=>v(k,"asc"),["stop"])},null,8,["class","onClick"]),e.createVNode(j,{name:"arrowDown",class:e.normalizeClass(e.unref(me)(k,u.value).desc),onClick:e.withModifiers(X=>v(k,"desc"),["stop"])},null,8,["class","onClick"])])):e.createCommentVNode("",!0),k.actionColumn?(e.openBlock(),e.createBlock(nn,{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,dn)],6))),128))])]),e.createElementVNode("tbody",null,[C.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(B.value,(k,G)=>{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:R=>U(k,e.unref(W)[0],R)},[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(T())},[e.createElementVNode("div",fn,[e.createVNode(K,{checked:(de=e.unref(p))==null?void 0:de.isRowSelected(k),onChange:(R,te)=>ee(R,k,te)},null,8,["checked","onChange"])])],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(W),(R,te)=>(e.openBlock(),e.createElementBlock("td",{key:R.prop,ref_for:!0,ref:oe=>ae(oe,R.prop),style:e.normalizeStyle(xe(R,te)),class:e.normalizeClass(["vt-table__td",{"vt-table__td--pinned-left":R.pinnedLeft,"vt-table__td--pinned-right":R.pinnedRight}])},[e.withDirectives((e.openBlock(),e.createElementBlock("div",vn,[R.renderSlot?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(()=>e.unref(Ao)(R.renderSlot,{row:k,column:R,value:k[R.prop],index:G})),{key:0})):(e.openBlock(),e.createElementBlock("span",_n,e.toDisplayString(k[R.prop]),1))])),[[E,R.showOverflowTooltip?Me(k,R):null]]),e.createElementVNode("div",{class:"vt-table__resizer","data-resizer":R.prop,onMousedown:oe=>ie(oe,R)},null,40,kn)],6))),128))],10,hn)}),128)):(e.openBlock(),e.createElementBlock("tr",un,[e.createElementVNode("td",{colspan:e.unref(W).length+(n.selectable?1:0),class:"vt-table__empty-cell"},[e.createElementVNode("div",pn,[e.createVNode(j,{name:"empty",class:"vt-table__empty-icon"}),_[0]||(_[0]=e.createElementVNode("span",{class:"vt-table__empty-text"},"Немає даних!",-1))])],8,mn)]))]),Le.value?(e.openBlock(),e.createElementBlock("tfoot",gn,[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(O())},_[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(W),(k,G)=>(e.openBlock(),e.createElementBlock("td",{key:k.prop,style:e.normalizeStyle(Ve(k,G)),class:e.normalizeClass(["vt-table__td",{"vt-table__td--pinned-left":k.pinnedLeft,"vt-table__td--pinned-right":k.pinnedRight}])},[e.createElementVNode("div",Cn,e.toDisplayString(Se.value[k.prop]),1)],6))),128))])])):e.createCommentVNode("",!0)])],36)}}}),we=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(o){const t=o,l=e.useSlots(),n=e.inject("vt-table-columns");n||console.error("VTableColumn: не знайдено контекст таблиці. Переконайтеся, що компонент використовується всередині VTable.");const s=()=>({prop:t.prop,label:t.label,width:t.width,minWidth:t.minWidth,maxWidth:t.maxWidth,sortable:t.sortable,pinnedLeft:t.pinnedLeft,pinnedRight:t.pinnedRight,actionColumn:t.actionColumn,showOverflowTooltip:t.showOverflowTooltip,selectable:t.selectable,renderSlot:l[t.prop]??l.default??l.slot});let r=-1;return e.onMounted(()=>{if(n){const c=s();n.push(c),r=n.length-1}}),e.watch(()=>[t.width,t.minWidth,t.maxWidth,t.sortable,t.pinnedLeft,t.pinnedRight,t.actionColumn,t.showOverflowTooltip,t.selectable,t.label],()=>{if(n&&r!==-1){const c=n.findIndex(a=>a.prop===t.prop);if(c!==-1){const a=n[c],i={...s(),renderSlot:a.renderSlot};n[c]=i}}},{deep:!0}),e.onUnmounted(()=>{if(n){const c=n.findIndex(a=>a.prop===t.prop);c>-1&&n.splice(c,1)}}),(c,a)=>null}}),pe=(o,t)=>{const l=document.createElement("div");l.className=`vt-tooltip vt-tooltip--${t}`,l.innerText=o,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)"}),o.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"}),t){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=(o,t,l)=>{const n=t.getBoundingClientRect(),s=o.getBoundingClientRect(),r=window.pageXOffset||document.documentElement.scrollLeft,c=window.pageYOffset||document.documentElement.scrollTop;let a=0,i=0;switch(l){case"top":a=n.top+c-s.height-8,i=n.left+r+(n.width-s.width)/2;break;case"bottom":a=n.bottom+c+8,i=n.left+r+(n.width-s.width)/2;break;case"left":a=n.top+c+(n.height-s.height)/2,i=n.left+r-s.width-8;break;case"right":a=n.top+c+(n.height-s.height)/2,i=n.right+r+8;break}const u=window.innerWidth,d=window.innerHeight;i<8?i=8:i+s.width>u-8&&(i=u-s.width-8),a<c+8?l==="top"?a=n.bottom+c+8:a=c+8:a+s.height>c+d-8&&(l==="bottom"?a=n.top+c-s.height-8:a=c+d-s.height-8),o.style.top=`${a}px`,o.style.left=`${i}px`},he=(o,t,l)=>{o.parentElement||document.body.appendChild(o),o.style.visibility="visible",le(o,t,l),requestAnimationFrame(()=>{o.style.opacity="1"})},fe=o=>{o.style.opacity="0",o.style.visibility="hidden"},ve=o=>o.scrollWidth>o.clientWidth||o.scrollHeight>o.clientHeight,_e=o=>!!o.closest(".vt-table, table"),be={mounted(o,t){var i;const l=(i=t.value)==null?void 0:i.trim();if(!l)return;const n=o.dataset.placement||"top",s=pe(l,n);o.__tooltipEl=s;const r=()=>{(_e(o)?ve(o):!0)&&he(s,o,n)},c=()=>{fe(s)},a=()=>{s.style.opacity==="1"&&le(s,o,n)};o.__mouseenterHandler=r,o.__mouseleaveHandler=c,o.__scrollHandler=a,o.addEventListener("mouseenter",r),o.addEventListener("mouseleave",c),window.addEventListener("scroll",a,!0),window.addEventListener("resize",a)},updated(o,t){var n;const l=(n=t.value)==null?void 0:n.trim();if(o.__tooltipEl)l?o.__tooltipEl.firstChild.textContent=l:(o.__tooltipEl.parentElement&&o.__tooltipEl.parentElement.removeChild(o.__tooltipEl),delete o.__tooltipEl);else if(l){const s=o.dataset.placement||"top",r=pe(l,s);o.__tooltipEl=r;const c=()=>{(_e(o)?ve(o):!0)&&he(r,o,s)},a=()=>{fe(r)},i=()=>{r.style.opacity==="1"&&le(r,o,s)};o.__mouseenterHandler=c,o.__mouseleaveHandler=a,o.__scrollHandler=i,o.addEventListener("mouseenter",c),o.addEventListener("mouseleave",a),window.addEventListener("scroll",i,!0),window.addEventListener("resize",i)}},beforeUnmount(o){o.__tooltipEl&&o.__tooltipEl.parentElement&&(o.__tooltipEl.parentElement.removeChild(o.__tooltipEl),delete o.__tooltipEl),o.__mouseenterHandler&&(o.removeEventListener("mouseenter",o.__mouseenterHandler),delete o.__mouseenterHandler),o.__mouseleaveHandler&&(o.removeEventListener("mouseleave",o.__mouseleaveHandler),delete o.__mouseleaveHandler),o.__scrollHandler&&(window.removeEventListener("scroll",o.__scrollHandler,!0),window.removeEventListener("resize",o.__scrollHandler),delete o.__scrollHandler)}},ye={install(o,t={}){const{prefix:l="V",modal:n=!0}=t;o.component(`${l}Button`,J),o.component(`${l}Icon`,j),o.component(`${l}Loader`,re),o.component(`${l}Modal`,se),o.component(`${l}Pagination`,ke),o.component(`${l}Checkbox`,K),o.component(`${l}Table`,Ce),o.component(`${l}TableColumn`,we),o.directive("tooltip",be),n&&o.use(ge)}},wn=ye.install;exports.VButton=J;exports.VCheckbox=K;exports.VIcon=j;exports.VLoader=re;exports.VModal=se;exports.VModalPlugin=ge;exports.VPagination=ke;exports.VTable=Ce;exports.VTableColumn=we;exports.default=ye;exports.install=wn;exports.modalManager=q;exports.tooltipDirective=be;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),N=(o,t)=>{const l=o.__vccOpts||o;for(const[n,s]of t)l[n]=s;return l},De={},He={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function We(o,t){return e.openBlock(),e.createElementBlock("svg",He,t[0]||(t[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=N(De,[["render",We]]),Ae={},Oe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function je(o,t){return e.openBlock(),e.createElementBlock("svg",Oe,t[0]||(t[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=N(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(o,t){return e.openBlock(),e.createElementBlock("svg",Ue,t[0]||(t[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 Ge=N(Ze,[["render",qe]]),Xe={},Ke={width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ye(o,t){return e.openBlock(),e.createElementBlock("svg",Ke,t[0]||(t[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=N(Xe,[["render",Ye]]),Qe={},et={width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tt(o,t){return e.openBlock(),e.createElementBlock("svg",et,t[0]||(t[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=N(Qe,[["render",tt]]),nt={},lt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rt(o,t){return e.openBlock(),e.createElementBlock("svg",lt,t[0]||(t[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 st=N(nt,[["render",rt]]),at={},it={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ct(o,t){return e.openBlock(),e.createElementBlock("svg",it,t[0]||(t[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=N(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(o,t){return e.openBlock(),e.createElementBlock("svg",mt,t[0]||(t[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=N(ut,[["render",pt]]),ft={},vt={xmlns:"http://www.w3.org/2000/svg",width:"60",height:"60",viewBox:"0 0 60 60",fill:"none"};function _t(o,t){return e.openBlock(),e.createElementBlock("svg",vt,t[0]||(t[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 kt=N(ft,[["render",_t]]),gt={},Ct={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function wt(o,t){return e.openBlock(),e.createElementBlock("svg",Ct,t[0]||(t[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 bt=N(gt,[["render",wt]]),yt={},Bt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xt(o,t){return e.openBlock(),e.createElementBlock("svg",Bt,t[0]||(t[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=N(yt,[["render",xt]]),Vt={},Mt={width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Lt(o,t){return e.openBlock(),e.createElementBlock("svg",Mt,t[0]||(t[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 St=N(Vt,[["render",Lt]]),$t={},Nt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function zt(o,t){return e.openBlock(),e.createElementBlock("svg",Nt,t[0]||(t[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=N($t,[["render",zt]]),Tt={},Rt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Dt(o,t){return e.openBlock(),e.createElementBlock("svg",Rt,t[0]||(t[0]=[e.createElementVNode("path",{d:"M9.31732 16.8976L7.50065 17.5026V10.4193L3.76732 6.3126C3.48852 6.00588 3.33403 5.60627 3.33398 5.19177V3.33594H16.6673V5.14594C16.6672 5.58793 16.4916 6.01178 16.179 6.32427L12.5007 10.0026V12.5026M12.5007 15.8359L14.1673 17.5026L17.5007 14.1693",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Ht=N(Tt,[["render",Dt]]),Wt={},Pt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function At(o,t){return e.openBlock(),e.createElementBlock("svg",Pt,t[0]||(t[0]=[e.createElementVNode("path",{d:"M11.4657 16.1809L7.50065 17.5026V10.4193L3.76732 6.3126C3.48852 6.00588 3.33403 5.60627 3.33398 5.19177V3.33594H16.6673V5.14594C16.6672 5.58793 16.4916 6.01178 16.179 6.32427L12.5007 10.0026V11.2526M18.334 18.3359L14.1673 14.1693M14.1673 18.3359L18.334 14.1693",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Ot=N(Wt,[["render",At]]),jt={},Ft={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Zt(o,t){return e.openBlock(),e.createElementBlock("svg",Ft,t[0]||(t[0]=[e.createElementVNode("path",{d:"M9.4676 15.1809L5.5026 16.5026V9.41927L1.76927 5.3126C1.49048 5.00588 1.33598 4.60627 1.33594 4.19177V2.33594H14.6693V4.14594C14.6692 4.58793 14.4935 5.01178 14.1809 5.32427L10.5026 9.0026V10.2526",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M15.5 16.6591L13.857 17.9057C13.7756 17.9719 13.6868 18.0032 13.5906 17.9997C13.4944 17.9962 13.4093 17.9685 13.3353 17.9167C13.2613 17.865 13.204 17.7951 13.1635 17.7071C13.1229 17.6192 13.121 17.5236 13.1577 17.4203L13.7904 15.3795L12.1808 14.2433C12.092 14.1844 12.0365 14.1072 12.0143 14.0116C11.9921 13.916 11.9958 13.8277 12.0254 13.7468C12.055 13.6659 12.1068 13.5942 12.1808 13.5315C12.2548 13.4688 12.3436 13.4377 12.4472 13.438H14.4343L15.0782 11.3199C15.1152 11.217 15.1726 11.1378 15.2504 11.0825C15.3283 11.0272 15.4115 10.9997 15.5 11C15.5885 11.0003 15.6718 11.0279 15.75 11.083C15.8281 11.138 15.8854 11.217 15.9218 11.3199L16.5657 13.438H18.5528C18.6564 13.438 18.7452 13.4693 18.8192 13.5319C18.8932 13.5946 18.945 13.6662 18.9746 13.7468C19.0042 13.8274 19.0079 13.9157 18.9857 14.0116C18.9635 14.1075 18.908 14.1847 18.8192 14.2433L17.2096 15.3795L17.8423 17.4203C17.8793 17.5233 17.8775 17.6189 17.837 17.7071C17.7964 17.7954 17.739 17.8653 17.6647 17.9167C17.5904 17.9682 17.5053 17.9959 17.4094 17.9997C17.3135 18.0035 17.2247 17.9722 17.143 17.9057L15.5 16.6591Z",stroke:"currentColor","stroke-width":"1.5"},null,-1)]))}const Ut=N(jt,[["render",Zt]]),qt={},Gt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Xt(o,t){return e.openBlock(),e.createElementBlock("svg",Gt,t[0]||(t[0]=[e.createStaticVNode('<path d="M10.5 5.5H17.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><path d="M10.5 10H17.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><path d="M10.5 15H17.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><path d="M3 15.083L4.042 16.125L7.167 13" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3 6.083L4.042 7.125L7.167 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>',5)]))}const Kt=N(qt,[["render",Xt]]),Yt={},Jt={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Qt(o,t){return e.openBlock(),e.createElementBlock("svg",Jt,t[0]||(t[0]=[e.createElementVNode("path",{d:"M16.6673 5.83594L6.66732 5.83594M16.6673 5.83594L13.7507 8.7526M16.6673 5.83594L13.7507 2.91927M14.1673 14.1693L3.33398 14.1693M3.33398 14.1693L6.25065 17.0859M3.33398 14.1693L6.25065 11.2526",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const eo=N(Yt,[["render",Qt]]),to={},oo={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function no(o,t){return e.openBlock(),e.createElementBlock("svg",oo,t[0]||(t[0]=[e.createElementVNode("path",{d:"M11.1667 10.9167V9.66667L14.845 5.98833C15.1576 5.67585 15.3332 5.25199 15.3333 4.81V3H2V4.85583C2.00004 5.27033 2.15454 5.66994 2.43333 5.97667L6.16667 10.0833V17.1667C6.16667 17.1667 7.37495 16.7639 8.14917 16.5058",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M15.4116 11.3639L11.4924 15.283C11.4138 15.3616 11.3636 15.4642 11.3498 15.5746L11.0994 17.5789C11.059 17.9025 11.3341 18.1776 11.6577 18.1371L13.6622 17.8861C13.7725 17.8722 13.8751 17.8221 13.9537 17.7435L17.8724 13.8248C18.0676 13.6296 18.0676 13.313 17.8724 13.1177L16.1187 11.364C15.9234 11.1687 15.6068 11.1687 15.4116 11.3639Z",stroke:"currentColor","stroke-width":"1.5"},null,-1),e.createElementVNode("path",{d:"M14 12L16.4608 14.4608",stroke:"currentColor","stroke-width":"1.5"},null,-1)]))}const lo=N(to,[["render",no]]),ro={},so={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ao(o,t){return e.openBlock(),e.createElementBlock("svg",so,t[0]||(t[0]=[e.createElementVNode("path",{d:"M6.2832 15.8359H3.3332C3.11222 15.8359 2.90029 15.7482 2.74404 15.5919C2.58778 15.4356 2.5 15.2237 2.5 15.0027V4.16954C2.49995 4.06009 2.52146 3.9517 2.56331 3.85056C2.60516 3.74943 2.66652 3.65753 2.7439 3.58012C2.82127 3.50271 2.91314 3.4413 3.01426 3.3994C3.11537 3.3575 3.22375 3.33594 3.3332 3.33594H16.6668C16.7763 3.33594 16.8846 3.3575 16.9857 3.3994C17.0869 3.4413 17.1787 3.50271 17.2561 3.58012C17.3335 3.65753 17.3948 3.74943 17.4367 3.85056C17.4785 3.9517 17.5001 4.06009 17.5 4.16954V15.0027C17.5 15.2237 17.4122 15.4356 17.256 15.5919C17.0997 15.7482 16.8878 15.8359 16.6668 15.8359H5.38347",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M6.66406 2.5V5M13.3305 2.5V5M8.33046 10.8332L9.16406 11.6668L11.6641 9.1668",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const io=N(ro,[["render",ao]]),co={},uo={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function mo(o,t){return e.openBlock(),e.createElementBlock("svg",uo,t[0]||(t[0]=[e.createStaticVNode('<circle cx="4.5" cy="12.5" r="1.5" stroke="currentColor" stroke-width="1.5"></circle><circle cx="9.5" cy="8.5" r="1.5" transform="rotate(-180 9.5 8.5)" stroke="currentColor" stroke-width="1.5"></circle><circle cx="14.5" cy="12.5" r="1.5" stroke="currentColor" stroke-width="1.5"></circle><path d="M4.55469 10.5V2" stroke="currentColor" stroke-width="1.5"></path><path d="M9.44531 9.5L9.44531 18" stroke="currentColor" stroke-width="1.5"></path><path d="M14.5547 10.5V2" stroke="currentColor" stroke-width="1.5"></path><path d="M4.55469 18V15.5" stroke="currentColor" stroke-width="1.5"></path><path d="M9.44531 2L9.44531 5.5" stroke="currentColor" stroke-width="1.5"></path><path d="M14.5547 18V15.5" stroke="currentColor" stroke-width="1.5"></path>',9)]))}const po=N(co,[["render",mo]]),ho={},fo={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function vo(o,t){return e.openBlock(),e.createElementBlock("svg",fo,t[0]||(t[0]=[e.createElementVNode("path",{d:"M9.4676 15.1809L5.5026 16.5026V9.41927L1.76927 5.3126C1.49048 5.00588 1.33598 4.60627 1.33594 4.19177V2.33594H14.6693V4.14594C14.6692 4.58793 14.4935 5.01178 14.1809 5.32427L10.5026 9.0026V10.2526",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M16 16.8926V11M13.0537 13.9463H18.9463",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const _o=N(ho,[["render",vo]]),ko={arrowDown:Pe,arrowTop:Fe,arrowRight:Je,arrowLeft:ot,arrowReload:Ge,columnInsert:st,freeze:dt,unfreeze:ht,columnsMove:bt,empty:kt,listBullet:Et,listBulletHorizontal:St,close:It,filterSave:Ht,filterReset:Ot,filterNew:Ut,filterMultiselect:Kt,filterExchange:eo,filterEdit:lo,filterDateCheck:io,filterAdvanced:po,filterAdd:_o},j=e.defineComponent({__name:"VIcon",props:{name:{}},setup(o){const t=o,l=e.computed(()=>ko[t.name]);return(n,s)=>l.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value),{key:0})):e.createCommentVNode("",!0)}}),go={},Co={class:"vt-loader"};function wo(o,t){return e.openBlock(),e.createElementBlock("span",Co)}const re=N(go,[["render",wo]]),bo=["disabled","type","data-placement"],yo={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(o,{emit:t}){const l=o,n=t,s=e.useSlots(),r=e.computed(()=>!!(l.icon&&l.shape)),c=e.computed(()=>{var C,b;const d=s.default?s.default({}):null;return((b=(C=d==null?void 0:d[0])==null?void 0:C.children)==null?void 0:b.toString())??""}),a=e.computed(()=>["vt-button",`vt-button--${l.type}`,{[`vt-button--${l.shape}`]:l.shape,"vt-button--icon-only":r.value,"vt-button--disabled":l.disabled||l.loading,"vt-button--loading":l.loading}]),i=e.computed(()=>r.value&&l.tooltip?c.value:null),u=d=>{!l.disabled&&!l.loading&&n("click",d)};return(d,C)=>{const b=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(re,{key:0,class:"vt-button__icon"})):l.icon?(e.openBlock(),e.createBlock(j,{key:1,name:l.icon,class:"vt-button__icon"},null,8,["name"])):e.createCommentVNode("",!0),r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",yo,[e.renderSlot(d.$slots,"default")]))],10,bo)),[[b,i.value]])}}}),Bo={key:0,class:"vt-modal__header"},xo={key:0,class:"vt-modal__title"},Eo={class:"vt-modal__content"},se=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(o,{emit:t}){const l=o,n=t,s=e.computed(()=>["vt-modal__container",`vt-modal__container--${l.size}`]),r=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(r.value),onClick:a},[e.createElementVNode("div",{class:e.normalizeClass(s.value),onClick:u[0]||(u[0]=e.withModifiers(()=>{},["stop"]))},[i.title||i.showCloseButton?(e.openBlock(),e.createElementBlock("div",Bo,[i.title?(e.openBlock(),e.createElementBlock("h2",xo,e.toDisplayString(i.title),1)):e.createCommentVNode("",!0),i.showCloseButton?(e.openBlock(),e.createBlock(j,{key:1,name:"close",class:"vt-modal__close",onClick:c})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Eo,[e.renderSlot(i.$slots,"default")])],2)],4)):e.createCommentVNode("",!0)]))}}),Vo={class:"vt-pagination"},Mo={class:"vt-pagination__info"},Lo={class:"vt-pagination__rows-per-page"},So=["value"],$o={class:"vt-pagination__navigation"},No=["disabled"],zo=["onClick"],Io=["disabled"],ke=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(o,{emit:t}){const l=o,n=t,s=e.computed({get:()=>l.currentPage,set:y=>n("update:currentPage",y)}),r=e.computed({get:()=>l.pageSize,set:y=>n("update:pageSize",y)}),c=e.computed(()=>Math.ceil(l.totalItems/r.value)),a=e.computed(()=>l.totalItems===0?0:(s.value-1)*r.value+1),i=e.computed(()=>Math.min(s.value*r.value,l.totalItems)),u=e.computed(()=>s.value<=1),d=e.computed(()=>s.value>=c.value),C=e.computed(()=>{const y=[],z=c.value,M=s.value,A=l.maxVisiblePages;if(z<=A)for(let w=1;w<=z;w++)y.push(w);else{y.push(1);const w=Math.max(2,M-Math.floor(A/2)),$=Math.min(z-1,M+Math.floor(A/2));w>2&&y.push("...");for(let B=w;B<=$;B++)y.push(B);$<z-1&&y.push("..."),z>1&&y.push(z)}return y}),b=()=>{n("pageChange",{page:s.value,pageSize:r.value})},P=y=>{typeof y=="number"&&y!==s.value&&(s.value=y,b())},D=()=>{u.value||(s.value--,b())},Z=()=>{d.value||(s.value++,b())},W=()=>{s.value=1,b()},H=()=>{n("reloadData",s.value)};return e.watch(()=>l.totalItems,()=>{s.value>c.value&&c.value>0&&(s.value=c.value,b())}),(y,z)=>(e.openBlock(),e.createElementBlock("div",Vo,[e.createElementVNode("div",Mo,[e.createElementVNode("div",Lo,[z[1]||(z[1]=e.createElementVNode("label",{for:"rowsSelect",class:"vt-pagination__label"},"Рядків на сторінку:",-1)),e.withDirectives(e.createElementVNode("select",{id:"rowsSelect","onUpdate:modelValue":z[0]||(z[0]=M=>r.value=M),onChange:W,class:"vt-pagination__select"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.pageSizeOptions,M=>(e.openBlock(),e.createElementBlock("option",{key:M,value:M},e.toDisplayString(M),9,So))),128))],544),[[e.vModelSelect,r.value]])]),e.createElementVNode("span",null,e.toDisplayString(a.value)+" - "+e.toDisplayString(i.value)+" з "+e.toDisplayString(y.totalItems),1)]),e.createElementVNode("div",$o,[e.createElementVNode("button",{onClick:D,disabled:u.value,class:e.normalizeClass({"vt-pagination__nav-button":!0,"has-items":!u.value})},[e.createVNode(j,{name:"arrowLeft"})],10,No),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,M=>(e.openBlock(),e.createElementBlock("button",{key:M,onClick:A=>P(M),class:e.normalizeClass(["vt-pagination__nav-button",{"vt-pagination__nav-button--active":M===s.value}])},e.toDisplayString(M),11,zo))),128)),e.createElementVNode("button",{onClick:Z,disabled:d.value,class:e.normalizeClass({"vt-pagination__nav-button":!0,"has-items":!d.value})},[e.createVNode(j,{name:"arrowRight"})],10,Io)]),e.createElementVNode("div",null,[e.createVNode(J,{icon:"arrowReload",shape:"circle",tooltip:"",tooltipPlacement:"left",onClick:H},{default:e.withCtx(()=>z[2]||(z[2]=[e.createTextVNode("Оновити дані ",-1)])),_:1,__:[2]})])]))}}),To=["for"],Ro=["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(o,{emit:t}){const l=o,n=t,s=()=>`vt-checkbox-${Math.random().toString(36).substr(2,9)}`,r=e.computed(()=>l.id||s()),c=e.computed(()=>l.modelValue??l.checked),a=d=>{if(l.disabled)return;const b=d.target.checked;n("update:modelValue",b),n("change",b,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:r.value},[e.createElementVNode("input",{id:r.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,Ro),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,To))}});function Do(o){const t=e.computed(()=>[...o].sort((s,r)=>s.pinnedLeft&&!r.pinnedLeft?-1:!s.pinnedLeft&&r.pinnedLeft||s.pinnedRight&&!r.pinnedRight?1:!s.pinnedRight&&r.pinnedRight?-1:0)),l=()=>{const s=t.value.length,r=t.value.filter(d=>d.width||d.minWidth),c=r.reduce((d,C)=>d+(C.width||C.minWidth||0),0),a=s-r.length;if(a===0)return 150;const u=Math.max(800-c,a*80);return Math.max(Math.floor(u/a),120)};return{sortedColumns:t,getDefaultColumnWidth:l,getStickyOffset:(s,r,c=!1)=>{const a=t.value;let i=0;if(s==="left"){c&&(i+=50);for(let u=0;u<r;u++){const d=a[u];d.pinnedLeft&&(i+=d.width||d.minWidth||l())}}else for(let u=a.length-1;u>r;u--){const d=a[u];d.pinnedRight&&(i+=d.width||d.minWidth||l())}return i}}}function Ho(o){const t=()=>{const r={};return o.maxHeight&&(r.maxHeight=`${o.maxHeight}px`),r},l=(r,c,a,i)=>{const u={};if(r.width)u.width=`${r.width}px`,u.minWidth=`${r.width}px`,u.maxWidth=`${r.width}px`;else if(r.minWidth)u.minWidth=`${r.minWidth}px`,u.width=`${r.minWidth}px`,u.maxWidth="none";else{const d=i();u.width=`${d}px`,u.minWidth="80px",u.maxWidth="none"}return r.pinnedLeft?(u.position="sticky",u.left=`${a("left",c,o.selectable)}px`,u.zIndex="10"):r.pinnedRight&&(u.position="sticky",u.right=`${a("right",c,!1)}px`,u.zIndex="10"),u};return{getTableWrapperStyle:t,getColumnStyle:l,getHeaderStyle:(r,c,a,i)=>{const u=l(r,c,a,i);return o.maxHeight&&(u.position="sticky",u.top="0",r.pinnedLeft||r.pinnedRight?u.zIndex="12":u.zIndex="11"),u},getFooterStyle:(r,c,a,i)=>{const u=l(r,c,a,i);return o.maxHeight&&(u.position="sticky",u.bottom="0",r.pinnedLeft||r.pinnedRight?u.zIndex="12":u.zIndex="11"),u}}}function Wo(){const o=e.ref({resizingCol:null,startX:0,startWidth:0}),t=`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,s,r,c)=>{n.preventDefault(),n.stopPropagation(),o.value.resizingCol=s,o.value.startX=n.clientX,o.value.startWidth=s.width||s.minWidth||r(s.prop);const a=u=>{const{resizingCol:d,startX:C,startWidth:b}=o.value;if(!d)return;document.querySelectorAll(`[data-resizer="${d.prop}"]`).forEach(H=>{H.classList.add("vt-table__resizer--active")});const P=u.clientX-C,D=d.minWidth||50,Z=d.maxWidth||1e3,W=Math.max(Math.min(b+P,Z),D);d.width=W},i=()=>{const{resizingCol:u}=o.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)),o.value.resizingCol=null};document.addEventListener("mousemove",a),document.addEventListener("mouseup",i),document.body.style.cursor=t,document.body.style.userSelect="none",document.body.classList.add("vt-table-resizing")},resizeState:o}}function Po(o,t,l,n){var F;const s=o.selectionKey||"id",r=e.ref([]),c=e.ref(null),a=e.ref(!1);(F=o.defaultSelection)!=null&&F.length&&(r.value=[...o.defaultSelection]);const i=p=>p[s],u=p=>a.value?!0:r.value.some(T=>i(T)===i(p)),d=e.computed(()=>t.value.filter(p=>u(p)).length),C=e.computed(()=>t.value.length>0&&d.value===t.value.length),b=e.computed(()=>{if(a.value)return!1;const p=d.value;return p>0&&p<t.value.length}),P=e.computed(()=>a.value?!0:C.value&&!b.value),D=e.computed(()=>a.value),Z=(p,T)=>{const L=i(p),O=r.value.some(f=>i(f)===i(p)),m=T!==void 0?T:!O;if(a.value&&!m){a.value=!1,n!=null&&n.value&&(r.value=n.value.filter(f=>i(f)!==L)),B(p,!1);return}a.value&&m||(m&&!O?r.value.push(p):!m&&O&&(r.value=r.value.filter(f=>i(f)!==L)),o.selectOnClickRow&&T===void 0&&A(m?p:null),B(p,m))},W=()=>{switch(H()){case"none":case"partial":y();break;case"allVisible":z();break;case"absoluteAll":M();break}},H=()=>a.value?"absoluteAll":C.value?"allVisible":d.value>0?"partial":"none",y=()=>{const p=[],T=new Set(r.value.map(L=>i(L)));r.value.forEach(L=>{p.push(L)}),t.value.forEach(L=>{T.has(i(L))||p.push(L)}),r.value=p,a.value=!1,B()},z=()=>{a.value=!0,n!=null&&n.value?r.value=[...n.value]:r.value=[...t.value],B(void 0,void 0,!0)},M=()=>{r.value=[],a.value=!1,c.value=null,B()},A=p=>{const T=c.value;c.value=p,l("current-change",{currentRow:c.value,oldCurrentRow:T})},w=()=>[...r.value],$=p=>{r.value=[...p],a.value=!1,B()},B=(p,T,L=!1)=>{const O={selection:[...r.value],row:p,selected:T,isAllSelected:L||a.value};l("selection-change",O)};return e.watch(()=>o.defaultSelection,p=>{p!=null&&p.length&&(r.value=[...p])}),{selectedRows:r,currentRow:c,isRowSelected:u,isAllSelected:P,isIndeterminate:b,isDoubleCheck:D,isFullSelection:a,toggleRowSelection:Z,toggleAllSelection:W,clearSelection:M,setCurrentRow:A,getSelectionRows:w,setSelectionRows:$,selectAbsolutelyAll:z}}function Ao(o,t){if(!o)return String(t.value??"");try{const l=o(t);return l}catch(l){return console.error("Error rendering table slot:",l),String(t.value??"")}}const Oo=(o,t,l="asc")=>{if(o==null&&t==null)return 0;if(o==null)return l==="asc"?1:-1;if(t==null)return l==="asc"?-1:1;if(o===t)return 0;let n=0;const s=Number(o),r=Number(t);return!isNaN(s)&&!isNaN(r)?n=s-r:ue(o)&&ue(t)?n=new Date(o).getTime()-new Date(t).getTime():typeof o=="boolean"&&typeof t=="boolean"?n=o===t?0:o?-1:1:n=String(o).localeCompare(String(t),void 0,{numeric:!0,sensitivity:"base"}),l==="desc"?-n:n},ue=o=>o instanceof Date?!isNaN(o.getTime()):typeof o=="string"&&/\d{4}-\d{2}-\d{2}|\//.test(o)?!isNaN(new Date(o).getTime()):!1,jo=(o,t,l)=>{o.sortable&&l({prop:o.prop,direction:t})},me=(o,t)=>{const l=(t==null?void 0:t.prop)===o.prop,n=t==null?void 0:t.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(" ")}},Fo=(o,t,l)=>{if(!t)return[...o];const n=l.find(r=>r.prop===t.prop);if(!(n!=null&&n.sortable))return[...o];const s=n.sortMethod||Oo;return[...o].sort((r,c)=>{const a=r[n.prop],i=c[n.prop];return s(a,i,t.direction)})};class Zo{constructor(){this.modalStack=[],this.baseZIndex=1e3}open(t={}){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 s=e.ref(!0),r=this.baseZIndex+this.modalStack.length*10,c=e.createApp({setup(){const i=()=>{s.value=!1,setTimeout(()=>{q.closeById(l)},100)};return()=>e.h(se,{modelValue:s.value,"onUpdate:modelValue":i,title:t.title,size:t.size||"medium",showCloseButton:t.showCloseButton!==!1,closeOnBackdropClick:t.closeOnBackdropClick!==!1,onClose:i,zIndex:r},{default:()=>t.component?e.h(t.component,t.props||{}):t.content?e.h("div",{innerHTML:t.content}):null})}});c.mount(n);const a={id:l,app:c,container:n,isOpen:s};return this.modalStack.push(a),l}close(){if(this.modalStack.length>0){const t=this.modalStack[this.modalStack.length-1];this.closeById(t.id)}}closeById(t){const l=this.modalStack.findIndex(n=>n.id===t);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 t=this.modalStack.pop();t&&this.cleanupModal(t)}}getOpenModalsCount(){return this.modalStack.length}cleanupModal(t){t.app&&t.app.unmount(),t.container&&t.container.parentNode&&document.body.removeChild(t.container)}recalculateZIndices(){}}const q=new Zo,ge={install(o){o.config.globalProperties.$modal=q,o.config.globalProperties.$modalStack={closeAll:()=>q.closeAll(),getCount:()=>q.getOpenModalsCount(),closeById:t=>q.closeById(t)}}},Uo={class:"vt-columns-selector-body"},qo={class:"vt-columns-selector"},Go={class:"vt-columns-selector__panel"},Xo=["draggable","onDragstart","onDragover","onDrop"],Ko={key:0,class:"vt-columns-selector__panel-item-pinned"},Yo={class:"vt-columns-selector__available"},Jo=["onClick"],Qo={key:0,class:"vt-columns-selector__group-columns"},en={key:0,class:"vt-columns-selector__pinned-note"},tn={class:"vt-modal__content-button"},on=e.defineComponent({__name:"VTableColumnSelector",props:{columns:{},columnsSelector:{default:()=>[]}},emits:["update-columns"],setup(o,{emit:t}){const l=o,n=t,s=e.ref([]),r=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(f=>{if(f.name==="removed")return;const v=f.columns.map(V=>V.prop),g=s.value.filter(V=>v.includes(V.prop));g.length===0?m[f.name]={checked:!1,indeterminate:!1}:g.length===f.columns.length?m[f.name]={checked:!0,indeterminate:!1}:m[f.name]={checked:!1,indeterminate:!0}}),m}),d=e.computed(()=>l.columnsSelector.filter(m=>m.name!=="removed")),C=m=>m.pinnedLeft||m.pinnedRight,b=m=>!C(m),P=()=>{const m=s.value;let f=-1;for(let g=0;g<m.length;g++)m[g].pinnedLeft&&(f=g);let v=m.length;for(let g=0;g<m.length;g++)if(m[g].pinnedRight){v=g;break}return{minIndex:f+1,maxIndex:v-1}},D=m=>{const f=P();return!(m<f.minIndex||m>f.maxIndex+1)},Z=(m,f)=>{const v=s.value[f];if(!b(v)){m.preventDefault();return}c.value=f,m.dataTransfer&&(m.dataTransfer.effectAllowed="move",m.dataTransfer.setData("text/plain",v.prop)),document.body.style.cursor="grabbing"},W=(m,f)=>{if(c.value===-1)return;m.preventDefault();const v=m.currentTarget.getBoundingClientRect(),g=m.clientY,V=v.top+v.height/2;let x=f,U="before";g<V?(x=f,U="before"):(x=f+1,U="after"),c.value<x&&x--,D(x)?(a.value=f,i.value=U,m.dataTransfer.dropEffect="move"):(a.value=-1,m.dataTransfer.dropEffect="none")},H=()=>{setTimeout(()=>{c.value===-1&&(a.value=-1)},50)},y=(m,f)=>{if(m.preventDefault(),c.value===-1||a.value===-1){M();return}const v=m.currentTarget.getBoundingClientRect(),g=m.clientY,V=v.top+v.height/2;let x=f;if(g>=V&&(x=f+1),c.value<x&&x--,!D(x)||x===c.value){M();return}const U=[...s.value],[ee]=U.splice(c.value,1);U.splice(x,0,ee),s.value=U,M()},z=()=>{M()},M=()=>{c.value=-1,a.value=-1,i.value="before",document.body.style.cursor=""},A=m=>{const f=["vt-columns-selector__panel-item"];return c.value===m&&f.push("vt-columns-selector__panel-item--dragging"),a.value===m&&i.value==="before"&&f.push("vt-columns-selector__panel-item--drop-before"),a.value===m&&i.value==="after"&&f.push("vt-columns-selector__panel-item--drop-after"),f},w=()=>{s.value=[...l.columns.map(m=>({...m}))],l.columnsSelector.forEach(m=>{m.name!=="removed"&&r.value.add(m.name)})},$=(m,f)=>{if(f)s.value.some(v=>v.prop===m.prop)||s.value.push({...m});else{if(C(m))return;s.value=s.value.filter(v=>v.prop!==m.prop)}},B=(m,f)=>{if(f)m.columns.forEach(v=>{s.value.some(g=>g.prop===v.prop)||s.value.push({...v})});else{const v=[];m.columns.forEach(g=>{const V=s.value.find(x=>x.prop===g.prop);V&&!C(V)&&v.push(V)}),s.value=s.value.filter(g=>!v.some(V=>V.prop===g.prop))}},F=m=>s.value.some(f=>f.prop===m.prop),p=m=>{const f=s.value.find(v=>v.prop===m.prop);return!f||!C(f)},T=m=>{r.value.has(m)?r.value.delete(m):r.value.add(m)},L=()=>{n("update-columns",[...s.value]),q.close()},O=()=>{q.close()};return e.onMounted(()=>{w()}),(m,f)=>(e.openBlock(),e.createElementBlock("div",Uo,[e.createElementVNode("div",qo,[e.createElementVNode("div",Go,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(v,g)=>(e.openBlock(),e.createElementBlock("div",{key:v.prop,class:e.normalizeClass(A(g)),draggable:b(v),onDragstart:V=>Z(V,g),onDragover:V=>W(V,g),onDragleave:H,onDrop:V=>y(V,g),onDragend:z},[e.createVNode(j,{name:b(v)?"columnsMove":"freeze",class:e.normalizeClass(["vt-columns-selector__panel-item-icon",{"vt-columns-selector__panel-item-icon--draggable":b(v)}])},null,8,["name","class"]),e.createVNode(K,{label:v.label,checked:!0,disabled:C(v),onChange:V=>$(v,V),onClick:f[0]||(f[0]=e.withModifiers(()=>{},["stop"]))},null,8,["label","disabled","onChange"]),C(v)?(e.openBlock(),e.createElementBlock("span",Ko,"pinned")):e.createCommentVNode("",!0)],42,Xo))),128))]),e.createElementVNode("div",Yo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,v=>{var g,V;return e.openBlock(),e.createElementBlock("div",{key:v.name,class:"vt-columns-selector__group"},[e.createElementVNode("div",{class:"vt-columns-selector__group-header",onClick:x=>T(v.name)},[e.createVNode(K,{label:v.label,checked:((g=u.value[v.name])==null?void 0:g.checked)||!1,indeterminate:((V=u.value[v.name])==null?void 0:V.indeterminate)||!1,onChange:x=>B(v,x),onClick:f[1]||(f[1]=e.withModifiers(()=>{},["stop"]))},null,8,["label","checked","indeterminate","onChange"]),v.icon?(e.openBlock(),e.createBlock(j,{key:0,name:v.icon,class:"vt-columns-selector__group-icon"},null,8,["name"])):e.createCommentVNode("",!0)],8,Jo),r.value.has(v.name)?(e.openBlock(),e.createElementBlock("div",Qo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.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=>$(x,U)},null,8,["label","checked","disabled","onChange"]),p(x)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",en," (закріплена) "))]))),128))])):e.createCommentVNode("",!0)])}),128))])]),e.createElementVNode("div",tn,[e.createVNode(J,{onClick:O},{default:e.withCtx(()=>f[2]||(f[2]=[e.createTextVNode("Скасувати",-1)])),_:1,__:[2]}),e.createVNode(J,{type:"primary",onClick:L},{default:e.withCtx(()=>f[3]||(f[3]=[e.createTextVNode("Зберегти",-1)])),_:1,__:[3]})])]))}}),nn=e.defineComponent({__name:"ColumnActions",props:{column:{},allColumns:{},columnsSelector:{}},emits:["pin","update-columns"],setup(o,{emit:t}){const l=o,n=t,s=e.ref(),r=e.ref(),c=e.ref(),a=e.ref(!1),i=e.ref(!1),u=e.ref([]),d=async()=>{if(await e.nextTick(),!s.value||!r.value)return;const w=r.value.getBoundingClientRect(),$=s.value,B=$.offsetWidth,F=w.left+w.width/2;$.style.top=`${w.bottom-20}px`,$.style.left=`${F-B/2}px`;const p=$.getBoundingClientRect();p.right>window.innerWidth&&($.style.left=`${window.innerWidth-B-8}px`),p.left<0&&($.style.left="8px")},C=w=>{w.stopPropagation(),!i.value&&(a.value?P():b())},b=()=>{i.value||(a.value=!0,d(),c.value&&(c.value.style.zIndex="22"))},P=()=>{i.value=!0,a.value=!1,c.value&&c.value.style.removeProperty("z-index"),setTimeout(()=>{i.value=!1},100)},D=w=>{var $,B;!(($=r.value)!=null&&$.contains(w.target))&&!((B=s.value)!=null&&B.contains(w.target))&&P()},Z=()=>{A()?(n("pin",l.column,"none"),console.log(`Колонка "${l.column.label}" відкріплена`)):(n("pin",l.column,"left"),console.log(`Колонка "${l.column.label}" прикріплена зліва`)),P()},W=w=>({name:"removed",label:"Видалені колонки",order:999,columns:w}),H=w=>{var T;const $=new Set(w.map(L=>L.prop)),B=new Set;(T=l.columnsSelector)==null||T.forEach(L=>{L.columns.forEach(O=>B.add(O.prop))}),l.allColumns.forEach(L=>B.add(L.prop));const F=[];B.forEach(L=>{var O;if(!$.has(L)){let m;(O=l.columnsSelector)==null||O.forEach(f=>{const v=f.columns.find(g=>g.prop===L);v&&(m=v)}),m||(m=l.allColumns.find(f=>f.prop===L)),m&&F.push(m)}});const p=[...l.columnsSelector||[]];F.length>0&&p.push(W(F)),u.value=p},y=()=>{H(l.allColumns),q.open({component:on,title:"Управління колонками таблиці",props:{columns:l.allColumns,columnsSelector:u.value,"onUpdate-columns":w=>{console.log("ColumnActions отримав оновлені колонки:",w),n("update-columns",w),H(w)}},size:"large",closeOnBackdropClick:!1}),P()},z=()=>l.column.pinnedLeft,M=()=>l.column.pinnedRight,A=()=>z()||M();return e.onMounted(()=>{document.addEventListener("click",D),r.value&&(c.value=r.value.closest("th")),H(l.allColumns)}),e.onUnmounted(()=>{document.removeEventListener("click",D)}),(w,$)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"triggerRef",ref:r,class:"vt-table-header-actions",onClick:C},[e.createVNode(j,{name:"listBullet"}),a.value?(e.openBlock(),e.createElementBlock("ul",{key:0,ref_key:"menuRef",ref:s,class:e.normalizeClass(["dropdown-menu","vt-table-dropdown",{visible:a.value}])},[e.createElementVNode("li",{onClick:Z},[e.createVNode(j,{name:A()?"unfreeze":"freeze"},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(A()?"Розморозити":"Заморозити"),1)]),e.createElementVNode("li",{onClick:y},[e.createVNode(j,{name:"columnInsert"}),$[0]||($[0]=e.createElementVNode("span",null,"Колонки",-1))])],2)):e.createCommentVNode("",!0)],512))}}),ln={class:"vt-table"},rn={class:"vt-th__content"},sn={class:"vt-th__content"},an={class:"vt-th__label"},cn={key:0,class:"vt-th__sortable"},dn=["data-resizer","onMousedown"],un={key:0,class:"vt-table__empty-row"},mn=["colspan"],pn={class:"vt-table__empty-content"},hn=["onClick"],fn={class:"vt-table__cell-content"},vn={class:"vt-table__cell-content vt-table__cell-content--ellipsis"},_n={key:1},kn=["data-resizer","onMousedown"],gn={key:0,class:"vt-table__summary"},Cn={class:"vt-table__cell-content vt-table__cell-content--summary"},ne=50,Ce=e.defineComponent({__name:"VTable",props:e.mergeModels({data:{},maxHeight:{default:void 0},defaultSort:{},showSummary:{type:Boolean,default:!1},summaryMethod:{},columnsSelector:{default:()=>[]},selectable:{type:Boolean,default:!1},selectionKey:{default:"id"},defaultSelection:{default:()=>[]},selectOnClickRow:{type:Boolean,default:!1},highlightCurrentRow:{type:Boolean,default:!1},allData:{default:void 0},columns:{default:()=>[]}},{columns:{required:!1,default:void 0},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(o,{expose:t,emit:l}){const n=o,s=l,r=e.useModel(o,"columns"),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),b=e.ref(!1),P=e.ref(0);let D=null;const Z=()=>{d.value&&r.value?i.splice(0,i.length,...r.value):n.columns&&n.columns.length>0&&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:H,getStickyOffset:y}=Do(i),{getTableWrapperStyle:z,getColumnStyle:M,getHeaderStyle:A,getFooterStyle:w}=Ho(n),{onMouseDown:$}=Wo(),B=e.computed(()=>Fo(n.data,u.value,i)),F=e.computed(()=>n.allData||n.data),p=n.selectable?Po(n,B,s,F):null,T=()=>({width:`${ne}px`,minWidth:`${ne}px`,maxWidth:`${ne}px`,left:"0px",position:"sticky",zIndex:10}),L=()=>{const h=T();return n.maxHeight?{...h,top:"0px",zIndex:11}:h},O=()=>{const h=T();return n.maxHeight?{...h,bottom:"0px",zIndex:11}:h},m=()=>{if(!a.value||b.value)return;const h=a.value,_=h.scrollTop,E=h.scrollHeight,S=h.clientHeight,I=30;D&&clearTimeout(D),D=setTimeout(()=>{const Q=_-P.value>1,k=E-_-S<=I,X=E-_-S<=5;P.value=_,Q&&(k||X)&&(b.value=!0,s("infinity-scroll"),setTimeout(()=>{b.value=!1},1e3))},50)},f=()=>{b.value=!1};e.onMounted(()=>{a.value&&a.value.addEventListener("scroll",m)}),e.onUnmounted(()=>{D&&clearTimeout(D),a.value&&a.value.removeEventListener("scroll",m)});const v=(h,_)=>{jo(h,_,E=>{var S,I;((S=u.value)==null?void 0:S.prop)===h.prop&&u.value.direction===_?u.value=null:u.value=E,s("sort-change",{column:h,direction:((I=u.value)==null?void 0:I.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(S=>S.prop===h);if(E!==-1){if(Object.assign(i[E],_),d.value&&r.value){const S=r.value.findIndex(I=>I.prop===h);if(S!==-1){const I=[...r.value];I[S]={...I[S],..._},r.value=I}}s("columns-change",[...i])}else console.error("Колонку не знайдено:",h,"Доступні колонки:",i.map(S=>S.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||H();$(h,_,H,S=>{x(_.prop,{width:S}),s("column-resize",{column:{..._,width:S},width:S,oldWidth:E})})},xe=(h,_)=>M(h,_,y,H),Ee=(h,_)=>A(h,_,y,H),Ve=(h,_)=>w(h,_,y,H),Me=(h,_)=>{if(!_||!_.prop)return"";const E=h[_.prop];return E==null?"":String(E)},Le=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,S,I)=>(E[S.prop]=_[I],E),{})}return h.reduce((_,E)=>{const S=B.value.map(I=>I[E.prop]);return _[E.prop]=S.every(I=>typeof I=="number")?S.reduce((I,Y)=>I+Y,0):"",_},{})}),Se=e.computed(()=>n.showSummary&&C.value),$e=(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()}),t({toggleRowSelection:$e,toggleAllSelection:Ne,selectAbsolutelyAll:ze,clearSelection:Ie,getSelectionRows:Te,setSelectionRows:Re,resetInfinityScroll:f}),(h,_)=>{var S,I,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(z)()),onScroll:m},[e.renderSlot(h.$slots,"default"),e.createElementVNode("table",ln,[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(L())},[e.createElementVNode("div",rn,[e.createVNode(K,{checked:(S=e.unref(p))==null?void 0:S.isAllSelected.value,indeterminate:(I=e.unref(p))==null?void 0:I.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,X)=>(e.openBlock(),e.createElementBlock("th",{key:k.prop,ref_for:!0,ref:G=>ae(G,k.prop),style:e.normalizeStyle(Ee(k,X)),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",sn,[e.createElementVNode("div",an,e.toDisplayString(k.label),1),k.sortable?(e.openBlock(),e.createElementBlock("div",cn,[e.createVNode(j,{name:"arrowTop",class:e.normalizeClass(e.unref(me)(k,u.value).asc),onClick:e.withModifiers(G=>v(k,"asc"),["stop"])},null,8,["class","onClick"]),e.createVNode(j,{name:"arrowDown",class:e.normalizeClass(e.unref(me)(k,u.value).desc),onClick:e.withModifiers(G=>v(k,"desc"),["stop"])},null,8,["class","onClick"])])):e.createCommentVNode("",!0),k.actionColumn?(e.openBlock(),e.createBlock(nn,{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:G=>ie(G,k)},null,40,dn)],6))),128))])]),e.createElementVNode("tbody",null,[C.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(B.value,(k,X)=>{var G,ce,de;return e.openBlock(),e.createElementBlock("tr",{key:k.id,class:e.normalizeClass(["vt-table__row",{"vt-table__row--selected":(G=e.unref(p))==null?void 0:G.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:R=>U(k,e.unref(W)[0],R)},[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(T())},[e.createElementVNode("div",fn,[e.createVNode(K,{checked:(de=e.unref(p))==null?void 0:de.isRowSelected(k),onChange:(R,te)=>ee(R,k,te)},null,8,["checked","onChange"])])],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(W),(R,te)=>(e.openBlock(),e.createElementBlock("td",{key:R.prop,ref_for:!0,ref:oe=>ae(oe,R.prop),style:e.normalizeStyle(xe(R,te)),class:e.normalizeClass(["vt-table__td",{"vt-table__td--pinned-left":R.pinnedLeft,"vt-table__td--pinned-right":R.pinnedRight}])},[e.withDirectives((e.openBlock(),e.createElementBlock("div",vn,[R.renderSlot?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(()=>e.unref(Ao)(R.renderSlot,{row:k,column:R,value:k[R.prop],index:X})),{key:0})):(e.openBlock(),e.createElementBlock("span",_n,e.toDisplayString(k[R.prop]),1))])),[[E,R.showOverflowTooltip?Me(k,R):null]]),e.createElementVNode("div",{class:"vt-table__resizer","data-resizer":R.prop,onMousedown:oe=>ie(oe,R)},null,40,kn)],6))),128))],10,hn)}),128)):(e.openBlock(),e.createElementBlock("tr",un,[e.createElementVNode("td",{colspan:e.unref(W).length+(n.selectable?1:0),class:"vt-table__empty-cell"},[e.createElementVNode("div",pn,[e.createVNode(j,{name:"empty",class:"vt-table__empty-icon"}),_[0]||(_[0]=e.createElementVNode("span",{class:"vt-table__empty-text"},"Немає даних!",-1))])],8,mn)]))]),Se.value?(e.openBlock(),e.createElementBlock("tfoot",gn,[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(O())},_[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(W),(k,X)=>(e.openBlock(),e.createElementBlock("td",{key:k.prop,style:e.normalizeStyle(Ve(k,X)),class:e.normalizeClass(["vt-table__td",{"vt-table__td--pinned-left":k.pinnedLeft,"vt-table__td--pinned-right":k.pinnedRight}])},[e.createElementVNode("div",Cn,e.toDisplayString(Le.value[k.prop]),1)],6))),128))])])):e.createCommentVNode("",!0)])],36)}}}),we=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(o){const t=o,l=e.useSlots(),n=e.inject("vt-table-columns");n||console.error("VTableColumn: не знайдено контекст таблиці. Переконайтеся, що компонент використовується всередині VTable.");const s=()=>({prop:t.prop,label:t.label,width:t.width,minWidth:t.minWidth,maxWidth:t.maxWidth,sortable:t.sortable,pinnedLeft:t.pinnedLeft,pinnedRight:t.pinnedRight,actionColumn:t.actionColumn,showOverflowTooltip:t.showOverflowTooltip,selectable:t.selectable,renderSlot:l[t.prop]??l.default??l.slot});let r=-1;return e.onMounted(()=>{if(n){const c=s();n.push(c),r=n.length-1}}),e.watch(()=>[t.width,t.minWidth,t.maxWidth,t.sortable,t.pinnedLeft,t.pinnedRight,t.actionColumn,t.showOverflowTooltip,t.selectable,t.label],()=>{if(n&&r!==-1){const c=n.findIndex(a=>a.prop===t.prop);if(c!==-1){const a=n[c],i={...s(),renderSlot:a.renderSlot};n[c]=i}}},{deep:!0}),e.onUnmounted(()=>{if(n){const c=n.findIndex(a=>a.prop===t.prop);c>-1&&n.splice(c,1)}}),(c,a)=>null}}),pe=(o,t)=>{const l=document.createElement("div");l.className=`vt-tooltip vt-tooltip--${t}`,l.innerText=o,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)"}),o.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"}),t){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=(o,t,l)=>{const n=t.getBoundingClientRect(),s=o.getBoundingClientRect(),r=window.pageXOffset||document.documentElement.scrollLeft,c=window.pageYOffset||document.documentElement.scrollTop;let a=0,i=0;switch(l){case"top":a=n.top+c-s.height-8,i=n.left+r+(n.width-s.width)/2;break;case"bottom":a=n.bottom+c+8,i=n.left+r+(n.width-s.width)/2;break;case"left":a=n.top+c+(n.height-s.height)/2,i=n.left+r-s.width-8;break;case"right":a=n.top+c+(n.height-s.height)/2,i=n.right+r+8;break}const u=window.innerWidth,d=window.innerHeight;i<8?i=8:i+s.width>u-8&&(i=u-s.width-8),a<c+8?l==="top"?a=n.bottom+c+8:a=c+8:a+s.height>c+d-8&&(l==="bottom"?a=n.top+c-s.height-8:a=c+d-s.height-8),o.style.top=`${a}px`,o.style.left=`${i}px`},he=(o,t,l)=>{o.parentElement||document.body.appendChild(o),o.style.visibility="visible",le(o,t,l),requestAnimationFrame(()=>{o.style.opacity="1"})},fe=o=>{o.style.opacity="0",o.style.visibility="hidden"},ve=o=>o.scrollWidth>o.clientWidth||o.scrollHeight>o.clientHeight,_e=o=>!!o.closest(".vt-table, table"),be={mounted(o,t){var i;const l=(i=t.value)==null?void 0:i.trim();if(!l)return;const n=o.dataset.placement||"top",s=pe(l,n);o.__tooltipEl=s;const r=()=>{(_e(o)?ve(o):!0)&&he(s,o,n)},c=()=>{fe(s)},a=()=>{s.style.opacity==="1"&&le(s,o,n)};o.__mouseenterHandler=r,o.__mouseleaveHandler=c,o.__scrollHandler=a,o.addEventListener("mouseenter",r),o.addEventListener("mouseleave",c),window.addEventListener("scroll",a,!0),window.addEventListener("resize",a)},updated(o,t){var n;const l=(n=t.value)==null?void 0:n.trim();if(o.__tooltipEl)l?o.__tooltipEl.firstChild.textContent=l:(o.__tooltipEl.parentElement&&o.__tooltipEl.parentElement.removeChild(o.__tooltipEl),delete o.__tooltipEl);else if(l){const s=o.dataset.placement||"top",r=pe(l,s);o.__tooltipEl=r;const c=()=>{(_e(o)?ve(o):!0)&&he(r,o,s)},a=()=>{fe(r)},i=()=>{r.style.opacity==="1"&&le(r,o,s)};o.__mouseenterHandler=c,o.__mouseleaveHandler=a,o.__scrollHandler=i,o.addEventListener("mouseenter",c),o.addEventListener("mouseleave",a),window.addEventListener("scroll",i,!0),window.addEventListener("resize",i)}},beforeUnmount(o){o.__tooltipEl&&o.__tooltipEl.parentElement&&(o.__tooltipEl.parentElement.removeChild(o.__tooltipEl),delete o.__tooltipEl),o.__mouseenterHandler&&(o.removeEventListener("mouseenter",o.__mouseenterHandler),delete o.__mouseenterHandler),o.__mouseleaveHandler&&(o.removeEventListener("mouseleave",o.__mouseleaveHandler),delete o.__mouseleaveHandler),o.__scrollHandler&&(window.removeEventListener("scroll",o.__scrollHandler,!0),window.removeEventListener("resize",o.__scrollHandler),delete o.__scrollHandler)}},wn={sortable:!0,actionColumn:!1,showOverflowTooltip:!0,visible:!0,pinnedLeft:!1,pinnedRight:!1},ye={install(o,t={}){const{prefix:l="V",modal:n=!0}=t;o.component(`${l}Button`,J),o.component(`${l}Icon`,j),o.component(`${l}Loader`,re),o.component(`${l}Modal`,se),o.component(`${l}Pagination`,ke),o.component(`${l}Checkbox`,K),o.component(`${l}Table`,Ce),o.component(`${l}TableColumn`,we),o.directive("tooltip",be),n&&o.use(ge)}},bn=ye.install;exports.DEFAULT_COLUMN_CONFIG=wn;exports.VButton=J;exports.VCheckbox=K;exports.VIcon=j;exports.VLoader=re;exports.VModal=se;exports.VModalPlugin=ge;exports.VPagination=ke;exports.VTable=Ce;exports.VTableColumn=we;exports.default=ye;exports.install=bn;exports.modalManager=q;exports.tooltipDirective=be;
|
package/dist/index.d.ts
CHANGED
|
@@ -124,7 +124,18 @@ declare const __VLS_component_4: DefineComponent<__VLS_PublicProps, {
|
|
|
124
124
|
}) => any) | undefined;
|
|
125
125
|
"onColumns-change"?: ((columns: VTableColumnProps[]) => any) | undefined;
|
|
126
126
|
"onInfinity-scroll"?: (() => any) | undefined;
|
|
127
|
-
}>, {
|
|
127
|
+
}>, {
|
|
128
|
+
maxHeight: number;
|
|
129
|
+
selectable: boolean;
|
|
130
|
+
columns: VTableColumnProps[];
|
|
131
|
+
columnsSelector: VTableColumnGroup[];
|
|
132
|
+
showSummary: boolean;
|
|
133
|
+
selectionKey: string;
|
|
134
|
+
defaultSelection: any[];
|
|
135
|
+
selectOnClickRow: boolean;
|
|
136
|
+
highlightCurrentRow: boolean;
|
|
137
|
+
allData: Record<string, any>[];
|
|
138
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
128
139
|
tableWrapperRef: HTMLDivElement;
|
|
129
140
|
}, HTMLDivElement>;
|
|
130
141
|
|
|
@@ -135,7 +146,7 @@ declare type __VLS_Props = {
|
|
|
135
146
|
declare type __VLS_Props_2 = VTableProps;
|
|
136
147
|
|
|
137
148
|
declare type __VLS_PublicProps = {
|
|
138
|
-
'columns'?: VTableColumnProps[];
|
|
149
|
+
'columns'?: VTableColumnProps[] | undefined;
|
|
139
150
|
} & __VLS_Props_2;
|
|
140
151
|
|
|
141
152
|
declare function __VLS_template(): {
|
|
@@ -168,7 +179,9 @@ declare function __VLS_template_3(): {
|
|
|
168
179
|
|
|
169
180
|
declare function __VLS_template_4(): {
|
|
170
181
|
attrs: Partial<{}>;
|
|
171
|
-
slots:
|
|
182
|
+
slots: {
|
|
183
|
+
default?(_: {}): any;
|
|
184
|
+
};
|
|
172
185
|
refs: {
|
|
173
186
|
tableWrapperRef: HTMLDivElement;
|
|
174
187
|
};
|
|
@@ -208,12 +221,12 @@ declare type __VLS_WithTemplateSlots_4<T, S> = T & {
|
|
|
208
221
|
};
|
|
209
222
|
|
|
210
223
|
export declare const DEFAULT_COLUMN_CONFIG: {
|
|
211
|
-
sortable:
|
|
212
|
-
actionColumn:
|
|
213
|
-
showOverflowTooltip:
|
|
214
|
-
visible:
|
|
215
|
-
pinnedLeft:
|
|
216
|
-
pinnedRight:
|
|
224
|
+
readonly sortable: true;
|
|
225
|
+
readonly actionColumn: false;
|
|
226
|
+
readonly showOverflowTooltip: true;
|
|
227
|
+
readonly visible: true;
|
|
228
|
+
readonly pinnedLeft: false;
|
|
229
|
+
readonly pinnedRight: false;
|
|
217
230
|
};
|
|
218
231
|
|
|
219
232
|
export declare type IconName = keyof typeof icons;
|
|
@@ -505,10 +518,6 @@ export declare interface VTableColumnProps {
|
|
|
505
518
|
sortMethod?: Function;
|
|
506
519
|
}
|
|
507
520
|
|
|
508
|
-
declare interface VTableColumnSlots {
|
|
509
|
-
default?: () => VNode[];
|
|
510
|
-
}
|
|
511
|
-
|
|
512
521
|
export declare interface VTableEmits {
|
|
513
522
|
'sort-change': [payload: SortChangeEventData];
|
|
514
523
|
'selection-change': [payload: SelectionChangeEventData];
|
|
@@ -545,25 +554,38 @@ export declare interface VTableEmits {
|
|
|
545
554
|
}
|
|
546
555
|
|
|
547
556
|
export declare interface VTableProps {
|
|
557
|
+
/** Масив даних для відображення в таблиці */
|
|
548
558
|
data: Record<string, any>[];
|
|
559
|
+
/** Максимальна висота таблиці (для sticky header) */
|
|
549
560
|
maxHeight?: number;
|
|
561
|
+
/** Початкове сортування */
|
|
550
562
|
defaultSort?: SortState;
|
|
563
|
+
/** Показувати підсумковий рядок */
|
|
551
564
|
showSummary?: boolean;
|
|
565
|
+
/** Метод для обчислення підсумкових значень */
|
|
552
566
|
summaryMethod?: (params: {
|
|
553
567
|
columns: VTableColumnProps[];
|
|
554
568
|
data: Record<string, any>[];
|
|
555
569
|
}) => any[];
|
|
570
|
+
/** Групи колонок для селектора */
|
|
556
571
|
columnsSelector?: VTableColumnGroup[];
|
|
572
|
+
/** Чи включити функціонал виділення рядків */
|
|
557
573
|
selectable?: boolean;
|
|
574
|
+
/** Ключ для ідентифікації рядків (за замовчуванням 'id') */
|
|
558
575
|
selectionKey?: string;
|
|
576
|
+
/** Рядки виділені за замовчуванням */
|
|
559
577
|
defaultSelection?: any[];
|
|
578
|
+
/** Виділяти рядок при кліку на нього */
|
|
560
579
|
selectOnClickRow?: boolean;
|
|
580
|
+
/** Підсвічувати поточний рядок */
|
|
561
581
|
highlightCurrentRow?: boolean;
|
|
582
|
+
/** Всі дані для повного виділення (якщо відрізняються від data) */
|
|
562
583
|
allData?: Record<string, any>[];
|
|
584
|
+
/** Конфігурація колонок */
|
|
563
585
|
columns?: VTableColumnProps[];
|
|
564
586
|
}
|
|
565
587
|
|
|
566
|
-
declare type VTableRenderSlot = (props: {
|
|
588
|
+
export declare type VTableRenderSlot = (props: {
|
|
567
589
|
row: Record<string, any>;
|
|
568
590
|
column: VTableColumnProps;
|
|
569
591
|
value: any;
|
|
@@ -589,7 +611,7 @@ export { }
|
|
|
589
611
|
|
|
590
612
|
declare module '@vue/runtime-core' {
|
|
591
613
|
interface ComponentCustomProperties {
|
|
592
|
-
$modal: VModalInstance;
|
|
614
|
+
$modal: import('./components/modal/types').VModalInstance;
|
|
593
615
|
}
|
|
594
616
|
}
|
|
595
617
|
|
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElementBlock as m, openBlock as p, createElementVNode as h, createStaticVNode as Ae, defineComponent as le, computed as x, createBlock as ae, createCommentVNode as D, resolveDynamicComponent as Oe, useSlots as je, resolveDirective as
|
|
1
|
+
import { createElementBlock as m, openBlock as p, createElementVNode as h, createStaticVNode as Ae, defineComponent as le, computed as x, createBlock as ae, createCommentVNode as D, resolveDynamicComponent as Oe, useSlots as je, resolveDirective as Ne, withDirectives as Le, normalizeClass as z, renderSlot as pe, Teleport as st, normalizeStyle as re, withModifiers as he, toDisplayString as te, watch as me, Fragment as ne, renderList as oe, vModelSelect as rt, createVNode as Z, withCtx as xe, createTextVNode as _e, ref as A, createApp as it, h as be, onMounted as ve, onUnmounted as $e, nextTick as at, mergeModels as Re, useModel as ct, reactive as ut, provide as dt, unref as q, inject as pt } from "vue";
|
|
2
2
|
const H = (t, e) => {
|
|
3
3
|
const o = t.__vccOpts || t;
|
|
4
4
|
for (const [n, s] of e)
|
|
@@ -147,7 +147,7 @@ const At = /* @__PURE__ */ H(Wt, [["render", Pt]]), Ot = {}, jt = {
|
|
|
147
147
|
fill: "none",
|
|
148
148
|
xmlns: "http://www.w3.org/2000/svg"
|
|
149
149
|
};
|
|
150
|
-
function
|
|
150
|
+
function Nt(t, e) {
|
|
151
151
|
return p(), m("svg", jt, e[0] || (e[0] = [
|
|
152
152
|
h("path", {
|
|
153
153
|
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",
|
|
@@ -164,7 +164,7 @@ function Ft(t, e) {
|
|
|
164
164
|
}, null, -1)
|
|
165
165
|
]));
|
|
166
166
|
}
|
|
167
|
-
const
|
|
167
|
+
const Ft = /* @__PURE__ */ H(Ot, [["render", Nt]]), Zt = {}, Ut = {
|
|
168
168
|
xmlns: "http://www.w3.org/2000/svg",
|
|
169
169
|
width: "60",
|
|
170
170
|
height: "60",
|
|
@@ -411,7 +411,7 @@ function jn(t, e) {
|
|
|
411
411
|
Ae('<circle cx="4.5" cy="12.5" r="1.5" stroke="currentColor" stroke-width="1.5"></circle><circle cx="9.5" cy="8.5" r="1.5" transform="rotate(-180 9.5 8.5)" stroke="currentColor" stroke-width="1.5"></circle><circle cx="14.5" cy="12.5" r="1.5" stroke="currentColor" stroke-width="1.5"></circle><path d="M4.55469 10.5V2" stroke="currentColor" stroke-width="1.5"></path><path d="M9.44531 9.5L9.44531 18" stroke="currentColor" stroke-width="1.5"></path><path d="M14.5547 10.5V2" stroke="currentColor" stroke-width="1.5"></path><path d="M4.55469 18V15.5" stroke="currentColor" stroke-width="1.5"></path><path d="M9.44531 2L9.44531 5.5" stroke="currentColor" stroke-width="1.5"></path><path d="M14.5547 18V15.5" stroke="currentColor" stroke-width="1.5"></path>', 9)
|
|
412
412
|
]));
|
|
413
413
|
}
|
|
414
|
-
const
|
|
414
|
+
const Nn = /* @__PURE__ */ H(An, [["render", jn]]), Fn = {}, Zn = {
|
|
415
415
|
width: "20",
|
|
416
416
|
height: "20",
|
|
417
417
|
viewBox: "0 0 20 20",
|
|
@@ -436,7 +436,7 @@ function Un(t, e) {
|
|
|
436
436
|
}, null, -1)
|
|
437
437
|
]));
|
|
438
438
|
}
|
|
439
|
-
const qn = /* @__PURE__ */ H(
|
|
439
|
+
const qn = /* @__PURE__ */ H(Fn, [["render", Un]]), Xn = {
|
|
440
440
|
// arrow icons
|
|
441
441
|
arrowDown: ft,
|
|
442
442
|
arrowTop: wt,
|
|
@@ -446,7 +446,7 @@ const qn = /* @__PURE__ */ H(Nn, [["render", Un]]), Xn = {
|
|
|
446
446
|
// table icons
|
|
447
447
|
columnInsert: Ht,
|
|
448
448
|
freeze: At,
|
|
449
|
-
unfreeze:
|
|
449
|
+
unfreeze: Ft,
|
|
450
450
|
columnsMove: Jt,
|
|
451
451
|
empty: Xt,
|
|
452
452
|
// actions icons
|
|
@@ -461,7 +461,7 @@ const qn = /* @__PURE__ */ H(Nn, [["render", Un]]), Xn = {
|
|
|
461
461
|
filterExchange: Bn,
|
|
462
462
|
filterEdit: zn,
|
|
463
463
|
filterDateCheck: Pn,
|
|
464
|
-
filterAdvanced:
|
|
464
|
+
filterAdvanced: Nn,
|
|
465
465
|
filterAdd: qn
|
|
466
466
|
}, Y = /* @__PURE__ */ le({
|
|
467
467
|
__name: "VIcon",
|
|
@@ -476,7 +476,7 @@ const qn = /* @__PURE__ */ H(Nn, [["render", Un]]), Xn = {
|
|
|
476
476
|
function Yn(t, e) {
|
|
477
477
|
return p(), m("span", Kn);
|
|
478
478
|
}
|
|
479
|
-
const
|
|
479
|
+
const Fe = /* @__PURE__ */ H(Gn, [["render", Yn]]), Jn = ["disabled", "type", "data-placement"], Qn = {
|
|
480
480
|
key: 2,
|
|
481
481
|
class: "vt-button__content"
|
|
482
482
|
}, ge = /* @__PURE__ */ le({
|
|
@@ -510,7 +510,7 @@ const Ne = /* @__PURE__ */ H(Gn, [["render", Yn]]), Jn = ["disabled", "type", "d
|
|
|
510
510
|
!o.disabled && !o.loading && n("click", c);
|
|
511
511
|
};
|
|
512
512
|
return (c, b) => {
|
|
513
|
-
const M =
|
|
513
|
+
const M = Ne("tooltip");
|
|
514
514
|
return Le((p(), m("button", {
|
|
515
515
|
class: z(r.value),
|
|
516
516
|
disabled: o.disabled || o.loading,
|
|
@@ -518,7 +518,7 @@ const Ne = /* @__PURE__ */ H(Gn, [["render", Yn]]), Jn = ["disabled", "type", "d
|
|
|
518
518
|
"data-placement": o.tooltipPlacement,
|
|
519
519
|
onClick: u
|
|
520
520
|
}, [
|
|
521
|
-
o.loading ? (p(), ae(
|
|
521
|
+
o.loading ? (p(), ae(Fe, {
|
|
522
522
|
key: 0,
|
|
523
523
|
class: "vt-button__icon"
|
|
524
524
|
})) : o.icon ? (p(), ae(Y, {
|
|
@@ -625,13 +625,13 @@ const Ne = /* @__PURE__ */ H(Gn, [["render", Yn]]), Jn = ["disabled", "type", "d
|
|
|
625
625
|
});
|
|
626
626
|
}, X = (L) => {
|
|
627
627
|
typeof L == "number" && L !== s.value && (s.value = L, M());
|
|
628
|
-
},
|
|
628
|
+
}, N = () => {
|
|
629
629
|
u.value || (s.value--, M());
|
|
630
630
|
}, Q = () => {
|
|
631
631
|
c.value || (s.value++, M());
|
|
632
632
|
}, U = () => {
|
|
633
633
|
s.value = 1, M();
|
|
634
|
-
},
|
|
634
|
+
}, F = () => {
|
|
635
635
|
n("reloadData", s.value);
|
|
636
636
|
};
|
|
637
637
|
return me(
|
|
@@ -664,7 +664,7 @@ const Ne = /* @__PURE__ */ H(Gn, [["render", Yn]]), Jn = ["disabled", "type", "d
|
|
|
664
664
|
]),
|
|
665
665
|
h("div", io, [
|
|
666
666
|
h("button", {
|
|
667
|
-
onClick:
|
|
667
|
+
onClick: N,
|
|
668
668
|
disabled: u.value,
|
|
669
669
|
class: z({ "vt-pagination__nav-button": !0, "has-items": !u.value })
|
|
670
670
|
}, [
|
|
@@ -691,7 +691,7 @@ const Ne = /* @__PURE__ */ H(Gn, [["render", Yn]]), Jn = ["disabled", "type", "d
|
|
|
691
691
|
shape: "circle",
|
|
692
692
|
tooltip: "",
|
|
693
693
|
tooltipPlacement: "left",
|
|
694
|
-
onClick:
|
|
694
|
+
onClick: F
|
|
695
695
|
}, {
|
|
696
696
|
default: xe(() => W[2] || (W[2] = [
|
|
697
697
|
_e("Оновити дані ", -1)
|
|
@@ -913,10 +913,10 @@ function _o() {
|
|
|
913
913
|
const r = (u) => {
|
|
914
914
|
const { resizingCol: c, startX: b, startWidth: M } = t.value;
|
|
915
915
|
if (!c) return;
|
|
916
|
-
document.querySelectorAll(`[data-resizer="${c.prop}"]`).forEach((
|
|
917
|
-
|
|
916
|
+
document.querySelectorAll(`[data-resizer="${c.prop}"]`).forEach((F) => {
|
|
917
|
+
F.classList.add("vt-table__resizer--active");
|
|
918
918
|
});
|
|
919
|
-
const X = u.clientX - b,
|
|
919
|
+
const X = u.clientX - b, N = c.minWidth || 50, Q = c.maxWidth || 1e3, U = Math.max(Math.min(M + X, Q), N);
|
|
920
920
|
c.width = U;
|
|
921
921
|
}, i = () => {
|
|
922
922
|
const { resizingCol: u } = t.value;
|
|
@@ -937,7 +937,7 @@ function go(t, e, o, n) {
|
|
|
937
937
|
if (r.value) return !1;
|
|
938
938
|
const v = c.value;
|
|
939
939
|
return v > 0 && v < e.value.length;
|
|
940
|
-
}), X = x(() => r.value ? !0 : b.value && !M.value),
|
|
940
|
+
}), X = x(() => r.value ? !0 : b.value && !M.value), N = x(() => r.value), Q = (v, O) => {
|
|
941
941
|
const R = i(v), K = l.value.some((_) => i(_) === i(v)), d = O !== void 0 ? O : !K;
|
|
942
942
|
if (r.value && !d) {
|
|
943
943
|
r.value = !1, n != null && n.value && (l.value = n.value.filter((_) => i(_) !== R)), $(v, !1);
|
|
@@ -945,7 +945,7 @@ function go(t, e, o, n) {
|
|
|
945
945
|
}
|
|
946
946
|
r.value && d || (d && !K ? l.value.push(v) : !d && K && (l.value = l.value.filter((_) => i(_) !== R)), t.selectOnClickRow && O === void 0 && G(d ? v : null), $(v, d));
|
|
947
947
|
}, U = () => {
|
|
948
|
-
switch (
|
|
948
|
+
switch (F()) {
|
|
949
949
|
case "none":
|
|
950
950
|
case "partial":
|
|
951
951
|
L();
|
|
@@ -957,7 +957,7 @@ function go(t, e, o, n) {
|
|
|
957
957
|
B();
|
|
958
958
|
break;
|
|
959
959
|
}
|
|
960
|
-
},
|
|
960
|
+
}, F = () => r.value ? "absoluteAll" : b.value ? "allVisible" : c.value > 0 ? "partial" : "none", L = () => {
|
|
961
961
|
const v = [], O = new Set(l.value.map((R) => i(R)));
|
|
962
962
|
l.value.forEach((R) => {
|
|
963
963
|
v.push(R);
|
|
@@ -996,7 +996,7 @@ function go(t, e, o, n) {
|
|
|
996
996
|
isRowSelected: u,
|
|
997
997
|
isAllSelected: X,
|
|
998
998
|
isIndeterminate: M,
|
|
999
|
-
isDoubleCheck:
|
|
999
|
+
isDoubleCheck: N,
|
|
1000
1000
|
isFullSelection: r,
|
|
1001
1001
|
toggleRowSelection: Q,
|
|
1002
1002
|
toggleAllSelection: U,
|
|
@@ -1166,7 +1166,7 @@ const ie = new yo(), xo = {
|
|
|
1166
1166
|
minIndex: _ + 1,
|
|
1167
1167
|
maxIndex: g - 1
|
|
1168
1168
|
};
|
|
1169
|
-
},
|
|
1169
|
+
}, N = (d) => {
|
|
1170
1170
|
const _ = X();
|
|
1171
1171
|
return !(d < _.minIndex || d > _.maxIndex + 1);
|
|
1172
1172
|
}, Q = (d, _) => {
|
|
@@ -1181,8 +1181,8 @@ const ie = new yo(), xo = {
|
|
|
1181
1181
|
d.preventDefault();
|
|
1182
1182
|
const g = d.currentTarget.getBoundingClientRect(), k = d.clientY, V = g.top + g.height / 2;
|
|
1183
1183
|
let S = _, ee = "before";
|
|
1184
|
-
k < V ? (S = _, ee = "before") : (S = _ + 1, ee = "after"), a.value < S && S--,
|
|
1185
|
-
},
|
|
1184
|
+
k < V ? (S = _, ee = "before") : (S = _ + 1, ee = "after"), a.value < S && S--, N(S) ? (r.value = _, i.value = ee, d.dataTransfer.dropEffect = "move") : (r.value = -1, d.dataTransfer.dropEffect = "none");
|
|
1185
|
+
}, F = () => {
|
|
1186
1186
|
setTimeout(() => {
|
|
1187
1187
|
a.value === -1 && (r.value = -1);
|
|
1188
1188
|
}, 50);
|
|
@@ -1193,7 +1193,7 @@ const ie = new yo(), xo = {
|
|
|
1193
1193
|
}
|
|
1194
1194
|
const g = d.currentTarget.getBoundingClientRect(), k = d.clientY, V = g.top + g.height / 2;
|
|
1195
1195
|
let S = _;
|
|
1196
|
-
if (k >= V && (S = _ + 1), a.value < S && S--, !
|
|
1196
|
+
if (k >= V && (S = _ + 1), a.value < S && S--, !N(S) || S === a.value) {
|
|
1197
1197
|
B();
|
|
1198
1198
|
return;
|
|
1199
1199
|
}
|
|
@@ -1253,7 +1253,7 @@ const ie = new yo(), xo = {
|
|
|
1253
1253
|
draggable: M(g),
|
|
1254
1254
|
onDragstart: (V) => Q(V, k),
|
|
1255
1255
|
onDragover: (V) => U(V, k),
|
|
1256
|
-
onDragleave:
|
|
1256
|
+
onDragleave: F,
|
|
1257
1257
|
onDrop: (V) => L(V, k),
|
|
1258
1258
|
onDragend: W
|
|
1259
1259
|
}, [
|
|
@@ -1359,7 +1359,7 @@ const ie = new yo(), xo = {
|
|
|
1359
1359
|
i.value = !0, r.value = !1, a.value && a.value.style.removeProperty("z-index"), setTimeout(() => {
|
|
1360
1360
|
i.value = !1;
|
|
1361
1361
|
}, 100);
|
|
1362
|
-
},
|
|
1362
|
+
}, N = (y) => {
|
|
1363
1363
|
var E, $;
|
|
1364
1364
|
!((E = l.value) != null && E.contains(y.target)) && !(($ = s.value) != null && $.contains(y.target)) && X();
|
|
1365
1365
|
}, Q = () => {
|
|
@@ -1370,7 +1370,7 @@ const ie = new yo(), xo = {
|
|
|
1370
1370
|
order: 999,
|
|
1371
1371
|
// Найвищий порядок, щоб відображались останніми
|
|
1372
1372
|
columns: y
|
|
1373
|
-
}),
|
|
1373
|
+
}), F = (y) => {
|
|
1374
1374
|
var O;
|
|
1375
1375
|
const E = new Set(y.map((R) => R.prop)), $ = /* @__PURE__ */ new Set();
|
|
1376
1376
|
(O = o.columnsSelector) == null || O.forEach((R) => {
|
|
@@ -1390,7 +1390,7 @@ const ie = new yo(), xo = {
|
|
|
1390
1390
|
const v = [...o.columnsSelector || []];
|
|
1391
1391
|
J.length > 0 && v.push(U(J)), u.value = v;
|
|
1392
1392
|
}, L = () => {
|
|
1393
|
-
|
|
1393
|
+
F(o.allColumns), ie.open({
|
|
1394
1394
|
component: zo,
|
|
1395
1395
|
title: "Управління колонками таблиці",
|
|
1396
1396
|
props: {
|
|
@@ -1399,7 +1399,7 @@ const ie = new yo(), xo = {
|
|
|
1399
1399
|
columnsSelector: u.value,
|
|
1400
1400
|
// Передаємо оновлені доступні колонки
|
|
1401
1401
|
"onUpdate-columns": (y) => {
|
|
1402
|
-
console.log("ColumnActions отримав оновлені колонки:", y), n("update-columns", y),
|
|
1402
|
+
console.log("ColumnActions отримав оновлені колонки:", y), n("update-columns", y), F(y);
|
|
1403
1403
|
}
|
|
1404
1404
|
},
|
|
1405
1405
|
size: "large",
|
|
@@ -1407,9 +1407,9 @@ const ie = new yo(), xo = {
|
|
|
1407
1407
|
}), X();
|
|
1408
1408
|
}, W = () => o.column.pinnedLeft, B = () => o.column.pinnedRight, G = () => W() || B();
|
|
1409
1409
|
return ve(() => {
|
|
1410
|
-
document.addEventListener("click",
|
|
1410
|
+
document.addEventListener("click", N), l.value && (a.value = l.value.closest("th")), F(o.allColumns);
|
|
1411
1411
|
}), $e(() => {
|
|
1412
|
-
document.removeEventListener("click",
|
|
1412
|
+
document.removeEventListener("click", N);
|
|
1413
1413
|
}), (y, E) => (p(), m("div", {
|
|
1414
1414
|
ref_key: "triggerRef",
|
|
1415
1415
|
ref: l,
|
|
@@ -1439,41 +1439,44 @@ const ie = new yo(), xo = {
|
|
|
1439
1439
|
}), Wo = { class: "vt-table" }, Do = { class: "vt-th__content" }, Po = { class: "vt-th__content" }, Ao = { class: "vt-th__label" }, Oo = {
|
|
1440
1440
|
key: 0,
|
|
1441
1441
|
class: "vt-th__sortable"
|
|
1442
|
-
}, jo = ["data-resizer", "onMousedown"],
|
|
1442
|
+
}, jo = ["data-resizer", "onMousedown"], No = {
|
|
1443
1443
|
key: 0,
|
|
1444
1444
|
class: "vt-table__empty-row"
|
|
1445
|
-
},
|
|
1445
|
+
}, Fo = ["colspan"], Zo = { class: "vt-table__empty-content" }, Uo = ["onClick"], qo = { class: "vt-table__cell-content" }, Xo = { class: "vt-table__cell-content vt-table__cell-content--ellipsis" }, Go = { key: 1 }, Ko = ["data-resizer", "onMousedown"], Yo = {
|
|
1446
1446
|
key: 0,
|
|
1447
1447
|
class: "vt-table__summary"
|
|
1448
1448
|
}, Jo = { class: "vt-table__cell-content vt-table__cell-content--summary" }, ye = 50, Qo = /* @__PURE__ */ le({
|
|
1449
1449
|
__name: "VTable",
|
|
1450
1450
|
props: /* @__PURE__ */ Re({
|
|
1451
1451
|
data: {},
|
|
1452
|
-
maxHeight: {},
|
|
1452
|
+
maxHeight: { default: void 0 },
|
|
1453
1453
|
defaultSort: {},
|
|
1454
|
-
showSummary: { type: Boolean },
|
|
1455
|
-
summaryMethod: {
|
|
1456
|
-
columnsSelector: {},
|
|
1457
|
-
selectable: { type: Boolean },
|
|
1458
|
-
selectionKey: {},
|
|
1459
|
-
defaultSelection: {},
|
|
1460
|
-
selectOnClickRow: { type: Boolean },
|
|
1461
|
-
highlightCurrentRow: { type: Boolean },
|
|
1462
|
-
allData: {},
|
|
1463
|
-
columns: {}
|
|
1454
|
+
showSummary: { type: Boolean, default: !1 },
|
|
1455
|
+
summaryMethod: {},
|
|
1456
|
+
columnsSelector: { default: () => [] },
|
|
1457
|
+
selectable: { type: Boolean, default: !1 },
|
|
1458
|
+
selectionKey: { default: "id" },
|
|
1459
|
+
defaultSelection: { default: () => [] },
|
|
1460
|
+
selectOnClickRow: { type: Boolean, default: !1 },
|
|
1461
|
+
highlightCurrentRow: { type: Boolean, default: !1 },
|
|
1462
|
+
allData: { default: void 0 },
|
|
1463
|
+
columns: { default: () => [] }
|
|
1464
1464
|
}, {
|
|
1465
|
-
columns: {
|
|
1465
|
+
columns: {
|
|
1466
|
+
required: !1,
|
|
1467
|
+
default: void 0
|
|
1468
|
+
},
|
|
1466
1469
|
columnsModifiers: {}
|
|
1467
1470
|
}),
|
|
1468
1471
|
emits: /* @__PURE__ */ Re(["sort-change", "selection-change", "current-change", "row-click", "update:columns", "column-pin", "column-resize", "column-visibility", "column-sort", "columns-change", "infinity-scroll"], ["update:columns"]),
|
|
1469
1472
|
setup(t, { expose: e, emit: o }) {
|
|
1470
|
-
const n = t, s = ct(t, "columns"),
|
|
1471
|
-
let
|
|
1473
|
+
const n = t, s = o, l = ct(t, "columns"), a = A({}), r = A(), i = ut([]), u = A(n.defaultSort || null), c = x(() => l.value !== void 0), b = x(() => n.data && n.data.length > 0), M = A(!1), X = A(0);
|
|
1474
|
+
let N = null;
|
|
1472
1475
|
const Q = () => {
|
|
1473
|
-
c.value &&
|
|
1476
|
+
c.value && l.value ? i.splice(0, i.length, ...l.value) : n.columns && n.columns.length > 0 && i.splice(0, i.length, ...n.columns);
|
|
1474
1477
|
};
|
|
1475
1478
|
me(
|
|
1476
|
-
() =>
|
|
1479
|
+
() => l.value,
|
|
1477
1480
|
(f) => {
|
|
1478
1481
|
f && c.value && i.splice(0, i.length, ...f);
|
|
1479
1482
|
},
|
|
@@ -1485,7 +1488,7 @@ const ie = new yo(), xo = {
|
|
|
1485
1488
|
},
|
|
1486
1489
|
{ deep: !0 }
|
|
1487
1490
|
), dt("vt-table-columns", i);
|
|
1488
|
-
const { sortedColumns: U, getDefaultColumnWidth:
|
|
1491
|
+
const { sortedColumns: U, getDefaultColumnWidth: F, getStickyOffset: L } = vo(i), { getTableWrapperStyle: W, getColumnStyle: B, getHeaderStyle: G, getFooterStyle: y } = fo(n), { onMouseDown: E } = _o(), $ = x(() => bo(n.data, u.value, i)), J = x(() => n.allData || n.data), v = n.selectable ? go(n, $, s, J) : null, O = () => ({
|
|
1489
1492
|
width: `${ye}px`,
|
|
1490
1493
|
minWidth: `${ye}px`,
|
|
1491
1494
|
maxWidth: `${ye}px`,
|
|
@@ -1511,9 +1514,9 @@ const ie = new yo(), xo = {
|
|
|
1511
1514
|
}, d = () => {
|
|
1512
1515
|
if (!r.value || M.value) return;
|
|
1513
1516
|
const f = r.value, C = f.scrollTop, I = f.scrollHeight, T = f.clientHeight, P = 30;
|
|
1514
|
-
|
|
1517
|
+
N && clearTimeout(N), N = setTimeout(() => {
|
|
1515
1518
|
const fe = C - X.value > 1, w = I - C - T <= P, ce = I - C - T <= 5;
|
|
1516
|
-
X.value = C, fe && (w || ce) && (M.value = !0,
|
|
1519
|
+
X.value = C, fe && (w || ce) && (M.value = !0, s("infinity-scroll"), setTimeout(() => {
|
|
1517
1520
|
M.value = !1;
|
|
1518
1521
|
}, 1e3));
|
|
1519
1522
|
}, 50);
|
|
@@ -1523,12 +1526,12 @@ const ie = new yo(), xo = {
|
|
|
1523
1526
|
ve(() => {
|
|
1524
1527
|
r.value && r.value.addEventListener("scroll", d);
|
|
1525
1528
|
}), $e(() => {
|
|
1526
|
-
|
|
1529
|
+
N && clearTimeout(N), r.value && r.value.removeEventListener("scroll", d);
|
|
1527
1530
|
});
|
|
1528
1531
|
const g = (f, C) => {
|
|
1529
1532
|
ko(f, C, (I) => {
|
|
1530
1533
|
var T, P;
|
|
1531
|
-
((T = u.value) == null ? void 0 : T.prop) === f.prop && u.value.direction === C ? u.value = null : u.value = I,
|
|
1534
|
+
((T = u.value) == null ? void 0 : T.prop) === f.prop && u.value.direction === C ? u.value = null : u.value = I, s("sort-change", {
|
|
1532
1535
|
column: f,
|
|
1533
1536
|
direction: ((P = u.value) == null ? void 0 : P.direction) || null,
|
|
1534
1537
|
prop: f.prop,
|
|
@@ -1540,20 +1543,20 @@ const ie = new yo(), xo = {
|
|
|
1540
1543
|
pinnedLeft: C === "left",
|
|
1541
1544
|
pinnedRight: C === "right"
|
|
1542
1545
|
};
|
|
1543
|
-
S(f.prop, I),
|
|
1546
|
+
S(f.prop, I), s("column-pin", { column: { ...f, ...I }, position: C });
|
|
1544
1547
|
}, V = (f) => {
|
|
1545
|
-
i.splice(0, i.length, ...f), c.value && (
|
|
1548
|
+
i.splice(0, i.length, ...f), c.value && (l.value = [...f]), s("columns-change", [...f]);
|
|
1546
1549
|
}, S = (f, C) => {
|
|
1547
1550
|
const I = i.findIndex((T) => T.prop === f);
|
|
1548
1551
|
if (I !== -1) {
|
|
1549
|
-
if (Object.assign(i[I], C), c.value &&
|
|
1550
|
-
const T =
|
|
1552
|
+
if (Object.assign(i[I], C), c.value && l.value) {
|
|
1553
|
+
const T = l.value.findIndex((P) => P.prop === f);
|
|
1551
1554
|
if (T !== -1) {
|
|
1552
|
-
const P = [...
|
|
1553
|
-
P[T] = { ...P[T], ...C },
|
|
1555
|
+
const P = [...l.value];
|
|
1556
|
+
P[T] = { ...P[T], ...C }, l.value = P;
|
|
1554
1557
|
}
|
|
1555
1558
|
}
|
|
1556
|
-
|
|
1559
|
+
s("columns-change", [...i]);
|
|
1557
1560
|
} else
|
|
1558
1561
|
console.error(
|
|
1559
1562
|
"Колонку не знайдено:",
|
|
@@ -1562,7 +1565,7 @@ const ie = new yo(), xo = {
|
|
|
1562
1565
|
i.map((T) => T.prop)
|
|
1563
1566
|
);
|
|
1564
1567
|
}, ee = (f, C, I) => {
|
|
1565
|
-
|
|
1568
|
+
s("row-click", { row: f, column: C, event: I }), n.highlightCurrentRow && v && v.setCurrentRow(f);
|
|
1566
1569
|
}, Ce = (f, C, I) => {
|
|
1567
1570
|
I.stopPropagation(), v && v.toggleRowSelection(C, f);
|
|
1568
1571
|
}, Ue = (f, C) => {
|
|
@@ -1570,15 +1573,15 @@ const ie = new yo(), xo = {
|
|
|
1570
1573
|
}, Se = (f, C) => {
|
|
1571
1574
|
f && (a.value[C] = f);
|
|
1572
1575
|
}, Ie = (f, C) => {
|
|
1573
|
-
const I = C.width ||
|
|
1574
|
-
E(f, C,
|
|
1575
|
-
S(C.prop, { width: T }),
|
|
1576
|
+
const I = C.width || F();
|
|
1577
|
+
E(f, C, F, (T) => {
|
|
1578
|
+
S(C.prop, { width: T }), s("column-resize", {
|
|
1576
1579
|
column: { ...C, width: T },
|
|
1577
1580
|
width: T,
|
|
1578
1581
|
oldWidth: I
|
|
1579
1582
|
});
|
|
1580
1583
|
});
|
|
1581
|
-
}, qe = (f, C) => B(f, C, L,
|
|
1584
|
+
}, qe = (f, C) => B(f, C, L, F), Xe = (f, C) => G(f, C, L, F), Ge = (f, C) => y(f, C, L, F), Ke = (f, C) => {
|
|
1582
1585
|
if (!C || !C.prop) return "";
|
|
1583
1586
|
const I = f[C.prop];
|
|
1584
1587
|
return I == null ? "" : String(I);
|
|
@@ -1623,7 +1626,7 @@ const ie = new yo(), xo = {
|
|
|
1623
1626
|
// Додаємо метод для скидання infinity scroll
|
|
1624
1627
|
}), (f, C) => {
|
|
1625
1628
|
var T, P, de, fe;
|
|
1626
|
-
const I =
|
|
1629
|
+
const I = Ne("tooltip");
|
|
1627
1630
|
return p(), m("div", {
|
|
1628
1631
|
ref_key: "tableWrapperRef",
|
|
1629
1632
|
ref: r,
|
|
@@ -1752,7 +1755,7 @@ const ie = new yo(), xo = {
|
|
|
1752
1755
|
}, null, 40, Ko)
|
|
1753
1756
|
], 6))), 128))
|
|
1754
1757
|
], 10, Uo);
|
|
1755
|
-
}), 128)) : (p(), m("tr",
|
|
1758
|
+
}), 128)) : (p(), m("tr", No, [
|
|
1756
1759
|
h("td", {
|
|
1757
1760
|
colspan: q(U).length + (n.selectable ? 1 : 0),
|
|
1758
1761
|
class: "vt-table__empty-cell"
|
|
@@ -1764,7 +1767,7 @@ const ie = new yo(), xo = {
|
|
|
1764
1767
|
}),
|
|
1765
1768
|
C[0] || (C[0] = h("span", { class: "vt-table__empty-text" }, "Немає даних!", -1))
|
|
1766
1769
|
])
|
|
1767
|
-
], 8,
|
|
1770
|
+
], 8, Fo)
|
|
1768
1771
|
]))
|
|
1769
1772
|
]),
|
|
1770
1773
|
Je.value ? (p(), m("tfoot", Yo, [
|
|
@@ -2002,24 +2005,32 @@ const ie = new yo(), xo = {
|
|
|
2002
2005
|
beforeUnmount(t) {
|
|
2003
2006
|
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);
|
|
2004
2007
|
}
|
|
2008
|
+
}, ll = {
|
|
2009
|
+
sortable: !0,
|
|
2010
|
+
actionColumn: !1,
|
|
2011
|
+
showOverflowTooltip: !0,
|
|
2012
|
+
visible: !0,
|
|
2013
|
+
pinnedLeft: !1,
|
|
2014
|
+
pinnedRight: !1
|
|
2005
2015
|
}, nl = {
|
|
2006
2016
|
install(t, e = {}) {
|
|
2007
2017
|
const { prefix: o = "V", modal: n = !0 } = e;
|
|
2008
|
-
t.component(`${o}Button`, ge), t.component(`${o}Icon`, Y), t.component(`${o}Loader`,
|
|
2018
|
+
t.component(`${o}Button`, ge), t.component(`${o}Icon`, Y), t.component(`${o}Loader`, Fe), t.component(`${o}Modal`, Ze), t.component(`${o}Pagination`, po), t.component(`${o}Checkbox`, ue), t.component(`${o}Table`, Qo), t.component(`${o}TableColumn`, el), t.directive("tooltip", tl), n && t.use(xo);
|
|
2009
2019
|
}
|
|
2010
|
-
},
|
|
2020
|
+
}, sl = nl.install;
|
|
2011
2021
|
export {
|
|
2022
|
+
ll as DEFAULT_COLUMN_CONFIG,
|
|
2012
2023
|
ge as VButton,
|
|
2013
2024
|
ue as VCheckbox,
|
|
2014
2025
|
Y as VIcon,
|
|
2015
|
-
|
|
2026
|
+
Fe as VLoader,
|
|
2016
2027
|
Ze as VModal,
|
|
2017
2028
|
xo as VModalPlugin,
|
|
2018
2029
|
po as VPagination,
|
|
2019
2030
|
Qo as VTable,
|
|
2020
2031
|
el as VTableColumn,
|
|
2021
2032
|
nl as default,
|
|
2022
|
-
|
|
2033
|
+
sl as install,
|
|
2023
2034
|
ie as modalManager,
|
|
2024
2035
|
tl as tooltipDirective
|
|
2025
2036
|
};
|