voiptime-components 1.12.9 → 1.12.10
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.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +580 -574
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElementBlock as a, openBlock as l, createElementVNode as o, createStaticVNode as Pe, defineComponent as we, computed as
|
|
1
|
+
import { createElementBlock as a, openBlock as l, createElementVNode as o, createStaticVNode as Pe, defineComponent as we, computed as x, createBlock as ge, createCommentVNode as Z, resolveDynamicComponent as w1, normalizeStyle as Be, useSlots as h1, resolveDirective as D1, withDirectives as i1, normalizeClass as G, renderSlot as Ve, Teleport as a1, withModifiers as Se, toDisplayString as R, createTextVNode as $e, ref as B, onUnmounted as n1, nextTick as Te, watch as Me, onMounted as ze, createVNode as ne, Fragment as ie, renderList as pe, provide as p1, unref as O, Transition as d1, withCtx as xe, inject as v1, onBeforeUnmount as Q1, createApp as G1, h as y1, mergeModels as B1, useModel as mt, reactive as H1, toRef as c1, toRefs as _t, vShow as J1, TransitionGroup as gt, isRef as _1 } from "vue";
|
|
2
2
|
const $ = (n, e) => {
|
|
3
3
|
const r = n.__vccOpts || n;
|
|
4
4
|
for (const [t, i] of e)
|
|
@@ -61,7 +61,7 @@ function xt(n, e) {
|
|
|
61
61
|
}, null, -1)
|
|
62
62
|
]));
|
|
63
63
|
}
|
|
64
|
-
const Lt = /* @__PURE__ */ $($t, [["render", xt]]),
|
|
64
|
+
const Lt = /* @__PURE__ */ $($t, [["render", xt]]), St = {}, Vt = {
|
|
65
65
|
width: "20",
|
|
66
66
|
height: "20",
|
|
67
67
|
viewBox: "0 0 20 20",
|
|
@@ -69,7 +69,7 @@ const Lt = /* @__PURE__ */ $($t, [["render", xt]]), Vt = {}, St = {
|
|
|
69
69
|
xmlns: "http://www.w3.org/2000/svg"
|
|
70
70
|
};
|
|
71
71
|
function Dt(n, e) {
|
|
72
|
-
return l(), a("svg",
|
|
72
|
+
return l(), a("svg", Vt, e[0] || (e[0] = [
|
|
73
73
|
o("path", {
|
|
74
74
|
d: "M6 14L10 10M10 10L14 6M10 10L6 6M10 10L14 14",
|
|
75
75
|
stroke: "currentColor",
|
|
@@ -79,7 +79,7 @@ function Dt(n, e) {
|
|
|
79
79
|
}, null, -1)
|
|
80
80
|
]));
|
|
81
81
|
}
|
|
82
|
-
const Ht = /* @__PURE__ */ $(
|
|
82
|
+
const Ht = /* @__PURE__ */ $(St, [["render", Dt]]), Tt = {}, It = {
|
|
83
83
|
width: "20",
|
|
84
84
|
height: "20",
|
|
85
85
|
viewBox: "0 0 20 20",
|
|
@@ -324,15 +324,15 @@ function Mn(n, e) {
|
|
|
324
324
|
}, null, -1)
|
|
325
325
|
]));
|
|
326
326
|
}
|
|
327
|
-
const xn = /* @__PURE__ */ $(yn, [["render", Mn]]), Ln = {},
|
|
327
|
+
const xn = /* @__PURE__ */ $(yn, [["render", Mn]]), Ln = {}, Sn = {
|
|
328
328
|
width: "20",
|
|
329
329
|
height: "20",
|
|
330
330
|
viewBox: "0 0 20 20",
|
|
331
331
|
fill: "none",
|
|
332
332
|
xmlns: "http://www.w3.org/2000/svg"
|
|
333
333
|
};
|
|
334
|
-
function
|
|
335
|
-
return l(), a("svg",
|
|
334
|
+
function Vn(n, e) {
|
|
335
|
+
return l(), a("svg", Sn, e[0] || (e[0] = [
|
|
336
336
|
o("path", {
|
|
337
337
|
d: "M6.5 3H4C3.44772 3 3 3.44772 3 4V16C3 16.5523 3.44772 17 4 17H6.5M6.5 3H12.096C12.3552 3 12.6042 3.1006 12.7906 3.2806L16.6946 7.04995C16.8898 7.2384 17 7.49805 17 7.76935V16C17 16.5523 16.5523 17 16 17H13.5M6.5 3V6.34483C6.5 6.89711 6.94772 7.34483 7.5 7.34483H11M6.5 17V14.6207C6.5 14.0684 6.94772 13.6207 7.5 13.6207H12.5C13.0523 13.6207 13.5 14.0684 13.5 14.6207V17M6.5 17H13.5",
|
|
338
338
|
stroke: "currentColor",
|
|
@@ -341,7 +341,7 @@ function Sn(n, e) {
|
|
|
341
341
|
}, null, -1)
|
|
342
342
|
]));
|
|
343
343
|
}
|
|
344
|
-
const Dn = /* @__PURE__ */ $(Ln, [["render",
|
|
344
|
+
const Dn = /* @__PURE__ */ $(Ln, [["render", Vn]]), Hn = {}, Tn = {
|
|
345
345
|
fill: "none",
|
|
346
346
|
height: "20",
|
|
347
347
|
viewBox: "0 0 20 20",
|
|
@@ -604,7 +604,7 @@ const Mo = /* @__PURE__ */ $(bo, [["render", $o]]), xo = {}, Lo = {
|
|
|
604
604
|
fill: "none",
|
|
605
605
|
xmlns: "http://www.w3.org/2000/svg"
|
|
606
606
|
};
|
|
607
|
-
function
|
|
607
|
+
function So(n, e) {
|
|
608
608
|
return l(), a("svg", Lo, e[0] || (e[0] = [
|
|
609
609
|
o("circle", {
|
|
610
610
|
cx: "20",
|
|
@@ -618,7 +618,7 @@ function Vo(n, e) {
|
|
|
618
618
|
}, null, -1)
|
|
619
619
|
]));
|
|
620
620
|
}
|
|
621
|
-
const
|
|
621
|
+
const Vo = /* @__PURE__ */ $(xo, [["render", So]]), Do = {}, Ho = {
|
|
622
622
|
width: "20",
|
|
623
623
|
height: "20",
|
|
624
624
|
viewBox: "0 0 21 20",
|
|
@@ -851,7 +851,7 @@ function xs(n, e) {
|
|
|
851
851
|
}, null, -1)
|
|
852
852
|
]));
|
|
853
853
|
}
|
|
854
|
-
const Ls = /* @__PURE__ */ $($s, [["render", xs]]),
|
|
854
|
+
const Ls = /* @__PURE__ */ $($s, [["render", xs]]), Ss = {}, Vs = {
|
|
855
855
|
width: "20",
|
|
856
856
|
height: "20",
|
|
857
857
|
viewBox: "0 0 20 20",
|
|
@@ -859,7 +859,7 @@ const Ls = /* @__PURE__ */ $($s, [["render", xs]]), Vs = {}, Ss = {
|
|
|
859
859
|
xmlns: "http://www.w3.org/2000/svg"
|
|
860
860
|
};
|
|
861
861
|
function Ds(n, e) {
|
|
862
|
-
return l(), a("svg",
|
|
862
|
+
return l(), a("svg", Vs, e[0] || (e[0] = [
|
|
863
863
|
o("path", {
|
|
864
864
|
d: "M15.4505 9.9974C15.4505 10.5499 15.231 11.0798 14.8403 11.4705C14.4496 11.8612 13.9197 12.0807 13.3672 12.0807C12.8147 12.0807 12.2847 11.8612 11.894 11.4705C11.5033 11.0798 11.2839 10.5499 11.2839 9.9974C11.2839 9.44486 11.5033 8.91496 11.894 8.52426C12.2847 8.13356 12.8147 7.91406 13.3672 7.91406C13.9197 7.91406 14.4496 8.13356 14.8403 8.52426C15.231 8.91496 15.4505 9.44486 15.4505 9.9974ZM8.78385 9.9974C8.78385 10.5499 8.56436 11.0798 8.17366 11.4705C7.78296 11.8612 7.25306 12.0807 6.70052 12.0807C6.14799 12.0807 5.61808 11.8612 5.22738 11.4705C4.83668 11.0798 4.61719 10.5499 4.61719 9.9974C4.61719 9.44486 4.83668 8.91496 5.22738 8.52426C5.61808 8.13356 6.14799 7.91406 6.70052 7.91406C7.25306 7.91406 7.78296 8.13356 8.17366 8.52426C8.56436 8.91496 8.78385 9.44486 8.78385 9.9974Z",
|
|
865
865
|
stroke: "currentColor",
|
|
@@ -873,7 +873,7 @@ function Ds(n, e) {
|
|
|
873
873
|
}, null, -1)
|
|
874
874
|
]));
|
|
875
875
|
}
|
|
876
|
-
const Hs = /* @__PURE__ */ $(
|
|
876
|
+
const Hs = /* @__PURE__ */ $(Ss, [["render", Ds]]), Ts = {}, Is = {
|
|
877
877
|
fill: "none",
|
|
878
878
|
height: "20",
|
|
879
879
|
viewBox: "0 0 20 20",
|
|
@@ -1148,7 +1148,7 @@ const Mr = /* @__PURE__ */ $(br, [["render", $r]]), xr = {}, Lr = {
|
|
|
1148
1148
|
fill: "none",
|
|
1149
1149
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1150
1150
|
};
|
|
1151
|
-
function
|
|
1151
|
+
function Sr(n, e) {
|
|
1152
1152
|
return l(), a("svg", Lr, e[0] || (e[0] = [
|
|
1153
1153
|
o("path", {
|
|
1154
1154
|
"fill-rule": "evenodd",
|
|
@@ -1166,7 +1166,7 @@ function Vr(n, e) {
|
|
|
1166
1166
|
}, null, -1)
|
|
1167
1167
|
]));
|
|
1168
1168
|
}
|
|
1169
|
-
const
|
|
1169
|
+
const Vr = /* @__PURE__ */ $(xr, [["render", Sr]]), Dr = {}, Hr = {
|
|
1170
1170
|
fill: "none",
|
|
1171
1171
|
height: "20",
|
|
1172
1172
|
viewBox: "0 0 20 20",
|
|
@@ -1483,7 +1483,7 @@ function xl(n, e) {
|
|
|
1483
1483
|
}, null, -1)
|
|
1484
1484
|
]));
|
|
1485
1485
|
}
|
|
1486
|
-
const Ll = /* @__PURE__ */ $($l, [["render", xl]]),
|
|
1486
|
+
const Ll = /* @__PURE__ */ $($l, [["render", xl]]), Sl = {}, Vl = {
|
|
1487
1487
|
fill: "none",
|
|
1488
1488
|
height: "20",
|
|
1489
1489
|
viewBox: "0 0 20 20",
|
|
@@ -1491,7 +1491,7 @@ const Ll = /* @__PURE__ */ $($l, [["render", xl]]), Vl = {}, Sl = {
|
|
|
1491
1491
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1492
1492
|
};
|
|
1493
1493
|
function Dl(n, e) {
|
|
1494
|
-
return l(), a("svg",
|
|
1494
|
+
return l(), a("svg", Vl, e[0] || (e[0] = [
|
|
1495
1495
|
o("path", {
|
|
1496
1496
|
d: "M5.10938 6.41406L9.00209 9.00921L12.8948 6.41406",
|
|
1497
1497
|
stroke: "currentColor",
|
|
@@ -1514,7 +1514,7 @@ function Dl(n, e) {
|
|
|
1514
1514
|
}, null, -1)
|
|
1515
1515
|
]));
|
|
1516
1516
|
}
|
|
1517
|
-
const Hl = /* @__PURE__ */ $(
|
|
1517
|
+
const Hl = /* @__PURE__ */ $(Sl, [["render", Dl]]), Tl = {}, Il = {
|
|
1518
1518
|
fill: "none",
|
|
1519
1519
|
height: "20",
|
|
1520
1520
|
viewBox: "0 0 20 20",
|
|
@@ -1818,7 +1818,7 @@ const Mi = /* @__PURE__ */ $(bi, [["render", $i]]), xi = {}, Li = {
|
|
|
1818
1818
|
width: "21",
|
|
1819
1819
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1820
1820
|
};
|
|
1821
|
-
function
|
|
1821
|
+
function Si(n, e) {
|
|
1822
1822
|
return l(), a("svg", Li, e[0] || (e[0] = [
|
|
1823
1823
|
o("path", {
|
|
1824
1824
|
d: "M14.6198 16.2519C14.6198 14.871 12.754 13.7519 10.4531 13.7519C8.15229 13.7519 6.28646 14.871 6.28646 16.2519M17.9531 13.7519C17.9531 12.7269 16.9248 11.846 15.4531 11.4602M2.95312 13.7519C2.95312 12.7269 3.98146 11.846 5.45312 11.4602M15.4531 8.11521C15.7 7.89695 15.9013 7.63204 16.0454 7.33571C16.1896 7.03937 16.2737 6.71747 16.293 6.38851C16.3123 6.05954 16.2664 5.73002 16.1578 5.41887C16.0493 5.10773 15.8803 4.8211 15.6607 4.57549C15.441 4.32988 15.1749 4.13012 14.8777 3.98771C14.5806 3.8453 14.2582 3.76304 13.9291 3.74566C13.6 3.72829 13.2708 3.77614 12.9603 3.88647C12.6498 3.9968 12.3641 4.16743 12.1198 4.38854M5.45312 8.11521C4.96337 7.672 4.66892 7.05298 4.6341 6.39337C4.59927 5.73377 4.8269 5.08718 5.26726 4.59487C5.70761 4.10255 6.32491 3.80451 6.9843 3.76585C7.64369 3.72719 8.29159 3.95105 8.78646 4.38854M10.4531 11.2519C9.79008 11.2519 9.1542 10.9885 8.68536 10.5196C8.21652 10.0508 7.95312 9.41492 7.95312 8.75187C7.95312 8.08883 8.21652 7.45295 8.68536 6.98411C9.1542 6.51527 9.79008 6.25187 10.4531 6.25187C11.1162 6.25187 11.7521 6.51527 12.2209 6.98411C12.6897 7.45295 12.9531 8.08883 12.9531 8.75187C12.9531 9.41492 12.6897 10.0508 12.2209 10.5196C11.7521 10.9885 11.1162 11.2519 10.4531 11.2519Z",
|
|
@@ -1829,7 +1829,7 @@ function Vi(n, e) {
|
|
|
1829
1829
|
}, null, -1)
|
|
1830
1830
|
]));
|
|
1831
1831
|
}
|
|
1832
|
-
const
|
|
1832
|
+
const Vi = /* @__PURE__ */ $(xi, [["render", Si]]), Di = {}, Hi = {
|
|
1833
1833
|
width: "20",
|
|
1834
1834
|
height: "20",
|
|
1835
1835
|
viewBox: "0 0 20 20",
|
|
@@ -2134,7 +2134,7 @@ function xa(n, e) {
|
|
|
2134
2134
|
}, null, -1)
|
|
2135
2135
|
]));
|
|
2136
2136
|
}
|
|
2137
|
-
const La = /* @__PURE__ */ $($a, [["render", xa]]),
|
|
2137
|
+
const La = /* @__PURE__ */ $($a, [["render", xa]]), Sa = {}, Va = {
|
|
2138
2138
|
width: "20",
|
|
2139
2139
|
height: "20",
|
|
2140
2140
|
viewBox: "0 0 20 20",
|
|
@@ -2142,7 +2142,7 @@ const La = /* @__PURE__ */ $($a, [["render", xa]]), Va = {}, Sa = {
|
|
|
2142
2142
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2143
2143
|
};
|
|
2144
2144
|
function Da(n, e) {
|
|
2145
|
-
return l(), a("svg",
|
|
2145
|
+
return l(), a("svg", Va, e[0] || (e[0] = [
|
|
2146
2146
|
o("rect", {
|
|
2147
2147
|
x: "7",
|
|
2148
2148
|
y: "7",
|
|
@@ -2159,7 +2159,7 @@ function Da(n, e) {
|
|
|
2159
2159
|
}, null, -1)
|
|
2160
2160
|
]));
|
|
2161
2161
|
}
|
|
2162
|
-
const Ha = /* @__PURE__ */ $(
|
|
2162
|
+
const Ha = /* @__PURE__ */ $(Sa, [["render", Da]]), Ta = {}, Ia = {
|
|
2163
2163
|
width: "20",
|
|
2164
2164
|
height: "20",
|
|
2165
2165
|
viewBox: "0 0 22 22",
|
|
@@ -2425,7 +2425,7 @@ const M2 = /* @__PURE__ */ $(b2, [["render", $2]]), x2 = {}, L2 = {
|
|
|
2425
2425
|
fill: "none",
|
|
2426
2426
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2427
2427
|
};
|
|
2428
|
-
function
|
|
2428
|
+
function S2(n, e) {
|
|
2429
2429
|
return l(), a("svg", L2, e[0] || (e[0] = [
|
|
2430
2430
|
o("path", {
|
|
2431
2431
|
d: "M18.166 14.5833C18.166 15.7533 18.166 16.3392 17.8852 16.7592C17.7636 16.9412 17.6072 17.0975 17.4252 17.2192C17.0052 17.5 16.4193 17.5 15.2493 17.5L4.58268 17.5C3.41268 17.5 2.82685 17.5 2.40685 17.2192C2.22479 17.0975 2.06848 16.9412 1.94685 16.7592C1.66601 16.3392 1.66602 15.7533 1.66602 14.5833C1.66602 13.4133 1.66601 12.8275 1.94685 12.4075C2.06848 12.2254 2.22479 12.0691 2.40685 11.9475C2.82685 11.6667 3.41268 11.6667 4.58268 11.6667L15.2493 11.6667C16.4193 11.6667 17.0052 11.6667 17.4252 11.9475C17.6072 12.0691 17.7636 12.2254 17.8852 12.4075C18.166 12.8275 18.166 13.4133 18.166 14.5833ZM18.166 5.41667C18.166 6.58667 18.166 7.1725 17.8852 7.5925C17.7636 7.77456 17.6072 7.93087 17.4252 8.0525C17.0052 8.33333 16.4193 8.33333 15.2493 8.33333L4.58268 8.33333C3.41268 8.33333 2.82685 8.33333 2.40685 8.0525C2.22479 7.93087 2.06848 7.77456 1.94685 7.5925C1.66601 7.1725 1.66602 6.58667 1.66602 5.41667C1.66602 4.24667 1.66601 3.66083 1.94685 3.24083C2.06848 3.05877 2.22479 2.90246 2.40685 2.78083C2.82685 2.5 3.41268 2.5 4.58268 2.5L15.2493 2.5C16.4193 2.5 17.0052 2.5 17.4252 2.78083C17.6072 2.90246 17.7636 3.05877 17.8852 3.24083C18.166 3.66083 18.166 4.24667 18.166 5.41667Z",
|
|
@@ -2436,7 +2436,7 @@ function V2(n, e) {
|
|
|
2436
2436
|
}, null, -1)
|
|
2437
2437
|
]));
|
|
2438
2438
|
}
|
|
2439
|
-
const
|
|
2439
|
+
const V2 = /* @__PURE__ */ $(x2, [["render", S2]]), D2 = {}, H2 = {
|
|
2440
2440
|
width: "20",
|
|
2441
2441
|
height: "20",
|
|
2442
2442
|
viewBox: "0 0 20 20",
|
|
@@ -2536,7 +2536,7 @@ const Z2 = /* @__PURE__ */ $(P2, [["render", F2]]), z2 = {
|
|
|
2536
2536
|
// call icons
|
|
2537
2537
|
answerCall: ko,
|
|
2538
2538
|
clientCall: Mo,
|
|
2539
|
-
hangupCall:
|
|
2539
|
+
hangupCall: Vo,
|
|
2540
2540
|
inboundCall: Io,
|
|
2541
2541
|
keyboardCall: jo,
|
|
2542
2542
|
microphoneCall: Zo,
|
|
@@ -2566,7 +2566,7 @@ const Z2 = /* @__PURE__ */ $(P2, [["render", F2]]), z2 = {
|
|
|
2566
2566
|
filterSave: kr,
|
|
2567
2567
|
// input icons
|
|
2568
2568
|
alertCircle: Mr,
|
|
2569
|
-
alertTriangle:
|
|
2569
|
+
alertTriangle: Vr,
|
|
2570
2570
|
calendar: Ir,
|
|
2571
2571
|
checkCircle: jr,
|
|
2572
2572
|
clock: Zr,
|
|
@@ -2595,7 +2595,7 @@ const Z2 = /* @__PURE__ */ $(P2, [["render", F2]]), z2 = {
|
|
|
2595
2595
|
predictive: mi,
|
|
2596
2596
|
preview: ki,
|
|
2597
2597
|
prioritySelect: Mi,
|
|
2598
|
-
progressive:
|
|
2598
|
+
progressive: Vi,
|
|
2599
2599
|
schedule: Ii,
|
|
2600
2600
|
sms: ji,
|
|
2601
2601
|
starFilled: Zi,
|
|
@@ -2626,7 +2626,7 @@ const Z2 = /* @__PURE__ */ $(P2, [["render", F2]]), z2 = {
|
|
|
2626
2626
|
numberList: Z2,
|
|
2627
2627
|
tableSettings: k2,
|
|
2628
2628
|
twoColumns: M2,
|
|
2629
|
-
twoRows:
|
|
2629
|
+
twoRows: V2,
|
|
2630
2630
|
unfreeze: I2
|
|
2631
2631
|
}, fe = /* @__PURE__ */ we({
|
|
2632
2632
|
__name: "VIcon",
|
|
@@ -2637,14 +2637,14 @@ const Z2 = /* @__PURE__ */ $(P2, [["render", F2]]), z2 = {
|
|
|
2637
2637
|
color: { default: "currentColor" }
|
|
2638
2638
|
},
|
|
2639
2639
|
setup(n) {
|
|
2640
|
-
const e = n, r =
|
|
2640
|
+
const e = n, r = x(() => z2[e.name]), t = x(() => ({
|
|
2641
2641
|
...e.width && { width: typeof e.width == "number" ? `${e.width}px` : e.width },
|
|
2642
2642
|
...e.height && { height: typeof e.height == "number" ? `${e.height}px` : e.height },
|
|
2643
2643
|
color: e.color
|
|
2644
2644
|
}));
|
|
2645
2645
|
return (i, c) => r.value ? (l(), ge(w1(r.value), {
|
|
2646
2646
|
key: 0,
|
|
2647
|
-
style:
|
|
2647
|
+
style: Be(t.value)
|
|
2648
2648
|
}, null, 8, ["style"])) : Z("", !0);
|
|
2649
2649
|
}
|
|
2650
2650
|
}), O2 = {}, Y2 = { class: "vt-loader" };
|
|
@@ -2664,15 +2664,16 @@ const g1 = /* @__PURE__ */ $(O2, [["render", N2]]), W2 = ["disabled", "type", "d
|
|
|
2664
2664
|
icon: {},
|
|
2665
2665
|
tooltip: { type: Boolean, default: !1 },
|
|
2666
2666
|
tooltipPlacement: { default: "top" },
|
|
2667
|
-
htmlType: { default: "button" }
|
|
2667
|
+
htmlType: { default: "button" },
|
|
2668
|
+
color: { default: "" }
|
|
2668
2669
|
},
|
|
2669
2670
|
emits: ["click"],
|
|
2670
2671
|
setup(n, { emit: e }) {
|
|
2671
|
-
const r = n, t = e, i = h1(), c =
|
|
2672
|
-
var g,
|
|
2673
|
-
const
|
|
2674
|
-
return ((
|
|
2675
|
-
}), p =
|
|
2672
|
+
const r = n, t = e, i = h1(), c = x(() => !!(r.icon && r.shape)), d = x(() => {
|
|
2673
|
+
var g, y;
|
|
2674
|
+
const _ = i.default ? i.default({}) : null;
|
|
2675
|
+
return ((y = (g = _ == null ? void 0 : _[0]) == null ? void 0 : g.children) == null ? void 0 : y.toString()) ?? "";
|
|
2676
|
+
}), p = x(() => [
|
|
2676
2677
|
"vt-button",
|
|
2677
2678
|
`vt-button--${r.type}`,
|
|
2678
2679
|
{
|
|
@@ -2681,17 +2682,21 @@ const g1 = /* @__PURE__ */ $(O2, [["render", N2]]), W2 = ["disabled", "type", "d
|
|
|
2681
2682
|
"vt-button--disabled": r.disabled || r.loading,
|
|
2682
2683
|
"vt-button--loading": r.loading
|
|
2683
2684
|
}
|
|
2684
|
-
]), f =
|
|
2685
|
-
|
|
2685
|
+
]), f = x(() => r.color ? {
|
|
2686
|
+
color: r.color,
|
|
2687
|
+
"--vt-button-icon-color": r.color
|
|
2688
|
+
} : {}), v = x(() => c.value && r.tooltip ? d.value : null), h = (_) => {
|
|
2689
|
+
!r.disabled && !r.loading && t("click", _);
|
|
2686
2690
|
};
|
|
2687
|
-
return (
|
|
2688
|
-
const
|
|
2691
|
+
return (_, g) => {
|
|
2692
|
+
const y = D1("tooltip");
|
|
2689
2693
|
return i1((l(), a("button", {
|
|
2690
2694
|
class: G(p.value),
|
|
2695
|
+
style: Be(f.value),
|
|
2691
2696
|
disabled: r.disabled || r.loading,
|
|
2692
2697
|
type: r.htmlType,
|
|
2693
2698
|
"data-placement": r.tooltipPlacement,
|
|
2694
|
-
onClick:
|
|
2699
|
+
onClick: h
|
|
2695
2700
|
}, [
|
|
2696
2701
|
r.loading ? (l(), ge(g1, {
|
|
2697
2702
|
key: 0,
|
|
@@ -2699,13 +2704,14 @@ const g1 = /* @__PURE__ */ $(O2, [["render", N2]]), W2 = ["disabled", "type", "d
|
|
|
2699
2704
|
})) : r.icon ? (l(), ge(fe, {
|
|
2700
2705
|
key: 1,
|
|
2701
2706
|
name: r.icon,
|
|
2702
|
-
class: "vt-button__icon"
|
|
2707
|
+
class: "vt-button__icon",
|
|
2708
|
+
style: { color: "var(--vt-button-icon-color)" }
|
|
2703
2709
|
}, null, 8, ["name"])) : Z("", !0),
|
|
2704
2710
|
c.value ? Z("", !0) : (l(), a("span", q2, [
|
|
2705
|
-
|
|
2711
|
+
Ve(_.$slots, "default")
|
|
2706
2712
|
]))
|
|
2707
|
-
],
|
|
2708
|
-
[
|
|
2713
|
+
], 14, W2)), [
|
|
2714
|
+
[y, v.value]
|
|
2709
2715
|
]);
|
|
2710
2716
|
};
|
|
2711
2717
|
}
|
|
@@ -2727,7 +2733,7 @@ const g1 = /* @__PURE__ */ $(O2, [["render", N2]]), W2 = ["disabled", "type", "d
|
|
|
2727
2733
|
},
|
|
2728
2734
|
emits: ["update:modelValue", "close"],
|
|
2729
2735
|
setup(n, { emit: e }) {
|
|
2730
|
-
const r = n, t = e, i =
|
|
2736
|
+
const r = n, t = e, i = x(() => ["vt-modal__container", `vt-modal__container--${r.size}`]), c = x(() => ({
|
|
2731
2737
|
zIndex: r.zIndex
|
|
2732
2738
|
})), d = () => {
|
|
2733
2739
|
t("update:modelValue", !1), t("close");
|
|
@@ -2737,13 +2743,13 @@ const g1 = /* @__PURE__ */ $(O2, [["render", N2]]), W2 = ["disabled", "type", "d
|
|
|
2737
2743
|
return (f, v) => (l(), ge(a1, { to: "body" }, [
|
|
2738
2744
|
f.modelValue ? (l(), a("div", {
|
|
2739
2745
|
key: 0,
|
|
2740
|
-
style:
|
|
2746
|
+
style: Be(c.value),
|
|
2741
2747
|
class: "vt-modal__backdrop",
|
|
2742
2748
|
onClick: p
|
|
2743
2749
|
}, [
|
|
2744
2750
|
o("div", {
|
|
2745
2751
|
class: G(i.value),
|
|
2746
|
-
onClick: v[0] || (v[0] =
|
|
2752
|
+
onClick: v[0] || (v[0] = Se(() => {
|
|
2747
2753
|
}, ["stop"]))
|
|
2748
2754
|
}, [
|
|
2749
2755
|
f.title || f.showCloseButton ? (l(), a("div", U2, [
|
|
@@ -2756,7 +2762,7 @@ const g1 = /* @__PURE__ */ $(O2, [["render", N2]]), W2 = ["disabled", "type", "d
|
|
|
2756
2762
|
})) : Z("", !0)
|
|
2757
2763
|
])) : Z("", !0),
|
|
2758
2764
|
o("div", X2, [
|
|
2759
|
-
|
|
2765
|
+
Ve(f.$slots, "default")
|
|
2760
2766
|
])
|
|
2761
2767
|
], 2)
|
|
2762
2768
|
], 4)) : Z("", !0)
|
|
@@ -2780,16 +2786,16 @@ const g1 = /* @__PURE__ */ $(O2, [["render", N2]]), W2 = ["disabled", "type", "d
|
|
|
2780
2786
|
},
|
|
2781
2787
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
2782
2788
|
setup(n, { emit: e }) {
|
|
2783
|
-
const r = n, t = e, i = () => `vt-checkbox-${Math.random().toString(36).substr(2, 9)}`, c =
|
|
2789
|
+
const r = n, t = e, i = () => `vt-checkbox-${Math.random().toString(36).substr(2, 9)}`, c = x(() => r.id || i()), d = x(() => r.modelValue ?? r.checked), p = (h) => {
|
|
2784
2790
|
if (r.disabled) return;
|
|
2785
|
-
const
|
|
2786
|
-
t("update:modelValue",
|
|
2791
|
+
const g = h.target.checked;
|
|
2792
|
+
t("update:modelValue", g), t("change", g, h);
|
|
2787
2793
|
}, f = (h) => {
|
|
2788
2794
|
t("focus", h);
|
|
2789
2795
|
}, v = (h) => {
|
|
2790
2796
|
t("blur", h);
|
|
2791
2797
|
};
|
|
2792
|
-
return (h,
|
|
2798
|
+
return (h, _) => (l(), a("label", {
|
|
2793
2799
|
class: G([
|
|
2794
2800
|
"vt-checkbox",
|
|
2795
2801
|
`vt-checkbox--${h.size}`,
|
|
@@ -2839,7 +2845,7 @@ const g1 = /* @__PURE__ */ $(O2, [["render", N2]]), W2 = ["disabled", "type", "d
|
|
|
2839
2845
|
viewBox: "0 0 10 9",
|
|
2840
2846
|
fill: "none",
|
|
2841
2847
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2842
|
-
},
|
|
2848
|
+
}, _[0] || (_[0] = [
|
|
2843
2849
|
o("path", {
|
|
2844
2850
|
d: "M1 5L3.58264 7.58264C3.80112 7.80112 4.16348 7.77113 4.34306 7.51971L9 1",
|
|
2845
2851
|
stroke: "currentColor",
|
|
@@ -2860,7 +2866,7 @@ const g1 = /* @__PURE__ */ $(O2, [["render", N2]]), W2 = ["disabled", "type", "d
|
|
|
2860
2866
|
viewBox: "0 0 13 6",
|
|
2861
2867
|
fill: "none",
|
|
2862
2868
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2863
|
-
},
|
|
2869
|
+
}, _[1] || (_[1] = [
|
|
2864
2870
|
o("path", {
|
|
2865
2871
|
d: "M6 3L8.25 5L12 1",
|
|
2866
2872
|
stroke: "currentColor",
|
|
@@ -2895,8 +2901,8 @@ const g1 = /* @__PURE__ */ $(O2, [["render", N2]]), W2 = ["disabled", "type", "d
|
|
|
2895
2901
|
}
|
|
2896
2902
|
])
|
|
2897
2903
|
}, [
|
|
2898
|
-
|
|
2899
|
-
|
|
2904
|
+
Ve(h.$slots, "label", {}, () => [
|
|
2905
|
+
Ve(h.$slots, "default", {}, () => [
|
|
2900
2906
|
$e(R(h.label), 1)
|
|
2901
2907
|
])
|
|
2902
2908
|
])
|
|
@@ -2963,15 +2969,15 @@ function k1(n, e, r = {}) {
|
|
|
2963
2969
|
hideOnClick: f = !0,
|
|
2964
2970
|
onVisibleChange: v,
|
|
2965
2971
|
onScroll: h
|
|
2966
|
-
} = r,
|
|
2972
|
+
} = r, _ = B(!1), g = B(!0), y = B(!1), s = B(null), N = B([]), j = B({
|
|
2967
2973
|
top: "0px",
|
|
2968
2974
|
left: "0px",
|
|
2969
2975
|
transformOrigin: "center top"
|
|
2970
|
-
}),
|
|
2976
|
+
}), S = () => {
|
|
2971
2977
|
if (!n.value) return;
|
|
2972
2978
|
const oe = E1(n.value);
|
|
2973
|
-
|
|
2974
|
-
},
|
|
2979
|
+
g.value !== oe && (g.value = oe, !oe && _.value ? (y.value = !0, _.value = !1, v == null || v(!1)) : oe && y.value && !_.value && (y.value = !1, _.value = !0, V(), v == null || v(!0)));
|
|
2980
|
+
}, V = async () => {
|
|
2975
2981
|
if (await Te(), !n.value || !e.value) return;
|
|
2976
2982
|
const oe = n.value.getBoundingClientRect(), A = e.value.getBoundingClientRect(), J = e3(oe, A, i);
|
|
2977
2983
|
j.value = {
|
|
@@ -2979,7 +2985,7 @@ function k1(n, e, r = {}) {
|
|
|
2979
2985
|
minWidth: `${oe.width}px`
|
|
2980
2986
|
};
|
|
2981
2987
|
}, T = () => {
|
|
2982
|
-
(
|
|
2988
|
+
(_.value || y.value) && (S(), _.value && V(), h == null || h());
|
|
2983
2989
|
}, U = () => {
|
|
2984
2990
|
n.value && (N.value = J2(n.value), N.value.forEach((oe) => {
|
|
2985
2991
|
oe.addEventListener("scroll", T, { passive: !0 });
|
|
@@ -2989,37 +2995,37 @@ function k1(n, e, r = {}) {
|
|
|
2989
2995
|
oe.removeEventListener("scroll", T);
|
|
2990
2996
|
}), window.removeEventListener("resize", T), N.value = [];
|
|
2991
2997
|
}, E = () => {
|
|
2992
|
-
p ||
|
|
2998
|
+
p || _.value || !n.value || !E1(n.value) || (s.value = window.setTimeout(
|
|
2993
2999
|
async () => {
|
|
2994
|
-
|
|
3000
|
+
_.value = !0, g.value = !0, y.value = !1, await V(), U(), v == null || v(!0);
|
|
2995
3001
|
},
|
|
2996
3002
|
t === "hover" ? c : 0
|
|
2997
3003
|
));
|
|
2998
3004
|
}, D = () => {
|
|
2999
|
-
|
|
3005
|
+
_.value && (s.value = window.setTimeout(
|
|
3000
3006
|
() => {
|
|
3001
|
-
|
|
3007
|
+
_.value = !1, y.value = !1, q(), v == null || v(!1);
|
|
3002
3008
|
},
|
|
3003
3009
|
t === "hover" ? d : 0
|
|
3004
3010
|
));
|
|
3005
3011
|
}, Q = () => {
|
|
3006
|
-
p || (
|
|
3012
|
+
p || (_.value ? D() : E());
|
|
3007
3013
|
};
|
|
3008
3014
|
return n1(() => {
|
|
3009
3015
|
q();
|
|
3010
3016
|
}), {
|
|
3011
3017
|
// State
|
|
3012
|
-
visible:
|
|
3013
|
-
parentVisible:
|
|
3018
|
+
visible: _,
|
|
3019
|
+
parentVisible: g,
|
|
3014
3020
|
wasVisibleBeforeHiding: y,
|
|
3015
3021
|
dropdownPosition: j,
|
|
3016
3022
|
// Methods
|
|
3017
3023
|
show: E,
|
|
3018
3024
|
hide: D,
|
|
3019
3025
|
toggle: Q,
|
|
3020
|
-
updatePosition:
|
|
3026
|
+
updatePosition: V,
|
|
3021
3027
|
// Internal methods
|
|
3022
|
-
checkParentVisibility:
|
|
3028
|
+
checkParentVisibility: S,
|
|
3023
3029
|
addScrollListeners: U,
|
|
3024
3030
|
removeScrollListeners: q
|
|
3025
3031
|
};
|
|
@@ -3148,7 +3154,7 @@ const u3 = ["for"], c3 = {
|
|
|
3148
3154
|
},
|
|
3149
3155
|
emits: ["update:modelValue", "input", "change", "focus", "blur", "clear", "validation", "keydown", "keyup", "keypress", "click"],
|
|
3150
3156
|
setup(n, { expose: e, emit: r }) {
|
|
3151
|
-
const t = n, i = r, c = B(), d = B(), p = B(!1), f = B(!1), v = B(), h = B([]),
|
|
3157
|
+
const t = n, i = r, c = B(), d = B(), p = B(!1), f = B(!1), v = B(), h = B([]), _ = B(!0), g = B(!1), y = {
|
|
3152
3158
|
email: (k) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(k),
|
|
3153
3159
|
url: (k) => {
|
|
3154
3160
|
try {
|
|
@@ -3174,7 +3180,7 @@ const u3 = ["for"], c3 = {
|
|
|
3174
3180
|
}, s = (k) => {
|
|
3175
3181
|
const Y = [], W = String(k || "");
|
|
3176
3182
|
if (t.required && !y.required(k) && Y.push(t.requiredMessage || "Це поле є обов'язковим"), !W && !t.required) {
|
|
3177
|
-
h.value = Y,
|
|
3183
|
+
h.value = Y, _.value = Y.length === 0;
|
|
3178
3184
|
return;
|
|
3179
3185
|
}
|
|
3180
3186
|
switch (t.type) {
|
|
@@ -3188,8 +3194,8 @@ const u3 = ["for"], c3 = {
|
|
|
3188
3194
|
W && !y.number(W) && Y.push(t.numberMessage || "Введіть коректне число");
|
|
3189
3195
|
break;
|
|
3190
3196
|
}
|
|
3191
|
-
t.minlength && W && !y.minlength(W, t.minlength) && Y.push(t.minlengthMessage || `Мінімальна довжина: ${t.minlength} символів`), t.maxlength && W && !y.maxlength(W, t.maxlength) && Y.push(t.maxlengthMessage || `Максимальна довжина: ${t.maxlength} символів`), t.type === "number" && W && y.number(W) && (t.min !== void 0 && !y.min(W, t.min) && Y.push(t.minMessage || `Мінімальне значення: ${t.min}`), t.max !== void 0 && !y.max(W, t.max) && Y.push(t.maxMessage || `Максимальне значення: ${t.max}`)), t.pattern && W && !y.pattern(W, t.pattern) && Y.push(t.patternMessage || "Значення не відповідає вимогам формату"), t.customValidator && !y.custom(k, t.customValidator) && Y.push(t.customValidatorMessage || "Значення не проходить валідацію"), h.value = Y,
|
|
3192
|
-
}, N =
|
|
3197
|
+
t.minlength && W && !y.minlength(W, t.minlength) && Y.push(t.minlengthMessage || `Мінімальна довжина: ${t.minlength} символів`), t.maxlength && W && !y.maxlength(W, t.maxlength) && Y.push(t.maxlengthMessage || `Максимальна довжина: ${t.maxlength} символів`), t.type === "number" && W && y.number(W) && (t.min !== void 0 && !y.min(W, t.min) && Y.push(t.minMessage || `Мінімальне значення: ${t.min}`), t.max !== void 0 && !y.max(W, t.max) && Y.push(t.maxMessage || `Максимальне значення: ${t.max}`)), t.pattern && W && !y.pattern(W, t.pattern) && Y.push(t.patternMessage || "Значення не відповідає вимогам формату"), t.customValidator && !y.custom(k, t.customValidator) && Y.push(t.customValidatorMessage || "Значення не проходить валідацію"), h.value = Y, _.value = Y.length === 0, i("validation", { isValid: _.value, errors: Y });
|
|
3198
|
+
}, N = x(() => t.type === "textarea"), j = x(() => {
|
|
3193
3199
|
if (t.type === "password") return null;
|
|
3194
3200
|
switch (t.type) {
|
|
3195
3201
|
case "email":
|
|
@@ -3199,7 +3205,7 @@ const u3 = ["for"], c3 = {
|
|
|
3199
3205
|
default:
|
|
3200
3206
|
return null;
|
|
3201
3207
|
}
|
|
3202
|
-
}),
|
|
3208
|
+
}), S = x(() => {
|
|
3203
3209
|
if (t.prefixIcon || j.value) return null;
|
|
3204
3210
|
if (t.errorMessage) return "alertCircle";
|
|
3205
3211
|
switch (t.status) {
|
|
@@ -3210,13 +3216,13 @@ const u3 = ["for"], c3 = {
|
|
|
3210
3216
|
case "success":
|
|
3211
3217
|
return "checkCircle";
|
|
3212
3218
|
default:
|
|
3213
|
-
return
|
|
3219
|
+
return _.value ? null : "alertCircle";
|
|
3214
3220
|
}
|
|
3215
|
-
}),
|
|
3216
|
-
const k = "vt-input__icon", Y = t.status !== "default" ? t.status :
|
|
3221
|
+
}), V = x(() => !!t.prefixIcon || !!j.value || !!S.value), T = x(() => t.prefixIcon || j.value || S.value), U = x(() => {
|
|
3222
|
+
const k = "vt-input__icon", Y = t.status !== "default" ? t.status : _.value ? "default" : "error";
|
|
3217
3223
|
if (t.prefixIcon)
|
|
3218
3224
|
return k;
|
|
3219
|
-
if (
|
|
3225
|
+
if (S.value)
|
|
3220
3226
|
switch (Y) {
|
|
3221
3227
|
case "error":
|
|
3222
3228
|
return `${k} vt-input__icon--error`;
|
|
@@ -3228,9 +3234,9 @@ const u3 = ["for"], c3 = {
|
|
|
3228
3234
|
return k;
|
|
3229
3235
|
}
|
|
3230
3236
|
return k;
|
|
3231
|
-
}), q =
|
|
3237
|
+
}), q = x(() => ["email", "url", "password"].includes(t.type) && t.suffixIcon ? t.clearable || t.showPassword : !!t.suffixIcon || t.clearable || t.showPassword), E = x(() => ["email", "url", "password"].includes(t.type) ? null : t.suffixIcon), D = x(
|
|
3232
3238
|
() => t.clearable && !t.disabled && t.modelValue && String(t.modelValue).length > 0
|
|
3233
|
-
), Q =
|
|
3239
|
+
), Q = x(() => t.status !== "default" ? t.status : t.errorMessage || !_.value ? "error" : "default"), oe = x(() => [
|
|
3234
3240
|
"vt-input",
|
|
3235
3241
|
t.size ? `vt-input--${t.size}` : "vt-input--medium",
|
|
3236
3242
|
`vt-input--${Q.value}`,
|
|
@@ -3238,17 +3244,17 @@ const u3 = ["for"], c3 = {
|
|
|
3238
3244
|
"vt-input--disabled": t.disabled,
|
|
3239
3245
|
"vt-input--focused": p.value,
|
|
3240
3246
|
"vt-input--textarea": N.value,
|
|
3241
|
-
"vt-input--has-prefix":
|
|
3247
|
+
"vt-input--has-prefix": V.value,
|
|
3242
3248
|
"vt-input--has-suffix": q.value,
|
|
3243
|
-
"vt-input--invalid": !
|
|
3249
|
+
"vt-input--invalid": !_.value
|
|
3244
3250
|
}
|
|
3245
|
-
]), A =
|
|
3251
|
+
]), A = x(() => t.type === "password" ? f.value ? "text" : "password" : t.type === "textarea" ? "text" : t.type), J = x(() => t.errorMessage ? t.errorMessage : h.value.length > 0 ? h.value[0] : ""), he = x(() => t.autosize && typeof t.autosize == "object" && t.autosize.maxRows ? "none" : t.resize), Ce = (k) => {
|
|
3246
3252
|
let W = k.target.value;
|
|
3247
3253
|
if (t.type === "number" && W !== "") {
|
|
3248
3254
|
const ye = Number(W);
|
|
3249
3255
|
isNaN(ye) || (W = ye);
|
|
3250
3256
|
}
|
|
3251
|
-
i("update:modelValue", W), i("input", k), t.validateOnInput && s(W), N.value && t.autosize && !
|
|
3257
|
+
i("update:modelValue", W), i("input", k), t.validateOnInput && s(W), N.value && t.autosize && !g.value && Te(() => se());
|
|
3252
3258
|
}, I = (k) => {
|
|
3253
3259
|
if (i("change", k), !t.validateOnInput) {
|
|
3254
3260
|
const Y = k.target;
|
|
@@ -3263,14 +3269,14 @@ const u3 = ["for"], c3 = {
|
|
|
3263
3269
|
}
|
|
3264
3270
|
}, re = () => {
|
|
3265
3271
|
var k;
|
|
3266
|
-
i("update:modelValue", ""), i("clear"), (k = c.value) == null || k.focus(), h.value = [],
|
|
3272
|
+
i("update:modelValue", ""), i("clear"), (k = c.value) == null || k.focus(), h.value = [], _.value = !0, i("validation", { isValid: !0, errors: [] });
|
|
3267
3273
|
}, ue = () => {
|
|
3268
3274
|
f.value = !f.value, Te(() => {
|
|
3269
3275
|
var k;
|
|
3270
3276
|
(k = c.value) == null || k.focus();
|
|
3271
3277
|
});
|
|
3272
3278
|
}, se = () => {
|
|
3273
|
-
if (!d.value || !t.autosize ||
|
|
3279
|
+
if (!d.value || !t.autosize || g.value) return;
|
|
3274
3280
|
const k = d.value, Y = k.style.height;
|
|
3275
3281
|
k.style.height = "auto";
|
|
3276
3282
|
let W = k.scrollHeight;
|
|
@@ -3284,9 +3290,9 @@ const u3 = ["for"], c3 = {
|
|
|
3284
3290
|
if (!d.value || !(he.value !== "none")) return;
|
|
3285
3291
|
const ye = d.value.getBoundingClientRect();
|
|
3286
3292
|
if (k.clientX > ye.right - 20 && k.clientY > ye.bottom - 20) {
|
|
3287
|
-
|
|
3293
|
+
g.value = !0;
|
|
3288
3294
|
const Ae = () => {
|
|
3289
|
-
|
|
3295
|
+
g.value = !1, document.removeEventListener("mouseup", Ae);
|
|
3290
3296
|
};
|
|
3291
3297
|
document.addEventListener("mouseup", Ae);
|
|
3292
3298
|
}
|
|
@@ -3307,19 +3313,19 @@ const u3 = ["for"], c3 = {
|
|
|
3307
3313
|
clear: () => {
|
|
3308
3314
|
re();
|
|
3309
3315
|
},
|
|
3310
|
-
validate: () => (s(t.modelValue || ""),
|
|
3316
|
+
validate: () => (s(t.modelValue || ""), _.value),
|
|
3311
3317
|
clearValidation: () => {
|
|
3312
|
-
h.value = [],
|
|
3318
|
+
h.value = [], _.value = !0, i("validation", { isValid: !0, errors: [] });
|
|
3313
3319
|
},
|
|
3314
3320
|
getInputElement: () => c.value || null,
|
|
3315
3321
|
getValidationState: () => ({
|
|
3316
|
-
isValid:
|
|
3322
|
+
isValid: _.value,
|
|
3317
3323
|
errors: [...h.value]
|
|
3318
3324
|
})
|
|
3319
3325
|
}), Me(
|
|
3320
3326
|
() => t.modelValue,
|
|
3321
3327
|
(k) => {
|
|
3322
|
-
N.value && t.autosize && !
|
|
3328
|
+
N.value && t.autosize && !g.value && Te(se), t.validateOnInput && s(k || "");
|
|
3323
3329
|
}
|
|
3324
3330
|
), Me(
|
|
3325
3331
|
() => [t.required, t.minlength, t.maxlength, t.min, t.max, t.pattern],
|
|
@@ -3344,7 +3350,7 @@ const u3 = ["for"], c3 = {
|
|
|
3344
3350
|
k.required ? (l(), a("span", c3, "*")) : Z("", !0)
|
|
3345
3351
|
], 8, u3)) : Z("", !0),
|
|
3346
3352
|
o("div", d3, [
|
|
3347
|
-
|
|
3353
|
+
V.value ? (l(), a("div", h3, [
|
|
3348
3354
|
ne(fe, {
|
|
3349
3355
|
name: T.value,
|
|
3350
3356
|
class: G(U.value)
|
|
@@ -3366,7 +3372,7 @@ const u3 = ["for"], c3 = {
|
|
|
3366
3372
|
id: k.id,
|
|
3367
3373
|
tabindex: k.tabindex,
|
|
3368
3374
|
autocomplete: k.autocomplete,
|
|
3369
|
-
style:
|
|
3375
|
+
style: Be({ resize: he.value, height: v.value }),
|
|
3370
3376
|
class: "vt-input__field vt-input__textarea",
|
|
3371
3377
|
onInput: Ce,
|
|
3372
3378
|
onChange: I,
|
|
@@ -3458,10 +3464,10 @@ const u3 = ["for"], c3 = {
|
|
|
3458
3464
|
}, M3 = { class: "vt-select__tag-text" }, x3 = {
|
|
3459
3465
|
key: 1,
|
|
3460
3466
|
class: "vt-select__display-text"
|
|
3461
|
-
}, L3 = { key: 1 },
|
|
3467
|
+
}, L3 = { key: 1 }, S3 = {
|
|
3462
3468
|
key: 2,
|
|
3463
3469
|
class: "vt-select__placeholder"
|
|
3464
|
-
},
|
|
3470
|
+
}, V3 = { class: "vt-select__suffix" }, D3 = ["disabled"], H3 = {
|
|
3465
3471
|
key: 0,
|
|
3466
3472
|
class: "vt-select__help"
|
|
3467
3473
|
}, T3 = {
|
|
@@ -3515,16 +3521,16 @@ const u3 = ["for"], c3 = {
|
|
|
3515
3521
|
},
|
|
3516
3522
|
emits: ["update:modelValue", "change", "clear", "focus", "blur", "visible-change", "validation", "scrolled", "remove-tag", "filter", "filter-clear"],
|
|
3517
3523
|
setup(n, { expose: e, emit: r }) {
|
|
3518
|
-
const t = n, i = r, c = B(), d = B(), p = B(), f = B(), v = B([]), h = B(),
|
|
3524
|
+
const t = n, i = r, c = B(), d = B(), p = B(), f = B(), v = B([]), h = B(), _ = B(), g = {
|
|
3519
3525
|
isFocused: B(!1),
|
|
3520
3526
|
validationErrors: B([]),
|
|
3521
3527
|
isValid: B(!0),
|
|
3522
3528
|
visibleCount: B(0),
|
|
3523
3529
|
filterQuery: B("")
|
|
3524
|
-
}, y = B(/* @__PURE__ */ new Map()), s = B(/* @__PURE__ */ new Set()), N = B(/* @__PURE__ */ new Map()), j = (u) => t.valueKey && typeof u == "object" && u !== null ? String(u[t.valueKey]) : typeof u == "object" ? JSON.stringify(u) : String(u),
|
|
3530
|
+
}, y = B(/* @__PURE__ */ new Map()), s = B(/* @__PURE__ */ new Set()), N = B(/* @__PURE__ */ new Map()), j = (u) => t.valueKey && typeof u == "object" && u !== null ? String(u[t.valueKey]) : typeof u == "object" ? JSON.stringify(u) : String(u), S = (u, C) => {
|
|
3525
3531
|
const ee = j(u.value);
|
|
3526
3532
|
y.value.set(ee, u), s.value.add(ee), C && N.value.set(u.value, C);
|
|
3527
|
-
},
|
|
3533
|
+
}, V = (u) => {
|
|
3528
3534
|
const C = j(u);
|
|
3529
3535
|
s.value.delete(C), N.value.delete(u);
|
|
3530
3536
|
}, T = (u) => {
|
|
@@ -3543,12 +3549,12 @@ const u3 = ["for"], c3 = {
|
|
|
3543
3549
|
return !0;
|
|
3544
3550
|
}
|
|
3545
3551
|
return !1;
|
|
3546
|
-
}, E =
|
|
3552
|
+
}, E = x(() => {
|
|
3547
3553
|
const u = [];
|
|
3548
3554
|
for (const [C, ee] of y.value.entries())
|
|
3549
3555
|
s.value.has(C) && u.push(ee);
|
|
3550
3556
|
return u;
|
|
3551
|
-
}), D =
|
|
3557
|
+
}), D = x(() => !t.filterable || !g.filterQuery.value.trim() || t.allowRemoteFilter ? E.value : E.value.filter((u) => q(u, g.filterQuery.value))), Q = B(0), oe = (u) => {
|
|
3552
3558
|
const C = u.target;
|
|
3553
3559
|
if (!C) return;
|
|
3554
3560
|
const ee = C.scrollTop, z = C.scrollHeight, le = C.clientHeight, Le = ee + le >= z - 50, Re = Date.now(), qe = !t.loading && D.value.length > 0 && Re - Q.value > j1;
|
|
@@ -3579,10 +3585,10 @@ const u3 = ["for"], c3 = {
|
|
|
3579
3585
|
hideOnClick: !1,
|
|
3580
3586
|
onVisibleChange: (u) => {
|
|
3581
3587
|
u ? Te(async () => {
|
|
3582
|
-
await re(), t.filterable &&
|
|
3588
|
+
await re(), t.filterable && _.value && _.value.focus(), setTimeout(() => {
|
|
3583
3589
|
A();
|
|
3584
3590
|
}, 100);
|
|
3585
|
-
}) : (
|
|
3591
|
+
}) : (g.filterQuery.value && ae(), t.validateOnBlur && ue.validate()), i("visible-change", u);
|
|
3586
3592
|
}
|
|
3587
3593
|
}), ue = {
|
|
3588
3594
|
validate() {
|
|
@@ -3592,32 +3598,32 @@ const u3 = ["for"], c3 = {
|
|
|
3592
3598
|
t.required || !1,
|
|
3593
3599
|
t.requiredMessage
|
|
3594
3600
|
);
|
|
3595
|
-
|
|
3601
|
+
g.validationErrors.value = u.errors, g.isValid.value = u.isValid, i("validation", { isValid: g.isValid.value, errors: u.errors });
|
|
3596
3602
|
},
|
|
3597
3603
|
clear() {
|
|
3598
|
-
|
|
3604
|
+
g.validationErrors.value = [], g.isValid.value = !0, i("validation", { isValid: !0, errors: [] });
|
|
3599
3605
|
}
|
|
3600
|
-
}, se =
|
|
3606
|
+
}, se = x(() => t.multiple), ce = x(() => E.value.length ? n3(t.modelValue, E.value, se.value, t.valueKey) : []), Ee = x(() => !t.multiple || ce.value.length === 0 ? [] : t.collapsedTags ? ce.value.slice(0, g.visibleCount.value) : ce.value), Oe = x(() => {
|
|
3601
3607
|
if (se.value) return "";
|
|
3602
3608
|
const u = ce.value[0];
|
|
3603
3609
|
return u ? u.label : t.modelValue && typeof t.modelValue == "object" ? t.modelValue.label ? t.modelValue.label : t.modelValue.name ? t.modelValue.name : JSON.stringify(t.modelValue) : t.modelValue !== void 0 && t.modelValue !== null && t.modelValue !== "" && !Array.isArray(t.modelValue) ? String(t.modelValue) : "";
|
|
3604
|
-
}), Ye =
|
|
3610
|
+
}), Ye = x(() => !t.clearable || t.disabled ? !1 : se.value ? ce.value.length > 0 : t.modelValue !== void 0 && t.modelValue !== null && t.modelValue !== "" && (!Array.isArray(t.modelValue) || t.modelValue.length > 0)), De = x(() => t.status !== "default" ? t.status : t.errorMessage || !g.isValid.value ? "error" : "default"), be = x(() => [
|
|
3605
3611
|
"vt-select",
|
|
3606
3612
|
`vt-select--${De.value}`,
|
|
3607
3613
|
{
|
|
3608
3614
|
"vt-select--disabled": t.disabled,
|
|
3609
|
-
"vt-select--focused":
|
|
3615
|
+
"vt-select--focused": g.isFocused.value,
|
|
3610
3616
|
"vt-select--multiple": se.value,
|
|
3611
3617
|
"vt-select--open": J.value
|
|
3612
3618
|
}
|
|
3613
|
-
]), Fe =
|
|
3619
|
+
]), Fe = x(() => t.errorMessage ? t.errorMessage : ""), Ne = x(() => ({
|
|
3614
3620
|
...Ce.value,
|
|
3615
3621
|
position: "absolute",
|
|
3616
3622
|
zIndex: 2e3,
|
|
3617
3623
|
maxHeight: `${t.maxHeight}px`
|
|
3618
|
-
})), We =
|
|
3624
|
+
})), We = x(() => ce.value.length - g.visibleCount.value), k = x(() => t.collapsedTags && t.multiple && ce.value.length > 0 && g.visibleCount.value < ce.value.length), Y = x(() => {
|
|
3619
3625
|
if (!k.value) return "";
|
|
3620
|
-
const u = ce.value.slice(
|
|
3626
|
+
const u = ce.value.slice(g.visibleCount.value);
|
|
3621
3627
|
return a3(We.value, u);
|
|
3622
3628
|
}), W = (u) => {
|
|
3623
3629
|
var ee, z;
|
|
@@ -3640,38 +3646,38 @@ const u3 = ["for"], c3 = {
|
|
|
3640
3646
|
}, Qe = () => {
|
|
3641
3647
|
t.disabled || K();
|
|
3642
3648
|
}, e1 = () => {
|
|
3643
|
-
|
|
3649
|
+
g.isFocused.value = !0, i("focus");
|
|
3644
3650
|
}, F = (u) => {
|
|
3645
3651
|
var C;
|
|
3646
|
-
u != null && u.relatedTarget && ((C = p.value) != null && C.contains(u.relatedTarget)) || (
|
|
3652
|
+
u != null && u.relatedTarget && ((C = p.value) != null && C.contains(u.relatedTarget)) || (g.isFocused.value = !1, i("blur"), setTimeout(() => {
|
|
3647
3653
|
var ee;
|
|
3648
3654
|
(ee = p.value) != null && ee.contains(document.activeElement) || P();
|
|
3649
3655
|
}, 100));
|
|
3650
3656
|
}, X = (u) => {
|
|
3651
3657
|
const C = u.target.value;
|
|
3652
|
-
|
|
3658
|
+
g.filterQuery.value = C, i("filter", C), t.allowRemoteFilter && console.log("Remote filter query:", C);
|
|
3653
3659
|
}, ae = () => {
|
|
3654
|
-
|
|
3660
|
+
g.filterQuery.value = "", i("filter", ""), i("filter-clear");
|
|
3655
3661
|
}, _e = (u) => {
|
|
3656
3662
|
u.key === "Enter" || u.key === " " ? (u.preventDefault(), Qe()) : u.key === "Escape" && J.value && (u.preventDefault(), P());
|
|
3657
3663
|
}, me = (u) => t3(u, t.modelValue, se.value, t.valueKey), ve = () => {
|
|
3658
3664
|
if (!t.collapsedTags || !f.value || ce.value.length === 0) {
|
|
3659
|
-
|
|
3665
|
+
g.visibleCount.value = ce.value.length;
|
|
3660
3666
|
return;
|
|
3661
3667
|
}
|
|
3662
3668
|
Te(() => {
|
|
3663
3669
|
if (!f.value) return;
|
|
3664
3670
|
const u = i3(f.value, v.value, ce.value.length);
|
|
3665
|
-
|
|
3671
|
+
g.visibleCount.value = u;
|
|
3666
3672
|
});
|
|
3667
3673
|
}, M = {
|
|
3668
|
-
selectValue:
|
|
3674
|
+
selectValue: x(() => t.modelValue || (se.value ? [] : void 0)).value,
|
|
3669
3675
|
multiple: se.value,
|
|
3670
3676
|
valueKey: t.valueKey,
|
|
3671
3677
|
handleOptionClick: ye,
|
|
3672
3678
|
isOptionSelected: me,
|
|
3673
|
-
registerOption:
|
|
3674
|
-
unregisterOption:
|
|
3679
|
+
registerOption: S,
|
|
3680
|
+
unregisterOption: V
|
|
3675
3681
|
};
|
|
3676
3682
|
return p1(tt, M), e({
|
|
3677
3683
|
...{
|
|
@@ -3685,7 +3691,7 @@ const u3 = ["for"], c3 = {
|
|
|
3685
3691
|
Ae();
|
|
3686
3692
|
},
|
|
3687
3693
|
validate() {
|
|
3688
|
-
return ue.validate(),
|
|
3694
|
+
return ue.validate(), g.isValid.value;
|
|
3689
3695
|
},
|
|
3690
3696
|
clearValidation() {
|
|
3691
3697
|
ue.clear();
|
|
@@ -3695,18 +3701,18 @@ const u3 = ["for"], c3 = {
|
|
|
3695
3701
|
},
|
|
3696
3702
|
getValidationState() {
|
|
3697
3703
|
return {
|
|
3698
|
-
isValid:
|
|
3699
|
-
errors: [...
|
|
3704
|
+
isValid: g.isValid.value,
|
|
3705
|
+
errors: [...g.validationErrors.value]
|
|
3700
3706
|
};
|
|
3701
3707
|
},
|
|
3702
3708
|
setFilter(u) {
|
|
3703
|
-
|
|
3709
|
+
g.filterQuery.value = u, i("filter", u);
|
|
3704
3710
|
},
|
|
3705
3711
|
clearFilter() {
|
|
3706
3712
|
ae();
|
|
3707
3713
|
},
|
|
3708
3714
|
getFilterQuery() {
|
|
3709
|
-
return
|
|
3715
|
+
return g.filterQuery.value;
|
|
3710
3716
|
},
|
|
3711
3717
|
// Методи для роботи зі скролом
|
|
3712
3718
|
checkInitialScroll() {
|
|
@@ -3726,8 +3732,8 @@ const u3 = ["for"], c3 = {
|
|
|
3726
3732
|
};
|
|
3727
3733
|
}
|
|
3728
3734
|
},
|
|
3729
|
-
registerOption:
|
|
3730
|
-
unregisterOption:
|
|
3735
|
+
registerOption: S,
|
|
3736
|
+
unregisterOption: V
|
|
3731
3737
|
}), Me(
|
|
3732
3738
|
() => t.modelValue,
|
|
3733
3739
|
() => {
|
|
@@ -3794,7 +3800,7 @@ const u3 = ["for"], c3 = {
|
|
|
3794
3800
|
ref: f,
|
|
3795
3801
|
class: "vt-select__tags"
|
|
3796
3802
|
}, [
|
|
3797
|
-
(l(!0), a(ie, null, pe(
|
|
3803
|
+
(l(!0), a(ie, null, pe(Ee.value, (z, le) => (l(), a("div", {
|
|
3798
3804
|
key: `tag-${typeof z.value == "object" ? JSON.stringify(z.value) : z.value}-${le}`,
|
|
3799
3805
|
ref_for: !0,
|
|
3800
3806
|
ref: (ke) => ke && (v.value[le] = ke),
|
|
@@ -3805,7 +3811,7 @@ const u3 = ["for"], c3 = {
|
|
|
3805
3811
|
key: 0,
|
|
3806
3812
|
class: "vt-select__tag-close",
|
|
3807
3813
|
name: "close",
|
|
3808
|
-
onClick:
|
|
3814
|
+
onClick: Se((ke) => Ze(z.value), ["stop"])
|
|
3809
3815
|
}, null, 8, ["onClick"]))
|
|
3810
3816
|
]))), 128)),
|
|
3811
3817
|
k.value ? i1((l(), a("div", $3, [
|
|
@@ -3814,13 +3820,13 @@ const u3 = ["for"], c3 = {
|
|
|
3814
3820
|
[ee, Y.value]
|
|
3815
3821
|
]) : Z("", !0)
|
|
3816
3822
|
], 512)) : !u.multiple && Oe.value ? (l(), a("span", x3, [
|
|
3817
|
-
u.$slots.selected && ce.value[0] ?
|
|
3823
|
+
u.$slots.selected && ce.value[0] ? Ve(u.$slots, "selected", {
|
|
3818
3824
|
key: 0,
|
|
3819
3825
|
option: ce.value[0]
|
|
3820
3826
|
}) : (l(), a("span", L3, R(Oe.value), 1))
|
|
3821
|
-
])) : (l(), a("span",
|
|
3827
|
+
])) : (l(), a("span", S3, R(u.placeholder), 1))
|
|
3822
3828
|
]),
|
|
3823
|
-
o("div",
|
|
3829
|
+
o("div", V3, [
|
|
3824
3830
|
u.loading ? (l(), ge(g1, {
|
|
3825
3831
|
key: 0,
|
|
3826
3832
|
class: "vt-select__loading"
|
|
@@ -3829,7 +3835,7 @@ const u3 = ["for"], c3 = {
|
|
|
3829
3835
|
disabled: t.disabled,
|
|
3830
3836
|
class: "vt-select__clear-btn",
|
|
3831
3837
|
type: "button",
|
|
3832
|
-
onClick:
|
|
3838
|
+
onClick: Se(Ae, ["stop"])
|
|
3833
3839
|
}, [
|
|
3834
3840
|
ne(fe, { name: "close" })
|
|
3835
3841
|
], 8, D3)) : (l(), ge(fe, {
|
|
@@ -3841,8 +3847,8 @@ const u3 = ["for"], c3 = {
|
|
|
3841
3847
|
], 544),
|
|
3842
3848
|
ne(d1, { name: "fade" }, {
|
|
3843
3849
|
default: xe(() => [
|
|
3844
|
-
|
|
3845
|
-
(l(!0), a(ie, null, pe(
|
|
3850
|
+
g.validationErrors && g.validationErrors.value.length ? (l(), a("div", H3, [
|
|
3851
|
+
(l(!0), a(ie, null, pe(g.validationErrors.value, (z, le) => (l(), a("div", {
|
|
3846
3852
|
key: `error-${le}`,
|
|
3847
3853
|
class: "vt-select__error"
|
|
3848
3854
|
}, R(z), 1))), 128))
|
|
@@ -3851,7 +3857,7 @@ const u3 = ["for"], c3 = {
|
|
|
3851
3857
|
_: 1
|
|
3852
3858
|
}),
|
|
3853
3859
|
o("div", T3, [
|
|
3854
|
-
|
|
3860
|
+
Ve(u.$slots, "default")
|
|
3855
3861
|
]),
|
|
3856
3862
|
O(J) && O(he) ? (l(), ge(a1, {
|
|
3857
3863
|
key: 1,
|
|
@@ -3863,20 +3869,20 @@ const u3 = ["for"], c3 = {
|
|
|
3863
3869
|
ref_key: "dropdownRef",
|
|
3864
3870
|
ref: p,
|
|
3865
3871
|
"aria-multiselectable": u.multiple,
|
|
3866
|
-
style:
|
|
3872
|
+
style: Be(Ne.value),
|
|
3867
3873
|
class: "vt-select-dropdown",
|
|
3868
3874
|
role: "listbox",
|
|
3869
|
-
onClick: C[2] || (C[2] =
|
|
3875
|
+
onClick: C[2] || (C[2] = Se(() => {
|
|
3870
3876
|
}, ["stop"])),
|
|
3871
|
-
onMousedown: C[3] || (C[3] =
|
|
3877
|
+
onMousedown: C[3] || (C[3] = Se(() => {
|
|
3872
3878
|
}, ["prevent"]))
|
|
3873
3879
|
}, [
|
|
3874
3880
|
u.filterable ? (l(), a("div", B3, [
|
|
3875
3881
|
ne(nt, {
|
|
3876
3882
|
ref_key: "filterInputRef",
|
|
3877
|
-
ref:
|
|
3878
|
-
modelValue:
|
|
3879
|
-
"onUpdate:modelValue": C[0] || (C[0] = (z) =>
|
|
3883
|
+
ref: _,
|
|
3884
|
+
modelValue: g.filterQuery.value,
|
|
3885
|
+
"onUpdate:modelValue": C[0] || (C[0] = (z) => g.filterQuery.value = z),
|
|
3880
3886
|
placeholder: u.filterPlaceholder,
|
|
3881
3887
|
clearable: "",
|
|
3882
3888
|
"suffix-icon": "search",
|
|
@@ -3885,7 +3891,7 @@ const u3 = ["for"], c3 = {
|
|
|
3885
3891
|
}, null, 8, ["modelValue", "placeholder"])
|
|
3886
3892
|
])) : Z("", !0),
|
|
3887
3893
|
D.value.length === 0 ? (l(), a("div", E3, [
|
|
3888
|
-
|
|
3894
|
+
g.filterQuery.value ? (l(), a("span", A3, 'Немає результатів для "' + R(g.filterQuery.value) + '"', 1)) : (l(), a("span", j3, R(u.noDataText), 1))
|
|
3889
3895
|
])) : (l(), a("div", {
|
|
3890
3896
|
key: 2,
|
|
3891
3897
|
ref_key: "scrollContainerRef",
|
|
@@ -3906,7 +3912,7 @@ const u3 = ["for"], c3 = {
|
|
|
3906
3912
|
]),
|
|
3907
3913
|
role: "option",
|
|
3908
3914
|
onClick: (le) => ye(z),
|
|
3909
|
-
onMousedown: C[1] || (C[1] =
|
|
3915
|
+
onMousedown: C[1] || (C[1] = Se(() => {
|
|
3910
3916
|
}, ["prevent"]))
|
|
3911
3917
|
}, [
|
|
3912
3918
|
se.value ? (l(), ge(o1, {
|
|
@@ -3948,7 +3954,7 @@ const u3 = ["for"], c3 = {
|
|
|
3948
3954
|
setup(n, { emit: e }) {
|
|
3949
3955
|
const r = n, t = h1(), i = v1(tt);
|
|
3950
3956
|
i || console.warn("VOption повинен використовуватися всередині VSelect");
|
|
3951
|
-
const c =
|
|
3957
|
+
const c = x(() => ({
|
|
3952
3958
|
label: r.label,
|
|
3953
3959
|
value: r.value,
|
|
3954
3960
|
disabled: r.disabled || !1
|
|
@@ -3961,7 +3967,7 @@ const u3 = ["for"], c3 = {
|
|
|
3961
3967
|
}), Q1(() => {
|
|
3962
3968
|
i && i.unregisterOption(r.value);
|
|
3963
3969
|
}), (d, p) => (l(), a("div", Y3, [
|
|
3964
|
-
|
|
3970
|
+
Ve(d.$slots, "default")
|
|
3965
3971
|
]));
|
|
3966
3972
|
}
|
|
3967
3973
|
}), N3 = { class: "vt-pagination" }, W3 = { class: "vt-pagination__info" }, q3 = { class: "vt-pagination__rows-per-page" }, U3 = { class: "vt-pagination__navigation" }, K3 = ["disabled"], X3 = ["onClick"], Q3 = ["disabled"], G3 = /* @__PURE__ */ we({
|
|
@@ -3975,48 +3981,48 @@ const u3 = ["for"], c3 = {
|
|
|
3975
3981
|
},
|
|
3976
3982
|
emits: ["update:currentPage", "update:pageSize", "pageChange", "reloadData"],
|
|
3977
3983
|
setup(n, { emit: e }) {
|
|
3978
|
-
const r = n, t = e, i =
|
|
3984
|
+
const r = n, t = e, i = x({
|
|
3979
3985
|
get: () => r.currentPage,
|
|
3980
|
-
set: (
|
|
3981
|
-
}), c =
|
|
3986
|
+
set: (V) => t("update:currentPage", V)
|
|
3987
|
+
}), c = x({
|
|
3982
3988
|
get: () => r.pageSize,
|
|
3983
|
-
set: (
|
|
3984
|
-
}), d =
|
|
3985
|
-
const
|
|
3989
|
+
set: (V) => t("update:pageSize", V)
|
|
3990
|
+
}), d = x(() => Math.ceil(r.totalItems / c.value)), p = x(() => r.totalItems === 0 ? 0 : (i.value - 1) * c.value + 1), f = x(() => Math.min(i.value * c.value, r.totalItems)), v = x(() => i.value <= 1), h = x(() => i.value >= d.value), _ = x(() => {
|
|
3991
|
+
const V = [], T = d.value, U = i.value, q = r.maxVisiblePages;
|
|
3986
3992
|
if (T <= q)
|
|
3987
3993
|
for (let E = 1; E <= T; E++)
|
|
3988
|
-
|
|
3994
|
+
V.push(E);
|
|
3989
3995
|
else {
|
|
3990
|
-
|
|
3996
|
+
V.push(1);
|
|
3991
3997
|
const E = Math.max(2, U - Math.floor(q / 2)), D = Math.min(T - 1, U + Math.floor(q / 2));
|
|
3992
|
-
E > 2 &&
|
|
3998
|
+
E > 2 && V.push("...");
|
|
3993
3999
|
for (let Q = E; Q <= D; Q++)
|
|
3994
|
-
|
|
3995
|
-
D < T - 1 &&
|
|
4000
|
+
V.push(Q);
|
|
4001
|
+
D < T - 1 && V.push("..."), T > 1 && V.push(T);
|
|
3996
4002
|
}
|
|
3997
|
-
return
|
|
3998
|
-
}),
|
|
4003
|
+
return V;
|
|
4004
|
+
}), g = () => {
|
|
3999
4005
|
t("pageChange", {
|
|
4000
4006
|
page: i.value,
|
|
4001
4007
|
pageSize: c.value
|
|
4002
4008
|
});
|
|
4003
|
-
}, y = (
|
|
4004
|
-
typeof
|
|
4009
|
+
}, y = (V) => {
|
|
4010
|
+
typeof V == "number" && V !== i.value && (i.value = V, g());
|
|
4005
4011
|
}, s = () => {
|
|
4006
|
-
v.value || (i.value--,
|
|
4012
|
+
v.value || (i.value--, g());
|
|
4007
4013
|
}, N = () => {
|
|
4008
|
-
h.value || (i.value++,
|
|
4014
|
+
h.value || (i.value++, g());
|
|
4009
4015
|
}, j = () => {
|
|
4010
|
-
i.value = 1,
|
|
4011
|
-
},
|
|
4016
|
+
i.value = 1, g();
|
|
4017
|
+
}, S = () => {
|
|
4012
4018
|
t("reloadData", i.value);
|
|
4013
4019
|
};
|
|
4014
4020
|
return Me(
|
|
4015
4021
|
() => r.totalItems,
|
|
4016
4022
|
() => {
|
|
4017
|
-
i.value > d.value && d.value > 0 && (i.value = d.value,
|
|
4023
|
+
i.value > d.value && d.value > 0 && (i.value = d.value, g());
|
|
4018
4024
|
}
|
|
4019
|
-
), (
|
|
4025
|
+
), (V, T) => (l(), a("div", N3, [
|
|
4020
4026
|
o("div", W3, [
|
|
4021
4027
|
o("div", q3, [
|
|
4022
4028
|
T[1] || (T[1] = o("label", {
|
|
@@ -4031,7 +4037,7 @@ const u3 = ["for"], c3 = {
|
|
|
4031
4037
|
onChange: j
|
|
4032
4038
|
}, {
|
|
4033
4039
|
default: xe(() => [
|
|
4034
|
-
(l(!0), a(ie, null, pe(
|
|
4040
|
+
(l(!0), a(ie, null, pe(V.pageSizeOptions, (U) => (l(), ge(st, {
|
|
4035
4041
|
key: U,
|
|
4036
4042
|
label: U,
|
|
4037
4043
|
value: U
|
|
@@ -4045,7 +4051,7 @@ const u3 = ["for"], c3 = {
|
|
|
4045
4051
|
_: 1
|
|
4046
4052
|
}, 8, ["modelValue"])
|
|
4047
4053
|
]),
|
|
4048
|
-
o("span", null, R(p.value) + " - " + R(f.value) + " з " + R(
|
|
4054
|
+
o("span", null, R(p.value) + " - " + R(f.value) + " з " + R(V.totalItems), 1)
|
|
4049
4055
|
]),
|
|
4050
4056
|
o("div", U3, [
|
|
4051
4057
|
o("button", {
|
|
@@ -4055,7 +4061,7 @@ const u3 = ["for"], c3 = {
|
|
|
4055
4061
|
}, [
|
|
4056
4062
|
ne(fe, { name: "arrowLeft" })
|
|
4057
4063
|
], 10, K3),
|
|
4058
|
-
(l(!0), a(ie, null, pe(
|
|
4064
|
+
(l(!0), a(ie, null, pe(_.value, (U) => (l(), a("button", {
|
|
4059
4065
|
key: U,
|
|
4060
4066
|
class: G([{
|
|
4061
4067
|
"vt-pagination__nav-button--active": U === i.value
|
|
@@ -4076,7 +4082,7 @@ const u3 = ["for"], c3 = {
|
|
|
4076
4082
|
shape: "circle",
|
|
4077
4083
|
tooltip: "",
|
|
4078
4084
|
tooltipPlacement: "left",
|
|
4079
|
-
onClick:
|
|
4085
|
+
onClick: S
|
|
4080
4086
|
}, {
|
|
4081
4087
|
default: xe(() => T[2] || (T[2] = [
|
|
4082
4088
|
$e("Оновити дані ", -1)
|
|
@@ -4103,7 +4109,7 @@ const u3 = ["for"], c3 = {
|
|
|
4103
4109
|
},
|
|
4104
4110
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
4105
4111
|
setup(n, { emit: e }) {
|
|
4106
|
-
const r = n, t = e, i = () => `vt-radiobox-${Math.random().toString(36).substr(2, 9)}`, c =
|
|
4112
|
+
const r = n, t = e, i = () => `vt-radiobox-${Math.random().toString(36).substr(2, 9)}`, c = x(() => r.id || i()), d = x(() => r.modelValue !== void 0 ? r.modelValue === r.value : r.checked), p = (h) => {
|
|
4107
4113
|
if (r.disabled) return;
|
|
4108
4114
|
h.target.checked && (t("update:modelValue", r.value), t("change", r.value, h));
|
|
4109
4115
|
}, f = (h) => {
|
|
@@ -4111,7 +4117,7 @@ const u3 = ["for"], c3 = {
|
|
|
4111
4117
|
}, v = (h) => {
|
|
4112
4118
|
t("blur", h);
|
|
4113
4119
|
};
|
|
4114
|
-
return (h,
|
|
4120
|
+
return (h, _) => (l(), a("label", {
|
|
4115
4121
|
class: G([
|
|
4116
4122
|
"vt-radiobox",
|
|
4117
4123
|
`vt-radiobox--${h.size}`,
|
|
@@ -4162,8 +4168,8 @@ const u3 = ["for"], c3 = {
|
|
|
4162
4168
|
}
|
|
4163
4169
|
])
|
|
4164
4170
|
}, [
|
|
4165
|
-
|
|
4166
|
-
|
|
4171
|
+
Ve(h.$slots, "label", {}, () => [
|
|
4172
|
+
Ve(h.$slots, "default", {}, () => [
|
|
4167
4173
|
$e(R(h.label), 1)
|
|
4168
4174
|
])
|
|
4169
4175
|
])
|
|
@@ -4172,11 +4178,11 @@ const u3 = ["for"], c3 = {
|
|
|
4172
4178
|
}
|
|
4173
4179
|
});
|
|
4174
4180
|
function n5(n) {
|
|
4175
|
-
const e =
|
|
4181
|
+
const e = x(() => {
|
|
4176
4182
|
const i = n.filter((p) => p.pinnedLeft), c = n.filter((p) => p.pinnedRight), d = n.filter((p) => !p.pinnedLeft && !p.pinnedRight);
|
|
4177
4183
|
return [...i, ...d, ...c];
|
|
4178
4184
|
}), r = () => {
|
|
4179
|
-
const i = e.value.length, c = e.value.filter((h) => h.width || h.minWidth), d = c.reduce((h,
|
|
4185
|
+
const i = e.value.length, c = e.value.filter((h) => h.width || h.minWidth), d = c.reduce((h, _) => h + (_.width || _.minWidth || 0), 0), p = i - c.length;
|
|
4180
4186
|
if (p === 0) return 150;
|
|
4181
4187
|
const v = Math.max(800 - d, p * 80);
|
|
4182
4188
|
return Math.max(Math.floor(v / p), 120);
|
|
@@ -4241,12 +4247,12 @@ function s5() {
|
|
|
4241
4247
|
onMouseDown: (t, i, c, d) => {
|
|
4242
4248
|
t.preventDefault(), t.stopPropagation(), n.value.resizingCol = i, n.value.startX = t.clientX, n.value.startWidth = i.width || i.minWidth || c(i.prop);
|
|
4243
4249
|
const p = (v) => {
|
|
4244
|
-
const { resizingCol: h, startX:
|
|
4250
|
+
const { resizingCol: h, startX: _, startWidth: g } = n.value;
|
|
4245
4251
|
if (!h) return;
|
|
4246
|
-
document.querySelectorAll(`[data-resizer="${h.prop}"]`).forEach((
|
|
4247
|
-
|
|
4252
|
+
document.querySelectorAll(`[data-resizer="${h.prop}"]`).forEach((S) => {
|
|
4253
|
+
S.classList.add("vt-table__resizer--active");
|
|
4248
4254
|
});
|
|
4249
|
-
const y = v.clientX -
|
|
4255
|
+
const y = v.clientX - _, s = h.minWidth || 50, N = h.maxWidth || 1e3, j = Math.max(Math.min(g + y, N), s);
|
|
4250
4256
|
h.width = j;
|
|
4251
4257
|
}, f = () => {
|
|
4252
4258
|
const { resizingCol: v } = n.value;
|
|
@@ -4263,11 +4269,11 @@ function r5(n, e, r, t) {
|
|
|
4263
4269
|
var oe;
|
|
4264
4270
|
const i = n.selectionKey || "id", c = B([]), d = B(null), p = B(!1);
|
|
4265
4271
|
(oe = n.defaultSelection) != null && oe.length && (c.value = [...n.defaultSelection]);
|
|
4266
|
-
const f = (A) => A[i], v = (A) => p.value ? !0 : c.value.some((J) => f(J) === f(A)), h =
|
|
4272
|
+
const f = (A) => A[i], v = (A) => p.value ? !0 : c.value.some((J) => f(J) === f(A)), h = x(() => e.value.filter((A) => v(A)).length), _ = x(() => e.value.length > 0 && h.value === e.value.length), g = x(() => {
|
|
4267
4273
|
if (p.value) return !1;
|
|
4268
4274
|
const A = h.value;
|
|
4269
4275
|
return A > 0 && A < e.value.length;
|
|
4270
|
-
}), y =
|
|
4276
|
+
}), y = x(() => p.value ? !0 : _.value && !g.value), s = x(() => n.isAllSelect && p.value), N = (A, J) => {
|
|
4271
4277
|
const he = f(A), Ce = c.value.some((P) => f(P) === f(A)), I = J !== void 0 ? J : !Ce;
|
|
4272
4278
|
if (p.value && !I) {
|
|
4273
4279
|
p.value = !1, t != null && t.value && (c.value = t.value.filter((P) => f(P) !== he)), Q(A, !1);
|
|
@@ -4275,10 +4281,10 @@ function r5(n, e, r, t) {
|
|
|
4275
4281
|
}
|
|
4276
4282
|
p.value && I || (I && !Ce ? c.value.push(A) : !I && Ce && (c.value = c.value.filter((P) => f(P) !== he)), n.selectOnClickRow && J === void 0 && q(I ? A : null), Q(A, I));
|
|
4277
4283
|
}, j = () => {
|
|
4278
|
-
switch (
|
|
4284
|
+
switch (S()) {
|
|
4279
4285
|
case "none":
|
|
4280
4286
|
case "partial":
|
|
4281
|
-
|
|
4287
|
+
V();
|
|
4282
4288
|
break;
|
|
4283
4289
|
case "allVisible":
|
|
4284
4290
|
n.isAllSelect ? T() : U();
|
|
@@ -4287,7 +4293,7 @@ function r5(n, e, r, t) {
|
|
|
4287
4293
|
U();
|
|
4288
4294
|
break;
|
|
4289
4295
|
}
|
|
4290
|
-
},
|
|
4296
|
+
}, S = () => p.value ? "absoluteAll" : _.value ? "allVisible" : h.value > 0 ? "partial" : "none", V = () => {
|
|
4291
4297
|
const A = [], J = new Set(c.value.map((he) => f(he)));
|
|
4292
4298
|
c.value.forEach((he) => {
|
|
4293
4299
|
A.push(he);
|
|
@@ -4295,7 +4301,7 @@ function r5(n, e, r, t) {
|
|
|
4295
4301
|
J.has(f(he)) || A.push(he);
|
|
4296
4302
|
}), c.value = A, p.value = !1, Q();
|
|
4297
4303
|
}, T = () => {
|
|
4298
|
-
n.isAllSelect ? (p.value = !0, t != null && t.value ? c.value = [...t.value] : c.value = [...e.value], Q(void 0, void 0, !0)) :
|
|
4304
|
+
n.isAllSelect ? (p.value = !0, t != null && t.value ? c.value = [...t.value] : c.value = [...e.value], Q(void 0, void 0, !0)) : V();
|
|
4299
4305
|
}, U = () => {
|
|
4300
4306
|
c.value = [], p.value = !1, d.value = null, Q();
|
|
4301
4307
|
}, q = (A) => {
|
|
@@ -4325,7 +4331,7 @@ function r5(n, e, r, t) {
|
|
|
4325
4331
|
currentRow: d,
|
|
4326
4332
|
isRowSelected: v,
|
|
4327
4333
|
isAllSelected: y,
|
|
4328
|
-
isIndeterminate:
|
|
4334
|
+
isIndeterminate: g,
|
|
4329
4335
|
isDoubleCheck: s,
|
|
4330
4336
|
isFullSelection: p,
|
|
4331
4337
|
toggleRowSelection: N,
|
|
@@ -4383,7 +4389,7 @@ const l5 = (n, e, r = "asc") => {
|
|
|
4383
4389
|
},
|
|
4384
4390
|
emits: ["visible-change", "click", "command"],
|
|
4385
4391
|
setup(n, { expose: e, emit: r }) {
|
|
4386
|
-
const t = n, i = r, c = B(), d = B(), p = B(), f = B(!1), v = B(!1), h = B(null), { visible:
|
|
4392
|
+
const t = n, i = r, c = B(), d = B(), p = B(), f = B(!1), v = B(!1), h = B(null), { visible: _, parentVisible: g, dropdownPosition: y, show: s, hide: N, toggle: j } = k1(
|
|
4387
4393
|
d,
|
|
4388
4394
|
p,
|
|
4389
4395
|
{
|
|
@@ -4395,10 +4401,10 @@ const l5 = (n, e, r = "asc") => {
|
|
|
4395
4401
|
hideOnClick: t.hideOnClick,
|
|
4396
4402
|
onVisibleChange: (J) => i("visible-change", J)
|
|
4397
4403
|
}
|
|
4398
|
-
),
|
|
4404
|
+
), S = () => {
|
|
4399
4405
|
h.value && (clearTimeout(h.value), h.value = null);
|
|
4400
|
-
},
|
|
4401
|
-
|
|
4406
|
+
}, V = () => {
|
|
4407
|
+
S(), h.value = setTimeout(() => {
|
|
4402
4408
|
!f.value && !v.value && N();
|
|
4403
4409
|
}, t.hideTimeout);
|
|
4404
4410
|
};
|
|
@@ -4411,19 +4417,19 @@ const l5 = (n, e, r = "asc") => {
|
|
|
4411
4417
|
const U = (J) => {
|
|
4412
4418
|
t.disabled || (i("click", J), t.trigger === "click" && j());
|
|
4413
4419
|
}, q = () => {
|
|
4414
|
-
t.trigger === "hover" && (f.value = !0,
|
|
4420
|
+
t.trigger === "hover" && (f.value = !0, S(), s());
|
|
4415
4421
|
}, E = () => {
|
|
4416
|
-
t.trigger === "hover" && (f.value = !1,
|
|
4422
|
+
t.trigger === "hover" && (f.value = !1, V());
|
|
4417
4423
|
}, D = () => {
|
|
4418
|
-
t.trigger === "hover" && (v.value = !0,
|
|
4424
|
+
t.trigger === "hover" && (v.value = !0, S());
|
|
4419
4425
|
}, Q = () => {
|
|
4420
|
-
t.trigger === "hover" && (v.value = !1,
|
|
4426
|
+
t.trigger === "hover" && (v.value = !1, V());
|
|
4421
4427
|
}, oe = (J) => {
|
|
4422
4428
|
var Ce, I;
|
|
4423
|
-
if (!
|
|
4429
|
+
if (!_.value) return;
|
|
4424
4430
|
const he = J.target;
|
|
4425
4431
|
(Ce = c.value) != null && Ce.contains(he) || (I = p.value) != null && I.contains(he) || N();
|
|
4426
|
-
}, A =
|
|
4432
|
+
}, A = x(() => ({
|
|
4427
4433
|
...y.value,
|
|
4428
4434
|
position: "absolute",
|
|
4429
4435
|
zIndex: 2e3,
|
|
@@ -4432,11 +4438,11 @@ const l5 = (n, e, r = "asc") => {
|
|
|
4432
4438
|
return e({
|
|
4433
4439
|
show: s,
|
|
4434
4440
|
hide: N,
|
|
4435
|
-
visible:
|
|
4441
|
+
visible: _
|
|
4436
4442
|
}), ze(() => {
|
|
4437
4443
|
document.addEventListener("click", oe);
|
|
4438
4444
|
}), n1(() => {
|
|
4439
|
-
document.removeEventListener("click", oe),
|
|
4445
|
+
document.removeEventListener("click", oe), S();
|
|
4440
4446
|
}), (J, he) => (l(), a("div", {
|
|
4441
4447
|
ref_key: "dropdownRef",
|
|
4442
4448
|
ref: c,
|
|
@@ -4450,23 +4456,23 @@ const l5 = (n, e, r = "asc") => {
|
|
|
4450
4456
|
ref: d,
|
|
4451
4457
|
class: "vt-dropdown__trigger"
|
|
4452
4458
|
}, [
|
|
4453
|
-
|
|
4459
|
+
Ve(J.$slots, "default")
|
|
4454
4460
|
], 512),
|
|
4455
|
-
O(
|
|
4461
|
+
O(_) && O(g) ? (l(), ge(a1, {
|
|
4456
4462
|
key: 0,
|
|
4457
4463
|
to: "body"
|
|
4458
4464
|
}, [
|
|
4459
4465
|
o("div", {
|
|
4460
4466
|
ref_key: "menuRef",
|
|
4461
4467
|
ref: p,
|
|
4462
|
-
style:
|
|
4468
|
+
style: Be(A.value),
|
|
4463
4469
|
class: "vt-dropdown-menu",
|
|
4464
4470
|
onMouseenter: D,
|
|
4465
4471
|
onMouseleave: Q,
|
|
4466
|
-
onClick: he[0] || (he[0] =
|
|
4472
|
+
onClick: he[0] || (he[0] = Se(() => {
|
|
4467
4473
|
}, ["stop"]))
|
|
4468
4474
|
}, [
|
|
4469
|
-
|
|
4475
|
+
Ve(J.$slots, "dropdown")
|
|
4470
4476
|
], 36)
|
|
4471
4477
|
])) : Z("", !0)
|
|
4472
4478
|
], 544));
|
|
@@ -4497,7 +4503,7 @@ const l5 = (n, e, r = "asc") => {
|
|
|
4497
4503
|
key: 0,
|
|
4498
4504
|
class: G([d.icon, "vt-dropdown-item__icon"])
|
|
4499
4505
|
}, null, 2)) : Z("", !0),
|
|
4500
|
-
|
|
4506
|
+
Ve(d.$slots, "default")
|
|
4501
4507
|
], 2));
|
|
4502
4508
|
}
|
|
4503
4509
|
});
|
|
@@ -4620,7 +4626,7 @@ const Ge = new u5(), c5 = {
|
|
|
4620
4626
|
},
|
|
4621
4627
|
emits: ["update-columns"],
|
|
4622
4628
|
setup(n, { emit: e }) {
|
|
4623
|
-
const r = n, t = e, i = B([]), c = B(/* @__PURE__ */ new Set()), d = B(-1), p = B(-1), f = B("before"), v =
|
|
4629
|
+
const r = n, t = e, i = B([]), c = B(/* @__PURE__ */ new Set()), d = B(-1), p = B(-1), f = B("before"), v = x(() => {
|
|
4624
4630
|
const I = {};
|
|
4625
4631
|
return r.columnsSelector.forEach((P) => {
|
|
4626
4632
|
if (P.name === "removed")
|
|
@@ -4628,7 +4634,7 @@ const Ge = new u5(), c5 = {
|
|
|
4628
4634
|
const K = P.columns.map((ue) => ue.prop), re = i.value.filter((ue) => K.includes(ue.prop));
|
|
4629
4635
|
re.length === 0 ? I[P.name] = { checked: !1, indeterminate: !1 } : re.length === P.columns.length ? I[P.name] = { checked: !0, indeterminate: !1 } : I[P.name] = { checked: !1, indeterminate: !0 };
|
|
4630
4636
|
}), I;
|
|
4631
|
-
}), h =
|
|
4637
|
+
}), h = x(() => r.columnsSelector.filter((I) => I.name !== "removed")), _ = (I) => I.pinnedLeft || I.pinnedRight, g = (I) => !_(I), y = () => {
|
|
4632
4638
|
const I = i.value;
|
|
4633
4639
|
let P = -1;
|
|
4634
4640
|
for (let re = 0; re < I.length; re++)
|
|
@@ -4648,7 +4654,7 @@ const Ge = new u5(), c5 = {
|
|
|
4648
4654
|
return !(I < P.minIndex || I > P.maxIndex + 1);
|
|
4649
4655
|
}, N = (I, P) => {
|
|
4650
4656
|
const K = i.value[P];
|
|
4651
|
-
if (!
|
|
4657
|
+
if (!g(K)) {
|
|
4652
4658
|
I.preventDefault();
|
|
4653
4659
|
return;
|
|
4654
4660
|
}
|
|
@@ -4659,11 +4665,11 @@ const Ge = new u5(), c5 = {
|
|
|
4659
4665
|
const K = I.currentTarget.getBoundingClientRect(), re = I.clientY, ue = K.top + K.height / 2;
|
|
4660
4666
|
let se = P, ce = "before";
|
|
4661
4667
|
re < ue ? (se = P, ce = "before") : (se = P + 1, ce = "after"), d.value < se && se--, s(se) ? (p.value = P, f.value = ce, I.dataTransfer.dropEffect = "move") : (p.value = -1, I.dataTransfer.dropEffect = "none");
|
|
4662
|
-
},
|
|
4668
|
+
}, S = () => {
|
|
4663
4669
|
setTimeout(() => {
|
|
4664
4670
|
d.value === -1 && (p.value = -1);
|
|
4665
4671
|
}, 50);
|
|
4666
|
-
},
|
|
4672
|
+
}, V = (I, P) => {
|
|
4667
4673
|
if (I.preventDefault(), d.value === -1 || p.value === -1) {
|
|
4668
4674
|
U();
|
|
4669
4675
|
return;
|
|
@@ -4674,8 +4680,8 @@ const Ge = new u5(), c5 = {
|
|
|
4674
4680
|
U();
|
|
4675
4681
|
return;
|
|
4676
4682
|
}
|
|
4677
|
-
const ce = [...i.value], [
|
|
4678
|
-
ce.splice(se, 0,
|
|
4683
|
+
const ce = [...i.value], [Ee] = ce.splice(d.value, 1);
|
|
4684
|
+
ce.splice(se, 0, Ee), i.value = ce, U();
|
|
4679
4685
|
}, T = () => {
|
|
4680
4686
|
U();
|
|
4681
4687
|
}, U = () => {
|
|
@@ -4691,7 +4697,7 @@ const Ge = new u5(), c5 = {
|
|
|
4691
4697
|
if (P)
|
|
4692
4698
|
i.value.some((K) => K.prop === I.prop) || i.value.push({ ...I });
|
|
4693
4699
|
else {
|
|
4694
|
-
if (
|
|
4700
|
+
if (_(I))
|
|
4695
4701
|
return;
|
|
4696
4702
|
i.value = i.value.filter((K) => K.prop !== I.prop);
|
|
4697
4703
|
}
|
|
@@ -4704,14 +4710,14 @@ const Ge = new u5(), c5 = {
|
|
|
4704
4710
|
const K = [];
|
|
4705
4711
|
I.columns.forEach((re) => {
|
|
4706
4712
|
const ue = i.value.find((se) => se.prop === re.prop);
|
|
4707
|
-
ue && !
|
|
4713
|
+
ue && !_(ue) && K.push(ue);
|
|
4708
4714
|
}), i.value = i.value.filter(
|
|
4709
4715
|
(re) => !K.some((ue) => ue.prop === re.prop)
|
|
4710
4716
|
);
|
|
4711
4717
|
}
|
|
4712
4718
|
}, oe = (I) => i.value.some((P) => P.prop === I.prop), A = (I) => {
|
|
4713
4719
|
const P = i.value.find((K) => K.prop === I.prop);
|
|
4714
|
-
return !P || !
|
|
4720
|
+
return !P || !_(P);
|
|
4715
4721
|
}, J = (I) => {
|
|
4716
4722
|
c.value.has(I) ? c.value.delete(I) : c.value.add(I);
|
|
4717
4723
|
}, he = () => {
|
|
@@ -4727,26 +4733,26 @@ const Ge = new u5(), c5 = {
|
|
|
4727
4733
|
(l(!0), a(ie, null, pe(i.value, (K, re) => (l(), a("div", {
|
|
4728
4734
|
key: K.prop,
|
|
4729
4735
|
class: G(q(re)),
|
|
4730
|
-
draggable:
|
|
4736
|
+
draggable: g(K),
|
|
4731
4737
|
onDragstart: (ue) => N(ue, re),
|
|
4732
4738
|
onDragover: (ue) => j(ue, re),
|
|
4733
|
-
onDragleave:
|
|
4734
|
-
onDrop: (ue) =>
|
|
4739
|
+
onDragleave: S,
|
|
4740
|
+
onDrop: (ue) => V(ue, re),
|
|
4735
4741
|
onDragend: T
|
|
4736
4742
|
}, [
|
|
4737
4743
|
ne(fe, {
|
|
4738
|
-
name:
|
|
4739
|
-
class: G(["vt-columns-selector__panel-item-icon", { "vt-columns-selector__panel-item-icon--draggable":
|
|
4744
|
+
name: g(K) ? "columnsMove" : "freeze",
|
|
4745
|
+
class: G(["vt-columns-selector__panel-item-icon", { "vt-columns-selector__panel-item-icon--draggable": g(K) }])
|
|
4740
4746
|
}, null, 8, ["name", "class"]),
|
|
4741
4747
|
ne(o1, {
|
|
4742
4748
|
label: K.label,
|
|
4743
4749
|
checked: !0,
|
|
4744
|
-
disabled:
|
|
4750
|
+
disabled: _(K),
|
|
4745
4751
|
onChange: (ue) => D(K, ue),
|
|
4746
|
-
onClick: P[0] || (P[0] =
|
|
4752
|
+
onClick: P[0] || (P[0] = Se(() => {
|
|
4747
4753
|
}, ["stop"]))
|
|
4748
4754
|
}, null, 8, ["label", "disabled", "onChange"]),
|
|
4749
|
-
|
|
4755
|
+
_(K) ? (l(), a("span", f5, "pinned")) : Z("", !0)
|
|
4750
4756
|
], 42, v5))), 128))
|
|
4751
4757
|
]),
|
|
4752
4758
|
o("div", C5, [
|
|
@@ -4765,7 +4771,7 @@ const Ge = new u5(), c5 = {
|
|
|
4765
4771
|
checked: ((re = v.value[K.name]) == null ? void 0 : re.checked) || !1,
|
|
4766
4772
|
indeterminate: ((ue = v.value[K.name]) == null ? void 0 : ue.indeterminate) || !1,
|
|
4767
4773
|
onChange: (se) => Q(K, se),
|
|
4768
|
-
onClick: P[1] || (P[1] =
|
|
4774
|
+
onClick: P[1] || (P[1] = Se(() => {
|
|
4769
4775
|
}, ["stop"]))
|
|
4770
4776
|
}, null, 8, ["label", "checked", "indeterminate", "onChange"]),
|
|
4771
4777
|
K.icon ? (l(), ge(fe, {
|
|
@@ -4843,19 +4849,19 @@ const Ge = new u5(), c5 = {
|
|
|
4843
4849
|
columns: h
|
|
4844
4850
|
}), f = (h) => {
|
|
4845
4851
|
var N;
|
|
4846
|
-
const
|
|
4852
|
+
const _ = new Set(h.map((j) => j.prop)), g = /* @__PURE__ */ new Set();
|
|
4847
4853
|
(N = r.columnsSelector) == null || N.forEach((j) => {
|
|
4848
|
-
j.columns.forEach((
|
|
4849
|
-
}), r.allColumns.forEach((j) =>
|
|
4854
|
+
j.columns.forEach((S) => g.add(S.prop));
|
|
4855
|
+
}), r.allColumns.forEach((j) => g.add(j.prop));
|
|
4850
4856
|
const y = [];
|
|
4851
|
-
|
|
4852
|
-
var
|
|
4853
|
-
if (!
|
|
4854
|
-
let
|
|
4855
|
-
(
|
|
4857
|
+
g.forEach((j) => {
|
|
4858
|
+
var S;
|
|
4859
|
+
if (!_.has(j)) {
|
|
4860
|
+
let V;
|
|
4861
|
+
(S = r.columnsSelector) == null || S.forEach((T) => {
|
|
4856
4862
|
const U = T.columns.find((q) => q.prop === j);
|
|
4857
|
-
U && (
|
|
4858
|
-
}),
|
|
4863
|
+
U && (V = U);
|
|
4864
|
+
}), V || (V = r.allColumns.find((T) => T.prop === j)), V && y.push(V);
|
|
4859
4865
|
}
|
|
4860
4866
|
});
|
|
4861
4867
|
const s = [...r.columnsSelector || []];
|
|
@@ -4869,15 +4875,15 @@ const Ge = new u5(), c5 = {
|
|
|
4869
4875
|
props: {
|
|
4870
4876
|
columns: r.allColumns,
|
|
4871
4877
|
columnsSelector: h,
|
|
4872
|
-
"onUpdate-columns": (
|
|
4873
|
-
t("update-columns",
|
|
4878
|
+
"onUpdate-columns": (_) => {
|
|
4879
|
+
t("update-columns", _);
|
|
4874
4880
|
}
|
|
4875
4881
|
},
|
|
4876
4882
|
size: "large",
|
|
4877
4883
|
closeOnBackdropClick: !1
|
|
4878
4884
|
});
|
|
4879
4885
|
};
|
|
4880
|
-
return (h,
|
|
4886
|
+
return (h, _) => (l(), ge(lt, {
|
|
4881
4887
|
trigger: "click",
|
|
4882
4888
|
placement: "bottom-start",
|
|
4883
4889
|
onCommand: c
|
|
@@ -4895,7 +4901,7 @@ const Ge = new u5(), c5 = {
|
|
|
4895
4901
|
ne(L1, { command: "columns" }, {
|
|
4896
4902
|
default: xe(() => [
|
|
4897
4903
|
ne(fe, { name: "columnInsert" }),
|
|
4898
|
-
|
|
4904
|
+
_[0] || (_[0] = o("div", null, "Колонки", -1))
|
|
4899
4905
|
]),
|
|
4900
4906
|
_: 1,
|
|
4901
4907
|
__: [0]
|
|
@@ -4909,7 +4915,7 @@ const Ge = new u5(), c5 = {
|
|
|
4909
4915
|
_: 1
|
|
4910
4916
|
}));
|
|
4911
4917
|
}
|
|
4912
|
-
}), $5 = { class: "vt-table" }, M5 = { key: 0 }, x5 = { class: "vt-th__content" }, L5 = { class: "vt-th__content" },
|
|
4918
|
+
}), $5 = { class: "vt-table" }, M5 = { key: 0 }, x5 = { class: "vt-th__content" }, L5 = { class: "vt-th__content" }, S5 = { class: "vt-th__label" }, V5 = {
|
|
4913
4919
|
key: 0,
|
|
4914
4920
|
class: "vt-th__sortable"
|
|
4915
4921
|
}, D5 = ["data-resizer", "onMousedown"], H5 = {
|
|
@@ -4947,23 +4953,23 @@ const Ge = new u5(), c5 = {
|
|
|
4947
4953
|
}),
|
|
4948
4954
|
emits: /* @__PURE__ */ B1(["sort-change", "selection-change", "current-change", "row-click", "update:columns", "column-pin", "column-resize", "column-visibility", "column-sort", "columns-change", "infinity-scroll"], ["update:columns"]),
|
|
4949
4955
|
setup(n, { expose: e, emit: r }) {
|
|
4950
|
-
const t = n, i = r, c = mt(n, "columns"), d = B({}), p = B(), f = H1([]), v = B(t.defaultSort || null), h =
|
|
4956
|
+
const t = n, i = r, c = mt(n, "columns"), d = B({}), p = B(), f = H1([]), v = B(t.defaultSort || null), h = x(() => a5(t.data || [], v.value, f)), _ = x(() => c.value !== void 0), g = x(() => t.data && t.data.length > 0), y = B(!1), s = B(0);
|
|
4951
4957
|
let N;
|
|
4952
4958
|
const j = (F, X) => t.rowKey && F[t.rowKey] != null ? String(F[t.rowKey]) : String(X);
|
|
4953
4959
|
Me(
|
|
4954
4960
|
() => c.value,
|
|
4955
4961
|
(F) => {
|
|
4956
|
-
F &&
|
|
4962
|
+
F && _.value && (f.length = 0, f.push(...F));
|
|
4957
4963
|
},
|
|
4958
4964
|
{ deep: !0 }
|
|
4959
4965
|
), Me(
|
|
4960
4966
|
() => t.columns,
|
|
4961
4967
|
(F) => {
|
|
4962
|
-
F && !
|
|
4968
|
+
F && !_.value && (f.length = 0, f.push(...F));
|
|
4963
4969
|
},
|
|
4964
4970
|
{ deep: !0 }
|
|
4965
4971
|
), p1("vt-table-columns", f);
|
|
4966
|
-
const { sortedColumns:
|
|
4972
|
+
const { sortedColumns: S, getDefaultColumnWidth: V, getStickyOffset: T } = n5(f), { getTableWrapperStyle: U, getColumnStyle: q, getHeaderStyle: E, getFooterStyle: D } = o5(t), { onMouseDown: Q } = s5(), oe = x(() => t.allData || t.data), A = t.selectable ? r5(t, h, i, oe) : null, J = () => ({
|
|
4967
4973
|
width: `${$1}px`,
|
|
4968
4974
|
minWidth: `${$1}px`,
|
|
4969
4975
|
maxWidth: `${$1}px`,
|
|
@@ -5018,11 +5024,11 @@ const Ge = new u5(), c5 = {
|
|
|
5018
5024
|
};
|
|
5019
5025
|
se(F.prop, ae), i("column-pin", { column: { ...F, ...ae }, position: X });
|
|
5020
5026
|
}, ue = (F) => {
|
|
5021
|
-
f.splice(0, f.length, ...F),
|
|
5027
|
+
f.splice(0, f.length, ...F), _.value && (c.value = [...F]), i("columns-change", [...F]);
|
|
5022
5028
|
}, se = (F, X) => {
|
|
5023
5029
|
const ae = f.findIndex((_e) => _e.prop === F);
|
|
5024
5030
|
if (ae !== -1) {
|
|
5025
|
-
if (Object.assign(f[ae], X),
|
|
5031
|
+
if (Object.assign(f[ae], X), _.value && c.value) {
|
|
5026
5032
|
const _e = c.value.findIndex((me) => me.prop === F);
|
|
5027
5033
|
if (_e !== -1) {
|
|
5028
5034
|
const me = [...c.value];
|
|
@@ -5033,27 +5039,27 @@ const Ge = new u5(), c5 = {
|
|
|
5033
5039
|
}
|
|
5034
5040
|
}, ce = (F, X, ae) => {
|
|
5035
5041
|
i("row-click", { row: F, column: X, event: ae }), t.highlightCurrentRow && A && A.setCurrentRow(F);
|
|
5036
|
-
},
|
|
5042
|
+
}, Ee = (F, X, ae) => {
|
|
5037
5043
|
ae.stopPropagation(), A && A.toggleRowSelection(X, F);
|
|
5038
5044
|
}, Oe = (F, X) => {
|
|
5039
5045
|
X.stopPropagation(), A && A.toggleAllSelection();
|
|
5040
5046
|
}, Ye = (F, X) => {
|
|
5041
5047
|
F && (d.value[X] = F);
|
|
5042
5048
|
}, De = (F, X) => {
|
|
5043
|
-
const ae = X.width ||
|
|
5044
|
-
Q(F, X,
|
|
5049
|
+
const ae = X.width || V();
|
|
5050
|
+
Q(F, X, V, (_e) => {
|
|
5045
5051
|
se(X.prop, { width: _e }), i("column-resize", {
|
|
5046
5052
|
column: { ...X, width: _e },
|
|
5047
5053
|
width: _e,
|
|
5048
5054
|
oldWidth: ae
|
|
5049
5055
|
});
|
|
5050
5056
|
});
|
|
5051
|
-
}, be = (F, X) => q(F, X, T,
|
|
5057
|
+
}, be = (F, X) => q(F, X, T, V), Fe = (F, X) => E(F, X, T, V), Ne = (F, X) => D(F, X, T, V), We = (F, X) => {
|
|
5052
5058
|
if (!X || !X.prop) return "";
|
|
5053
5059
|
const ae = F[X.prop];
|
|
5054
5060
|
return ae == null ? "" : String(ae);
|
|
5055
|
-
}, k =
|
|
5056
|
-
if (!t.showSummary || !
|
|
5061
|
+
}, k = x(() => {
|
|
5062
|
+
if (!t.showSummary || !g.value) return {};
|
|
5057
5063
|
const F = f;
|
|
5058
5064
|
if (typeof t.summaryMethod == "function") {
|
|
5059
5065
|
const X = t.summaryMethod({ columns: F, data: h.value });
|
|
@@ -5069,7 +5075,7 @@ const Ge = new u5(), c5 = {
|
|
|
5069
5075
|
},
|
|
5070
5076
|
{}
|
|
5071
5077
|
);
|
|
5072
|
-
}), Y =
|
|
5078
|
+
}), Y = x(() => t.showSummary && g.value), W = (F, X) => {
|
|
5073
5079
|
A && A.toggleRowSelection(F, X);
|
|
5074
5080
|
}, ye = () => {
|
|
5075
5081
|
A && A.toggleAllSelection();
|
|
@@ -5104,11 +5110,11 @@ const Ge = new u5(), c5 = {
|
|
|
5104
5110
|
return l(), a("div", {
|
|
5105
5111
|
ref_key: "tableWrapperRef",
|
|
5106
5112
|
ref: p,
|
|
5107
|
-
style:
|
|
5113
|
+
style: Be(O(U)()),
|
|
5108
5114
|
class: "vt-table-wrapper",
|
|
5109
5115
|
onScroll: I
|
|
5110
5116
|
}, [
|
|
5111
|
-
|
|
5117
|
+
Ve(F.$slots, "default"),
|
|
5112
5118
|
o("table", $5, [
|
|
5113
5119
|
t.hideHeader ? Z("", !0) : (l(), a("thead", M5, [
|
|
5114
5120
|
o("tr", null, [
|
|
@@ -5118,7 +5124,7 @@ const Ge = new u5(), c5 = {
|
|
|
5118
5124
|
"vt-table__th--sticky": t.maxHeight,
|
|
5119
5125
|
"vt-table__th--pinned-left": !0
|
|
5120
5126
|
}, "vt-table__th vt-table__th--selection"]),
|
|
5121
|
-
style:
|
|
5127
|
+
style: Be(he())
|
|
5122
5128
|
}, [
|
|
5123
5129
|
o("div", x5, [
|
|
5124
5130
|
ne(o1, {
|
|
@@ -5129,7 +5135,7 @@ const Ge = new u5(), c5 = {
|
|
|
5129
5135
|
}, null, 8, ["checked", "indeterminate", "is-double"])
|
|
5130
5136
|
])
|
|
5131
5137
|
], 6)) : Z("", !0),
|
|
5132
|
-
(l(!0), a(ie, null, pe(O(
|
|
5138
|
+
(l(!0), a(ie, null, pe(O(S), (w, u) => (l(), a("th", {
|
|
5133
5139
|
key: w.prop,
|
|
5134
5140
|
ref_for: !0,
|
|
5135
5141
|
ref: (C) => Ye(C, w.prop),
|
|
@@ -5142,29 +5148,29 @@ const Ge = new u5(), c5 = {
|
|
|
5142
5148
|
"vt-table__th--sortable": w.sortable
|
|
5143
5149
|
}
|
|
5144
5150
|
]),
|
|
5145
|
-
style:
|
|
5151
|
+
style: Be(Fe(w, u))
|
|
5146
5152
|
}, [
|
|
5147
5153
|
o("div", L5, [
|
|
5148
|
-
i1((l(), a("div",
|
|
5154
|
+
i1((l(), a("div", S5, [
|
|
5149
5155
|
$e(R(w.label), 1)
|
|
5150
5156
|
])), [
|
|
5151
5157
|
[ae, w.label]
|
|
5152
5158
|
]),
|
|
5153
|
-
w.sortable ? (l(), a("div",
|
|
5159
|
+
w.sortable ? (l(), a("div", V5, [
|
|
5154
5160
|
ne(fe, {
|
|
5155
5161
|
class: G(O(R1)(w, v.value).asc),
|
|
5156
5162
|
name: "arrowTop",
|
|
5157
|
-
onClick:
|
|
5163
|
+
onClick: Se((C) => K(w, "asc"), ["stop"])
|
|
5158
5164
|
}, null, 8, ["class", "onClick"]),
|
|
5159
5165
|
ne(fe, {
|
|
5160
5166
|
class: G(O(R1)(w, v.value).desc),
|
|
5161
5167
|
name: "arrowDown",
|
|
5162
|
-
onClick:
|
|
5168
|
+
onClick: Se((C) => K(w, "desc"), ["stop"])
|
|
5163
5169
|
}, null, 8, ["class", "onClick"])
|
|
5164
5170
|
])) : Z("", !0),
|
|
5165
5171
|
w.actionColumn ? (l(), ge(y5, {
|
|
5166
5172
|
key: 1,
|
|
5167
|
-
"all-columns": O(
|
|
5173
|
+
"all-columns": O(S),
|
|
5168
5174
|
column: w,
|
|
5169
5175
|
columnsSelector: t.columnsSelector,
|
|
5170
5176
|
onPin: re,
|
|
@@ -5180,7 +5186,7 @@ const Ge = new u5(), c5 = {
|
|
|
5180
5186
|
])
|
|
5181
5187
|
])),
|
|
5182
5188
|
o("tbody", null, [
|
|
5183
|
-
|
|
5189
|
+
g.value ? (l(!0), a(ie, { key: 1 }, pe(h.value, (w, u) => {
|
|
5184
5190
|
var C, ee, z;
|
|
5185
5191
|
return l(), a("tr", {
|
|
5186
5192
|
key: j(w, u),
|
|
@@ -5193,23 +5199,23 @@ const Ge = new u5(), c5 = {
|
|
|
5193
5199
|
},
|
|
5194
5200
|
...e1(w, u)
|
|
5195
5201
|
]),
|
|
5196
|
-
onClick: (le) => ce(w, O(
|
|
5202
|
+
onClick: (le) => ce(w, O(S)[0], le)
|
|
5197
5203
|
}, [
|
|
5198
5204
|
t.selectable ? (l(), a("td", {
|
|
5199
5205
|
key: 0,
|
|
5200
5206
|
class: G([{
|
|
5201
5207
|
"vt-table__td--pinned-left": !0
|
|
5202
5208
|
}, "vt-table__td vt-table__td--selection"]),
|
|
5203
|
-
style:
|
|
5209
|
+
style: Be(J())
|
|
5204
5210
|
}, [
|
|
5205
5211
|
o("div", E5, [
|
|
5206
5212
|
ne(o1, {
|
|
5207
5213
|
checked: (z = O(A)) == null ? void 0 : z.isRowSelected(w),
|
|
5208
|
-
onChange: (le, ke) =>
|
|
5214
|
+
onChange: (le, ke) => Ee(le, w, ke)
|
|
5209
5215
|
}, null, 8, ["checked", "onChange"])
|
|
5210
5216
|
])
|
|
5211
5217
|
], 4)) : Z("", !0),
|
|
5212
|
-
(l(!0), a(ie, null, pe(O(
|
|
5218
|
+
(l(!0), a(ie, null, pe(O(S), (le, ke) => (l(), a("td", {
|
|
5213
5219
|
key: `${j(w, u)}-${le.prop}`,
|
|
5214
5220
|
ref_for: !0,
|
|
5215
5221
|
ref: (Le) => Ye(Le, le.prop),
|
|
@@ -5220,7 +5226,7 @@ const Ge = new u5(), c5 = {
|
|
|
5220
5226
|
"vt-table__td--pinned-right": le.pinnedRight
|
|
5221
5227
|
}
|
|
5222
5228
|
]),
|
|
5223
|
-
style:
|
|
5229
|
+
style: Be(be(le, ke))
|
|
5224
5230
|
}, [
|
|
5225
5231
|
i1((l(), a("div", A5, [
|
|
5226
5232
|
le.renderSlot ? (l(), ge(w1(le.renderSlot), {
|
|
@@ -5242,7 +5248,7 @@ const Ge = new u5(), c5 = {
|
|
|
5242
5248
|
], 10, B5);
|
|
5243
5249
|
}), 128)) : (l(), a("tr", H5, [
|
|
5244
5250
|
o("td", {
|
|
5245
|
-
colspan: O(
|
|
5251
|
+
colspan: O(S).length + (t.selectable ? 1 : 0),
|
|
5246
5252
|
class: "vt-table__empty-cell"
|
|
5247
5253
|
}, [
|
|
5248
5254
|
o("div", I5, [
|
|
@@ -5262,11 +5268,11 @@ const Ge = new u5(), c5 = {
|
|
|
5262
5268
|
class: G([{
|
|
5263
5269
|
"vt-table__td--pinned-left": !0
|
|
5264
5270
|
}, "vt-table__td"]),
|
|
5265
|
-
style:
|
|
5271
|
+
style: Be(Ce())
|
|
5266
5272
|
}, X[1] || (X[1] = [
|
|
5267
5273
|
o("div", { class: "vt-table__cell-content vt-table__cell-content--summary" }, null, -1)
|
|
5268
5274
|
]), 4)) : Z("", !0),
|
|
5269
|
-
(l(!0), a(ie, null, pe(O(
|
|
5275
|
+
(l(!0), a(ie, null, pe(O(S), (w, u) => (l(), a("td", {
|
|
5270
5276
|
key: w.prop,
|
|
5271
5277
|
class: G([
|
|
5272
5278
|
"vt-table__td",
|
|
@@ -5275,7 +5281,7 @@ const Ge = new u5(), c5 = {
|
|
|
5275
5281
|
"vt-table__td--pinned-right": w.pinnedRight
|
|
5276
5282
|
}
|
|
5277
5283
|
]),
|
|
5278
|
-
style:
|
|
5284
|
+
style: Be(Ne(w, u))
|
|
5279
5285
|
}, [
|
|
5280
5286
|
o("div", F5, R(k.value[w.prop]), 1)
|
|
5281
5287
|
], 6))), 128))
|
|
@@ -5458,11 +5464,11 @@ const Ge = new u5(), c5 = {
|
|
|
5458
5464
|
}, q5 = () => {
|
|
5459
5465
|
const n = (i, c) => {
|
|
5460
5466
|
if (!i || !(i instanceof Date) || isNaN(i.getTime())) return "";
|
|
5461
|
-
const d = i.getFullYear(), p = i.getMonth(), f = i.getDate(), v = i.getHours(), h = v > 12 ? v - 12 : v === 0 ? 12 : v,
|
|
5467
|
+
const d = i.getFullYear(), p = i.getMonth(), f = i.getDate(), v = i.getHours(), h = v > 12 ? v - 12 : v === 0 ? 12 : v, _ = i.getMinutes(), g = i.getSeconds(), y = i.getTime();
|
|
5462
5468
|
let s = c;
|
|
5463
5469
|
s = s.replace(/yyyy/g, String(d)), s = s.replace(/yy/g, String(d).slice(-2)), s = s.replace(/MMMM/g, O5[p]), s = s.replace(/MMM/g, it[p]), s = s.replace(/MM/g, String(p + 1).padStart(2, "0")), s = s.replace(/M/g, String(p + 1));
|
|
5464
5470
|
const N = r(i);
|
|
5465
|
-
return s = s.replace(/WW/g, String(N).padStart(2, "0")), s = s.replace(/W/g, String(N)), s = s.replace(/dd/g, String(f).padStart(2, "0")), s = s.replace(/d/g, String(f)), s = s.replace(/HH/g, String(v).padStart(2, "0")), s = s.replace(/H/g, String(v)), s = s.replace(/hh/g, String(h).padStart(2, "0")), s = s.replace(/h/g, String(h)), s = s.replace(/mm/g, String(
|
|
5471
|
+
return s = s.replace(/WW/g, String(N).padStart(2, "0")), s = s.replace(/W/g, String(N)), s = s.replace(/dd/g, String(f).padStart(2, "0")), s = s.replace(/d/g, String(f)), s = s.replace(/HH/g, String(v).padStart(2, "0")), s = s.replace(/H/g, String(v)), s = s.replace(/hh/g, String(h).padStart(2, "0")), s = s.replace(/h/g, String(h)), s = s.replace(/mm/g, String(_).padStart(2, "0")), s = s.replace(/m/g, String(_)), s = s.replace(/ss/g, String(g).padStart(2, "0")), s = s.replace(/s/g, String(g)), s = s.replace(/A/g, v >= 12 ? "PM" : "AM"), s = s.replace(/a/g, v >= 12 ? "pm" : "am"), s = s.replace(/timestamp/g, String(y)), s = s.replace(/\[([^\]]+)\]/g, "$1"), s;
|
|
5466
5472
|
}, e = (i) => {
|
|
5467
5473
|
if (!i) return null;
|
|
5468
5474
|
if (i instanceof Date)
|
|
@@ -5480,37 +5486,37 @@ const Ge = new u5(), c5 = {
|
|
|
5480
5486
|
getDefaultFormat: (i) => Y5[i] || "yyyy-MM-dd"
|
|
5481
5487
|
};
|
|
5482
5488
|
}, U5 = (n, e, r, t, i) => {
|
|
5483
|
-
const { formatDate: c, parseDate: d, getDefaultFormat: p } = q5(), f =
|
|
5489
|
+
const { formatDate: c, parseDate: d, getDefaultFormat: p } = q5(), f = x(() => ["datetimerange", "daterange", "monthrange", "yearrange"].includes(e.value)), v = x(() => r.value || p(e.value)), h = x(() => t.value || p(e.value)), _ = x(() => n.value ? f.value ? Array.isArray(n.value) && n.value.length === 2 ? [d(n.value[0]), d(n.value[1])] : [null, null] : d(n.value) : f.value ? [null, null] : null), g = x(() => {
|
|
5484
5490
|
if (f.value) {
|
|
5485
|
-
const [j,
|
|
5486
|
-
if (j &&
|
|
5487
|
-
const
|
|
5488
|
-
return [
|
|
5491
|
+
const [j, S] = _.value;
|
|
5492
|
+
if (j && S) {
|
|
5493
|
+
const V = c(j, v.value), T = c(S, v.value);
|
|
5494
|
+
return [V, T];
|
|
5489
5495
|
} else if (j)
|
|
5490
5496
|
return [c(j, v.value), ""];
|
|
5491
5497
|
return ["", ""];
|
|
5492
5498
|
} else {
|
|
5493
|
-
const j =
|
|
5499
|
+
const j = _.value;
|
|
5494
5500
|
return j ? c(j, v.value) : "";
|
|
5495
5501
|
}
|
|
5496
|
-
}), y =
|
|
5502
|
+
}), y = x(() => {
|
|
5497
5503
|
if (f.value) {
|
|
5498
|
-
const [j,
|
|
5499
|
-
return j ||
|
|
5504
|
+
const [j, S] = g.value;
|
|
5505
|
+
return j || S;
|
|
5500
5506
|
} else
|
|
5501
|
-
return !!
|
|
5507
|
+
return !!g.value;
|
|
5502
5508
|
});
|
|
5503
5509
|
return {
|
|
5504
5510
|
isRange: f,
|
|
5505
5511
|
displayFormat: v,
|
|
5506
5512
|
outputFormat: h,
|
|
5507
|
-
parsedValue:
|
|
5508
|
-
displayText:
|
|
5513
|
+
parsedValue: _,
|
|
5514
|
+
displayText: g,
|
|
5509
5515
|
hasDisplayValue: y,
|
|
5510
5516
|
formatOutput: (j) => {
|
|
5511
5517
|
if (Array.isArray(j)) {
|
|
5512
|
-
const
|
|
5513
|
-
return t.value === "timestamp" ? [
|
|
5518
|
+
const S = j[0], V = j[1] || j[0] || /* @__PURE__ */ new Date();
|
|
5519
|
+
return t.value === "timestamp" ? [S.getTime(), V.getTime()] : t.value ? [c(S, h.value), c(V, h.value)] : [S, V];
|
|
5514
5520
|
} else
|
|
5515
5521
|
return t.value === "timestamp" ? j.getTime() : t.value ? c(j, h.value) : j;
|
|
5516
5522
|
},
|
|
@@ -5519,18 +5525,18 @@ const Ge = new u5(), c5 = {
|
|
|
5519
5525
|
parseDate: d
|
|
5520
5526
|
};
|
|
5521
5527
|
}, Z1 = (n) => {
|
|
5522
|
-
const e =
|
|
5528
|
+
const e = x(() => {
|
|
5523
5529
|
const y = n.value.getFullYear(), s = n.value.getMonth(), N = new Date(y, s, 1), j = new Date(N);
|
|
5524
5530
|
j.setDate(j.getDate() - N.getDay());
|
|
5525
|
-
const
|
|
5531
|
+
const S = [], V = new Date(j);
|
|
5526
5532
|
for (let T = 0; T < 42; T++)
|
|
5527
|
-
|
|
5528
|
-
return
|
|
5529
|
-
}), r =
|
|
5533
|
+
S.push(new Date(V)), V.setDate(V.getDate() + 1);
|
|
5534
|
+
return S;
|
|
5535
|
+
}), r = x(() => it.map((y, s) => ({
|
|
5530
5536
|
name: y,
|
|
5531
5537
|
index: s,
|
|
5532
5538
|
value: new Date(n.value.getFullYear(), s, 1)
|
|
5533
|
-
}))), t =
|
|
5539
|
+
}))), t = x(() => {
|
|
5534
5540
|
const y = n.value.getFullYear(), s = Math.floor(y / 10) * 10, N = [];
|
|
5535
5541
|
for (let j = s; j < s + 10; j++)
|
|
5536
5542
|
N.push({
|
|
@@ -5538,7 +5544,7 @@ const Ge = new u5(), c5 = {
|
|
|
5538
5544
|
value: new Date(j, 0, 1)
|
|
5539
5545
|
});
|
|
5540
5546
|
return N;
|
|
5541
|
-
}), i =
|
|
5547
|
+
}), i = x(() => {
|
|
5542
5548
|
const y = n.value.getFullYear(), s = Math.floor(y / 10) * 10;
|
|
5543
5549
|
return `${s} - ${s + 9}`;
|
|
5544
5550
|
});
|
|
@@ -5573,7 +5579,7 @@ const Ge = new u5(), c5 = {
|
|
|
5573
5579
|
"24h_no_seconds": "HH:mm",
|
|
5574
5580
|
"12h": "hh:mm:ss A",
|
|
5575
5581
|
"12h_no_seconds": "hh:mm A"
|
|
5576
|
-
},
|
|
5582
|
+
}, S1 = (n) => n ? [
|
|
5577
5583
|
/^([01]?\d|2[0-3]):([0-5]\d):([0-5]\d)$/,
|
|
5578
5584
|
// HH:mm:ss (24h)
|
|
5579
5585
|
/^([01]?\d|2[0-3]):([0-5]\d)$/,
|
|
@@ -5587,12 +5593,12 @@ const Ge = new u5(), c5 = {
|
|
|
5587
5593
|
if (r && (n ? i && Array.isArray(n) && (n.length !== 2 || !n[0] || !n[1]) && t.push("Необхідно вибрати початковий та кінцевий час") : t.push("Це поле є обов'язковим")), n)
|
|
5588
5594
|
if (i && !Array.isArray(n) ? t.push("Для діапазону очікується масив з двох значень часу") : !i && Array.isArray(n) && t.push("Для одиночного вибору очікується одне значення часу"), Array.isArray(n)) {
|
|
5589
5595
|
if (n.forEach((c, d) => {
|
|
5590
|
-
c && (typeof c == "string" && !
|
|
5596
|
+
c && (typeof c == "string" && !S1(c) ? t.push(`Некоректний формат часу ${d + 1}`) : c instanceof Date && isNaN(c.getTime()) && t.push(`Некоректне значення часу ${d + 1}`));
|
|
5591
5597
|
}), n.length === 2 && n[0] && n[1]) {
|
|
5592
5598
|
const c = z1(n[0]), d = z1(n[1]);
|
|
5593
5599
|
c !== null && d !== null && c >= d && t.push("Початковий час повинен бути раніше кінцевого");
|
|
5594
5600
|
}
|
|
5595
|
-
} else n && (typeof n == "string" && !
|
|
5601
|
+
} else n && (typeof n == "string" && !S1(n) ? t.push("Некоректний формат часу") : n instanceof Date && isNaN(n.getTime()) && t.push("Некоректне значення часу"));
|
|
5596
5602
|
return {
|
|
5597
5603
|
isValid: t.length === 0,
|
|
5598
5604
|
errors: t
|
|
@@ -5677,7 +5683,7 @@ const Ge = new u5(), c5 = {
|
|
|
5677
5683
|
}, m6 = { class: "vt-timepicker__options" }, _6 = ["onClick"], g6 = { class: "vt-timepicker__panel" }, w6 = { class: "vt-timepicker__time-columns" }, k6 = { class: "vt-timepicker__column" }, b6 = { class: "vt-timepicker__options" }, y6 = ["disabled", "onClick"], $6 = { class: "vt-timepicker__column" }, M6 = { class: "vt-timepicker__options" }, x6 = ["disabled", "onClick"], L6 = {
|
|
5678
5684
|
key: 0,
|
|
5679
5685
|
class: "vt-timepicker__column"
|
|
5680
|
-
},
|
|
5686
|
+
}, S6 = { class: "vt-timepicker__options" }, V6 = ["disabled", "onClick"], D6 = {
|
|
5681
5687
|
key: 1,
|
|
5682
5688
|
class: "vt-timepicker__column"
|
|
5683
5689
|
}, H6 = { class: "vt-timepicker__options" }, T6 = ["onClick"], I6 = {
|
|
@@ -5726,29 +5732,29 @@ const Ge = new u5(), c5 = {
|
|
|
5726
5732
|
startTime: B(null),
|
|
5727
5733
|
endTime: B(null),
|
|
5728
5734
|
isSelectingEnd: B(!1)
|
|
5729
|
-
}, v = B(/* @__PURE__ */ new Map()), h =
|
|
5735
|
+
}, v = B(/* @__PURE__ */ new Map()), h = x(() => t.type === "timerange"), _ = (M) => {
|
|
5730
5736
|
if (!M) return "";
|
|
5731
5737
|
const { hour: w, minute: u, second: C } = M, ee = t.format || (t.showSeconds ? t.use12Hours ? C1["12h"] : C1["24h"] : t.use12Hours ? C1["12h_no_seconds"] : C1["24h_no_seconds"]);
|
|
5732
5738
|
return X5(w, u, C, ee, t.use12Hours);
|
|
5733
|
-
},
|
|
5739
|
+
}, g = (M) => M ? M instanceof Date ? {
|
|
5734
5740
|
hour: M.getHours(),
|
|
5735
5741
|
minute: M.getMinutes(),
|
|
5736
5742
|
second: M.getSeconds()
|
|
5737
|
-
} : typeof M == "string" &&
|
|
5743
|
+
} : typeof M == "string" && S1(M) ? Q5(M) : null : null, y = (M, w = !1) => K5(M, t.type, w), s = x(() => t.modelValue ? h.value ? Array.isArray(t.modelValue) && t.modelValue.length === 2 ? [g(t.modelValue[0]), g(t.modelValue[1])] : [null, null] : g(t.modelValue) : h.value ? [null, null] : null), N = x(() => {
|
|
5738
5744
|
if (h.value) {
|
|
5739
5745
|
const [M, w] = s.value;
|
|
5740
|
-
return M && w ? [
|
|
5746
|
+
return M && w ? [_(M), _(w)] : M ? [_(M), ""] : ["", ""];
|
|
5741
5747
|
} else {
|
|
5742
5748
|
const M = s.value;
|
|
5743
|
-
return M ?
|
|
5749
|
+
return M ? _(M) : "";
|
|
5744
5750
|
}
|
|
5745
|
-
}), j =
|
|
5751
|
+
}), j = x(() => {
|
|
5746
5752
|
if (h.value) {
|
|
5747
5753
|
const [M, w] = N.value;
|
|
5748
5754
|
return M || w;
|
|
5749
5755
|
} else
|
|
5750
5756
|
return !!N.value;
|
|
5751
|
-
}),
|
|
5757
|
+
}), S = x(() => t.clearable && !t.disabled && j.value), V = x(() => h.value ? f.isSelectingEnd.value ? t.endPlaceholder : t.startPlaceholder : t.placeholder), T = x(() => [
|
|
5752
5758
|
"vt-timepicker",
|
|
5753
5759
|
`vt-timepicker--${t.size}`,
|
|
5754
5760
|
`vt-timepicker--${t.type}`,
|
|
@@ -5759,21 +5765,21 @@ const Ge = new u5(), c5 = {
|
|
|
5759
5765
|
"vt-timepicker--open": re.value,
|
|
5760
5766
|
"vt-timepicker--error": !!t.errorMessage
|
|
5761
5767
|
}
|
|
5762
|
-
]), U =
|
|
5768
|
+
]), U = x(() => t.errorMessage ? t.errorMessage : ""), q = B(0), E = B(0), D = B(0), Q = B("AM"), oe = B(0), A = B(0), J = B(0), he = B("AM"), Ce = x(() => {
|
|
5763
5769
|
const M = t.use12Hours ? 12 : 23, w = t.use12Hours ? 1 : 0, u = t.disabledHours ? t.disabledHours() : [], C = x1(w, M, t.hourStep, u);
|
|
5764
5770
|
return t.hideDisabledOptions ? C.filter((ee) => !ee.disabled) : C;
|
|
5765
|
-
}), I =
|
|
5771
|
+
}), I = x(() => {
|
|
5766
5772
|
const M = t.use12Hours ? Q.value === "PM" && q.value !== 12 ? q.value + 12 : Q.value === "AM" && q.value === 12 ? 0 : q.value : q.value, w = t.disabledMinutes ? t.disabledMinutes(M) : [], u = x1(0, 59, t.minuteStep, w);
|
|
5767
5773
|
return t.hideDisabledOptions ? u.filter((C) => !C.disabled) : u;
|
|
5768
|
-
}), P =
|
|
5774
|
+
}), P = x(() => {
|
|
5769
5775
|
const M = t.use12Hours ? Q.value === "PM" && q.value !== 12 ? q.value + 12 : Q.value === "AM" && q.value === 12 ? 0 : q.value : q.value, w = t.disabledSeconds ? t.disabledSeconds(M, E.value) : [], u = x1(0, 59, t.secondStep, w);
|
|
5770
5776
|
return t.hideDisabledOptions ? u.filter((C) => !C.disabled) : u;
|
|
5771
|
-
}), K =
|
|
5777
|
+
}), K = x(() => ["AM", "PM"]), {
|
|
5772
5778
|
visible: re,
|
|
5773
5779
|
parentVisible: ue,
|
|
5774
5780
|
dropdownPosition: se,
|
|
5775
5781
|
show: ce,
|
|
5776
|
-
hide:
|
|
5782
|
+
hide: Ee,
|
|
5777
5783
|
toggle: Oe,
|
|
5778
5784
|
updatePosition: Ye
|
|
5779
5785
|
} = k1(d, p, {
|
|
@@ -5792,7 +5798,7 @@ const Ge = new u5(), c5 = {
|
|
|
5792
5798
|
}, 150);
|
|
5793
5799
|
}) : Ne();
|
|
5794
5800
|
}
|
|
5795
|
-
}), De =
|
|
5801
|
+
}), De = x(() => ({
|
|
5796
5802
|
...se.value,
|
|
5797
5803
|
position: "absolute",
|
|
5798
5804
|
zIndex: 2e3
|
|
@@ -5896,7 +5902,7 @@ const Ge = new u5(), c5 = {
|
|
|
5896
5902
|
var u, C;
|
|
5897
5903
|
if (!re.value) return;
|
|
5898
5904
|
const w = M.target;
|
|
5899
|
-
(u = c.value) != null && u.contains(w) || (C = p.value) != null && C.contains(w) ||
|
|
5905
|
+
(u = c.value) != null && u.contains(w) || (C = p.value) != null && C.contains(w) || Ee();
|
|
5900
5906
|
}, W = () => {
|
|
5901
5907
|
t.disabled || Oe();
|
|
5902
5908
|
}, ye = () => {
|
|
@@ -5906,7 +5912,7 @@ const Ge = new u5(), c5 = {
|
|
|
5906
5912
|
}, Ae = () => {
|
|
5907
5913
|
const M = (h.value, null);
|
|
5908
5914
|
i("update:modelValue", M), i("change", M), h.value && (f.startTime.value = null, f.endTime.value = null, f.isSelectingEnd.value = !1), q.value = ve.hour, E.value = ve.minute, D.value = ve.second, Q.value = ve.period, oe.value = ve.hour, A.value = ve.minute, J.value = ve.second, he.value = ve.period;
|
|
5909
|
-
}, Ze = (M) =>
|
|
5915
|
+
}, Ze = (M) => _(M), Qe = () => {
|
|
5910
5916
|
if (!t.disabled) {
|
|
5911
5917
|
if (h.value) {
|
|
5912
5918
|
let M = q.value, w = oe.value;
|
|
@@ -5927,10 +5933,10 @@ const Ge = new u5(), c5 = {
|
|
|
5927
5933
|
}
|
|
5928
5934
|
i("update:modelValue", u), i("change", u);
|
|
5929
5935
|
}
|
|
5930
|
-
|
|
5936
|
+
Ee();
|
|
5931
5937
|
}
|
|
5932
5938
|
}, e1 = () => {
|
|
5933
|
-
|
|
5939
|
+
Ee();
|
|
5934
5940
|
}, F = (M) => {
|
|
5935
5941
|
if (re.value)
|
|
5936
5942
|
switch (M.key) {
|
|
@@ -5955,7 +5961,7 @@ const Ge = new u5(), c5 = {
|
|
|
5955
5961
|
t.disabled || ce();
|
|
5956
5962
|
},
|
|
5957
5963
|
close: () => {
|
|
5958
|
-
|
|
5964
|
+
Ee();
|
|
5959
5965
|
},
|
|
5960
5966
|
validate: y
|
|
5961
5967
|
}), Me(
|
|
@@ -5963,7 +5969,7 @@ const Ge = new u5(), c5 = {
|
|
|
5963
5969
|
(M) => {
|
|
5964
5970
|
if (M) {
|
|
5965
5971
|
if (h.value && Array.isArray(M)) {
|
|
5966
|
-
const w =
|
|
5972
|
+
const w = g(M[0]), u = g(M[1]);
|
|
5967
5973
|
if (w) {
|
|
5968
5974
|
let C = w.hour;
|
|
5969
5975
|
t.use12Hours && (Q.value = C >= 12 ? "PM" : "AM", C = C === 0 ? 12 : C > 12 ? C - 12 : C), q.value = C, E.value = w.minute, D.value = w.second;
|
|
@@ -5973,7 +5979,7 @@ const Ge = new u5(), c5 = {
|
|
|
5973
5979
|
t.use12Hours && (he.value = C >= 12 ? "PM" : "AM", C = C === 0 ? 12 : C > 12 ? C - 12 : C), oe.value = C, A.value = u.minute, J.value = u.second;
|
|
5974
5980
|
}
|
|
5975
5981
|
} else if (!h.value) {
|
|
5976
|
-
const w =
|
|
5982
|
+
const w = g(M);
|
|
5977
5983
|
if (w) {
|
|
5978
5984
|
let u = w.hour;
|
|
5979
5985
|
t.use12Hours && (Q.value = u >= 12 ? "PM" : "AM", u = u === 0 ? 12 : u > 12 ? u - 12 : u), q.value = u, E.value = w.minute, D.value = w.second;
|
|
@@ -6038,16 +6044,16 @@ const Ge = new u5(), c5 = {
|
|
|
6038
6044
|
o("span", null, R(t.rangeSeparator), 1),
|
|
6039
6045
|
o("span", null, R(t.endPlaceholder), 1)
|
|
6040
6046
|
], 64)) : (l(), a(ie, { key: 1 }, [
|
|
6041
|
-
$e(R(
|
|
6047
|
+
$e(R(V.value), 1)
|
|
6042
6048
|
], 64))
|
|
6043
6049
|
])),
|
|
6044
6050
|
o("div", n6, [
|
|
6045
|
-
|
|
6051
|
+
S.value ? (l(), a("button", {
|
|
6046
6052
|
key: 0,
|
|
6047
6053
|
disabled: t.disabled,
|
|
6048
6054
|
class: "vt-input__clear-btn",
|
|
6049
6055
|
type: "button",
|
|
6050
|
-
onClick:
|
|
6056
|
+
onClick: Se(Ae, ["stop"])
|
|
6051
6057
|
}, [
|
|
6052
6058
|
ne(fe, { name: "close" })
|
|
6053
6059
|
], 8, o6)) : Z("", !0)
|
|
@@ -6063,11 +6069,11 @@ const Ge = new u5(), c5 = {
|
|
|
6063
6069
|
o("div", {
|
|
6064
6070
|
ref_key: "dropdownRef",
|
|
6065
6071
|
ref: p,
|
|
6066
|
-
style:
|
|
6072
|
+
style: Be(De.value),
|
|
6067
6073
|
class: "vt-timepicker__dropdown",
|
|
6068
|
-
onClick: w[0] || (w[0] =
|
|
6074
|
+
onClick: w[0] || (w[0] = Se(() => {
|
|
6069
6075
|
}, ["stop"])),
|
|
6070
|
-
onMousedown: w[1] || (w[1] =
|
|
6076
|
+
onMousedown: w[1] || (w[1] = Se(() => {
|
|
6071
6077
|
}, ["prevent"]))
|
|
6072
6078
|
}, [
|
|
6073
6079
|
h.value ? (l(), a("div", s6, [
|
|
@@ -6172,7 +6178,7 @@ const Ge = new u5(), c5 = {
|
|
|
6172
6178
|
])
|
|
6173
6179
|
]),
|
|
6174
6180
|
M.showSeconds ? (l(), a("div", L6, [
|
|
6175
|
-
o("div",
|
|
6181
|
+
o("div", S6, [
|
|
6176
6182
|
(l(!0), a(ie, null, pe(P.value, (u) => (l(), a("button", {
|
|
6177
6183
|
key: `end-second-${u.value}`,
|
|
6178
6184
|
class: G([
|
|
@@ -6184,7 +6190,7 @@ const Ge = new u5(), c5 = {
|
|
|
6184
6190
|
]),
|
|
6185
6191
|
disabled: u.disabled,
|
|
6186
6192
|
onClick: (C) => k(u.value, "second", !0, u.disabled, C)
|
|
6187
|
-
}, R(u.label), 11,
|
|
6193
|
+
}, R(u.label), 11, V6))), 128))
|
|
6188
6194
|
])
|
|
6189
6195
|
])) : Z("", !0),
|
|
6190
6196
|
M.use12Hours ? (l(), a("div", D6, [
|
|
@@ -6309,7 +6315,7 @@ const Ge = new u5(), c5 = {
|
|
|
6309
6315
|
}, M0 = { class: "vt-datepicker__header" }, x0 = { class: "vt-datepicker__header-content" }, L0 = {
|
|
6310
6316
|
key: 2,
|
|
6311
6317
|
class: "vt-datepicker__header-text"
|
|
6312
|
-
},
|
|
6318
|
+
}, S0 = { class: "vt-datepicker__content" }, V0 = {
|
|
6313
6319
|
key: 0,
|
|
6314
6320
|
class: "vt-datepicker__calendar"
|
|
6315
6321
|
}, D0 = { class: "vt-datepicker__weekdays" }, H0 = { class: "vt-datepicker__dates" }, T0 = ["onClick", "onMouseenter"], I0 = {
|
|
@@ -6361,21 +6367,21 @@ const Ge = new u5(), c5 = {
|
|
|
6361
6367
|
},
|
|
6362
6368
|
emits: ["update:modelValue", "change", "blur", "focus", "calendar-change", "panel-change", "open-change"],
|
|
6363
6369
|
setup(n, { expose: e, emit: r }) {
|
|
6364
|
-
const t = n, i = r, c = B(), d = B(), p = B(), f = B(), v = B(), h = (m,
|
|
6370
|
+
const t = n, i = r, c = B(), d = B(), p = B(), f = B(), v = B(), h = (m, L, b) => {
|
|
6365
6371
|
if (t.use12Hours) {
|
|
6366
6372
|
const H = m >= 12 ? "PM" : "AM", te = m % 12 || 12;
|
|
6367
|
-
return t.showSeconds ? `${String(te).padStart(2, "0")}:${String(
|
|
6373
|
+
return t.showSeconds ? `${String(te).padStart(2, "0")}:${String(L).padStart(2, "0")}:${String(b).padStart(2, "0")} ${H}` : `${String(te).padStart(2, "0")}:${String(L).padStart(2, "0")} ${H}`;
|
|
6368
6374
|
} else
|
|
6369
|
-
return t.showSeconds ? `${String(m).padStart(2, "0")}:${String(
|
|
6370
|
-
},
|
|
6375
|
+
return t.showSeconds ? `${String(m).padStart(2, "0")}:${String(L).padStart(2, "0")}:${String(b).padStart(2, "0")}` : `${String(m).padStart(2, "0")}:${String(L).padStart(2, "0")}`;
|
|
6376
|
+
}, _ = (m) => m instanceof Date ? m : typeof m == "number" ? new Date(m) : null, g = () => {
|
|
6371
6377
|
if (t.modelValue) {
|
|
6372
6378
|
if (t.type === "datetimerange" && Array.isArray(t.modelValue)) {
|
|
6373
|
-
const m =
|
|
6379
|
+
const m = _(t.modelValue[0]);
|
|
6374
6380
|
if (m)
|
|
6375
6381
|
return h(m.getHours(), m.getMinutes(), m.getSeconds());
|
|
6376
6382
|
}
|
|
6377
6383
|
if (t.type === "datetime") {
|
|
6378
|
-
const m =
|
|
6384
|
+
const m = _(t.modelValue);
|
|
6379
6385
|
if (m)
|
|
6380
6386
|
return h(m.getHours(), m.getMinutes(), m.getSeconds());
|
|
6381
6387
|
}
|
|
@@ -6390,12 +6396,12 @@ const Ge = new u5(), c5 = {
|
|
|
6390
6396
|
}, y = () => {
|
|
6391
6397
|
if (t.modelValue) {
|
|
6392
6398
|
if (t.type === "datetimerange" && Array.isArray(t.modelValue)) {
|
|
6393
|
-
const m =
|
|
6399
|
+
const m = _(t.modelValue[1]);
|
|
6394
6400
|
if (m)
|
|
6395
6401
|
return h(m.getHours(), m.getMinutes(), m.getSeconds());
|
|
6396
6402
|
}
|
|
6397
6403
|
if (t.type === "datetime") {
|
|
6398
|
-
const m =
|
|
6404
|
+
const m = _(t.modelValue);
|
|
6399
6405
|
if (m)
|
|
6400
6406
|
return h(m.getHours(), m.getMinutes(), m.getSeconds());
|
|
6401
6407
|
}
|
|
@@ -6417,9 +6423,9 @@ const Ge = new u5(), c5 = {
|
|
|
6417
6423
|
isSelectingEnd: B(!1),
|
|
6418
6424
|
hoverDate: B(null),
|
|
6419
6425
|
// Time state for datetime types
|
|
6420
|
-
startTime: B(
|
|
6426
|
+
startTime: B(g()),
|
|
6421
6427
|
endTime: B(y())
|
|
6422
|
-
}, N = c1(t, "modelValue"), j = c1(t, "type"),
|
|
6428
|
+
}, N = c1(t, "modelValue"), j = c1(t, "type"), S = c1(t, "format"), V = c1(t, "valueFormat");
|
|
6423
6429
|
c1(t, "rangeSeparator");
|
|
6424
6430
|
const {
|
|
6425
6431
|
isRange: T,
|
|
@@ -6428,7 +6434,7 @@ const Ge = new u5(), c5 = {
|
|
|
6428
6434
|
hasDisplayValue: E,
|
|
6429
6435
|
formatOutput: D,
|
|
6430
6436
|
validate: Q
|
|
6431
|
-
} = U5(N, j,
|
|
6437
|
+
} = U5(N, j, S, V), {
|
|
6432
6438
|
calendarDates: oe,
|
|
6433
6439
|
monthsInYear: A,
|
|
6434
6440
|
yearsInDecade: J,
|
|
@@ -6442,7 +6448,7 @@ const Ge = new u5(), c5 = {
|
|
|
6442
6448
|
} = Z1(s.currentDate), {
|
|
6443
6449
|
calendarDates: se,
|
|
6444
6450
|
isDateInCurrentMonth: ce,
|
|
6445
|
-
navigateYear:
|
|
6451
|
+
navigateYear: Ee,
|
|
6446
6452
|
navigateDecade: Oe
|
|
6447
6453
|
} = Z1(s.rightCurrentDate), Ye = (m) => {
|
|
6448
6454
|
switch (m) {
|
|
@@ -6455,31 +6461,31 @@ const Ge = new u5(), c5 = {
|
|
|
6455
6461
|
default:
|
|
6456
6462
|
return "date";
|
|
6457
6463
|
}
|
|
6458
|
-
}, De =
|
|
6464
|
+
}, De = x(() => t.type === "datetime" || t.type === "datetimerange"), be = x(() => De.value), Fe = x(() => () => {
|
|
6459
6465
|
const m = /* @__PURE__ */ new Date();
|
|
6460
|
-
let
|
|
6461
|
-
if (t.disabledHours && (
|
|
6466
|
+
let L = [];
|
|
6467
|
+
if (t.disabledHours && (L = [...t.disabledHours()]), t.previousDateDisabled) {
|
|
6462
6468
|
const b = m.getHours();
|
|
6463
6469
|
for (let H = 0; H < b; H++)
|
|
6464
|
-
|
|
6470
|
+
L.includes(H) || L.push(H);
|
|
6465
6471
|
}
|
|
6466
|
-
return
|
|
6467
|
-
}), Ne =
|
|
6468
|
-
const
|
|
6472
|
+
return L;
|
|
6473
|
+
}), Ne = x(() => (m) => {
|
|
6474
|
+
const L = /* @__PURE__ */ new Date();
|
|
6469
6475
|
let b = [];
|
|
6470
6476
|
if (t.disabledMinutes && (b = [...t.disabledMinutes(m)]), t.previousDateDisabled) {
|
|
6471
|
-
const H =
|
|
6477
|
+
const H = L.getHours(), te = L.getMinutes();
|
|
6472
6478
|
if (m === H)
|
|
6473
6479
|
for (let de = 0; de < te; de++)
|
|
6474
6480
|
b.includes(de) || b.push(de);
|
|
6475
6481
|
}
|
|
6476
6482
|
return b;
|
|
6477
|
-
}), We =
|
|
6483
|
+
}), We = x(() => (m, L) => {
|
|
6478
6484
|
const b = /* @__PURE__ */ new Date();
|
|
6479
6485
|
let H = [];
|
|
6480
|
-
if (t.disabledSeconds && (H = [...t.disabledSeconds(m,
|
|
6486
|
+
if (t.disabledSeconds && (H = [...t.disabledSeconds(m, L)]), t.previousDateDisabled) {
|
|
6481
6487
|
const te = b.getHours(), de = b.getMinutes(), Ie = b.getSeconds();
|
|
6482
|
-
if (m === te &&
|
|
6488
|
+
if (m === te && L === de)
|
|
6483
6489
|
for (let Ke = 0; Ke < Ie; Ke++)
|
|
6484
6490
|
H.includes(Ke) || H.push(Ke);
|
|
6485
6491
|
}
|
|
@@ -6502,7 +6508,7 @@ const Ge = new u5(), c5 = {
|
|
|
6502
6508
|
onVisibleChange: (m) => {
|
|
6503
6509
|
m && Te(() => Ze());
|
|
6504
6510
|
}
|
|
6505
|
-
}), Qe =
|
|
6511
|
+
}), Qe = x(() => t.clearable && !t.disabled && E.value), e1 = x(() => T.value ? s.isSelectingEnd.value ? t.endPlaceholder : t.startPlaceholder : t.placeholder), F = x(() => [
|
|
6506
6512
|
"vt-datepicker",
|
|
6507
6513
|
`vt-datepicker--${t.size}`,
|
|
6508
6514
|
`vt-datepicker--${t.type}`,
|
|
@@ -6514,12 +6520,12 @@ const Ge = new u5(), c5 = {
|
|
|
6514
6520
|
"vt-datepicker--with-time": be.value,
|
|
6515
6521
|
"vt-datepicker--error": !!t.errorMessage
|
|
6516
6522
|
}
|
|
6517
|
-
]), X =
|
|
6523
|
+
]), X = x(() => t.errorMessage ? t.errorMessage : ""), ae = x(() => ({
|
|
6518
6524
|
...W.value,
|
|
6519
6525
|
position: "absolute",
|
|
6520
6526
|
zIndex: 2e3
|
|
6521
|
-
})), _e =
|
|
6522
|
-
if ((t.type === "daterange" || t.type === "datetimerange") && (
|
|
6527
|
+
})), _e = x(() => (t.type === "daterange" || t.type === "datetimerange") && s.viewMode.value === "date"), me = (m, L = !1, b = !1) => {
|
|
6528
|
+
if ((t.type === "daterange" || t.type === "datetimerange") && (L && !Ce(m) || b && !ce(m)))
|
|
6523
6529
|
return !1;
|
|
6524
6530
|
if (t.previousDateDisabled) {
|
|
6525
6531
|
const H = /* @__PURE__ */ new Date();
|
|
@@ -6538,8 +6544,8 @@ const Ge = new u5(), c5 = {
|
|
|
6538
6544
|
return !1;
|
|
6539
6545
|
}
|
|
6540
6546
|
return !0;
|
|
6541
|
-
}, ve = (m,
|
|
6542
|
-
if ((t.type === "daterange" || t.type === "datetimerange") && (
|
|
6547
|
+
}, ve = (m, L = !1, b = !1) => {
|
|
6548
|
+
if ((t.type === "daterange" || t.type === "datetimerange") && (L && !Ce(m) || b && !ce(m)))
|
|
6543
6549
|
return !1;
|
|
6544
6550
|
if (T.value) {
|
|
6545
6551
|
if (s.startDate.value && s.endDate.value) {
|
|
@@ -6556,8 +6562,8 @@ const Ge = new u5(), c5 = {
|
|
|
6556
6562
|
const te = new Date(H), de = new Date(m);
|
|
6557
6563
|
return te.setHours(0, 0, 0, 0), de.setHours(0, 0, 0, 0), de.getTime() === te.getTime();
|
|
6558
6564
|
}
|
|
6559
|
-
}, M = (m,
|
|
6560
|
-
if (!T.value || (t.type === "daterange" || t.type === "datetimerange") && (
|
|
6565
|
+
}, M = (m, L = !1, b = !1) => {
|
|
6566
|
+
if (!T.value || (t.type === "daterange" || t.type === "datetimerange") && (L && !Ce(m) || b && !ce(m)))
|
|
6561
6567
|
return !1;
|
|
6562
6568
|
if (s.startDate.value && s.endDate.value) {
|
|
6563
6569
|
const H = new Date(s.startDate.value), te = new Date(s.endDate.value);
|
|
@@ -6572,55 +6578,55 @@ const Ge = new u5(), c5 = {
|
|
|
6572
6578
|
return de >= Ie && de <= Ke;
|
|
6573
6579
|
}
|
|
6574
6580
|
return !1;
|
|
6575
|
-
}, w = (m,
|
|
6581
|
+
}, w = (m, L) => {
|
|
6576
6582
|
if (T.value) {
|
|
6577
6583
|
if (s.startDate.value && s.endDate.value) {
|
|
6578
|
-
const b =
|
|
6584
|
+
const b = L.getFullYear(), H = s.startDate.value.getMonth(), te = s.startDate.value.getFullYear(), de = s.endDate.value.getMonth(), Ie = s.endDate.value.getFullYear();
|
|
6579
6585
|
return b === te && m === H || b === Ie && m === de;
|
|
6580
6586
|
} else if (s.startDate.value) {
|
|
6581
6587
|
const b = s.startDate.value.getMonth(), H = s.startDate.value.getFullYear();
|
|
6582
|
-
return
|
|
6588
|
+
return L.getFullYear() === H && m === b;
|
|
6583
6589
|
}
|
|
6584
6590
|
return !1;
|
|
6585
6591
|
} else {
|
|
6586
6592
|
const b = U.value;
|
|
6587
|
-
return b ? b.getFullYear() ===
|
|
6593
|
+
return b ? b.getFullYear() === L.getFullYear() && b.getMonth() === m : !1;
|
|
6588
6594
|
}
|
|
6589
|
-
}, u = (m,
|
|
6595
|
+
}, u = (m, L) => {
|
|
6590
6596
|
if (!T.value) return !1;
|
|
6591
|
-
const b =
|
|
6597
|
+
const b = L.getFullYear(), H = new Date(b, m, 1);
|
|
6592
6598
|
if (s.startDate.value && s.endDate.value) {
|
|
6593
6599
|
const te = new Date(s.startDate.value.getFullYear(), s.startDate.value.getMonth(), 1), de = new Date(s.endDate.value.getFullYear(), s.endDate.value.getMonth(), 1);
|
|
6594
|
-
return H >= te && H <= de && !w(m,
|
|
6600
|
+
return H >= te && H <= de && !w(m, L);
|
|
6595
6601
|
}
|
|
6596
6602
|
if (s.startDate.value && s.isSelectingEnd.value && s.hoverDate.value) {
|
|
6597
6603
|
const te = new Date(s.startDate.value.getFullYear(), s.startDate.value.getMonth(), 1), de = new Date(s.hoverDate.value.getFullYear(), s.hoverDate.value.getMonth(), 1), Ie = te <= de ? te : de, Ke = te <= de ? de : te;
|
|
6598
|
-
return H >= Ie && H <= Ke && !w(m,
|
|
6604
|
+
return H >= Ie && H <= Ke && !w(m, L);
|
|
6599
6605
|
}
|
|
6600
6606
|
return !1;
|
|
6601
6607
|
}, C = (m) => {
|
|
6602
6608
|
if (T.value)
|
|
6603
6609
|
return s.startDate.value && s.endDate.value ? m === s.startDate.value.getFullYear() || m === s.endDate.value.getFullYear() : s.startDate.value ? s.startDate.value.getFullYear() === m : !1;
|
|
6604
6610
|
{
|
|
6605
|
-
const
|
|
6606
|
-
return
|
|
6611
|
+
const L = U.value;
|
|
6612
|
+
return L ? L.getFullYear() === m : !1;
|
|
6607
6613
|
}
|
|
6608
6614
|
}, ee = (m) => {
|
|
6609
6615
|
if (!T.value) return !1;
|
|
6610
6616
|
if (s.startDate.value && s.endDate.value) {
|
|
6611
|
-
const
|
|
6612
|
-
return m >=
|
|
6617
|
+
const L = s.startDate.value.getFullYear(), b = s.endDate.value.getFullYear();
|
|
6618
|
+
return m >= L && m <= b && !C(m);
|
|
6613
6619
|
}
|
|
6614
6620
|
if (s.startDate.value && s.isSelectingEnd.value && s.hoverDate.value) {
|
|
6615
|
-
const
|
|
6621
|
+
const L = s.startDate.value.getFullYear(), b = s.hoverDate.value.getFullYear(), H = Math.min(L, b), te = Math.max(L, b);
|
|
6616
6622
|
return m >= H && m <= te && !C(m);
|
|
6617
6623
|
}
|
|
6618
6624
|
return !1;
|
|
6619
|
-
}, z = (m,
|
|
6625
|
+
}, z = (m, L) => {
|
|
6620
6626
|
var H;
|
|
6621
6627
|
const b = new Date(m);
|
|
6622
|
-
if (
|
|
6623
|
-
const te =
|
|
6628
|
+
if (L && typeof L == "string") {
|
|
6629
|
+
const te = L.match(/(\d{1,2}):(\d{2})(?::(\d{2}))?\s?(AM|PM)?/i);
|
|
6624
6630
|
if (te) {
|
|
6625
6631
|
let de = parseInt(te[1]);
|
|
6626
6632
|
const Ie = parseInt(te[2]), Ke = te[3] ? parseInt(te[3]) : 0, b1 = (H = te[4]) == null ? void 0 : H.toUpperCase();
|
|
@@ -6641,8 +6647,8 @@ const Ge = new u5(), c5 = {
|
|
|
6641
6647
|
}) : "", ke = (m) => {
|
|
6642
6648
|
var b, H;
|
|
6643
6649
|
if (!k.value) return;
|
|
6644
|
-
const
|
|
6645
|
-
(b = c.value) != null && b.contains(
|
|
6650
|
+
const L = m.target;
|
|
6651
|
+
(b = c.value) != null && b.contains(L) || (H = p.value) != null && H.contains(L) || He();
|
|
6646
6652
|
}, Le = () => {
|
|
6647
6653
|
t.disabled || Ae();
|
|
6648
6654
|
}, Re = () => {
|
|
@@ -6650,9 +6656,9 @@ const Ge = new u5(), c5 = {
|
|
|
6650
6656
|
}, qe = () => {
|
|
6651
6657
|
s.isFocused.value = !1, i("blur", c.value);
|
|
6652
6658
|
}, Ue = () => {
|
|
6653
|
-
i("update:modelValue", null), i("change", null), s.startDate.value = null, s.endDate.value = null, s.isSelectingEnd.value = !1, s.hoverDate.value = null, s.startTime.value =
|
|
6654
|
-
}, je = (m,
|
|
6655
|
-
if (!(t.disabled || !m) && me(m,
|
|
6659
|
+
i("update:modelValue", null), i("change", null), s.startDate.value = null, s.endDate.value = null, s.isSelectingEnd.value = !1, s.hoverDate.value = null, s.startTime.value = g(), s.endTime.value = y();
|
|
6660
|
+
}, je = (m, L = !1, b = !1) => {
|
|
6661
|
+
if (!(t.disabled || !m) && me(m, L, b))
|
|
6656
6662
|
if (T.value) {
|
|
6657
6663
|
if (!s.startDate.value || s.startDate.value && s.endDate.value)
|
|
6658
6664
|
s.startDate.value = new Date(m), s.endDate.value = null, s.isSelectingEnd.value = !0, s.hoverDate.value = null, De.value && (s.startTime.value = "00:00:00", s.endTime.value = null);
|
|
@@ -6678,12 +6684,12 @@ const Ge = new u5(), c5 = {
|
|
|
6678
6684
|
} catch (H) {
|
|
6679
6685
|
console.warn("Error formatting single date output:", H);
|
|
6680
6686
|
}
|
|
6681
|
-
}, t1 = (m,
|
|
6682
|
-
(t.type === "daterange" || t.type === "datetimerange") && (
|
|
6687
|
+
}, t1 = (m, L = !1, b = !1) => {
|
|
6688
|
+
(t.type === "daterange" || t.type === "datetimerange") && (L && !Ce(m) || b && !ce(m)) || T.value && s.isSelectingEnd.value && s.startDate.value && (s.hoverDate.value = new Date(m));
|
|
6683
6689
|
}, r1 = () => {
|
|
6684
6690
|
T.value && s.isSelectingEnd.value && (s.hoverDate.value = null);
|
|
6685
|
-
}, u1 = (m,
|
|
6686
|
-
if (
|
|
6691
|
+
}, u1 = (m, L = !1) => {
|
|
6692
|
+
if (L ? s.endTime.value = m : s.startTime.value = m, !T.value && s.startDate.value && s.startTime.value) {
|
|
6687
6693
|
const b = z(s.startDate.value, s.startTime.value);
|
|
6688
6694
|
try {
|
|
6689
6695
|
const H = D(b);
|
|
@@ -6695,7 +6701,7 @@ const Ge = new u5(), c5 = {
|
|
|
6695
6701
|
}, ut = () => {
|
|
6696
6702
|
if (De.value) {
|
|
6697
6703
|
if (T.value && s.startDate.value && s.endDate.value) {
|
|
6698
|
-
const m = z(s.startDate.value, s.startTime.value || "00:00:00"),
|
|
6704
|
+
const m = z(s.startDate.value, s.startTime.value || "00:00:00"), L = z(s.endDate.value, s.endTime.value || "23:59:59"), b = [m, L];
|
|
6699
6705
|
try {
|
|
6700
6706
|
const H = D(b);
|
|
6701
6707
|
i("update:modelValue", H), i("change", H);
|
|
@@ -6705,52 +6711,52 @@ const Ge = new u5(), c5 = {
|
|
|
6705
6711
|
} else if (!T.value && s.startDate.value) {
|
|
6706
6712
|
const m = z(s.startDate.value, s.startTime.value || "00:00:00");
|
|
6707
6713
|
try {
|
|
6708
|
-
const
|
|
6709
|
-
i("update:modelValue",
|
|
6710
|
-
} catch (
|
|
6711
|
-
console.warn("Error formatting datetime output:",
|
|
6714
|
+
const L = D(m);
|
|
6715
|
+
i("update:modelValue", L), i("change", L);
|
|
6716
|
+
} catch (L) {
|
|
6717
|
+
console.warn("Error formatting datetime output:", L);
|
|
6712
6718
|
}
|
|
6713
6719
|
}
|
|
6714
6720
|
}
|
|
6715
6721
|
He();
|
|
6716
6722
|
}, ct = () => {
|
|
6717
6723
|
He();
|
|
6718
|
-
}, dt = (m,
|
|
6719
|
-
const b =
|
|
6724
|
+
}, dt = (m, L = !1) => {
|
|
6725
|
+
const b = L ? s.rightCurrentDate.value : s.currentDate.value;
|
|
6720
6726
|
if (t.type === "month" || t.type === "monthrange") {
|
|
6721
6727
|
const H = new Date(b.getFullYear(), m, 1);
|
|
6722
6728
|
je(H);
|
|
6723
6729
|
} else {
|
|
6724
6730
|
const H = new Date(b.getFullYear(), m, 1);
|
|
6725
|
-
|
|
6731
|
+
L ? s.rightCurrentDate.value = H : s.currentDate.value = H, s.viewMode.value = "date";
|
|
6726
6732
|
}
|
|
6727
|
-
}, ht = (m,
|
|
6733
|
+
}, ht = (m, L) => {
|
|
6728
6734
|
if (T.value && s.isSelectingEnd.value && s.startDate.value) {
|
|
6729
|
-
const b =
|
|
6735
|
+
const b = L.getFullYear();
|
|
6730
6736
|
s.hoverDate.value = new Date(b, m, 1);
|
|
6731
6737
|
}
|
|
6732
6738
|
}, pt = () => {
|
|
6733
6739
|
T.value && s.isSelectingEnd.value && (s.hoverDate.value = null);
|
|
6734
6740
|
}, vt = (m) => {
|
|
6735
6741
|
if (t.type === "year" || t.type === "yearrange") {
|
|
6736
|
-
const
|
|
6737
|
-
je(
|
|
6742
|
+
const L = new Date(m, 0, 1);
|
|
6743
|
+
je(L);
|
|
6738
6744
|
} else {
|
|
6739
|
-
const
|
|
6740
|
-
s.currentDate.value =
|
|
6745
|
+
const L = new Date(m, s.currentDate.value.getMonth(), 1), b = new Date(m, s.rightCurrentDate.value.getMonth(), 1);
|
|
6746
|
+
s.currentDate.value = L, s.rightCurrentDate.value = b, s.viewMode.value = t.type === "month" || t.type === "monthrange" ? "month" : "date";
|
|
6741
6747
|
}
|
|
6742
6748
|
}, ft = (m) => {
|
|
6743
6749
|
T.value && s.isSelectingEnd.value && s.startDate.value && (s.hoverDate.value = new Date(m, 0, 1));
|
|
6744
6750
|
}, Ct = () => {
|
|
6745
6751
|
T.value && s.isSelectingEnd.value && (s.hoverDate.value = null);
|
|
6746
6752
|
}, T1 = () => {
|
|
6747
|
-
s.viewMode.value === "year" ? (ue("prev"), Oe("prev")) : s.viewMode.value === "month" ? (re("prev"),
|
|
6753
|
+
s.viewMode.value === "year" ? (ue("prev"), Oe("prev")) : s.viewMode.value === "month" ? (re("prev"), Ee("prev")) : (K("prev"), s.rightCurrentDate.value = new Date(
|
|
6748
6754
|
s.currentDate.value.getFullYear(),
|
|
6749
6755
|
s.currentDate.value.getMonth() + 1,
|
|
6750
6756
|
1
|
|
6751
6757
|
));
|
|
6752
6758
|
}, I1 = () => {
|
|
6753
|
-
s.viewMode.value === "year" ? (ue("next"), Oe("next")) : s.viewMode.value === "month" ? (re("next"),
|
|
6759
|
+
s.viewMode.value === "year" ? (ue("next"), Oe("next")) : s.viewMode.value === "month" ? (re("next"), Ee("next")) : (K("next"), s.rightCurrentDate.value = new Date(
|
|
6754
6760
|
s.currentDate.value.getFullYear(),
|
|
6755
6761
|
s.currentDate.value.getMonth() + 1,
|
|
6756
6762
|
1
|
|
@@ -6768,19 +6774,19 @@ const Ge = new u5(), c5 = {
|
|
|
6768
6774
|
}
|
|
6769
6775
|
else if (!T.value && m !== null)
|
|
6770
6776
|
try {
|
|
6771
|
-
let
|
|
6772
|
-
m instanceof Date ?
|
|
6777
|
+
let L = null;
|
|
6778
|
+
m instanceof Date ? L = m : (typeof m == "string" || typeof m == "number") && (L = new Date(m)), L && !isNaN(L.getTime()) ? (s.startDate.value = L, De.value && (s.startTime.value = le(L))) : s.startDate.value = null;
|
|
6773
6779
|
} catch {
|
|
6774
6780
|
console.warn("Invalid date format in modelValue:", m), s.startDate.value = null;
|
|
6775
6781
|
}
|
|
6776
6782
|
} else
|
|
6777
|
-
s.startDate.value = null, s.endDate.value = null, s.isSelectingEnd.value = !1, s.hoverDate.value = null, s.startTime.value =
|
|
6783
|
+
s.startDate.value = null, s.endDate.value = null, s.isSelectingEnd.value = !1, s.hoverDate.value = null, s.startTime.value = g(), s.endTime.value = y();
|
|
6778
6784
|
},
|
|
6779
6785
|
{ immediate: !0 }
|
|
6780
6786
|
), Me(
|
|
6781
6787
|
() => t.type,
|
|
6782
6788
|
(m) => {
|
|
6783
|
-
s.viewMode.value = Ye(m), s.startTime.value =
|
|
6789
|
+
s.viewMode.value = Ye(m), s.startTime.value = g(), s.endTime.value = y();
|
|
6784
6790
|
},
|
|
6785
6791
|
{ immediate: !0 }
|
|
6786
6792
|
), Me(
|
|
@@ -6812,7 +6818,7 @@ const Ge = new u5(), c5 = {
|
|
|
6812
6818
|
He();
|
|
6813
6819
|
},
|
|
6814
6820
|
validate: Q
|
|
6815
|
-
}), (m,
|
|
6821
|
+
}), (m, L) => (l(), a("div", {
|
|
6816
6822
|
ref_key: "datePickerRef",
|
|
6817
6823
|
ref: c,
|
|
6818
6824
|
class: G(F.value)
|
|
@@ -6855,7 +6861,7 @@ const Ge = new u5(), c5 = {
|
|
|
6855
6861
|
disabled: t.disabled,
|
|
6856
6862
|
class: "vt-datepicker__clear",
|
|
6857
6863
|
type: "button",
|
|
6858
|
-
onClick:
|
|
6864
|
+
onClick: Se(Ue, ["stop"])
|
|
6859
6865
|
}, [
|
|
6860
6866
|
ne(fe, { name: "close" })
|
|
6861
6867
|
], 8, o0)) : Z("", !0)
|
|
@@ -6871,11 +6877,11 @@ const Ge = new u5(), c5 = {
|
|
|
6871
6877
|
o("div", {
|
|
6872
6878
|
ref_key: "dropdownRef",
|
|
6873
6879
|
ref: p,
|
|
6874
|
-
style:
|
|
6880
|
+
style: Be(ae.value),
|
|
6875
6881
|
class: "vt-datepicker__dropdown",
|
|
6876
|
-
onClick:
|
|
6882
|
+
onClick: L[10] || (L[10] = Se(() => {
|
|
6877
6883
|
}, ["stop"])),
|
|
6878
|
-
onMousedown:
|
|
6884
|
+
onMousedown: L[11] || (L[11] = Se(() => {
|
|
6879
6885
|
}, ["prevent"]))
|
|
6880
6886
|
}, [
|
|
6881
6887
|
o("div", {
|
|
@@ -6888,7 +6894,7 @@ const Ge = new u5(), c5 = {
|
|
|
6888
6894
|
ref_key: "startTimePickerRef",
|
|
6889
6895
|
ref: f,
|
|
6890
6896
|
modelValue: s.startTime.value,
|
|
6891
|
-
"onUpdate:modelValue":
|
|
6897
|
+
"onUpdate:modelValue": L[0] || (L[0] = (b) => s.startTime.value = b),
|
|
6892
6898
|
clearable: !1,
|
|
6893
6899
|
"disabled-hours": Fe.value,
|
|
6894
6900
|
"disabled-minutes": Ne.value,
|
|
@@ -6901,7 +6907,7 @@ const Ge = new u5(), c5 = {
|
|
|
6901
6907
|
"use12-hours": t.use12Hours,
|
|
6902
6908
|
placeholder: "Початковий час",
|
|
6903
6909
|
type: "time",
|
|
6904
|
-
onChange:
|
|
6910
|
+
onChange: L[1] || (L[1] = (b) => u1(b, !1))
|
|
6905
6911
|
}, null, 8, ["modelValue", "disabled-hours", "disabled-minutes", "disabled-seconds", "hide-disabled-options", "hour-step", "minute-step", "second-step", "show-seconds", "use12-hours"])
|
|
6906
6912
|
])) : Z("", !0),
|
|
6907
6913
|
o("div", i0, [
|
|
@@ -6914,10 +6920,10 @@ const Ge = new u5(), c5 = {
|
|
|
6914
6920
|
o("div", a0, [
|
|
6915
6921
|
o("button", {
|
|
6916
6922
|
class: "vt-datepicker__header-btn",
|
|
6917
|
-
onClick:
|
|
6923
|
+
onClick: L[2] || (L[2] = (b) => s.viewMode.value = "month")
|
|
6918
6924
|
}, R(s.currentDate.value.toLocaleString("default", { month: "long", year: "numeric" })), 1)
|
|
6919
6925
|
]),
|
|
6920
|
-
|
|
6926
|
+
L[12] || (L[12] = o("div", { class: "vt-datepicker__nav-spacer" }, null, -1))
|
|
6921
6927
|
]),
|
|
6922
6928
|
o("div", u0, [
|
|
6923
6929
|
o("div", c0, [
|
|
@@ -6957,7 +6963,7 @@ const Ge = new u5(), c5 = {
|
|
|
6957
6963
|
ref_key: "endTimePickerRef",
|
|
6958
6964
|
ref: v,
|
|
6959
6965
|
modelValue: s.endTime.value,
|
|
6960
|
-
"onUpdate:modelValue":
|
|
6966
|
+
"onUpdate:modelValue": L[3] || (L[3] = (b) => s.endTime.value = b),
|
|
6961
6967
|
clearable: !1,
|
|
6962
6968
|
"disabled-hours": t.disabledHours,
|
|
6963
6969
|
"disabled-minutes": t.disabledMinutes,
|
|
@@ -6970,15 +6976,15 @@ const Ge = new u5(), c5 = {
|
|
|
6970
6976
|
"use12-hours": t.use12Hours,
|
|
6971
6977
|
placeholder: "Кінцевий час",
|
|
6972
6978
|
type: "time",
|
|
6973
|
-
onChange:
|
|
6979
|
+
onChange: L[4] || (L[4] = (b) => u1(b, !0))
|
|
6974
6980
|
}, null, 8, ["modelValue", "disabled-hours", "disabled-minutes", "disabled-seconds", "hide-disabled-options", "hour-step", "minute-step", "second-step", "show-seconds", "use12-hours"])
|
|
6975
6981
|
])) : Z("", !0),
|
|
6976
6982
|
o("div", C0, [
|
|
6977
|
-
|
|
6983
|
+
L[13] || (L[13] = o("div", { class: "vt-datepicker__nav-spacer" }, null, -1)),
|
|
6978
6984
|
o("div", m0, [
|
|
6979
6985
|
o("button", {
|
|
6980
6986
|
class: "vt-datepicker__header-btn",
|
|
6981
|
-
onClick:
|
|
6987
|
+
onClick: L[5] || (L[5] = (b) => s.viewMode.value = "month")
|
|
6982
6988
|
}, R(s.rightCurrentDate.value.toLocaleString("default", { month: "long", year: "numeric" })), 1)
|
|
6983
6989
|
]),
|
|
6984
6990
|
o("button", {
|
|
@@ -7026,7 +7032,7 @@ const Ge = new u5(), c5 = {
|
|
|
7026
7032
|
ref_key: "startTimePickerRef",
|
|
7027
7033
|
ref: f,
|
|
7028
7034
|
modelValue: s.startTime.value,
|
|
7029
|
-
"onUpdate:modelValue":
|
|
7035
|
+
"onUpdate:modelValue": L[6] || (L[6] = (b) => s.startTime.value = b),
|
|
7030
7036
|
clearable: !1,
|
|
7031
7037
|
"disabled-hours": Fe.value,
|
|
7032
7038
|
"disabled-minutes": Ne.value,
|
|
@@ -7039,7 +7045,7 @@ const Ge = new u5(), c5 = {
|
|
|
7039
7045
|
"use12-hours": t.use12Hours,
|
|
7040
7046
|
placeholder: "Час",
|
|
7041
7047
|
type: "time",
|
|
7042
|
-
onChange:
|
|
7048
|
+
onChange: L[7] || (L[7] = (b) => u1(b, !1))
|
|
7043
7049
|
}, null, 8, ["modelValue", "disabled-hours", "disabled-minutes", "disabled-seconds", "hide-disabled-options", "hour-step", "minute-step", "second-step", "show-seconds", "use12-hours"])
|
|
7044
7050
|
])) : Z("", !0),
|
|
7045
7051
|
o("div", M0, [
|
|
@@ -7053,11 +7059,11 @@ const Ge = new u5(), c5 = {
|
|
|
7053
7059
|
s.viewMode.value === "date" ? (l(), a("button", {
|
|
7054
7060
|
key: 0,
|
|
7055
7061
|
class: "vt-datepicker__header-btn",
|
|
7056
|
-
onClick:
|
|
7062
|
+
onClick: L[8] || (L[8] = (b) => s.viewMode.value = "month")
|
|
7057
7063
|
}, R(s.currentDate.value.toLocaleString("default", { month: "long", year: "numeric" })), 1)) : s.viewMode.value === "month" ? (l(), a("button", {
|
|
7058
7064
|
key: 1,
|
|
7059
7065
|
class: "vt-datepicker__header-btn",
|
|
7060
|
-
onClick:
|
|
7066
|
+
onClick: L[9] || (L[9] = (b) => s.viewMode.value = "year")
|
|
7061
7067
|
}, R(s.currentDate.value.getFullYear()), 1)) : (l(), a("span", L0, R(O(he)), 1))
|
|
7062
7068
|
]),
|
|
7063
7069
|
o("button", {
|
|
@@ -7067,8 +7073,8 @@ const Ge = new u5(), c5 = {
|
|
|
7067
7073
|
ne(fe, { name: "arrowRight" })
|
|
7068
7074
|
])
|
|
7069
7075
|
]),
|
|
7070
|
-
o("div",
|
|
7071
|
-
s.viewMode.value === "date" ? (l(), a("div",
|
|
7076
|
+
o("div", S0, [
|
|
7077
|
+
s.viewMode.value === "date" ? (l(), a("div", V0, [
|
|
7072
7078
|
o("div", D0, [
|
|
7073
7079
|
(l(!0), a(ie, null, pe(O(M1), (b, H) => (l(), a("span", {
|
|
7074
7080
|
key: `${H}_${b}`,
|
|
@@ -7131,7 +7137,7 @@ const Ge = new u5(), c5 = {
|
|
|
7131
7137
|
], 2),
|
|
7132
7138
|
be.value ? (l(), a("div", j0, [
|
|
7133
7139
|
ne(Je, { onClick: ct }, {
|
|
7134
|
-
default: xe(() =>
|
|
7140
|
+
default: xe(() => L[14] || (L[14] = [
|
|
7135
7141
|
$e("Скасувати", -1)
|
|
7136
7142
|
])),
|
|
7137
7143
|
_: 1,
|
|
@@ -7142,7 +7148,7 @@ const Ge = new u5(), c5 = {
|
|
|
7142
7148
|
type: "primary",
|
|
7143
7149
|
onClick: ut
|
|
7144
7150
|
}, {
|
|
7145
|
-
default: xe(() =>
|
|
7151
|
+
default: xe(() => L[15] || (L[15] = [
|
|
7146
7152
|
$e(" OK ", -1)
|
|
7147
7153
|
])),
|
|
7148
7154
|
_: 1,
|
|
@@ -7177,14 +7183,14 @@ const Ge = new u5(), c5 = {
|
|
|
7177
7183
|
toggle: (f) => {
|
|
7178
7184
|
const v = [...i.value], h = v.indexOf(f);
|
|
7179
7185
|
if (c.value) {
|
|
7180
|
-
const
|
|
7181
|
-
t("update:modelValue",
|
|
7186
|
+
const _ = h > -1 ? [] : [f];
|
|
7187
|
+
t("update:modelValue", _), t("change", _);
|
|
7182
7188
|
} else
|
|
7183
7189
|
h > -1 ? v.splice(h, 1) : v.push(f), t("update:modelValue", v), t("change", v);
|
|
7184
7190
|
}
|
|
7185
7191
|
});
|
|
7186
7192
|
return p1("collapseContext", p), (f, v) => (l(), a("div", Z0, [
|
|
7187
|
-
|
|
7193
|
+
Ve(f.$slots, "default")
|
|
7188
7194
|
]));
|
|
7189
7195
|
}
|
|
7190
7196
|
}), O0 = { class: "v-collapse-item__title" }, Y0 = { class: "v-collapse-item__wrap" }, N0 = { class: "v-collapse-item__content" }, W0 = /* @__PURE__ */ we({
|
|
@@ -7199,34 +7205,34 @@ const Ge = new u5(), c5 = {
|
|
|
7199
7205
|
const r = n, t = e, i = v1("collapseContext");
|
|
7200
7206
|
if (!i)
|
|
7201
7207
|
throw new Error("VCollapseItem must be used within VCollapse");
|
|
7202
|
-
const c =
|
|
7208
|
+
const c = x(() => i.activeNames.includes(r.name)), d = () => {
|
|
7203
7209
|
r.disabled || (i.toggle(r.name), t("toggle", r.name));
|
|
7204
|
-
}, p = (
|
|
7205
|
-
const
|
|
7206
|
-
|
|
7207
|
-
}, f = (
|
|
7208
|
-
const
|
|
7209
|
-
|
|
7210
|
-
}, v = (
|
|
7211
|
-
const
|
|
7212
|
-
|
|
7213
|
-
}, h = (
|
|
7214
|
-
const
|
|
7215
|
-
|
|
7210
|
+
}, p = (_) => {
|
|
7211
|
+
const g = _;
|
|
7212
|
+
g.style.height = "0", g.style.overflow = "hidden", g.offsetHeight, g.style.height = g.scrollHeight + "px";
|
|
7213
|
+
}, f = (_) => {
|
|
7214
|
+
const g = _;
|
|
7215
|
+
g.style.height = g.scrollHeight + "px", g.style.overflow = "hidden", g.offsetHeight, g.style.height = "0";
|
|
7216
|
+
}, v = (_) => {
|
|
7217
|
+
const g = _;
|
|
7218
|
+
g.style.height = "auto", g.style.overflow = "visible";
|
|
7219
|
+
}, h = (_) => {
|
|
7220
|
+
const g = _;
|
|
7221
|
+
g.style.height = "0", g.style.overflow = "hidden";
|
|
7216
7222
|
};
|
|
7217
|
-
return (
|
|
7218
|
-
class: G([{ "is-active": c.value, "is-disabled":
|
|
7223
|
+
return (_, g) => (l(), a("div", {
|
|
7224
|
+
class: G([{ "is-active": c.value, "is-disabled": _.disabled }, "v-collapse-item"])
|
|
7219
7225
|
}, [
|
|
7220
7226
|
o("div", {
|
|
7221
7227
|
class: G([{ "is-active": c.value }, "v-collapse-item__header"]),
|
|
7222
7228
|
onClick: d
|
|
7223
7229
|
}, [
|
|
7224
7230
|
o("div", O0, [
|
|
7225
|
-
|
|
7231
|
+
Ve(_.$slots, "title", {
|
|
7226
7232
|
isActive: c.value,
|
|
7227
|
-
title:
|
|
7233
|
+
title: _.title
|
|
7228
7234
|
}, () => [
|
|
7229
|
-
$e(R(
|
|
7235
|
+
$e(R(_.title), 1)
|
|
7230
7236
|
])
|
|
7231
7237
|
]),
|
|
7232
7238
|
o("div", {
|
|
@@ -7245,7 +7251,7 @@ const Ge = new u5(), c5 = {
|
|
|
7245
7251
|
default: xe(() => [
|
|
7246
7252
|
i1(o("div", Y0, [
|
|
7247
7253
|
o("div", N0, [
|
|
7248
|
-
|
|
7254
|
+
Ve(_.$slots, "default")
|
|
7249
7255
|
])
|
|
7250
7256
|
], 512), [
|
|
7251
7257
|
[J1, c.value]
|
|
@@ -7265,23 +7271,23 @@ const Ge = new u5(), c5 = {
|
|
|
7265
7271
|
const r = n, t = e, i = h1(), c = B(r.modelValue), d = B([]);
|
|
7266
7272
|
Me(
|
|
7267
7273
|
() => r.modelValue,
|
|
7268
|
-
(
|
|
7269
|
-
c.value =
|
|
7274
|
+
(_) => {
|
|
7275
|
+
c.value = _;
|
|
7270
7276
|
}
|
|
7271
|
-
), Me(c, (
|
|
7272
|
-
|
|
7277
|
+
), Me(c, (_) => {
|
|
7278
|
+
_ !== r.modelValue && (t("update:modelValue", _), t("tab-change", _));
|
|
7273
7279
|
});
|
|
7274
|
-
const p = (
|
|
7275
|
-
d.value.push(
|
|
7276
|
-
}, f = (
|
|
7277
|
-
d.value = d.value.filter((
|
|
7278
|
-
}, v = (
|
|
7279
|
-
c.value =
|
|
7280
|
-
}, h = (
|
|
7280
|
+
const p = (_) => {
|
|
7281
|
+
d.value.push(_), c.value || (c.value = _.name);
|
|
7282
|
+
}, f = (_) => {
|
|
7283
|
+
d.value = d.value.filter((g) => g.name !== _), t("tab-remove", _), c.value === _ && d.value.length > 0 && (c.value = d.value[0].name);
|
|
7284
|
+
}, v = (_) => {
|
|
7285
|
+
c.value = _;
|
|
7286
|
+
}, h = (_) => {
|
|
7281
7287
|
var s;
|
|
7282
7288
|
const y = (((s = i.default) == null ? void 0 : s.call(i)) || []).find((N) => {
|
|
7283
7289
|
var j;
|
|
7284
|
-
return ((j = N.props) == null ? void 0 : j.name) ===
|
|
7290
|
+
return ((j = N.props) == null ? void 0 : j.name) === _.name;
|
|
7285
7291
|
});
|
|
7286
7292
|
return y && y.children && typeof y.children == "object" && "title" in y.children ? y.children.title : null;
|
|
7287
7293
|
};
|
|
@@ -7290,7 +7296,7 @@ const Ge = new u5(), c5 = {
|
|
|
7290
7296
|
addTab: p,
|
|
7291
7297
|
removeTab: f,
|
|
7292
7298
|
selectTab: v
|
|
7293
|
-
}), (
|
|
7299
|
+
}), (_, g) => (l(), a("div", q0, [
|
|
7294
7300
|
o("div", U0, [
|
|
7295
7301
|
(l(!0), a(ie, null, pe(d.value, (y) => (l(), a("div", {
|
|
7296
7302
|
key: y.name,
|
|
@@ -7314,14 +7320,14 @@ const Ge = new u5(), c5 = {
|
|
|
7314
7320
|
y.closable ? (l(), a("span", {
|
|
7315
7321
|
key: 2,
|
|
7316
7322
|
class: "vt-tabs__close",
|
|
7317
|
-
onClick:
|
|
7323
|
+
onClick: Se((s) => f(y.name), ["stop"])
|
|
7318
7324
|
}, [
|
|
7319
7325
|
ne(fe, { name: "close" })
|
|
7320
7326
|
], 8, Q0)) : Z("", !0)
|
|
7321
7327
|
], 10, K0))), 128))
|
|
7322
7328
|
]),
|
|
7323
7329
|
o("div", G0, [
|
|
7324
|
-
|
|
7330
|
+
Ve(_.$slots, "default")
|
|
7325
7331
|
])
|
|
7326
7332
|
]));
|
|
7327
7333
|
}
|
|
@@ -7340,7 +7346,7 @@ const Ge = new u5(), c5 = {
|
|
|
7340
7346
|
const r = v1("VTabsContext");
|
|
7341
7347
|
if (!r)
|
|
7342
7348
|
throw new Error("VTabItem must be used inside VTabs");
|
|
7343
|
-
const t =
|
|
7349
|
+
const t = x(() => r.currentValue.value === e.name);
|
|
7344
7350
|
return ze(() => {
|
|
7345
7351
|
e.name || console.warn("⚠️ VTabItem requires a unique `name` prop."), r.addTab({
|
|
7346
7352
|
label: e.label,
|
|
@@ -7352,7 +7358,7 @@ const Ge = new u5(), c5 = {
|
|
|
7352
7358
|
}), Q1(() => {
|
|
7353
7359
|
r.removeTab(e.name);
|
|
7354
7360
|
}), (i, c) => i1((l(), a("div", e4, [
|
|
7355
|
-
|
|
7361
|
+
Ve(i.$slots, "default")
|
|
7356
7362
|
], 512)), [
|
|
7357
7363
|
[J1, t.value]
|
|
7358
7364
|
]);
|
|
@@ -7406,38 +7412,38 @@ const n4 = { class: "vt-upload" }, o4 = { class: "vt-upload__text" }, s4 = { cla
|
|
|
7406
7412
|
},
|
|
7407
7413
|
emits: ["update:modelValue", "change", "remove", "exceed", "error"],
|
|
7408
7414
|
setup(n, { emit: e }) {
|
|
7409
|
-
const r = n, t = e, i = B(!1), c = B(null), d =
|
|
7415
|
+
const r = n, t = e, i = B(!1), c = B(null), d = x({
|
|
7410
7416
|
get: () => r.modelValue || [],
|
|
7411
|
-
set: (
|
|
7412
|
-
t("update:modelValue",
|
|
7417
|
+
set: (S) => {
|
|
7418
|
+
t("update:modelValue", S), t("change", S);
|
|
7413
7419
|
}
|
|
7414
|
-
}), p =
|
|
7420
|
+
}), p = x(() => {
|
|
7415
7421
|
if (r.tip) return r.tip;
|
|
7416
|
-
const
|
|
7422
|
+
const S = [];
|
|
7417
7423
|
if (r.accept) {
|
|
7418
|
-
const
|
|
7419
|
-
|
|
7424
|
+
const V = r.accept.split(",").map((T) => T.trim()).join("/");
|
|
7425
|
+
S.push(V);
|
|
7420
7426
|
}
|
|
7421
|
-
return r.maxSize &&
|
|
7422
|
-
}), f =
|
|
7423
|
-
r.disabled || (
|
|
7424
|
-
}, h = (
|
|
7425
|
-
r.disabled || (
|
|
7426
|
-
},
|
|
7427
|
+
return r.maxSize && S.push(`files with a size less than ${l1.formatFileSize(r.maxSize)}`), S.join(" ");
|
|
7428
|
+
}), f = x(() => r.maxFiles ? d.value.length < r.maxFiles : !0), v = (S) => {
|
|
7429
|
+
r.disabled || (S.preventDefault(), i.value = !0);
|
|
7430
|
+
}, h = (S) => {
|
|
7431
|
+
r.disabled || (S.preventDefault(), i.value = !1);
|
|
7432
|
+
}, _ = (S) => {
|
|
7427
7433
|
var T;
|
|
7428
7434
|
if (r.disabled) return;
|
|
7429
|
-
|
|
7430
|
-
const
|
|
7431
|
-
y(
|
|
7432
|
-
},
|
|
7433
|
-
const
|
|
7434
|
-
y(T),
|
|
7435
|
-
}, y = (
|
|
7435
|
+
S.preventDefault(), i.value = !1;
|
|
7436
|
+
const V = Array.from(((T = S.dataTransfer) == null ? void 0 : T.files) || []);
|
|
7437
|
+
y(V);
|
|
7438
|
+
}, g = (S) => {
|
|
7439
|
+
const V = S.target, T = Array.from(V.files || []);
|
|
7440
|
+
y(T), V.value = "";
|
|
7441
|
+
}, y = (S) => {
|
|
7436
7442
|
if (!f.value) {
|
|
7437
|
-
t("exceed",
|
|
7443
|
+
t("exceed", S);
|
|
7438
7444
|
return;
|
|
7439
7445
|
}
|
|
7440
|
-
const
|
|
7446
|
+
const V = r.maxFiles ? r.maxFiles - d.value.length : S.length, T = S.slice(0, V), U = [];
|
|
7441
7447
|
for (const q of T) {
|
|
7442
7448
|
const E = s(q);
|
|
7443
7449
|
if (E) {
|
|
@@ -7454,34 +7460,34 @@ const n4 = { class: "vt-upload" }, o4 = { class: "vt-upload__text" }, s4 = { cla
|
|
|
7454
7460
|
};
|
|
7455
7461
|
U.push(D);
|
|
7456
7462
|
}
|
|
7457
|
-
U.length > 0 && (d.value = [...d.value, ...U]),
|
|
7458
|
-
}, s = (
|
|
7463
|
+
U.length > 0 && (d.value = [...d.value, ...U]), S.length > V && t("exceed", S.slice(V));
|
|
7464
|
+
}, s = (S) => r.maxSize && !l1.validateSize(S, r.maxSize) ? {
|
|
7459
7465
|
type: "size",
|
|
7460
7466
|
message: `File size exceeds ${l1.formatFileSize(r.maxSize)}`,
|
|
7461
|
-
file:
|
|
7462
|
-
} : r.accept && !l1.validateType(
|
|
7467
|
+
file: S
|
|
7468
|
+
} : r.accept && !l1.validateType(S, r.accept) ? {
|
|
7463
7469
|
type: "type",
|
|
7464
7470
|
message: `File type not accepted. Allowed: ${r.accept}`,
|
|
7465
|
-
file:
|
|
7466
|
-
} : null, N = (
|
|
7467
|
-
d.value = d.value.filter((
|
|
7471
|
+
file: S
|
|
7472
|
+
} : null, N = (S) => {
|
|
7473
|
+
d.value = d.value.filter((V) => V.id !== S.id), t("remove", S);
|
|
7468
7474
|
}, j = () => {
|
|
7469
|
-
var
|
|
7470
|
-
r.disabled || !f.value || (
|
|
7475
|
+
var S;
|
|
7476
|
+
r.disabled || !f.value || (S = c.value) == null || S.click();
|
|
7471
7477
|
};
|
|
7472
|
-
return (
|
|
7473
|
-
|
|
7478
|
+
return (S, V) => (l(), a("div", n4, [
|
|
7479
|
+
S.type === "drag" ? (l(), a("div", {
|
|
7474
7480
|
key: 0,
|
|
7475
7481
|
class: G([{
|
|
7476
7482
|
"vt-upload__drag-area--active": i.value,
|
|
7477
|
-
"vt-upload__drag-area--disabled":
|
|
7483
|
+
"vt-upload__drag-area--disabled": S.disabled || !f.value
|
|
7478
7484
|
}, "vt-upload__drag-area"]),
|
|
7479
7485
|
onClick: j,
|
|
7480
7486
|
onDragleave: h,
|
|
7481
7487
|
onDragover: v,
|
|
7482
|
-
onDrop:
|
|
7488
|
+
onDrop: _
|
|
7483
7489
|
}, [
|
|
7484
|
-
|
|
7490
|
+
V[0] || (V[0] = o("div", { class: "vt-upload__icon" }, [
|
|
7485
7491
|
o("svg", {
|
|
7486
7492
|
fill: "none",
|
|
7487
7493
|
viewBox: "0 0 24 24",
|
|
@@ -7505,19 +7511,19 @@ const n4 = { class: "vt-upload" }, o4 = { class: "vt-upload__text" }, s4 = { cla
|
|
|
7505
7511
|
], -1)),
|
|
7506
7512
|
o("div", o4, [
|
|
7507
7513
|
o("span", s4, [
|
|
7508
|
-
$e(R(
|
|
7509
|
-
o("span", r4, " or " + R(
|
|
7514
|
+
$e(R(S.placeholder.split(" or ")[0]) + " ", 1),
|
|
7515
|
+
o("span", r4, " or " + R(S.placeholder.split(" or ")[1]), 1)
|
|
7510
7516
|
])
|
|
7511
7517
|
]),
|
|
7512
7518
|
p.value ? (l(), a("div", l4, R(p.value), 1)) : Z("", !0)
|
|
7513
7519
|
], 34)) : (l(), ge(Je, {
|
|
7514
7520
|
key: 1,
|
|
7515
|
-
disabled:
|
|
7521
|
+
disabled: S.disabled || !f.value,
|
|
7516
7522
|
icon: "uploadCloud",
|
|
7517
7523
|
type: "primary",
|
|
7518
7524
|
onClick: j
|
|
7519
7525
|
}, {
|
|
7520
|
-
default: xe(() =>
|
|
7526
|
+
default: xe(() => V[1] || (V[1] = [
|
|
7521
7527
|
$e(" Upload Files ", -1)
|
|
7522
7528
|
])),
|
|
7523
7529
|
_: 1,
|
|
@@ -7536,7 +7542,7 @@ const n4 = { class: "vt-upload" }, o4 = { class: "vt-upload__text" }, s4 = { cla
|
|
|
7536
7542
|
o("div", d4, R(O(l1).formatFileSize(T.size)), 1)
|
|
7537
7543
|
]),
|
|
7538
7544
|
o("button", {
|
|
7539
|
-
disabled:
|
|
7545
|
+
disabled: S.disabled,
|
|
7540
7546
|
class: "vt-upload__list-item-remove",
|
|
7541
7547
|
type: "button",
|
|
7542
7548
|
onClick: (U) => N(T)
|
|
@@ -7548,12 +7554,12 @@ const n4 = { class: "vt-upload" }, o4 = { class: "vt-upload__text" }, s4 = { cla
|
|
|
7548
7554
|
o("input", {
|
|
7549
7555
|
ref_key: "fileInputRef",
|
|
7550
7556
|
ref: c,
|
|
7551
|
-
accept:
|
|
7552
|
-
disabled:
|
|
7553
|
-
multiple:
|
|
7557
|
+
accept: S.accept,
|
|
7558
|
+
disabled: S.disabled,
|
|
7559
|
+
multiple: S.multiple,
|
|
7554
7560
|
class: "vt-upload__input",
|
|
7555
7561
|
type: "file",
|
|
7556
|
-
onChange:
|
|
7562
|
+
onChange: g
|
|
7557
7563
|
}, null, 40, p4)
|
|
7558
7564
|
]));
|
|
7559
7565
|
}
|
|
@@ -7623,7 +7629,7 @@ const n4 = { class: "vt-upload" }, o4 = { class: "vt-upload__text" }, s4 = { cla
|
|
|
7623
7629
|
break;
|
|
7624
7630
|
}
|
|
7625
7631
|
return r.appendChild(t), r;
|
|
7626
|
-
},
|
|
7632
|
+
}, V1 = (n, e, r) => {
|
|
7627
7633
|
const t = e.getBoundingClientRect(), i = n.getBoundingClientRect(), c = window.pageXOffset || document.documentElement.scrollLeft, d = window.pageYOffset || document.documentElement.scrollTop;
|
|
7628
7634
|
let p = 0, f = 0;
|
|
7629
7635
|
switch (r) {
|
|
@@ -7643,7 +7649,7 @@ const n4 = { class: "vt-upload" }, o4 = { class: "vt-upload__text" }, s4 = { cla
|
|
|
7643
7649
|
const v = window.innerWidth, h = window.innerHeight;
|
|
7644
7650
|
f < 8 ? f = 8 : f + i.width > v - 8 && (f = v - i.width - 8), p < d + 8 ? r === "top" ? p = t.bottom + d + 8 : p = d + 8 : p + i.height > d + h - 8 && (r === "bottom" ? p = t.top + d - i.height - 8 : p = d + h - i.height - 8), n.style.top = `${p}px`, n.style.left = `${f}px`;
|
|
7645
7651
|
}, Y1 = (n, e, r) => {
|
|
7646
|
-
n.parentElement || document.body.appendChild(n), n.style.visibility = "visible",
|
|
7652
|
+
n.parentElement || document.body.appendChild(n), n.style.visibility = "visible", V1(n, e, r), requestAnimationFrame(() => {
|
|
7647
7653
|
n.style.opacity = "1";
|
|
7648
7654
|
});
|
|
7649
7655
|
}, N1 = (n) => {
|
|
@@ -7660,7 +7666,7 @@ const n4 = { class: "vt-upload" }, o4 = { class: "vt-upload__text" }, s4 = { cla
|
|
|
7660
7666
|
}, d = () => {
|
|
7661
7667
|
N1(i);
|
|
7662
7668
|
}, p = () => {
|
|
7663
|
-
i.style.opacity === "1" &&
|
|
7669
|
+
i.style.opacity === "1" && V1(i, n, t);
|
|
7664
7670
|
};
|
|
7665
7671
|
n.__mouseenterHandler = c, n.__mouseleaveHandler = d, n.__scrollHandler = p, n.addEventListener("mouseenter", c), n.addEventListener("mouseleave", d), window.addEventListener("scroll", p, !0), window.addEventListener("resize", p);
|
|
7666
7672
|
},
|
|
@@ -7677,7 +7683,7 @@ const n4 = { class: "vt-upload" }, o4 = { class: "vt-upload__text" }, s4 = { cla
|
|
|
7677
7683
|
}, p = () => {
|
|
7678
7684
|
N1(c);
|
|
7679
7685
|
}, f = () => {
|
|
7680
|
-
c.style.opacity === "1" &&
|
|
7686
|
+
c.style.opacity === "1" && V1(c, n, i);
|
|
7681
7687
|
};
|
|
7682
7688
|
n.__mouseenterHandler = d, n.__mouseleaveHandler = p, n.__scrollHandler = f, n.addEventListener("mouseenter", d), n.addEventListener("mouseleave", p), window.addEventListener("scroll", f, !0), window.addEventListener("resize", f);
|
|
7683
7689
|
}
|
|
@@ -7880,10 +7886,10 @@ f1("email", L4);
|
|
|
7880
7886
|
const U4 = (n, e) => Object.assign(
|
|
7881
7887
|
(r) => r === n() || e || "Значення не співпадає",
|
|
7882
7888
|
{ $params: { eq: n }, $validatorName: "sameAs" }
|
|
7883
|
-
),
|
|
7884
|
-
f1("numeric",
|
|
7885
|
-
const
|
|
7886
|
-
f1("containUpperCaseLetter",
|
|
7889
|
+
), S4 = (n) => (n == null || n === "" ? !0 : !isNaN(Number(n))) || "Повинно бути числом";
|
|
7890
|
+
f1("numeric", S4);
|
|
7891
|
+
const V4 = (n) => n == null || n === "" ? !0 : /[A-Z]/.test(n) || "Має містити хоча б одну велику літеру";
|
|
7892
|
+
f1("containUpperCaseLetter", V4);
|
|
7887
7893
|
const D4 = (n) => n == null || n === "" ? !0 : !/\s/.test(n) || "Не повинно містити пробілів";
|
|
7888
7894
|
f1("noSpaces", D4);
|
|
7889
7895
|
const K4 = (n, e = "Значення вже зайнято") => Object.assign(async (t) => t == null || t === "" ? !0 : await n(t) || e, { $async: !0, $validatorName: "uniqueAsync" });
|
|
@@ -7921,41 +7927,41 @@ function T4(n, e) {
|
|
|
7921
7927
|
function I4(n, e, r, t) {
|
|
7922
7928
|
const i = T4(n, e), c = B(!1), d = B(!1), p = B(!1), f = { t: 0 };
|
|
7923
7929
|
let v = !1, h = [];
|
|
7924
|
-
const
|
|
7925
|
-
async function
|
|
7930
|
+
const _ = B([]);
|
|
7931
|
+
async function g(s) {
|
|
7926
7932
|
const N = ++f.t;
|
|
7927
7933
|
p.value = !0;
|
|
7928
7934
|
const j = [];
|
|
7929
|
-
for (const
|
|
7935
|
+
for (const S of r)
|
|
7930
7936
|
try {
|
|
7931
|
-
const
|
|
7937
|
+
const V = S, T = V.$async ? await S(s) : S(s), U = await Promise.resolve(T);
|
|
7932
7938
|
if (U !== !0) {
|
|
7933
7939
|
if (typeof U == "string")
|
|
7934
7940
|
j.push({
|
|
7935
7941
|
$message: U,
|
|
7936
|
-
$validator:
|
|
7937
|
-
$params:
|
|
7942
|
+
$validator: V.$validatorName || V.name || "validator",
|
|
7943
|
+
$params: V.$params
|
|
7938
7944
|
});
|
|
7939
7945
|
else if (U === !1) {
|
|
7940
|
-
const q = typeof
|
|
7946
|
+
const q = typeof V.$message == "function" ? V.$message(V.$params) : V.$message || "Невалідне поле";
|
|
7941
7947
|
j.push({
|
|
7942
7948
|
$message: q,
|
|
7943
|
-
$validator:
|
|
7944
|
-
$params:
|
|
7949
|
+
$validator: V.$validatorName || V.name || "validator",
|
|
7950
|
+
$params: V.$params
|
|
7945
7951
|
});
|
|
7946
7952
|
}
|
|
7947
7953
|
}
|
|
7948
|
-
} catch (
|
|
7949
|
-
const T =
|
|
7954
|
+
} catch (V) {
|
|
7955
|
+
const T = S;
|
|
7950
7956
|
j.push({
|
|
7951
|
-
$message: (
|
|
7957
|
+
$message: (V == null ? void 0 : V.message) || "Validator error",
|
|
7952
7958
|
$validator: T.$validatorName || T.name || "validator"
|
|
7953
7959
|
});
|
|
7954
7960
|
}
|
|
7955
7961
|
if (h.length)
|
|
7956
|
-
for (const
|
|
7957
|
-
j.push({ $message:
|
|
7958
|
-
N === f.t && (
|
|
7962
|
+
for (const S of h)
|
|
7963
|
+
j.push({ $message: S.$message, $validator: S.$validator || "external" });
|
|
7964
|
+
N === f.t && (_.value = j, p.value = !1);
|
|
7959
7965
|
}
|
|
7960
7966
|
Me(
|
|
7961
7967
|
() => {
|
|
@@ -7963,7 +7969,7 @@ function I4(n, e, r, t) {
|
|
|
7963
7969
|
return at(s, e);
|
|
7964
7970
|
},
|
|
7965
7971
|
() => {
|
|
7966
|
-
v || (c.value = !0,
|
|
7972
|
+
v || (c.value = !0, g(i.value));
|
|
7967
7973
|
}
|
|
7968
7974
|
);
|
|
7969
7975
|
const y = H1({
|
|
@@ -7983,25 +7989,25 @@ function I4(n, e, r, t) {
|
|
|
7983
7989
|
return p.value;
|
|
7984
7990
|
},
|
|
7985
7991
|
get $invalid() {
|
|
7986
|
-
return
|
|
7992
|
+
return _.value && _.value.length > 0;
|
|
7987
7993
|
},
|
|
7988
7994
|
get $error() {
|
|
7989
7995
|
return y.$dirty && y.$invalid;
|
|
7990
7996
|
},
|
|
7991
7997
|
get $errors() {
|
|
7992
|
-
return t.silentErrors ? [] :
|
|
7998
|
+
return t.silentErrors ? [] : _.value.map((s) => ({ ...s }));
|
|
7993
7999
|
},
|
|
7994
8000
|
$params: r.length ? r[0].$params || {} : void 0,
|
|
7995
8001
|
$touch() {
|
|
7996
8002
|
c.value = !0, d.value = !0;
|
|
7997
8003
|
},
|
|
7998
8004
|
$reset() {
|
|
7999
|
-
v = !0, c.value = !1, d.value = !1,
|
|
8005
|
+
v = !0, c.value = !1, d.value = !1, _.value = [], p.value = !1, queueMicrotask(() => {
|
|
8000
8006
|
v = !1;
|
|
8001
8007
|
});
|
|
8002
8008
|
},
|
|
8003
8009
|
async $validate() {
|
|
8004
|
-
return c.value = !0, await
|
|
8010
|
+
return c.value = !0, await g(i.value), !_.value.length;
|
|
8005
8011
|
}
|
|
8006
8012
|
});
|
|
8007
8013
|
return y.$setExternalResults = (s) => {
|
|
@@ -8012,53 +8018,53 @@ function I4(n, e, r, t) {
|
|
|
8012
8018
|
}
|
|
8013
8019
|
function X4(n, e, r) {
|
|
8014
8020
|
const t = { silentErrors: !!(r != null && r.silentErrors) }, i = typeof n == "function" ? n() : n, c = (_1(e), e);
|
|
8015
|
-
function d(h,
|
|
8016
|
-
const
|
|
8021
|
+
function d(h, _ = "") {
|
|
8022
|
+
const g = {}, y = Object.keys(h || {});
|
|
8017
8023
|
for (const E of y) {
|
|
8018
|
-
const D = h[E], Q =
|
|
8024
|
+
const D = h[E], Q = _ ? `${_}.${E}` : E;
|
|
8019
8025
|
if (typeof D == "function" || Array.isArray(D) && D.length > 0 && typeof D[0] == "function") {
|
|
8020
8026
|
const oe = Array.isArray(D) ? D : [D];
|
|
8021
|
-
|
|
8022
|
-
} else typeof D == "object" && D !== null ? typeof D == "object" && Array.isArray(D) === !1 && (
|
|
8027
|
+
g[E] = I4(c, Q, oe, t);
|
|
8028
|
+
} else typeof D == "object" && D !== null ? typeof D == "object" && Array.isArray(D) === !1 && (g[E] = d(D, Q)) : g[E] = d({}, Q);
|
|
8023
8029
|
}
|
|
8024
8030
|
const s = async () => {
|
|
8025
8031
|
const E = [];
|
|
8026
|
-
for (const D of Object.keys(
|
|
8032
|
+
for (const D of Object.keys(g)) {
|
|
8027
8033
|
if (D.startsWith("$")) continue;
|
|
8028
|
-
const Q =
|
|
8034
|
+
const Q = g[D];
|
|
8029
8035
|
Q && typeof Q.$validate == "function" && E.push(await Q.$validate());
|
|
8030
8036
|
}
|
|
8031
8037
|
return E.every(Boolean);
|
|
8032
8038
|
}, N = () => {
|
|
8033
|
-
for (const E of Object.keys(
|
|
8039
|
+
for (const E of Object.keys(g)) {
|
|
8034
8040
|
if (E.startsWith("$")) continue;
|
|
8035
|
-
const D =
|
|
8041
|
+
const D = g[E];
|
|
8036
8042
|
D && typeof D.$touch == "function" && D.$touch();
|
|
8037
8043
|
}
|
|
8038
8044
|
}, j = () => {
|
|
8039
|
-
for (const E of Object.keys(
|
|
8045
|
+
for (const E of Object.keys(g)) {
|
|
8040
8046
|
if (E.startsWith("$")) continue;
|
|
8041
|
-
const D =
|
|
8047
|
+
const D = g[E];
|
|
8042
8048
|
D && typeof D.$reset == "function" && D.$reset();
|
|
8043
8049
|
}
|
|
8044
|
-
},
|
|
8045
|
-
const D =
|
|
8050
|
+
}, S = x(() => Object.keys(g).some((E) => {
|
|
8051
|
+
const D = g[E];
|
|
8046
8052
|
return D && D.$dirty;
|
|
8047
|
-
})),
|
|
8048
|
-
const D =
|
|
8053
|
+
})), V = x(() => Object.keys(g).some((E) => {
|
|
8054
|
+
const D = g[E];
|
|
8049
8055
|
return D && D.$invalid;
|
|
8050
|
-
})), T =
|
|
8051
|
-
const D =
|
|
8056
|
+
})), T = x(() => Object.keys(g).some((E) => {
|
|
8057
|
+
const D = g[E];
|
|
8052
8058
|
return D && D.$error;
|
|
8053
|
-
})), U =
|
|
8054
|
-
const D =
|
|
8059
|
+
})), U = x(() => Object.keys(g).some((E) => {
|
|
8060
|
+
const D = g[E];
|
|
8055
8061
|
return D && D.$pending;
|
|
8056
8062
|
})), q = {
|
|
8057
8063
|
$validate: s,
|
|
8058
8064
|
$touch: N,
|
|
8059
8065
|
$reset: j,
|
|
8060
|
-
$anyDirty:
|
|
8061
|
-
$anyInvalid:
|
|
8066
|
+
$anyDirty: S,
|
|
8067
|
+
$anyInvalid: V,
|
|
8062
8068
|
$anyError: T,
|
|
8063
8069
|
$pending: U,
|
|
8064
8070
|
$silentErrors: t.silentErrors,
|
|
@@ -8091,20 +8097,20 @@ function X4(n, e, r) {
|
|
|
8091
8097
|
});
|
|
8092
8098
|
}
|
|
8093
8099
|
};
|
|
8094
|
-
return Object.assign(
|
|
8100
|
+
return Object.assign(g, q), g;
|
|
8095
8101
|
}
|
|
8096
|
-
function p(h,
|
|
8102
|
+
function p(h, _) {
|
|
8097
8103
|
if (!(!h || typeof h != "object"))
|
|
8098
|
-
for (const
|
|
8099
|
-
if (
|
|
8100
|
-
const y = h[
|
|
8101
|
-
y && typeof y == "object" && (typeof y.$validate == "function" && typeof y.$model < "u" ?
|
|
8104
|
+
for (const g of Object.keys(h)) {
|
|
8105
|
+
if (g.startsWith("$")) continue;
|
|
8106
|
+
const y = h[g];
|
|
8107
|
+
y && typeof y == "object" && (typeof y.$validate == "function" && typeof y.$model < "u" ? _(y) : p(y, _));
|
|
8102
8108
|
}
|
|
8103
8109
|
}
|
|
8104
|
-
function f(h,
|
|
8105
|
-
const
|
|
8110
|
+
function f(h, _) {
|
|
8111
|
+
const g = _.split(".");
|
|
8106
8112
|
let y = h;
|
|
8107
|
-
for (const s of
|
|
8113
|
+
for (const s of g) {
|
|
8108
8114
|
if (!y) return;
|
|
8109
8115
|
y = y[s];
|
|
8110
8116
|
}
|
|
@@ -8162,14 +8168,14 @@ export {
|
|
|
8162
8168
|
tt as VtSelectContextKey,
|
|
8163
8169
|
Z4 as WEEKDAY_NAMES,
|
|
8164
8170
|
M1 as WEEKDAY_NAMES_SHORT,
|
|
8165
|
-
|
|
8171
|
+
V4 as containUpperCaseLetter,
|
|
8166
8172
|
B4 as default,
|
|
8167
8173
|
L4 as email,
|
|
8168
8174
|
X5 as formatTime,
|
|
8169
8175
|
x1 as generateTimeOptions,
|
|
8170
8176
|
G4 as install,
|
|
8171
8177
|
F1 as isValidDate,
|
|
8172
|
-
|
|
8178
|
+
S1 as isValidTimeString,
|
|
8173
8179
|
C4 as loaderDirective,
|
|
8174
8180
|
q4 as maxLength,
|
|
8175
8181
|
Xe as messageManager,
|
|
@@ -8177,7 +8183,7 @@ export {
|
|
|
8177
8183
|
N4 as mk,
|
|
8178
8184
|
Ge as modalManager,
|
|
8179
8185
|
D4 as noSpaces,
|
|
8180
|
-
|
|
8186
|
+
S4 as numeric,
|
|
8181
8187
|
Q5 as parseTimeString,
|
|
8182
8188
|
x4 as required,
|
|
8183
8189
|
U4 as sameAs,
|