voiptime-components 1.3.1 → 1.3.3
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 +336 -335
- 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 i, openBlock as o, createElementVNode as l, createStaticVNode as Ne, defineComponent as pe, computed as I, createBlock as ue, createCommentVNode as j, resolveDynamicComponent as Ge, normalizeStyle as Ce, useSlots as Pe, resolveDirective as
|
|
1
|
+
import { createElementBlock as i, openBlock as o, createElementVNode as l, createStaticVNode as Ne, defineComponent as pe, computed as I, createBlock as ue, createCommentVNode as j, resolveDynamicComponent as Ge, normalizeStyle as Ce, useSlots as Pe, resolveDirective as ct, withDirectives as Qe, normalizeClass as Y, renderSlot as _e, Teleport as Je, withModifiers as ye, toDisplayString as Q, watch as ge, Fragment as ve, renderList as fe, vModelSelect as Ct, createVNode as U, withCtx as be, createTextVNode as Ie, ref as E, provide as et, onMounted as xe, onUnmounted as je, nextTick as Ve, inject as tt, createApp as wt, h as qe, mergeModels as nt, useModel as gt, reactive as _t, unref as ae, Transition as ot, onBeforeUnmount as kt } from "vue";
|
|
2
2
|
const y = (n, e) => {
|
|
3
3
|
const r = n.__vccOpts || n;
|
|
4
4
|
for (const [t, s] of e)
|
|
@@ -219,7 +219,7 @@ const i1 = /* @__PURE__ */ y(l1, [["render", r1]]), a1 = {}, u1 = {
|
|
|
219
219
|
width: "20",
|
|
220
220
|
xmlns: "http://www.w3.org/2000/svg"
|
|
221
221
|
};
|
|
222
|
-
function
|
|
222
|
+
function d1(n, e) {
|
|
223
223
|
return o(), i("svg", u1, e[0] || (e[0] = [
|
|
224
224
|
l("path", {
|
|
225
225
|
d: "M12.6464 5.83144L7.15803 11.3198C6.99884 11.4735 6.87187 11.6574 6.78453 11.8608C6.69718 12.0641 6.6512 12.2828 6.64928 12.5041C6.64735 12.7254 6.68952 12.9449 6.77332 13.1497C6.85713 13.3545 6.98088 13.5406 7.13737 13.6971C7.29386 13.8536 7.47994 13.9773 7.68477 14.0611C7.8896 14.1449 8.10906 14.1871 8.33036 14.1852C8.55166 14.1833 8.77036 14.1373 8.9737 14.0499C9.17704 13.9626 9.36095 13.8356 9.51469 13.6764L14.8597 8.1881C15.4669 7.55943 15.8029 6.71742 15.7953 5.84343C15.7877 4.96944 15.4371 4.1334 14.8191 3.51537C14.2011 2.89735 13.365 2.54678 12.491 2.53919C11.617 2.53159 10.775 2.86758 10.1464 3.47477L4.80053 8.96227C3.86277 9.90003 3.33594 11.1719 3.33594 12.4981C3.33594 13.8243 3.86277 15.0962 4.80053 16.0339C5.73829 16.9717 7.01017 17.4985 8.33636 17.4985C9.66256 17.4985 10.9344 16.9717 11.8722 16.0339L17.0864 10.8314",
|
|
@@ -230,7 +230,7 @@ function c1(n, e) {
|
|
|
230
230
|
}, null, -1)
|
|
231
231
|
]));
|
|
232
232
|
}
|
|
233
|
-
const
|
|
233
|
+
const c1 = /* @__PURE__ */ y(a1, [["render", d1]]), h1 = {}, p1 = {
|
|
234
234
|
width: "20",
|
|
235
235
|
height: "20",
|
|
236
236
|
viewBox: "0 0 20 20",
|
|
@@ -516,7 +516,7 @@ function un(n, e) {
|
|
|
516
516
|
}, null, -1)
|
|
517
517
|
]));
|
|
518
518
|
}
|
|
519
|
-
const
|
|
519
|
+
const dn = /* @__PURE__ */ y(rn, [["render", un]]), cn = {}, hn = {
|
|
520
520
|
width: "20",
|
|
521
521
|
height: "20",
|
|
522
522
|
viewBox: "0 0 20 20",
|
|
@@ -534,7 +534,7 @@ function pn(n, e) {
|
|
|
534
534
|
}, null, -1)
|
|
535
535
|
]));
|
|
536
536
|
}
|
|
537
|
-
const vn = /* @__PURE__ */ y(
|
|
537
|
+
const vn = /* @__PURE__ */ y(cn, [["render", pn]]), fn = {}, mn = {
|
|
538
538
|
fill: "none",
|
|
539
539
|
height: "20",
|
|
540
540
|
viewBox: "0 0 20 20",
|
|
@@ -1151,7 +1151,7 @@ const il = /* @__PURE__ */ y(ll, [["render", rl]]), al = {}, ul = {
|
|
|
1151
1151
|
width: "20",
|
|
1152
1152
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1153
1153
|
};
|
|
1154
|
-
function
|
|
1154
|
+
function dl(n, e) {
|
|
1155
1155
|
return o(), i("svg", ul, e[0] || (e[0] = [
|
|
1156
1156
|
l("path", {
|
|
1157
1157
|
d: "M5.10938 6.41406L9.00209 9.00921L12.8948 6.41406",
|
|
@@ -1178,7 +1178,7 @@ function cl(n, e) {
|
|
|
1178
1178
|
}, null, -1)
|
|
1179
1179
|
]));
|
|
1180
1180
|
}
|
|
1181
|
-
const
|
|
1181
|
+
const cl = /* @__PURE__ */ y(al, [["render", dl]]), hl = {}, pl = {
|
|
1182
1182
|
fill: "none",
|
|
1183
1183
|
height: "20",
|
|
1184
1184
|
viewBox: "0 0 20 20",
|
|
@@ -1422,7 +1422,7 @@ const ts = /* @__PURE__ */ y(Ql, [["render", es]]), ns = {
|
|
|
1422
1422
|
goTo: Jt,
|
|
1423
1423
|
listBulletHorizontal: o1,
|
|
1424
1424
|
listBullet: i1,
|
|
1425
|
-
paperClip:
|
|
1425
|
+
paperClip: c1,
|
|
1426
1426
|
plusRound: f1,
|
|
1427
1427
|
prompt: g1,
|
|
1428
1428
|
prompter: y1,
|
|
@@ -1436,7 +1436,7 @@ const ts = /* @__PURE__ */ y(Ql, [["render", es]]), ns = {
|
|
|
1436
1436
|
arrowDown: G1,
|
|
1437
1437
|
arrowLeft: tn,
|
|
1438
1438
|
arrowReload: sn,
|
|
1439
|
-
arrowRight:
|
|
1439
|
+
arrowRight: dn,
|
|
1440
1440
|
arrowTop: vn,
|
|
1441
1441
|
// files icons
|
|
1442
1442
|
emptyImg: wn,
|
|
@@ -1467,7 +1467,7 @@ const ts = /* @__PURE__ */ y(Ql, [["render", es]]), ns = {
|
|
|
1467
1467
|
emailIncoming: Jo,
|
|
1468
1468
|
emailNew: ol,
|
|
1469
1469
|
emailOutgoing: il,
|
|
1470
|
-
emailQueue:
|
|
1470
|
+
emailQueue: cl,
|
|
1471
1471
|
emailSpam: fl,
|
|
1472
1472
|
// table icons
|
|
1473
1473
|
columnInsert: gl,
|
|
@@ -1522,8 +1522,8 @@ const Ae = /* @__PURE__ */ y(os, [["render", ss]]), rs = ["disabled", "type", "d
|
|
|
1522
1522
|
setup(n, { emit: e }) {
|
|
1523
1523
|
const r = n, t = e, s = Pe(), a = I(() => !!(r.icon && r.shape)), u = I(() => {
|
|
1524
1524
|
var V, x;
|
|
1525
|
-
const
|
|
1526
|
-
return ((x = (V =
|
|
1525
|
+
const c = s.default ? s.default({}) : null;
|
|
1526
|
+
return ((x = (V = c == null ? void 0 : c[0]) == null ? void 0 : V.children) == null ? void 0 : x.toString()) ?? "";
|
|
1527
1527
|
}), v = I(() => [
|
|
1528
1528
|
"vt-button",
|
|
1529
1529
|
`vt-button--${r.type}`,
|
|
@@ -1533,11 +1533,11 @@ const Ae = /* @__PURE__ */ y(os, [["render", ss]]), rs = ["disabled", "type", "d
|
|
|
1533
1533
|
"vt-button--disabled": r.disabled || r.loading,
|
|
1534
1534
|
"vt-button--loading": r.loading
|
|
1535
1535
|
}
|
|
1536
|
-
]), h = I(() => a.value && r.tooltip ? u.value : null), m = (
|
|
1537
|
-
!r.disabled && !r.loading && t("click",
|
|
1536
|
+
]), h = I(() => a.value && r.tooltip ? u.value : null), m = (c) => {
|
|
1537
|
+
!r.disabled && !r.loading && t("click", c);
|
|
1538
1538
|
};
|
|
1539
|
-
return (
|
|
1540
|
-
const x =
|
|
1539
|
+
return (c, V) => {
|
|
1540
|
+
const x = ct("tooltip");
|
|
1541
1541
|
return Qe((o(), i("button", {
|
|
1542
1542
|
class: Y(v.value),
|
|
1543
1543
|
disabled: r.disabled || r.loading,
|
|
@@ -1554,7 +1554,7 @@ const Ae = /* @__PURE__ */ y(os, [["render", ss]]), rs = ["disabled", "type", "d
|
|
|
1554
1554
|
class: "vt-button__icon"
|
|
1555
1555
|
}, null, 8, ["name"])) : j("", !0),
|
|
1556
1556
|
a.value ? j("", !0) : (o(), i("span", is, [
|
|
1557
|
-
_e(
|
|
1557
|
+
_e(c.$slots, "default")
|
|
1558
1558
|
]))
|
|
1559
1559
|
], 10, rs)), [
|
|
1560
1560
|
[x, h.value]
|
|
@@ -1567,7 +1567,7 @@ const Ae = /* @__PURE__ */ y(os, [["render", ss]]), rs = ["disabled", "type", "d
|
|
|
1567
1567
|
}, us = {
|
|
1568
1568
|
key: 0,
|
|
1569
1569
|
class: "vt-modal__title"
|
|
1570
|
-
},
|
|
1570
|
+
}, ds = { class: "vt-modal__content" }, ht = /* @__PURE__ */ pe({
|
|
1571
1571
|
__name: "VModal",
|
|
1572
1572
|
props: {
|
|
1573
1573
|
modelValue: { type: Boolean },
|
|
@@ -1607,14 +1607,14 @@ const Ae = /* @__PURE__ */ y(os, [["render", ss]]), rs = ["disabled", "type", "d
|
|
|
1607
1607
|
onClick: u
|
|
1608
1608
|
})) : j("", !0)
|
|
1609
1609
|
])) : j("", !0),
|
|
1610
|
-
l("div",
|
|
1610
|
+
l("div", ds, [
|
|
1611
1611
|
_e(h.$slots, "default")
|
|
1612
1612
|
])
|
|
1613
1613
|
], 2)
|
|
1614
1614
|
], 4)) : j("", !0)
|
|
1615
1615
|
]));
|
|
1616
1616
|
}
|
|
1617
|
-
}),
|
|
1617
|
+
}), cs = { class: "vt-pagination" }, hs = { class: "vt-pagination__info" }, ps = { class: "vt-pagination__rows-per-page" }, vs = ["value"], fs = { class: "vt-pagination__navigation" }, ms = ["disabled"], Cs = ["onClick"], ws = ["disabled"], gs = /* @__PURE__ */ pe({
|
|
1618
1618
|
__name: "VPagination",
|
|
1619
1619
|
props: {
|
|
1620
1620
|
totalItems: {},
|
|
@@ -1631,7 +1631,7 @@ const Ae = /* @__PURE__ */ y(os, [["render", ss]]), rs = ["disabled", "type", "d
|
|
|
1631
1631
|
}), a = I({
|
|
1632
1632
|
get: () => r.pageSize,
|
|
1633
1633
|
set: (T) => t("update:pageSize", T)
|
|
1634
|
-
}), u = I(() => Math.ceil(r.totalItems / a.value)), v = I(() => r.totalItems === 0 ? 0 : (s.value - 1) * a.value + 1), h = I(() => Math.min(s.value * a.value, r.totalItems)), m = I(() => s.value <= 1),
|
|
1634
|
+
}), u = I(() => Math.ceil(r.totalItems / a.value)), v = I(() => r.totalItems === 0 ? 0 : (s.value - 1) * a.value + 1), h = I(() => Math.min(s.value * a.value, r.totalItems)), m = I(() => s.value <= 1), c = I(() => s.value >= u.value), V = I(() => {
|
|
1635
1635
|
const T = [], A = u.value, O = s.value, G = r.maxVisiblePages;
|
|
1636
1636
|
if (A <= G)
|
|
1637
1637
|
for (let F = 1; F <= A; F++)
|
|
@@ -1655,7 +1655,7 @@ const Ae = /* @__PURE__ */ y(os, [["render", ss]]), rs = ["disabled", "type", "d
|
|
|
1655
1655
|
}, N = () => {
|
|
1656
1656
|
m.value || (s.value--, x());
|
|
1657
1657
|
}, Z = () => {
|
|
1658
|
-
|
|
1658
|
+
c.value || (s.value++, x());
|
|
1659
1659
|
}, D = () => {
|
|
1660
1660
|
s.value = 1, x();
|
|
1661
1661
|
}, J = () => {
|
|
@@ -1666,7 +1666,7 @@ const Ae = /* @__PURE__ */ y(os, [["render", ss]]), rs = ["disabled", "type", "d
|
|
|
1666
1666
|
() => {
|
|
1667
1667
|
s.value > u.value && u.value > 0 && (s.value = u.value, x());
|
|
1668
1668
|
}
|
|
1669
|
-
), (T, A) => (o(), i("div",
|
|
1669
|
+
), (T, A) => (o(), i("div", cs, [
|
|
1670
1670
|
l("div", hs, [
|
|
1671
1671
|
l("div", ps, [
|
|
1672
1672
|
A[1] || (A[1] = l("label", {
|
|
@@ -1706,8 +1706,8 @@ const Ae = /* @__PURE__ */ y(os, [["render", ss]]), rs = ["disabled", "type", "d
|
|
|
1706
1706
|
}, Q(O), 11, Cs))), 128)),
|
|
1707
1707
|
l("button", {
|
|
1708
1708
|
onClick: Z,
|
|
1709
|
-
disabled:
|
|
1710
|
-
class: Y({ "vt-pagination__nav-button": !0, "has-items": !
|
|
1709
|
+
disabled: c.value,
|
|
1710
|
+
class: Y({ "vt-pagination__nav-button": !0, "has-items": !c.value })
|
|
1711
1711
|
}, [
|
|
1712
1712
|
U(se, { name: "arrowRight" })
|
|
1713
1713
|
], 10, ws)
|
|
@@ -1747,35 +1747,35 @@ const Ae = /* @__PURE__ */ y(os, [["render", ss]]), rs = ["disabled", "type", "d
|
|
|
1747
1747
|
},
|
|
1748
1748
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
1749
1749
|
setup(n, { emit: e }) {
|
|
1750
|
-
const r = n, t = e, s = () => `vt-checkbox-${Math.random().toString(36).substr(2, 9)}`, a = I(() => r.id || s()), u = I(() => r.modelValue ?? r.checked), v = (
|
|
1750
|
+
const r = n, t = e, s = () => `vt-checkbox-${Math.random().toString(36).substr(2, 9)}`, a = I(() => r.id || s()), u = I(() => r.modelValue ?? r.checked), v = (c) => {
|
|
1751
1751
|
if (r.disabled) return;
|
|
1752
|
-
const x =
|
|
1753
|
-
t("update:modelValue", x), t("change", x,
|
|
1754
|
-
}, h = (
|
|
1755
|
-
t("focus",
|
|
1756
|
-
}, m = (
|
|
1757
|
-
t("blur",
|
|
1752
|
+
const x = c.target.checked;
|
|
1753
|
+
t("update:modelValue", x), t("change", x, c);
|
|
1754
|
+
}, h = (c) => {
|
|
1755
|
+
t("focus", c);
|
|
1756
|
+
}, m = (c) => {
|
|
1757
|
+
t("blur", c);
|
|
1758
1758
|
};
|
|
1759
|
-
return (
|
|
1759
|
+
return (c, V) => (o(), i("label", {
|
|
1760
1760
|
class: Y([
|
|
1761
1761
|
"vt-checkbox",
|
|
1762
|
-
`vt-checkbox--${
|
|
1763
|
-
`vt-checkbox--${
|
|
1762
|
+
`vt-checkbox--${c.size}`,
|
|
1763
|
+
`vt-checkbox--${c.variant}`,
|
|
1764
1764
|
{
|
|
1765
|
-
"vt-checkbox--disabled":
|
|
1766
|
-
"vt-checkbox--double":
|
|
1765
|
+
"vt-checkbox--disabled": c.disabled,
|
|
1766
|
+
"vt-checkbox--double": c.isDouble
|
|
1767
1767
|
}
|
|
1768
1768
|
]),
|
|
1769
1769
|
for: a.value
|
|
1770
1770
|
}, [
|
|
1771
1771
|
l("input", {
|
|
1772
1772
|
id: a.value,
|
|
1773
|
-
name:
|
|
1774
|
-
value:
|
|
1773
|
+
name: c.name,
|
|
1774
|
+
value: c.value,
|
|
1775
1775
|
checked: u.value,
|
|
1776
|
-
disabled:
|
|
1777
|
-
required:
|
|
1778
|
-
".indeterminate":
|
|
1776
|
+
disabled: c.disabled,
|
|
1777
|
+
required: c.required,
|
|
1778
|
+
".indeterminate": c.indeterminate,
|
|
1779
1779
|
type: "checkbox",
|
|
1780
1780
|
class: "vt-checkbox__input",
|
|
1781
1781
|
onChange: v,
|
|
@@ -1786,14 +1786,14 @@ const Ae = /* @__PURE__ */ y(os, [["render", ss]]), rs = ["disabled", "type", "d
|
|
|
1786
1786
|
class: Y([
|
|
1787
1787
|
"vt-checkbox__box",
|
|
1788
1788
|
{
|
|
1789
|
-
"vt-checkbox__box--checked": u.value && !
|
|
1790
|
-
"vt-checkbox__box--indeterminate":
|
|
1791
|
-
"vt-checkbox__box--double":
|
|
1792
|
-
"vt-checkbox__box--disabled":
|
|
1789
|
+
"vt-checkbox__box--checked": u.value && !c.indeterminate && !c.isDouble,
|
|
1790
|
+
"vt-checkbox__box--indeterminate": c.indeterminate,
|
|
1791
|
+
"vt-checkbox__box--double": c.isDouble && u.value,
|
|
1792
|
+
"vt-checkbox__box--disabled": c.disabled
|
|
1793
1793
|
}
|
|
1794
1794
|
])
|
|
1795
1795
|
}, [
|
|
1796
|
-
!
|
|
1796
|
+
!c.indeterminate && !c.isDouble ? (o(), i("svg", {
|
|
1797
1797
|
key: 0,
|
|
1798
1798
|
class: Y([
|
|
1799
1799
|
"vt-checkbox__checkmark",
|
|
@@ -1814,7 +1814,7 @@ const Ae = /* @__PURE__ */ y(os, [["render", ss]]), rs = ["disabled", "type", "d
|
|
|
1814
1814
|
"stroke-linecap": "round"
|
|
1815
1815
|
}, null, -1)
|
|
1816
1816
|
]), 2)) : j("", !0),
|
|
1817
|
-
|
|
1817
|
+
c.isDouble && u.value ? (o(), i("svg", {
|
|
1818
1818
|
key: 1,
|
|
1819
1819
|
class: Y([
|
|
1820
1820
|
"vt-checkbox__checkmark",
|
|
@@ -1843,28 +1843,28 @@ const Ae = /* @__PURE__ */ y(os, [["render", ss]]), rs = ["disabled", "type", "d
|
|
|
1843
1843
|
"stroke-linejoin": "round"
|
|
1844
1844
|
}, null, -1)
|
|
1845
1845
|
]), 2)) : j("", !0),
|
|
1846
|
-
|
|
1846
|
+
c.indeterminate ? (o(), i("div", {
|
|
1847
1847
|
key: 2,
|
|
1848
1848
|
class: Y([
|
|
1849
1849
|
"vt-checkbox__indeterminate-mark",
|
|
1850
1850
|
{
|
|
1851
|
-
"vt-checkbox__indeterminate-mark--visible":
|
|
1851
|
+
"vt-checkbox__indeterminate-mark--visible": c.indeterminate
|
|
1852
1852
|
}
|
|
1853
1853
|
])
|
|
1854
1854
|
}, null, 2)) : j("", !0)
|
|
1855
1855
|
], 2),
|
|
1856
|
-
|
|
1856
|
+
c.label || c.$slots.label || c.$slots.default ? (o(), i("span", {
|
|
1857
1857
|
key: 0,
|
|
1858
1858
|
class: Y([
|
|
1859
1859
|
"vt-checkbox__label",
|
|
1860
1860
|
{
|
|
1861
|
-
"vt-checkbox__label--disabled":
|
|
1861
|
+
"vt-checkbox__label--disabled": c.disabled
|
|
1862
1862
|
}
|
|
1863
1863
|
])
|
|
1864
1864
|
}, [
|
|
1865
|
-
_e(
|
|
1866
|
-
_e(
|
|
1867
|
-
Ie(Q(
|
|
1865
|
+
_e(c.$slots, "label", {}, () => [
|
|
1866
|
+
_e(c.$slots, "default", {}, () => [
|
|
1867
|
+
Ie(Q(c.label), 1)
|
|
1868
1868
|
])
|
|
1869
1869
|
])
|
|
1870
1870
|
], 2)) : j("", !0)
|
|
@@ -1873,7 +1873,7 @@ const Ae = /* @__PURE__ */ y(os, [["render", ss]]), rs = ["disabled", "type", "d
|
|
|
1873
1873
|
});
|
|
1874
1874
|
function bs(n) {
|
|
1875
1875
|
const e = I(() => [...n].sort((s, a) => s.pinnedLeft && !a.pinnedLeft ? -1 : !s.pinnedLeft && a.pinnedLeft || s.pinnedRight && !a.pinnedRight ? 1 : !s.pinnedRight && a.pinnedRight ? -1 : 0)), r = () => {
|
|
1876
|
-
const s = e.value.length, a = e.value.filter((
|
|
1876
|
+
const s = e.value.length, a = e.value.filter((c) => c.width || c.minWidth), u = a.reduce((c, V) => c + (V.width || V.minWidth || 0), 0), v = s - a.length;
|
|
1877
1877
|
if (v === 0) return 150;
|
|
1878
1878
|
const m = Math.max(800 - u, v * 80);
|
|
1879
1879
|
return Math.max(Math.floor(m / v), 120);
|
|
@@ -1887,13 +1887,13 @@ function bs(n) {
|
|
|
1887
1887
|
if (s === "left") {
|
|
1888
1888
|
u && (h += 50);
|
|
1889
1889
|
for (let m = 0; m < a; m++) {
|
|
1890
|
-
const
|
|
1891
|
-
|
|
1890
|
+
const c = v[m];
|
|
1891
|
+
c.pinnedLeft && (h += c.width || c.minWidth || r());
|
|
1892
1892
|
}
|
|
1893
1893
|
} else
|
|
1894
1894
|
for (let m = v.length - 1; m > a; m--) {
|
|
1895
|
-
const
|
|
1896
|
-
|
|
1895
|
+
const c = v[m];
|
|
1896
|
+
c.pinnedRight && (h += c.width || c.minWidth || r());
|
|
1897
1897
|
}
|
|
1898
1898
|
return h;
|
|
1899
1899
|
}
|
|
@@ -1910,8 +1910,8 @@ function ys(n) {
|
|
|
1910
1910
|
else if (a.minWidth)
|
|
1911
1911
|
m.minWidth = `${a.minWidth}px`, m.width = `${a.minWidth}px`, m.maxWidth = "none";
|
|
1912
1912
|
else {
|
|
1913
|
-
const
|
|
1914
|
-
m.width = `${
|
|
1913
|
+
const c = h();
|
|
1914
|
+
m.width = `${c}px`, m.minWidth = "80px", m.maxWidth = "none";
|
|
1915
1915
|
}
|
|
1916
1916
|
return a.pinnedLeft ? (m.position = "sticky", m.left = `${v("left", u, n.selectable)}px`, m.zIndex = "10") : a.pinnedRight && (m.position = "sticky", m.right = `${v("right", u, !1)}px`, m.zIndex = "10"), m;
|
|
1917
1917
|
};
|
|
@@ -1938,17 +1938,17 @@ function xs() {
|
|
|
1938
1938
|
onMouseDown: (t, s, a, u) => {
|
|
1939
1939
|
t.preventDefault(), t.stopPropagation(), n.value.resizingCol = s, n.value.startX = t.clientX, n.value.startWidth = s.width || s.minWidth || a(s.prop);
|
|
1940
1940
|
const v = (m) => {
|
|
1941
|
-
const { resizingCol:
|
|
1942
|
-
if (!
|
|
1943
|
-
document.querySelectorAll(`[data-resizer="${
|
|
1941
|
+
const { resizingCol: c, startX: V, startWidth: x } = n.value;
|
|
1942
|
+
if (!c) return;
|
|
1943
|
+
document.querySelectorAll(`[data-resizer="${c.prop}"]`).forEach((J) => {
|
|
1944
1944
|
J.classList.add("vt-table__resizer--active");
|
|
1945
1945
|
});
|
|
1946
|
-
const z = m.clientX - V, N =
|
|
1947
|
-
|
|
1946
|
+
const z = m.clientX - V, N = c.minWidth || 50, Z = c.maxWidth || 1e3, D = Math.max(Math.min(x + z, Z), N);
|
|
1947
|
+
c.width = D;
|
|
1948
1948
|
}, h = () => {
|
|
1949
1949
|
const { resizingCol: m } = n.value;
|
|
1950
|
-
document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", h), document.body.style.cursor = "", document.body.style.userSelect = "", document.body.classList.remove("vt-table-resizing"), m && (document.querySelectorAll(`[data-resizer="${m.prop}"]`).forEach((
|
|
1951
|
-
|
|
1950
|
+
document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", h), document.body.style.cursor = "", document.body.style.userSelect = "", document.body.classList.remove("vt-table-resizing"), m && (document.querySelectorAll(`[data-resizer="${m.prop}"]`).forEach((c) => {
|
|
1951
|
+
c.classList.remove("vt-table__resizer--active");
|
|
1952
1952
|
}), u && m.width && u(m.width)), n.value.resizingCol = null;
|
|
1953
1953
|
};
|
|
1954
1954
|
document.addEventListener("mousemove", v), document.addEventListener("mouseup", h), document.body.style.cursor = e, document.body.style.userSelect = "none", document.body.classList.add("vt-table-resizing");
|
|
@@ -1960,9 +1960,9 @@ function Ms(n, e, r, t) {
|
|
|
1960
1960
|
var he;
|
|
1961
1961
|
const s = n.selectionKey || "id", a = E([]), u = E(null), v = E(!1);
|
|
1962
1962
|
(he = n.defaultSelection) != null && he.length && (a.value = [...n.defaultSelection]);
|
|
1963
|
-
const h = (M) => M[s], m = (M) => v.value ? !0 : a.value.some((R) => h(R) === h(M)),
|
|
1963
|
+
const h = (M) => M[s], m = (M) => v.value ? !0 : a.value.some((R) => h(R) === h(M)), c = I(() => e.value.filter((M) => m(M)).length), V = I(() => e.value.length > 0 && c.value === e.value.length), x = I(() => {
|
|
1964
1964
|
if (v.value) return !1;
|
|
1965
|
-
const M =
|
|
1965
|
+
const M = c.value;
|
|
1966
1966
|
return M > 0 && M < e.value.length;
|
|
1967
1967
|
}), z = I(() => v.value ? !0 : V.value && !x.value), N = I(() => v.value), Z = (M, R) => {
|
|
1968
1968
|
const te = h(M), ie = a.value.some((_) => h(_) === h(M)), C = R !== void 0 ? R : !ie;
|
|
@@ -1984,7 +1984,7 @@ function Ms(n, e, r, t) {
|
|
|
1984
1984
|
O();
|
|
1985
1985
|
break;
|
|
1986
1986
|
}
|
|
1987
|
-
}, J = () => v.value ? "absoluteAll" : V.value ? "allVisible" :
|
|
1987
|
+
}, J = () => v.value ? "absoluteAll" : V.value ? "allVisible" : c.value > 0 ? "partial" : "none", T = () => {
|
|
1988
1988
|
const M = [], R = new Set(a.value.map((te) => h(te)));
|
|
1989
1989
|
a.value.forEach((te) => {
|
|
1990
1990
|
M.push(te);
|
|
@@ -2090,7 +2090,7 @@ const Ls = (n, e, r = "asc") => {
|
|
|
2090
2090
|
},
|
|
2091
2091
|
emits: ["visible-change", "click", "command"],
|
|
2092
2092
|
setup(n, { expose: e, emit: r }) {
|
|
2093
|
-
const t = n, s = r, a = E(), u = E(), v = E(), h = E(!1), m = E(null),
|
|
2093
|
+
const t = n, s = r, a = E(), u = E(), v = E(), h = E(!1), m = E(null), c = E([]), V = E(!0), x = E(!1), z = E({
|
|
2094
2094
|
position: "absolute",
|
|
2095
2095
|
top: "0px",
|
|
2096
2096
|
left: "0px",
|
|
@@ -2107,12 +2107,12 @@ const Ls = (n, e, r = "asc") => {
|
|
|
2107
2107
|
if (w.width === 0 && w.height === 0) return !1;
|
|
2108
2108
|
const $ = window.innerHeight || document.documentElement.clientHeight, B = window.innerWidth || document.documentElement.clientWidth;
|
|
2109
2109
|
if (!(w.top < $ && w.bottom > 0 && w.left < B && w.right > 0)) return !1;
|
|
2110
|
-
let
|
|
2111
|
-
for (;
|
|
2112
|
-
const ke =
|
|
2110
|
+
let de = f.parentElement;
|
|
2111
|
+
for (; de && de !== document.body; ) {
|
|
2112
|
+
const ke = de.getBoundingClientRect(), we = window.getComputedStyle(de);
|
|
2113
2113
|
if ((we.overflow === "hidden" || we.overflowY === "hidden" || we.overflowX === "hidden") && (w.top >= ke.bottom || w.bottom <= ke.top || w.left >= ke.right || w.right <= ke.left))
|
|
2114
2114
|
return !1;
|
|
2115
|
-
|
|
2115
|
+
de = de.parentElement;
|
|
2116
2116
|
}
|
|
2117
2117
|
return !0;
|
|
2118
2118
|
}, D = () => {
|
|
@@ -2123,8 +2123,8 @@ const Ls = (n, e, r = "asc") => {
|
|
|
2123
2123
|
const w = [];
|
|
2124
2124
|
let $ = f.parentElement;
|
|
2125
2125
|
for (; $ && $ !== document.body; ) {
|
|
2126
|
-
const B = window.getComputedStyle($), le = B.overflowY,
|
|
2127
|
-
(["scroll", "auto"].includes(le) || ["scroll", "auto"].includes(
|
|
2126
|
+
const B = window.getComputedStyle($), le = B.overflowY, de = B.overflowX;
|
|
2127
|
+
(["scroll", "auto"].includes(le) || ["scroll", "auto"].includes(de) || $.scrollHeight > $.clientHeight || $.scrollWidth > $.clientWidth) && w.push($), $ = $.parentElement;
|
|
2128
2128
|
}
|
|
2129
2129
|
return w.push(window), w;
|
|
2130
2130
|
}, T = async () => {
|
|
@@ -2153,13 +2153,13 @@ const Ls = (n, e, r = "asc") => {
|
|
|
2153
2153
|
}
|
|
2154
2154
|
B + w.width > window.innerWidth && (B = window.innerWidth - w.width - 10), B < 10 && (B = 10), $ + w.height > window.innerHeight + window.scrollY && ($ = f.top + window.scrollY - w.height - 5), $ < window.scrollY + 10 && ($ = window.scrollY + 10), z.value.top = `${$}px`, z.value.left = `${B}px`;
|
|
2155
2155
|
}, A = () => {
|
|
2156
|
-
u.value && (
|
|
2156
|
+
u.value && (c.value = J(u.value), c.value.forEach((f) => {
|
|
2157
2157
|
f.addEventListener("scroll", _, { passive: !0 });
|
|
2158
2158
|
}), window.addEventListener("resize", _));
|
|
2159
2159
|
}, O = () => {
|
|
2160
|
-
|
|
2160
|
+
c.value.forEach((f) => {
|
|
2161
2161
|
f.removeEventListener("scroll", _);
|
|
2162
|
-
}), window.removeEventListener("resize", _),
|
|
2162
|
+
}), window.removeEventListener("resize", _), c.value = [];
|
|
2163
2163
|
}, G = () => {
|
|
2164
2164
|
t.disabled || h.value || !u.value || !Z(u.value) || (q(), m.value = window.setTimeout(
|
|
2165
2165
|
async () => {
|
|
@@ -2375,7 +2375,7 @@ const Se = new Is(), Bs = {
|
|
|
2375
2375
|
const f = _.columns.map(($) => $.prop), w = s.value.filter(($) => f.includes($.prop));
|
|
2376
2376
|
w.length === 0 ? C[_.name] = { checked: !1, indeterminate: !1 } : w.length === _.columns.length ? C[_.name] = { checked: !0, indeterminate: !1 } : C[_.name] = { checked: !1, indeterminate: !0 };
|
|
2377
2377
|
}), C;
|
|
2378
|
-
}),
|
|
2378
|
+
}), c = I(() => r.columnsSelector.filter((C) => C.name !== "removed")), V = (C) => C.pinnedLeft || C.pinnedRight, x = (C) => !V(C), z = () => {
|
|
2379
2379
|
const C = s.value;
|
|
2380
2380
|
let _ = -1;
|
|
2381
2381
|
for (let w = 0; w < C.length; w++)
|
|
@@ -2421,8 +2421,8 @@ const Se = new Is(), Bs = {
|
|
|
2421
2421
|
O();
|
|
2422
2422
|
return;
|
|
2423
2423
|
}
|
|
2424
|
-
const le = [...s.value], [
|
|
2425
|
-
le.splice(B, 0,
|
|
2424
|
+
const le = [...s.value], [de] = le.splice(u.value, 1);
|
|
2425
|
+
le.splice(B, 0, de), s.value = le, O();
|
|
2426
2426
|
}, A = () => {
|
|
2427
2427
|
O();
|
|
2428
2428
|
}, O = () => {
|
|
@@ -2497,7 +2497,7 @@ const Se = new Is(), Bs = {
|
|
|
2497
2497
|
], 42, Ts))), 128))
|
|
2498
2498
|
]),
|
|
2499
2499
|
l("div", js, [
|
|
2500
|
-
(o(!0), i(ve, null, fe(
|
|
2500
|
+
(o(!0), i(ve, null, fe(c.value, (f) => {
|
|
2501
2501
|
var w, $;
|
|
2502
2502
|
return o(), i("div", {
|
|
2503
2503
|
key: f.name,
|
|
@@ -2569,8 +2569,8 @@ const Se = new Is(), Bs = {
|
|
|
2569
2569
|
},
|
|
2570
2570
|
emits: ["pin", "update-columns"],
|
|
2571
2571
|
setup(n, { emit: e }) {
|
|
2572
|
-
const r = n, t = e, s = () => !!(r.column.pinnedLeft || r.column.pinnedRight), a = (
|
|
2573
|
-
switch (console.log("ColumnActions - Command received:",
|
|
2572
|
+
const r = n, t = e, s = () => !!(r.column.pinnedLeft || r.column.pinnedRight), a = (c) => {
|
|
2573
|
+
switch (console.log("ColumnActions - Command received:", c, typeof c), String(c)) {
|
|
2574
2574
|
case "pin":
|
|
2575
2575
|
console.log("Executing pin command"), u();
|
|
2576
2576
|
break;
|
|
@@ -2578,19 +2578,19 @@ const Se = new Is(), Bs = {
|
|
|
2578
2578
|
console.log("Executing columns command"), m();
|
|
2579
2579
|
break;
|
|
2580
2580
|
default:
|
|
2581
|
-
console.warn("Unknown command:",
|
|
2581
|
+
console.warn("Unknown command:", c);
|
|
2582
2582
|
}
|
|
2583
2583
|
}, u = () => {
|
|
2584
|
-
const
|
|
2585
|
-
console.log("handlePin called, isPinned:",
|
|
2586
|
-
}, v = (
|
|
2584
|
+
const c = s();
|
|
2585
|
+
console.log("handlePin called, isPinned:", c), c ? t("pin", r.column, "none") : t("pin", r.column, "left");
|
|
2586
|
+
}, v = (c) => ({
|
|
2587
2587
|
name: "removed",
|
|
2588
2588
|
label: "Видалені колонки",
|
|
2589
2589
|
order: 999,
|
|
2590
|
-
columns:
|
|
2591
|
-
}), h = (
|
|
2590
|
+
columns: c
|
|
2591
|
+
}), h = (c) => {
|
|
2592
2592
|
var Z;
|
|
2593
|
-
const V = new Set(
|
|
2593
|
+
const V = new Set(c.map((D) => D.prop)), x = /* @__PURE__ */ new Set();
|
|
2594
2594
|
(Z = r.columnsSelector) == null || Z.forEach((D) => {
|
|
2595
2595
|
D.columns.forEach((J) => x.add(J.prop));
|
|
2596
2596
|
}), r.allColumns.forEach((D) => x.add(D.prop));
|
|
@@ -2609,13 +2609,13 @@ const Se = new Is(), Bs = {
|
|
|
2609
2609
|
return z.length > 0 && N.push(v(z)), N;
|
|
2610
2610
|
}, m = () => {
|
|
2611
2611
|
console.log("handleToggleVisibility called");
|
|
2612
|
-
const
|
|
2612
|
+
const c = h(r.allColumns);
|
|
2613
2613
|
Se.open({
|
|
2614
2614
|
component: As,
|
|
2615
2615
|
title: "Управління колонками таблиці",
|
|
2616
2616
|
props: {
|
|
2617
2617
|
columns: r.allColumns,
|
|
2618
|
-
columnsSelector:
|
|
2618
|
+
columnsSelector: c,
|
|
2619
2619
|
"onUpdate-columns": (V) => {
|
|
2620
2620
|
t("update-columns", V);
|
|
2621
2621
|
}
|
|
@@ -2624,7 +2624,7 @@ const Se = new Is(), Bs = {
|
|
|
2624
2624
|
closeOnBackdropClick: !1
|
|
2625
2625
|
});
|
|
2626
2626
|
};
|
|
2627
|
-
return (
|
|
2627
|
+
return (c, V) => (o(), ue(vt, {
|
|
2628
2628
|
trigger: "click",
|
|
2629
2629
|
placement: "bottom-start",
|
|
2630
2630
|
onCommand: a
|
|
@@ -2656,16 +2656,16 @@ const Se = new Is(), Bs = {
|
|
|
2656
2656
|
_: 1
|
|
2657
2657
|
}));
|
|
2658
2658
|
}
|
|
2659
|
-
}), Fs = { class: "vt-table" }, Ys = { class: "vt-th__content" },
|
|
2659
|
+
}), Fs = { class: "vt-table" }, Ys = { key: 0 }, qs = { class: "vt-th__content" }, Xs = { class: "vt-th__content" }, Us = { class: "vt-th__label" }, Ks = {
|
|
2660
2660
|
key: 0,
|
|
2661
2661
|
class: "vt-th__sortable"
|
|
2662
|
-
},
|
|
2662
|
+
}, Gs = ["data-resizer", "onMousedown"], Qs = {
|
|
2663
2663
|
key: 0,
|
|
2664
2664
|
class: "vt-table__empty-row"
|
|
2665
|
-
},
|
|
2666
|
-
key:
|
|
2665
|
+
}, Js = ["colspan"], er = { class: "vt-table__empty-content" }, tr = ["onClick"], nr = { class: "vt-table__cell-content" }, or = { class: "vt-table__cell-content vt-table__cell-content--ellipsis" }, lr = { key: 1 }, sr = ["data-resizer", "onMousedown"], rr = {
|
|
2666
|
+
key: 1,
|
|
2667
2667
|
class: "vt-table__summary"
|
|
2668
|
-
},
|
|
2668
|
+
}, ir = { class: "vt-table__cell-content vt-table__cell-content--summary" }, Xe = 50, ar = /* @__PURE__ */ pe({
|
|
2669
2669
|
__name: "VTable",
|
|
2670
2670
|
props: /* @__PURE__ */ nt({
|
|
2671
2671
|
data: {},
|
|
@@ -2681,7 +2681,8 @@ const Se = new Is(), Bs = {
|
|
|
2681
2681
|
selectOnClickRow: { type: Boolean, default: !1 },
|
|
2682
2682
|
highlightCurrentRow: { type: Boolean, default: !1 },
|
|
2683
2683
|
allData: { default: void 0 },
|
|
2684
|
-
columns: { default: () => [] }
|
|
2684
|
+
columns: { default: () => [] },
|
|
2685
|
+
hideHeader: { type: Boolean, default: !1 }
|
|
2685
2686
|
}, {
|
|
2686
2687
|
columns: {
|
|
2687
2688
|
required: !1,
|
|
@@ -2691,7 +2692,7 @@ const Se = new Is(), Bs = {
|
|
|
2691
2692
|
}),
|
|
2692
2693
|
emits: /* @__PURE__ */ nt(["sort-change", "selection-change", "current-change", "row-click", "update:columns", "column-pin", "column-resize", "column-visibility", "column-sort", "columns-change", "infinity-scroll"], ["update:columns"]),
|
|
2693
2694
|
setup(n, { expose: e, emit: r }) {
|
|
2694
|
-
const t = n, s = r, a = gt(n, "columns"), u = E({}), v = E(), h = _t([]), m = E(t.defaultSort || null),
|
|
2695
|
+
const t = n, s = r, a = gt(n, "columns"), u = E({}), v = E(), h = _t([]), m = E(t.defaultSort || null), c = I(() => Ss(t.data || [], m.value, h)), V = I(() => a.value !== void 0), x = I(() => t.data && t.data.length > 0), z = E(!1), N = E(0);
|
|
2695
2696
|
let Z;
|
|
2696
2697
|
const D = (k, H) => t.rowKey && k[t.rowKey] != null ? String(k[t.rowKey]) : String(H), J = () => {
|
|
2697
2698
|
V.value && a.value ? h.splice(0, h.length, ...a.value) : t.columns && t.columns.length > 0 && h.splice(0, h.length, ...t.columns);
|
|
@@ -2709,7 +2710,7 @@ const Se = new Is(), Bs = {
|
|
|
2709
2710
|
},
|
|
2710
2711
|
{ deep: !0 }
|
|
2711
2712
|
), et("vt-table-columns", h);
|
|
2712
|
-
const { sortedColumns: T, getDefaultColumnWidth: A, getStickyOffset: O } = bs(h), { getTableWrapperStyle: G, getColumnStyle: F, getHeaderStyle: q, getFooterStyle: ee } = ys(t), { onMouseDown: he } = xs(), M = I(() => t.allData || t.data), R = t.selectable ? Ms(t,
|
|
2713
|
+
const { sortedColumns: T, getDefaultColumnWidth: A, getStickyOffset: O } = bs(h), { getTableWrapperStyle: G, getColumnStyle: F, getHeaderStyle: q, getFooterStyle: ee } = ys(t), { onMouseDown: he } = xs(), M = I(() => t.allData || t.data), R = t.selectable ? Ms(t, c, s, M) : null, te = () => ({
|
|
2713
2714
|
width: `${Xe}px`,
|
|
2714
2715
|
minWidth: `${Xe}px`,
|
|
2715
2716
|
maxWidth: `${Xe}px`,
|
|
@@ -2754,7 +2755,7 @@ const Se = new Is(), Bs = {
|
|
|
2754
2755
|
column: k,
|
|
2755
2756
|
direction: ((oe = m.value) == null ? void 0 : oe.direction) || null,
|
|
2756
2757
|
prop: k.prop,
|
|
2757
|
-
sortedData:
|
|
2758
|
+
sortedData: c.value
|
|
2758
2759
|
});
|
|
2759
2760
|
});
|
|
2760
2761
|
}, $ = (k, H) => {
|
|
@@ -2777,7 +2778,7 @@ const Se = new Is(), Bs = {
|
|
|
2777
2778
|
}
|
|
2778
2779
|
s("columns-change", [...h]);
|
|
2779
2780
|
}
|
|
2780
|
-
},
|
|
2781
|
+
}, de = (k, H, X) => {
|
|
2781
2782
|
s("row-click", { row: k, column: H, event: X }), t.highlightCurrentRow && R && R.setCurrentRow(k);
|
|
2782
2783
|
}, ke = (k, H, X) => {
|
|
2783
2784
|
X.stopPropagation(), R && R.toggleRowSelection(H, k);
|
|
@@ -2794,7 +2795,7 @@ const Se = new Is(), Bs = {
|
|
|
2794
2795
|
oldWidth: X
|
|
2795
2796
|
});
|
|
2796
2797
|
});
|
|
2797
|
-
}, Be = (k, H) => F(k, H, O, A), De = (k, H) => q(k, H, O, A), He = (k, H) => ee(k, H, O, A),
|
|
2798
|
+
}, Be = (k, H) => F(k, H, O, A), De = (k, H) => q(k, H, O, A), He = (k, H) => ee(k, H, O, A), d = (k, H) => {
|
|
2798
2799
|
if (!H || !H.prop) return "";
|
|
2799
2800
|
const X = k[H.prop];
|
|
2800
2801
|
return X == null ? "" : String(X);
|
|
@@ -2802,7 +2803,7 @@ const Se = new Is(), Bs = {
|
|
|
2802
2803
|
if (!t.showSummary || !x.value) return {};
|
|
2803
2804
|
const k = h;
|
|
2804
2805
|
if (typeof t.summaryMethod == "function") {
|
|
2805
|
-
const H = t.summaryMethod({ columns: k, data:
|
|
2806
|
+
const H = t.summaryMethod({ columns: k, data: c.value });
|
|
2806
2807
|
return k.reduce(
|
|
2807
2808
|
(X, ne, oe) => (X[ne.prop] = H[oe], X),
|
|
2808
2809
|
{}
|
|
@@ -2810,12 +2811,12 @@ const Se = new Is(), Bs = {
|
|
|
2810
2811
|
}
|
|
2811
2812
|
return k.reduce(
|
|
2812
2813
|
(H, X) => {
|
|
2813
|
-
const ne =
|
|
2814
|
+
const ne = c.value.map((oe) => oe[X.prop]);
|
|
2814
2815
|
return H[X.prop] = ne.every((oe) => typeof oe == "number") ? ne.reduce((oe, ze) => oe + ze, 0) : "", H;
|
|
2815
2816
|
},
|
|
2816
2817
|
{}
|
|
2817
2818
|
);
|
|
2818
|
-
}), S = I(() => t.showSummary && x.value),
|
|
2819
|
+
}), S = I(() => t.showSummary && x.value), ce = (k, H) => {
|
|
2819
2820
|
R && R.toggleRowSelection(k, H);
|
|
2820
2821
|
}, Me = () => {
|
|
2821
2822
|
R && R.toggleAllSelection();
|
|
@@ -2829,7 +2830,7 @@ const Se = new Is(), Bs = {
|
|
|
2829
2830
|
return xe(() => {
|
|
2830
2831
|
J();
|
|
2831
2832
|
}), e({
|
|
2832
|
-
toggleRowSelection:
|
|
2833
|
+
toggleRowSelection: ce,
|
|
2833
2834
|
toggleAllSelection: Me,
|
|
2834
2835
|
selectAbsolutelyAll: $e,
|
|
2835
2836
|
clearSelection: Le,
|
|
@@ -2838,27 +2839,27 @@ const Se = new Is(), Bs = {
|
|
|
2838
2839
|
resetInfinityScroll: f
|
|
2839
2840
|
}), (k, H) => {
|
|
2840
2841
|
var ne, oe, ze, We;
|
|
2841
|
-
const X =
|
|
2842
|
+
const X = ct("tooltip");
|
|
2842
2843
|
return o(), i("div", {
|
|
2843
2844
|
ref_key: "tableWrapperRef",
|
|
2844
2845
|
ref: v,
|
|
2845
|
-
class: "vt-table-wrapper",
|
|
2846
2846
|
style: Ce(ae(G)()),
|
|
2847
|
+
class: "vt-table-wrapper",
|
|
2847
2848
|
onScroll: _
|
|
2848
2849
|
}, [
|
|
2849
2850
|
_e(k.$slots, "default"),
|
|
2850
2851
|
l("table", Fs, [
|
|
2851
|
-
|
|
2852
|
+
t.hideHeader ? j("", !0) : (o(), i("thead", Ys, [
|
|
2852
2853
|
l("tr", null, [
|
|
2853
2854
|
t.selectable ? (o(), i("th", {
|
|
2854
2855
|
key: 0,
|
|
2855
|
-
class: Y([
|
|
2856
|
+
class: Y([{
|
|
2856
2857
|
"vt-table__th--sticky": t.maxHeight,
|
|
2857
2858
|
"vt-table__th--pinned-left": !0
|
|
2858
|
-
}]),
|
|
2859
|
+
}, "vt-table__th vt-table__th--selection"]),
|
|
2859
2860
|
style: Ce(ie())
|
|
2860
2861
|
}, [
|
|
2861
|
-
l("div",
|
|
2862
|
+
l("div", qs, [
|
|
2862
2863
|
U(Ee, {
|
|
2863
2864
|
checked: (ne = ae(R)) == null ? void 0 : ne.isAllSelected.value,
|
|
2864
2865
|
indeterminate: (oe = ae(R)) == null ? void 0 : oe.isIndeterminate.value,
|
|
@@ -2871,7 +2872,6 @@ const Se = new Is(), Bs = {
|
|
|
2871
2872
|
key: W.prop,
|
|
2872
2873
|
ref_for: !0,
|
|
2873
2874
|
ref: (g) => Oe(g, W.prop),
|
|
2874
|
-
style: Ce(De(W, p)),
|
|
2875
2875
|
class: Y([
|
|
2876
2876
|
"vt-table__th",
|
|
2877
2877
|
{
|
|
@@ -2880,41 +2880,42 @@ const Se = new Is(), Bs = {
|
|
|
2880
2880
|
"vt-table__th--pinned-right": W.pinnedRight,
|
|
2881
2881
|
"vt-table__th--sortable": W.sortable
|
|
2882
2882
|
}
|
|
2883
|
-
])
|
|
2883
|
+
]),
|
|
2884
|
+
style: Ce(De(W, p))
|
|
2884
2885
|
}, [
|
|
2885
|
-
l("div",
|
|
2886
|
-
l("div",
|
|
2887
|
-
W.sortable ? (o(), i("div",
|
|
2886
|
+
l("div", Xs, [
|
|
2887
|
+
l("div", Us, Q(W.label), 1),
|
|
2888
|
+
W.sortable ? (o(), i("div", Ks, [
|
|
2888
2889
|
U(se, {
|
|
2889
|
-
name: "arrowTop",
|
|
2890
2890
|
class: Y(ae(st)(W, m.value).asc),
|
|
2891
|
+
name: "arrowTop",
|
|
2891
2892
|
onClick: ye((g) => w(W, "asc"), ["stop"])
|
|
2892
2893
|
}, null, 8, ["class", "onClick"]),
|
|
2893
2894
|
U(se, {
|
|
2894
|
-
name: "arrowDown",
|
|
2895
2895
|
class: Y(ae(st)(W, m.value).desc),
|
|
2896
|
+
name: "arrowDown",
|
|
2896
2897
|
onClick: ye((g) => w(W, "desc"), ["stop"])
|
|
2897
2898
|
}, null, 8, ["class", "onClick"])
|
|
2898
2899
|
])) : j("", !0),
|
|
2899
2900
|
W.actionColumn ? (o(), ue(Ns, {
|
|
2900
2901
|
key: 1,
|
|
2901
|
-
column: W,
|
|
2902
2902
|
"all-columns": ae(T),
|
|
2903
|
+
column: W,
|
|
2903
2904
|
columnsSelector: t.columnsSelector,
|
|
2904
2905
|
onPin: $,
|
|
2905
2906
|
onUpdateColumns: B
|
|
2906
|
-
}, null, 8, ["
|
|
2907
|
+
}, null, 8, ["all-columns", "column", "columnsSelector"])) : j("", !0)
|
|
2907
2908
|
]),
|
|
2908
2909
|
l("div", {
|
|
2909
|
-
class: "vt-table__resizer",
|
|
2910
2910
|
"data-resizer": W.prop,
|
|
2911
|
+
class: "vt-table__resizer",
|
|
2911
2912
|
onMousedown: (g) => Re(g, W)
|
|
2912
|
-
}, null, 40,
|
|
2913
|
+
}, null, 40, Gs)
|
|
2913
2914
|
], 6))), 128))
|
|
2914
2915
|
])
|
|
2915
|
-
]),
|
|
2916
|
+
])),
|
|
2916
2917
|
l("tbody", null, [
|
|
2917
|
-
x.value ? (o(!0), i(ve, { key: 1 }, fe(
|
|
2918
|
+
x.value ? (o(!0), i(ve, { key: 1 }, fe(c.value, (W, p) => {
|
|
2918
2919
|
var g, b, K;
|
|
2919
2920
|
return o(), i("tr", {
|
|
2920
2921
|
key: D(W, p),
|
|
@@ -2926,16 +2927,16 @@ const Se = new Is(), Bs = {
|
|
|
2926
2927
|
"vt-table__row--clickable": t.selectOnClickRow || t.highlightCurrentRow
|
|
2927
2928
|
}
|
|
2928
2929
|
]),
|
|
2929
|
-
onClick: (P) =>
|
|
2930
|
+
onClick: (P) => de(W, ae(T)[0], P)
|
|
2930
2931
|
}, [
|
|
2931
2932
|
t.selectable ? (o(), i("td", {
|
|
2932
2933
|
key: 0,
|
|
2933
|
-
class: Y([
|
|
2934
|
+
class: Y([{
|
|
2934
2935
|
"vt-table__td--pinned-left": !0
|
|
2935
|
-
}]),
|
|
2936
|
+
}, "vt-table__td vt-table__td--selection"]),
|
|
2936
2937
|
style: Ce(te())
|
|
2937
2938
|
}, [
|
|
2938
|
-
l("div",
|
|
2939
|
+
l("div", nr, [
|
|
2939
2940
|
U(Ee, {
|
|
2940
2941
|
checked: (K = ae(R)) == null ? void 0 : K.isRowSelected(W),
|
|
2941
2942
|
onChange: (P, re) => ke(P, W, re)
|
|
@@ -2946,65 +2947,65 @@ const Se = new Is(), Bs = {
|
|
|
2946
2947
|
key: `${D(W, p)}-${P.prop}`,
|
|
2947
2948
|
ref_for: !0,
|
|
2948
2949
|
ref: (me) => Oe(me, P.prop),
|
|
2949
|
-
style: Ce(Be(P, re)),
|
|
2950
2950
|
class: Y([
|
|
2951
2951
|
"vt-table__td",
|
|
2952
2952
|
{
|
|
2953
2953
|
"vt-table__td--pinned-left": P.pinnedLeft,
|
|
2954
2954
|
"vt-table__td--pinned-right": P.pinnedRight
|
|
2955
2955
|
}
|
|
2956
|
-
])
|
|
2956
|
+
]),
|
|
2957
|
+
style: Ce(Be(P, re))
|
|
2957
2958
|
}, [
|
|
2958
|
-
Qe((o(), i("div",
|
|
2959
|
-
P.renderSlot ? (o(), ue(Ge(() => ae($s)(P.renderSlot, { row: W, column: P, value: W[P.prop], index: p })), { key: 0 })) : (o(), i("span",
|
|
2959
|
+
Qe((o(), i("div", or, [
|
|
2960
|
+
P.renderSlot ? (o(), ue(Ge(() => ae($s)(P.renderSlot, { row: W, column: P, value: W[P.prop], index: p })), { key: 0 })) : (o(), i("span", lr, Q(W[P.prop]), 1))
|
|
2960
2961
|
])), [
|
|
2961
|
-
[X, P.showOverflowTooltip ?
|
|
2962
|
+
[X, P.showOverflowTooltip ? d(W, P) : null]
|
|
2962
2963
|
]),
|
|
2963
2964
|
l("div", {
|
|
2964
|
-
class: "vt-table__resizer",
|
|
2965
2965
|
"data-resizer": P.prop,
|
|
2966
|
+
class: "vt-table__resizer",
|
|
2966
2967
|
onMousedown: (me) => Re(me, P)
|
|
2967
|
-
}, null, 40,
|
|
2968
|
+
}, null, 40, sr)
|
|
2968
2969
|
], 6))), 128))
|
|
2969
|
-
], 10,
|
|
2970
|
-
}), 128)) : (o(), i("tr",
|
|
2970
|
+
], 10, tr);
|
|
2971
|
+
}), 128)) : (o(), i("tr", Qs, [
|
|
2971
2972
|
l("td", {
|
|
2972
2973
|
colspan: ae(T).length + (t.selectable ? 1 : 0),
|
|
2973
2974
|
class: "vt-table__empty-cell"
|
|
2974
2975
|
}, [
|
|
2975
|
-
l("div",
|
|
2976
|
+
l("div", er, [
|
|
2976
2977
|
U(se, {
|
|
2977
|
-
|
|
2978
|
-
|
|
2978
|
+
class: "vt-table__empty-icon",
|
|
2979
|
+
name: "empty"
|
|
2979
2980
|
}),
|
|
2980
2981
|
H[0] || (H[0] = l("span", { class: "vt-table__empty-text" }, "Немає даних!", -1))
|
|
2981
2982
|
])
|
|
2982
|
-
], 8,
|
|
2983
|
+
], 8, Js)
|
|
2983
2984
|
]))
|
|
2984
2985
|
]),
|
|
2985
|
-
S.value ? (o(), i("tfoot",
|
|
2986
|
+
S.value ? (o(), i("tfoot", rr, [
|
|
2986
2987
|
l("tr", null, [
|
|
2987
2988
|
t.selectable ? (o(), i("td", {
|
|
2988
2989
|
key: 0,
|
|
2989
|
-
class: Y([
|
|
2990
|
+
class: Y([{
|
|
2990
2991
|
"vt-table__td--pinned-left": !0
|
|
2991
|
-
}]),
|
|
2992
|
+
}, "vt-table__td"]),
|
|
2992
2993
|
style: Ce(C())
|
|
2993
2994
|
}, H[1] || (H[1] = [
|
|
2994
2995
|
l("div", { class: "vt-table__cell-content vt-table__cell-content--summary" }, null, -1)
|
|
2995
2996
|
]), 4)) : j("", !0),
|
|
2996
2997
|
(o(!0), i(ve, null, fe(ae(T), (W, p) => (o(), i("td", {
|
|
2997
2998
|
key: W.prop,
|
|
2998
|
-
style: Ce(He(W, p)),
|
|
2999
2999
|
class: Y([
|
|
3000
3000
|
"vt-table__td",
|
|
3001
3001
|
{
|
|
3002
3002
|
"vt-table__td--pinned-left": W.pinnedLeft,
|
|
3003
3003
|
"vt-table__td--pinned-right": W.pinnedRight
|
|
3004
3004
|
}
|
|
3005
|
-
])
|
|
3005
|
+
]),
|
|
3006
|
+
style: Ce(He(W, p))
|
|
3006
3007
|
}, [
|
|
3007
|
-
l("div",
|
|
3008
|
+
l("div", ir, Q(L.value[W.prop]), 1)
|
|
3008
3009
|
], 6))), 128))
|
|
3009
3010
|
])
|
|
3010
3011
|
])) : j("", !0)
|
|
@@ -3012,7 +3013,7 @@ const Se = new Is(), Bs = {
|
|
|
3012
3013
|
], 36);
|
|
3013
3014
|
};
|
|
3014
3015
|
}
|
|
3015
|
-
}),
|
|
3016
|
+
}), ur = /* @__PURE__ */ pe({
|
|
3016
3017
|
__name: "VTableColumn",
|
|
3017
3018
|
props: {
|
|
3018
3019
|
prop: {},
|
|
@@ -3089,25 +3090,25 @@ const Se = new Is(), Bs = {
|
|
|
3089
3090
|
}
|
|
3090
3091
|
}), (u, v) => null;
|
|
3091
3092
|
}
|
|
3092
|
-
}),
|
|
3093
|
+
}), dr = ["for"], cr = {
|
|
3093
3094
|
key: 0,
|
|
3094
3095
|
class: "vt-input__required"
|
|
3095
|
-
},
|
|
3096
|
+
}, hr = { class: "vt-input__container" }, pr = {
|
|
3096
3097
|
key: 0,
|
|
3097
3098
|
class: "vt-input__prefix"
|
|
3098
|
-
},
|
|
3099
|
+
}, vr = ["value", "placeholder", "disabled", "rows", "cols", "maxlength", "minlength", "required", "name", "id", "tabindex", "autocomplete"], fr = ["type", "value", "placeholder", "disabled", "maxlength", "minlength", "min", "max", "step", "required", "pattern", "name", "id", "tabindex", "autocomplete"], mr = {
|
|
3099
3100
|
key: 3,
|
|
3100
3101
|
class: "vt-input__suffix"
|
|
3101
|
-
},
|
|
3102
|
+
}, Cr = {
|
|
3102
3103
|
key: 1,
|
|
3103
3104
|
class: "vt-input__help"
|
|
3104
|
-
},
|
|
3105
|
+
}, wr = {
|
|
3105
3106
|
key: 0,
|
|
3106
3107
|
class: "vt-input__error"
|
|
3107
|
-
},
|
|
3108
|
+
}, gr = {
|
|
3108
3109
|
key: 1,
|
|
3109
3110
|
class: "vt-input__helper"
|
|
3110
|
-
},
|
|
3111
|
+
}, _r = {
|
|
3111
3112
|
key: 2,
|
|
3112
3113
|
class: "vt-input__errors"
|
|
3113
3114
|
}, ft = /* @__PURE__ */ pe({
|
|
@@ -3158,33 +3159,33 @@ const Se = new Is(), Bs = {
|
|
|
3158
3159
|
},
|
|
3159
3160
|
emits: ["update:modelValue", "input", "change", "focus", "blur", "clear", "validation", "keydown", "keyup", "keypress", "click"],
|
|
3160
3161
|
setup(n, { expose: e, emit: r }) {
|
|
3161
|
-
const t = n, s = r, a = E(), u = E(), v = E(!1), h = E(!1), m = E(),
|
|
3162
|
-
email: (
|
|
3163
|
-
url: (
|
|
3162
|
+
const t = n, s = r, a = E(), u = E(), v = E(!1), h = E(!1), m = E(), c = E([]), V = E(!0), x = E(!1), z = {
|
|
3163
|
+
email: (d) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(d),
|
|
3164
|
+
url: (d) => {
|
|
3164
3165
|
try {
|
|
3165
|
-
return new URL(
|
|
3166
|
+
return new URL(d), !0;
|
|
3166
3167
|
} catch {
|
|
3167
3168
|
return !1;
|
|
3168
3169
|
}
|
|
3169
3170
|
},
|
|
3170
|
-
number: (
|
|
3171
|
-
required: (
|
|
3172
|
-
minlength: (
|
|
3173
|
-
maxlength: (
|
|
3174
|
-
min: (
|
|
3175
|
-
const S = Number(
|
|
3171
|
+
number: (d) => !isNaN(Number(d)) && isFinite(Number(d)),
|
|
3172
|
+
required: (d) => d !== "" && d !== null && d !== void 0,
|
|
3173
|
+
minlength: (d, L) => String(d).length >= L,
|
|
3174
|
+
maxlength: (d, L) => String(d).length <= L,
|
|
3175
|
+
min: (d, L) => {
|
|
3176
|
+
const S = Number(d);
|
|
3176
3177
|
return !isNaN(S) && S >= L;
|
|
3177
3178
|
},
|
|
3178
|
-
max: (
|
|
3179
|
-
const S = Number(
|
|
3179
|
+
max: (d, L) => {
|
|
3180
|
+
const S = Number(d);
|
|
3180
3181
|
return !isNaN(S) && S <= L;
|
|
3181
3182
|
},
|
|
3182
|
-
pattern: (
|
|
3183
|
-
custom: (
|
|
3184
|
-
}, N = (
|
|
3185
|
-
const L = [], S = String(
|
|
3186
|
-
if (t.required && !z.required(
|
|
3187
|
-
|
|
3183
|
+
pattern: (d, L) => new RegExp(L).test(d),
|
|
3184
|
+
custom: (d, L) => L(d)
|
|
3185
|
+
}, N = (d) => {
|
|
3186
|
+
const L = [], S = String(d || "");
|
|
3187
|
+
if (t.required && !z.required(d) && L.push(t.requiredMessage || "Це поле є обов'язковим"), !S && !t.required) {
|
|
3188
|
+
c.value = L, V.value = L.length === 0;
|
|
3188
3189
|
return;
|
|
3189
3190
|
}
|
|
3190
3191
|
switch (t.type) {
|
|
@@ -3198,7 +3199,7 @@ const Se = new Is(), Bs = {
|
|
|
3198
3199
|
S && !z.number(S) && L.push(t.numberMessage || "Введіть коректне число");
|
|
3199
3200
|
break;
|
|
3200
3201
|
}
|
|
3201
|
-
t.minlength && S && !z.minlength(S, t.minlength) && L.push(t.minlengthMessage || `Мінімальна довжина: ${t.minlength} символів`), t.maxlength && S && !z.maxlength(S, t.maxlength) && L.push(t.maxlengthMessage || `Максимальна довжина: ${t.maxlength} символів`), t.type === "number" && S && z.number(S) && (t.min !== void 0 && !z.min(S, t.min) && L.push(t.minMessage || `Мінімальне значення: ${t.min}`), t.max !== void 0 && !z.max(S, t.max) && L.push(t.maxMessage || `Максимальне значення: ${t.max}`)), t.pattern && S && !z.pattern(S, t.pattern) && L.push(t.patternMessage || "Значення не відповідає вимогам формату"), t.customValidator && !z.custom(
|
|
3202
|
+
t.minlength && S && !z.minlength(S, t.minlength) && L.push(t.minlengthMessage || `Мінімальна довжина: ${t.minlength} символів`), t.maxlength && S && !z.maxlength(S, t.maxlength) && L.push(t.maxlengthMessage || `Максимальна довжина: ${t.maxlength} символів`), t.type === "number" && S && z.number(S) && (t.min !== void 0 && !z.min(S, t.min) && L.push(t.minMessage || `Мінімальне значення: ${t.min}`), t.max !== void 0 && !z.max(S, t.max) && L.push(t.maxMessage || `Максимальне значення: ${t.max}`)), t.pattern && S && !z.pattern(S, t.pattern) && L.push(t.patternMessage || "Значення не відповідає вимогам формату"), t.customValidator && !z.custom(d, t.customValidator) && L.push(t.customValidatorMessage || "Значення не проходить валідацію"), c.value = L, V.value = L.length === 0, s("validation", { isValid: V.value, errors: L });
|
|
3202
3203
|
}, Z = I(() => t.type === "textarea"), D = I(() => {
|
|
3203
3204
|
if (t.type === "password") return null;
|
|
3204
3205
|
switch (t.type) {
|
|
@@ -3222,21 +3223,21 @@ const Se = new Is(), Bs = {
|
|
|
3222
3223
|
return V.value ? null : "alertCircle";
|
|
3223
3224
|
}
|
|
3224
3225
|
}), T = I(() => !!t.prefixIcon || !!D.value || !!J.value), A = I(() => t.prefixIcon || D.value || J.value), O = I(() => {
|
|
3225
|
-
const
|
|
3226
|
+
const d = "vt-input__icon", L = t.status !== "default" ? t.status : V.value ? "default" : "error";
|
|
3226
3227
|
if (t.prefixIcon)
|
|
3227
|
-
return
|
|
3228
|
+
return d;
|
|
3228
3229
|
if (J.value)
|
|
3229
3230
|
switch (L) {
|
|
3230
3231
|
case "error":
|
|
3231
|
-
return `${
|
|
3232
|
+
return `${d} vt-input__icon--error`;
|
|
3232
3233
|
case "warning":
|
|
3233
|
-
return `${
|
|
3234
|
+
return `${d} vt-input__icon--warning`;
|
|
3234
3235
|
case "success":
|
|
3235
|
-
return `${
|
|
3236
|
+
return `${d} vt-input__icon--success`;
|
|
3236
3237
|
default:
|
|
3237
|
-
return
|
|
3238
|
+
return d;
|
|
3238
3239
|
}
|
|
3239
|
-
return
|
|
3240
|
+
return d;
|
|
3240
3241
|
}), G = I(() => ["email", "url", "password"].includes(t.type) && t.suffixIcon ? t.clearable || t.showPassword : !!t.suffixIcon || t.clearable || t.showPassword), F = I(() => ["email", "url", "password"].includes(t.type) ? null : t.suffixIcon), q = I(
|
|
3241
3242
|
() => t.clearable && !t.disabled && t.modelValue && String(t.modelValue).length > 0
|
|
3242
3243
|
), ee = I(() => t.status !== "default" ? t.status : V.value ? "default" : "error"), he = I(() => [
|
|
@@ -3251,48 +3252,48 @@ const Se = new Is(), Bs = {
|
|
|
3251
3252
|
"vt-input--has-suffix": G.value,
|
|
3252
3253
|
"vt-input--invalid": !V.value
|
|
3253
3254
|
}
|
|
3254
|
-
]), M = I(() => t.type === "password" ? h.value ? "text" : "password" : t.type === "textarea" ? "text" : t.type), R = I(() => t.errorMessage ? t.errorMessage :
|
|
3255
|
-
let S =
|
|
3255
|
+
]), M = I(() => t.type === "password" ? h.value ? "text" : "password" : t.type === "textarea" ? "text" : t.type), R = I(() => t.errorMessage ? t.errorMessage : c.value.length > 0 ? c.value[0] : ""), te = I(() => t.autosize && typeof t.autosize == "object" && t.autosize.maxRows ? "none" : t.resize), ie = (d) => {
|
|
3256
|
+
let S = d.target.value;
|
|
3256
3257
|
if (t.type === "number" && S !== "") {
|
|
3257
|
-
const
|
|
3258
|
-
isNaN(
|
|
3258
|
+
const ce = Number(S);
|
|
3259
|
+
isNaN(ce) || (S = ce);
|
|
3259
3260
|
}
|
|
3260
|
-
s("update:modelValue", S), s("input",
|
|
3261
|
-
}, C = (
|
|
3262
|
-
if (s("change",
|
|
3263
|
-
const L =
|
|
3261
|
+
s("update:modelValue", S), s("input", d), t.validateOnInput && N(S), Z.value && t.autosize && !x.value && Ve(() => B());
|
|
3262
|
+
}, C = (d) => {
|
|
3263
|
+
if (s("change", d), !t.validateOnInput) {
|
|
3264
|
+
const L = d.target;
|
|
3264
3265
|
N(L.value);
|
|
3265
3266
|
}
|
|
3266
|
-
}, _ = (
|
|
3267
|
-
v.value = !0, s("focus",
|
|
3268
|
-
}, f = (
|
|
3269
|
-
if (v.value = !1, s("blur",
|
|
3270
|
-
const L =
|
|
3267
|
+
}, _ = (d) => {
|
|
3268
|
+
v.value = !0, s("focus", d);
|
|
3269
|
+
}, f = (d) => {
|
|
3270
|
+
if (v.value = !1, s("blur", d), t.validateOnBlur) {
|
|
3271
|
+
const L = d.target;
|
|
3271
3272
|
N(L.value);
|
|
3272
3273
|
}
|
|
3273
3274
|
}, w = () => {
|
|
3274
|
-
var
|
|
3275
|
-
s("update:modelValue", ""), s("clear"), (
|
|
3275
|
+
var d;
|
|
3276
|
+
s("update:modelValue", ""), s("clear"), (d = a.value) == null || d.focus(), c.value = [], V.value = !0, s("validation", { isValid: !0, errors: [] });
|
|
3276
3277
|
}, $ = () => {
|
|
3277
3278
|
h.value = !h.value, Ve(() => {
|
|
3278
|
-
var
|
|
3279
|
-
(
|
|
3279
|
+
var d;
|
|
3280
|
+
(d = a.value) == null || d.focus();
|
|
3280
3281
|
});
|
|
3281
3282
|
}, B = () => {
|
|
3282
3283
|
if (!u.value || !t.autosize || x.value) return;
|
|
3283
|
-
const
|
|
3284
|
-
|
|
3285
|
-
let S =
|
|
3284
|
+
const d = u.value, L = d.style.height;
|
|
3285
|
+
d.style.height = "auto";
|
|
3286
|
+
let S = d.scrollHeight;
|
|
3286
3287
|
if (typeof t.autosize == "object") {
|
|
3287
|
-
const Me = parseInt(getComputedStyle(
|
|
3288
|
+
const Me = parseInt(getComputedStyle(d).lineHeight), $e = t.autosize.minRows ? t.autosize.minRows * Me : 0, Le = t.autosize.maxRows ? t.autosize.maxRows * Me : 1 / 0;
|
|
3288
3289
|
S = Math.max($e, Math.min(S, Le));
|
|
3289
3290
|
}
|
|
3290
|
-
const
|
|
3291
|
-
|
|
3292
|
-
}, le = (
|
|
3291
|
+
const ce = `${S}px`;
|
|
3292
|
+
ce !== L && (m.value = ce, d.style.height = ce);
|
|
3293
|
+
}, le = (d) => {
|
|
3293
3294
|
if (!u.value || !(te.value !== "none")) return;
|
|
3294
|
-
const
|
|
3295
|
-
if (
|
|
3295
|
+
const ce = u.value.getBoundingClientRect();
|
|
3296
|
+
if (d.clientX > ce.right - 20 && d.clientY > ce.bottom - 20) {
|
|
3296
3297
|
x.value = !0;
|
|
3297
3298
|
const $e = () => {
|
|
3298
3299
|
x.value = !1, document.removeEventListener("mouseup", $e);
|
|
@@ -3302,33 +3303,33 @@ const Se = new Is(), Bs = {
|
|
|
3302
3303
|
};
|
|
3303
3304
|
return e({
|
|
3304
3305
|
focus: () => {
|
|
3305
|
-
var
|
|
3306
|
-
(
|
|
3306
|
+
var d;
|
|
3307
|
+
(d = a.value) == null || d.focus();
|
|
3307
3308
|
},
|
|
3308
3309
|
blur: () => {
|
|
3309
|
-
var
|
|
3310
|
-
(
|
|
3310
|
+
var d;
|
|
3311
|
+
(d = a.value) == null || d.blur();
|
|
3311
3312
|
},
|
|
3312
3313
|
select: () => {
|
|
3313
|
-
var
|
|
3314
|
-
(
|
|
3314
|
+
var d;
|
|
3315
|
+
(d = a.value) == null || d.select();
|
|
3315
3316
|
},
|
|
3316
3317
|
clear: () => {
|
|
3317
3318
|
w();
|
|
3318
3319
|
},
|
|
3319
3320
|
validate: () => (N(t.modelValue || ""), V.value),
|
|
3320
3321
|
clearValidation: () => {
|
|
3321
|
-
|
|
3322
|
+
c.value = [], V.value = !0, s("validation", { isValid: !0, errors: [] });
|
|
3322
3323
|
},
|
|
3323
3324
|
getInputElement: () => a.value || null,
|
|
3324
3325
|
getValidationState: () => ({
|
|
3325
3326
|
isValid: V.value,
|
|
3326
|
-
errors: [...
|
|
3327
|
+
errors: [...c.value]
|
|
3327
3328
|
})
|
|
3328
3329
|
}), ge(
|
|
3329
3330
|
() => t.modelValue,
|
|
3330
|
-
(
|
|
3331
|
-
Z.value && t.autosize && !x.value && Ve(B), t.validateOnInput && N(
|
|
3331
|
+
(d) => {
|
|
3332
|
+
Z.value && t.autosize && !x.value && Ve(B), t.validateOnInput && N(d || "");
|
|
3332
3333
|
}
|
|
3333
3334
|
), ge(
|
|
3334
3335
|
() => [t.required, t.minlength, t.maxlength, t.min, t.max, t.pattern],
|
|
@@ -3341,19 +3342,19 @@ const Se = new Is(), Bs = {
|
|
|
3341
3342
|
}), xe(() => {
|
|
3342
3343
|
Z.value && t.autosize;
|
|
3343
3344
|
}), je(() => {
|
|
3344
|
-
}), (
|
|
3345
|
+
}), (d, L) => (o(), i("div", {
|
|
3345
3346
|
class: Y(he.value)
|
|
3346
3347
|
}, [
|
|
3347
|
-
|
|
3348
|
+
d.label ? (o(), i("label", {
|
|
3348
3349
|
key: 0,
|
|
3349
3350
|
class: "vt-input__label",
|
|
3350
|
-
for:
|
|
3351
|
+
for: d.id
|
|
3351
3352
|
}, [
|
|
3352
|
-
Ie(Q(
|
|
3353
|
-
|
|
3354
|
-
], 8,
|
|
3355
|
-
l("div",
|
|
3356
|
-
T.value ? (o(), i("div",
|
|
3353
|
+
Ie(Q(d.label) + " ", 1),
|
|
3354
|
+
d.required ? (o(), i("span", cr, "*")) : j("", !0)
|
|
3355
|
+
], 8, dr)) : j("", !0),
|
|
3356
|
+
l("div", hr, [
|
|
3357
|
+
T.value ? (o(), i("div", pr, [
|
|
3357
3358
|
U(se, {
|
|
3358
3359
|
name: A.value,
|
|
3359
3360
|
class: Y(O.value)
|
|
@@ -3363,18 +3364,18 @@ const Se = new Is(), Bs = {
|
|
|
3363
3364
|
key: 1,
|
|
3364
3365
|
ref_key: "textareaRef",
|
|
3365
3366
|
ref: u,
|
|
3366
|
-
value:
|
|
3367
|
-
placeholder:
|
|
3368
|
-
disabled:
|
|
3369
|
-
rows:
|
|
3370
|
-
cols:
|
|
3371
|
-
maxlength:
|
|
3372
|
-
minlength:
|
|
3373
|
-
required:
|
|
3374
|
-
name:
|
|
3375
|
-
id:
|
|
3376
|
-
tabindex:
|
|
3377
|
-
autocomplete:
|
|
3367
|
+
value: d.modelValue,
|
|
3368
|
+
placeholder: d.placeholder,
|
|
3369
|
+
disabled: d.disabled,
|
|
3370
|
+
rows: d.rows,
|
|
3371
|
+
cols: d.cols,
|
|
3372
|
+
maxlength: d.maxlength,
|
|
3373
|
+
minlength: d.minlength,
|
|
3374
|
+
required: d.required,
|
|
3375
|
+
name: d.name,
|
|
3376
|
+
id: d.id,
|
|
3377
|
+
tabindex: d.tabindex,
|
|
3378
|
+
autocomplete: d.autocomplete,
|
|
3378
3379
|
style: Ce({ resize: te.value, height: m.value }),
|
|
3379
3380
|
class: "vt-input__field vt-input__textarea",
|
|
3380
3381
|
onInput: ie,
|
|
@@ -3382,40 +3383,40 @@ const Se = new Is(), Bs = {
|
|
|
3382
3383
|
onFocus: _,
|
|
3383
3384
|
onBlur: f,
|
|
3384
3385
|
onMousedown: le,
|
|
3385
|
-
onKeydown: L[0] || (L[0] = (S) =>
|
|
3386
|
-
onKeyup: L[1] || (L[1] = (S) =>
|
|
3387
|
-
onKeypress: L[2] || (L[2] = (S) =>
|
|
3388
|
-
onClick: L[3] || (L[3] = (S) =>
|
|
3389
|
-
}, null, 44,
|
|
3386
|
+
onKeydown: L[0] || (L[0] = (S) => d.$emit("keydown", S)),
|
|
3387
|
+
onKeyup: L[1] || (L[1] = (S) => d.$emit("keyup", S)),
|
|
3388
|
+
onKeypress: L[2] || (L[2] = (S) => d.$emit("keypress", S)),
|
|
3389
|
+
onClick: L[3] || (L[3] = (S) => d.$emit("click", S))
|
|
3390
|
+
}, null, 44, vr)) : (o(), i("input", {
|
|
3390
3391
|
key: 2,
|
|
3391
3392
|
ref_key: "inputRef",
|
|
3392
3393
|
ref: a,
|
|
3393
3394
|
type: M.value,
|
|
3394
|
-
value:
|
|
3395
|
-
placeholder:
|
|
3396
|
-
disabled:
|
|
3397
|
-
maxlength:
|
|
3398
|
-
minlength:
|
|
3399
|
-
min:
|
|
3400
|
-
max:
|
|
3401
|
-
step:
|
|
3402
|
-
required:
|
|
3403
|
-
pattern:
|
|
3404
|
-
name:
|
|
3405
|
-
id:
|
|
3406
|
-
tabindex:
|
|
3407
|
-
autocomplete:
|
|
3395
|
+
value: d.modelValue,
|
|
3396
|
+
placeholder: d.placeholder,
|
|
3397
|
+
disabled: d.disabled,
|
|
3398
|
+
maxlength: d.maxlength,
|
|
3399
|
+
minlength: d.minlength,
|
|
3400
|
+
min: d.min,
|
|
3401
|
+
max: d.max,
|
|
3402
|
+
step: d.step,
|
|
3403
|
+
required: d.required,
|
|
3404
|
+
pattern: d.pattern,
|
|
3405
|
+
name: d.name,
|
|
3406
|
+
id: d.id,
|
|
3407
|
+
tabindex: d.tabindex,
|
|
3408
|
+
autocomplete: d.autocomplete,
|
|
3408
3409
|
class: "vt-input__field",
|
|
3409
3410
|
onInput: ie,
|
|
3410
3411
|
onChange: C,
|
|
3411
3412
|
onFocus: _,
|
|
3412
3413
|
onBlur: f,
|
|
3413
|
-
onKeydown: L[4] || (L[4] = (S) =>
|
|
3414
|
-
onKeyup: L[5] || (L[5] = (S) =>
|
|
3415
|
-
onKeypress: L[6] || (L[6] = (S) =>
|
|
3416
|
-
onClick: L[7] || (L[7] = (S) =>
|
|
3417
|
-
}, null, 40,
|
|
3418
|
-
G.value ? (o(), i("div",
|
|
3414
|
+
onKeydown: L[4] || (L[4] = (S) => d.$emit("keydown", S)),
|
|
3415
|
+
onKeyup: L[5] || (L[5] = (S) => d.$emit("keyup", S)),
|
|
3416
|
+
onKeypress: L[6] || (L[6] = (S) => d.$emit("keypress", S)),
|
|
3417
|
+
onClick: L[7] || (L[7] = (S) => d.$emit("click", S))
|
|
3418
|
+
}, null, 40, fr)),
|
|
3419
|
+
G.value ? (o(), i("div", mr, [
|
|
3419
3420
|
q.value ? (o(), i("button", {
|
|
3420
3421
|
key: 0,
|
|
3421
3422
|
type: "button",
|
|
@@ -3427,7 +3428,7 @@ const Se = new Is(), Bs = {
|
|
|
3427
3428
|
class: "vt-input__icon"
|
|
3428
3429
|
})
|
|
3429
3430
|
])) : j("", !0),
|
|
3430
|
-
|
|
3431
|
+
d.showPassword && d.type === "password" ? (o(), i("button", {
|
|
3431
3432
|
key: 1,
|
|
3432
3433
|
type: "button",
|
|
3433
3434
|
class: "vt-input__password-btn",
|
|
@@ -3445,12 +3446,12 @@ const Se = new Is(), Bs = {
|
|
|
3445
3446
|
}, null, 8, ["name"])) : j("", !0)
|
|
3446
3447
|
])) : j("", !0)
|
|
3447
3448
|
]),
|
|
3448
|
-
|
|
3449
|
-
R.value ? (o(), i("span",
|
|
3449
|
+
d.helperText || R.value ? (o(), i("div", Cr, [
|
|
3450
|
+
R.value ? (o(), i("span", wr, Q(R.value), 1)) : d.helperText ? (o(), i("span", gr, Q(d.helperText), 1)) : j("", !0)
|
|
3450
3451
|
])) : j("", !0),
|
|
3451
|
-
|
|
3452
|
-
(o(!0), i(ve, null, fe(
|
|
3453
|
-
key:
|
|
3452
|
+
c.value.length > 1 && d.showAllErrors ? (o(), i("div", _r, [
|
|
3453
|
+
(o(!0), i(ve, null, fe(c.value, (S, ce) => (o(), i("div", {
|
|
3454
|
+
key: ce,
|
|
3454
3455
|
class: "vt-input__error-item"
|
|
3455
3456
|
}, [
|
|
3456
3457
|
l("span", null, Q(S), 1)
|
|
@@ -3458,37 +3459,37 @@ const Se = new Is(), Bs = {
|
|
|
3458
3459
|
])) : j("", !0)
|
|
3459
3460
|
], 2));
|
|
3460
3461
|
}
|
|
3461
|
-
}), mt = Symbol("VtSelectContext"),
|
|
3462
|
+
}), mt = Symbol("VtSelectContext"), kr = ["for"], br = {
|
|
3462
3463
|
key: 0,
|
|
3463
3464
|
class: "vt-select__required"
|
|
3464
|
-
},
|
|
3465
|
+
}, yr = { class: "vt-select__field" }, xr = { class: "vt-select__tag-text" }, Mr = ["disabled", "onClick"], $r = ["title"], Lr = { class: "vt-select__tag-text" }, Vr = {
|
|
3465
3466
|
key: 1,
|
|
3466
3467
|
class: "vt-select__display-text"
|
|
3467
|
-
},
|
|
3468
|
+
}, Sr = {
|
|
3468
3469
|
key: 2,
|
|
3469
3470
|
class: "vt-select__placeholder"
|
|
3470
|
-
},
|
|
3471
|
+
}, Ir = { class: "vt-select__suffix" }, Br = ["disabled"], Hr = {
|
|
3471
3472
|
key: 0,
|
|
3472
3473
|
class: "vt-select__help"
|
|
3473
|
-
},
|
|
3474
|
+
}, Er = {
|
|
3474
3475
|
"aria-hidden": "true",
|
|
3475
3476
|
style: { display: "none" }
|
|
3476
|
-
},
|
|
3477
|
+
}, Rr = ["aria-multiselectable"], Tr = {
|
|
3477
3478
|
key: 0,
|
|
3478
3479
|
class: "vt-select-dropdown__search"
|
|
3479
|
-
},
|
|
3480
|
+
}, zr = {
|
|
3480
3481
|
key: 1,
|
|
3481
3482
|
class: "vt-select-dropdown__loading"
|
|
3482
|
-
},
|
|
3483
|
+
}, jr = {
|
|
3483
3484
|
key: 2,
|
|
3484
3485
|
class: "vt-select-dropdown__empty"
|
|
3485
|
-
},
|
|
3486
|
+
}, Or = {
|
|
3486
3487
|
key: 3,
|
|
3487
3488
|
class: "vt-select-dropdown__empty"
|
|
3488
|
-
},
|
|
3489
|
+
}, Dr = {
|
|
3489
3490
|
key: 4,
|
|
3490
3491
|
class: "vt-select-dropdown__options"
|
|
3491
|
-
},
|
|
3492
|
+
}, Wr = ["aria-disabled", "aria-selected", "onClick"], Pr = { class: "vt-option__text" }, Ar = { key: 1 }, Zr = /* @__PURE__ */ pe({
|
|
3492
3493
|
__name: "VSelect",
|
|
3493
3494
|
props: {
|
|
3494
3495
|
modelValue: {},
|
|
@@ -3523,7 +3524,7 @@ const Se = new Is(), Bs = {
|
|
|
3523
3524
|
setup(n, { expose: e, emit: r }) {
|
|
3524
3525
|
const t = n, s = r;
|
|
3525
3526
|
Pe();
|
|
3526
|
-
const a = E(), u = E(), v = E(), h = E(), m = E(),
|
|
3527
|
+
const a = E(), u = E(), v = E(), h = E(), m = E(), c = E([]), V = E(!1), x = E(!1), z = E(""), N = E([]), Z = E(!0), D = E(0), J = E(/* @__PURE__ */ new Map()), T = E(/* @__PURE__ */ new Map()), A = E({
|
|
3527
3528
|
top: "0px",
|
|
3528
3529
|
left: "0px",
|
|
3529
3530
|
minWidth: "0px",
|
|
@@ -3591,7 +3592,7 @@ const Se = new Is(), Bs = {
|
|
|
3591
3592
|
re = re.parentElement;
|
|
3592
3593
|
}
|
|
3593
3594
|
return !0;
|
|
3594
|
-
},
|
|
3595
|
+
}, de = () => {
|
|
3595
3596
|
if (!u.value) return;
|
|
3596
3597
|
const p = le(u.value);
|
|
3597
3598
|
G.value !== p && (G.value = p, !p && x.value ? (F.value = !0, x.value = !1, s("visible-change", !1)) : p && F.value && !x.value && (F.value = !1, x.value = !0, we(), s("visible-change", !0)));
|
|
@@ -3643,14 +3644,14 @@ const Se = new Is(), Bs = {
|
|
|
3643
3644
|
p.removeEventListener("scroll", Be);
|
|
3644
3645
|
}), window.removeEventListener("resize", Be), O.value = [];
|
|
3645
3646
|
}, Be = () => {
|
|
3646
|
-
(x.value || F.value) && (
|
|
3647
|
+
(x.value || F.value) && (de(), x.value && we());
|
|
3647
3648
|
}, De = () => {
|
|
3648
3649
|
t.disabled || x.value || !u.value || !le(u.value) || (x.value = !0, G.value = !0, F.value = !1, Ve(() => {
|
|
3649
3650
|
we(), Oe(), t.filterable && h.value && h.value.focus();
|
|
3650
3651
|
}), s("visible-change", !0));
|
|
3651
3652
|
}, He = () => {
|
|
3652
3653
|
x.value && (x.value = !1, z.value = "", F.value = !1, Re(), t.validateOnBlur && f(), s("visible-change", !1));
|
|
3653
|
-
},
|
|
3654
|
+
}, d = (p) => {
|
|
3654
3655
|
var b, K;
|
|
3655
3656
|
if (!x.value) return;
|
|
3656
3657
|
const g = p.target;
|
|
@@ -3666,7 +3667,7 @@ const Se = new Is(), Bs = {
|
|
|
3666
3667
|
s("update:modelValue", p.value), s("change", p.value), He();
|
|
3667
3668
|
t.validateOnInput && f();
|
|
3668
3669
|
}
|
|
3669
|
-
},
|
|
3670
|
+
}, ce = () => {
|
|
3670
3671
|
t.disabled || (x.value ? He() : De());
|
|
3671
3672
|
}, Me = () => {
|
|
3672
3673
|
const p = q.value ? [] : "";
|
|
@@ -3686,7 +3687,7 @@ const Se = new Is(), Bs = {
|
|
|
3686
3687
|
let g = 0, b = 0;
|
|
3687
3688
|
const K = 60;
|
|
3688
3689
|
for (let P = 0; P < M.value.length; P++) {
|
|
3689
|
-
const re =
|
|
3690
|
+
const re = c.value[P];
|
|
3690
3691
|
if (!re) break;
|
|
3691
3692
|
const me = re.offsetWidth + 4;
|
|
3692
3693
|
if (P < M.value.length - 1 && g + me + K > p)
|
|
@@ -3753,11 +3754,11 @@ const Se = new Is(), Bs = {
|
|
|
3753
3754
|
const p = () => {
|
|
3754
3755
|
Te();
|
|
3755
3756
|
};
|
|
3756
|
-
window.addEventListener("resize", p), document.addEventListener("click",
|
|
3757
|
+
window.addEventListener("resize", p), document.addEventListener("click", d), je(() => {
|
|
3757
3758
|
window.removeEventListener("resize", p);
|
|
3758
3759
|
});
|
|
3759
3760
|
}), je(() => {
|
|
3760
|
-
document.removeEventListener("click",
|
|
3761
|
+
document.removeEventListener("click", d), Re();
|
|
3761
3762
|
}), (p, g) => (o(), i("div", {
|
|
3762
3763
|
ref_key: "selectRef",
|
|
3763
3764
|
ref: a,
|
|
@@ -3769,15 +3770,15 @@ const Se = new Is(), Bs = {
|
|
|
3769
3770
|
class: "vt-select__label"
|
|
3770
3771
|
}, [
|
|
3771
3772
|
Ie(Q(p.label) + " ", 1),
|
|
3772
|
-
p.required ? (o(), i("span",
|
|
3773
|
-
], 8,
|
|
3773
|
+
p.required ? (o(), i("span", br, "*")) : j("", !0)
|
|
3774
|
+
], 8, kr)) : j("", !0),
|
|
3774
3775
|
l("div", {
|
|
3775
3776
|
ref_key: "triggerRef",
|
|
3776
3777
|
ref: u,
|
|
3777
3778
|
class: "vt-select__container",
|
|
3778
|
-
onClick:
|
|
3779
|
+
onClick: ce
|
|
3779
3780
|
}, [
|
|
3780
|
-
l("div",
|
|
3781
|
+
l("div", yr, [
|
|
3781
3782
|
p.multiple && M.value.length > 0 ? (o(), i("div", {
|
|
3782
3783
|
key: 0,
|
|
3783
3784
|
ref_key: "containerRef",
|
|
@@ -3787,10 +3788,10 @@ const Se = new Is(), Bs = {
|
|
|
3787
3788
|
(o(!0), i(ve, null, fe(M.value.slice(0, D.value), (b, K) => (o(), i("div", {
|
|
3788
3789
|
key: `tag-${b.value}`,
|
|
3789
3790
|
ref_for: !0,
|
|
3790
|
-
ref: (P) => P && (
|
|
3791
|
+
ref: (P) => P && (c.value[K] = P),
|
|
3791
3792
|
class: "vt-select__tag"
|
|
3792
3793
|
}, [
|
|
3793
|
-
l("span",
|
|
3794
|
+
l("span", xr, Q(b.label), 1),
|
|
3794
3795
|
l("button", {
|
|
3795
3796
|
disabled: t.disabled,
|
|
3796
3797
|
class: "vt-select__tag-close",
|
|
@@ -3799,18 +3800,18 @@ const Se = new Is(), Bs = {
|
|
|
3799
3800
|
}, [
|
|
3800
3801
|
g[2] || (g[2] = Ie('""""" ', -1)),
|
|
3801
3802
|
U(se, { name: "close" })
|
|
3802
|
-
], 8,
|
|
3803
|
+
], 8, Mr)
|
|
3803
3804
|
]))), 128)),
|
|
3804
3805
|
p.collapsedTags && D.value < M.value.length ? (o(), i("div", {
|
|
3805
3806
|
key: 0,
|
|
3806
3807
|
title: `Вибрано ще ${M.value.length - D.value} опцій`,
|
|
3807
3808
|
class: "vt-select__tag vt-select__tag--collapsed"
|
|
3808
3809
|
}, [
|
|
3809
|
-
l("span",
|
|
3810
|
-
], 8,
|
|
3811
|
-
], 512)) : !p.multiple && R.value ? (o(), i("span",
|
|
3810
|
+
l("span", Lr, " +" + Q(M.value.length - D.value), 1)
|
|
3811
|
+
], 8, $r)) : j("", !0)
|
|
3812
|
+
], 512)) : !p.multiple && R.value ? (o(), i("span", Vr, Q(R.value), 1)) : (o(), i("span", Sr, Q(p.placeholder), 1))
|
|
3812
3813
|
]),
|
|
3813
|
-
l("div",
|
|
3814
|
+
l("div", Ir, [
|
|
3814
3815
|
p.loading ? (o(), ue(Ae, {
|
|
3815
3816
|
key: 0,
|
|
3816
3817
|
class: "vt-select__loading"
|
|
@@ -3822,7 +3823,7 @@ const Se = new Is(), Bs = {
|
|
|
3822
3823
|
onClick: ye(Me, ["stop"])
|
|
3823
3824
|
}, [
|
|
3824
3825
|
U(se, { name: "close" })
|
|
3825
|
-
], 8,
|
|
3826
|
+
], 8, Br)) : (o(), ue(se, {
|
|
3826
3827
|
key: 2,
|
|
3827
3828
|
class: Y([{ "vt-select__arrow--open": x.value }, "vt-select__icon vt-select__arrow"]),
|
|
3828
3829
|
name: "arrowDown"
|
|
@@ -3831,7 +3832,7 @@ const Se = new Is(), Bs = {
|
|
|
3831
3832
|
], 512),
|
|
3832
3833
|
U(ot, { name: "fade" }, {
|
|
3833
3834
|
default: be(() => [
|
|
3834
|
-
N.value.length > 0 ? (o(), i("div",
|
|
3835
|
+
N.value.length > 0 ? (o(), i("div", Hr, [
|
|
3835
3836
|
(o(!0), i(ve, null, fe(N.value, (b) => (o(), i("div", {
|
|
3836
3837
|
key: b,
|
|
3837
3838
|
class: "vt-select__error"
|
|
@@ -3840,7 +3841,7 @@ const Se = new Is(), Bs = {
|
|
|
3840
3841
|
]),
|
|
3841
3842
|
_: 1
|
|
3842
3843
|
}),
|
|
3843
|
-
l("div",
|
|
3844
|
+
l("div", Er, [
|
|
3844
3845
|
_e(p.$slots, "default")
|
|
3845
3846
|
]),
|
|
3846
3847
|
(o(), ue(Je, { to: "body" }, [
|
|
@@ -3857,7 +3858,7 @@ const Se = new Is(), Bs = {
|
|
|
3857
3858
|
onClick: g[1] || (g[1] = ye(() => {
|
|
3858
3859
|
}, ["stop"]))
|
|
3859
3860
|
}, [
|
|
3860
|
-
p.filterable ? (o(), i("div",
|
|
3861
|
+
p.filterable ? (o(), i("div", Tr, [
|
|
3861
3862
|
U(ft, {
|
|
3862
3863
|
ref_key: "filterInputRef",
|
|
3863
3864
|
ref: h,
|
|
@@ -3869,10 +3870,10 @@ const Se = new Is(), Bs = {
|
|
|
3869
3870
|
onInput: L
|
|
3870
3871
|
}, null, 8, ["modelValue"])
|
|
3871
3872
|
])) : j("", !0),
|
|
3872
|
-
p.loading ? (o(), i("div",
|
|
3873
|
+
p.loading ? (o(), i("div", zr, [
|
|
3873
3874
|
U(Ae, { class: "vt-select-dropdown__loading-icon" }),
|
|
3874
3875
|
Ie(" " + Q(p.loadingText), 1)
|
|
3875
|
-
])) : ee.value.length === 0 ? (o(), i("div",
|
|
3876
|
+
])) : ee.value.length === 0 ? (o(), i("div", jr, Q(p.noDataText), 1)) : he.value.length === 0 ? (o(), i("div", Or, Q(p.noMatchText), 1)) : (o(), i("div", Dr, [
|
|
3876
3877
|
(o(!0), i(ve, null, fe(he.value, (b) => (o(), i("div", {
|
|
3877
3878
|
key: `option-${b.value}`,
|
|
3878
3879
|
"aria-disabled": b.disabled,
|
|
@@ -3894,19 +3895,19 @@ const Se = new Is(), Bs = {
|
|
|
3894
3895
|
class: "vt-option__checkbox",
|
|
3895
3896
|
tabindex: "-1"
|
|
3896
3897
|
}, null, 8, ["checked", "disabled"])) : j("", !0),
|
|
3897
|
-
l("span",
|
|
3898
|
-
B(b.value) ? (o(), ue(Ge(B(b.value)), { key: 0 })) : (o(), i("span",
|
|
3898
|
+
l("span", Pr, [
|
|
3899
|
+
B(b.value) ? (o(), ue(Ge(B(b.value)), { key: 0 })) : (o(), i("span", Ar, Q(b.label), 1))
|
|
3899
3900
|
])
|
|
3900
|
-
], 10,
|
|
3901
|
+
], 10, Wr))), 128))
|
|
3901
3902
|
]))
|
|
3902
|
-
], 12,
|
|
3903
|
+
], 12, Rr)) : j("", !0)
|
|
3903
3904
|
]),
|
|
3904
3905
|
_: 1
|
|
3905
3906
|
})
|
|
3906
3907
|
]))
|
|
3907
3908
|
], 2));
|
|
3908
3909
|
}
|
|
3909
|
-
}),
|
|
3910
|
+
}), Nr = { style: { display: "none" } }, Fr = /* @__PURE__ */ pe({
|
|
3910
3911
|
__name: "VOption",
|
|
3911
3912
|
props: {
|
|
3912
3913
|
label: {},
|
|
@@ -3929,7 +3930,7 @@ const Se = new Is(), Bs = {
|
|
|
3929
3930
|
s && (t.default, s.registerOption(a.value));
|
|
3930
3931
|
}), kt(() => {
|
|
3931
3932
|
s && s.unregisterOption(r.value);
|
|
3932
|
-
}), (u, v) => (o(), i("div",
|
|
3933
|
+
}), (u, v) => (o(), i("div", Nr, [
|
|
3933
3934
|
_e(u.$slots, "default")
|
|
3934
3935
|
]));
|
|
3935
3936
|
}
|
|
@@ -4016,15 +4017,15 @@ const Se = new Is(), Bs = {
|
|
|
4016
4017
|
v = t.top + u + (t.height - s.height) / 2, h = t.right + a + 8;
|
|
4017
4018
|
break;
|
|
4018
4019
|
}
|
|
4019
|
-
const m = window.innerWidth,
|
|
4020
|
-
h < 8 ? h = 8 : h + s.width > m - 8 && (h = m - s.width - 8), v < u + 8 ? r === "top" ? v = t.bottom + u + 8 : v = u + 8 : v + s.height > u +
|
|
4020
|
+
const m = window.innerWidth, c = window.innerHeight;
|
|
4021
|
+
h < 8 ? h = 8 : h + s.width > m - 8 && (h = m - s.width - 8), v < u + 8 ? r === "top" ? v = t.bottom + u + 8 : v = u + 8 : v + s.height > u + c - 8 && (r === "bottom" ? v = t.top + u - s.height - 8 : v = u + c - s.height - 8), n.style.top = `${v}px`, n.style.left = `${h}px`;
|
|
4021
4022
|
}, it = (n, e, r) => {
|
|
4022
4023
|
n.parentElement || document.body.appendChild(n), n.style.visibility = "visible", Ke(n, e, r), requestAnimationFrame(() => {
|
|
4023
4024
|
n.style.opacity = "1";
|
|
4024
4025
|
});
|
|
4025
4026
|
}, at = (n) => {
|
|
4026
4027
|
n.style.opacity = "0", n.style.visibility = "hidden";
|
|
4027
|
-
}, ut = (n) => n.scrollWidth > n.clientWidth || n.scrollHeight > n.clientHeight,
|
|
4028
|
+
}, ut = (n) => n.scrollWidth > n.clientWidth || n.scrollHeight > n.clientHeight, dt = (n) => !!n.closest(".vt-table, table"), Yr = {
|
|
4028
4029
|
mounted(n, e) {
|
|
4029
4030
|
var h;
|
|
4030
4031
|
const r = (h = e.value) == null ? void 0 : h.trim();
|
|
@@ -4032,7 +4033,7 @@ const Se = new Is(), Bs = {
|
|
|
4032
4033
|
const t = n.dataset.placement || "top", s = rt(r, t);
|
|
4033
4034
|
n.__tooltipEl = s;
|
|
4034
4035
|
const a = () => {
|
|
4035
|
-
(
|
|
4036
|
+
(dt(n) ? ut(n) : !0) && it(s, n, t);
|
|
4036
4037
|
}, u = () => {
|
|
4037
4038
|
at(s);
|
|
4038
4039
|
}, v = () => {
|
|
@@ -4049,7 +4050,7 @@ const Se = new Is(), Bs = {
|
|
|
4049
4050
|
const s = n.dataset.placement || "top", a = rt(r, s);
|
|
4050
4051
|
n.__tooltipEl = a;
|
|
4051
4052
|
const u = () => {
|
|
4052
|
-
(
|
|
4053
|
+
(dt(n) ? ut(n) : !0) && it(a, n, s);
|
|
4053
4054
|
}, v = () => {
|
|
4054
4055
|
at(a);
|
|
4055
4056
|
}, h = () => {
|
|
@@ -4061,21 +4062,21 @@ const Se = new Is(), Bs = {
|
|
|
4061
4062
|
beforeUnmount(n) {
|
|
4062
4063
|
n.__tooltipEl && n.__tooltipEl.parentElement && (n.__tooltipEl.parentElement.removeChild(n.__tooltipEl), delete n.__tooltipEl), n.__mouseenterHandler && (n.removeEventListener("mouseenter", n.__mouseenterHandler), delete n.__mouseenterHandler), n.__mouseleaveHandler && (n.removeEventListener("mouseleave", n.__mouseleaveHandler), delete n.__mouseleaveHandler), n.__scrollHandler && (window.removeEventListener("scroll", n.__scrollHandler, !0), window.removeEventListener("resize", n.__scrollHandler), delete n.__scrollHandler);
|
|
4063
4064
|
}
|
|
4064
|
-
},
|
|
4065
|
+
}, Ur = {
|
|
4065
4066
|
sortable: !0,
|
|
4066
4067
|
actionColumn: !1,
|
|
4067
4068
|
showOverflowTooltip: !0,
|
|
4068
4069
|
visible: !0,
|
|
4069
4070
|
pinnedLeft: !1,
|
|
4070
4071
|
pinnedRight: !1
|
|
4071
|
-
},
|
|
4072
|
+
}, qr = {
|
|
4072
4073
|
install(n, e = {}) {
|
|
4073
4074
|
const { prefix: r = "V", modal: t = !0 } = e;
|
|
4074
|
-
n.component(`${r}Button`, Ze), n.component(`${r}Icon`, se), n.component(`${r}Loader`, Ae), n.component(`${r}Modal`, ht), n.component(`${r}Pagination`, gs), n.component(`${r}Checkbox`, Ee), n.component(`${r}Table`,
|
|
4075
|
+
n.component(`${r}Button`, Ze), n.component(`${r}Icon`, se), n.component(`${r}Loader`, Ae), n.component(`${r}Modal`, ht), n.component(`${r}Pagination`, gs), n.component(`${r}Checkbox`, Ee), n.component(`${r}Table`, ar), n.component(`${r}TableColumn`, ur), n.component(`${r}Dropdown`, vt), n.component(`${r}DropdownItem`, Ue), n.component(`${r}Input`, ft), n.component(`${r}Select`, Zr), n.component(`${r}Option`, Fr), n.directive("tooltip", Yr), t && n.use(Bs);
|
|
4075
4076
|
}
|
|
4076
|
-
},
|
|
4077
|
+
}, Kr = qr.install;
|
|
4077
4078
|
export {
|
|
4078
|
-
|
|
4079
|
+
Ur as DEFAULT_COLUMN_CONFIG,
|
|
4079
4080
|
pt as DropdownContextKey,
|
|
4080
4081
|
Ze as VButton,
|
|
4081
4082
|
Ee as VCheckbox,
|
|
@@ -4086,14 +4087,14 @@ export {
|
|
|
4086
4087
|
Ae as VLoader,
|
|
4087
4088
|
ht as VModal,
|
|
4088
4089
|
Bs as VModalPlugin,
|
|
4089
|
-
|
|
4090
|
+
Fr as VOption,
|
|
4090
4091
|
gs as VPagination,
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4092
|
+
Zr as VSelect,
|
|
4093
|
+
ar as VTable,
|
|
4094
|
+
ur as VTableColumn,
|
|
4094
4095
|
mt as VtSelectContextKey,
|
|
4095
|
-
|
|
4096
|
-
|
|
4096
|
+
qr as default,
|
|
4097
|
+
Kr as install,
|
|
4097
4098
|
Se as modalManager,
|
|
4098
|
-
|
|
4099
|
+
Yr as tooltipDirective
|
|
4099
4100
|
};
|